:root {
  --primary: #6842df;
  --primary-dark: #4e2bc0;
  --primary-light: #f0ebff;
  --primary-soft: #f8f6ff;
  --background: #f7f7fb;
  --surface: #ffffff;
  --border: #dedee9;
  --text: #151429;
  --muted: #6f7184;
  --success: #0a9f57;
  --success-soft: #eafaf1;
  --warning: #e88a08;
  --warning-soft: #fff7e8;
  --danger: #df3c4c;
  --danger-soft: #fff0f2;
  --info: #2685d9;
  --radius-sm: 9px;
  --radius: 13px;
  --radius-lg: 18px;
  --shadow: 0 2px 10px rgb(30 25 70 / 5%);
  --shadow-float: 0 16px 42px rgb(38 28 84 / 18%);
  --input-height: 46px;
  --tap: 44px;
  --sidebar-width: 252px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--background); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid rgb(104 66 223 / 25%); outline-offset: 2px; }
[hidden] { display: none !important; }

.offline-banner { position: fixed; inset: 0 0 auto; z-index: 1000; padding: 9px 16px; color: #fff; background: #2b2a39; text-align: center; font-weight: 700; font-size: 12px; }
.offline-banner:not([hidden]) ~ .app-shell, .offline-banner:not([hidden]) ~ .auth-shell { padding-top: 34px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; color: var(--primary); flex: 0 0 42px; }
.brand-mark svg { width: 100%; height: 100%; }
.brand strong { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -.6px; }
.brand strong span { color: var(--primary); }
.brand small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.35; }

.guest-body { min-height: 100vh; background: radial-gradient(circle at 50% 0, #f6f2ff 0, #fff 42%, #faf9fd 100%); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-panel { width: min(100%, 390px); min-height: 680px; padding: 64px 30px 34px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 20px 60px rgb(35 27 73 / 8%); }
.brand--centered { justify-content: center; margin-bottom: 50px; text-align: left; }
.brand--centered .brand-mark { width: 56px; height: 56px; flex-basis: 56px; }
.brand--centered strong { font-size: 27px; }
.brand--centered small { text-align: center; font-size: 12px; }
.auth-heading { margin: 0 0 24px; text-align: center; }
.auth-heading h1 { margin: 0 0 7px; font-size: 20px; letter-spacing: -.35px; }
.auth-heading p { margin: 0; color: var(--muted); }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span:first-child { font-size: 12px; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; height: var(--input-height); padding: 0 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; outline: 0; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #a3a4b1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(104 66 223 / 10%); }
.field small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.field .field-error { color: var(--danger); font-size: 11px; }
.password-field { display: flex; align-items: center; position: relative; }
.password-field input { padding-right: 44px; }
.password-field button { position: absolute; right: 4px; width: 38px; height: 38px; border: 0; background: transparent; color: var(--muted); }
.button { min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 750; transition: transform .12s, box-shadow .12s, background .12s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button--primary { color: #fff; background: linear-gradient(115deg, var(--primary), #734ce7); box-shadow: 0 7px 16px rgb(104 66 223 / 18%); }
.button--primary:hover { background: linear-gradient(115deg, var(--primary-dark), var(--primary)); }
.button--outline { color: var(--primary); background: #fff; border-color: var(--primary); }
.button--block { width: 100%; }
.button--compact { min-height: 40px; padding: 0 15px; font-size: 12px; }
.auth-link { display: block; margin: 16px 0 0; color: var(--primary); text-align: center; font-size: 12px; font-weight: 700; }
.auth-divider { display: flex; align-items: center; gap: 13px; margin: 24px 0; font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.terms { margin: 22px auto 0; max-width: 280px; color: var(--muted); font-size: 9px; line-height: 1.55; text-align: center; }
.auth-switch { margin-top: 20px; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--primary); font-weight: 750; }
.alert { padding: 12px 14px; margin: 0 0 16px; border: 1px solid; border-radius: var(--radius-sm); font-size: 12px; line-height: 1.45; }
.alert--success { color: #087440; border-color: #9be0b9; background: var(--success-soft); }
.alert--danger { color: #b51f34; border-color: #f2bec5; background: var(--danger-soft); }
.alert--warning { color: #85530b; border-color: #f3d18f; background: var(--warning-soft); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 27px 20px 20px; background: var(--surface); border-right: 1px solid var(--border); }
.sidebar .brand { padding: 0 5px 26px; border-bottom: 1px solid var(--border); }
.sidebar .brand strong { font-size: 20px; }
.nav-label { margin: 25px 8px 10px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.side-nav { display: grid; gap: 5px; }
.side-nav a { min-height: 45px; display: flex; align-items: center; gap: 13px; padding: 0 12px; border-radius: 11px; font-weight: 600; }
.side-nav a > span { width: 23px; color: #2c2a3c; text-align: center; font-size: 21px; }
.side-nav a small { margin-left: auto; color: #a0a0ae; font-size: 9px; }
.side-nav a:hover { background: #faf9fd; }
.side-nav a.is-active { color: var(--primary); background: var(--primary-light); }
.side-nav a.is-active > span { color: var(--primary); }
.side-nav a.is-disabled { opacity: .6; cursor: default; }
.quick-button { min-height: 48px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-top: 24px; padding: 0 16px; color: var(--primary); background: #fff; border: 1px solid var(--border); border-radius: 12px; font-weight: 700; }
.quick-button b { width: 29px; height: 29px; display: grid; place-items: center; color: #fff; background: var(--primary); border-radius: 50%; font-size: 20px; font-weight: 400; }
.sidebar-user { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); min-width: 0; }
.sidebar-user > span:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--primary), #9b80ef); border-radius: 50%; font-weight: 800; }
.icon-button { width: var(--tap); height: var(--tap); display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; font-size: 18px; }
.icon-button:hover { background: var(--primary-soft); }
.main-content { width: calc(100% - var(--sidebar-width)); min-height: 100vh; margin-left: var(--sidebar-width); padding: 32px clamp(24px, 4vw, 58px) 60px; }
.main-content > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.page-header { min-height: 57px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-header h1 { margin: 0 0 5px; font-size: clamp(22px, 2.2vw, 29px); letter-spacing: -.65px; }
.page-header p { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-header .notification-button { position: relative; border: 1px solid var(--border); background: #fff; }
.notification-button b { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; color: #fff; background: var(--danger); border: 2px solid #fff; border-radius: 10px; font-size: 8px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 25px; }
.metric-card { min-height: 132px; position: relative; padding: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card--wide { grid-column: span 2; min-height: 150px; }
.metric-card > span { display: block; margin-bottom: 14px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.metric-card strong { display: block; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.6px; }
.metric-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
.metric-card .positive { color: var(--success); font-weight: 800; }
.sparkline { position: absolute; right: 18px; bottom: 18px; width: 47%; height: 55px; display: flex; align-items: end; gap: 4px; border-bottom: 1px solid #ded5ff; }
.sparkline i { flex: 1; background: linear-gradient(to top, #ddd3ff, var(--primary)); border-radius: 3px 3px 0 0; opacity: .85; }
.dashboard-section { margin-bottom: 25px; }
.section-heading { min-height: 25px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-heading h2 { margin: 0; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.section-heading span { color: var(--muted); font-size: 9px; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 13px; }
.shortcut-grid a { min-height: 105px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.shortcut-grid a b { width: 43px; height: 43px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border: 1px solid #dbd2fa; border-radius: 11px; font-size: 23px; font-weight: 450; }
.shortcut-grid a span { font-size: 11px; font-weight: 750; }
.shortcut-grid a small { color: var(--muted); font-size: 8px; }
.dashboard-columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 17px; }
.panel { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.alert-row { min-height: 38px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; margin-bottom: 7px; border-radius: 8px; font-size: 11px; }
.alert-row b { width: 17px; height: 17px; display: grid; place-items: center; color: #fff; border-radius: 50%; font-size: 10px; }
.alert-row span { flex: 1; }
.alert-row i { font-style: normal; font-size: 18px; }
.alert-row--danger { color: #9f2534; background: var(--danger-soft); }
.alert-row--danger b { background: var(--danger); }
.alert-row--warning { color: #85530b; background: var(--warning-soft); }
.alert-row--warning b { background: var(--warning); }
.empty-inline { min-height: 80px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--success); }
.empty-inline > b { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--success); border-radius: 50%; }
.empty-inline span strong, .empty-inline span small { display: block; }
.empty-inline span small { color: var(--muted); margin-top: 3px; }
.performance-value span, .performance-value small { display: block; color: var(--muted); font-size: 10px; }
.performance-value strong { display: block; margin: 7px 0; font-size: 25px; }
.finance-equation { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 18px; padding: 10px; color: var(--muted); background: #faf9fd; border-radius: 8px; font-size: 8px; }
.finance-equation i { font-style: normal; }
.finance-equation b { color: var(--primary); }
.finance-equation strong { color: var(--success); }

.search-bar { display: flex; gap: 10px; margin-bottom: 13px; }
.search-bar label { height: 44px; flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.search-bar label span { color: var(--muted); font-size: 18px; }
.search-bar input { width: 100%; min-width: 0; border: 0; outline: 0; }
.filter-chips { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.filter-chips a { min-height: 34px; display: inline-flex; align-items: center; padding: 0 14px; white-space: nowrap; color: #626276; background: #fff; border: 1px solid var(--border); border-radius: 18px; font-size: 11px; font-weight: 650; }
.filter-chips a.is-active { color: #fff; background: var(--primary); border-color: var(--primary); }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.product-card { min-width: 0; position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 13px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.product-card:hover { border-color: #c9bdf3; transform: translateY(-2px); }
.product-thumb { height: 132px; display: grid; place-items: center; overflow: hidden; color: var(--primary); background: linear-gradient(145deg, #eee9e1, #d9d0c7); border-radius: 9px; font-size: 34px; font-weight: 800; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { min-width: 0; padding: 4px 5px 4px 0; }
.product-title { display: flex; justify-content: space-between; gap: 8px; }
.product-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-title i { font-size: 19px; line-height: .7; font-style: normal; }
.product-info > small { display: block; margin: 5px 0 10px; color: var(--muted); font-size: 9px; }
.product-info dl { display: grid; gap: 3px; margin: 0; }
.product-info dl div { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; }
.product-info dt { color: var(--muted); }
.product-info dd { margin: 0; font-weight: 700; }
.margin-label { display: block; margin-top: 8px; color: var(--success); font-size: 10px; font-weight: 700; }
.stock-warning { position: absolute; left: 10px; bottom: 10px; min-width: 112px; padding: 5px; color: #9a5c05; background: rgb(255 247 232 / 92%); border-radius: 0 0 8px 8px; text-align: center; font-size: 8px; font-weight: 700; }
.empty-state { max-width: 540px !important; min-height: 370px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px; text-align: center; background: #fff; border: 1px dashed #cfcfe0; border-radius: var(--radius-lg); }
.empty-icon { width: 68px; height: 68px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 22px; font-size: 38px; }
.empty-state h2 { margin: 18px 0 7px; font-size: 18px; }
.empty-state p { max-width: 340px; margin: 0 0 22px; color: var(--muted); line-height: 1.55; }

.page-header--form { justify-content: flex-start; align-items: center; max-width: 780px !important; }
.page-header--form > form, .page-header--form > .header-actions { margin-left: auto; }
.header-actions { display: flex; align-items: center; gap: 3px; }
.header-actions form { margin: 0; }
.back-link { width: var(--tap); height: var(--tap); flex: 0 0 var(--tap); display: grid; place-items: center; border-radius: 10px; font-size: 20px; }
.back-link:hover { background: var(--primary-soft); }
.wizard { max-width: 780px !important; padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.wizard-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 0 27px; padding: 0; list-style: none; }
.wizard-steps li { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; color: #a0a1af; font-size: 11px; }
.wizard-steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(50% + 48px); right: calc(-50% + 48px); height: 1px; background: var(--border); }
.wizard-steps li b { width: 23px; height: 23px; display: grid; place-items: center; color: #fff; background: #b9bac5; border-radius: 50%; font-size: 10px; }
.wizard-steps li.is-active { color: var(--text); font-weight: 750; }
.wizard-steps li.is-active b, .wizard-steps li.is-complete b { background: var(--primary); }
.wizard-panel { display: none; }
.wizard-panel.is-active { display: block; animation: fade-in .18s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }
.upload-box { min-height: 152px; display: grid; place-items: center; margin-bottom: 20px; overflow: hidden; border: 1px dashed #bfc0cf; border-radius: 10px; cursor: pointer; }
.upload-box input { position: absolute; opacity: 0; pointer-events: none; }
.upload-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--primary); text-align: center; }
.upload-preview b { font-size: 30px; font-weight: 400; }
.upload-preview strong { font-size: 12px; }
.upload-preview small { color: var(--muted); font-size: 9px; }
.upload-preview.has-image { width: 100%; height: 190px; }
.upload-preview.has-image img { width: 100%; height: 100%; object-fit: cover; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field--wide { grid-column: 1 / -1; }
.input-affix, .money-input { position: relative; display: flex; align-items: center; }
.input-affix input { padding-right: 48px; }
.input-affix i { position: absolute; right: 13px; color: var(--muted); font-size: 11px; font-style: normal; }
.money-input input { padding-left: 41px; text-align: right; }
.money-input i { position: absolute; left: 13px; color: var(--muted); font-size: 11px; font-style: normal; }
.wizard-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 25px; }
.wizard-actions .button { min-width: 155px; }
.cost-summary, .price-summary { margin-top: 22px; padding: 14px; background: #fbfaff; border: 1px solid #e6e0fb; border-radius: 10px; }
.cost-summary > div, .price-summary > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 11px; }
.cost-total { margin: 8px -5px -5px; padding: 13px 8px !important; color: var(--primary); background: #f2edff; border-radius: 8px; text-transform: uppercase; }
.cost-total strong { font-size: 17px; }
.real-cost-card, .promotion-result { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-bottom: 20px; color: var(--primary); background: #f7f4ff; border: 1px solid #d8cdfa; border-radius: 10px; }
.real-cost-card span { font-size: 12px; }
.real-cost-card strong { font-size: 20px; }
.form-section-title, .price-summary h2 { margin: 0 0 13px; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.price-summary > div { padding: 10px 3px; border-bottom: 1px solid #ece9f7; }
.price-summary > div:last-child { border: 0; }
.price-summary strong { font-size: 17px; }

.product-detail { max-width: 780px !important; display: grid; grid-template-columns: .8fr 1.2fr; gap: 15px; }
.product-hero { min-height: 340px; position: relative; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.detail-image { height: 100%; display: grid; place-items: center; overflow: hidden; color: var(--primary); background: linear-gradient(145deg, #eee9e1, #cfc5bb); border-radius: var(--radius); font-size: 72px; font-weight: 800; }
.detail-image img { width: 100%; height: 100%; object-fit: cover; }
.status-badge { position: absolute; right: 20px; bottom: 20px; padding: 5px 8px; color: var(--success); background: var(--success-soft); border: 1px solid #85d9ad; border-radius: 7px; font-size: 10px; font-weight: 700; }
.detail-metrics { display: grid; grid-template-columns: repeat(2, 1fr); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.detail-metrics > div { min-height: 100px; padding: 18px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.detail-metrics > div:nth-child(2n) { border-right: 0; }
.detail-metrics > div span, .detail-metrics > div strong { display: block; }
.detail-metrics > div span { margin-bottom: 10px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.detail-metrics > div strong { font-size: 17px; }
.detail-metrics .detail-margin { grid-column: 1 / -1; border: 0; }
.detail-metrics .detail-margin strong { color: var(--success); font-size: 24px; }
.detail-card { grid-column: 1 / -1; padding: 0 18px 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.detail-tabs { display: flex; gap: 25px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.detail-tabs button { min-height: 48px; padding: 0; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; font-size: 11px; }
.detail-tabs button.is-active { color: var(--text); border-color: var(--primary); font-weight: 750; }
.detail-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 30px; margin: 0; }
.detail-card dl div { display: flex; gap: 12px; }
.detail-card dt { width: 90px; color: var(--muted); font-size: 11px; }
.detail-card dd { margin: 0; font-weight: 650; font-size: 11px; }
.product-detail > .button { grid-column: 1 / -1; }

.simulator { max-width: 620px !important; padding: 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.simulator-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stepper { height: var(--input-height); display: grid; grid-template-columns: 43px 1fr 43px 27px; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.stepper button { height: 100%; color: var(--primary); background: #fbfaff; border: 0; font-size: 18px; }
.stepper input { height: 100% !important; padding: 0 !important; border: 0 !important; text-align: center; box-shadow: none !important; }
.stepper i { color: var(--muted); font-size: 11px; font-style: normal; }
.promotion-result { display: block; margin-top: 20px; color: var(--success); background: var(--success-soft); border-color: #8eddb3; }
.promotion-result span, .promotion-result strong { display: block; }
.promotion-result span { margin-bottom: 8px; font-size: 11px; }
.promotion-result strong { font-size: 25px; }
.simulation-breakdown { padding: 15px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 10px; }
.simulation-breakdown > div { display: flex; justify-content: space-between; padding: 8px 0; font-size: 11px; }
.simulation-breakdown > div strong { color: var(--success); font-size: 16px; }
.simulation-breakdown p { margin: 8px 0 0; padding: 8px; color: var(--success); background: var(--success-soft); border: 1px solid #8eddb3; border-radius: 6px; text-align: center; font-size: 10px; font-weight: 800; }
.simulation-breakdown p.is-below { color: var(--danger); background: var(--danger-soft); border-color: #f0b7bf; }

.toast { max-width: 540px !important; padding: 13px 16px; margin-bottom: 18px; border: 1px solid; border-radius: var(--radius-sm); box-shadow: var(--shadow-float); font-size: 12px; }
.toast--success { color: #087440; background: var(--success-soft); border-color: #9be0b9; }
.toast--danger { color: #b51f34; background: var(--danger-soft); border-color: #f2bec5; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgb(20 17 35 / 48%); backdrop-filter: blur(2px); }
.quick-sheet { position: relative; z-index: 1; width: min(100%, 430px); padding: 22px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-float); }
.quick-sheet header { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.quick-sheet header small { color: var(--primary); font-weight: 800; text-transform: uppercase; }
.quick-sheet h2 { margin: 5px 0 0; font-size: 18px; }
.quick-sheet > a, .quick-disabled { min-height: 66px; display: flex; align-items: center; gap: 12px; padding: 8px; border-top: 1px solid #ededf3; }
.quick-sheet > a > b, .quick-disabled > b { width: 40px; height: 40px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 11px; font-size: 20px; }
.quick-sheet > a > span, .quick-disabled > span { min-width: 0; flex: 1; }
.quick-sheet strong, .quick-sheet small { display: block; }
.quick-sheet small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.quick-sheet i { color: var(--muted); font-size: 22px; font-style: normal; }
.quick-disabled { opacity: .45; }
.bottom-nav { display: none; }
.install-button { position: fixed; right: 20px; bottom: 20px; z-index: 80; min-height: 42px; padding: 0 17px; color: #fff; background: var(--primary); border: 0; border-radius: 22px; box-shadow: var(--shadow-float); font-weight: 750; }

@media (max-width: 1023px) {
  :root { --sidebar-width: 214px; }
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .brand small { display: none; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  :root { --input-height: 45px; }
  body { background: #fff; font-size: 13px; }
  .sidebar { display: none; }
  .main-content { width: 100%; margin: 0; padding: max(19px, env(safe-area-inset-top)) 14px calc(92px + env(safe-area-inset-bottom)); }
  .main-content > * { width: 100%; }
  .page-header { min-height: 48px; align-items: center; margin-bottom: 17px; }
  .page-header h1 { font-size: 20px; }
  .page-header p { font-size: 10px; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .metric-card { min-height: 112px; padding: 14px; border-radius: 11px; }
  .metric-card--wide { grid-column: 1 / -1; min-height: 136px; }
  .metric-card strong { font-size: 19px; }
  .metric-card > span { margin-bottom: 11px; font-size: 8px; }
  .shortcut-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .shortcut-grid a { min-height: 90px; }
  .shortcut-grid a b { width: 38px; height: 38px; font-size: 20px; }
  .shortcut-grid a span { font-size: 9px; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .panel { padding: 14px; }
  .bottom-nav { position: fixed; inset: auto 0 0; z-index: 60; height: calc(68px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px 10px env(safe-area-inset-bottom); background: rgb(255 255 255 / 96%); border-top: 1px solid var(--border); box-shadow: 0 -8px 25px rgb(31 25 64 / 7%); backdrop-filter: blur(12px); }
  .bottom-nav > a { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #737487; }
  .bottom-nav > a span { font-size: 18px; line-height: 1; }
  .bottom-nav > a small { font-size: 8px; }
  .bottom-nav > a.is-active { color: var(--primary); }
  .bottom-plus { width: 49px; height: 49px; align-self: start; justify-self: center; margin-top: -15px; color: #fff; background: var(--primary); border: 4px solid #fff; border-radius: 50%; box-shadow: 0 8px 20px rgb(104 66 223 / 30%); font-size: 28px; font-weight: 350; }
  .quick-sheet { align-self: end; width: calc(100% + 40px); margin: 0 -20px -20px; padding: 23px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 21px 21px 0 0; }
  .button--compact { width: 40px; padding: 0; font-size: 0; }
  .button--compact span { font-size: 19px; }
  .search-bar .button { display: none; }
  .product-card { grid-template-columns: 85px 1fr; min-height: 126px; }
  .product-thumb { height: 106px; }
  .stock-warning { min-width: 85px; }
  .wizard, .simulator { padding: 15px; border: 0; border-radius: 0; box-shadow: none; }
  .page-header--form { align-items: center; }
  .page-header--form p { display: none; }
  .wizard-steps li { font-size: 9px; }
  .wizard-steps li:not(:last-child)::after { left: calc(50% + 35px); right: calc(-50% + 35px); }
  .form-grid, .simulator-form { grid-template-columns: 1fr; gap: 12px; }
  .wizard-actions .button { min-width: 0; flex: 1; }
  .product-detail { grid-template-columns: 1fr; }
  .product-hero { min-height: 280px; }
  .detail-metrics, .detail-card, .product-detail > .button { grid-column: 1; }
  .detail-card dl { grid-template-columns: 1fr; }
  .toast { position: fixed; z-index: 70; top: 14px; left: 14px; right: 14px; width: auto !important; }
}

@media (max-width: 390px) {
  .main-content { padding-left: 10px; padding-right: 10px; }
  .metric-card { padding: 12px; }
  .metric-card strong { font-size: 17px; }
  .shortcut-grid a { min-height: 84px; }
  .product-card { grid-template-columns: 76px 1fr; gap: 9px; }
  .product-thumb { height: 98px; }
  .stock-warning { min-width: 76px; }
  .auth-shell { padding: 0; }
  .auth-panel { min-height: 100vh; padding: 55px 22px 30px; border: 0; border-radius: 0; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
