@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: light;
    --ink: #1d2b3b;
    --muted: #6c7b8d;
    --line: #e5eaf0;
    --paper: #fff;
    --canvas: #f5f7fb;
    --brand: #173b65;
    --accent: #c49b3b;
    --accent-strong: color-mix(in srgb, var(--accent) 72%, #000);
    --green: #177b65;
    --green-soft: #e7f4ef;
    --red: #c9554e;
    --red-soft: #fff0ed;
    --amber: #c0842e;
    --amber-soft: #fff5df;
    --shadow: 0 14px 44px rgba(25, 48, 60, .08);
    font-family: "DM Sans", "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.boot-screen img { border-radius: 14px; box-shadow: 0 8px 26px #0a52751c; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); background: #fff; }
.auth-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 38px clamp(36px, 6vw, 90px); color: #fff; background: radial-gradient(circle at 78% 13%, #c49b3b45, transparent 32%), linear-gradient(145deg, #102945, #173b65 58%, #285887); }
.auth-story:before, .auth-story:after { position: absolute; content: ""; border: 1px solid #ffffff15; border-radius: 50%; pointer-events: none; }
.auth-story:before { width: 560px; height: 560px; right: -240px; bottom: -235px; }
.auth-story:after { width: 390px; height: 390px; right: -155px; bottom: -151px; }
.brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font: 800 17px Manrope, sans-serif; letter-spacing: -.4px; }
.brand-mark-frame { width: 43px; height: 43px; display: grid; place-items: center; padding: 7px; border-radius: 15px; background: #ffffffeb; outline: 2px solid var(--accent); outline-offset: 1px; }
.brand-mark { width: 100%; height: 100%; object-fit: contain; }
.auth-copy { position: relative; z-index: 1; max-width: 510px; padding: 56px 0 70px; }
.eyebrow { margin: 0 0 13px; color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.auth-story .eyebrow { color: #e8cb7c; }
.auth-copy h1 { max-width: 470px; margin: 0; font: 800 clamp(34px, 4.4vw, 58px)/1.06 Manrope, sans-serif; letter-spacing: -2.3px; }
.auth-copy > p:not(.eyebrow) { max-width: 410px; margin: 20px 0 0; color: #e4f2fbd9; font-size: 16px; line-height: 1.7; }
.feature-points { display: grid; gap: 15px; margin: 35px 0 0; padding: 0; list-style: none; color: #f5fbff; font-size: 13px; }
.feature-points li { display: flex; align-items: center; gap: 12px; }
.feature-points span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 9px; background: #ffffff22; color: #bfe3ff; }
.auth-story-foot { position: relative; z-index: 1; color: #d5e9f5aa; font-size: 12px; text-decoration: none; }
.auth-story-foot:hover { text-decoration: underline; }
.auth-panel { display: grid; place-items: center; padding: 34px 24px; }
.auth-card { width: min(100%, 450px); }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; font: 800 18px Manrope, sans-serif; letter-spacing: -.4px; }
.auth-brand img { width: 44px; height: 44px; padding: 6px; border-radius: 13px; background: #f0f7fb; object-fit: contain; }
.auth-heading { margin-bottom: 25px; }
.auth-heading h2 { margin: 0; font: 800 27px Manrope, sans-serif; letter-spacing: -.7px; }
.auth-heading p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-switch { display: flex; gap: 4px; width: max-content; margin: 0 0 24px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #f5f8f8; }
.auth-switch button { min-width: 102px; padding: 9px 13px; border: 0; border-radius: 8px; background: transparent; color: #6d7b84; font-size: 12px; font-weight: 700; }
.auth-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px #17384418; }
.auth-form { display: grid; gap: 15px; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 19px 0; color: #95a1a8; font-size: 11px; }
.auth-divider:before, .auth-divider:after { height: 1px; flex: 1; background: var(--line); content: ""; }
.google-wrap { min-height: 44px; display: grid; place-items: center; }
.auth-note { margin: 20px 0 0; color: #87949b; font-size: 11px; line-height: 1.6; text-align: center; }
.auth-note a, .text-button { color: var(--brand); font-weight: 700; text-decoration: none; }
.auth-note a:hover, .text-button:hover { text-decoration: underline; }

.field { display: grid; gap: 7px; min-width: 0; }
.field label, .field-label { color: #53636c; font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea, .search-input, .date-input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #dfe7e9; border-radius: 10px; outline: 0; background: #fff; color: var(--ink); font-size: 13px; transition: border .15s, box-shadow .15s; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus, .date-input:focus { border-color: #73b8d8; box-shadow: 0 0 0 3px #3f9dba19; }
.field input[type="color"] { width: 52px; height: 38px; padding: 3px; }
.field input[type="checkbox"], input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); }
.field small { color: var(--muted); font-size: 11px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.field-grid .span-2 { grid-column: 1/-1; }
.form-error { padding: 10px 12px; border-radius: 9px; background: var(--red-soft); color: #a4423d; font-size: 12px; line-height: 1.5; }
.form-helper { color: var(--muted); font-size: 11px; line-height: 1.55; }
.inline-form { display: flex; align-items: end; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 13px; border: 1px solid transparent; border-radius: 9px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px #173b6526; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn.secondary { border-color: #dfe7e9; background: #fff; color: #53636c; }
.btn.secondary:hover { background: #f6f9fa; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.danger { background: var(--red); }
.btn.small { min-height: 31px; padding: 6px 9px; font-size: 11px; }
.btn.full { width: 100%; min-height: 44px; }
.text-button { padding: 0; border: 0; background: none; font-size: 11px; cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #62727b; font-size: 14px; }
.icon-btn:hover { background: #f1f7f8; }
.action-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 21px 15px 14px; border-right: 1px solid #e6ecee; background: #fff; z-index: 10; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 9px 18px; font: 800 14px Manrope, sans-serif; letter-spacing: -.25px; }
.sidebar-brand img { width: 34px; height: 34px; object-fit: contain; }
.business-select { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 0 0 18px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; text-align: left; }
.business-select:hover { border-color: #c8dce1; background: #f6fafb; }
.business-select .business-name { overflow: hidden; display: block; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.business-select .business-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.business-select .chevron { color: #92a1a7; }
.nav-section { margin: 8px 10px 7px; color: #a0acb1; font-size: 9px; font-weight: 800; letter-spacing: 1.05px; text-transform: uppercase; }
.nav-list { display: grid; gap: 3px; }
.nav-link { position: relative; width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 11px; border: 0; border-radius: 9px; background: transparent; color: #62717a; font-size: 12px; font-weight: 600; text-align: left; }
.nav-link:hover { background: #f5f8f8; color: #2b4149; }
.nav-link.active { background: color-mix(in srgb, var(--brand) 9%, white); color: var(--brand); font-weight: 700; }
.nav-icon { width: 19px; height: 19px; display: inline-grid; place-items: center; opacity: .9; }
.nav-icon svg, .icon-btn svg, .business-select .chevron svg, .feature-points svg { display: block; }
.icon-btn svg { width: 18px; height: 18px; }
.nav-badge { margin-left: auto; min-width: 19px; padding: 2px 5px; border-radius: 99px; background: var(--red-soft); color: #b24741; font-size: 9px; text-align: center; }
.sidebar-footer { display: grid; gap: 7px; margin-top: auto; padding-top: 13px; border-top: 1px solid #edf1f2; }
.profile-row { display: flex; align-items: center; gap: 10px; padding: 7px 5px; }
.avatar { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: color-mix(in srgb,var(--brand) 13%,white); color: var(--brand); font-size: 12px; font-weight: 800; }
.profile-info { overflow: hidden; min-width: 0; }
.profile-info strong, .profile-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-info strong { font-size: 11px; }
.profile-info span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 12px; min-height: 67px; padding: 0 clamp(18px, 3vw, 38px); border-bottom: 1px solid #e8eef0; background: #ffffffed; backdrop-filter: blur(12px); }
.mobile-brand { display: none; align-items: center; gap: 8px; font: 800 13px Manrope,sans-serif; }
.mobile-brand img { width: 29px; }
.topbar-title { min-width: 0; }
.topbar-title strong { display: block; font: 700 13px Manrope,sans-serif; }
.topbar-title span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.top-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.top-actions .avatar { border: 0; cursor: pointer; }
.main-content { max-width: 1440px; margin: 0 auto; padding: 28px clamp(18px, 3vw, 38px) 46px; }
.page-head { display: flex; align-items: flex-end; gap: 15px; margin-bottom: 21px; }
.page-head h1 { margin: 0; font: 800 25px Manrope,sans-serif; letter-spacing: -.85px; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.page-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.range-control { display: flex; align-items: center; gap: 8px; }
.range-control input { max-width: 140px; }
.mobile-nav-toggle { display: none; }
.impersonation-banner { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: #fff5df; color: #845c1f; font-size: 11px; }
.impersonation-banner button { margin-left: auto; }

.grid { display: grid; gap: 15px; }
.grid.metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.card { min-width: 0; border: 1px solid #e8eef0; border-radius: 14px; background: #fff; box-shadow: 0 3px 14px #24455408; }
.card.pad { padding: 17px; }
.metric-card { position: relative; min-height: 121px; padding: 16px 17px; overflow: hidden; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 10px; background: color-mix(in srgb,var(--brand) 10%,white); color: var(--brand); font-size: 14px; }
.metric-icon svg, .empty-icon svg, .product-thumb svg { width: 19px; height: 19px; }
.metric-value { margin-top: 13px; font: 800 clamp(18px,2vw,25px) Manrope,sans-serif; letter-spacing: -.8px; }
.metric-foot { margin-top: 4px; color: #91a0a6; font-size: 10px; }
.metric-card.green .metric-icon { background: var(--green-soft); color: var(--green); }
.metric-card.accent .metric-icon { background: color-mix(in srgb,var(--accent) 18%,white); color: var(--accent-strong); }
.metric-card.amber .metric-icon { background: var(--amber-soft); color: var(--amber); }
.metric-card.violet .metric-icon { background: #f1ecff; color: #765fba; }
.section-card { overflow: hidden; }
.section-title { display: flex; align-items: center; gap: 12px; padding: 15px 17px; border-bottom: 1px solid #edf1f2; }
.section-title h2 { margin: 0; font: 700 13px Manrope,sans-serif; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.section-title .section-action { margin-left: auto; }
.section-body { padding: 16px 17px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 10px 13px; background: #fafcfc; color: #829098; font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
td { padding: 12px 13px; border-top: 1px solid #edf1f2; color: #44535b; font-size: 11px; }
tr:hover td { background: #fcfefe; }
td strong { color: var(--ink); font-size: 11px; }
.table-empty { padding: 33px 18px; color: var(--muted); text-align: center; white-space: normal; }
.table-empty strong { display: block; margin-bottom: 5px; color: var(--ink); }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; background: #eef3f4; color: #65757d; font-size: 9px; font-weight: 700; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: #a27325; }
.pill.blue { background: #e9f4fb; color: #2879a7; }
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 12px 15px; border-bottom: 1px solid #edf1f2; }
.toolbar .search-input { width: min(260px,100%); }
.toolbar select, .toolbar input { min-height: 36px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 15px; border-top: 1px solid #edf1f2; color: var(--muted); font-size: 10px; }
.pagination .action-row { margin-left: auto; }
.chart { position: relative; height: 220px; padding: 15px 10px 4px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-gridline { stroke: #edf1f2; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: color-mix(in srgb,var(--brand) 9%, transparent); }
.chart-current-point { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.chart-labels { display: flex; justify-content: space-between; padding: 0 15px 14px; color: #94a0a6; font-size: 9px; }
.bar-list { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(90px,1fr) minmax(100px,2fr) auto; align-items: center; gap: 10px; font-size: 10px; }
.bar-label { overflow: hidden; color: #596971; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 7px; overflow: hidden; border-radius: 99px; background: #edf2f3; }
.bar-fill { height: 100%; min-width: 2px; border-radius: inherit; background: var(--brand); }
.stock-row, .notice-row, .list-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid #eef2f3; }
.stock-row:last-child, .notice-row:last-child, .list-row:last-child { border-bottom: 0; }
.stock-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--amber); }
.stock-dot.out { background: var(--red); }
.row-copy { flex: 1; min-width: 0; }
.row-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.row-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.notice-row.unread { background: #f5fafc; margin: 0 -13px; padding-right: 13px; padding-left: 13px; }
.notice-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--brand); }
.notice-dot.read { background: #d7e1e4; }
.date-inline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.date-inline input { max-width: 140px; }
.segmented { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfc; }
.segmented button { padding: 6px 10px; border: 0; border-radius: 7px; background: transparent; color: #72818a; font-size: 10px; font-weight: 700; }
.segmented button.active { background: #fff; color: var(--brand); box-shadow: 0 1px 4px #1d344014; }
.product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.product-tile { min-width: 0; padding: 12px; border: 1px solid #e8eef0; border-radius: 12px; background: #fff; text-align: left; transition: border .14s, transform .14s; }
.product-tile:hover { transform: translateY(-1px); border-color: #9fcdd8; }
.product-thumb { display: grid; place-items: center; height: 74px; margin-bottom: 9px; overflow: hidden; border-radius: 9px; background: #f4f8f8; color: #91a1a5; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-tile strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-tile small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(310px,.75fr); gap: 15px; align-items: start; }
.checkout-cart { position: sticky; top: 83px; }
.cart-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; padding: 11px 0; border-bottom: 1px solid #edf1f2; }
.cart-line strong { display: block; font-size: 11px; }
.cart-line small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.qty-control { display: flex; align-items: center; gap: 7px; }
.qty-control button { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #52626a; }
.cart-total { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: #6d7a82; font-size: 11px; }
.cart-total.grand { margin-top: 6px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 800; font-size: 14px; }
.empty-cart { padding: 27px 8px; color: var(--muted); font-size: 11px; text-align: center; }
.details-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 17px; }
.detail-box { padding: 11px; border-radius: 10px; background: #f7f9fa; }
.detail-box small { display: block; color: var(--muted); font-size: 9px; }
.detail-box strong { display: block; margin-top: 6px; font-size: 12px; }
.permission-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.permission-option { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: #596971; font-size: 10px; line-height: 1.45; }
.permission-option strong { display: block; color: var(--ink); font-size: 10px; }
.settings-tabs { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 15px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.settings-tabs button { padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: #72818a; font-size: 10px; font-weight: 700; white-space: nowrap; }
.settings-tabs button.active { background: color-mix(in srgb, var(--brand) 8%, white); color: var(--brand); }
.settings-row { display: grid; grid-template-columns: minmax(130px,1fr) minmax(180px,1.2fr); align-items: center; gap: 20px; padding: 13px 0; border-bottom: 1px solid #eff2f3; }
.settings-row:last-child { border-bottom: 0; }
.settings-row strong { display: block; font-size: 11px; }
.settings-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.accent-shade-preview { display: flex; align-items: center; gap: 8px; min-height: 36px; color: #56666f; font-size: 10px; font-weight: 700; }
.accent-shade-swatch { width: 22px; height: 22px; border: 1px solid #00000012; border-radius: 7px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; color: #617179; font-size: 10px; }
.notice-box { padding: 12px 14px; border: 1px solid #f3dfb6; border-radius: 10px; background: #fff9eb; color: #765824; font-size: 11px; line-height: 1.55; }
.notice-box.red { border-color: #f2d4d0; background: #fff5f3; color: #9d4641; }
.notice-box.green { border-color: #d6ece0; background: #f1faf5; color: #27674f; }
.subscription-card { position: relative; overflow: hidden; padding: 21px; }
.subscription-card.selected { border-color: color-mix(in srgb,var(--brand) 34%,white); box-shadow: 0 0 0 2px color-mix(in srgb,var(--brand) 10%,transparent); }
.subscription-card h3 { margin: 0; font: 700 14px Manrope,sans-serif; }
.subscription-price { margin: 13px 0 4px; font: 800 24px Manrope,sans-serif; }
.subscription-card small { color: var(--muted); font-size: 10px; }
.upload-preview { display: flex; align-items: center; gap: 12px; }
.upload-preview img { width: 54px; height: 54px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #f8fafb; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dialog-form { width: min(92vw,580px); max-height: min(84vh,760px); overflow: auto; padding: 22px; }
.app-dialog { width: min(92vw,620px); max-width: none; max-height: 90vh; padding: 0; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 24px 90px #132b3545; }
.app-dialog.wide { width: min(94vw,850px); }
.app-dialog::backdrop { background: #17292f6a; backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; gap: 15px; padding: 19px 21px; border-bottom: 1px solid #edf1f2; }
.dialog-head h2 { margin: 0; font: 700 15px Manrope,sans-serif; }
.dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.dialog-head .icon-btn { margin-left: auto; }
.dialog-body { max-height: calc(90vh - 145px); overflow-y: auto; padding: 19px 21px; }
.dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 21px; border-top: 1px solid #edf1f2; }
.dialog-foot .spacer { margin-right: auto; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; width: min(360px,calc(100vw - 32px)); }
.toast { padding: 12px 14px; border: 1px solid #d8e8e2; border-radius: 11px; background: #fff; box-shadow: var(--shadow); color: #315e4f; font-size: 12px; animation: toastIn .2s ease-out; }
.toast.error { border-color: #f2d6d1; color: #a3413b; }
@keyframes toastIn { from { opacity:0; transform:translateY(8px) } to { opacity:1; transform:none } }
.loader { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 190px; color: var(--muted); font-size: 12px; }
.spinner { width: 19px; height: 19px; border: 2px solid #dce9eb; border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.skeleton { height: 12px; border-radius: 6px; background: linear-gradient(90deg,#f0f4f5,#e4edef,#f0f4f5); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0 } }
.notice-center { max-width: 850px; }
.notice-center .notice-row { padding: 15px 16px; }
.privacy-link { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.content-stack { display: grid; gap: 15px; }
.report-kicker { display: flex; align-items: center; gap: 9px; color: #6f7d84; font-size: 10px; }
.report-kicker:before { width: 8px; height: 8px; border-radius: 50%; background: var(--green); content:""; }
.split-header { display: flex; align-items: center; gap: 12px; }
.split-header h2 { margin: 0; font: 700 13px Manrope,sans-serif; }
.split-header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #eef2f3; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.hstack { display: flex; align-items: center; gap: 9px; }
.vstack { display: grid; gap: 9px; }
.small-stat { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.small-stat small { display: block; color: var(--muted); font-size: 9px; }
.small-stat strong { display: block; margin-top: 7px; font: 700 16px Manrope,sans-serif; }
.empty-state { padding: 38px 18px; color: var(--muted); text-align: center; }
.empty-state .empty-icon { display: grid; place-items: center; width: 45px; height: 45px; margin: 0 auto 11px; border-radius: 15px; background: #eef5f5; color: var(--green); }
.empty-state strong { display: block; color: var(--ink); font-size: 12px; }
.empty-state p { margin: 6px 0 14px; font-size: 10px; line-height: 1.55; }
.overflow-menu { position: relative; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 218px minmax(0,1fr); }
    .grid.metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; top: 0; left: 0; width: 250px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 18px 0 55px #0c28321a; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 9; background: #1c303766; }
    .topbar { min-height: 59px; padding: 0 15px; }
    .mobile-nav-toggle { display: inline-grid; }
    .mobile-brand { display: flex; }
    .topbar-title { display: none; }
    .main-content { padding: 21px 15px 35px; }
    .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
    .page-head-actions { width: 100%; margin-left: 0; }
    .page-head-actions > .btn { flex: 1; }
    .range-control { width: 100%; }
    .range-control input { max-width: none; flex: 1; }
    .grid.two, .grid.three { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-cart { position: static; }
    .grid.metrics { gap: 9px; }
    .metric-card { min-height: 108px; padding: 13px; }
    .metric-value { font-size: 20px; }
    .section-title, .section-body { padding-right: 13px; padding-left: 13px; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-story { min-height: auto; padding: 20px 22px 22px; }
    .auth-copy { padding: 38px 0 12px; }
    .auth-copy h1 { font-size: 34px; letter-spacing: -1.5px; }
    .auth-copy > p:not(.eyebrow), .feature-points, .auth-story-foot { display: none; }
    .auth-panel { padding: 34px 20px; }
    .field-grid { grid-template-columns: 1fr; }
    .field-grid .span-2 { grid-column: auto; }
    .settings-row { grid-template-columns: 1fr; gap: 9px; }
    .toolbar { align-items: stretch; }
    .toolbar .search-input { flex: 1; width: auto; }
}
@media (max-width: 430px) {
    .grid.metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .details-grid { grid-template-columns: repeat(2,1fr); }
    .permission-list { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .page-head h1 { font-size: 22px; }
}
@media print {
    body { background: #fff; }
    .sidebar, .topbar, .page-head-actions, .toolbar, .pagination, .btn, .icon-btn, .toast-region, .impersonation-banner { display: none !important; }
    .app-shell { display: block; }
    .main-content { max-width: none; padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
    .grid { gap: 9px; }
    td, th { padding: 7px 8px; }
}
