:root{
    --app-max-width: 1640px;
    --card-radius: 12px;
    --card-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.02);
    --card-shadow-hover: 0 4px 12px rgba(15,23,42,0.06), 0 2px 4px rgba(15,23,42,0.03);
    --muted: #6b7280;
    --text: #111827;
    --border: #e2e8f0;
    --bg-soft: #f7f9fc;
    --primary: #1890ff;
    --sidebar-bg: #f6f8fb;
    --sidebar-bg-soft: #f6f8fb;
    --sidebar-text: #5f6b7a;
    --sidebar-active-bg: #e8f3ff;
    --sidebar-active-text: #1677ff;
}
html { font-size: 14px; }
body {
    background: #f2f5f9;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", "Noto Sans SC", system-ui, -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
}
.navbar-custom { background-color: #fff; border-bottom: 1px solid var(--border); padding: 0.56rem 1rem; }
.brand-text { font-weight: 650; font-size: 1.12rem; letter-spacing: -0.01em; color: #0f172a; }
.brand-text i { color: #3b82f6; margin-right: 8px; }
.avatar-placeholder { width: 38px; height: 38px; background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #3b82f6; font-weight: 600; font-size: 1rem; flex-shrink: 0; box-shadow: 0 1px 3px rgba(59,130,246,0.12); }
.navbar-user-block { display: flex; align-items: center; gap: 0.5rem; padding: 0.32rem 0.62rem 0.32rem 0.32rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 40px; transition: background 0.2s, border-color 0.2s; }
.navbar-user-block:hover { background: #f1f5f9; border-color: #cbd5e1; }
.navbar-user-name { font-weight: 500; color: #1e293b; font-size: 0.84rem; letter-spacing: 0.01em; }
.topbar-search-wrap { position: relative; }
.topbar-search {
    width: 270px;
    height: 34px;
    background: #f6f8fc;
    border: 1px solid #e5ebf3;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    color: #9aa5b5;
    font-size: 0.8rem;
    gap: 8px;
}
.topbar-search input {
    border: 0;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.82rem;
    color: #334155;
}
.topbar-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1100;
    background: #fff;
    border: 1px solid #dbe5f3;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.1);
    max-height: 320px;
    overflow: auto;
    display: none;
}
.topbar-search-dropdown.show { display: block; }
.topbar-search-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
}
.topbar-search-item:last-child { border-bottom: 0; }
.topbar-search-item:hover { background: #f8fbff; }
.topbar-search-item .title { color: #1f2937; font-weight: 600; font-size: 0.82rem; }
.topbar-search-item .sub { color: #6b7280; font-size: 0.74rem; margin-top: 2px; }
.topbar-search-item .tag { color: #64748b; font-size: 0.72rem; background: #eef2ff; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.topbar-icon {
    width: 30px;
    height: 30px;
    border: 1px solid #e5ebf3;
    background: #f8fafd;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7f8a9b;
    font-size: 0.8rem;
}
.topbar-notify {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.topbar-notify-btn { cursor: pointer; }
.topbar-notify-dot {
    position: absolute;
    top: -2px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px #fff;
}
.topbar-notify-badge {
    position: absolute;
    top: -7px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px #fff;
}
.topbar-notify-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #e5ebf3;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15,23,42,0.12);
    z-index: 1200;
    display: none;
    overflow: hidden;
}
.topbar-notify:hover .topbar-notify-panel,
.topbar-notify:focus-within .topbar-notify-panel { display: block; }
.topbar-notify-head {
    padding: 8px 10px;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.78rem;
    color: #475569;
    background: #fbfdff;
    font-weight: 600;
}
.topbar-notify-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
}
.topbar-notify-item:last-child { border-bottom: 0; }
.topbar-notify-name { font-size: 0.82rem; color: #1f2937; font-weight: 600; }
.topbar-notify-sub { font-size: 0.74rem; color: #64748b; margin-top: 2px; }
.topbar-notify-action {
    white-space: nowrap;
    font-size: 0.72rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 3px 8px;
    text-decoration: none;
    color: #334155;
    background: #fff;
    align-self: center;
}
.topbar-notify-action:hover { background: #f8fafc; border-color: #9ca3af; color: #0f172a; }
.topbar-notify-foot {
    padding: 8px 10px;
    background: #fbfdff;
    border-top: 1px solid #edf2f7;
    text-align: right;
}
.topbar-notify-foot a { font-size: 0.75rem; color: #2563eb; text-decoration: none; }
.topbar-notify-foot a:hover { text-decoration: underline; }
.topbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #d6e5ff;
}
.stats-card { border: none; border-radius: var(--card-radius); box-shadow: var(--card-shadow); background: #fff; height: 100%; overflow: hidden; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s; }
.stats-card:hover { background: #ffffff; box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.table-modern > thead > tr > th {
    background: #f5f7fa;
    color: #111827;
    letter-spacing: 0.02em;
    font-weight: 600;
}
.table-modern > tbody > tr > td:first-child {
    color: #0f172a;
}
.table-modern > tbody > tr > td {
    font-variant-numeric: tabular-nums;
}
.card-header-clean { background: #f8fafc; border-bottom: 1px solid var(--border); font-weight: 600; padding: 0.82rem 0.95rem; font-size: 0.9rem; display: flex; align-items: center; gap: 0.6rem; letter-spacing: 0.01em; border-top-left-radius: var(--card-radius); border-top-right-radius: var(--card-radius); color: #475569; line-height: 1.5; }
.card-header-clean i { color: var(--primary); font-size: 1rem; width: 1.4rem; text-align: center; }
.stats-card > .table-responsive,
.stats-card > .p-0 > .table-responsive,
.stats-card > .p-3 > .table-responsive,
.stats-card > .p-4 > .table-responsive {
    border-bottom-left-radius: var(--card-radius);
    border-bottom-right-radius: var(--card-radius);
}
.progress.soft-progress { height: 10px; border-radius: 30px; background: #e9eef4; }
.progress-bar { background: #3b82f6; border-radius: 30px; }
.badge-soft-primary { background: #eff6ff; color: #2563eb; font-weight: 500; padding: 0.35rem 0.85rem; border-radius: 30px; font-size: 0.78rem; letter-spacing: 0.01em; }
.badge-success-soft { background: #e6f7e6; color: #0e7b32; }
.text-muted-extra { color: var(--muted); font-size: 0.9rem; letter-spacing: 0.01em; line-height: 1.5; }
.page-content { font-size: 0.95rem; line-height: 1.65; }
.page-content h2 { font-size: 1.85rem; letter-spacing: -0.02em; font-weight: 700; line-height: 1.3; }
.page-content h5 { letter-spacing: -0.01em; font-weight: 600; }
.reveal-on-scroll { opacity: 0; transform: translate3d(0, 18px, 0); will-change: transform, opacity; transition: opacity .55s ease, transform .65s cubic-bezier(.2,.8,.2,1); }
.reveal-in { opacity: 1; transform: translate3d(0, 0, 0); }
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll { opacity: 1 !important; transform: none !important; transition: none !important; }
    * { scroll-behavior: auto !important; transition: none !important; }
}
.btn-primary-soft { background: var(--primary); color: white; border: 1px solid var(--primary); border-radius: 12px; padding: 0.55rem 1.1rem; font-weight: 600; font-size: 0.88rem; letter-spacing: 0.01em; box-shadow: 0 4px 12px rgba(37,99,235,0.2); transition: all 0.2s ease; }
.btn-primary-soft:hover { background: #1d4ed8; border-color: #1d4ed8; color: white; box-shadow: 0 6px 16px rgba(37,99,235,0.28); transform: translateY(-1px); }
.btn-outline-light-special { border: 1px solid #d1d5db; border-radius: 12px; color: #475569; padding: 0.5rem 1rem; background: rgba(255,255,255,0.95); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.01em; transition: all 0.2s ease; }
.btn-outline-light-special:hover { background: #f1f5f9; border-color: #9ca3af; color: #1e293b; }

/* 全站基线：统一表单、表格、标题密度 */
h2, .h2 { font-size: 1.6rem; letter-spacing: -0.015em; font-weight: 700; line-height: 1.35; }
h3, .h3 { font-size: 1.35rem; letter-spacing: -0.01em; font-weight: 700; line-height: 1.4; }
h4, .h4 { font-size: 1.15rem; letter-spacing: -0.01em; font-weight: 650; line-height: 1.45; }
h5, .h5 { font-size: 1rem; letter-spacing: 0em; font-weight: 600; line-height: 1.5; }
h6, .h6 { font-size: 0.875rem; letter-spacing: 0.01em; font-weight: 600; line-height: 1.5; }
.form-label { font-size: 0.88rem; color: #475569; font-weight: 600; margin-bottom: 0.45rem; letter-spacing: 0.01em; }
.form-control, .form-select {
    min-height: 36px;
    border-color: #d8e1ec;
    border-radius: 8px;
    font-size: 0.88rem;
}
.form-control:focus, .form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.18rem rgba(24, 144, 255, 0.12);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #fafcff;
    --bs-table-hover-bg: #f8fafc;
    margin-bottom: 0;
}
.table > :not(caption) > * > * {
    padding: 0.58rem 0.75rem;
    font-size: 0.86rem;
    line-height: 1.55;
    letter-spacing: 0.01em;
    vertical-align: middle;
    border-bottom-color: #e6ebf2;
}
.table > thead > tr > th {
    font-size: 0.8rem;
    color: #334155;
    font-weight: 600;
    background: #f7f9fc;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.table.table-sm > :not(caption) > * > * {
    padding: 0.36rem 0.56rem;
    font-size: 0.82rem;
}

/* 全站业务页统一视觉（对齐源站风格） */
.list-filter,
.filter-bar {
    background: #fff;
    border: 1px solid #e7edf6;
    border-radius: 10px;
    padding: 10px 12px;
}
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #e7edf6;
    background: #f7f9fc;
}
.toolbar-actions { display: inline-flex; align-items: center; gap: 8px; }
.empty-hint { color: #94a3b8; line-height: 1.65; letter-spacing: 0.01em; font-size: 0.88rem; }

.fee-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid transparent;
    white-space: nowrap;
    letter-spacing: 0.01em;
    font-weight: 500;
}
.fee-type-badge.full {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}
.fee-type-badge.install {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.fee-type-badge.company {
    background: #faf5ff;
    border-color: #e9d5ff;
    color: #6b21a8;
}

.rules-table-wrap,
.um-table-wrap {
    border: 1px solid #e5e7eb;
    border-radius: var(--card-radius);
    background: #fff;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
.rules-table-wrap table,
.um-table-wrap table {
    width: 100%;
    margin: 0;
}
.rules-table-wrap thead th,
.um-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f9fc;
}

.settings-fold {
    border: 1px solid #e5e7eb;
    border-radius: var(--card-radius);
    background: #fff;
    margin-bottom: 14px;
}
.settings-fold > summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 16px;
    font-weight: 650;
    font-size: 0.92rem;
    color: #1e293b;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
    transition: background 0.2s ease;
}
.settings-fold > summary:hover {
    background: #f1f5f9;
}
.settings-fold > summary::-webkit-details-marker { display: none; }
.settings-fold .fold-body { padding: 12px; }
.save-loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.9); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.save-loading-content { text-align: center; color: #3b82f6; }
.save-loading-icon { font-size: 4rem; color: #3b82f6; animation: gradCapBounce 0.6s ease-in-out infinite alternate; }
@keyframes gradCapBounce { from { transform: translateY(0) scale(1); } to { transform: translateY(-8px) scale(1.05); } }

/* 左侧边栏（迁移源站 UI） */
.sidebar { width: 232px; flex-shrink: 0; background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-soft) 100%); border-right: 1px solid var(--border); padding: 0.9rem 0; box-shadow: none; }
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin-bottom: 0.25rem; }
.sidebar-nav a { display: flex; align-items: center; gap: 0.72rem; padding: 0.58rem 1rem; color: #334155; text-decoration: none; font-weight: 600; font-size: 0.93rem; letter-spacing: 0.01em; transition: background 0.15s, color 0.15s; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; margin-right: 10px; }
.sidebar-nav a:hover { background: #eef3f8; color: #2d3a4b; }
.sidebar-nav a.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); border-left-color: var(--primary); }
.sidebar-nav a i { width: 1.15rem; text-align: center; font-size: 0.9rem; color: inherit; opacity: 0.9; }
.sidebar-title { padding: 0 1rem 0.55rem; font-size: 0.82rem; font-weight: 700; color: #0f172a; text-transform: none; letter-spacing: 0.03em; display: flex; align-items: center; justify-content: space-between; }
.sidebar-subnav { display: block !important; max-height: none !important; overflow: visible !important; }

.sidebar-toggle { display: none; width: 44px; height: 44px; min-width: 44px; align-items: center; justify-content: center; background: #f1f5f9; border: none; border-radius: 12px; color: #475569; font-size: 1.2rem; transition: background 0.2s, color 0.2s; }
.sidebar-toggle:hover { background: #e2e8f0; color: #1e293b; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 1040; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

@media (min-width: 992px) { .sidebar-toggle { display: none !important; } }
/* ===== 页面过渡动画 ===== */
.page-enter {
    animation: page-fade-in .35s ease both;
}
.page-exit {
    animation: page-fade-out .2s ease both;
}
/* 默认隐藏内容，防止动画前闪一下 */
body > .container-fluid,
body > .container {
    opacity: 0;
}
body > .container-fluid.page-enter,
body > .container.page-enter {
    opacity: 1;
}
/* 导航栏和侧边栏：完全排除在过渡动画之外，防止闪烁 */
.app-topbar, .app-topbar .container-fluid,
.navbar, .navbar-custom,
.sidebar, #sidebar,
.sidebar-overlay {
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
}
/* 导航栏独立堆叠上下文，不受内容区动画影响 */
.app-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    isolation: isolate;
}
#sidebar {
    isolation: isolate;
}
@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes page-fade-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
    .page-enter, .page-exit { animation: none !important; }
}

/* ===== 登录成功小卡片弹窗（无遮罩） ===== */
.login-success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    background: #fff;
    border-radius: 14px;
    padding: 28px 40px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0,0,0,0.04);
    opacity: 0;
    animation: toast-in .35s cubic-bezier(.34,1.56,.64,1) forwards;
}
.login-success-toast.fade-out {
    animation: toast-out .35s ease forwards;
}
.login-success-toast .success-icon {
    font-size: 2.4rem;
    color: #10b981;
    margin-bottom: 10px;
    display: block;
    animation: success-bounce .5s ease .15s both;
}
.login-success-toast .success-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
}
.login-success-toast .success-sub {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 4px;
}
@keyframes toast-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
}
@keyframes success-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .login-success-toast,
    .login-success-toast.fade-out,
    .login-success-toast .success-icon {
        animation: none !important;
        opacity: 1 !important;
        transform: translate(-50%, -50%) !important;
    }
}

/* ===== 上次登录信息弹窗（右下角） ===== */
.last-login-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    background: #fff;
    border: 1px solid #e9edf3;
    border-radius: 12px;
    padding: 20px 24px;
    min-width: 360px;
    max-width: 400px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}
.last-login-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.last-login-toast.fade-out {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.3s ease;
}
.last-login-toast .toast-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f2f5;
}
.last-login-toast .toast-title i {
    color: #3b82f6;
    margin-right: 6px;
    font-size: 0.85rem;
}
.last-login-toast .toast-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
}
.last-login-toast .toast-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}
.last-login-toast .toast-row i {
    color: #3b82f6;
    width: 16px;
    text-align: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}
.last-login-toast .toast-row.span-full {
    grid-column: 1 / -1;
}
@media (prefers-reduced-motion: reduce) {
    .last-login-toast,
    .last-login-toast.fade-out {
        transition: none !important;
    }
}
@media (max-width: 480px) {
    .last-login-toast {
        right: 12px;
        bottom: 12px;
        left: 12px;
        min-width: auto;
        max-width: none;
    }
    .last-login-toast .toast-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .sidebar-toggle { display: flex; }
    .navbar-custom {
        padding: 0.5rem 0.75rem;
    }
    .brand-text {
        font-size: 0.98rem;
    }
    .btn-outline-light-special.btn-sm {
        padding: 0.4rem 0.75rem;
    }

    .sidebar {
        position: fixed;
        top: 58px;
        left: 10px;
        right: 10px;
        z-index: 1050;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        border: 1px solid #e5ebf3;
        border-radius: 12px;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
        padding: 0;
        background: #fff;
        transition: max-height 0.28s ease, visibility 0.2s, box-shadow 0.28s ease, opacity 0.2s ease;
        opacity: 0;
    }
    .sidebar.open {
        max-height: 78vh;
        overflow-y: auto;
        visibility: visible;
        opacity: 1;
        padding: 0.7rem 0.7rem 0.8rem;
    }
    .sidebar .sidebar-nav { flex-direction: column; }
    .sidebar .sidebar-nav li { margin-bottom: 0.25rem; }
    .sidebar .sidebar-title {
        font-size: 0.8rem;
        color: #64748b;
        padding: 0.45rem 0.55rem 0.5rem;
    }
    .sidebar .sidebar-title-btn {
        margin-right: 0;
        width: 100%;
        padding: 0.5rem 0.55rem;
        border: 1px solid #edf2f7;
        background: #f8fafc;
    }
    .sidebar .sidebar-subnav {
        background: #fff;
        border: 1px solid #eef2f7;
        border-radius: 10px;
        margin-top: 0.35rem;
        padding: 0.25rem 0.15rem;
    }
    .sidebar .sidebar-nav a {
        border-left-width: 0;
        border-radius: 8px;
        margin-right: 0;
        padding: 0.64rem 0.7rem;
        font-size: 0.9rem;
    }
    .sidebar .sidebar-nav a.active {
        border-left-color: transparent;
    }
}

/* ===== 移动端响应式适配 ===== */
@media (max-width: 767.98px) {
    /* 卡片单列显示 */
    .row.g-4 > .col-md-4,
    .row.g-4 > .col-lg-4,
    .row.g-4 > .col-lg-6,
    .row.g-4 > .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* 按钮变大，方便手机点击 */
    .btn-primary-soft {
        padding: 0.7rem 1.4rem;
        font-size: 0.95rem;
        min-height: 44px;
        border-radius: 12px;
    }
    .btn-outline-light-special {
        padding: 0.65rem 1.2rem;
        font-size: 0.92rem;
        min-height: 44px;
    }
    .btn-outline-light-special.btn-sm {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-height: 40px;
    }
    .btn-icon-circle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 0.9rem;
    }

    /* 表格可左右滑动 */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        border-radius: var(--card-radius);
        border: 1px solid #e5e7eb;
    }

    /* 字体大小适中 */
    html { font-size: 15px; }
    .page-content { font-size: 1rem; }
    .page-content h2 { font-size: 1.4rem; }
    h2, .h2 { font-size: 1.4rem; }
    h3, .h3 { font-size: 1.2rem; }

    /* 卡片头部紧凑 */
    .card-header-clean {
        padding: 0.7rem 0.85rem;
        font-size: 0.85rem;
    }

    /* 提醒项紧凑 */
    .reminder-item {
        padding: 10px 14px;
        gap: 8px;
    }

    /* 容器边距调整 */
    .container-fluid.px-3 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* 业绩拆分公式条 */
    .formula-bar {
        font-size: 0.78rem;
        padding: 10px 12px;
        gap: 6px;
    }

    /* 导航栏用户信息隐藏 */
    .navbar-user-name {
        display: none !important;
    }

    /* 退出按钮 */
    .btn-outline-light-special.btn-sm {
        padding: 0.5rem 0.8rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 575.98px) {
    html { font-size: 14px; }
    .container-fluid.px-3 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .row.g-4 {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 12px;
    }
    .topbar-search { display: none !important; }
}
