/* ============================================================
   趋梦健康管理系统 · 全局样式
   ============================================================ */

:root {
    --primary: #1e7a5a;
    --primary-dark: #14543d;
    --primary-light: #e8f5ef;
    --accent: #c99a4b;
    --bg: #f2f6f3;
    --card: #ffffff;
    --text: #1f2d27;
    --muted: #6b7d75;
    --border: #e2ebe6;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16, 40, 30, .04), 0 6px 20px rgba(16, 40, 30, .03);
    --sidebar-w: 236px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
svg.ico { flex: none; }

/* ============ 布局 ============ */

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #12372b 0%, #0d2a21 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 40;
}

.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    padding: 24px 28px 34px;
    min-width: 0;
}

.app-footer {
    padding: 14px 28px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* ============ 侧边栏 ============ */

.brand {
    display: block;
    position: relative;
    z-index: 6;
    flex: 0 0 auto;
    padding: 14px 16px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(9, 32, 25, .1);
}

.brand .brand-logo {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.brand .brand-logo img { height: 46px; width: auto; max-width: 100%; }

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    overflow: hidden;
}

.brand-logo img { display: block; height: 34px; width: auto; max-width: 100%; }

.nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 12px 16px;
    scrollbar-width: thin;
}

.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 999px; }
.nav::-webkit-scrollbar-track { background: transparent; }

.nav-group-label {
    font-size: 11px;
    color: #74998a;
    letter-spacing: 1.5px;
    margin: 16px 10px 6px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #c2d6cd;
    font-size: 13.5px;
    margin-bottom: 2px;
    transition: background .15s ease, color .15s ease;
    position: relative;
}

.nav-item .ico { opacity: .8; }

.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.nav-item.active {
    background: rgba(76, 195, 150, .16);
    color: #fff;
    box-shadow: inset 3px 0 0 #4cc396;
}

.nav-item.active .ico { color: #6fe0ad; opacity: 1; }

.sidebar-foot {
    margin-top: auto;
    padding: 18px;
    font-size: 11px;
    color: #6c8e80;
}

.sidebar-mask { display: none; }

/* ============ 顶栏 ============ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.topbar-title {
    font-size: 19px;
    font-weight: 600;
    color: #1b2a23;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right { display: flex; align-items: center; gap: 16px; }

.topbar-date { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }

.user-chip { display: flex; align-items: center; gap: 8px; }

.avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex: none;
}

.user-meta { line-height: 1.25; }
.user-meta strong { display: block; font-size: 13px; font-weight: 600; }
.user-meta small { font-size: 11px; color: var(--muted); }

.logout-form { margin: 0; }

.icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .15s;
}

.icon-btn:hover { background: #f1f7f4; color: var(--primary); border-color: #cfe3d9; }

.menu-toggle { display: none; }

/* ============ 卡片与栅格 ============ */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card + .card, .card + .stat-grid, .card + .dash-grid, .dash-grid + .card { margin-top: 18px; }

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 12px; color: var(--muted); }
.card-body { padding: 20px; }
.card-body.no-pad { padding: 0; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 17px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: .3px; margin-top: 4px; line-height: 1.2; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat-foot .up { color: var(--primary); font-weight: 600; }
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.stat-icon.amber { background: #fdf4e4; color: #b47a1d; }
.stat-icon.blue { background: #eaf2fd; color: #2563a8; }
.stat-icon.purple { background: #f2ecfd; color: #6b46c1; }

.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }

/* ============ 表格 ============ */

.table-wrap { width: 100%; overflow-x: auto; }

table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

table.table thead th {
    background: #f7faf8;
    color: #5d7269;
    font-weight: 600;
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    font-size: 12.5px;
}

table.table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf3f0;
    vertical-align: middle;
}

table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background: #fafcfb; }
table.table .nowrap { white-space: nowrap; }
table.table .text-right { text-align: right; }
table.table .text-center { text-align: center; }
table.table .actions { white-space: nowrap; text-align: right; }
table.table .actions a, table.table .actions button { margin-left: 4px; }
table.table .empty-row td { text-align: center; color: var(--muted); padding: 36px 14px; }

.cell-main { font-weight: 500; }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.name-cell { display: flex; align-items: center; gap: 10px; }

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c8f6b, #15634a);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.avatar.lg { width: 56px; height: 56px; font-size: 22px; }

/* ============ 徽章 ============ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}

.badge-green { background: #e5f6ee; color: #0f7a4f; }
.badge-red { background: #fdeceb; color: #c0392b; }
.badge-orange { background: #fff3e0; color: #b26a00; }
.badge-blue { background: #eaf2fd; color: #2563a8; }
.badge-purple { background: #f2ecfd; color: #6b46c1; }
.badge-gray { background: #eef1f0; color: #5f6f68; }
.badge-gold { background: #fdf4e4; color: #a9711b; }

/* ============ 按钮 ============ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 15px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: .15s;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

.btn-outline { background: #fff; border-color: #d5e2db; color: #3a4a43; }
.btn-outline:hover { background: #f2f8f4; border-color: #bcd7ca; color: var(--primary); }

.btn-soft { background: var(--primary-light); color: var(--primary); }
.btn-soft:hover { background: #d9efe4; color: var(--primary-dark); }

.btn-danger { background: #fff; border-color: #f0c8c4; color: #c0392b; }
.btn-danger:hover { background: #fdf0ef; }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }

.btn-link { background: none; border: 0; color: var(--primary); font-size: 12.5px; cursor: pointer; padding: 4px 2px; }
.btn-link:hover { text-decoration: underline; }

/* ============ 工具栏 / 搜索 ============ */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.toolbar .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.search-box { position: relative; }
.search-box .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #96a8a0; pointer-events: none; }
.search-box input {
    width: 268px;
    padding: 9px 12px 9px 34px;
    border: 1px solid #d8e2dd;
    border-radius: 9px;
    font-size: 13px;
    background: #fff;
}
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 122, 90, .12); }

.filter-select, .filter-input {
    padding: 8px 11px;
    border: 1px solid #d8e2dd;
    border-radius: 9px;
    background: #fff;
    font-size: 13px;
    color: #33443c;
    min-width: 120px;
}
.filter-select:focus, .filter-input:focus { outline: none; border-color: var(--primary); }

/* ============ 表单 ============ */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }

.cms-editor-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.cms-cover { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: #56685f;
    margin-bottom: 6px;
}

.field label .req { color: #c0392b; margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.input, .select, .textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d8e2dd;
    border-radius: 9px;
    font-size: 13.5px;
    color: #24332b;
    background: #fff;
    transition: .15s;
}

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 122, 90, .12);
}

.input:disabled, .select:disabled { background: #f4f7f5; color: #93a39b; cursor: not-allowed; }

.textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
.textarea.sm { min-height: 64px; }

.form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #24332b;
    margin: 4px 0 14px;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
    line-height: 1.3;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.check-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #33443c; }
.check-line input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

.radio-group { display: flex; gap: 18px; flex-wrap: wrap; padding-top: 4px; }
.radio-group label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: #33443c; cursor: pointer; }
.radio-group input { accent-color: var(--primary); }

.inline-form { display: inline; }

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
    width: 44px; height: 24px; border-radius: 999px; background: #cfdcd6;
    position: relative; transition: .2s; flex: none;
}
.switch .track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(20px); }

/* ============ 提示条 ============ */

.alert {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13.5px;
    border: 1px solid transparent;
}

.alert-success { background: #e9f7f1; border-color: #c6ebd9; color: #0d6a45; }
.alert-error { background: #fdeeed; border-color: #f5cfcb; color: #b03a2e; }
.alert-warning { background: #fff8e8; border-color: #f2e0b4; color: #9a6a0b; }
.alert-info { background: #eaf2fd; border-color: #cfe0f7; color: #245a94; }

.notice {
    background: #fbf7ee;
    border: 1px solid #efe3c8;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 13px;
    color: #7a652e;
    display: flex;
    gap: 9px;
    align-items: flex-start;
    line-height: 1.6;
}

/* ============ 标签页 ============ */

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
    padding: 10px 16px;
    font-size: 13.5px;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.tab .count {
    background: #eef3f0; color: #5f6f68; border-radius: 999px;
    font-size: 11px; padding: 0 7px; font-weight: 500;
}
.tab.active .count { background: var(--primary-light); color: var(--primary); }

/* ============ 客户详情 ============ */

.profile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    padding: 22px;
}

.profile-main { flex: 1; min-width: 220px; }
.profile-name { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.profile-meta span { display: inline-flex; align-items: center; gap: 5px; }
.profile-side { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }
.info-item .lbl { font-size: 11.5px; color: var(--muted); display: block; margin-bottom: 2px; }
.info-item .val { font-size: 13.5px; color: #24332b; word-break: break-all; }

.stat-line { display: flex; flex-wrap: wrap; gap: 26px; }
.stat-line .item { min-width: 90px; }
.stat-line .item .lbl { font-size: 11.5px; color: var(--muted); }
.stat-line .item .val { font-size: 20px; font-weight: 700; color: var(--primary); }
.stat-line .item .val.dark { color: #24332b; }

/* ============ 空状态 ============ */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 44px 20px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}
.empty .ico { color: #b7c8c0; }

/* ============ 分页 ============ */

.pagination { display: flex; align-items: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 32px;
    padding: 6px 9px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: #fff;
    color: #4a5c53;
    font-size: 12.5px;
    text-align: center;
}
.pagination a:hover { border-color: #bcd7ca; color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-info { border: 0; background: transparent; color: var(--muted); margin-right: auto; padding-left: 0; }
.pagination .page-gap { border: 0; background: transparent; color: var(--muted); }

/* ============ 仪表盘专用 ============ */

.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fbfdfc;
    color: #33443c;
    font-size: 13px;
    transition: .15s;
}
.quick-link .q-ico {
    width: 34px; height: 34px; border-radius: 9px; background: var(--primary-light);
    color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none;
}
.quick-link:hover { border-color: #c3ddd1; background: #fff; color: var(--primary); transform: translateY(-1px); }
.quick-link small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }

.today-list { display: flex; flex-direction: column; }
.today-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed #e7efeb;
}
.today-item:last-child { border-bottom: 0; padding-bottom: 0; }
.today-item:first-child { padding-top: 0; }
.today-time { font-size: 12px; color: var(--muted); width: 62px; flex: none; }
.today-body { flex: 1; min-width: 0; }
.today-body strong { font-size: 13.5px; font-weight: 500; display: block; }
.today-body small { font-size: 12px; color: var(--muted); }

.mini-list { display: flex; flex-direction: column; }
.mini-list .row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 0; border-bottom: 1px dashed #e7efeb; font-size: 13px;
}
.mini-list .row:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-list .row:first-child { padding-top: 0; }
.mini-list .lbl { color: #4a5c53; min-width: 0; }
.mini-list .val { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ============ 图表条 ============ */

.chart-bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-label { width: 72px; flex: none; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 8px; background: #eef4f0; border-radius: 999px; overflow: hidden; min-width: 40px; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2c8f6b, #4cc396); }
.bar-value { width: 118px; flex: none; text-align: right; color: #33443c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-value small { font-size: 11px; }

/* ============ 文字辅助 ============ */

.text-muted { color: var(--muted); }
.text-danger { color: #c0392b; }
.text-success { color: var(--primary); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.nowrap { white-space: nowrap; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 0; }
.small { font-size: 12px; }

/* ============ 打印 ============ */

@media print {
    body { background: #fff; }
    .sidebar, .topbar, .app-footer, .toolbar, .no-print, .sidebar-mask { display: none !important; }
    .main { margin-left: 0; }
    .content { padding: 0; }
    .card { border: 0; box-shadow: none; }
    .print-only { display: block !important; }
}

/* ============ 登录页 ============ */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(900px 500px at 8% 12%, rgba(30, 122, 90, .20), transparent 60%),
        radial-gradient(700px 500px at 95% 90%, rgba(201, 154, 75, .14), transparent 55%),
        #eef4f0;
}

.login-wrap {
    width: 100%;
    max-width: 880px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(18, 55, 43, .18);
}

.login-brand {
    background: linear-gradient(160deg, #12372b 0%, #1e7a5a 100%);
    color: #fff;
    padding: 46px 42px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.login-brand::after {
    content: "";
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
    right: -120px; bottom: -130px;
}

.login-brand .brand-logo { width: 232px; padding: 14px 18px; border-radius: 13px; }
.login-brand .brand-logo img { height: auto; width: 100%; }
.login-brand .slogan { color: #b9d5c8; font-size: 13px; margin-top: 24px; letter-spacing: 2px; }

.login-features { margin-top: auto; padding-top: 36px; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.login-features .f { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #d5e8de; }
.login-features .f .ico { color: #6fe0ad; margin-top: 2px; }

.login-form { padding: 46px 42px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { font-size: 21px; color: #1b2a23; }
.login-form .sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; margin-bottom: 26px; }
.login-form .field { margin-bottom: 16px; }
.login-form .btn { margin-top: 8px; padding: 11px 15px; font-size: 14px; }
.login-foot { margin-top: 22px; font-size: 11.5px; color: #9aaba3; text-align: center; }

/* ============ 响应式 ============ */

@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; width: 252px; }
    body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
    body.sidebar-open .sidebar-mask {
        display: block; position: fixed; inset: 0; background: rgba(10, 25, 20, .42); z-index: 35;
    }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 0 16px; }
    .topbar-date { display: none; }
    .content { padding: 18px 16px 28px; }
    .form-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .app-footer { padding: 14px 16px; }
    .topbar-title { font-size: 17px; }
    .login-wrap { grid-template-columns: 1fr; max-width: 440px; }
    .login-brand { display: none; }
    .login-form { padding: 36px 28px; }
}

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .user-meta { display: none; }
    .quick-links { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar .filters { flex-direction: column; align-items: stretch; }
    .search-box input { width: 100%; }
    .filter-select, .filter-input { width: 100%; }
    .profile { padding: 18px; }
    .card-body { padding: 16px; }
    .tabs { margin: 0 -16px 16px; padding: 0 10px; }
}
