/* 全局样式 - 现代简洁风格 + Tailwind 实用类 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Tailwind 基础 (轻量级，仅使用核心类) */
*, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; }

/* 自定义变量 */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --gray: #6b7280;
    --light: #f3f4f6;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--dark);
}

/* 按钮增强 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.75rem; }

/* 表格 */
.table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray);
}
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}
.table tr:hover { background: #f9fafb; }

/* 预警行颜色 */
.warning-red { background-color: #fee2e2 !important; }
.warning-yellow { background-color: #fef3c7 !important; }

/* 卡片 */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: box-shadow 0.3s;
}
.card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }

/* 表单 */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}
.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal.show { display: flex; }
.modal-content {
    background: white;
    border-radius: 0.5rem;
    max-width: 32rem;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
    animation: slideUp 0.3s;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.modal-title { font-size: 1.25rem; font-weight: 600; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
}
.modal-close:hover { color: #4b5563; }

/* 通知徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fed7aa; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.stat-label { color: var(--gray); font-size: 0.875rem; }
.stat-value { font-size: 2rem; font-weight: 600; }

/* 图表容器 */
.chart-container {
    height: 300px;
    margin: 1rem 0;
}

/* 表头样式 */
thead tr:first-child th[colspan] {
    text-align: center;
}

#assetTable th {
    text-align: center;
}

#assetTable {
    border-collapse: collapse;        /* 边框合并，避免双线 */
    width: 100%;
    border: 1px solid #ccc;           /* 表格整体外边框 */
    border-radius: 8px;               /* 可选：圆角 */
    overflow: hidden;                  /* 配合圆角裁剪内容 */
    box-shadow: 0 2px 8px rgba(0,0,0,0); /* 轻微阴影提升立体感 */
}

#assetTable th,
#assetTable td {
    border: 1px solid #ddd;            /* 单元格内部边框 */
    padding: 10px 8px;                 /* 适当内边距 */
}

#assetTable th {
    border-bottom: 1px solid #b0a090;  /* 表头底部加粗，颜色略深于背景 */
    background-color: #ffdab9;          /* 保持原有浅橙色 */
    font-weight: 600;
    color: #333;
}