/**
 * 客户管理系统 (CRM) 全局样式表
 * Modern SaaS Admin Interface
 */

/* ============================================================
   1. CSS 变量与设计令牌 (Design Tokens)
   ============================================================ */
:root {
    --crm-primary: #2563eb;
    --crm-primary-hover: #1d4ed8;
    --crm-primary-light: #3b82f6;
    --crm-primary-subtle: #eff6ff;
    --crm-primary-border: #bfdbfe;

    --crm-sidebar-bg: #0f172a;
    --crm-sidebar-hover: rgba(255, 255, 255, 0.06);
    --crm-sidebar-active: #2563eb;
    --crm-sidebar-text: #94a3b8;
    --crm-sidebar-text-active: #ffffff;
    --crm-sidebar-border: rgba(255, 255, 255, 0.08);

    --crm-bg-app: #f8fafc;
    --crm-surface: #ffffff;
    --crm-border: #e2e8f0;
    --crm-border-light: #f1f5f9;

    --crm-text-heading: #0f172a;
    --crm-text-body: #334155;
    --crm-text-muted: #64748b;

    --crm-radius-sm: 6px;
    --crm-radius-md: 10px;
    --crm-radius-lg: 14px;
    --crm-radius-xl: 18px;

    --crm-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --crm-shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --crm-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --crm-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
}

/* ============================================================
   2. 全局重置与基础排版
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--crm-bg-app);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--crm-text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 统一轻量滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================================
   3. 布局骨架 (App Shell & Sidebar)
   ============================================================ */
.app-shell {
    display: flex;
    height: 100vh;
    min-height: 0;
    position: relative;
}

.sidebar {
    width: 236px;
    flex: 0 0 236px;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--crm-sidebar-bg);
    color: var(--crm-sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
    border-right: 1px solid var(--crm-sidebar-border);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #334155;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.sidebar-header {
    padding: 4px 8px 18px 8px;
    border-bottom: 1px solid var(--crm-sidebar-border);
    margin-bottom: 12px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: #ffffff !important;
    transition: opacity 0.15s ease;
}
.sidebar-brand:hover {
    opacity: 0.95;
}

.brand-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
    flex-shrink: 0;
}

.brand-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.brand-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    color: #93c5fd;
    letter-spacing: 0.5px;
}

/* 导航链接 */
.sidebar-nav .nav-link {
    color: var(--crm-sidebar-text);
    border-radius: var(--crm-radius-sm);
    padding: 9px 12px;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--crm-sidebar-hover);
    color: #ffffff;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.nav-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: currentColor;
    opacity: 0.85;
}

.sidebar-nav .nav-link.active .nav-icon-wrap {
    opacity: 1;
}

.nav-label {
    flex: 1;
    white-space: nowrap;
}

/* 一级目录折叠 */
.sidebar-nav .nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.sidebar-nav .nav-group-toggle.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-nav .nav-caret {
    font-size: 11px;
    opacity: 0.65;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav .nav-group-toggle[aria-expanded="true"] .nav-caret {
    transform: rotate(180deg);
}

/* 二级子菜单 */
.sidebar-nav .submenu {
    margin: 2px 0 8px 8px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav .submenu .nav-link {
    color: #94a3b8;
    font-size: 13.5px;
    padding: 7px 10px;
    margin-bottom: 2px;
    gap: 8px;
}

.sidebar-nav .submenu .nav-link:hover {
    background-color: var(--crm-sidebar-hover);
    color: #ffffff;
}

.sidebar-nav .submenu .nav-link.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}

.submenu-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.5;
    flex-shrink: 0;
}

.sidebar-nav .submenu .nav-link.active .submenu-dot {
    opacity: 1;
    background-color: #ffffff;
}

/* 移动端抽屉遮罩 */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1035;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* ============================================================
   4. 主体与顶栏 (Main & Topbar)
   ============================================================ */
.main {
    flex: 1;
    min-width: 0;
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    flex: 0 0 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--crm-border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 10;
}

.topbar-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--crm-text-heading);
    margin: 0;
    letter-spacing: -0.2px;
}

.btn-mobile-menu {
    padding: 4px 8px;
    color: var(--crm-text-muted);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-sm);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-mobile-menu:hover {
    background-color: var(--crm-bg-app);
    color: var(--crm-text-heading);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-capsule {
    padding: 3px 8px 3px 4px;
    border-radius: 9999px;
    background-color: var(--crm-bg-app);
    border: 1px solid var(--crm-border);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.user-name {
    font-size: 13px;
    color: var(--crm-text-heading);
    line-height: 1.2;
    max-width: 120px;
}

.user-dept {
    font-size: 11px;
    color: var(--crm-text-muted);
    line-height: 1.1;
}

.topbar-actions .btn-action {
    display: inline-flex;
    align-items: center;
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--crm-radius-sm);
    transition: all 0.15s ease;
}

/* 业务内容区域 */
.content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
}

/* ============================================================
   5. 通用卡片与面板 (Cards & Surfaces)
   ============================================================ */
.card {
    background-color: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-md);
    box-shadow: var(--crm-shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-header {
    background-color: var(--crm-surface);
    border-bottom: 1px solid var(--crm-border);
    padding: 14px 20px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--crm-text-heading);
    border-top-left-radius: var(--crm-radius-md) !important;
    border-top-right-radius: var(--crm-radius-md) !important;
}

.card-body {
    padding: 20px;
}

/* ============================================================
   6. 仪表盘统计卡片 (Dashboard Stat Cards)
   ============================================================ */
.section-accent {
    display: inline-block;
    width: 4px;
    height: 14px;
    border-radius: 2px;
}

.stat-card {
    border-radius: var(--crm-radius-md);
    border: 1px solid var(--crm-border);
    box-shadow: var(--crm-shadow-xs);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--crm-shadow-md);
    border-color: #cbd5e1;
}

.stat-card .card-body {
    padding: 18px 20px;
}

.stat-card .stat-label {
    color: var(--crm-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--crm-text-heading);
}

.currency-symbol {
    font-size: 17px;
    font-weight: 600;
    margin-right: 2px;
    opacity: 0.85;
}

.stat-card .stat-footnote {
    font-size: 11.5px;
    line-height: 1;
}

.stat-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-primary {
    background-color: #eff6ff;
    color: #2563eb;
}
.stat-icon-info {
    background-color: #f0fdfa;
    color: #0d9488;
}
.stat-icon-danger {
    background-color: #fef2f2;
    color: #dc2626;
}
.stat-icon-warning {
    background-color: #fffbeb;
    color: #d97706;
}
.stat-icon-teal {
    background-color: #f0fdf4;
    color: #16a34a;
}
.stat-icon-success {
    background-color: #ecfdf5;
    color: #059669;
}
.stat-icon-indigo {
    background-color: #eef2ff;
    color: #4f46e5;
}

.text-indigo {
    color: #4f46e5 !important;
}

/* ============================================================
   7. 表格与数据列表 (Tables & Lists)
   ============================================================ */
.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 12px 14px;
    border-bottom-color: var(--crm-border-light);
    vertical-align: middle;
    font-size: 13.5px;
}

.table thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--crm-border) !important;
    white-space: nowrap;
}

.table-hover tbody tr {
    transition: background-color 0.12s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc !important;
}

/* 我的客户高亮行优化：优雅浅蓝，取代刺眼深蓝 */
table.table tbody tr.table-primary {
    background-color: #eff6ff !important;
    border-left: 3px solid #3b82f6 !important;
}

table.table tbody tr.table-primary > * {
    background-color: #eff6ff !important;
    color: inherit !important;
}

table.table tbody tr.table-primary:hover > * {
    background-color: #e0f2fe !important;
}

/* ============================================================
   8. 徽章优化 (Pill Badges with Subtle Tones)
   ============================================================ */
.badge {
    border-radius: 9999px !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    padding: 3px 9px !important;
    letter-spacing: 0.2px;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
}

.badge.text-bg-primary {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

.badge.text-bg-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}

.badge.text-bg-success {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
    border-color: #a7f3d0 !important;
}

.badge.text-bg-danger {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
}

.badge.text-bg-warning {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    border-color: #fde68a !important;
}

.badge.text-bg-info {
    background-color: #f0fdfa !important;
    color: #0f766e !important;
    border-color: #99f6e4 !important;
}

.badge.text-bg-light {
    background-color: #f8fafc !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
}

/* ============================================================
   9. 按钮与交互控件 (Buttons)
   ============================================================ */
.btn {
    border-radius: var(--crm-radius-sm);
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-sm {
    padding: 5px 11px;
    font-size: 13px;
    border-radius: var(--crm-radius-sm);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #1e40af;
    border-color: #1e40af;
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.35);
}

.btn-outline-primary {
    border-color: #3b82f6;
    color: #2563eb;
    background-color: transparent;
}
.btn-outline-primary:hover {
    background-color: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
}

.btn-outline-secondary {
    border-color: #cbd5e1;
    color: #475569;
    background-color: #ffffff;
}
.btn-outline-secondary:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

.btn-outline-danger {
    border-color: #fca5a5;
    color: #dc2626;
    background-color: #ffffff;
}
.btn-outline-danger:hover {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
}

/* ============================================================
   10. 表单控件与筛选器 (Forms & Inputs)
   ============================================================ */
.form-label {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border-radius: var(--crm-radius-sm);
    border: 1px solid #cbd5e1;
    font-size: 13.5px;
    color: #1e293b;
    padding: 7px 11px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

.form-control-sm,
.form-select-sm {
    padding: 5px 9px;
    font-size: 13px;
    border-radius: var(--crm-radius-sm);
}

.input-group-text {
    border-radius: var(--crm-radius-sm);
    border-color: #cbd5e1;
}

/* ============================================================
   11. 分页控件 (Pagination)
   ============================================================ */
.pagination {
    gap: 4px;
}

.page-link {
    border-radius: var(--crm-radius-sm) !important;
    border: 1px solid var(--crm-border);
    color: #475569;
    font-size: 13px;
    padding: 6px 12px;
    margin: 0 !important;
    transition: all 0.15s ease;
}

.page-link:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.page-item.active .page-link {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.page-item.disabled .page-link {
    opacity: 0.45;
    background-color: transparent;
    border-color: #f1f5f9;
}

/* ============================================================
   12. 消息提示 (Alerts)
   ============================================================ */
.alert {
    border-radius: var(--crm-radius-sm);
    border: none;
    border-left: 4px solid;
    padding: 12px 16px;
    font-size: 13.5px;
    box-shadow: var(--crm-shadow-xs);
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-left-color: #f59e0b;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border-left-color: #3b82f6;
}

/* ============================================================
   13. 标签页与详情组件 (Tabs & Details)
   ============================================================ */
.card-header-tabs {
    margin-bottom: -15px;
    border-bottom: 1px solid var(--crm-border);
}

.card-header-tabs .nav-link {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: #64748b;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.card-header-tabs .nav-link:hover {
    color: #0f172a;
    border-bottom-color: #cbd5e1 !important;
}

.card-header-tabs .nav-link.active {
    color: #2563eb !important;
    border-bottom-color: #2563eb !important;
    background-color: transparent !important;
    font-weight: 600;
}

.tree-indent {
    color: #9ca3af;
    margin-right: 4px;
}

/* ============================================================
   14. 使用手册样式 (Documentation)
   ============================================================ */
.doc-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 36px 44px 56px;
    background: #ffffff;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    box-shadow: var(--crm-shadow-sm);
    line-height: 1.8;
}

.doc-page :is(h1, h2, h3, h4) {
    scroll-margin-top: 16px;
}

.doc-page h1 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 20px;
    color: var(--crm-text-heading);
}

.doc-page h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--crm-border);
    color: var(--crm-text-heading);
}

.doc-page h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 28px 0 12px;
    color: var(--crm-text-heading);
}

.doc-page h4 {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin: 22px 0 10px;
}

.doc-page p,
.doc-page li {
    font-size: 14px;
    color: var(--crm-text-body);
}

.doc-page hr {
    margin: 28px 0;
    border-color: var(--crm-border);
    opacity: 1;
}

.doc-page a {
    color: #2563eb;
    text-decoration: none;
}

.doc-page a:hover {
    text-decoration: underline;
}

.doc-page code {
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    color: #0f172a;
    font-size: 13px;
    word-break: break-word;
    border: 1px solid #e2e8f0;
}

.doc-page pre.doc-code {
    margin: 16px 0;
    padding: 16px 18px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--crm-radius-md);
    overflow-x: auto;
    line-height: 1.6;
    border: 1px solid #1e293b;
}

.doc-page pre.doc-code code {
    padding: 0;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 13px;
    white-space: pre;
}

.doc-page .doc-quote {
    margin: 16px 0;
    padding: 12px 18px;
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    border-radius: 0 var(--crm-radius-sm) var(--crm-radius-sm) 0;
    color: #475569;
}

.doc-page .doc-quote p {
    margin: 0;
}

.doc-page .doc-table {
    margin: 16px 0 24px;
    font-size: 13.5px;
}

.doc-page .doc-table > :not(caption) > * > * {
    padding: 9px 13px;
}

.doc-page .doc-table thead th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.doc-page .doc-list {
    margin-bottom: 16px;
    padding-left: 22px;
}

.doc-page .doc-list li {
    margin: 5px 0;
}

.doc-page .doc-file-ref {
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    color: #475569;
    font-size: 13px;
    border: 1px solid #e2e8f0;
}

/* ============================================================
   15. 登录页风格 (Login Page)
   ============================================================ */
.guest-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
                #f8fafc;
}

.guest-alert {
    width: 100%;
    max-width: 420px;
    margin-bottom: 16px;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card {
    border-radius: var(--crm-radius-xl) !important;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04) !important;
}

.login-brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px -2px rgba(37, 99, 235, 0.4);
}

.login-submit-btn {
    border-radius: var(--crm-radius-sm);
    letter-spacing: 0.5px;
    font-size: 15px;
}

/* ============================================================
   16. 响应式布局优化 (Responsive / Mobile)
   ============================================================ */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    body.sidebar-drawer-open {
        overflow: hidden;
    }

    .app-shell {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    /* 移动端侧边栏转为抽屉式滑动 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        flex: none;
        height: 100vh;
        overflow-y: auto;
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: 10px 0 25px rgba(0, 0, 0, 0.3);
    }

    .sidebar-backdrop.is-open {
        display: block;
        opacity: 1;
    }

    .main {
        height: auto;
        min-height: 100vh;
    }

    .topbar {
        position: sticky;
        top: 0;
        padding: 0 16px;
        flex-wrap: wrap;
        height: auto;
        min-height: 56px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .content {
        padding: 16px;
        overflow: visible;
    }

    .doc-page {
        padding: 24px 16px 36px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .doc-page h1 { font-size: 22px; }
    .doc-page h2 { font-size: 18px; }
}
