/* ===== 设计系统 ===== */
:root {
    /* 主色调 - 工业灰 */
    --color-primary: #334155;
    --color-primary-dark: #0F172A;
    --color-secondary: #475569;
    --color-accent: #059669;
    
    /* 背景色 */
    --color-bg: #F8FAFC;
    --color-bg-card: #FFFFFF;
    --color-bg-muted: #F1F5F9;
    --color-bg-light: #F0FDF4;
    
    /* 文字色 */
    --color-text-primary: #0F172A;
    --color-text-secondary: #475569;
    --color-text-muted: #64748B;
    --color-text-placeholder: #94A3B8;
    
    /* 边框色 */
    --color-border: #E6E8EA;
    --color-border-light: #E2E8F0;
    
    /* 字体（移除 Google Fonts，改用系统字体栈，国内访问零延迟） */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', sans-serif;
    
    /* 圆角 */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
}

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }

/* ===== 布局框架 ===== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: 220px;
    height: 100%;
    background: var(--color-bg-card);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.25s ease;
    overflow: hidden;
}

/* 侧边栏收起状态 */
.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    max-width: 0;
}

.sidebar.collapsed .nav-item span:not(.nav-icon) {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-label {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-back {
    opacity: 0;
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* 收起时保留 nav-icon */
.sidebar.collapsed .nav-item .nav-icon {
    display: block !important;
    margin: 0 auto;
    flex-shrink: 0;
}

.sidebar.collapsed .logo-area {
    justify-content: center;
    padding: 16px 0;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0 8px;
}

.sidebar.collapsed .nav-item.active::before {
    left: 0;
}

/* 主页面（工具中心）完全隐藏侧边栏 */
.sidebar-hidden {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* 侧边栏折叠按钮 */
.sidebar-toggle {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
    user-select: none;
}

.sidebar-toggle:hover {
    background: var(--color-bg-muted);
    color: var(--color-text-primary);
}

.sidebar-toggle svg {
    transition: transform 0.25s ease;
}

/* 折叠按钮收起态：SVG 箭头旋转 */
.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

/* 折叠按钮 tooltip */
.sidebar-toggle::after {
    content: attr(title);
    position: absolute;
    left: 110%;
    background: var(--color-text-primary);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.sidebar-toggle:hover::after {
    opacity: 1;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    height: 64px;
    border-bottom: 1px solid var(--color-border);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    opacity: 1;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease, max-width 0.25s ease;
}

.nav-menu {
    padding: 8px 0;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 44px;
    cursor: pointer;
    color: var(--color-text-muted);
    position: relative;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--color-bg-muted);
    color: var(--color-text-secondary);
}

.nav-item.active {
    background: var(--color-bg-muted);
    color: var(--color-primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--color-accent);
}

.nav-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: currentColor;
    opacity: 0.3;
}

.nav-item.active .nav-icon {
    opacity: 0.6;
}

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    transition: margin-left 0.25s ease;
    padding-bottom: 40px;  /* 为底部固定备案号留空间 */
}

/* ===== 顶部栏 ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

/* 移动端汉堡菜单按钮（桌面端隐藏） */
.mobile-menu-btn {
    display: none;
}

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

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

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

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

/* 角色标签 */
.user-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    line-height: 1.4;
}

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

.page.active {
    display: block;
}

/* ===== 搜索区域 ===== */
.search-section {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.search-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.search-input {
    width: 320px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--color-text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.search-input::placeholder {
    color: var(--color-text-placeholder);
}

.search-input:focus {
    border-color: var(--color-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 20px;
    height: 40px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

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

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--color-bg-muted);
    color: var(--color-text-secondary);
}

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

.btn-success {
    background: var(--color-accent);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
}

/* ===== 状态栏 ===== */
.status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.status-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-accent);
}

.status-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-accent);
}

/* ===== 统计卡片 ===== */
.stats-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.stat-card:nth-child(1)::after { background: var(--color-primary); }
.stat-card:nth-child(2)::after { background: var(--color-secondary); }
.stat-card:nth-child(3)::after { background: var(--color-accent); }

.stat-label {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.stat-value.accent {
    color: var(--color-accent);
}

/* ===== 表格区域 ===== */
.table-section {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    overflow-y: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 48px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.table-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* ===== 表格 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table thead tr {
    background: var(--color-bg-muted);
}

.data-table th {
    padding: 0 20px;
    height: 36px;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.data-table th.num {
    text-align: right;
}

.data-table td {
    padding: 0 20px;
    height: 36px;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-primary);
    white-space: nowrap;
}

.data-table td.num {
    text-align: right;
    font-family: 'Consolas', 'Menlo', monospace;
}

.data-table tbody tr:hover {
    background: var(--color-bg-muted);
}

.data-table tbody tr.even {
    background: var(--color-bg);
}

.data-table tbody tr.even:hover {
    background: var(--color-bg-muted);
}

.data-table .empty {
    text-align: center;
    color: var(--color-text-placeholder);
    padding: 40px;
}

/* ===== 导出历史 ===== */
.nav-separator {
    height: 1px;
    background: var(--color-border);
    margin: 12px 16px;
}

.eh-table-wrapper {
    overflow-x: auto;
    margin-top: 16px;
}

.eh-table td:nth-child(1) {
    font-family: 'Consolas', 'Menlo', monospace;
    font-size: 12px;
    white-space: nowrap;
    color: var(--color-text-secondary);
}

.eh-table td:nth-child(2) {
    font-size: 13px;
}

.eh-table td:nth-child(3) {
    font-size: 13px;
    font-weight: 500;
}

.eh-footer {
    padding: 10px 0 0;
    font-size: 12px;
    color: var(--color-text-placeholder);
}

.eh-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}
.eh-download-btn:hover {
    background: var(--color-accent-hover);
}
.eh-download-btn.disabled {
    background: transparent;
    color: var(--color-text-placeholder);
    cursor: not-allowed;
    font-size: 11px;
}

/* ===== 标签 ===== */
.type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
}

.type-normal {
    background: var(--color-bg-light);
    color: var(--color-accent);
}

.type-adjust {
    background: #FEF2F2;
    color: #DC2626;
}

.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
}

.status-loaded {
    background: var(--color-bg-light);
    color: var(--color-accent);
}

/* ===== 分类卡片 ===== */
.sheet-cards {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.sheet-card {
    flex: 1;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--color-border);
    transition: all 0.2s;
}

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

.sheet-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.sheet-card-desc {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ===== 设置区域 ===== */
.settings-area {
    max-width: 720px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.setting-item {
    padding: 20px 0;
}

.setting-item:first-child {
    padding-top: 0;
}

.setting-item:last-child {
    padding-bottom: 0;
}

.setting-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.setting-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

/* 分隔线 */
.divider {
    height: 1px;
    background: var(--color-border);
    margin: 0;
}

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: white;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    z-index: 10001;
    box-shadow: var(--shadow-md);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success { background: var(--color-accent); }
.toast-error { background: #DC2626; }
.toast-info { background: var(--color-primary); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .stats-section {
        flex-direction: column;
    }
    
    .sheet-cards {
        flex-wrap: wrap;
    }
    
    .sheet-card {
        min-width: calc(50% - 6px);
    }
}

@media (max-width: 768px) {
    /* ===== 显示汉堡菜单按钮 ===== */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: none;
        color: var(--color-text-primary);
        cursor: pointer;
        border-radius: var(--radius-md);
        flex-shrink: 0;
    }
    .mobile-menu-btn:active {
        background: var(--color-bg-muted);
    }

    /* ===== 侧边栏 → 抽屉模式（fixed，从左侧滑入）===== */
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 2500;
        transition: left 0.3s ease;
        box-shadow: none;
    }
    .sidebar.mobile-open {
        left: 0;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    /* 移动端不放 sidebar-toggle（底部折叠按钮），改用汉堡菜单控制 */
    .sidebar .sidebar-toggle {
        display: none;
    }

    /* 遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 2400;
        transition: opacity 0.3s;
    }
    .sidebar-overlay.active {
        display: block;
    }

    /* ===== 主内容满宽 ===== */
    .main-content {
        width: 100%;
    }

    /* ===== 顶部栏适配 ===== */
    .top-bar {
        padding: 0 12px;
        height: 52px;
        gap: 8px;
        flex-wrap: nowrap;
    }
    .top-bar .page-title {
        font-size: 15px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .top-bar .user-name {
        display: none; /* 移动端隐藏用户名文字，只留头像 */
    }
    .top-bar .btn-admin {
        font-size: 11px;
        padding: 0 8px;
        height: 30px;
    }
    .top-bar .btn-settings {
        padding: 4px;
    }
    .top-bar .btn-settings-tooltip {
        display: none;
    }
    .top-bar #logout-btn {
        height: 28px;
        padding: 0 8px;
        font-size: 11px;
    }
    .top-bar .user-area {
        gap: 6px;
    }

    /* ===== 页面通用 ===== */
    .page {
        padding: 12px;
    }
    .page.active {
        padding: 12px;
    }

    /* ===== 认证覆盖层 ===== */
    .auth-container {
        width: calc(100vw - 32px);
        max-width: 400px;
        padding: 24px 20px;
        border-radius: 12px;
    }
    .auth-title {
        font-size: 20px;
    }
    .auth-subtitle {
        font-size: 13px;
    }
    .form-input {
        height: 44px;
        font-size: 16px; /* 防止 iOS 缩放 */
    }
    .form-label {
        font-size: 13px;
    }
    .btn {
        height: 44px;
        font-size: 15px;
    }
    .auth-switch {
        font-size: 13px;
    }

    /* ===== 工具中心 ===== */
    .hub-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .hub-heading {
        font-size: 20px;
    }
    .hub-desc {
        font-size: 13px;
    }
    .hub-card {
        padding: 20px 16px;
    }
    .hub-card-icon svg {
        width: 32px;
        height: 32px;
    }
    .hub-card-title {
        font-size: 15px;
    }
    .hub-card-desc {
        font-size: 12px;
    }

    /* ===== 搜索区域 ===== */
    .search-section {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 8px;
    }
    .search-label {
        font-size: 13px;
    }
    .search-input {
        width: 100%;
        height: 44px;
        font-size: 16px;
    }
    .search-section .btn {
        height: 44px;
        width: 100%;
    }
    .search-section .btn-sm {
        height: 40px;
    }

    /* ===== 数据表格 ===== */
    .data-table {
        font-size: 11px;
    }
    .data-table th,
    .data-table td {
        padding: 0 8px;
        height: 34px;
        white-space: nowrap;
    }
    /* 所有表格容器启用横向滚动 */
    .page .data-section,
    .page .table-section,
    .um-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ===== 用户管理 ===== */
    .um-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }
    .um-page-title {
        font-size: 18px;
    }
    .um-topbar .btn {
        width: 100%;
        justify-content: center;
    }
    .um-layout {
        gap: 12px;
        padding: 0;
    }
    .um-card-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }
    .um-card-header > div:first-of-type {
        /* 图标+标题区域 */
    }
    .um-search-input {
        width: 100%;
        max-width: none;
        height: 40px;
        font-size: 16px;
    }
    .um-tool-chips {
        flex-wrap: wrap;
        gap: 3px;
    }
    .um-tool-chip {
        font-size: 10px;
        padding: 2px 6px;
    }
    /* 表格操作按钮 */
    .table-actions {
        flex-wrap: wrap;
        gap: 4px;
    }
    .table-actions button {
        height: 28px;
        padding: 0 6px;
        font-size: 10px;
        white-space: nowrap;
    }

    /* ===== 工具权限浮动弹窗 ===== */
    .um-tool-float {
        max-width: calc(100vw - 24px);
        max-height: 60vh;
        right: auto;
        left: 12px;
    }

    /* ===== 使用统计弹窗 ===== */
    #usage-stats-modal > div {
        width: calc(100vw - 24px);
        max-height: 90vh;
        border-radius: 12px;
    }
    #usage-stats-modal > div > div:first-child {
        padding: 16px;
    }

    /* ===== Toast 消息 ===== */
    .toast {
        max-width: calc(100vw - 32px);
        left: 16px;
        right: 16px;
        font-size: 13px;
        padding: 10px 14px;
    }

    /* ===== 审批弹窗 ===== */
    .approve-modal-content {
        width: calc(100vw - 24px);
        max-height: 85vh;
        padding: 20px 16px;
        border-radius: 12px;
    }
    .approve-modal-content h3 {
        font-size: 17px;
    }
    .approve-modal-content .form-group {
        margin-bottom: 12px;
    }

    /* ===== 设置页 ===== */
    .settings-container {
        padding: 12px;
    }
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px;
    }
    .setting-item .btn {
        width: 100%;
    }
    .request-tool-option {
        width: 100%;
    }
    .request-tool-checkboxes {
        flex-direction: column;
    }

    /* ===== 结算审核页 ===== */
    .sa-layout {
        flex-direction: column;
        height: auto;
    }
    .sa-upload-panel {
        width: 100%;
    }
    .res-bar {
        flex-wrap: wrap;
        gap: 6px;
    }
    .res-link {
        font-size: 12px;
    }

    /* ===== 工具页通用 ===== */
    .upload-grid {
        grid-template-columns: 1fr;
    }
    .sheet-card {
        min-width: 100%;
    }
    .step-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    .step-actions button {
        flex: 1;
        min-width: 100px;
    }

    /* ===== 数据管理页 ===== */
    .stats-section {
        flex-direction: column;
        gap: 8px;
    }
    .stat-card {
        padding: 12px;
    }
    .data-section {
        padding: 12px;
    }

    /* ===== 触摸优化：按钮最小 44×44px ===== */
    .btn-sm {
        min-height: 36px;
    }

    /* ===== 确认弹窗 / 通用弹窗 ===== */
    .modal-content {
        width: calc(100vw - 32px);
        padding: 20px 16px;
    }

    /* 禁止 body 滚动（侧边栏打开时） */
    body.sidebar-mobile-open {
        overflow: hidden;
    }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-placeholder);
}

/* ===== 认证覆盖层 ===== */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-container {
    width: 400px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--color-border);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* 认证表单 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--color-text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.1);
}

.form-input::placeholder {
    color: var(--color-text-placeholder);
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.auth-switch a {
    color: var(--color-primary);
    font-weight: 500;
    cursor: pointer;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-hint {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-placeholder);
    line-height: 1.6;
    margin-top: 4px;
    padding: 10px;
    background: var(--color-bg-muted);
    border-radius: var(--radius-md);
}

/* 待审批图标 */
.pending-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 12px;
    color: var(--color-text-muted);
}

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-container {
    width: 420px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* ===== 导航角标 ===== */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #DC2626;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    margin-left: auto;
}

/* 表格内操作按钮组 */
.table-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* ===== 用户管理操作按钮（统一样式） ===== */
.btn-sm,
.btn-primary-sm, .btn-success-sm,
.btn-danger-sm, .btn-warning-sm,
.btn-info-sm, .btn-secondary-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-family);
    white-space: nowrap;
    line-height: 1;
    letter-spacing: 0.01em;
}

.btn-sm:active,
.btn-primary-sm:active, .btn-success-sm:active,
.btn-danger-sm:active, .btn-warning-sm:active,
.btn-info-sm:active, .btn-secondary-sm:active {
    transform: scale(0.95);
}

/* 实心主色 */
.btn-primary-sm {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.btn-primary-sm:hover { background: var(--color-secondary); border-color: var(--color-secondary); }

/* 实心绿 */
.btn-success-sm {
    background: #059669;
    color: #fff;
    border-color: #059669;
    box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}
.btn-success-sm:hover {
    background: #047857;
    border-color: #047857;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

/* 描边红 */
.btn-danger-sm {
    background: #fff;
    color: #DC2626;
    border-color: #FCA5A5;
}
.btn-danger-sm:hover {
    background: #FEF2F2;
    color: #B91C1C;
    border-color: #EF4444;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.12);
}

/* 描边橙 */
.btn-warning-sm {
    background: #fff;
    color: #D97706;
    border-color: #FCD34D;
}
.btn-warning-sm:hover {
    background: #FFFBEB;
    color: #B45309;
    border-color: #F59E0B;
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.12);
}

/* 描边蓝 */
.btn-info-sm {
    background: #fff;
    color: #2563EB;
    border-color: #93C5FD;
}
.btn-info-sm:hover {
    background: #EFF6FF;
    color: #1D4ED8;
    border-color: #3B82F6;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
}

/* 描边灰 */
.btn-secondary-sm {
    background: #fff;
    color: #6B7280;
    border-color: #D1D5DB;
}
.btn-secondary-sm:hover {
    background: #F9FAFB;
    color: #374151;
    border-color: #9CA3AF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ===== 错误提示 ===== */
.form-error {
    font-size: 12px;
    color: #DC2626;
    margin-top: 2px;
    display: none;
}

.form-error.show {
    display: block;
}

/* ===== 用户管理页 ===== */
.um-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    max-width: 1100px;
}
.um-page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.um-layout {
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.um-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow-y: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.um-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.um-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.um-icon-pending { background: #F59E0B; }
.um-icon-all { background: var(--color-primary); }

.um-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.um-card-desc {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* 用户搜索 */
.um-search-input {
    height: 32px;
    width: 180px;
    padding: 0 12px;
    font-size: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text-primary);
    outline: none;
    transition: border-color 0.2s;
    font-family: var(--font-family);
}
.um-search-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.um-search-input::placeholder {
    color: var(--color-text-placeholder);
}

/* 注册页工具多选下拉 */
.tool-multi-select {
    position: relative;
    width: 100%;
    font-size: 13px;
}
.tms-trigger {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 38px;
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    cursor: pointer;
    transition: border-color 0.15s;
    user-select: none;
}
.tms-trigger:hover,
.tms-trigger.tms-open {
    border-color: var(--color-accent);
}
.tms-placeholder {
    color: var(--color-text-placeholder);
    flex: 1;
}
.tms-arrow {
    margin-left: auto;
    font-size: 10px;
    color: var(--color-text-secondary);
    transition: transform 0.15s;
}
.tms-trigger.tms-open .tms-arrow {
    transform: rotate(180deg);
}
.tms-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    background: #EFF6FF;
    border: 1px solid var(--color-accent);
    border-radius: 12px;
    font-size: 12px;
    color: var(--color-accent);
}
.tms-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    margin-left: 2px;
    color: var(--color-accent);
    transition: background 0.15s;
}
.tms-chip-remove:hover {
    background: var(--color-accent);
    color: #fff;
}
.tms-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}
.tms-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.1s;
}
.tms-option:hover {
    background: #F3F4F6;
}
.tms-check {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--color-border);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
    transition: all 0.15s;
    flex-shrink: 0;
}
.tms-option.tms-selected .tms-check {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.tms-label {
    color: var(--color-text-secondary);
}
.tms-option.tms-selected .tms-label {
    color: var(--color-accent);
    font-weight: 500;
}

/* 工具 chip 容器 */
.um-tool-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    overflow: hidden;
}

/* 工具 chip */
.um-tool-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background: #EFF6FF;
    color: #2563EB;
    border: 1px solid #BFDBFE;
    white-space: nowrap;
}

/* 展开更多工具 */
.um-tool-more {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: #6B7280;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.um-tool-more:hover {
    background: #E5E7EB;
    color: #374151;
}

/* 注册备注单元格 */
.um-remarks-cell {
    cursor: pointer;
    color: #92400E;
    font-size: 12px;
    position: relative;
}
.um-remarks-cell:hover {
    color: #78350F;
    text-decoration: underline dotted;
}
/* 备注悬浮提示 */
.um-remarks-tooltip {
    display: none;
    position: fixed;
    z-index: 10001;
    max-width: 320px;
    padding: 8px 12px;
    background: #1E293B;
    color: #F8FAFC;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    pointer-events: none;
    white-space: pre-wrap;
    word-break: break-word;
}
.um-remarks-tooltip.show {
    display: block;
}

/* 工具权限浮动弹窗 */
.um-tool-float {
    display: none;
    position: fixed;
    z-index: 10000;
    min-width: 140px;
    padding: 8px 0;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.um-tool-float-item {
    display: block;
    padding: 6px 14px;
    font-size: 12px;
    color: #1e40af;
    background: #EFF6FF;
    margin: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    font-weight: 500;
}
.um-tool-float-item:hover {
    background: #DBEAFE;
}
.um-tool-float-scope {
    padding: 4px 14px;
    font-size: 11px;
    color: #DC2626;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid #FEE2E2;
    margin-bottom: 4px;
}

/* 未分配工具 */
.um-tool-none {
    font-size: 11px;
    color: #9CA3AF;
}

/* 工具管理员管理范围标签 */
.um-admin-scope {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #DC2626;
    background: #FEE2E2;
    margin-left: 4px;
}

.um-tool-new {
    background: #FEF3C7 !important;
    color: #D97706 !important;
    border-color: #FCD34D !important;
}

/* 工具 chip：不在当前管理员管理范围内（需其他工具管理员审批） */
.um-tool-chip-out {
    background: #F3F4F6 !important;
    color: #9CA3AF !important;
    border: 1px dashed #D1D5DB !important;
    cursor: help;
}

/* 用户管理行内标签 */
.um-role-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.um-role-system { background: #F3E8FF; color: #7C3AED; }
.um-role-tool { background: #DBEAFE; color: #2563EB; }
.um-role-user { background: var(--color-bg-muted); color: var(--color-text-muted); }

.um-status-approved { color: #059669; font-weight: 500; }
.um-status-pending { color: #DC2626; font-weight: 500; }
.um-status-ok { color: #059669; font-size: 12px; font-weight: 500; }
.um-status-expired { color: #DC2626; font-size: 12px; font-weight: 600; }

/* 顶部栏管理员按钮 — 精致描边风格 */
.btn-admin {
    height: 34px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    background: var(--color-bg-card);
    color: #7C3AED;
    border: 1px solid #E9D5FF;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-admin:hover {
    background: #F5F3FF;
    border-color: #C4B5FD;
    color: #6D28D9;
}

.btn-admin:active {
    transform: scale(0.97);
}

/* 设置齿轮按钮 */
.btn-settings {
    width: 34px;
    height: 34px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    color: var(--color-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
}

.btn-settings:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: var(--color-bg-muted);
}

.btn-settings-tooltip {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text-primary);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
}

.btn-settings-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--color-text-primary);
}

.btn-settings:hover .btn-settings-tooltip {
    opacity: 1;
}

.btn-admin .nav-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #EF4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tool-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--color-text-secondary);
    transition: all 0.2s;
}

.tool-checkbox:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-muted);
}

.tool-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent);
    cursor: pointer;
}

/* ===== 登录页联系方式 ===== */
.auth-contact {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-placeholder);
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* ===== 导航分类标签 ===== */
.nav-section-label {
    padding: 12px 16px 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-placeholder);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 1;
    max-height: 40px;
    transition: opacity 0.2s ease, max-height 0.25s ease, padding 0.25s ease, margin 0.25s ease;
}

.nav-back {
    color: var(--color-accent) !important;
    font-weight: 500;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 4px;
    transition: opacity 0.2s ease, max-height 0.25s ease, padding 0.25s ease;
}

.nav-back:hover {
    background: var(--color-bg-light) !important;
}

/* ===== 工具中心页 ===== */
.tool-hub {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

.hub-heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.hub-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

.hub-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.hub-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.hub-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.hub-card-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hub-card-disabled:hover {
    border-color: var(--color-border);
    box-shadow: none;
    transform: none;
}

.hub-card-icon {
    width: 56px;
    height: 56px;
    background: var(--color-bg-muted);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.hub-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.hub-card-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.hub-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-accent);
    background: var(--color-bg-light);
    padding: 2px 10px;
    border-radius: 10px;
}

.tag-pending {
    color: var(--color-text-muted);
    background: var(--color-bg-muted);
}

/* ===== 结算审核页 ===== */
.sa-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 88px);
}

.sa-upload-panel {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sa-result-panel {
    flex: 1;
    min-width: 0;
}

.sa-file-status {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    word-break: break-all;
    line-height: 1.5;
}

.sa-upload-btn {
    cursor: pointer;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

.sa-empty-hint {
    font-size: 13px;
    color: var(--color-text-placeholder);
    text-align: center;
    padding: 24px 0;
}

.sa-settle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.sa-settle-item:last-child {
    border-bottom: none;
}

.sa-settle-name {
    flex: 1;
    font-size: 12px;
    color: var(--color-text-primary);
    word-break: break-all;
    line-height: 1.4;
}

.sa-settle-sheet {
    min-width: 120px;
}

.sa-settle-sheet select {
    width: 100%;
    height: 28px;
    padding: 0 6px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 12px;
    color: var(--color-text-primary);
    background: var(--color-bg);
    outline: none;
}

.sa-settle-remove {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sa-settle-remove:hover {
    background: var(--color-bg-muted);
    color: #DC2626;
}

.sa-progress {
    width: 100%;
    height: 6px;
    background: var(--color-bg-muted);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}

.sa-progress-bar {
    height: 100%;
    background: var(--color-accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s;
}

.sa-progress-bar.indeterminate {
    width: 30%;
    animation: sa-indeterminate 1.2s ease-in-out infinite;
}

@keyframes sa-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

.sa-status-text {
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 8px;
    min-height: 20px;
}

.sa-status-text.success {
    color: var(--color-accent);
}

.sa-status-text.error {
    color: #DC2626;
}

/* ===== 结算审核 - 响应式 ===== */
@media (max-width: 1024px) {
    .sa-layout {
        flex-direction: column;
        height: auto;
    }
    .sa-upload-panel {
        width: 100%;
    }
}

/* ===== 申请工具权限 ===== */
.request-tool-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--color-text-secondary);
    cursor: pointer;
    margin-bottom: 6px;
    transition: all 0.2s;
}
.request-tool-option:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-muted);
}
.request-tool-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent);
    cursor: pointer;
}
.request-tool-msg {
    display: inline-block;
    margin-left: 12px;
    font-size: 12px;
    font-weight: 500;
}
.request-tool-msg.success { color: var(--color-accent); }
.request-tool-msg.error { color: #DC2626; }

/* 设置页小号主按钮 */
.btn-sm-primary {
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

/* 删除申请中标记 */
.um-delete-pending {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #DC2626;
    padding: 2px 8px;
    background: #FEE2E2;
    border-radius: 10px;
}

.um-icon-tool-req { background: #8B5CF6; }
.um-icon-del-req { background: #DC2626; }

/* ===== 清理表生成页 — 分步模式 ===== */
.ct2-layout { max-width: 780px; margin: 0 auto; padding: 20px 0 40px; }
.ct2-header { text-align: center; margin-bottom: 28px; }
.ct2-header-row { display: flex; align-items: center; justify-content: center; gap: 16px; position: relative; }
.ct2-header-row h2 { margin-bottom: 0; flex-shrink: 0; }
.ct2-header-row .btn { flex-shrink: 0; white-space: nowrap; }
.ct2-header h2 { font-size: 24px; font-weight: 700; color: #1E293B; margin-bottom: 6px; }
.ct2-header p { font-size: 14px; color: #64748B; }

/* 步骤管线 */
.ct2-pipeline { display: flex; flex-direction: column; gap: 12px; }

/* 站点汇总表提取（独立小工具） */
.ct2-extract-box {
    margin-top: 16px;
    padding: 16px 20px;
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    border-radius: 10px;
}
.ct2-extract-hd {
    margin-bottom: 12px;
}
.ct2-extract-hd strong {
    font-size: 14px;
    color: #334155;
}
.ct2-extract-hd small {
    display: block;
    margin-top: 4px;
    color: #94A3B8;
    font-size: 12px;
}
.ct2-extract-body {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 步骤卡片 */
.ct2-step {
    background: #fff; border: 1.5px solid #E2E8F0; border-radius: 10px;
    overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.ct2-step:hover { border-color: #CBD5E1; }
.ct2-step.ct2-step-done { border-color: #86EFAC; background: #FAFFFB; }
.ct2-step.ct2-step-running { border-color: #93C5FD; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.ct2-step.ct2-step-error { border-color: #FCA5A5; background: #FFF5F5; }

/* 步骤头部 */
.ct2-step-hd {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; background: #F8FAFC;
    border-bottom: 1px solid #F1F5F9;
}
.ct2-step-done .ct2-step-hd { background: #F0FDF4; }
.ct2-step-running .ct2-step-hd { background: #EFF6FF; }
.ct2-step-error .ct2-step-hd { background: #FEF2F2; }

.ct2-step-num {
    width: 30px; height: 30px; border-radius: 50%;
    background: #E2E8F0; color: #64748B; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ct2-step-done .ct2-step-num { background: #16A34A; color: #fff; }
.ct2-step-running .ct2-step-num { background: #3B82F6; color: #fff; }
.ct2-step-error .ct2-step-num { background: #EF4444; color: #fff; }

.ct2-step-title { flex: 1; min-width: 0; }
.ct2-step-title strong { font-size: 14px; color: #1E293B; display: block; }
.ct2-step-title small { font-size: 11px; color: #94A3B8; display: block; margin-top: 1px; }

/* 步骤状态 */
.ct2-step-status {
    font-size: 12px; font-weight: 600; white-space: nowrap; color: #94A3B8;
}
.ct2-step-done .ct2-step-status { color: #16A34A; }
.ct2-step-running .ct2-step-status { color: #3B82F6; }
.ct2-step-error .ct2-step-status { color: #EF4444; }

/* 步骤主体 */
.ct2-step-body { padding: 14px 18px; }

/* 文件行 */
.ct2-file-row, .ct2-optional-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 6px; margin-bottom: 4px;
    background: #F8FAFC; border: 1px solid #F1F5F9;
}
.ct2-optional-row { background: #FAFBFC; border-style: dashed; }
.ct2-auto { background: #F0FDF4; border-color: #DCFCE7; }
.ct2-file-label {
    font-size: 13px; color: #475569; font-weight: 500; flex: 1; min-width: 0;
}
.ct2-opt-label {
    font-size: 11px; color: #94A3B8; font-weight: 500; width: 36px; flex-shrink: 0;
}

/* 文件按钮 */
.ct2-file-btn {
    display: inline-block; padding: 5px 14px; background: #3B82F6; color: #fff;
    border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer;
    white-space: nowrap; transition: background .2s; flex-shrink: 0;
}
.ct2-file-btn:hover { background: #2563EB; }
.ct2-file-btn-light { background: #E2E8F0; color: #475569; }
.ct2-file-btn-light:hover { background: #CBD5E1; }

/* 文件名 */
.ct2-file-name {
    font-size: 12px; color: #94A3B8; max-width: 150px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ct2-file-name.ct2-has-file { color: #475569; font-weight: 500; }
.ct2-file-name-auto { font-size: 12px; color: #16A34A; font-weight: 500; }
.ct2-inp-hidden { display: none; }

/* 步骤底部 */
.ct2-step-ft {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid #F1F5F9;
}
.ct2-step-msg { font-size: 12px; color: #64748B; }
.ct2-step-msg.ct2-msg-ok { color: #16A34A; }
.ct2-step-msg.ct2-msg-err { color: #EF4444; }
.ct2-step-msg.ct2-msg-info { color: #3B82F6; }

/* Sheet 选择区域 */
.ct2-sheet-area { padding: 6px 10px; margin: 2px 0 8px 0; display: flex; flex-direction: column; gap: 4px; }
.ct2-sheet-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ct2-sheet-label { color: #64748B; white-space: nowrap; min-width: 60px; text-align: right; }
.ct2-sheet-select { 
    font-size: 12px; padding: 4px 8px; border: 1.5px solid #E2E8F0; border-radius: 6px;
    background: #fff; color: #334155; outline: none; min-width: 160px; cursor: pointer;
}
.ct2-sheet-select:focus { border-color: #3B82F6; }
.ct2-sheet-label-name { color: #475569; font-weight: 500; font-size: 11px; margin-bottom: 2px; }

/* btn-sm 小按钮 */
.btn-sm {
    height: 30px; padding: 0 16px; font-size: 12px; font-weight: 600;
    border-radius: 6px; border: none; cursor: pointer;
    transition: all .15s;
}

/* 审核日志区 */
.ct2-log-area {
    border: 1px solid #E2E8F0; border-radius: 8px; overflow: hidden;
}
.ct2-log-title {
    font-size: 12px; font-weight: 600; color: #475569;
    padding: 8px 12px; background: #F8FAFC; border-bottom: 1px solid #E2E8F0;
}
.ct2-log-content {
    margin: 0; padding: 12px;
    font-size: 11px; font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #334155; line-height: 1.6;
    background: #fff; max-height: 320px; overflow-y: auto;
    white-space: pre-wrap; word-break: break-all;
}

/* === 资源下载栏 === */
.res-bar {
    display: flex; align-items: center; gap: 10px;
    margin-top: 10px; padding: 8px 14px;
    background: #F0F4FF; border-radius: 6px;
    border: 1px solid #D6E4FF; font-size: 13px;
}
.res-bar-label { color: #64748B; font-weight: 500; }
.res-link {
    color: #2563EB; text-decoration: none; font-weight: 500;
    padding: 4px 12px; border-radius: 4px;
    background: #DBEAFE; transition: background .15s;
}
.res-link:hover { background: #BFDBFE; }

/* ICP备案号底部 */
.icp-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    text-align: center;
    padding: 12px 16px;
    font-size: 12px;
    color: #94A3B8;
    background: #fff;
    border-top: 1px solid #E2E8F0;
}
.icp-footer a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.15s;
}
.icp-footer a:hover {
    color: #64748B;
}

/* ===== 移动端适配（页面底部样式：清理表 / 弹窗 / 顶部栏等）===== */
/* 注：ct2-* / modal-container 等样式定义在本媒体查询之前，
   所以此处的移动端规则必须放在文件末尾才能正确覆盖默认样式。 */
@media (max-width: 768px) {
    /* ===== 清理表生成 / 审核页头部 ===== */
    .ct2-layout { padding: 8px 0 24px; }
    .ct2-header { padding: 0 12px; margin-bottom: 20px; }
    .ct2-header-row { flex-direction: column; gap: 10px; align-items: stretch; }
    .ct2-header-row h2 { font-size: 18px; margin: 0; }
    .ct2-header-row .btn { width: 100%; }
    .ct2-header p { font-size: 12px; line-height: 1.5; }

    /* ===== 步骤卡片头部（数字 + 标题 + 状态）===== */
    .ct2-step-hd {
        gap: 10px;
        padding: 12px 14px;
        flex-wrap: wrap;
    }
    .ct2-step-num { width: 26px; height: 26px; font-size: 12px; }
    .ct2-step-title { flex: 1 1 calc(100% - 36px); min-width: 0; }
    .ct2-step-title strong { font-size: 13px; }
    .ct2-step-title small { font-size: 11px; }
    .ct2-step-status { font-size: 11px; flex: 1 1 100%; text-align: right; padding-top: 4px; }

    /* ===== 步骤主体 ===== */
    .ct2-step-body { padding: 12px 14px; }

    /* ===== 文件行：竖向排列 ===== */
    .ct2-file-row,
    .ct2-optional-row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    .ct2-opt-label { width: auto; font-size: 10px; }
    .ct2-file-label {
        flex: 1 1 100%;
        min-width: 0;
        font-size: 12px;
    }
    .ct2-file-btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 6px 12px;
        font-size: 12px;
    }
    .ct2-file-name {
        flex: 1 1 100%;
        max-width: 100%;
        font-size: 11px;
    }
    .ct2-file-name-auto {
        flex: 1 1 100%;
        text-align: right;
    }

    /* ===== 步骤底部（消息 + 按钮）===== */
    .ct2-step-ft {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
    }
    .ct2-step-msg {
        flex: 1 1 100%;
        order: 2;
        font-size: 11px;
    }
    .ct2-step-ft button {
        flex: 1;
        min-width: 0;
        height: 36px;
        font-size: 12px;
    }

    /* ===== Sheet 选择区 ===== */
    .ct2-sheet-area { padding: 4px 0 8px; }
    .ct2-sheet-row { flex-wrap: wrap; gap: 6px; }
    .ct2-sheet-label {
        min-width: 0;
        text-align: left;
        flex: 1 1 100%;
        font-size: 11px;
    }
    .ct2-sheet-select {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
        font-size: 12px;
    }

    /* ===== 站点汇总表提取区 ===== */
    .ct2-extract-box { padding: 12px; border-radius: 8px; }
    .ct2-extract-hd strong { font-size: 13px; }
    .ct2-extract-hd small { font-size: 11px; }
    .ct2-extract-body {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .ct2-extract-body .ct2-file-btn,
    .ct2-extract-body .btn,
    .ct2-extract-body #audit-msg-extract {
        width: 100%;
        text-align: center;
        margin: 0;
    }
    .ct2-extract-body .ct2-file-name {
        text-align: center;
        max-width: 100%;
    }

    /* ===== 审核日志 ===== */
    .ct2-log-content { max-height: 200px; font-size: 10px; padding: 10px; }

    /* ===== 资源条（结算审核 / 清理表审核）===== */
    .res-bar { padding: 8px 10px; }
    .res-bar-label { width: 100%; margin-bottom: 4px; font-size: 12px; }
    .res-link { font-size: 11px; padding: 3px 10px; flex: 1; text-align: center; }

    /* ===== 弹窗（审批、改密）===== */
    .modal-container {
        width: calc(100vw - 24px);
        max-width: 420px;
        padding: 22px 18px;
        border-radius: 10px;
        gap: 12px;
    }
    .modal-title { font-size: 16px; }
    .modal-actions {
        flex-direction: column;
        gap: 8px;
    }
    .modal-actions .btn {
        flex: 1;
        min-width: 0;
        width: 100%;
        height: 40px;
        font-size: 14px;
    }

    /* ===== 审批弹窗内 — 工具复选框 ===== */
    .tool-checkbox-group { gap: 6px; }
    .tool-checkbox { padding: 9px 12px; font-size: 12px; }

    /* ===== 使用统计弹窗 ===== */
    #usage-stats-modal > div { width: calc(100vw - 24px); }
    #usage-stats-modal > div > div:first-child { padding: 14px; flex-wrap: wrap; }

    /* ===== 顶部栏 — 更小屏（< 480px）：彻底隐藏用户管理按钮 ===== */
    .top-bar .btn-admin { display: none; }
}

/* ===== 更小屏（< 480px）进一步精简 ===== */
@media (max-width: 480px) {
    .top-bar { padding: 0 8px; height: 48px; gap: 6px; }
    .top-bar .page-title { font-size: 14px; }
    .top-bar #logout-btn { font-size: 10px; padding: 0 6px; height: 26px; }
    .top-bar .btn-settings { padding: 4px; }
    .page-title { overflow: hidden; text-overflow: ellipsis; }

    .ct2-step-hd { padding: 10px 12px; }
    .ct2-step-body { padding: 10px 12px; }
    .ct2-header { padding: 0 8px; }
    .ct2-header p { font-size: 11px; }
}

