/* ============================================================
   设备巡检系统 样式表
   ============================================================ */

:root {
    --primary: #2c5fb3;
    --primary-dark: #1f4480;
    --bg: #f4f6f9;
    --sidebar-bg: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #3b82f6;
    --card: #fff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;
    --fault: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,0,0,.05); }

a, button, input, select, textarea, label[for] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,.05);
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 220px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 20;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.logo {
    padding: 22px 20px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.1);
    text-align: center;
    letter-spacing: 1px;
}
.sidebar nav { flex: 1; padding: 12px 0; }
.sidebar nav a {
    display: block;
    padding: 12px 22px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all .15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: var(--sidebar-active); color: #fff; }

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-user span { color: #fff; font-weight: 600; }
.sidebar-user small { color: var(--sidebar-text); }
.sidebar-user .btn-link {
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13px;
    margin-top: 2px;
}
.sidebar-user .btn-link:hover { color: #fff; }
.btn-logout {
    margin-top: 6px;
    color: #fca5a5 !important;
    text-decoration: none;
    font-size: 13px;
}
.btn-logout:hover { color: #fff !important; }

.main { flex: 1; margin-left: 220px; display: flex; flex-direction: column; }

.topbar {
    background: var(--card);
    padding: 16px 28px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    display: flex;
    align-items: center;
}
.topbar h1 { font-size: 20px; font-weight: 600; }

.content { padding: 18px 22px; flex: 1; }
.footer {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

/* ===== 提示条 ===== */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: var(--success); }
.alert-error   { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.alert-info   { background: #eff6ff; border-color: #bfdbfe; color: var(--primary); }

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    background: var(--primary);
    color: #fff;
}
.btn:hover { background: var(--primary-dark); }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #15803d; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-link {
    background: transparent;
    color: var(--primary);
    padding: 4px 8px;
}
.btn-link:hover { text-decoration: underline; background: transparent; }
.btn-secondary { background: #6b7280; }
.btn-secondary:hover { background: #4b5563; }

/* ===== 表格 ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.table th, .table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fafc; }
.table .actions { white-space: nowrap; }

/* ===== 状态标签 ===== */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.tag-normal  { background: #dcfce7; color: #166534; }
.tag-warning { background: #fef3c7; color: #92400e; }
.tag-fault   { background: #fee2e2; color: #991b1b; }
.tag-offline { background: #e2e8f0; color: #475569; }

/* ===== 统计卡片 ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card);
    border-radius: 8px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border-left: 4px solid var(--primary);
}
.stat-card .num { font-size: 32px; font-weight: 700; color: var(--primary); }
.stat-card .label { color: var(--text-muted); margin-top: 4px; }
.stat-card.green  { border-left-color: var(--success); }
.stat-card.green  .num { color: var(--success); }
.stat-card.orange { border-left-color: var(--warning); }
.stat-card.orange .num { color: var(--warning); }
.stat-card.red    { border-left-color: var(--danger); }
.stat-card.red    .num { color: var(--danger); }

/* ===== 表单 ===== */
.form-card {
    background: var(--card);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    max-width: 600px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text);
}
.form-group .req { color: var(--danger); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44,95,179,.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.form-hint { color: var(--text-muted); font-size: 12px; margin-top: 4px; }

/* ===== 工具栏 ===== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.toolbar .search {
    display: flex;
    gap: 8px;
}
.toolbar .search input,
.toolbar .search select,
.toolbar .search .btn {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.4;
    height: 36px;
    box-sizing: border-box;
}
.toolbar .search input { width: 200px; }
.toolbar .search select {
    min-width: 120px;
    background: #fff;
}
.toolbar .search .btn {
    border: none;
    padding: 7px 16px;
    height: 36px;
}
/* ===== 批量操作栏 ===== */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.batch-bar .batch-info {
    color: var(--text-muted);
    font-size: 13px;
}
.table .col-check {
    width: 40px;
    text-align: center;
}
.table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

.import-export {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.import-export form {
    display: flex;
    align-items: center;
    gap: 6px;
}
.import-export input[type="file"] {
    font-size: 13px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    max-width: 180px;
}
.import-export .btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* ===== 参考场景图 / 图片放大 ===== */
.scene-thumb {
    margin: 8px 0 12px;
}
.scene-thumb img {
    max-width: 220px;
    max-height: 160px;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    cursor: zoom-in;
    transition: transform .2s;
}
.scene-thumb img:hover { transform: scale(1.02); }
.scene-thumb .form-hint { margin-top: 4px; }

.scene-thumb-list {
    display: inline-block;
    vertical-align: middle;
}
.scene-thumb-list img {
    width: auto;
    height: auto;
    max-width: 120px;
    max-height: 90px;
    border-radius: 4px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: transform .2s;
    object-fit: cover;
}
.scene-thumb-list img:hover { transform: scale(1.05); }

.img-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.85);
    z-index: 100;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.img-lightbox.show { display: flex; }
.img-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,.4);
    object-fit: contain;
}

/* ===== 分页 ===== */
.pagination {
    margin-top: 16px;
    display: flex;
    gap: 4px;
    justify-content: center;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    background: var(--card);
}
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { color: var(--text-muted); cursor: not-allowed; }
.pagination .ellipsis { border: none; background: none; padding: 6px 4px; color: var(--text-muted); }
.pagination .per-page-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}
.pagination .per-page-selector form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pagination .per-page-selector select {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    height: 30px;
}

/* ===== 登录页 ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b, #2c5fb3);
}
.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-box h1 { text-align: center; margin-bottom: 6px; color: var(--primary); }
.login-box .sub { text-align: center; color: var(--text-muted); margin-bottom: 28px; }
.login-box .form-group { margin-bottom: 18px; }
.login-box .btn { width: 100%; padding: 11px; }
.login-hint {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-muted);
}

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

/* ============================================================
   移动端适配
   ============================================================ */

/* 桌面端隐藏汉堡按钮和遮罩 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: -6px 0 -6px -10px;
    margin-right: 8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: .2s;
}
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45);
    z-index: 15;
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}
.sidebar-backdrop.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ===== 平板 (≤992px) ===== */
@media (max-width: 992px) {
    .topbar { padding: 14px 20px; }
    .content { padding: 16px 18px; }
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 14px;
    }
    .stat-card { padding: 18px 18px; }
    .stat-card .num { font-size: 26px; }
}

/* ===== 手机 (≤768px) ===== */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    .main { margin-left: 0; min-width: 0; }
    .content { padding: 12px 14px; overflow-x: hidden; }

    /* 显示汉堡按钮，侧边栏改为抽屉 */
    .menu-toggle { display: flex; }
    .sidebar {
        transform: translateX(-100%);
        transition: transform .28s ease;
        box-shadow: 2px 0 16px rgba(0,0,0,.3);
        pointer-events: none;
    }
    .sidebar.open {
        transform: translateX(0);
        pointer-events: auto;
    }
    .sidebar.open nav a,
    .sidebar.open .btn-logout {
        pointer-events: auto;
    }

    /* topbar 标题 */
    .topbar { padding: 12px 16px; }
    .topbar h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* 统计卡片 2 列 */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 18px;
    }
    .stat-card { padding: 16px; border-radius: 6px; }
    .stat-card .num { font-size: 24px; }

    /* 表格横向滚动 */
    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .table th, .table td { padding: 10px 12px; font-size: 13px; }
    .scene-thumb-list img {
        max-width: 80px;
        max-height: 60px;
    }

    /* 工具栏：全部垂直居中，不再溢出 */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 10px;
    }
    .toolbar > * {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .toolbar .btn,
    .toolbar .btn-success,
    .toolbar .btn-secondary,
    .toolbar .btn-sm {
        width: 100%;
        max-width: 100%;
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }
    .toolbar .search {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        align-items: stretch;
    }
    .toolbar .search input,
    .toolbar .search select,
    .toolbar .search .btn {
        width: 100%;
        max-width: 100%;
        text-align: center;
        height: 44px;
        padding: 10px 12px;
        font-size: 15px;
    }

    /* 导入导出工具条在手机端垂直居中 */
    .import-export {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        gap: 8px;
    }
    .import-export .btn-sm {
        width: 100%;
        max-width: 100%;
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }
    .import-export form {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        gap: 6px;
    }
    .import-export input[type="file"] {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    /* 表单卡片全宽 */
    .form-card {
        max-width: 100%;
        padding: 18px;
        border-radius: 6px;
    }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; text-align: center; }

    /* 登录页 */
    .login-page { padding: 16px; }
    .login-box {
        width: 100%;
        max-width: 380px;
        padding: 28px 24px;
        border-radius: 10px;
    }

    /* 分页 */
    .pagination { flex-wrap: wrap; gap: 3px; }
    .pagination a, .pagination span { padding: 5px 9px; font-size: 13px; }
    .pagination .per-page-selector { margin-right: 0; margin-bottom: 4px; width: 100%; justify-content: center; }

    /* 提示条 */
    .alert { padding: 10px 14px; font-size: 13px; }
}

/* ===== 小屏手机 (≤480px) ===== */
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .topbar h1 { font-size: 16px; }
    .table th, .table td { padding: 8px 10px; }
    .login-box { padding: 24px 18px; }
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 1000;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
}
.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.back-to-top.show {
    display: flex;
}
@media (max-width: 768px) {
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* ========== 电表详情页：年度抄表网格 ========== */
.reading-section {
    margin-top: 20px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    padding: 18px;
}
.reading-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.reading-section-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.reading-year-form { display: flex; align-items: center; gap: 6px; }
.reading-year-form label { font-size: 13px; color: var(--text-muted); }
.reading-year-form select {
    padding: 5px 10px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
}
.reading-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
.reading-card {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #fff;
    transition: box-shadow .15s;
    min-height: 120px;
}
.reading-card.is-done { border-color: #86efac; background: #f0fdf4; }
.reading-card.is-empty { border-style: dashed; background: #f8fafc; }
.reading-card.is-current {
    border: 2px solid var(--primary, #2563eb);
    box-shadow: 0 2px 8px rgba(37,99,235,.15);
}
.reading-card-head { display: flex; align-items: center; justify-content: space-between; }
.reading-month { font-weight: 600; font-size: 14px; }
.reading-now {
    font-size: 11px; color: #fff; background: var(--primary, #2563eb);
    padding: 1px 7px; border-radius: 10px;
}
.reading-card-body { font-size: 12px; line-height: 1.7; color: var(--text-muted); }
.reading-val { color: var(--text, #1e293b); }
.reading-usage strong { color: #16a34a; font-size: 14px; }
.reading-time { font-size: 11px; }
.reading-empty-text { color: var(--text-muted); font-size: 13px; padding: 4px 0; }
.reading-card .btn-sm { margin-top: auto; align-self: flex-start; }
.reading-section-foot { margin-top: 14px; text-align: right; }

@media (max-width: 992px) { .reading-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px) {
    .reading-grid { grid-template-columns: repeat(2, 1fr); }
    .reading-section-head { flex-direction: column; align-items: flex-start; }
}

/* ========== 个人中心 ========== */
.profile-page .form-card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text, #1e293b);
    border-bottom: 1px solid var(--border, #e2e8f0);
    padding-bottom: 10px;
}
.profile-page .form-card {
    max-width: 720px;
}

/* ===== 授权状态提示条 ===== */
.license-banner {
    padding: 10px 22px;
    font-size: 13px;
    line-height: 1.6;
    border-bottom: 1px solid transparent;
}
.license-banner-warning {
    background: #fffbeb;
    border-bottom-color: #fde68a;
    color: #92400e;
}
.license-banner-danger {
    background: #fef2f2;
    border-bottom-color: #fecaca;
    color: #991b1b;
}
.license-banner-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
}
.license-banner-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.license-action-btn {
    margin-left: auto;
    flex-shrink: 0;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 4px;
    border: 1px solid currentColor;
    white-space: nowrap;
    transition: opacity .15s;
}
.license-action-btn:hover {
    opacity: .75;
    text-decoration: none;
}

/* ===== 授权说明弹窗 ===== */
.license-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.license-modal-box {
    background: #fff;
    border-radius: 10px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.license-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.license-modal-header h3 {
    margin: 0;
    font-size: 17px;
    color: var(--text);
}
.license-modal-close {
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 4px;
    user-select: none;
}
.license-modal-close:hover {
    color: var(--text);
}
.license-modal-body {
    padding: 20px;
}
.license-info-table {
    width: 100%;
    margin-bottom: 18px;
    border-collapse: collapse;
}
.license-info-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.license-info-table td:first-child {
    color: var(--text-muted);
    white-space: nowrap;
    width: 100px;
}
.license-info-table td:last-child {
    color: var(--text);
}
.license-help-section {
    margin-bottom: 16px;
}
.license-help-section h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--text);
}
.license-help-section ol {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-muted);
}
.license-help-section p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-muted);
}
.license-help-section code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--primary);
    word-break: break-all;
}
.license-help-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .license-banner { padding: 8px 16px; font-size: 12px; }
    .license-action-btn { margin-left: 0; width: 100%; text-align: center; padding: 5px; }
    .license-modal-box { max-width: 100%; }
}

/* ===== 侧边栏二级菜单折叠分组 ===== */
.sidebar nav .nav-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 22px;
    color: var(--sidebar-text);
    cursor: pointer;
    user-select: none;
    transition: all .15s;
}
.sidebar nav .nav-group-title:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav .nav-group-title .arrow {
    display: inline-block;
    width: 0; height: 0;
    border-left: 4px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform .2s;
    opacity: .6;
}
.sidebar nav .nav-group.open > .nav-group-title .arrow { transform: rotate(90deg); }
.sidebar nav .nav-group.open > .nav-group-title { color: #fff; }
.sidebar nav .nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
    background: rgba(0,0,0,.18);
}
.sidebar nav .nav-group.open > .nav-sub { max-height: 800px; }
.sidebar nav .nav-sub a { padding-left: 42px; font-size: 13px; }

/* ===== 详情查看模态框 ===== */
.detail-modal { display: none; position: fixed; inset: 0; z-index: 1000; }
.detail-modal.show { display: block; }
.detail-modal-mask { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.detail-modal-box {
    position: relative;
    max-width: 640px; width: 92%;
    max-height: 86vh; overflow-y: auto;
    margin: 6vh auto 0;
    background: var(--card);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    padding: 20px 24px;
}
.detail-head { margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.detail-head h3 { font-size: 17px; color: var(--text); }
.detail-modal-loading, .detail-empty { text-align: center; padding: 30px 0; color: var(--text-muted); }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th {
    width: 38%; text-align: left;
    padding: 9px 12px; background: #f8fafc;
    color: var(--text-muted); font-weight: 500; font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: top; white-space: nowrap;
}
.detail-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text); word-break: break-all;
}
.detail-foot { text-align: right; margin-top: 16px; }
@media (max-width: 600px) {
    .detail-modal-box { width: 96%; padding: 14px; margin-top: 3vh; }
    .detail-table th { width: 30%; }
}
