/* ==================== 全局重置与变量 ==================== */
:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --primary-bg: #eff6ff;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --info: #0891b2;
    --info-bg: #cffafe;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --sidebar-w: 240px;
    --sidebar-collapsed: 64px;
    --topbar-h: 60px;
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--gray-700);
    background: var(--gray-50);
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

/* ==================== 整体布局 ==================== */
#portalScreen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    width: var(--sidebar-w);
    /* 靓丽安全蓝渐变（蔚蓝→皇家蓝，明亮且专业） */
    background: linear-gradient(180deg, #38bdf8 0%, #2e7df6 35%, #2563eb 70%, #1d4ed8 100%);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .logo-sub,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-status span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
}

.sidebar.collapsed .nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.16);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 1px 4px rgba(30, 64, 175, 0.35);
}

.logo-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.72);
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.86);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

/* 菜单未读红色角标（整改任务/增值服务新消息提醒） */
.nav-badge {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 500;
    box-sizing: border-box;
    flex-shrink: 0;
    animation: navBadgePulse 1.6s ease-in-out infinite;
}
@keyframes navBadgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.14);
}

.nav-item.active {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.05) 100%);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #fff;
    border-radius: 0 2px 2px 0;
}

/* 安全资料管理折叠分组 */
.nav-group {
    user-select: none;
}

.nav-group-toggle {
    cursor: pointer;
    justify-content: flex-start;
}

.nav-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-group-toggle.expanded .nav-arrow {
    transform: rotate(180deg);
}

.nav-sub {
    overflow: hidden;
    background: rgba(0, 0, 0, 0.14);
    border-left: 2px solid rgba(255, 255, 255, 0.14);
    margin-left: 20px;
}

.nav-sub-item {
    padding-left: 32px !important;
    font-size: 13px !important;
    opacity: 0.85;
}

.nav-sub-item:hover {
    opacity: 1;
}

.nav-sub-item.active {
    opacity: 1;
    font-weight: 500;
}

.nav-sub-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.nav-badge:empty,
.nav-badge[data-count="0"] {
    display: none;
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.16);
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.78);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(22,163,74,0.2); }
    50% { box-shadow: 0 0 0 6px rgba(22,163,74,0.1); }
}

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ==================== 顶部栏 ==================== */
.topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

/* 移动端返回上一页按钮（默认隐藏，手机端显示） */
.topbar-back-btn {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--gray-600);
    cursor: pointer;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    margin-right: 2px;
    transition: var(--transition);
}
.topbar-back-btn:hover { background: var(--gray-100); color: var(--primary); }
@media (max-width: 768px) {
    .topbar-back-btn { display: inline-flex; }
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-400);
}

.breadcrumb-current {
    color: var(--gray-700);
    font-weight: 500;
}

.breadcrumb-sep {
    color: var(--gray-300);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-100);
    border-radius: 20px;
    padding: 6px 14px;
    width: 240px;
    transition: var(--transition);
}

.search-box:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px var(--primary-bg);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    flex: 1;
    color: var(--gray-600);
}

.topbar-item {
    position: relative;
    cursor: pointer;
    color: var(--gray-500);
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.topbar-item:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.badge-dot {
    position: absolute;
    top: 2px;
    right: 0;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0 4px;
}

.topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-200);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

.user-role {
    font-size: 11px;
    color: var(--gray-400);
}

/* ==================== 页面容器 ==================== */
.page-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.page-container::-webkit-scrollbar {
    width: 6px;
}

.page-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* ==================== 通用组件 ==================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
}

.page-desc {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
}

.card-body {
    padding: 20px;
}

/* ==================== KPI 卡片 ==================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kpi-card.primary::before { background: var(--primary); }
.kpi-card.warning::before { background: var(--warning); }
.kpi-card.danger::before { background: var(--danger); }
.kpi-card.success::before { background: var(--success); }
.kpi-card.info::before { background: var(--info); }

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 22px;
}

.kpi-card.primary .kpi-icon { background: var(--primary-bg); color: var(--primary); }
.kpi-card.warning .kpi-icon { background: var(--warning-bg); color: var(--warning); }
.kpi-card.danger .kpi-icon { background: var(--danger-bg); color: var(--danger); }
.kpi-card.success .kpi-icon { background: var(--success-bg); color: var(--success); }
.kpi-card.info .kpi-icon { background: var(--info-bg); color: var(--info); }

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.kpi-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: 8px;
}

.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ==================== 图表区域 ==================== */
.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
}

.chart-container .card-header {
    padding: 0 0 16px 0;
}

.chart-box {
    width: 100%;
    height: 280px;
}

.chart-box-lg {
    width: 100%;
    height: 360px;
}

/* ==================== 表格 ==================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.data-table thead th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
    border-bottom: 1px solid var(--gray-200);
}

table.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

table.data-table tbody tr:hover {
    background: var(--gray-50);
}

table.data-table tbody tr:last-child td {
    border-bottom: none;
}

a.ent-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}
a.ent-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}
a.ent-link::after {
    content: ' ↗';
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s;
}
a.ent-link:hover::after {
    opacity: 0.5;
}

/* ==================== 状态标签 ==================== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.tag-primary { background: var(--primary-bg); color: var(--primary); }
.tag-success { background: var(--success-bg); color: var(--success); }
.tag-warning { background: var(--warning-bg); color: var(--warning); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-info { background: var(--info-bg); color: var(--info); }
.tag-gray { background: var(--gray-100); color: var(--gray-500); }

/* 优先级/风险等级颜色 */
.level-critical { color: var(--danger); font-weight: 600; }
.level-major { color: var(--warning); font-weight: 600; }
.level-minor { color: var(--info); font-weight: 500; }
.level-general { color: var(--gray-500); font-weight: 500; }

/* ==================== 过滤器栏 ==================== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label {
    font-size: 13px;
    color: var(--gray-500);
}

.filter-select, .filter-input {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: #fff;
    color: var(--gray-600);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus, .filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-bg);
}

.filter-spacer {
    flex: 1;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 560px;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal.modal-lg {
    width: 720px;
}

/* 弹窗最大化（档案详情等） */
.modal.maximized {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    border-radius: 0;
    transition: width 0.25s ease, height 0.25s ease, max-width 0.25s ease;
}
.modal.maximized .modal-body {
    flex: 1;
}
/* 档案详情正文区最大化时撑满剩余空间 */
.modal.maximized #archiveDocBody {
    max-height: calc(100vh - 130px) !important;
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 20px;
    padding: 4px;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--gray-700);
    background: #fff;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-bg);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ==================== Toast ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    animation: slideInRight 0.25s ease;
    border-left: 4px solid var(--gray-400);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }

.toast-icon {
    font-size: 18px;
}

.toast-msg {
    font-size: 13px;
    color: var(--gray-700);
}

/* ==================== 进度条 ==================== */
.progress {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--gray-400);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 14px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .search-box {
        display: none;
    }
    .user-detail {
        display: none;
    }
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== 移动端深度适配（手机浏览器 / 员工现场使用） ==================== */
@media (max-width: 768px) {
    /* 弹窗全屏化 */
    .modal {
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
        height: 100dvh;
        border-radius: 0;
        margin: 0;
    }
    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 14px;
    }
    .modal-footer {
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        flex-wrap: wrap;
    }
    .modal-footer .btn {
        flex: 1;
        min-height: 44px;
        font-size: 14px;
    }
    .modal-header {
        padding: 12px 14px;
    }
    /* 按钮最小触控区 */
    .btn {
        min-height: 40px;
    }
    .btn-sm {
        min-height: 36px;
        padding: 6px 12px;
    }
    /* 页头/操作区换行 */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .page-header > div:first-child {
        padding: 0;
    }
    /* Tab 横向滚动 */
    .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        justify-content: flex-start;
        scrollbar-width: none;
    }
    .tab-nav::-webkit-scrollbar {
        display: none;
    }
    .tab-item {
        white-space: nowrap;
        flex-shrink: 0;
    }
    /* 统计卡 2 列 */
    .stat-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    .stat-card {
        padding: 10px 12px;
    }
    /* 表格字号适配 + 横向滚动 */
    table.data-table {
        font-size: 12px;
    }
    table.data-table thead th {
        padding: 10px 8px;
    }
    table.data-table tbody td {
        padding: 10px 8px;
    }
    /* 筛选输入框自适应 */
    .filter-input {
        width: 100% !important;
    }
    /* 档案详情按钮栏换行 */
    .archive-btn-bar {
        flex-wrap: wrap;
        gap: 6px;
    }
    .archive-btn-bar .btn-sm {
        flex: 1 1 auto;
    }
    /* 卡片/内容区留白收紧 */
    .card {
        padding: 12px;
    }
    .page-title {
        font-size: 18px;
    }
    /* 手写签名板加高（现场签字更好用） */
    canvas[width="300"][height="100"] {
        height: 150px !important;
    }
    /* 图表高度适配 */
    .chart-box {
        min-height: 220px;
    }
    /* 空状态图标缩小 */
    .empty-state-icon {
        font-size: 40px;
    }
    /* 移动工作台 */
    .mw-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mw-card {
        min-height: 78px;
    }
    /* 登录页移动适配 */
    .login-card {
        width: 92vw !important;
        max-width: 420px;
    }
    /* 移动端验证码框缩小，避免遮挡输入 */
    .captcha-box {
        width: 96px;
        height: 32px;
    }
    .captcha-box svg {
        width: 96px;
        height: 32px;
    }
    #adminCaptcha, #entCaptcha {
        padding-right: 106px !important;
    }
    .login-name {
        font-size: 22px;
    }
    .login-brand {
        margin-bottom: 20px;
    }
    .login-container {
        padding: 0 4vw;
        width: 100%;
    }
    /* 顶部栏移动适配 */
    .topbar {
        padding: 0 10px;
    }
    .topbar-company {
        display: none;
    }
}

/* ==================== 移动工作台（安全工作台快捷入口） ==================== */
.mw-wrap {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #dbeafe;
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-bottom: 16px;
}
.mw-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.mw-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-height: 64px;
}
.mw-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-sm);
}
.mw-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.mw-info {
    flex: 1;
    min-width: 0;
}
.mw-label {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
}
.mw-sub {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mw-arrow {
    color: var(--gray-300);
    font-size: 18px;
    flex-shrink: 0;
}
@media (max-width: 1200px) {
    .mw-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.cursor-pointer { cursor: pointer; }
.font-bold { font-weight: 600; }
.text-sm { font-size: 12px; }
.text-gray { color: var(--gray-400); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

/* ==================== 登录页 ==================== */
#loginScreen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #334155 100%);
}

.login-bg-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.login-brand {
    margin-bottom: 32px;
}

.login-logo {
    display: inline-block;
    margin-bottom: 16px;
}

.login-name {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    letter-spacing: 2px;
}

.login-desc {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-tabs {
    display: flex;
}

.login-tab {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: var(--gray-50);
    color: var(--gray-400);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.login-tab.active {
    background: #fff;
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.login-form {
    display: none;
    padding: 32px 36px 28px;
}

.login-form.active {
    display: block;
}

.login-type-hint {
    text-align: center;
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 12px;
    pointer-events: none;
}

.login-input {
    padding-left: 38px !important;
    height: 44px;
    font-size: 14px !important;
    border-radius: 8px !important;
}

.login-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

/* 企业登录：企业名称输入联想候选列表 */
.login-form .form-group {
    position: relative;
}
.tenant-candidate-box {
    display: none;
    position: absolute;
    z-index: 100;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}
.tenant-candidate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #1e293b;
    transition: background 0.15s;
}
.tenant-candidate-item:hover {
    background: #f1f5f9;
}
.tenant-candidate-name {
    font-weight: 500;
}
.tenant-candidate-city {
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* 登录图形验证码 */
.captcha-box {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 118px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 0.5px solid var(--gray-200, #e2e8f0);
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.captcha-box svg {
    width: 118px;
    height: 36px;
    display: block;
}
.captcha-box-loading {
    font-size: 12px;
    color: #94a3b8;
}

.btn-login {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: var(--transition);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.login-footer-text {
    text-align: center;
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 16px;
}

.login-copyright {
    font-size: 12px;
    color: #64748b;
    margin-top: 24px;
}

/* ==================== 退出按钮 ==================== */
.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--gray-400);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

/* ==================== 顶部栏角色标签 ==================== */
.topbar-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.topbar-badge.admin {
    background: #fef3c7;
    color: #92400e;
}

.topbar-badge.enterprise {
    background: #dcfce7;
    color: #166534;
}

.topbar-company {
    font-size: 13px;
    color: var(--gray-500);
    padding: 2px 10px;
    background: var(--gray-100);
    border-radius: 4px;
}

.topbar-company:empty {
    display: none;
}

/* ==================== 安全资料管理 ==================== */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.doc-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.doc-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.doc-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 20px;
}

.doc-card-icon.type1 { background: #eff6ff; color: #2563eb; }
.doc-card-icon.type2 { background: #dcfce7; color: #16a34a; }
.doc-card-icon.type3 { background: #fef3c7; color: #d97706; }
.doc-card-icon.type4 { background: #fee2e2; color: #dc2626; }
.doc-card-icon.type5 { background: #f0fdf4; color: #15803d; }
.doc-card-icon.type6 { background: #faf5ff; color: #9333ea; }
.doc-card-icon.type7 { background: #cffafe; color: #0891b2; }
.doc-card-icon.type8 { background: #fff7ed; color: #ea580c; }

.doc-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.doc-card-meta {
    font-size: 12px;
    color: var(--gray-400);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.doc-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 到期预警样式 */
.doc-expired {
    border-left: 3px solid var(--danger);
    background: #fff5f5;
}

/* 文档卡片删除按钮 */
.doc-card-del {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: none;
    background: rgba(0,0,0,0.04);
    color: var(--gray-400);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    z-index: 2;
}
.doc-card:hover .doc-card-del {
    background: rgba(0,0,0,0.08);
    color: var(--gray-500);
}
.doc-card-del:hover {
    background: #fee2e2;
    color: #dc2626 !important;
}

/* 文档卡片右上角"在线预览"按钮（与删除并排） */
.doc-card-preview {
    position: absolute;
    top: 8px;
    right: 40px;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: none;
    background: rgba(0,0,0,0.04);
    color: var(--gray-400);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    z-index: 2;
}
.doc-card:hover .doc-card-preview {
    background: rgba(0,0,0,0.08);
    color: var(--gray-500);
}
.doc-card-preview:hover {
    background: #e0f2fe;
    color: #0369a1 !important;
}

/* 文档卡片底部操作按钮条 */
.doc-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--gray-200, #e2e8f0);
}
.doc-card-actions .btn {
    flex: 1;
    text-align: center;
}

/* 文档卡片/列表视图切换 */
.doc-view-switch {
    display: inline-flex;
    gap: 4px;
    background: var(--gray-100, #f1f5f9);
    border-radius: 8px;
    padding: 3px;
}
.doc-view-switch .btn {
    border-radius: 6px;
    padding: 5px 12px;
}

/* 预览加载状态 */
.preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gray-400);
    gap: 16px;
}
.preview-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Excel预览表格 */
.preview-excel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.preview-excel-table th,
.preview-excel-table td {
    border: 1px solid var(--gray-200);
    padding: 6px 10px;
    text-align: left;
    white-space: nowrap;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.preview-excel-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--gray-600);
    position: sticky;
    top: 0;
}
.preview-excel-table tr:nth-child(even) td {
    background: #fafbfc;
}

/* Word预览内容 */
.preview-docx-content {
    padding: 20px 30px;
    line-height: 1.8;
    color: var(--gray-700);
    font-size: 14px;
    overflow-y: auto;
    max-height: 70vh;
}
.preview-docx-content h1 { font-size: 20px; margin: 16px 0 8px; }
.preview-docx-content h2 { font-size: 17px; margin: 14px 0 6px; }
.preview-docx-content h3 { font-size: 15px; margin: 12px 0 4px; }
.preview-docx-content p { margin: 6px 0; }
.preview-docx-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}
.preview-docx-content table td,
.preview-docx-content table th {
    border: 1px solid var(--gray-200);
    padding: 6px 10px;
    font-size: 13px;
}

.doc-expiring-soon {
    border-left: 3px solid var(--warning);
    background: #fffcf0;
}

/* ==================== 燃气行业特色样式 ==================== */

/* 管线巡检卡片 */
.pipeline-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.pipeline-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pipeline-name {
    font-weight: 600;
    color: var(--gray-700);
}

.pipeline-status {
    font-size: 12px;
}

/* 站点卡片 */
.station-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.station-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* ==================== 企业管理（管理员专属） ==================== */
.admin-sidebar {
    /* 靓丽安全蓝渐变（与管理端区分：琥珀色高亮条） */
    background: linear-gradient(180deg, #38bdf8 0%, #2e7df6 35%, #2563eb 70%, #1d4ed8 100%) !important;
}

.admin-sidebar .nav-item.active::before {
    background: #f59e0b !important;
}

.admin-sidebar .nav-item.active {
    background: linear-gradient(90deg, rgba(245,158,11,0.15) 0%, transparent 100%) !important;
}

/* ==================== 套餐卡片 ==================== */
.package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.package-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-200);
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.package-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.package-card.popular {
    border-color: var(--primary);
    background: linear-gradient(180deg, #eff6ff 0%, #fff 40%);
}

.package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 20px;
}

.package-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.package-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.package-price-unit {
    font-size: 14px;
    color: var(--gray-400);
}

.package-desc {
    font-size: 13px;
    color: var(--gray-500);
    margin: 12px 0 20px;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.package-features li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--gray-600);
}

.package-features li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 600;
}

@media (max-width: 1000px) {
    .package-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ==================== 文件上传 ==================== */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
    margin-bottom: 20px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-area-icon {
    font-size: 48px;
    margin-bottom: 12px;
    color: var(--gray-400);
}

.upload-area.dragover .upload-area-icon {
    color: var(--primary);
}

.upload-area-text {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.upload-area-hint {
    font-size: 12px;
    color: var(--gray-400);
}

.upload-area-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
}

/* ==================== 文件预览 ==================== */
.preview-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 250;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

/* 打印：仅打印预览弹窗内容 */
@media print {
    body * { visibility: hidden !important; }
    .preview-overlay,
    .preview-overlay * { visibility: visible !important; }
    .preview-overlay {
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        background: #fff !important;
        display: flex !important;
        backdrop-filter: none;
        z-index: 99999 !important;
    }
    .preview-container {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        max-height: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        animation: none !important;
    }
    .preview-header { display: none !important; }
    .preview-body {
        height: auto !important;
        overflow: visible !important;
    }
    .preview-body iframe {
        height: 900px !important;
        min-height: 900px;
    }
    .preview-body img {
        max-height: none !important;
        box-shadow: none !important;
    }
    .preview-excel-wrap, .preview-docx-content, .preview-text-content { max-height: none !important; overflow: visible !important; }
}

.preview-overlay.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.preview-container {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 90vw;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.25s ease;
    transition: width 0.25s ease, height 0.25s ease, max-width 0.25s ease;
}

/* 预览最大化 */
.preview-container.maximized {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
}
.preview-container.maximized .preview-body {
    padding: 0;
    background: #1e293b;
}

.preview-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 600px;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 24px;
    padding: 4px;
    line-height: 1;
    transition: var(--transition);
}

.preview-close:hover {
    color: var(--gray-600);
}

.preview-body {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--gray-50);
}

.preview-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.preview-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

/* 最大化时：图片/iframe/文档内容占满 */
.preview-container.maximized .preview-body img {
    max-height: calc(100vh - 60px);
    max-height: calc(100dvh - 60px);
    box-shadow: none;
    border-radius: 0;
}
.preview-container.maximized .preview-body iframe {
    height: calc(100vh - 52px);
    height: calc(100dvh - 52px);
}
.preview-container.maximized .preview-text-content,
.preview-container.maximized .preview-docx-content {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 52px);
    max-height: calc(100dvh - 52px);
    background: #fff;
}
.preview-container.maximized .preview-excel-wrap {
    width: 100%;
    height: calc(100vh - 52px);
    height: calc(100dvh - 52px);
    max-height: none;
    background: #fff;
}

.preview-text-content {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 24px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.8;
    color: var(--gray-700);
    white-space: pre-wrap;
    box-shadow: var(--shadow);
}

.preview-unsupported {
    text-align: center;
    padding: 40px;
}

.preview-unsupported-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.preview-unsupported-text {
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.preview-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 30px;
    margin-top: 16px;
}

.preview-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.preview-info-label {
    color: var(--gray-400);
}

.preview-info-value {
    color: var(--gray-700);
    font-weight: 500;
}

/* ==================== 统计卡片（横排） ==================== */
.stat-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-cards .stat-card {
    flex: 1;
    min-width: 140px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-cards .stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.stat-card-sub {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 2px;
}

/* ==================== 隐患导入弹窗（广联达定额库风格） ==================== */
.import-modal {
    max-width: 1100px !important;
    width: 95vw !important;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.import-modal .modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* 导入模式切换 */
.import-mode-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 20px;
    background: var(--gray-50);
    gap: 0;
}
.import-mode-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}
.import-mode-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* 导入工具栏 (搜索+统计) */
.import-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}
.import-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.import-search input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.import-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.import-search::before {
    content: '🔍';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}
.import-filter-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    background: white;
    cursor: pointer;
    min-width: 120px;
}
.import-stats {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    margin-left: auto;
}
.import-stats b {
    color: var(--primary);
    font-size: 14px;
}

/* 主内容区：左右分栏 */
.import-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* 左侧：隐患库浏览 */
.import-left {
    width: 55%;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 分类树 */
.import-category-tree {
    width: 100%;
    overflow-y: auto;
    flex: 1;
}
.cat-group {
    border-bottom: 1px solid var(--gray-100);
}
.cat-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-700);
    user-select: none;
    transition: background 0.15s;
}
.cat-group-header:hover {
    background: var(--gray-50);
}
.cat-group-header .cat-arrow {
    font-size: 10px;
    transition: transform 0.2s;
    color: var(--gray-400);
}
.cat-group-header .cat-count {
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 400;
    margin-left: auto;
}
.cat-group.open .cat-arrow {
    transform: rotate(90deg);
}
.cat-sub-list {
    display: none;
    padding-left: 24px;
}
.cat-group.open .cat-sub-list {
    display: block;
}
.cat-sub-item {
    padding: 6px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-600);
    border-radius: 4px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cat-sub-item:hover {
    background: var(--primary-bg);
    color: var(--primary);
}
.cat-sub-item.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}
.cat-sub-item .sub-count {
    font-size: 11px;
    color: var(--gray-400);
    margin-left: auto;
}

/* 隐患列表项 */
.import-hazard-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.hazard-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.15s;
}
.hazard-item:hover {
    background: var(--gray-50);
}
.hazard-item.selected {
    background: var(--primary-bg);
}
.hazard-item-check {
    flex-shrink: 0;
    margin-top: 2px;
}
.hazard-item-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}
.hazard-item-body {
    flex: 1;
    min-width: 0;
}
.hazard-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}
.hazard-item-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}
.hazard-item-desc {
    font-size: 12px;
    color: var(--gray-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.hazard-item-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.hazard-item-tags .tag {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
}

/* 右侧：已选隐患 */
.import-right {
    width: 45%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.import-right-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.import-right-header .clear-btn {
    font-size: 12px;
    color: var(--danger);
    cursor: pointer;
    background: none;
    border: none;
    font-weight: 400;
}
.import-right-header .clear-btn:hover {
    text-decoration: underline;
}
.import-selected-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}
.import-selected-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--gray-400);
    font-size: 14px;
    gap: 8px;
}
.selected-hazard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
}
.selected-hazard-item .remove-btn {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: var(--gray-200);
    color: var(--gray-500);
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    transition: all 0.15s;
}
.selected-hazard-item .remove-btn:hover {
    background: var(--danger);
    color: white;
}
.selected-hazard-info {
    flex: 1;
    min-width: 0;
}
.selected-hazard-name {
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.selected-hazard-sub {
    font-size: 11px;
    color: var(--gray-400);
}
.selected-hazard-level {
    flex-shrink: 0;
}

/* 导入底部栏 */
.import-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.import-footer-left {
    font-size: 13px;
    color: var(--gray-500);
}
.import-footer-left b {
    color: var(--primary);
}

/* Excel 上传区域 */
.excel-upload-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 16px;
}
.excel-dropzone {
    width: 100%;
    max-width: 500px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-50);
}
.excel-dropzone:hover,
.excel-dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
}
.excel-dropzone-icon {
    font-size: 48px;
    margin-bottom: 12px;
    color: var(--gray-400);
}
.excel-dropzone:hover .excel-dropzone-icon,
.excel-dropzone.dragover .excel-dropzone-icon {
    color: var(--primary);
}
.excel-dropzone-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}
.excel-dropzone-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.6;
}
.excel-dropzone-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}
.excel-template-link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
    margin-top: 8px;
}
.excel-preview-table {
    width: 100%;
    overflow-x: auto;
    margin-top: 16px;
}
.excel-preview-table table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}
.excel-preview-table th {
    background: var(--gray-100);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    white-space: nowrap;
}
.excel-preview-table td {
    padding: 6px 10px;
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
}
.excel-preview-count {
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 12px;
    text-align: center;
}
.excel-preview-count b {
    color: var(--primary);
}

/* ==================== 菜单管理 ==================== */
.nav-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 16px;
    line-height: 1;
}
.nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 8px 16px;
}
.nav-manage-btn {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 13px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0;
}
.nav-manage-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.16);
}

.menu-mgr-layout {
    display: flex;
    gap: 20px;
    min-height: 360px;
}
.menu-mgr-left {
    flex: 1;
    min-width: 0;
}
.menu-mgr-right {
    width: 320px;
    flex-shrink: 0;
    background: var(--gray-50);
    border-radius: 10px;
    padding: 16px;
}
.menu-mgr-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}
.menu-mgr-list {
    max-height: 420px;
    overflow-y: auto;
}
.menu-mgr-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: #fff;
    margin-bottom: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
    cursor: grab;
}
.menu-mgr-item:active {
    cursor: grabbing;
}
.menu-mgr-item:hover {
    border-color: var(--primary);
    box-shadow: 0 1px 6px rgba(37, 99, 235, 0.1);
}
.menu-mgr-item.menu-dragging {
    opacity: 0.45;
    border-style: dashed;
}
.menu-mgr-item.menu-drag-over {
    border-color: var(--primary);
    border-style: dashed;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.menu-mgr-drag {
    cursor: grab;
    color: var(--gray-400);
    font-size: 15px;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}
.menu-mgr-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}
.menu-mgr-icon svg {
    width: 20px;
    height: 20px;
}
.menu-mgr-info {
    flex: 1;
    min-width: 0;
}
.menu-mgr-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 2px;
}
.menu-mgr-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}
.menu-type-badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.menu-type-badge.system {
    background: #dbeafe;
    color: #2563eb;
}
.menu-type-badge.doc {
    background: #dcfce7;
    color: #16a34a;
}
.menu-mgr-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.btn-icon-sm {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.btn-icon-sm:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-icon-sm:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.btn-icon-danger:hover:not(:disabled) {
    background: var(--danger);
    border-color: var(--danger);
}

.menu-mgr-form-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 14px;
}
.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    max-height: 160px;
    overflow-y: auto;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}
.icon-pick {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}
.icon-pick:hover {
    background: var(--gray-100);
}
.icon-pick.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

/* ==================== 横向 Tab 导航（按钮式） ==================== */
.tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.tab-item:hover {
    background: #eef2ff;
    color: var(--primary);
    border-color: #c7d2fe;
    transform: translateY(-1px);
}
.tab-item:active {
    transform: translateY(0);
}
.tab-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}
.tab-item.active:hover {
    background: var(--primary);
    color: #fff;
}

/* ==================== 责任制管理 - 审批流程 ==================== */
.resp-tab-nav {
    margin-bottom: 16px;
}
.resp-tab-nav .tab-badge {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
}

/* 审批步骤指示器 */
.approval-stepper {
    display: flex;
    align-items: center;
    padding: 16px 8px;
    background: var(--gray-50);
    border-radius: 10px;
}
.approval-stepper .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.approval-stepper .step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-400);
    border: 2px solid var(--gray-200);
    transition: all 0.2s;
}
.approval-stepper .step.completed .step-circle {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.approval-stepper .step.current .step-circle {
    background: #fff;
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.approval-stepper .step.rejected .step-circle {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.approval-stepper .step-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}
.approval-stepper .step.completed .step-label,
.approval-stepper .step.current .step-label {
    color: var(--gray-700);
    font-weight: 600;
}
.approval-stepper .step.rejected .step-label {
    color: var(--danger);
    font-weight: 600;
}
.approval-stepper .step-line {
    flex: 1;
    height: 2px;
    background: var(--gray-200);
    margin: 0 8px;
    margin-bottom: 20px;
    border-radius: 1px;
}
.approval-stepper .step-line.completed {
    background: var(--success);
}

/* 审批信息 */
.approval-info-section {
    margin-top: 16px;
}

/* ==================== 从业人员教育档案（docx 标准表格样式） ==================== */
.archive-doc {
    background: #fff;
    color: #111;
    line-height: 1.5;
}
.archive-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 10px 0 6px;
    color: #111;
}
.archive-subtitle {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 0 8px;
    color: #111;
}
.archive-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
    font-size: 12px;
    color: #111;
}
.archive-table th,
.archive-table td {
    border: 1px solid #333;
    padding: 5px 7px;
    vertical-align: middle;
    color: #111;
    text-align: left;
}
.archive-table th {
    background: #f1f5f9;
    font-weight: 600;
    text-align: center;
}
.archive-table .ac { text-align: center; }
.archive-table .al { width: 88px; text-align: center; background: #f8fafc; font-weight: 600; white-space: nowrap; }
.archive-table .aw { width: 64px; text-align: center; background: #f8fafc; font-weight: 600; }
.archive-table td.empty { height: 26px; }

/* ==================== 从业人员教育档案 打印样式（A4 / 只打印档案 / 隐藏操作列） ==================== */
@media print {
    @page { size: A4; margin: 10mm 9mm; }
    body > *:not(#modalOverlay) { display: none !important; }
    #modalOverlay {
        position: static !important;
        background: #fff !important;
        padding: 0 !important;
        overflow: visible !important;
        display: block !important;
    }
    #modalOverlay .modal {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    #modalOverlay .modal-body { padding: 0 !important; }
    #modalOverlay .modal-header,
    #modalOverlay .modal-footer,
    .archive-btn-bar { display: none !important; }
    #archiveDocBody {
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
    }
    .no-print { display: none !important; }
    .archive-title { page-break-after: avoid; }
    .archive-table { page-break-inside: avoid; font-size: 11px; }
    .archive-table th,
    .archive-table td { border-color: #000; padding: 4px 6px; }
    .archive-sign { page-break-inside: avoid; }
    .archive-photo { border: 1px solid #333; }
}
.archive-sign {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #333;
    margin: 6px 0 14px;
    flex-wrap: wrap;
    gap: 6px;
}
.archive-note {
    font-size: 11px;
    color: #555;
    margin: 4px 0 10px;
    line-height: 1.7;
}

/* 档案模板视图打印（只打印当前模板内容，隐藏侧边栏/菜单/按钮） */
@media print {
    body.print-archive * { visibility: hidden !important; }
    body.print-archive .archive-print-area,
    body.print-archive .archive-print-area * { visibility: visible !important; }
    body.print-archive .archive-print-area {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: #fff !important;
    }
    body.print-archive .no-print { display: none !important; }
    body.print-archive .archive-table { page-break-inside: avoid; font-size: 11px; }
    body.print-archive .archive-table th,
    body.print-archive .archive-table td { border-color: #000; padding: 4px 6px; }
    body.print-archive .archive-sign { page-break-inside: avoid; }
    body.print-archive .archive-photo { border: 1px solid #333; }
}
.archive-photo {
    width: 100%;
    height: 100%;
    min-height: 64px;
    border: 1px dashed #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #888;
    text-align: center;
}
.archive-btn-bar {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.approval-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}
.approval-info-label {
    font-size: 13px;
    color: var(--gray-500);
    min-width: 60px;
    flex-shrink: 0;
}
.approval-info-value {
    font-size: 13px;
    color: var(--gray-700);
    font-weight: 500;
    flex: 1;
}
.approval-info-date {
    font-size: 12px;
    color: var(--gray-400);
}
.approval-info-comment {
    padding: 8px 12px;
    margin: 4px 0 8px 60px;
    background: #f8fafc;
    border-left: 3px solid var(--primary);
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}
.approval-info-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    margin: 12px 0 4px;
    padding-top: 4px;
}

/* 在线签订区域 */
.sign-empty {
    padding: 16px;
    background: #f8fafc;
    border: 1px dashed var(--gray-300);
    border-radius: 8px;
    text-align: center;
}
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
.avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

/* 按钮变体 */
.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}
.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
}
.btn-warning:disabled {
    background: #fbbf24;
    border-color: #fbbf24;
    cursor: not-allowed;
}

/* 操作痕迹时间线 */
.audit-trail {
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}
.audit-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    position: relative;
}
.audit-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}
.audit-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
    z-index: 1;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--gray-200);
}
.audit-content {
    flex: 1;
}
.audit-header {
    font-size: 13px;
    margin-bottom: 2px;
}
.audit-action {
    font-weight: 600;
}
.audit-doc {
    color: var(--gray-600);
}
.audit-meta {
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 4px;
}
.audit-comment {
    font-size: 12px;
    color: var(--gray-500);
    padding: 6px 8px;
    background: var(--gray-50);
    border-radius: 4px;
    line-height: 1.5;
}

/* 按钮变体 */
.btn-success {
    background: var(--success);
    color: #fff;
    border: none;
}
.btn-success:hover {
    opacity: 0.9;
}
.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
}
.btn-danger:hover {
    opacity: 0.9;
}
