/* 警报列表网格 — 一行多列的核心 */
.alert-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
gap: 1.25rem;
margin-top: 0.5rem;
}

/* 单个警报卡片 */
.alert-card {
background: white;
border-radius: 20px;
padding: 1.25rem 1.25rem 1rem 1.25rem;
box-shadow: 0 8px 20px -6px rgba(0, 20, 30, 0.08);
border: 1px solid #e9eef3;
transition: transform 0.15s ease, box-shadow 0.2s ease;
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
}

.alert-card:hover {
transform: translateY(-2px);
box-shadow: 0 16px 28px -10px rgba(0, 30, 50, 0.15);
border-color: #cddbe9;
}

/* 每行多列的关键：卡片内字段垂直排列，但整体卡片宽度自适应，一行可以显示多个卡片 */
/* 卡片内字段布局 */
.field-row {
display: flex;
justify-content: space-between;
align-items: baseline;
padding: 0.35rem 0;
border-bottom: 1px dashed #eef3f8;
}

.field-row:last-of-type {
border-bottom: none;
}

.field-label {
font-size: 0.78rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.03em;
color: #6a7d94;
white-space: nowrap;
width: 90px;
flex-shrink: 0;
}

.field-value {
font-size: 0.96rem;
font-weight: 500;
color: #0b1b2f;
text-align: right;
word-break: break-word;
}

/* 特殊强调报警类型/值 */
.alert-code .field-value {
font-family: 'SF Mono', 'Fira Code', monospace;
font-size: 0.9rem;
font-weight: 600;
color: #b91c1c;
background: #fff1f0;
padding: 0.1rem 0.5rem;
border-radius: 20px;
display: inline-block;
}

.alert-type .field-value {
font-weight: 600;
background: #f1f5f9;
padding: 0.1rem 0.6rem;
border-radius: 20px;
font-size: 0.85rem;
}

.alert-type-value .field-value {
color: #0f5c8c;
background: #e6f0ff;
padding: 0.1rem 0.6rem;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 600;
}

/* 报警时间稍微特殊 */
.alert-time .field-value {
font-size: 0.88rem;
color: #2c3e50;
font-weight: 500;
background: #f8fafc;
padding: 0.1rem 0.6rem;
border-radius: 20px;
display: inline-block;
border: 1px solid #e2e8f0;
}

/* 设备号码 */
.device-number .field-value {
font-weight: 600;
font-family: 'SF Mono', monospace;
letter-spacing: 0.01em;
}

/* 卡片顶部装饰条 (报警级别示意) 用不同颜色区分类型 */
.alert-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: #94a3b8; /* 默认灰色，将由行内样式覆盖 */
border-radius: 4px 0 0 4px;
}

/* 但更好的方式是用数据属性或内联样式 */
/* 这里我们用类名 .critical, .warning, .info 来定义左边框颜色 */
.alert-card.critical::before {
background: #e11d48;
}
.alert-card.warning::before {
background: #e67e22;
}
.alert-card.info::before {
background: #0284c7;
}
.alert-card.default::before {
background: #64748b;
}

/* 空状态 / 底部提示 */
.list-footer {
margin-top: 2rem;
text-align: center;
color: #7a8b9f;
font-size: 0.85rem;
padding: 0.75rem 0;
border-top: 1px solid #e2e8f0;
}

/* 响应式微调 */
@media (max-width: 640px) {
body {
padding: 1.25rem 1rem;
}
.alert-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.page-header h1 {
font-size: 1.5rem;
}
.search-box input {
min-width: 120px;
}
.field-label {
width: 80px;
}
}