/* ===== EHS系统后台页面全局样式 ===== */
/* 参考WMS布局：左侧深色菜单栏 + 白色顶部栏 + 右侧内容区 */

:root {
    --primary-color: #009DFF;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --info-color: #1890ff;
    --text-primary: #3B3F48;
    --text-secondary: #646a73;
    --text-muted: #8f959e;
    --border-color: #e8eaed;
    --bg-color: #E6E9F0;
    --card-bg: #F6F7F9;
    --hover-bg: #fff;
    --radius: 4px;
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
    --menu-width: 220px;
    --header-height: 56px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "微软雅黑", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-width: 1280px;
    overflow: hidden;
}

/* ===== 左侧菜单栏 ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--menu-width);
    height: 100vh;
    background-color: #3B3F48;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-logo {
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    gap: 8px;
}

.sidebar-logo .logo-icon {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo .logo-icon svg {
    width: 22px;
    height: 22px;
}

.sidebar-logo .logo-text {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.nav-section {
    margin-bottom: 2px;
}

.nav-section-title {
    color: #8B8F96;
    font-size: 12px;
    padding: 16px 16px 8px 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #C5C7C9;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
    font-size: 14px;
    line-height: 24px;
    position: relative;
    white-space: nowrap;
}

.nav-item:hover {
    color: #E0E0E0;
    background-color: rgba(255,255,255,0.04);
}

.nav-item.active {
    color: #FFFFFF;
    background-color: rgba(255,255,255,0.08);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item .nav-icon svg {
    width: 20px;
    height: 20px;
}

.nav-item.active .nav-icon svg,
.nav-item.active .nav-icon svg path,
.nav-item.active .nav-icon svg line,
.nav-item.active .nav-icon svg rect,
.nav-item.active .nav-icon svg circle,
.nav-item.active .nav-icon svg polyline,
.nav-item.active .nav-icon svg polygon {
    stroke: #FFFFFF;
    fill: none;
}

/* ===== 三级折叠菜单 ===== */
.nav-group {
    margin-bottom: 0;
}

.nav-group-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #C5C7C9;
    cursor: pointer;
    transition: color 0.15s;
    font-size: 14px;
    line-height: 24px;
    position: relative;
    white-space: nowrap;
    user-select: none;
}

.nav-group-header:hover {
    color: #E0E0E0;
    background-color: rgba(255,255,255,0.04);
}

.nav-group-header .nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-group-header .nav-icon svg {
    width: 20px;
    height: 20px;
}

.nav-group-header .arrow {
    margin-left: auto;
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-group-header .arrow svg {
    width: 12px;
    height: 12px;
}

.nav-group-header .arrow svg path {
    stroke: #8B8F96;
}

.nav-group.open > .nav-group-header .arrow {
    transform: rotate(90deg);
}

.nav-group-header .group-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-group.open > .nav-group-body {
    max-height: 800px;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 44px;
    color: #9B9FA6;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
    font-size: 13px;
    line-height: 22px;
    position: relative;
    white-space: nowrap;
}

.nav-sub-item:hover {
    color: #D0D3D9;
    background-color: rgba(255,255,255,0.03);
}

.nav-sub-item.active {
    color: #FFFFFF;
    background-color: rgba(255,255,255,0.06);
}

.nav-sub-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
}

/* 当前活跃的二级菜单组高亮header */
.nav-group.has-active > .nav-group-header {
    color: #E0E0E0;
}

.nav-group.has-active > .nav-group-header .arrow svg path {
    stroke: #C5C7C9;
}

/* ===== 顶部栏 ===== */
.topbar {
    position: fixed;
    top: 0;
    left: var(--menu-width);
    right: 0;
    height: var(--header-height);
    background-color: #fff;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow);
}

.topbar .breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 24px;
}

.topbar .breadcrumb span {
    color: var(--text-muted);
}

.topbar .breadcrumb span.separator {
    color: var(--text-muted);
}

.topbar .breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right .topbar-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.topbar-right .topbar-icon svg {
    width: 20px;
    height: 20px;
}

.topbar-right .topbar-icon svg path,
.topbar-right .topbar-icon svg circle,
.topbar-right .topbar-icon svg line {
    stroke: var(--text-secondary);
}

.topbar-right .user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.topbar-right .user-badge .avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 12px;
}

.topbar-right .user-badge .username {
    font-size: 14px;
    color: var(--text-primary);
}

/* ===== 右侧内容区 ===== */
.content-area {
    position: fixed;
    top: var(--header-height);
    left: var(--menu-width);
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    overflow-y: auto;
    padding: 16px 24px 24px;
}

.content-area::-webkit-scrollbar {
    width: 6px;
}

.content-area::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.12);
    border-radius: 3px;
}

/* ===== 页面容器（参考WMS page-container） ===== */
.page-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 页面标题 ===== */
.page-header {
    margin-bottom: 0;
}

.page-header .page-title {
    font-size: 16px;
    line-height: 28px;
    color: var(--text-primary);
    font-weight: 600;
}

.page-header .page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== 搜索/筛选栏 ===== */
.search-bar {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.search-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.search-row .search-input {
    width: 200px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #fff;
    outline: none;
}

.search-row .search-input:focus {
    border-color: var(--primary-color);
}

.search-row .filter-select {
    height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238f959e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 120px;
}

.search-row .btn-search {
    height: 32px;
    padding: 0 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.search-row .btn-search:hover {
    background: #0080cc;
}

.search-row .btn-search:active {
    background: #006bb3;
    transform: scale(0.97);
}

.search-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.search-actions .btn-outline {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    background-color: #fff;
    color: var(--text-primary);
    border: 1px solid #dcdfe6;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
}

.search-actions .btn-outline:hover {
    background-color: #f5f6f8;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== 操作按钮 ===== */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: #0080cc; }
.btn-success { background: var(--success-color); color: #fff; }
.btn-success:hover { background: #43a047; }
.btn-warning { background: var(--warning-color); color: #fff; }
.btn-warning:hover { background: #d49409; }
.btn-danger { background: var(--danger-color); color: #fff; }
.btn-danger:hover { background: #c62828; }
.btn-secondary { background: #f5f6f8; color: var(--text-primary); border: 1px solid #e8eaed; }
.btn-secondary:hover { background: #e8eaed; }
.btn-outline {
    background-color: #fff;
    color: var(--text-primary);
    border: 1px solid #dcdfe6;
}
.btn-outline:hover {
    background-color: #f5f6f8;
}

.btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* ===== 表格 ===== */
.table-container {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.table-wrapper {
    flex: 1;
    overflow-y: auto;
}

.table-toolbar {
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #fff;
}

.table-title {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 28px;
    font-weight: 500;
}

.table-count {
    font-size: 14px;
    color: var(--text-muted);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead { background: #fff; position: sticky; top: 0; z-index: 10; }

table th,
table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    line-height: 24px;
    color: var(--text-primary);
    white-space: nowrap;
}

table th {
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid #f0f2f5;
}

table td {
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover { background: var(--hover-bg); }

/* ===== 状态标签 ===== */
table td .status-tag,
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: var(--radius);
}

.status-tag.enabled, .status-approved, .status-completed { background: #f6ffed; color: #52c41a; }
.status-tag.disabled, .status-canceled, .status-closed { background: #f5f5f5; color: #999; }
.status-tag.warning, .status-pending { background: #fff7e6; color: #fa8c16; }
.status-tag.danger, .status-rejected { background: #fff2f0; color: #f5222d; }
.status-tag.info, .status-processing, .status-receivable { background: #e6f7ff; color: #1890ff; }

/* ===== 操作列 ===== */
.action-cell { width: 180px; white-space: nowrap; }
.action-btns { display: flex; gap: 8px; align-items: center; }
.action-btn {
    padding: 6px 12px;
    border: none; background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    color: var(--primary-color);
    font-family: inherit;
}
.action-btn:hover { background: #e6f7ff; }
.action-btn.danger { color: var(--danger-color); }
.action-btn.warning { color: var(--warning-color); }
.action-btn.success { color: var(--success-color); }

td.action-links {
    display: flex;
    align-items: center;
    gap: 0;
}

td.action-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    padding: 0 8px;
    position: relative;
}

td.action-links a:first-child {
    padding-left: 0;
}

td.action-links a + a::before {
    content: '|';
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #c8cbd0;
    pointer-events: none;
}

td.action-links a:hover {
    text-decoration: underline;
}

td.action-links a.danger {
    color: var(--danger-color);
}

/* ===== 数据卡片网格 ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 36px;
}

.stat-card .stat-change {
    font-size: 12px;
    margin-top: 4px;
}

.stat-card .stat-change.up {
    color: var(--danger-color);
}

.stat-card .stat-change.down {
    color: var(--success-color);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue { background: #e6f7ff; }
.stat-icon.green { background: #f6ffed; }
.stat-icon.orange { background: #fff7e6; }
.stat-icon.red { background: #fff2f0; }

/* ===== 卡片组件 ===== */
.card {
    background-color: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.card:last-child {
    margin-bottom: 0;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    line-height: 28px;
    color: var(--text-primary);
    font-weight: 600;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.card-body {
    font-size: 14px;
    line-height: 24px;
    color: var(--text-primary);
}

/* ===== 布局网格 ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
}

/* ===== 表单（紧凑版） ===== */
.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 18px;
    font-weight: 500;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger-color);
}

.form-input {
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #fff;
    outline: none;
}

.form-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(0,157,255,0.1); }
.form-input:disabled { background: #f5f6f8; color: var(--text-muted); cursor: not-allowed; }

.form-textarea {
    width: 100%;
    min-height: 64px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #fff;
    outline: none;
    resize: vertical;
    line-height: 1.6;
}

.form-textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(0,157,255,0.1); }

.form-select {
    width: 100%;
    height: 30px;
    padding: 0 26px 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238f959e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(0,157,255,0.1); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* 行内标签（标签和输入框在同一行） */
.form-inline { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.form-inline .form-label { margin-bottom: 0; min-width: 64px; text-align: right; flex-shrink: 0; }
.form-inline .form-input, .form-inline .form-select { flex: 1; }

/* 表单分段标题 */
.form-section { 
    margin: 6px 0 12px 0; padding: 6px 0; 
    border-bottom: 1px solid #e8eaed; 
    display: flex; align-items: center; gap: 8px;
}
.form-section-title { 
    font-size: 13px; font-weight: 600; color: var(--text-primary); 
}
.form-section-icon {
    width: 20px; height: 20px; border-radius: 3px; display: flex;
    align-items: center; justify-content: center; font-size: 11px;
    color: #fff; flex-shrink: 0;
}
.form-section-icon.blue { background: var(--primary-color); }
.form-section-icon.green { background: var(--success-color); }
.form-section-icon.orange { background: var(--warning-color); }
.form-section-icon.red { background: var(--danger-color); }

/* 提示文字 */
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 3px; line-height: 16px; }

/* inline 日期/数字输入 */
.form-date, .form-number, .form-file {
    height: 30px; padding: 0 10px; border: 1px solid var(--border-color);
    border-radius: var(--radius); font-size: 13px; font-family: inherit;
    color: var(--text-primary); background-color: #fff; outline: none;
}
.form-date:focus, .form-number:focus { border-color: var(--primary-color); }

.search-input {
    width: 240px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #fff;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-input::placeholder {
    color: #c0c4cc;
}

select.filter-select {
    height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238f959e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* ===== 分页 ===== */
.pagination {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #fff;
}

.pagination-info { font-size: 14px; color: var(--text-muted); }

.pagination-controls { display: flex; gap: 6px; }

.page-btn {
    padding: 8px 14px;
    border: 1px solid #dcdfe6;
    background: #fff;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}

.page-btn:hover { border-color: var(--primary-color); }
.page-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ===== 标签页 ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    margin-bottom: 16px;
}

.tab-item {
    padding: 12px 20px;
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: inherit;
}

.tab-item:hover { color: var(--primary-color); }

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

/* ===== 进度条 ===== */
.progress-bar {
    width: 100px;
    height: 8px;
    background: #f0f0f0;
    border-radius: var(--radius);
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius);
    transition: width 0.3s;
}

.progress-fill.green, .progress-fill.completed { background: #52c41a; }
.progress-fill.blue, .progress-fill.processing { background: #1890ff; }
.progress-fill.orange, .progress-fill.pending { background: #faad14; }
.progress-fill.red, .progress-fill.exception { background: #f5222d; }

/* ===== 弹窗/对话框（紧凑版） ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 16px;
    overflow-y: auto;
    backdrop-filter: blur(1px);
}

.modal-overlay.show, .modal-overlay.active { display: flex; }

.modal {
    background: #fff;
    border-radius: 6px;
    width: 100%;
    max-width: 780px;
    max-height: calc(100vh - 56px);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    animation: modalIn 0.15s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* 弹窗尺寸分级 */
.modal.sm { max-width: 520px; }
.modal.lg { max-width: 940px; }
.modal.xl { max-width: 1080px; }

.modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    flex-shrink: 0;
}

.modal-title { font-size: 15px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.modal-title-icon {
    width: 22px; height: 22px; border-radius: 4px; display: flex;
    align-items: center; justify-content: center; font-size: 12px;
    color: #fff; flex-shrink: 0;
}
.modal-title-icon.blue { background: var(--primary-color); }
.modal-title-icon.green { background: var(--success-color); }
.modal-title-icon.orange { background: var(--warning-color); }
.modal-title-icon.red { background: var(--danger-color); }

.modal-close {
    width: 26px; height: 26px;
    border: none; background: transparent;
    cursor: pointer; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--text-muted); line-height: 1;
    transition: all 0.15s;
}
.modal-close:hover { background: #f0f0f0; color: var(--text-primary); }

.modal-body { 
    padding: 14px 16px; 
    flex: 1; 
    overflow-y: auto; 
    max-height: calc(100vh - 160px); 
}
.modal-body::-webkit-scrollbar { width: 5px; }
.modal-body::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.1); border-radius: 3px; }

.modal-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #fafbfc;
    flex-shrink: 0;
}
.modal-footer .btn { height: 30px; padding: 0 16px; font-size: 13px; }

/* 弹窗内字段网格（3-4列紧凑） */
.modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.modal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.modal-grid .form-group { margin-bottom: 0; }

/* 弹窗全宽字段 */
.modal-full { grid-column: 1 / -1; }

/* ===== 流程步骤条 ===== */
.steps {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.step-item {
    display: flex;
    align-items: center;
    flex: 1;
}

.step-item .step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #E8EAEF;
    color: #8B8F96;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.step-item .step-label {
    margin-left: 8px;
    font-size: 13px;
    color: #8B8F96;
    white-space: nowrap;
}

.step-item.active .step-num {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.step-item.active .step-label {
    color: var(--text-primary);
    font-weight: 500;
}

.step-item.done .step-num {
    background-color: var(--success-color);
    color: #FFFFFF;
}

.step-item.done .step-label {
    color: var(--success-color);
}

.step-line {
    width: 40px;
    height: 1px;
    background-color: #E8EAEF;
    margin: 0 12px;
    flex-shrink: 0;
}

.step-line.done {
    background-color: var(--success-color);
}

/* ===== 图表占位 ===== */
.chart-placeholder {
    width: 100%;
    height: 240px;
    background-color: #fff;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0c4cc;
    font-size: 14px;
    border: 1px dashed var(--border-color);
}

/* ===== 预警列表 ===== */
.alert-list-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.alert-list-item:last-child {
    border-bottom: none;
}

.alert-list-item .alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
    margin-top: 8px;
    flex-shrink: 0;
}

.alert-dot.critical { background-color: var(--danger-color); }
.alert-dot.warning { background-color: var(--warning-color); }
.alert-dot.info { background-color: var(--info-color); }

.alert-list-item .alert-content {
    flex: 1;
}

.alert-list-item .alert-title {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.alert-list-item .alert-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.alert-list-item .alert-time {
    font-size: 12px;
    color: #c0c4cc;
    margin-top: 4px;
}

/* ===== 详情页（紧凑版） ===== */
.detail-content { padding: 0; }
.detail-section { margin-bottom: 12px; }
.detail-section-title {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 8px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 6px;
}
.detail-section-title::before {
    content: ''; width: 3px; height: 14px;
    background: var(--primary-color); border-radius: 2px; display: inline-block;
}
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.detail-grid-2 { grid-template-columns: 1fr 1fr; }
.detail-grid-4 { grid-template-columns: repeat(4, 1fr); }
.detail-item { padding: 8px 10px; background: #f8f9fb; border-radius: 4px; border-left: 2px solid transparent; }
.detail-item.highlight { border-left-color: var(--primary-color); background: #f0f7ff; }
.detail-item label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.detail-item span { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.detail-item .status-tag { font-size: 11px; padding: 2px 8px; }

/* 弹窗内详情表格 */
.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-table th { background: #f5f6f8; padding: 6px 10px; text-align: left; font-weight: 500; color: var(--text-secondary); border: 1px solid var(--border-color); font-size: 12px; }
.detail-table td { padding: 6px 10px; border: 1px solid var(--border-color); }
.detail-table tr:hover td { background: #fafcfd; }

/* ===== 快捷操作入口 ===== */
.quick-actions-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}

.quick-actions-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #009DFF 0%, #0070CC 100%);
    color: #fff;
}

.quick-actions-title {
    font-size: 15px;
    font-weight: 600;
}

.quick-actions-desc {
    font-size: 12px;
    opacity: 0.85;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr) 1.2fr;
    gap: 0;
}

.quick-action-group {
    padding: 12px 16px;
    border-right: 1px solid var(--border-color);
}

.quick-action-group:last-child {
    border-right: none;
}

.qa-group-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #e8eaed;
}

.qa-group-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qa-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.qa-item:hover {
    background: #f0f7ff;
    color: var(--primary-color);
}

.qa-item:hover .qa-icon {
    transform: scale(1.1);
}

.qa-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.qa-icon-purple { background: #722ED1; }
.qa-icon-blue { background: #009DFF; }
.qa-icon-green { background: #52C41A; }
.qa-icon-orange { background: #FA8C16; }
.qa-icon-red { background: #F5222D; }
.qa-icon-teal { background: #13C2C2; }
.qa-icon-indigo { background: #2F54EB; }
.qa-icon-cyan { background: #08979D; }
.qa-icon-yellow { background: #FADB14; color: #7C6800; }
.qa-icon-gray { background: #8C8C8C; }

.qa-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 响应式最小宽度 ===== */
@media screen and (max-width: 1280px) {
    body {
        min-width: 1280px;
    }
}
