/* ============================================================
   GEO SaaS Design System v5.5 — 精简版
   仅包含：变量、重置、布局、通用组件
   ============================================================ */

/* ---------- 字体引入 ---------- */
@import url('../vendor/fonts/fonts.css');

/* ---------- CSS 变量 ---------- */
:root {
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-primary-subtle: rgba(79, 70, 229, 0.08);
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    --color-info: #3b82f6;
    --color-info-light: #dbeafe;

    --gray-0: #ffffff;
    --gray-25: #fafbfc;
    --gray-50: #f7f8fa;
    --gray-100: #f0f1f3;
    --gray-200: #e2e4e8;
    --gray-300: #cdd0d5;
    --gray-400: #9aa0a9;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --topbar-height: 60px;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.06);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.08);

    --font-sans: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --transition-base: 180ms cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- 全局重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.5;
    font-size: 14px;
}

/* ---------- 入场动画 ---------- */
.animate-fade-in {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动条隐藏 */
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
*::-webkit-scrollbar {
    display: none;
}

/* ============================================================
   核心布局
   ============================================================ */
.app-layout,
.layout {
    display: flex;
    min-height: 100vh;
}

.app-main,
.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-base);
}

.app-sidebar.collapsed~.app-main,
.sidebar.collapsed~.main {
    margin-left: var(--sidebar-collapsed-width);
}

.app-sidebar .sidebar-nav,
.app-sidebar {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-sidebar .sidebar-nav::-webkit-scrollbar,
.app-sidebar::-webkit-scrollbar {
    display: none;
}

.app-content,
.content {
    padding: 1.5rem;
    flex: 1;
}

/* ---------- 侧边栏 ---------- */
.app-sidebar,
.sidebar {
    width: var(--sidebar-width);
    background: var(--gray-0);
    border-right: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transition: width var(--transition-base);
    overflow-x: hidden;
    box-shadow: 1px 0 8px rgba(0,0,0,0.02);
}

.app-sidebar.collapsed,
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.app-sidebar.collapsed .nav-item span:not(.nav-icon) {
    display: none;
}

.app-sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.7rem;
}

.app-sidebar.collapsed .nav-group-title {
    display: none;
}

.sidebar-brand,
.logo {
    padding: 1rem 1.25rem 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
}

.nav-group {
    margin-bottom: 0.5rem;
}

.nav-group-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    padding: 0.5rem 0.75rem 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.nav-item,
.sidebar a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.nav-item:hover,
.sidebar a:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.nav-item.active,
.sidebar a.active {
    background: var(--color-primary-subtle);
    color: var(--color-primary);
    font-weight: 600;
}

.nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-toggle {
    padding: 0.75rem;
    text-align: center;
    border-top: 1px solid var(--gray-100);
    cursor: pointer;
    color: var(--gray-400);
    transition: color var(--transition-base);
    font-size: 0.85rem;
}

/* ---------- 顶部栏 ---------- */
.app-topbar,
.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 40;
}

.tab-nav {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius);
}

.tab-nav a {
    padding: 6px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.tab-nav a:hover {
    color: var(--gray-900);
}

.tab-nav a.active {
    background: var(--gray-0);
    color: var(--gray-900);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.user-dropdown {
    position: relative;
}

.user-dropdown>div:last-child {
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
}

/* ============================================================
   通用组件：卡片
   ============================================================ */
.card {
    background: var(--gray-0);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--gray-100);
    margin-bottom: 1.5rem;
    transition: box-shadow var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* ============================================================
   通用组件：统计卡片
   ============================================================ */
.stat-grid,
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--gray-0);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .num,
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-card .label,
.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ============================================================
   通用组件：按钮
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    font-family: inherit;
    background: var(--gray-100);
    color: var(--gray-700);
    white-space: nowrap;
}

.btn:hover {
    background: var(--gray-200);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}
.btn-primary:hover {
    background: var(--color-primary-hover);
}
.btn-success {
    background: var(--color-success);
    color: white;
}
.btn-success:hover { opacity: 0.9; }
.btn-danger {
    background: var(--color-danger);
    color: white;
}
.btn-danger:hover { opacity: 0.9; }
.btn-warning {
    background: var(--color-warning);
    color: white;
}
.btn-warning:hover { opacity: 0.9; }
.btn-info {
    background: var(--color-info);
    color: white;
}
.btn-outline {
    background: transparent;
    box-shadow: 0 0 0 1px var(--gray-300);
    color: var(--gray-700);
}
.btn-outline:hover {
    box-shadow: 0 0 0 1px var(--color-primary);
    color: var(--color-primary);
}
.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}
.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
}

/* ============================================================
   通用组件：表格
   ============================================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead th {
    background: var(--gray-50);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
}
tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
}
tbody tr:hover td {
    background: var(--gray-50);
}

/* ============================================================
   通用组件：表单
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}
.form-control,
form input,
form select,
form textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus,
form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-subtle);
}
.form-control.error,
form input.error,
form textarea.error {
    border-color: var(--color-danger);
}
.form-control.error:focus {
    box-shadow: 0 0 0 3px var(--color-danger-light);
}
.form-control:disabled,
form input:disabled {
    background: var(--gray-100);
    color: var(--gray-400);
}

/* ============================================================
   通用组件：标签
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    white-space: nowrap;
}
.badge-success { background: var(--color-success-light); color: #065f46; }
.badge-danger { background: var(--color-danger-light); color: #991b1b; }
.badge-warning { background: var(--color-warning-light); color: #92400e; }
.badge-info { background: var(--color-info-light); color: #1e40af; }

/* ============================================================
   通用组件：提示
   ============================================================ */
.alert-success,
.alert-info,
.alert-warning,
.alert-danger,
.alert-error {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border-left: 4px solid;
}
.alert-success { background: var(--color-success-light); color: #065f46; border-color: var(--color-success); }
.alert-info { background: var(--color-info-light); color: #1e40af; border-color: var(--color-info); }
.alert-warning { background: var(--color-warning-light); color: #92400e; border-color: var(--color-warning); }
.alert-danger,
.alert-error { background: var(--color-danger-light); color: #991b1b; border-color: var(--color-danger); }

/* ============================================================
   通用组件：分页
   ============================================================ */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}
.pagination {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}
.pagination li a,
.pagination li span {
    display: block;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.9rem;
    background: white;
}
.pagination li.active span {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.pagination li a:hover {
    background: var(--gray-50);
}

/* ============================================================
   加载 / 模态框
   ============================================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-overlay .loading-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
}
.loading-spinner {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border: 4px solid var(--gray-200);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.custom-modal {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}
.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
}
.custom-modal-body { padding: 1.5rem; }
.custom-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
}

/* ============================================================
   骨架屏
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   Toast 通知
   ============================================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    color: white;
    animation: toast-in 0.3s ease;
    max-width: 360px;
}
.toast-success { background: var(--color-success); }
.toast-error { background: var(--color-danger); }
.toast-warning { background: var(--color-warning); color: var(--gray-900); }
@keyframes toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   下拉菜单
   ============================================================ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 100;
    padding: 0.5rem 0;
    border: 1px solid var(--gray-100);
    display: none;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background var(--transition-base);
}
.dropdown-item:hover { background: var(--gray-50); }

/* ============================================================
   网格系统工具
   ============================================================ */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.text-center { text-align: center; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.text-success { color: var(--color-success); }
.text-primary { color: var(--color-primary); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-muted { color: var(--gray-400); }


/* ============================================================
   快捷操作弹窗（shortcut-modal）
   ============================================================ */
.shortcut-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.shortcut-modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    text-align: left;
    box-shadow: var(--shadow-xl);
}

.shortcut-modal-content h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.shortcut-modal-content label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.shortcut-modal-content label:hover {
    color: var(--gray-900);
}

.shortcut-modal-content input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

/* ============================================================
   快捷操作网格（quick-actions-grid）
   ============================================================ */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
    .app-sidebar,
    .sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.mobile-open,
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .app-main,
    .main {
        margin-left: 0 !important;
    }
    .tab-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 1.4rem;
        cursor: pointer;
        color: var(--gray-600);
    }
}
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* ============================================================
   侧边栏菜单整齐优化（全站通用）
   ============================================================ */
.app-sidebar .nav-group {
    margin-bottom: 1rem;
}

.app-sidebar .nav-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    color: var(--gray-400);
    padding: 0.4rem 0.5rem 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    text-decoration: none;
    transition: all var(--transition-base);
}

.app-sidebar .nav-item span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar .nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.app-sidebar .nav-item.active {
    background: var(--color-primary-subtle);
    color: var(--color-primary);
    font-weight: 600;
}

/* 收起侧边栏时仅显示图标 */
.app-sidebar.collapsed .nav-item span:last-child,
.app-sidebar.collapsed .nav-group-title,
.app-sidebar.collapsed .sidebar-brand span {
    display: none;
}

.app-sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.5rem;
}

/* ===== 认证页面 ===== */

.auth-body {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: var(--font-sans, sans-serif);
    padding: 1rem;
    margin: 0;
}
.auth-box {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 480px;
}
.auth-title {
    text-align: center;
    color: #1f2937;
    margin-bottom: 0.3rem;
    font-size: 1.5rem;
}
.auth-sub {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}
.auth-label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}
.auth-input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}
.auth-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.auth-btn {
    width: 100%;
    padding: 0.75rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
}
.auth-btn:hover {
    background: #4338ca;
}
.auth-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}
.auth-link {
    text-align: center;
    margin-top: 1rem;
}
.auth-link a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
}
.auth-link a:hover {
    color: #4f46e5;
}
/* ===== 自定义模态框（报告用） ===== */
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.custom-modal-overlay .custom-modal {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}
.custom-modal-overlay .custom-modal .custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
}
.custom-modal-overlay .custom-modal .custom-modal-body {
    padding: 1.5rem;
}
.custom-modal-overlay .custom-modal .custom-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.2s;
}
.custom-modal-overlay .custom-modal .custom-modal-close:hover {
    color: var(--gray-700);
}