/* 千维顺 CRM — Brand Theme */
:root {
    --brand: #b3000c;
    --brand-dark: #8f0009;
    --brand-light: #fdf4f4;
    --brand-ring: rgba(179, 0, 12, 0.12);
    --brand-border: rgba(179, 0, 12, 0.16);

    --primary: var(--brand);
    --primary-dark: var(--brand-dark);
    --primary-light: var(--brand-light);
    --primary-hover: #fce8e8;
    --primary-ring: var(--brand-ring);
    --primary-muted: rgba(179, 0, 12, 0.06);

    --brand-red: var(--brand);
    --brand-red-dark: var(--brand-dark);
    --brand-red-light: var(--brand-light);
    --brand-red-muted: var(--primary-muted);
    --brand-red-ring: var(--brand-ring);
    --brand-red-border: var(--brand-border);

    --success: #15803d;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;

    --sidebar-width: 256px;
    --sidebar-padding-x: 16px;
    --sidebar-link-font-size: 14px;
    --sidebar-submenu-font-size: 13px;
    --sidebar-section-font-size: 12px;
    --sidebar-icon-size: 16px;

    --bg-main: #f4f5f7;
    --bg-card: #ffffff;
    --bg-subtle: #fafafa;
    --bg-hover: #f0f1f3;
    --bg-input: #ffffff;

    --text-primary: #1a1d21;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-caption: #9ca3af;
    --text-inverse: #ffffff;
    --text-placeholder: #adb5bd;

    --border-color: #e5e7eb;
    --border-light: #f0f1f3;
    --border-strong: #d1d5db;
    --line: var(--border-color);
    --panel: var(--bg-card);
    --accent: var(--brand);
    --active: var(--brand-light);
    --muted: var(--text-muted);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);

    --table-header-bg: #fafafa;
    --table-stripe: transparent;
    --table-hover: #f9fafb;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;

    --font-base: 14px;
    --font-display: 20px;
    --font-title: 15px;
    --font-body: 14px;
    --font-sm: 13px;
    --font-xs: 12px;
    --font-metric: 22px;

    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;

    --control-height: 36px;
    --control-height-sm: 32px;
    --control-font-size: var(--font-sm);
    --control-padding-x: 12px;
    --label-font-size: var(--font-sm);
    --hint-font-size: var(--font-xs);

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    --card-padding-x: 20px;
    --card-padding-y: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: var(--font-base);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: var(--font-body);
    font-weight: var(--weight-regular);
    line-height: 1.5715;
    color: var(--text-primary);
    background: var(--bg-main);
    -webkit-font-smoothing: antialiased;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    margin: 0;
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
}

h1 { font-size: var(--font-display); line-height: 1.35; }
h2 { font-size: var(--font-title); line-height: 1.45; }
h3 { font-size: var(--font-body); line-height: 1.5; }

/* ===== Layout ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.app-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 1000;
    overflow-y: auto;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg-main);
    min-width: 0;
}

.app-main-inner {
    padding: var(--space-6) var(--space-8) var(--space-8);
    width: 100%;
    box-sizing: border-box;
}

/* ===== Sidebar ===== */
.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px var(--sidebar-padding-x) 24px;
    text-decoration: none;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.sidebar-brand-text {
    font-size: var(--font-title);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.sidebar-nav {
    flex: 1;
    padding: 18px var(--sidebar-padding-x) 20px;
}

.sidebar-nav > .sidebar-link,
.sidebar-nav > .sidebar-toggle {
    margin: 5px 0;
    padding: 12px 14px;
    min-height: 44px;
}

.sidebar-nav .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: var(--sidebar-link-font-size);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-md);
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    line-height: 1.5;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.sidebar-nav .sidebar-link i.nav-icon {
    width: 20px;
    text-align: center;
    color: var(--text-caption);
    font-size: var(--sidebar-icon-size);
    flex-shrink: 0;
    transition: color 0.15s;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

.sidebar-nav .sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav .sidebar-link:hover i.nav-icon {
    color: var(--text-muted);
}

.sidebar-nav > a.sidebar-link.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
}

.sidebar-nav > a.sidebar-link.active i.nav-icon {
    color: var(--brand);
}

.sidebar-nav .sidebar-toggle.is-open {
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
    background: transparent;
}

.sidebar-nav .sidebar-toggle.is-open i.nav-icon {
    color: var(--text-muted);
}

.sidebar-nav .sidebar-link .chevron {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-caption);
    transition: transform 0.2s ease;
    padding-left: 8px;
}

.sidebar-nav .sidebar-link.is-open .chevron { transform: rotate(180deg); }

.sidebar-divider {
    height: 1px;
    margin: 12px 14px;
    background: var(--border-light);
}

.sidebar-section-label {
    padding: var(--space-3) var(--space-4) var(--space-2);
    font-size: var(--sidebar-section-font-size);
    font-weight: 500;
    color: var(--text-caption);
    letter-spacing: 0.02em;
}

.sidebar-submenu {
    margin: 6px 0 14px 22px;
    padding: 4px 0 4px 14px;
    border-left: 1px solid var(--border-light);
    display: none;
}

.sidebar-submenu.is-open { display: block; }

.sidebar-submenu .sidebar-link {
    padding: 9px 12px;
    min-height: 38px;
    margin: 3px 0;
    font-size: var(--sidebar-submenu-font-size);
    font-weight: var(--weight-regular);
    color: var(--text-muted);
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
}

.sidebar-submenu .sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-submenu .sidebar-link.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
    border-left-color: var(--brand);
    padding-left: 9px;
}

.sidebar-footer {
    padding: 24px var(--sidebar-padding-x) 32px;
    border-top: 1px solid var(--border-light);
    font-size: var(--font-xs);
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-top: auto;
}

.sidebar-footer .user-name {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
    color: var(--text-primary);
    font-weight: var(--weight-medium);
    font-size: var(--font-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer .logout-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--font-sm);
    transition: color 0.15s;
}

.sidebar-footer .logout-link:hover { color: var(--brand); }

/* ===== Mobile ===== */
.mobile-topbar {
    display: none;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-8)) var(--space-5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-topbar-title {
    font-size: var(--font-title);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

.mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
}

.mobile-nav-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1050;
}

.mobile-nav.show { display: block; }

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: min(280px, 85vw);
    height: 100dvh;
    background: var(--bg-card);
    transition: left 0.25s ease;
    z-index: 1051;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.mobile-nav.show .mobile-nav-drawer { left: 0; }

.mobile-nav-header {
    padding: var(--space-5);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mobile-nav-brand {
    color: var(--text-primary);
    margin: 0;
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-nav-brand img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
}

.mobile-nav-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.mobile-nav-body { padding: var(--space-2) 0; flex: 1; }

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 12px var(--space-5);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--sidebar-link-font-size);
    font-weight: 500;
}

.mobile-nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.mobile-nav-link.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: 600;
}

.mobile-nav-section-header {
    display: flex;
    align-items: center;
    padding: 12px var(--space-5);
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--sidebar-link-font-size);
}

.mobile-nav-submenu { background: transparent; display: none; }
.mobile-nav-submenu.is-open { display: block; }

.mobile-nav-submenu .mobile-nav-link {
    padding-left: 40px;
    font-size: var(--sidebar-submenu-font-size);
}

.mobile-nav-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-xs);
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-5);
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.page-header-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.page-mark {
    display: none;
}

.page-mark img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.page-header h1 {
    font-size: var(--font-display);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.page-header p {
    font-size: var(--font-sm);
    font-weight: var(--weight-regular);
    color: var(--text-muted);
    margin: 4px 0 0;
    line-height: 1.5715;
}

.page-header-actions,
.page-header .actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

h2 {
    font-size: var(--font-title);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-3);
    line-height: 1.45;
}

/* ===== Metrics / Stats ===== */
.metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.metrics article {
    padding: var(--space-4) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: border-color 0.15s;
}

.metrics article:hover {
    border-color: var(--border-strong);
}

.metrics span {
    display: block;
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: var(--weight-regular);
    line-height: 1.5;
}

.metrics strong {
    font-size: var(--font-metric);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ===== Panels ===== */
.panel,
.profile {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.panel {
    padding: var(--space-5);
    overflow-x: auto;
    margin-bottom: var(--space-4);
}

.panel:last-child { margin-bottom: 0; }

.panel > h2 {
    margin: 0 0 var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-light);
}

.app-card-body.profile {
    max-width: 640px;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 8px var(--card-padding-x) 20px;
}

.app-card-body.profile .field {
    padding: 16px 0;
}

.app-card-body.profile .field strong {
    text-align: right;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-light);
}

.section-heading h2 {
    margin: 0;
}

.section-gap { margin-top: var(--space-4); }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

/* ===== Filters & Toolbar ===== */
.filters,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    row-gap: 18px;
    margin-bottom: var(--space-4);
    align-items: flex-end;
    padding: 16px 18px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.filters .customer-picker label,
.filter-bar .customer-picker label {
    display: grid;
    gap: 8px;
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
}

.filter-field > label {
    display: block;
    margin: 0;
    line-height: 1.45;
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
}

.filters .customer-picker,
.filter-bar .customer-picker { width: 100%; min-width: 0; }

.filter-field {
    display: grid;
    gap: 10px;
    min-width: 180px;
    align-content: end;
}

.filter-field-grow,
.filter-field-picker {
    flex: 0 1 280px;
    width: min(280px, 100%);
    max-width: 280px;
    min-width: 0;
}

.filter-field > label:has(.customer-picker) {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    line-height: 1.45;
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
}

.filter-field .customer-picker {
    width: 100%;
    min-width: 0;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.filter-inline,
.app-card .filters,
.app-card .filter-bar {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.app-card-list .app-card-head {
    padding: 16px var(--card-padding-x);
}

.app-card-list .app-card-body-filters {
    padding: 18px var(--card-padding-x) 24px;
}

.app-card-list > .app-card-body.compact {
    padding-top: 0;
    border-top: 1px solid var(--border-light);
}

.app-card-list > .app-card-body.compact > .app-table-wrap {
    padding-top: 18px;
}

.app-card-list .filter-inline {
    row-gap: 18px;
}

.app-card-list .app-table th,
.app-card-list .app-table td {
    padding: 13px 16px;
}

.app-card-list .app-table th {
    padding-top: 14px;
    padding-bottom: 14px;
}

.app-pagination .summary {
    line-height: 1.6;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.summary {
    color: var(--text-muted);
    font-size: var(--font-xs);
    font-weight: var(--weight-regular);
}

.inline-filter {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    flex-wrap: wrap;
}

/* ===== Form Controls ===== */
input,
select,
button,
textarea {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font: inherit;
}

input,
select,
textarea { font-weight: 400; }

input,
select,
button {
    height: var(--control-height);
    padding: 0 var(--control-padding-x);
    font-size: var(--control-font-size);
}

input::placeholder { color: var(--text-placeholder); }

input:hover,
select:hover { border-color: var(--border-strong); }

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

textarea {
    width: 100%;
    padding: 8px var(--control-padding-x);
    min-height: 120px;
    resize: vertical;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--brand-red);
    color: var(--text-inverse);
    border-color: var(--brand-red);
    cursor: pointer;
    font-weight: var(--weight-medium);
    transition: background 0.15s, border-color 0.15s;
}

button.action-icon,
button.link-danger,
button.mobile-nav-toggle,
button.mobile-nav-close,
button.sidebar-link,
button.sidebar-toggle,
button.flash-close {
    gap: 0;
    background: transparent;
    border-color: transparent;
    color: inherit;
    font-weight: inherit;
}

button:hover:not(.action-icon):not(.link-danger):not(.mobile-nav-toggle):not(.mobile-nav-close):not(.sidebar-link):not(.sidebar-toggle):not(.flash-close) {
    background: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
}

button.action-icon:hover,
button.link-danger:hover,
button.sidebar-link:hover,
button.sidebar-toggle:hover,
button.flash-close:hover {
    background: transparent;
    border-color: transparent;
}

select.multi-select {
    height: auto;
    min-height: 92px;
    padding: 6px;
}

/* ===== Buttons ===== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: var(--control-height);
    padding: 0 16px;
    border-radius: var(--radius-md);
    font-size: var(--control-font-size);
    font-weight: var(--weight-medium);
    text-decoration: none;
    border: 1px solid var(--brand-red);
    background: var(--brand-red);
    color: var(--text-inverse);
    transition: background 0.15s, border-color 0.15s;
}

.button:hover {
    background: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
    color: var(--text-inverse);
}

.button.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.button.secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.button.secondary.danger {
    color: var(--danger);
    border-color: var(--danger-border);
    background: var(--danger-bg);
}

.button.secondary.danger:hover {
    color: #cf1322;
    border-color: #fca5a5;
    background: #fee2e2;
}

.actions,
.row-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

.row-actions form,
.actions form { margin: 0; }

.page-header-actions.actions,
.page-header .actions {
    gap: var(--space-2);
    flex-wrap: wrap;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.action-icon:hover {
    background: #f8fafc;
    color: var(--text-primary);
    border-color: var(--border-color);
    text-decoration: none;
}

a.action-icon:hover {
    color: var(--brand);
    background: var(--bg-hover);
    border-color: var(--border-color);
}

button.action-icon {
    font: inherit;
    font-size: 13px;
}

.action-icon-danger,
button.action-icon.action-icon-danger {
    color: var(--text-muted);
}

.action-icon-danger:hover,
button.action-icon.action-icon-danger:hover {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

.app-table td:last-child,
table td:has(.row-actions) {
    width: 1%;
    white-space: nowrap;
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: var(--font-body);
    margin-bottom: 0;
}

th,
td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

th {
    color: var(--text-secondary);
    font-weight: var(--weight-medium);
    font-size: var(--font-xs);
    letter-spacing: 0;
    text-transform: none;
    background: var(--table-header-bg);
    border-bottom: 1px solid var(--border-color);
}

td {
    font-weight: var(--weight-regular);
}

tbody tr:nth-child(even) { background: var(--table-stripe); }
tbody tr:hover td { background: var(--table-hover); }
tbody tr:last-child td { border-bottom: none; }

.table-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: var(--weight-medium);
    font-size: var(--font-body);
}

.table-link:hover {
    color: var(--brand);
    text-decoration: underline;
}

.status,
.app-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: var(--font-xs);
    font-weight: var(--weight-medium);
    line-height: 1.5;
    background: var(--success-bg);
    color: #389e0d;
}

.project-badge.is-success,
.app-badge.is-success,
.status.is-success {
    background: var(--success-bg);
    color: #389e0d;
}

.project-badge.is-muted,
.app-badge.is-muted,
.status.is-muted {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.project-badge.is-danger,
.app-badge.is-danger,
.status.is-danger {
    background: var(--danger-bg);
    color: #cf1322;
}

.project-badge.is-info,
.app-badge.is-info,
.status.is-info {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* ===== Detail & Forms ===== */
.field {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    gap: var(--space-3);
    font-size: var(--font-body);
}

.field span {
    font-size: var(--font-sm);
    font-weight: var(--weight-regular);
    color: var(--text-muted);
    flex-shrink: 0;
}

.field strong {
    font-size: var(--font-body);
    font-weight: var(--weight-medium);
    color: var(--text-primary);
    text-align: right;
}

.field:last-child { border-bottom: 0; }

.empty {
    padding: var(--space-8);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-sm);
    font-weight: var(--weight-regular);
}

.detail-list {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px 14px;
    margin: 0;
    font-size: var(--font-body);
}

.detail-list dt {
    color: var(--text-muted);
    font-size: var(--font-sm);
    font-weight: var(--weight-regular);
}

.detail-list dd {
    margin: 0;
    font-weight: var(--weight-regular);
    color: var(--text-primary);
}

.description {
    white-space: pre-wrap;
    line-height: 1.714;
    color: var(--text-primary);
    font-size: var(--font-body);
}

.form-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px 18px;
    max-width: 920px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.form-shell {
    display: grid;
    gap: var(--space-4);
    max-width: 960px;
    width: 100%;
}

.form-page {
    width: 100%;
    max-width: 960px;
}

.form-page .form-alert {
    max-width: 960px;
}

.form-section-head {
    padding: 14px var(--card-padding-x);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-subtle);
}

.form-section-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    padding: var(--card-padding-y) var(--card-padding-x);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-width: 0;
}

.form-field textarea {
    min-height: 140px;
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 1.5715;
    resize: vertical;
}

.field-hint {
    margin: 0;
    font-size: var(--font-xs);
    color: var(--text-muted);
    line-height: 1.5;
}

.form-address-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 20px;
    width: 100%;
}

select.multi-select {
    height: auto;
    min-height: 132px;
    padding: 8px 10px;
    line-height: 1.5715;
}

select.multi-select option {
    padding: 4px 2px;
}

.form-actions-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: 16px var(--card-padding-x);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    position: sticky;
    bottom: 16px;
    z-index: 20;
    margin-top: var(--space-1);
}

.form-actions-bar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -16px;
    height: 16px;
    background: linear-gradient(to bottom, transparent, rgba(244, 245, 247, 0.92));
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .form-shell,
    .form-page,
    .form-page .form-alert {
        max-width: none;
    }

    .form-section-body,
    .form-address-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .project-form-field.span-2,
    .form-field.span-2 {
        grid-column: auto;
    }

    .form-actions-bar {
        position: static;
        flex-direction: column;
        align-items: stretch;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .form-actions-bar::before {
        display: none;
    }

    .form-actions-bar .button,
    .form-actions-bar button {
        width: 100%;
        justify-content: center;
    }
}

.form-section-head h2 {
    margin: 0;
}

.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.form-panel label {
    display: grid;
    gap: 8px;
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    font-size: var(--font-sm);
    line-height: 1.5;
}

.form-field > label,
.form-field > span:first-child {
    display: block;
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    font-size: var(--font-sm);
    line-height: 1.5;
}

.form-field > label em,
.form-field > span:first-child em {
    margin-right: 4px;
}

.form-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.form-panel em,
.form-field em { color: var(--danger); font-style: normal; }
.form-panel small { color: var(--text-muted); font-weight: 400; }

.customer-picker { position: relative; }
.customer-picker-input,
.project-picker-input { width: 100%; }

.radio-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-height: var(--control-height);
}

.form-panel .radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: var(--weight-regular);
    color: var(--text-primary);
    font-size: var(--font-body);
}

.radio-row input { width: 16px; height: 16px; padding: 0; }

.check-row {
    display: flex;
    align-items: center;
    min-height: 28px;
}

.form-panel .check-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: var(--weight-regular);
    color: var(--text-primary);
    font-size: var(--font-body);
}

.check-row input { width: 16px; height: 16px; padding: 0; }

.inline-with-unit {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.inline-with-unit input { flex: 1; min-width: 0; }

.owner-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.owner-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--font-sm);
}

.span-2 { grid-column: 1 / -1; }

.form-actions {
    display: flex;
    gap: var(--space-2);
    padding-top: 4px;
}

/* ===== Alerts ===== */
.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: var(--space-4);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    font-weight: var(--weight-regular);
    line-height: 1.5715;
}

.form-alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

.form-alert-danger {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: #cf1322;
}

.alert {
    margin-bottom: var(--space-4);
    padding: 12px 14px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-md);
    color: #cf1322;
    font-size: var(--font-sm);
    line-height: 1.5;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: var(--space-4);
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    font-weight: var(--weight-regular);
    line-height: 1.5715;
    box-shadow: var(--shadow-sm);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.flash.is-dismissed {
    opacity: 0;
    transform: translateY(-4px);
}

.flash-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: #389e0d;
}

.flash-error {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: #cf1322;
}

.flash-warning,
.flash-info {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: #b45309;
}

.flash-close {
    margin-left: auto;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: inherit;
    opacity: 0.65;
    cursor: pointer;
}

.flash-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.04);
}

button.is-loading {
    opacity: 0.88;
    cursor: wait;
}

.table-loading td {
    text-align: center;
    color: var(--text-muted);
    padding: 28px 16px;
}

.notice {
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-md);
    color: #389e0d;
    font-size: var(--font-sm);
}

.danger,
.link-danger { color: var(--danger); }

.danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

.link-danger {
    height: auto;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: inherit;
    color: var(--danger);
}

.link-danger:hover {
    background: transparent;
    color: #dc2626;
}

/* ===== App Layout Utilities ===== */
.app-page,
.project-page {
    display: grid;
    gap: var(--space-4);
}

.app-card,
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.app-card-head,
.project-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 14px var(--card-padding-x);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-subtle);
}

.app-card-head h2,
.project-card-head h2,
.project-form-section h2 {
    margin: 0;
    font-size: var(--font-title);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    line-height: 1.45;
}

.app-card-meta,
.project-card-meta {
    margin: 4px 0 0;
    font-size: var(--font-xs);
    font-weight: var(--weight-regular);
    color: var(--text-muted);
    line-height: 1.5;
}

.app-card-body,
.project-card-body {
    padding: var(--card-padding-y) var(--card-padding-x);
}

.app-card-body.compact,
.project-card-body.compact {
    padding: 0;
}

.app-card-body.compact > .app-table-wrap,
.project-card-body.compact > .project-table-wrap {
    padding-left: var(--card-padding-x);
    padding-right: var(--card-padding-x);
}

.app-table-wrap,
.project-table-wrap {
    overflow-x: auto;
}

.app-table,
.project-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-body);
    white-space: nowrap;
}

.app-table th,
.app-table td,
.project-table th,
.project-table td {
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.app-table th,
.project-table th {
    background: var(--table-header-bg);
    color: var(--text-secondary);
    font-size: var(--font-xs);
    font-weight: var(--weight-medium);
    border-bottom: 1px solid var(--border-color);
}

.app-table td,
.project-table td {
    color: var(--text-primary);
    font-weight: var(--weight-regular);
}

.app-table tbody tr:hover td,
.project-table tbody tr:hover td {
    background: var(--table-hover);
}

.app-table tbody tr:last-child td,
.project-table tbody tr:last-child td {
    border-bottom: none;
}

.app-pagination,
.project-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 14px var(--card-padding-x);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.app-empty,
.project-empty {
    padding: 48px 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-sm);
    font-weight: var(--weight-regular);
    line-height: 1.5715;
}

.project-page-head,
.page-header {
    /* page-header already styled */
}

.project-page-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.project-page-mark {
    display: none;
}

.project-page-mark img,
.page-mark img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.project-form,
.form-shell {
    display: grid;
    gap: var(--space-4);
    max-width: 960px;
    width: 100%;
}

.project-form-section,
.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.project-form-section-head h2,
.form-section-head h2 {
    margin: 0;
}

.project-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    padding: var(--card-padding-y) var(--card-padding-x);
}

.project-form-field,
.form-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.project-form-field > label,
.project-form-field > span:first-child {
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-field > label,
.form-field > span:first-child {
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    line-height: 1.5;
}

.project-form-field.span-2,
.form-field.span-2 {
    grid-column: 1 / -1;
}

.project-form-field-picker > label,
.form-field-picker > label {
    display: grid;
    gap: 8px;
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
}

.project-form-field-picker .customer-picker-input,
.project-form-field-picker .project-picker-input,
.form-field-picker .customer-picker-input,
.form-field-picker .project-picker-input {
    width: 100%;
}

.project-form-actions,
.form-shell > .form-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-top: 4px;
}

.project-badge {
    /* alias of app-badge */
}

@media (max-width: 767.98px) {
    .project-form-grid {
        grid-template-columns: 1fr;
    }

    .project-form-field.span-2 {
        grid-column: auto;
    }
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.page-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: var(--control-height-sm);
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
    box-shadow: var(--shadow-xs);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.page-chip:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.page-chip.active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--text-inverse);
    font-weight: var(--weight-semibold);
}

.page-chip.disabled {
    color: var(--text-caption);
    background: var(--bg-card);
    border-color: var(--border-light);
    pointer-events: none;
    opacity: 0.55;
}

/* ===== Map ===== */
.map-layout {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 0.85fr);
    gap: var(--space-4);
    align-items: stretch;
}

.china-map {
    min-height: 360px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    overflow: hidden;
}

.china-map svg {
    width: 100%;
    height: 100%;
    min-height: 360px;
    display: block;
}

.map-shape {
    fill: #e8eaed;
    stroke: #c4c9d0;
    stroke-width: 1.5;
}

.map-shape.secondary {
    fill: #f0f1f3;
    stroke: #d1d5db;
    stroke-width: 1;
}

.map-point circle {
    fill: rgba(179, 0, 12, 0.1);
    stroke: var(--brand);
    stroke-width: 1.5;
}

.map-point text,
.map-point-label {
    text-anchor: middle;
    font-size: 9px;
    font-weight: 500;
    fill: var(--text-muted);
    paint-order: stroke;
    stroke: #fff;
    stroke-width: 1.5px;
    stroke-linejoin: round;
    pointer-events: none;
}

.location-rank { overflow-x: auto; }

/* ===== Auth ===== */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: var(--bg-main);
}

.auth-shell {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 36px 36px 32px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.auth-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
}

.auth-logo img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.auth-brand-copy h1 {
    margin: 0;
    font-size: var(--font-title);
    font-weight: var(--weight-semibold);
    letter-spacing: -0.01em;
    color: var(--text-primary);
    line-height: 1.35;
}

.auth-brand-copy p {
    margin: 4px 0 0;
    font-size: var(--font-sm);
    font-weight: var(--weight-regular);
    color: var(--text-secondary);
}

.auth-lead {
    margin: 0 0 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    font-size: var(--font-xs);
    font-weight: var(--weight-regular);
    line-height: 1.5715;
    color: var(--text-muted);
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-field label {
    display: block;
    margin-bottom: 8px;
    font-size: var(--label-font-size);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
}

.auth-input {
    position: relative;
}

.auth-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-caption);
    font-size: 14px;
    pointer-events: none;
}

.auth-input input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    color: var(--text-primary);
    font-size: var(--control-font-size);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input input:hover {
    border-color: var(--border-strong);
}

.auth-input input:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px var(--brand-red-ring);
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 42px;
    margin-top: 6px;
    border: 1px solid var(--brand-red);
    border-radius: var(--radius-md);
    background: var(--brand-red);
    color: #fff;
    font-size: var(--control-font-size);
    font-weight: var(--weight-medium);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn-login:hover {
    background: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
}

.btn-login:active {
    transform: translateY(1px);
}

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: 10px;
    color: #cf1322;
    font-size: var(--font-sm);
    line-height: 1.5;
}

.login-error i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ===== Scrollbar ===== */
.app-sidebar::-webkit-scrollbar,
.panel::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.app-sidebar::-webkit-scrollbar-thumb,
.panel::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 1199.98px) {
    .app-main-inner { padding: var(--space-5) var(--space-6) var(--space-6); }
    .metrics { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

@media (max-width: 767.98px) {
    .app-sidebar { display: none; }

    .app-main {
        margin-left: 0;
        width: 100%;
    }

    .app-main-inner {
        padding: var(--space-4);
        padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
    }

    .mobile-topbar { display: flex; }

    .page-header h1 { font-size: 18px; }

    .metrics { grid-template-columns: repeat(2, minmax(120px, 1fr)); }

    .form-panel,
    .form-section-body,
    .detail-grid,
    .map-layout { grid-template-columns: 1fr; }

    .panel { padding: var(--space-4); }

    th, td {
        padding: 8px 10px;
        font-size: var(--font-xs);
    }

    .action-icon {
        width: 36px;
        height: 36px;
    }
}

.button:focus-visible,
button:focus-visible:not(.flash-close),
.action-icon:focus-visible,
.page-chip:focus-visible,
.sidebar-link:focus-visible,
.sidebar-toggle:focus-visible,
.table-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-red-ring);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px var(--brand-red-ring);
}

@media (max-width: 479.98px) {
    .auth-page { padding: 20px 16px; }
    .auth-card { padding: 28px 22px 24px; border-radius: 16px; }
    .auth-brand { gap: 14px; }
    .auth-logo { width: 56px; height: 56px; border-radius: 14px; }
    .auth-logo img { width: 42px; height: 42px; }
    .auth-brand-copy h1 { font-size: var(--font-body); }
    .auth-lead { margin-bottom: 22px; padding-bottom: 20px; }
    .metrics { grid-template-columns: 1fr 1fr; }
}
