:root {
    --ms-bg: #f5f7fb;
    --ms-surface: #ffffff;
    --ms-surface-soft: #f8fafc;
    --ms-border: #e4e9f0;
    --ms-border-strong: #d7dee8;
    --ms-text: #101828;
    --ms-muted: #667085;
    --ms-muted-2: #98a2b3;
    --ms-primary: #2357d9;
    --ms-primary-hover: #1d49bc;
    --ms-primary-soft: #eef4ff;
    --ms-sidebar: #07152d;
    --ms-sidebar-2: #0a1c38;
    --ms-sidebar-text: #9fb0c8;
    --ms-success: #067647;
    --ms-success-bg: #ecfdf3;
    --ms-warning: #b54708;
    --ms-warning-bg: #fffaeb;
    --ms-danger: #b42318;
    --ms-danger-bg: #fef3f2;
    --ms-info: #175cd3;
    --ms-info-bg: #eff8ff;
    --ms-radius: 14px;
    --ms-radius-sm: 10px;
    --ms-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 30px rgba(16,24,40,.045);
    --ms-sidebar-width: 252px;
}

* { box-sizing: border-box; }
html { background: var(--ms-bg); }
body { margin: 0; min-height: 100vh; color: var(--ms-text); background: var(--ms-bg); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
svg { display: inline-block; width: 1em; height: 1em; max-width: 100%; vertical-align: -.125em; }
[hidden] { display: none !important; }

/* Shared primitives */
.eyebrow { color: #7b8ba1; font-size: 10px; font-weight: 800; letter-spacing: .115em; line-height: 1.2; text-transform: uppercase; }
.muted, .table-sub, .page-note { color: var(--ms-muted); }
.page-note { font-size: 12px; line-height: 1.6; }
.text-link { color: var(--ms-primary); font-size: 13px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 750; line-height: 1; text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease; }
.btn:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, .nav-group-toggle:focus-visible, .mobile-menu:focus-visible { outline: 3px solid rgba(35,87,217,.22); outline-offset: 2px; }
.btn-primary { color: #fff; background: var(--ms-primary); border-color: var(--ms-primary); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.btn-primary:hover { background: var(--ms-primary-hover); border-color: var(--ms-primary-hover); }
.btn-secondary { color: #344054; background: #fff; border-color: var(--ms-border-strong); }
.btn-secondary:hover { background: var(--ms-surface-soft); }
.btn-ghost { color: #475467; background: transparent; border-color: transparent; }
.btn-ghost:hover { background: #f2f4f7; color: #101828; }
.btn-danger { color: #fff; background: var(--ms-danger); border-color: var(--ms-danger); }
.btn-full { width: 100%; }

.panel { min-width: 0; border: 1px solid var(--ms-border); border-radius: var(--ms-radius); background: var(--ms-surface); box-shadow: 0 1px 2px rgba(16,24,40,.02); }
.panel-pad, .panel:not(.operations-panel):not(.attention-panel):not(.module-panel):not(.unavailable-panel) { padding: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-head h2, .panel-head h3 { margin: 4px 0 0; color: var(--ms-text); font-size: 18px; letter-spacing: -.025em; }
.panel-head p { max-width: 760px; margin: 6px 0 0; color: var(--ms-muted); font-size: 13px; line-height: 1.55; }

.badge, .status-badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: max-content; max-width: 100%; padding: 4px 8px; border: 1px solid #e4e7ec; border-radius: 999px; color: #475467; background: #f8fafc; font-size: 11px; font-weight: 750; line-height: 1.25; white-space: nowrap; }
.badge.success, .status-confirmed_vnpay, .status-confirmed_manual, .status-activated, .status-done, .status-accepted, .status-fulfilled { color: var(--ms-success); border-color: #abefc6; background: var(--ms-success-bg); }
.badge.warning, .status-review, .status-failed_attention, .status-waiting_existing_premium, .status-pending, .status-not_collected { color: var(--ms-warning); border-color: #fedf89; background: var(--ms-warning-bg); }
.badge.info, .status-queued, .status-processing { color: var(--ms-info); border-color: #b2ddff; background: var(--ms-info-bg); }
.status-failed, .status-cancelled { color: var(--ms-danger); border-color: #fecdca; background: var(--ms-danger-bg); }

.alert { padding: 12px 14px; border: 1px solid var(--ms-border); border-radius: 10px; background: #fff; color: #344054; font-size: 13px; line-height: 1.5; }
.alert-error { color: var(--ms-danger); border-color: #fecdca; background: var(--ms-danger-bg); }
.alert-success { color: var(--ms-success); border-color: #abefc6; background: var(--ms-success-bg); }

.field { display: grid; gap: 6px; color: #344054; font-size: 12px; font-weight: 700; }
.field > span { line-height: 1.35; }
.field input, .field select, .field textarea, input.ec-search { width: 100%; min-height: 42px; border: 1px solid var(--ms-border-strong); border-radius: 9px; outline: none; background: #fff; color: var(--ms-text); padding: 9px 11px; font-size: 13px; font-weight: 500; transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, input.ec-search:focus { border-color: #84adff; box-shadow: 0 0 0 3px rgba(35,87,217,.11); }
.field input::placeholder, .field textarea::placeholder { color: #98a2b3; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-stack { display: grid; gap: 14px; }

.table-wrap { width: 100%; overflow-x: auto; border-radius: 0 0 var(--ms-radius) var(--ms-radius); }
.table, .order-table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.table th, .table td, .order-table th, .order-table td { padding: 13px 14px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: middle; }
.table th, .order-table th { color: #667085; background: #fbfcfd; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr:last-child td, .order-table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover, .order-table tbody tr:hover { background: #fcfcfd; }
.table-primary { color: #101828; font-size: 13px; font-weight: 780; text-decoration: none; }
.table-primary:hover { color: var(--ms-primary); }
.table-sub { margin-top: 3px; font-size: 11px; line-height: 1.4; }
.money-cell { font-weight: 800; white-space: nowrap; }
.table-action { width: 1%; text-align: right !important; }
.icon-button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ms-border); border-radius: 8px; color: #475467; background: #fff; text-decoration: none; font-weight: 800; }
.icon-button:hover { color: var(--ms-primary); border-color: #c7d7fe; background: var(--ms-primary-soft); }

.empty-state { display: grid; place-items: center; padding: 54px 24px; text-align: center; }
.empty-state h2, .empty-state h3 { margin: 12px 0 4px; font-size: 17px; }
.empty-state p { max-width: 520px; margin: 0; color: var(--ms-muted); font-size: 13px; line-height: 1.55; }
.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--ms-border); border-radius: 12px; background: #f8fafc; color: #667085; font-weight: 800; }


.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0; }
.pagination-info { color: var(--ms-muted); font-size: 12px; }
.pagination-pages { display: inline-flex; align-items: center; gap: 5px; }
.pagination a, .pagination button, .pagination-page { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid var(--ms-border); border-radius: 8px; color: #475467; background: #fff; font-size: 12px; font-weight: 750; text-decoration: none; cursor: pointer; }
.pagination a:hover, .pagination button:hover, .pagination-page:hover { color: var(--ms-primary); border-color: #c7d7fe; background: var(--ms-primary-soft); }
.pagination .active, .pagination [aria-current="page"] { color: #fff; border-color: var(--ms-primary); background: var(--ms-primary); }
.pagination .disabled, .pagination [disabled] { opacity: .45; pointer-events: none; cursor: default; }

/* Admin Shell V2 */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: var(--ms-sidebar-width) minmax(0,1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--ms-sidebar-width); height: 100vh; display: flex; flex-direction: column; color: var(--ms-sidebar-text); background: linear-gradient(180deg,var(--ms-sidebar) 0%,#081a33 100%); border-right: 1px solid rgba(255,255,255,.055); box-shadow: 10px 0 30px rgba(7,21,45,.04); }
.sidebar-brand-wrap { height: 72px; flex: 0 0 72px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand { min-width: 0; display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: 0 0 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; background: linear-gradient(145deg,#3b6eea,#244fce); font-size: 16px; font-weight: 900; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 7px 22px rgba(23,71,177,.25); }
.brand-copy { min-width: 0; display: flex; flex-direction: column; }
.brand-copy strong { font-size: 15px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.brand-copy span { max-width: 160px; margin-top: 2px; color: #6f83a0; font-size: 8px; font-weight: 800; letter-spacing: .105em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-close { display: none; margin-left: auto; border: 0; color: #a9b8cc; background: transparent; font-size: 24px; cursor: pointer; }
.sidebar-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 14px 10px 20px; scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.25) transparent; }
.nav-group { margin: 0 0 9px; }
.nav-group-toggle, .nav-group-label { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 9px 9px 6px; border: 0; color: #607593; background: transparent; font-size: 9px; font-weight: 850; letter-spacing: .12em; text-align: left; text-transform: uppercase; cursor: pointer; }
.nav-group-toggle svg { width: 14px; height: 14px; stroke-width: 1.8; transition: transform .15s ease; }
.nav-group.collapsed .nav-group-toggle svg { transform: rotate(-90deg); }
.nav-group.collapsed .nav-group-items { display: none; }
.nav-group-items { display: grid; gap: 2px; }
.nav-item { position: relative; min-height: 39px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #91a4bf; text-decoration: none; font-size: 12.5px; font-weight: 650; transition: color .14s ease, background .14s ease; }
.nav-item:hover { color: #eef4ff; background: rgba(255,255,255,.045); }
.nav-item.active { color: #fff; background: rgba(56,103,222,.23); }
.nav-item.active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: #6d9cff; }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; display: inline-flex; align-items: center; justify-content: center; color: currentColor; }
.nav-icon svg { width: 17px; height: 17px; stroke-width: 1.75; }
.nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer { flex: 0 0 auto; padding: 14px; border-top: 1px solid rgba(255,255,255,.07); background: rgba(0,0,0,.07); }
.user-mini { min-width: 0; display: flex; align-items: center; gap: 9px; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; color: #dce9ff; background: #17355d; font-size: 12px; font-weight: 800; }
.user-mini-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.user-mini-copy strong, .user-mini-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-mini-copy strong { color: #e7edf6; font-size: 11px; }
.user-mini-copy span { margin-top: 2px; color: #6d819e; font-size: 9px; }
.logout-form { margin: 10px 0 0; }
.sidebar-logout { width: 100%; padding: 8px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; color: #90a2ba; background: rgba(255,255,255,.025); font-size: 10px; font-weight: 750; cursor: pointer; }
.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-overlay { display: none; }

.main { grid-column: 2; min-width: 0; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 35; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 28px; border-bottom: 1px solid var(--ms-border); background: rgba(255,255,255,.93); backdrop-filter: blur(14px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.mobile-menu { width: 38px; height: 38px; display: none; align-items: center; justify-content: center; border: 1px solid var(--ms-border); border-radius: 9px; color: #475467; background: #fff; cursor: pointer; }
.mobile-menu svg { width: 19px; height: 19px; stroke-width: 1.8; }
.breadcrumb { display: flex; align-items: center; gap: 7px; color: #98a2b3; font-size: 12px; }
.breadcrumb a { color: #667085; text-decoration: none; }
.breadcrumb strong { color: #344054; font-weight: 700; }
.topbar-store { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 8px; color: #475467; font-size: 11px; font-weight: 750; text-decoration: none; }
.topbar-store:hover { color: #101828; background: #f2f4f7; }
.topbar-store svg { width: 14px; height: 14px; stroke-width: 1.9; }
.content { width: min(100%, 1540px); margin: 0 auto; padding: 28px; }

/* Standard page chrome + compatibility for legacy V1 pages */
.page-heading, .hero-card, .page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 22px; padding: 0 0 22px; border-bottom: 1px solid var(--ms-border); background: transparent; }
.page-heading h1, .hero-card h2, .page-intro h2, .admin-page > h1 { margin: 5px 0 0; color: #101828; font-size: clamp(23px,2vw,30px); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.page-heading p, .hero-card p, .page-intro p, .admin-page > p { max-width: 760px; margin: 7px 0 0; color: var(--ms-muted); font-size: 13px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-badge { display: inline-flex; align-items: center; min-height: 36px; padding: 8px 11px; border: 1px solid #d9e3f8; border-radius: 9px; color: #315fae; background: #f4f7fd; font-size: 11px; font-weight: 800; white-space: nowrap; }
.admin-page > h1 { margin-top: 0; }
.admin-page > p { margin-bottom: 22px; }

/* Operational dashboard */
.dashboard-heading { align-items: end; }
.metric-grid { display: grid; grid-template-columns: 1.35fr repeat(4,minmax(150px,1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card { min-width: 0; min-height: 134px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border: 1px solid var(--ms-border); border-radius: 13px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.025); }
.metric-revenue { background: linear-gradient(145deg,#fff 0%,#f7f9ff 100%); border-color: #dbe4f7; }
.metric-attention { border-color: #fedf89; background: #fffcf5; }
.metric-label { color: #667085; font-size: 11px; font-weight: 750; }
.metric-value { margin: 10px 0; color: #101828; font-size: 28px; font-weight: 820; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.metric-value-money { display: flex; flex-direction: column; gap: 3px; font-size: 22px; }
.metric-value-money span + span { color: #667085; font-size: 15px; letter-spacing: -.02em; }
.metric-note { color: #98a2b3; font-size: 10px; line-height: 1.4; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(280px,.65fr); gap: 18px; align-items: start; }
.operations-panel, .attention-panel { overflow: hidden; }
.operations-panel .panel-head, .attention-panel .panel-head { margin: 0; padding: 18px 20px 14px; border-bottom: 1px solid var(--ms-border); }
.operational-table { min-width: 840px; }
.attention-list { display: grid; }
.attention-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border-bottom: 1px solid #edf0f4; text-decoration: none; }
.attention-row:hover { background: #fbfcfe; }
.attention-row span { min-width: 0; display: grid; gap: 3px; }
.attention-row strong { color: #344054; font-size: 12px; }
.attention-row small { color: #98a2b3; font-size: 10px; line-height: 1.4; }
.attention-row b { min-width: 28px; text-align: right; color: #101828; font-size: 16px; font-variant-numeric: tabular-nums; }
.panel-footnote { margin: 0; padding: 14px 20px 18px; color: #98a2b3; font-size: 10px; line-height: 1.55; }
.platform-strip { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 18px; padding: 12px 3px; color: #98a2b3; font-size: 10px; }
.platform-strip span:not(:last-child)::after { content: "·"; margin-left: 18px; }
.unavailable-panel { margin-top: 8px; }

/* Modules / legacy component compatibility */
.module-panel { overflow: hidden; }
.module-panel .panel-head { padding: 18px 20px 14px; margin: 0; border-bottom: 1px solid var(--ms-border); }
.module-cell { display: flex; align-items: center; gap: 10px; }
.module-logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #315fae; background: #eef4ff; font-size: 12px; font-weight: 850; }
.module-copy strong { font-size: 12px; }
.dependencies { display: flex; gap: 5px; flex-wrap: wrap; }
.dependency-pill { padding: 3px 7px; border-radius: 999px; color: #475467; background: #f2f4f7; font-size: 10px; }
code { padding: 2px 5px; border-radius: 5px; color: #344054; background: #f2f4f7; font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: 11px; }
.danger { color: var(--ms-danger) !important; }

/* Dropdown / modal / tabs / toast conventions for V2 pages */
.dropdown { position: relative; }
.dropdown-menu, [data-dropdown] { position: absolute; z-index: 80; top: calc(100% + 6px); right: 0; min-width: 190px; display: none; padding: 6px; border: 1px solid var(--ms-border); border-radius: 10px; background: #fff; box-shadow: 0 18px 48px rgba(16,24,40,.14); }
.dropdown-menu.open, [data-dropdown].open { display: grid; }
.dropdown-menu a, [data-dropdown] a { padding: 9px 10px; border-radius: 7px; color: #344054; font-size: 12px; text-decoration: none; }
.dropdown-menu a:hover, [data-dropdown] a:hover { background: #f5f7fa; }
.modal-open { overflow: hidden; }
.modal, [data-modal] { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(7,21,45,.55); }
.modal.open, [data-modal].open { display: grid; }
.modal-card { width: min(100%,560px); max-height: calc(100vh - 40px); overflow: auto; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(16,24,40,.28); }
.modal-head, .modal-body, .modal-foot { padding: 18px 20px; }
.modal-head { border-bottom: 1px solid var(--ms-border); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--ms-border); }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: #f2f4f7; }
.tab { padding: 8px 11px; border: 0; border-radius: 7px; color: #667085; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.tab.active { color: #101828; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.toast-region { position: fixed; z-index: 120; right: 18px; bottom: 18px; width: min(360px,calc(100vw - 36px)); display: grid; gap: 8px; }
.toast { padding: 13px 14px; border: 1px solid var(--ms-border); border-radius: 10px; background: #fff; box-shadow: 0 16px 40px rgba(16,24,40,.14); font-size: 12px; }

/* Authentication remains independent from application shell */
.auth-body { min-height: 100vh; background: #f6f8fb; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px,.9fr) minmax(520px,1.1fr); }
.auth-showcase { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 34px 44px; color: #c9d5e6; background: radial-gradient(circle at 15% 10%,rgba(52,91,180,.28),transparent 30%), linear-gradient(160deg,#07152d,#0a1d38 70%); }
.auth-brand, .auth-mobile-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.auth-brand-copy { display: flex; flex-direction: column; }
.auth-brand-copy strong { font-size: 16px; }
.auth-brand-copy span { color: #7185a2; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.auth-showcase-copy { max-width: 520px; margin: auto 0; }
.auth-showcase-copy h2 { margin: 12px 0 15px; color: #fff; font-size: clamp(38px,4vw,58px); letter-spacing: -.055em; line-height: .98; }
.auth-showcase-copy > p { max-width: 500px; color: #92a5bf; font-size: 14px; line-height: 1.7; }
.auth-points { display: grid; gap: 12px; margin-top: 30px; }
.auth-point { display: flex; align-items: center; gap: 11px; color: #b8c6d9; font-size: 12px; }
.auth-point-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(255,255,255,.045); }
.auth-point-icon svg { width: 16px; height: 16px; }
.auth-showcase-footer { display: flex; justify-content: space-between; gap: 20px; color: #617694; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.auth-workspace { min-height: 100vh; display: grid; place-items: center; padding: 34px; }
.auth-panel { width: min(100%,430px); }
.auth-mobile-brand { display: none; margin-bottom: 36px; color: #101828; font-weight: 800; }
.auth-kicker { color: var(--ms-primary); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.auth-title { margin: 9px 0 7px; font-size: 32px; letter-spacing: -.045em; }
.auth-subtitle { margin: 0; color: var(--ms-muted); font-size: 13px; line-height: 1.6; }
.auth-card { margin-top: 25px; padding: 24px; border: 1px solid var(--ms-border); border-radius: 14px; background: #fff; box-shadow: var(--ms-shadow); }
.setup-note { margin-top: 15px; color: var(--ms-muted); font-size: 11px; text-align: center; }
.setup-note a { color: var(--ms-primary); font-weight: 700; }
.auth-meta { margin-top: 16px; color: #98a2b3; font-size: 10px; text-align: center; }
.auth-security { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 22px; color: #98a2b3; font-size: 10px; }
.auth-security svg { width: 13px; height: 13px; }

@media (max-width: 1260px) {
    .metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .metric-revenue { grid-column: span 1; }
}
@media (max-width: 1080px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
    .admin-shell { grid-template-columns: 1fr; }
    .main { grid-column: 1; }
    .sidebar { transform: translateX(-101%); transition: transform .2s ease; box-shadow: 22px 0 60px rgba(7,21,45,.24); }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-close { display: block; }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 45; display: block; border: 0; opacity: 0; visibility: hidden; background: rgba(7,21,45,.44); transition: opacity .2s ease, visibility .2s ease; }
    .sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; }
    .mobile-menu { display: inline-flex; }
    .content { padding: 22px; }
}
@media (max-width: 760px) {
    .topbar { height: 58px; padding: 0 16px; }
    .breadcrumb strong { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .content { padding: 18px 14px 30px; }
    .page-heading, .hero-card, .page-intro { flex-direction: column; gap: 13px; padding-bottom: 18px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .metric-card { min-height: 124px; padding: 15px; }
    .field-grid { grid-template-columns: 1fr; }
    .auth-page { display: block; }
    .auth-showcase { display: none; }
    .auth-workspace { padding: 26px 18px; }
    .auth-mobile-brand { display: inline-flex; }
}
@media (max-width: 520px) {
    .metric-grid { grid-template-columns: 1fr; }
    .topbar-store { font-size: 0; }
    .topbar-store svg { width: 18px; height: 18px; }
    .platform-strip span:not(:last-child)::after { display: none; }
    .platform-strip { display: grid; gap: 5px; }
}

/* Commerce Admin V2 Stage 4 — production polish */
.s4-settings-page{display:grid;gap:18px}.s4-settings-form{display:grid;gap:18px}.s4-form-actions{display:flex;justify-content:flex-end;margin-top:18px}.s4-field-help{display:block;color:var(--ms-muted-2);font-size:11px;font-weight:500;line-height:1.45}.s4-settings-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.s4-settings-links a{display:grid;gap:5px;padding:16px 17px;border:1px solid var(--ms-border);border-radius:12px;background:#fff;text-decoration:none}.s4-settings-links a:hover{border-color:#c7d7fe;background:#fbfdff}.s4-settings-links strong{font-size:13px}.s4-settings-links span{color:var(--ms-muted);font-size:11px;line-height:1.45}.s4-system-settings{overflow:hidden}.s4-system-settings .panel-head{margin:0;padding:18px 20px;border-bottom:1px solid var(--ms-border)}.s4-setting-rows{display:grid}.s4-setting-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.65fr);gap:20px;padding:14px 20px;border-bottom:1px solid #edf0f4;align-items:start}.s4-setting-row:last-child{border-bottom:0}.s4-setting-row>div:first-child{display:grid;gap:5px}.s4-setting-row strong{font-size:12px}.s4-setting-row span{color:var(--ms-muted);font-size:11px;line-height:1.45}.s4-setting-row code{width:max-content;max-width:100%;overflow-wrap:anywhere}.s4-setting-value{display:grid;justify-items:end;gap:6px;text-align:right}.s4-setting-value small{color:var(--ms-muted-2);font-size:10px}.s4-two-col-admin{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr);gap:18px;align-items:start}.s4-health-list-admin{display:grid;gap:0}.s4-health-list-admin>div{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #edf0f4}.s4-health-list-admin>div:last-child{border-bottom:0}.s4-health-list-admin span{color:var(--ms-muted);font-size:11px}.s4-health-list-admin strong{text-align:right;font-size:12px;overflow-wrap:anywhere}.s4-top-gap{margin-top:16px}
.s4-checkbox{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border:1px solid var(--ms-border);border-radius:10px;background:#fbfcfe}.s4-checkbox input{margin:3px 0 0}.s4-checkbox span{display:grid;gap:3px}.s4-checkbox strong{font-size:12px}.s4-checkbox small{color:var(--ms-muted);font-size:10px;line-height:1.45}
@media(max-width:900px){.s4-settings-links{grid-template-columns:1fr}.s4-two-col-admin{grid-template-columns:1fr}.s4-setting-row{grid-template-columns:1fr}.s4-setting-value{justify-items:start;text-align:left}}
