:root {
  --wine: #0b4f8a;
  --wine-2: #1268b0;
  --wine-3: #07355f;
  --ink: #1f2228;
  --muted: #69707d;
  --line: #dfe8ef;
  --paper: #f4f8fb;
  --cream: #e8f2f9;
  --white: #ffffff;
  --green: #138b67;
  --green-soft: #e9f7f2;
  --blue: #3975c6;
  --blue-soft: #eef5fd;
  --amber: #b87917;
  --amber-soft: #fff6e6;
  --shadow: 0 16px 45px rgba(11, 79, 138, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.glyph-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 800; line-height: 1; }

.brand-lockup { display: inline-flex; align-items: center; gap: 11px; color: var(--wine); }
.brand-lockup__mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: 28px; font-style: italic; line-height: 1; }
.brand-lockup > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.brand-lockup strong { letter-spacing: .22em; font-size: 16px; line-height: 1; }
.brand-lockup small { font-size: 8px; font-weight: 700; letter-spacing: .2em; opacity: .75; }
.brand-lockup--light { color: #fff; }
.aret-brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.aret-brand img { width: 178px; height: 70px; display: block; object-fit: contain; border-radius: 8px; background: #fff; }
.aret-brand small { color: rgba(255,255,255,.7); font-size: 8px; font-weight: 850; letter-spacing: .18em; }
.aret-brand--login img { width: 210px; height: 83px; }
.aret-brand--portal img { width: 180px; height: 71px; }
.aret-brand--admin img { width: 184px; height: 73px; }
.admin-brand-link { display: block; padding: 0 10px 24px; }
.portal-brand-link { display: inline-flex; }

/* Authentication */
.auth-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(450px, 1.04fr) minmax(500px, .96fr); background: #fff; }
.auth-story { position: relative; min-height: 100svh; padding: 46px clamp(38px, 5vw, 78px); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: #061b33; }
.auth-story__backdrop { position: absolute; inset: 0; background-image: linear-gradient(110deg, rgba(4, 27, 51, .92) 12%, rgba(7, 54, 96, .76) 56%, rgba(9, 43, 76, .36)), url('/elsa-portal-hero.jpg'); background-size: cover; background-position: 58% center; transform: scale(1.02); }
.auth-story::after { content: ""; position: absolute; width: 520px; height: 520px; right: -240px; top: -190px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 75px rgba(255,255,255,.025), 0 0 0 150px rgba(255,255,255,.018); }
.auth-story > * { position: relative; z-index: 1; }
.auth-story__copy { max-width: 580px; margin-top: auto; margin-bottom: auto; padding-block: 60px; }
.eyebrow { display: inline-flex; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--wine); }
.eyebrow--light { color: #d7e9f8; }
.auth-story h1 { margin: 19px 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 6vw, 82px); font-weight: 400; line-height: .98; letter-spacing: -.05em; }
.auth-story__copy > p { max-width: 570px; margin: 0; color: rgba(255,255,255,.82); font-size: clamp(16px, 1.6vw, 20px); line-height: 1.6; }
.auth-benefits { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 40px; }
.auth-benefits > div { display: flex; gap: 11px; min-width: 0; align-items: flex-start; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); }
.auth-benefits svg { flex: 0 0 auto; color: #c5e2f7; }
.auth-benefits span { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.auth-benefits strong { font-size: 13px; }
.auth-benefits small { color: rgba(255,255,255,.58); font-size: 10px; line-height: 1.4; }
.auth-story__footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: rgba(255,255,255,.64); font-size: 11px; }
.auth-story__footer span { display: flex; align-items: center; gap: 8px; }
.auth-panel { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px clamp(32px, 6vw, 96px) 24px; background: #f7fbff; }
.auth-card { width: min(100%, 490px); }
.auth-panel__mobile-brand { display: none; }
.auth-heading { margin-bottom: 28px; }
.mini-icon { display: grid; width: 42px; height: 42px; margin-bottom: 21px; place-items: center; border-radius: 12px; color: var(--wine); background: #e7f2fb; }
.auth-heading h2 { margin: 0 0 10px; color: #241f20; font-family: Georgia, serif; font-size: 36px; font-weight: 500; letter-spacing: -.035em; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.auth-form { display: grid; gap: 18px; }
.auth-form--grid { grid-template-columns: 1fr 1fr; gap: 15px; }
.auth-form .span-2 { grid-column: 1 / -1; }
.auth-form > label { display: grid; gap: 8px; }
.auth-form > label > span, .amount-field > span, .support-form label > span { font-size: 12px; font-weight: 750; color: #373238; }
.input-wrap { min-height: 52px; display: flex; align-items: center; gap: 11px; padding-inline: 15px; border: 1px solid #ded9d4; border-radius: 11px; background: #fff; transition: border .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--wine-2); box-shadow: 0 0 0 3px rgba(11,79,138,.09); }
.input-wrap > svg { flex: 0 0 auto; color: #8b8990; }
.input-wrap input, .input-wrap select { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.input-wrap input::placeholder { color: #b0adb1; }
.icon-button, .text-button { border: 0; padding: 0; cursor: pointer; color: #77747a; background: transparent; }
.icon-button { display: grid; place-items: center; }
.password-toggle { flex: 0 0 auto; border: 0; padding: 5px 0 5px 10px; cursor: pointer; color: var(--wine); background: transparent; font-size: 11px; font-weight: 800; }
.form-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.check-label { display: inline-flex; align-items: center; gap: 8px; color: #66636a; font-size: 12px; cursor: pointer; }
.check-label input { width: 16px; height: 16px; accent-color: var(--wine); }
.text-button { color: var(--wine); font-size: 12px; font-weight: 750; }
.primary-button, .demo-button, .heading-action { min-height: 52px; display: inline-flex; justify-content: center; align-items: center; gap: 10px; border: 0; border-radius: 11px; padding: 0 20px; cursor: pointer; color: #fff; background: var(--wine); font-size: 13px; font-weight: 800; box-shadow: 0 9px 22px rgba(11,79,138,.18); transition: transform .2s, background .2s; }
.primary-button:hover, .demo-button:hover, .heading-action:hover { background: var(--wine-2); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .65; }
.auth-divider { height: 30px; display: flex; align-items: center; gap: 13px; margin-top: 8px; color: #989399; font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #e6e1dd; }
.demo-button { min-height: 48px; color: var(--wine); border: 1px solid #cfe0ee; background: #fff; box-shadow: none; }
.demo-button:hover { color: #fff; }
.auth-switch { margin: 21px 0 0; text-align: center; color: #77737a; font-size: 12px; }
.auth-switch button { border: 0; padding: 0; cursor: pointer; color: var(--wine); background: transparent; font-weight: 800; }
.demo-launch { margin-top: 22px; padding: 15px; border: 1px solid #cfe1ee; border-radius: 16px; background: linear-gradient(145deg, #fff 0%, #eff7fd 100%); box-shadow: 0 12px 30px rgba(7,53,95,.07); }
.demo-launch__head { display: grid; gap: 5px; margin-bottom: 12px; }
.demo-launch__head > span { color: var(--wine); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.demo-launch__head > strong { color: #17334c; font-family: Georgia, serif; font-size: 17px; font-weight: 500; }
.demo-launch__head > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.demo-launch__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-launch__actions > button { min-height: 61px; display: grid; grid-template-columns: 30px minmax(0,1fr) 17px; align-items: center; gap: 7px; padding: 9px; border: 1px solid #d4e3ed; border-radius: 11px; cursor: pointer; text-align: left; color: var(--wine); background: #fff; transition: transform .18s, border-color .18s, box-shadow .18s; }
.demo-launch__actions > button:hover { transform: translateY(-2px); border-color: #91bad8; box-shadow: 0 9px 20px rgba(7,53,95,.09); }
.demo-launch__actions > button > svg:first-child { width: 30px; height: 30px; padding: 7px; border-radius: 8px; background: #e8f3fb; }
.demo-launch__actions > button > span { display: grid; gap: 3px; }
.demo-launch__actions strong { color: #17334c; font-size: 9px; }
.demo-launch__actions small { color: var(--muted); font-size: 7px; line-height: 1.35; }
.security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 25px; color: #858188; font-size: 10px; }
.security-note svg { color: var(--green); }
.security-note em { padding: 3px 7px; border-radius: 10px; color: var(--wine); background: #e7f2fb; font-style: normal; font-weight: 800; letter-spacing: .08em; }
.auth-legal { margin-top: auto; padding-top: 36px; color: #9c979d; font-size: 10px; }
.auth-legal span { margin-inline: 6px; }
.auth-legal a:hover { color: var(--wine); }
.form-notice { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 11px 12px; border-radius: 9px; background: #fff0f1; color: #9d2438; font-size: 11px; line-height: 1.5; }
.form-notice--success { color: #126f55; background: var(--green-soft); }
.form-notice svg { flex: 0 0 auto; margin-top: 1px; }
.admin-account-note { margin: 12px 0 0; color: #788694; font-size: 10px; line-height: 1.5; text-align: center; }

/* Authentication guard */
.gate-screen { min-height: 100svh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0%, #dceefb 0, #f4f8fb 46%, #eef4f8 100%); }
.gate-card { width: min(100%, 490px); padding: 42px; border: 1px solid #d8e5ee; border-radius: 22px; text-align: center; background: rgba(255,255,255,.92); box-shadow: 0 24px 70px rgba(7,53,95,.12); }
.gate-card > span { width: 52px; height: 52px; display: grid; margin: 0 auto 17px; place-items: center; border-radius: 15px; color: var(--wine); background: #e7f2fb; }
.gate-card h1 { margin: 8px 0 10px; font-family: Georgia, serif; font-size: 32px; font-weight: 500; color: #16314a; }
.gate-card > p:not(.portal-eyebrow) { margin: 0 auto 22px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.gate-card .primary-button { width: 100%; }

/* Portal shell */
.portal-shell { min-height: 100svh; display: flex; background: var(--paper); }
.portal-sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 272px; display: flex; flex-direction: column; padding: 28px 18px 18px; color: #fff; background: linear-gradient(180deg, #0b4f8a 0%, #052d50 100%); overflow-y: auto; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 24px; }
.sidebar-close { display: none; border: 0; color: #fff; background: transparent; cursor: pointer; }
.dealer-card { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.07); }
.dealer-avatar { width: 37px; height: 37px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--wine); background: #d8ebf8; font-size: 11px; font-weight: 850; }
.dealer-card > div:nth-child(2) { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.dealer-card strong { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.dealer-card small { color: rgba(255,255,255,.53); font-size: 9px; }
.dealer-card > svg { color: rgba(255,255,255,.5); }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-caption { padding: 0 11px 8px; color: rgba(255,255,255,.38); font-size: 8px; font-weight: 850; letter-spacing: .18em; }
.nav-caption--spaced { margin-top: 18px; }
.sidebar-nav a { min-height: 43px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 10px; color: rgba(255,255,255,.69); font-size: 11px; font-weight: 650; transition: .18s; }
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar-nav a.active { color: #fff; background: rgba(255,255,255,.14); box-shadow: inset 3px 0 #8dc5ec; }
.sidebar-nav a svg { opacity: .82; }
.sidebar-nav a span { flex: 1; }
.sidebar-nav a em { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: var(--wine); background: #d8ebf8; font-size: 9px; font-style: normal; }
.sidebar-support { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.055); }
.sidebar-support strong { font-size: 10px; }
.sidebar-support p { margin: 6px 0 10px; color: rgba(255,255,255,.48); font-size: 9px; line-height: 1.5; }
.sidebar-support a { color: #c9e7fa; font-size: 9px; font-weight: 800; }
.sidebar-signout { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px; border: 0; cursor: pointer; color: rgba(255,255,255,.55); background: transparent; font-size: 10px; }
.portal-scrim { position: fixed; z-index: 25; inset: 0; border: 0; background: rgba(5,34,62,.56); }
.portal-main { width: calc(100% - 272px); min-height: 100svh; margin-left: 272px; }
.portal-topbar { position: sticky; z-index: 20; top: 0; min-height: 71px; display: flex; align-items: center; justify-content: space-between; padding: 11px clamp(20px, 3vw, 40px); border-bottom: 1px solid var(--line); background: rgba(247,251,255,.94); backdrop-filter: blur(16px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.mobile-menu { display: none; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.global-search { width: clamp(240px, 28vw, 410px); height: 42px; display: flex; align-items: center; gap: 10px; padding-inline: 13px; border: 1px solid #e2ded9; border-radius: 10px; background: #fff; }
.global-search svg { flex: 0 0 auto; color: #97939a; }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.global-search input::placeholder { color: #aaa6ab; }
.demo-pill { padding: 5px 8px; border: 1px solid #c7ddeb; border-radius: 99px; color: var(--wine); background: #eef7fd; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.demo-pill--live { display: inline-flex; align-items: center; gap: 6px; color: #0c7a5b; border-color: #bfe4d7; background: #edf9f5; }
.demo-pill--live > i { width: 6px; height: 6px; border-radius: 50%; background: #18a77c; box-shadow: 0 0 0 3px rgba(24,167,124,.12); }
.topbar-icon { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.topbar-icon i { position: absolute; width: 7px; height: 7px; right: 8px; top: 7px; border: 1px solid #fff; border-radius: 50%; background: #d44859; }
.quick-order { min-height: 41px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 10px; color: #fff; background: var(--wine); font-size: 10px; font-weight: 800; }
.portal-content { padding: 32px clamp(20px, 3.1vw, 45px) 50px; }
.demo-ribbon { min-height: 46px; display: flex; align-items: center; gap: 10px; margin: -10px 0 24px; padding: 9px 12px; border: 1px solid #c9dfee; border-radius: 11px; color: #214c70; background: #eaf5fc; font-size: 9px; line-height: 1.45; }
.demo-ribbon > svg { flex: 0 0 auto; color: var(--wine); }
.demo-ribbon > span { flex: 1; }
.demo-ribbon > button { min-height: 30px; padding: 0 10px; border: 1px solid #b8d3e6; border-radius: 8px; cursor: pointer; color: var(--wine); background: #fff; font-size: 8px; font-weight: 850; }
.portal-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 25px; }
.portal-eyebrow, .panel-kicker { display: block; margin-bottom: 7px; color: var(--wine); font-size: 8px; font-weight: 900; letter-spacing: .17em; }
.portal-heading h1 { margin: 0 0 6px; font-family: Georgia, serif; font-size: clamp(28px, 3vw, 40px); font-weight: 500; letter-spacing: -.035em; }
.portal-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.heading-action, .outline-action { min-height: 41px; border-radius: 10px; font-size: 10px; }
.outline-action { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #dcd6d1; cursor: pointer; color: var(--ink); background: #fff; font-weight: 750; }
.stock-sync, .all-good { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 9px; font-weight: 750; }
.stock-sync i, .all-good i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(19,139,103,.1); }

/* Portal cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 17px; }
.kpi-card { min-height: 150px; display: flex; flex-direction: column; justify-content: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 24px rgba(7,53,95,.035); }
.kpi-card--featured { color: #fff; border-color: var(--wine); background: linear-gradient(135deg, var(--wine) 0%, #1776bd 100%); box-shadow: 0 15px 30px rgba(11,79,138,.18); }
.kpi-icon { width: 36px; height: 36px; display: grid; margin-bottom: 14px; place-items: center; border-radius: 10px; color: var(--wine); background: #e8f3fb; }
.kpi-card--featured .kpi-icon { color: #fff; background: rgba(255,255,255,.15); }
.kpi-icon--green { color: var(--green); background: var(--green-soft); }
.kpi-icon--blue { color: var(--blue); background: var(--blue-soft); }
.kpi-icon--gold { color: var(--amber); background: var(--amber-soft); }
.kpi-card > span { color: var(--muted); font-size: 9px; }
.kpi-card--featured > span { color: rgba(255,255,255,.65); }
.kpi-card > strong { margin: 5px 0 7px; font-size: clamp(20px, 2vw, 27px); letter-spacing: -.04em; }
.kpi-card > strong em { color: #8b8790; font-size: 10px; font-style: normal; font-weight: 600; letter-spacing: 0; }
.kpi-card--featured strong em { color: rgba(255,255,255,.6); }
.kpi-card > small { display: flex; align-items: center; gap: 5px; color: #8b8790; font-size: 8px; }
.kpi-card--featured > small { color: rgba(255,255,255,.58); }
.progress { height: 4px; margin: 2px 0 8px; overflow: hidden; border-radius: 4px; background: #eeeae6; }
.progress i { height: 100%; display: block; border-radius: inherit; background: var(--green); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 25px rgba(7,53,95,.035); }
.overview-grid { display: grid; grid-template-columns: minmax(0,1.72fr) minmax(280px,.7fr); gap: 17px; margin-bottom: 17px; }
.overview-grid--bottom { grid-template-columns: minmax(0,1.6fr) minmax(300px,.8fr); }
.revenue-panel, .orders-panel, .quick-panel { padding: 21px 23px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-head h2 { margin: 0; font-family: Georgia, serif; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.panel-head button, .panel-head a { display: inline-flex; align-items: center; gap: 4px; border: 0; cursor: pointer; color: var(--wine); background: transparent; font-size: 9px; font-weight: 800; }
.revenue-total { display: flex; align-items: center; gap: 14px; margin-top: 19px; }
.revenue-total > strong { font-size: 28px; letter-spacing: -.04em; }
.revenue-total span { display: inline-flex; align-items: center; gap: 3px; padding: 5px 7px; border-radius: 20px; color: var(--green); background: var(--green-soft); font-size: 8px; font-weight: 800; }
.bar-chart { height: 125px; display: flex; align-items: flex-end; gap: clamp(5px, 1vw, 11px); margin-top: 15px; padding-top: 10px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #f3f0ec 32px); }
.bar-chart > div { height: 100%; display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.bar-chart i { width: 100%; max-width: 22px; min-height: 7px; border-radius: 5px 5px 0 0; background: #bfd6e8; }
.bar-chart > div.active i { background: var(--wine); }
.bar-chart span { margin-bottom: -19px; color: #9a969d; font-size: 7px; }
.due-panel { padding: 23px; color: #fff; border-color: #0a477c; background: linear-gradient(145deg, #0b4f8a, #062f54); box-shadow: 0 15px 30px rgba(8,60,105,.16); }
.due-panel__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: #c6e4f7; background: rgba(255,255,255,.1); }
.due-panel .panel-kicker { margin-top: 19px; color: rgba(255,255,255,.48); }
.due-panel h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.due-panel p { margin: 0; color: rgba(255,255,255,.61); font-size: 9px; line-height: 1.6; }
.due-panel > strong { display: block; margin: 18px 0; font-size: 25px; }
.due-panel > a { min-height: 39px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; color: var(--wine); background: #fff; font-size: 9px; font-weight: 850; }
.due-panel > small { display: flex; align-items: flex-start; gap: 6px; margin-top: 11px; color: rgba(255,255,255,.42); font-size: 7px; line-height: 1.5; }
.compact-orders { margin-top: 11px; }
.compact-orders > div { display: grid; grid-template-columns: 35px minmax(100px,1.25fr) minmax(90px,.8fr) minmax(85px,.7fr) 18px; align-items: center; gap: 10px; min-height: 55px; border-top: 1px solid #f0ece9; }
.order-dot { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--amber); background: var(--amber-soft); }
.order-dot--blue { color: var(--blue); background: var(--blue-soft); }
.order-dot--green { color: var(--green); background: var(--green-soft); }
.compact-orders div > div { display: flex; flex-direction: column; gap: 3px; }
.compact-orders strong { font-size: 9px; }
.compact-orders small { color: #9b969c; font-size: 7px; }
.compact-orders b { text-align: right; font-size: 9px; }
.compact-orders > div > svg { color: #b5b1b5; }
.status { width: max-content; display: inline-flex; padding: 5px 8px; border-radius: 20px; color: var(--amber); background: var(--amber-soft); font-size: 7px; font-weight: 800; }
.status--blue { color: var(--blue); background: var(--blue-soft); }
.status--green { color: var(--green); background: var(--green-soft); }
.quick-links { display: grid; gap: 3px; margin-top: 11px; }
.quick-links a { min-height: 61px; display: flex; align-items: center; gap: 10px; border-top: 1px solid #f0ece9; }
.quick-links a > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--wine); background: #edf6fc; }
.quick-links a > div { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 4px; }
.quick-links strong { font-size: 9px; }
.quick-links small { overflow: hidden; color: #99959b; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.quick-links a > svg { color: #b5b1b5; }

/* Catalog */
.catalog-toolbar { display: grid; gap: 16px; margin-bottom: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.catalog-search, .table-search { height: 43px; display: flex; align-items: center; gap: 10px; padding-inline: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf9; }
.catalog-search svg, .table-search svg { color: #9b979d; }
.catalog-search input, .table-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 11px; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.category-tabs button { min-height: 31px; padding: 0 12px; border: 1px solid var(--line); border-radius: 20px; cursor: pointer; color: #77737a; background: #fff; font-size: 8px; font-weight: 750; }
.category-tabs button.active { color: #fff; border-color: var(--wine); background: var(--wine); }
.catalog-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; color: #8a858b; font-size: 8px; }
.catalog-meta strong { color: #514d53; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; padding-bottom: 80px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(7,53,95,.03); }
.product-image { position: relative; aspect-ratio: 1/1.03; overflow: hidden; background: #f0ece7; }
.product-image img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-image img { transform: scale(1.035); }
.product-image em { position: absolute; z-index: 1; top: 10px; left: 10px; padding: 5px 8px; border-radius: 20px; color: var(--wine); background: rgba(255,255,255,.9); font-size: 7px; font-style: normal; font-weight: 850; backdrop-filter: blur(5px); }
.product-body { padding: 15px; }
.product-body > span { color: var(--wine); font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.product-body h2 { min-height: 34px; margin: 6px 0 4px; font-size: 11px; line-height: 1.45; }
.product-body > small { color: #a19da2; font-size: 7px; }
.stock-line { display: flex; align-items: center; gap: 6px; margin: 11px 0; color: var(--green); font-size: 8px; font-weight: 700; }
.stock-line i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.stock-line i.low { background: var(--amber); }
.stock-line--out { color: #a63e50; }
.stock-line--out i { background: #b94b5d; }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.price-row > div { display: flex; flex-direction: column; gap: 2px; }
.price-row small { color: #8f8b91; font-size: 7px; }
.price-row strong { color: var(--wine); font-size: 16px; }
.price-row del { color: #aaa6ab; font-size: 8px; }
.add-cart { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #cfe0ee; border-radius: 9px; cursor: pointer; color: var(--wine); background: #fff; font-size: 8px; font-weight: 850; }
.add-cart:hover { color: #fff; background: var(--wine); }
.add-cart:disabled { cursor: not-allowed; color: #949da5; border-color: #e0e6ea; background: #f6f8fa; }
.quantity-picker { min-height: 38px; display: grid; grid-template-columns: 32px 25px 32px 1fr; align-items: center; border: 1px solid #cfe0ee; border-radius: 9px; overflow: hidden; }
.quantity-picker button { height: 100%; display: grid; place-items: center; border: 0; cursor: pointer; color: var(--wine); background: #eef7fd; }
.quantity-picker > strong { text-align: center; font-size: 9px; }
.quantity-picker > span { padding-right: 8px; text-align: right; color: var(--wine); font-size: 8px; font-weight: 800; }
.cart-dock { position: fixed; z-index: 15; right: clamp(20px,3.1vw,45px); bottom: 20px; left: calc(272px + clamp(20px,3.1vw,45px)); min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 13px 10px 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; color: #fff; background: #082a4c; box-shadow: 0 18px 50px rgba(5,36,65,.3); }
.cart-dock > span, .cart-dock > div { display: flex; align-items: center; gap: 9px; font-size: 9px; }
.cart-dock > div > small { color: rgba(255,255,255,.5); }
.cart-dock > div > strong { font-size: 15px; }
.cart-dock button { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 0; border-radius: 9px; cursor: pointer; color: var(--wine); background: #fff; font-size: 8px; font-weight: 850; }
.cart-dock button:disabled { cursor: wait; opacity: .7; }
.catalog-notice { margin-bottom: 14px; }

/* Tables and account */
.order-kpis, .aging-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.order-kpis article { display: flex; align-items: center; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.order-kpis article > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--wine); background: #e8f3fb; }
.order-kpis article > div { display: flex; flex-direction: column; gap: 3px; }
.order-kpis small { color: var(--muted); font-size: 8px; }
.order-kpis strong { font-size: 16px; }
.data-panel { padding: 20px 22px; }
.data-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.table-search { width: 210px; }
.responsive-table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 11px 12px; border-bottom: 1px solid var(--line); color: #99949a; font-size: 7px; letter-spacing: .07em; text-transform: uppercase; }
td { height: 54px; padding: 10px 12px; border-bottom: 1px solid #f0ece9; color: #5d5960; font-size: 8px; }
td strong { color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
.row-action { display: inline-flex; align-items: center; gap: 4px; border: 0; cursor: pointer; color: var(--wine); background: transparent; font-size: 8px; font-weight: 800; }
.table-actions { display: flex; align-items: center; gap: 7px; }
.table-actions .row-action + .row-action { padding-left: 7px; border-left: 1px solid var(--line); }
.account-hero { min-height: 150px; display: grid; grid-template-columns: 1.15fr 1fr auto; align-items: center; gap: clamp(25px,5vw,80px); margin-bottom: 15px; padding: 27px 31px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #0a467b, #176fad); box-shadow: 0 15px 34px rgba(11,79,138,.18); }
.account-hero > div:first-child { display: flex; flex-direction: column; gap: 6px; }
.account-hero span, .account-hero small { color: rgba(255,255,255,.58); font-size: 8px; }
.account-hero > div:first-child strong { font-size: 30px; letter-spacing: -.04em; }
.account-hero > a { min-height: 41px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 9px; color: var(--wine); background: #fff; font-size: 8px; font-weight: 850; }
.limit-visual { display: grid; gap: 9px; }
.limit-visual > div:first-child, .limit-visual > div:last-child { display: flex; justify-content: space-between; gap: 20px; }
.limit-visual strong { font-size: 10px; }
.limit-bar { height: 7px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.18); }
.limit-bar i { width: 38.24%; height: 100%; display: block; border-radius: inherit; background: #f2c5cc; }
.aging-grid article { padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.aging-grid span { display: block; color: var(--muted); font-size: 8px; }
.aging-grid strong { display: block; margin: 7px 0 4px; font-size: 17px; }
.aging-grid small { color: #9c979d; font-size: 7px; }
.aging-grid .aging-warn { border-color: #eddcb9; background: #fffaf0; }
.aging-grid .aging-warn strong { color: var(--amber); }
.date-filter { min-height: 32px; padding: 0 10px !important; border: 1px solid var(--line) !important; border-radius: 8px; color: #6f6b71 !important; }
.transaction-icon { width: 25px; height: 25px; display: inline-grid; margin-right: 8px; place-items: center; border-radius: 7px; color: var(--wine); background: #edf6fc; vertical-align: middle; }
.transaction-icon--credit { color: var(--green); background: var(--green-soft); }
.credit-value, .safe-value { color: var(--green) !important; }

/* Payments, docs, support */
.payment-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 17px; }
.payment-form, .payment-summary { padding: 24px; }
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.payment-methods button { min-height: 76px; display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: left; background: #fff; }
.payment-methods button.active { border-color: var(--wine); box-shadow: 0 0 0 2px rgba(11,79,138,.07); }
.payment-methods button > span { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--wine); background: #edf6fc; }
.payment-methods button > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.payment-methods strong { font-size: 9px; }
.payment-methods small { color: var(--muted); font-size: 7px; }
.payment-methods button > svg { color: var(--green); }
.amount-field { display: grid; gap: 8px; }
.amount-field > div { min-height: 58px; display: flex; align-items: center; padding: 0 15px; border: 1px solid #dcd7d3; border-radius: 11px; }
.amount-field input { width: 100%; border: 0; outline: 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.amount-field em { color: var(--wine); font-size: 20px; font-style: normal; }
.amount-field small { color: #918d92; font-size: 8px; }
.amount-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 20px; }
.amount-chips button { min-height: 30px; padding: 0 10px; border: 1px solid #d4e3ee; border-radius: 20px; cursor: pointer; color: var(--wine); background: #fff; font-size: 7px; font-weight: 750; }
.payment-submit { width: 100%; margin-top: 6px; }
.secure-caption { display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin: 11px 0 0; color: #99949a; font-size: 7px; }
.bank-info { margin: 12px 0; padding: 12px; border: 1px solid #dbe6f3; border-radius: 10px; background: var(--blue-soft); }
.bank-info strong { color: var(--blue); font-size: 9px; }
.bank-info p { margin: 4px 0 0; color: #607187; font-size: 8px; line-height: 1.5; }
.payment-summary h2 { margin: 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.summary-balance { display: flex; flex-direction: column; gap: 6px; margin: 19px 0; padding: 18px; border-radius: 13px; color: #fff; background: var(--wine); }
.summary-balance small { color: rgba(255,255,255,.58); font-size: 8px; }
.summary-balance strong { font-size: 26px; }
.payment-summary ul { margin: 0; padding: 0; list-style: none; }
.payment-summary li { display: flex; align-items: center; justify-content: space-between; min-height: 42px; border-bottom: 1px solid #f0ece9; font-size: 8px; }
.payment-summary li span { color: var(--muted); }
.trust-card { display: flex; gap: 10px; margin-top: 20px; padding: 14px; border-radius: 11px; color: var(--green); background: var(--green-soft); }
.trust-card svg { flex: 0 0 auto; }
.trust-card strong { font-size: 8px; }
.trust-card p { margin: 4px 0 0; color: #537a6e; font-size: 7px; line-height: 1.5; }
.integration-notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 15px; border: 1px solid #e8d9b9; border-radius: 12px; color: var(--amber); background: var(--amber-soft); }
.integration-notice--success { border-color: #cae5db; color: var(--green); background: var(--green-soft); }
.empty-state { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 8px; padding: 28px; text-align: center; color: var(--muted); }
.empty-state svg { color: var(--wine); }
.empty-state h2 { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.empty-state p { max-width: 500px; margin: 0; font-size: 10px; line-height: 1.6; }
.integration-notice svg { flex: 0 0 auto; }
.integration-notice strong { font-size: 9px; }
.integration-notice p { margin: 4px 0 0; color: #7e7569; font-size: 8px; line-height: 1.5; }
.document-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.document-card { min-height: 105px; display: flex; align-items: center; gap: 13px; padding: 18px; }
.document-card > span { width: 43px; height: 43px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--wine); background: #e8f3fb; }
.document-card > div { flex: 1; }
.document-card h2 { margin: 0 0 6px; font-size: 10px; }
.document-card p { margin: 0; color: var(--muted); font-size: 8px; }
.document-card button { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--wine); background: #fff; }
.support-grid { display: grid; grid-template-columns: minmax(290px,.72fr) minmax(0,1.28fr); gap: 16px; }
.support-options { display: grid; gap: 12px; }
.support-card { display: flex; align-items: flex-start; gap: 13px; padding: 17px; }
.support-card > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--wine); background: #e8f3fb; }
.support-card h2 { margin: 0 0 5px; font-size: 10px; }
.support-card p { margin: 0 0 8px; color: var(--muted); font-size: 8px; }
.support-card a, .support-card button { border: 0; padding: 0; cursor: pointer; color: var(--wine); background: transparent; font-size: 8px; font-weight: 800; }
.support-form { padding: 22px; }
.support-form h2 { margin: 0 0 18px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.support-form label { display: grid; gap: 7px; margin-bottom: 13px; }
.support-form input, .support-form select, .support-form textarea { width: 100%; border: 1px solid #ded9d4; border-radius: 10px; padding: 12px 13px; outline: 0; background: #fff; font-size: 9px; }
.support-form textarea { resize: vertical; }
.support-form input:focus, .support-form select:focus, .support-form textarea:focus { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(11,79,138,.07); }

/* Admin */
.admin-shell { min-height: 100svh; display: flex; background: #f4f8fb; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 245px; display: flex; flex-direction: column; padding: 27px 17px 17px; color: #fff; background: #071d33; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar nav > span { margin: 17px 10px 7px; color: rgba(255,255,255,.34); font-size: 8px; font-weight: 850; letter-spacing: .15em; }
.admin-sidebar nav a { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border-radius: 9px; color: rgba(255,255,255,.62); font-size: 10px; font-weight: 650; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.admin-sidebar nav a.active { box-shadow: inset 3px 0 #8dc5ec; }
.admin-sidebar nav a em { min-width: 20px; height: 20px; display: grid; margin-left: auto; place-items: center; border-radius: 50%; color: #fff; background: var(--wine-2); font-size: 8px; font-style: normal; }
.admin-user { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; }
.admin-user > span { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; color: #0a355e; background: #bdddf5; font-size: 9px; font-weight: 900; }
.admin-user > div { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.admin-user strong { font-size: 9px; }
.admin-user small { color: rgba(255,255,255,.44); font-size: 7px; }
.admin-user svg { color: #9fccef; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.admin-main { width: calc(100% - 245px); min-height: 100svh; margin-left: 245px; }
.admin-topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 10px 31px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); }
.admin-topbar > div { display: flex; align-items: center; gap: 11px; }
.admin-topbar > div:last-child > a { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 8px; font-weight: 800; }
.admin-content { padding: 30px 34px 48px; }
.admin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 15px; }
.admin-kpis article { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin-kpis .kpi-icon { margin: 0; flex: 0 0 auto; }
.admin-kpis article > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.admin-kpis small { color: var(--muted); font-size: 8px; }
.admin-kpis strong { font-size: 18px; letter-spacing: -.03em; }
.admin-kpis em { color: var(--green); font-size: 7px; font-style: normal; }
.admin-kpis em.warn { color: var(--amber); }
.admin-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(310px,.7fr); gap: 15px; margin-bottom: 15px; }
.admin-grid > .panel, .admin-content > .data-panel { padding: 21px; }
.application-list { margin-top: 12px; }
.application-list > div { min-height: 66px; display: grid; grid-template-columns: 38px minmax(170px,1fr) 75px auto; align-items: center; gap: 10px; border-top: 1px solid #f0ece9; }
.company-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--wine); background: #e8f3fb; }
.application-list > div > div:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }
.application-list strong { font-size: 9px; }
.application-list small, .application-list time { color: #918d92; font-size: 7px; }
.application-actions { display: flex; gap: 6px; }
.application-actions button { min-height: 32px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; font-size: 8px; font-weight: 800; }
.application-actions .reject { padding: 0 8px; color: #a54d5c; }
.application-actions .approve { color: #fff; border-color: var(--green); background: var(--green); }
.application-state { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 20px; color: var(--green); background: var(--green-soft); font-size: 7px; font-weight: 800; }
.application-state--rejected { color: #a84252; background: #fcecef; }
.health-list { margin-top: 12px; }
.health-list > div { min-height: 60px; display: flex; align-items: center; gap: 9px; border-top: 1px solid #f0ece9; }
.health-list > div > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--green); background: var(--green-soft); }
.health-list > div > div { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.health-list strong { font-size: 8px; }
.health-list small { color: #969198; font-size: 7px; }
.health-list em { color: var(--green); font-size: 7px; font-style: normal; font-weight: 800; }
.health-list em.wait { color: var(--amber); }
.admin-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; padding: 15px; border: 1px solid #dbe3ed; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
.admin-note strong { font-size: 9px; }
.admin-note p { margin: 4px 0 0; color: #617187; font-size: 8px; line-height: 1.5; }
.dealer-accounts { margin-bottom: 15px; }
.dealer-accounts .panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.demo-data-label { padding: 6px 9px; border-radius: 20px; color: var(--amber); background: var(--amber-soft); font-size: 7px; font-weight: 850; letter-spacing: .08em; }
.demo-data-label--live { color: #0c7a5b; background: #edf9f5; }
.account-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 17px 0; }
.account-summary-grid article { display: flex; flex-direction: column; gap: 5px; padding: 15px; border: 1px solid #eee9e5; border-radius: 11px; background: #faf9f8; }
.account-summary-grid small { color: var(--muted); font-size: 7px; }
.account-summary-grid strong { font-size: 18px; letter-spacing: -.03em; }
.account-summary-grid span { color: var(--green); font-size: 7px; }
.account-summary--danger strong, .account-summary--danger span, .overdue-value { color: #b04455; }
.dealer-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dealer-toolbar .table-search { width: min(360px, 100%); }
.dealer-toolbar > span { margin-left: auto; color: var(--muted); font-size: 8px; }
.dealer-status-filter { display: flex; gap: 5px; }
.dealer-status-filter button { min-height: 31px; padding: 0 10px; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; color: #77737a; background: #fff; font-size: 7px; font-weight: 800; }
.dealer-status-filter button.active { color: #fff; border-color: var(--wine); background: var(--wine); }
.dealer-cell { display: flex; align-items: center; gap: 9px; }
.dealer-cell > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--wine); background: #e8f3fb; font-size: 8px; font-weight: 900; }
.dealer-cell > div { display: flex; flex-direction: column; gap: 3px; }
.dealer-cell small { color: var(--muted); font-size: 7px; }
.status--red { color: #a84252; background: #fcecef; }
.muted-value { color: #aaa5aa; }
.available-value { color: var(--green); }
.dealer-drawer-backdrop { position: fixed; z-index: 60; inset: 0; display: flex; justify-content: flex-end; background: rgba(5,34,62,.46); backdrop-filter: blur(3px); }
.dealer-drawer { width: min(430px, 100%); height: 100%; overflow-y: auto; padding: 28px; background: #fff; box-shadow: -25px 0 65px rgba(7,45,80,.18); animation: drawer-in .24s ease-out; }
.dealer-drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.dealer-drawer__head span { color: var(--wine); font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.dealer-drawer__head h2 { margin: 5px 0; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.dealer-drawer__head p { margin: 0; color: var(--muted); font-size: 9px; }
.dealer-drawer__head button { width: 36px; height: 36px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; background: #fff; }
.dealer-drawer__balance { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 7px; margin: 20px 0; padding: 20px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--wine), #1776bd); }
.dealer-drawer__balance small { grid-column: 1 / -1; color: rgba(255,255,255,.6); font-size: 8px; }
.dealer-drawer__balance strong { font-size: 27px; letter-spacing: -.04em; }
.dealer-drawer dl { margin: 0; }
.dealer-drawer dl > div { min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #f0ece9; }
.dealer-drawer dt { color: var(--muted); font-size: 8px; }
.dealer-drawer dd { margin: 0; font-size: 9px; font-weight: 800; }
.dealer-drawer__actions { display: grid; gap: 8px; margin-top: 20px; }
.dealer-drawer__actions button { min-height: 42px; border: 0; border-radius: 9px; cursor: pointer; color: #fff; background: var(--wine); font-size: 8px; font-weight: 850; }
.dealer-drawer__actions button.secondary { color: var(--wine); border: 1px solid #cfe0ee; background: #fff; }
.dealer-drawer__note { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; padding: 13px; border-radius: 10px; color: var(--blue); background: var(--blue-soft); }
.dealer-drawer__note p { margin: 0; color: #617187; font-size: 7px; line-height: 1.6; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .5; } }
.primary-action { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 0; border-radius: 9px; cursor: pointer; color: #fff; background: var(--wine); font-size: 8px; font-weight: 850; }
.inventory-admin { max-width: 1700px; margin: 0 auto; }
.inventory-kpis { margin-top: 2px; }
.master-products { margin-bottom: 15px; }
.master-products .panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.master-product-cell { display: flex; align-items: center; gap: 9px; }
.master-product-cell > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--wine); background: #e8f3fb; }
.master-product-cell > div { display: flex; flex-direction: column; gap: 3px; }
.master-product-cell small { color: var(--muted); font-size: 7px; }
.channel-stack { display: flex; gap: 4px; }
.channel-stack > span { position: relative; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #d8e5ee; border-radius: 8px; color: var(--wine); background: #f5faff; font-size: 7px; font-weight: 900; cursor: help; }
.channel-stack i { display: none; }
.stock-row-actions { display: flex; gap: 5px; }
.stock-row-actions button { min-height: 29px; display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; color: var(--wine); background: #fff; font-size: 7px; font-weight: 800; }
.inventory-two-column { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(330px,.8fr); gap: 15px; margin-bottom: 15px; }
.movement-list { margin-top: 12px; }
.movement-list > div { min-height: 58px; display: grid; grid-template-columns: 31px minmax(150px,1fr) 80px 45px; align-items: center; gap: 9px; border-top: 1px solid #f0ece9; }
.movement-list > div > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 900; }
.movement-in { color: var(--green); background: var(--green-soft); }
.movement-out { color: #aa4151; background: #fcecef; }
.movement-list > div > div { display: flex; flex-direction: column; gap: 3px; }
.movement-list strong { font-size: 8px; }
.movement-list small, .movement-list time { color: var(--muted); font-size: 7px; }
.movement-list b { text-align: right; font-size: 9px; }
.integration-center { padding: 21px; }
.integration-cards { display: grid; gap: 9px; margin-top: 14px; }
.integration-cards > div { display: flex; gap: 10px; padding: 14px; border: 1px solid #eee8e4; border-radius: 11px; background: #faf9f8; }
.integration-cards > div > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--wine); background: #e8f3fb; }
.integration-cards strong { font-size: 9px; }
.integration-cards p { margin: 5px 0; color: var(--muted); font-size: 7px; line-height: 1.55; }
.integration-cards small { color: var(--green); font-size: 7px; font-weight: 750; }
.security-center { padding: 22px; }
.security-score { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 8px; font-weight: 850; }
.security-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.security-grid article { min-height: 72px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 12px; border: 1px solid #eee9e5; border-radius: 10px; background: #fbfaf9; }
.security-grid article > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: var(--green-soft); }
.security-grid strong { font-size: 8px; }
.security-grid p { margin: 4px 0 0; color: var(--muted); font-size: 7px; line-height: 1.45; }
.security-grid em { padding: 5px 7px; border-radius: 15px; color: var(--green); background: var(--green-soft); font-size: 6px; font-style: normal; font-weight: 900; }
.current-stock-box { display: flex; flex-direction: column; gap: 6px; margin: 19px 0; padding: 17px; border-radius: 12px; color: #fff; background: var(--wine); }
.current-stock-box small { color: rgba(255,255,255,.6); font-size: 8px; }
.current-stock-box strong { font-size: 23px; }
.stock-form-field { display: grid; gap: 7px; margin-bottom: 13px; }
.stock-form-field span { color: var(--muted); font-size: 8px; font-weight: 700; }
.stock-form-field input, .stock-form-field textarea { width: 100%; padding: 12px; border: 1px solid #ded9d4; border-radius: 9px; outline: none; background: #fff; font: inherit; }
.stock-form-field input { font-size: 20px; font-weight: 850; }
.stock-form-field textarea { resize: vertical; font-size: 9px; }
.stock-warning { display: flex; gap: 8px; padding: 12px; border-radius: 9px; color: var(--blue); background: var(--blue-soft); }
.stock-warning p { margin: 0; color: #617187; font-size: 7px; line-height: 1.55; }
.stock-save { width: 100%; min-height: 43px; margin-top: 14px; border: 0; border-radius: 9px; cursor: pointer; color: #fff; background: var(--wine); font-size: 8px; font-weight: 850; }
.stock-save.saved { background: var(--green); }
.stock-save:disabled, .primary-action:disabled, .inline-select:disabled { cursor: wait; opacity: .55; }
.drawer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 18px; padding: 4px; border-radius: 11px; background: #edf3f8; }
.drawer-tabs button { min-height: 36px; border: 0; border-radius: 8px; cursor: pointer; color: var(--muted); background: transparent; font-size: 8px; font-weight: 850; }
.drawer-tabs button.active { color: #fff; background: var(--wine); box-shadow: 0 6px 14px rgba(11,79,138,.18); }
.drawer-form { display: grid; gap: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.drawer-form label { display: grid; gap: 7px; }
.drawer-form label > span { color: var(--muted); font-size: 8px; font-weight: 750; }
.drawer-form input, .drawer-form select, .drawer-form textarea, .inline-select { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid #d9e2e9; border-radius: 9px; outline: 0; color: var(--ink); background: #fff; font-size: 9px; }
.drawer-form textarea { min-height: 90px; padding-block: 11px; resize: vertical; }
.drawer-form input:focus, .drawer-form select:focus, .inline-select:focus { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(11,79,138,.08); }
.inline-select { min-width: 125px; min-height: 32px; padding-right: 7px; font-size: 7px; font-weight: 750; }
.table-subline { display: block; margin-top: 4px; color: var(--muted); font-size: 7px; }
.catalog-notice { max-width: 760px; margin: 0 0 14px; }
.stock-line--out { color: #a84252; }
.add-cart:disabled { cursor: not-allowed; opacity: .48; }
.product-active-check { display: flex !important; flex-direction: row; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; }
.product-active-check input { width: 16px; min-height: 16px; accent-color: var(--wine); }

/* CRM */
.crm-admin { max-width: 1800px; margin: 0 auto; }
.crm-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.crm-kpis article { display: flex; min-height: 104px; flex-direction: column; justify-content: center; gap: 6px; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 9px 25px rgba(7,53,95,.035); }
.crm-kpis small { color: var(--muted); font-size: 8px; font-weight: 750; }
.crm-kpis strong { color: #16314a; font-size: 22px; letter-spacing: -.04em; }
.crm-kpis span { color: #6d7f8f; font-size: 7px; }
.crm-pipeline { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin-bottom: 14px; }
.crm-pipeline button { min-height: 82px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px; padding: 13px 14px; border: 1px solid var(--line); border-top: 3px solid #9ebbd0; border-radius: 11px; cursor: pointer; text-align: left; background: #fff; }
.crm-pipeline button:nth-child(2) { border-top-color: #5a9ed0; }
.crm-pipeline button:nth-child(3) { border-top-color: #c4943f; }
.crm-pipeline button:nth-child(4) { border-top-color: #26a47e; }
.crm-pipeline button:nth-child(5) { border-top-color: #9d9ba2; }
.crm-pipeline button.active { border-color: var(--wine); box-shadow: 0 8px 22px rgba(11,79,138,.12); }
.crm-pipeline span { color: var(--muted); font-size: 8px; font-weight: 750; }
.crm-pipeline strong { color: #183951; font-size: 17px; }
.crm-pipeline small { grid-column: 1 / -1; color: #7a8995; font-size: 7px; }
.crm-layout { display: grid; grid-template-columns: minmax(0,1.62fr) minmax(330px,.68fr); gap: 14px; }
.crm-portfolio { padding: 21px; overflow: hidden; }
.crm-side-stack { display: grid; align-content: start; gap: 14px; }
.crm-task-panel, .crm-activity-panel { padding: 19px; }
.crm-task-list, .crm-activity-list { margin-top: 10px; }
.crm-task-list > div { min-height: 56px; display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: center; gap: 9px; border-top: 1px solid #edf0f2; }
.crm-task-list > div > button { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #cfdbe4; border-radius: 7px; cursor: pointer; color: #8ca0af; background: #fff; }
.crm-task-list > div > div { display: grid; gap: 4px; }
.crm-task-list strong { font-size: 8px; }
.crm-task-list small { color: var(--muted); font-size: 7px; }
.crm-task-list em { padding: 4px 6px; border-radius: 10px; color: #9a6819; background: var(--amber-soft); font-size: 6px; font-style: normal; font-weight: 900; }
.crm-task-list .overdue small { color: #b04455; }
.crm-task-list .overdue em { color: #a84252; background: #fcecef; }
.crm-activity-list > div { min-height: 54px; display: grid; grid-template-columns: 12px minmax(0,1fr) auto; align-items: center; gap: 8px; border-top: 1px solid #edf0f2; }
.crm-activity-list i { width: 7px; height: 7px; border-radius: 50%; background: var(--wine-2); box-shadow: 0 0 0 4px #e9f4fb; }
.crm-activity-list > div > div { display: grid; gap: 4px; }
.crm-activity-list strong { font-size: 8px; }
.crm-activity-list small { color: var(--muted); font-size: 7px; }
.crm-activity-list span { color: #6b8192; font-size: 6px; font-weight: 900; }
.crm-stage { display: inline-flex; padding: 6px 8px; border-radius: 14px; color: #365f7d; background: #eaf3f9; font-size: 7px; font-weight: 850; }
.crm-stage--proposal { color: #936417; background: var(--amber-soft); }
.crm-stage--customer { color: #0d7658; background: var(--green-soft); }
.crm-stage--lost { color: #a84252; background: #fcecef; }
.crm-stage--dormant { color: #6f6d73; background: #efeff1; }
.crm-priority { font-size: 7px; }
.crm-priority--high { color: #b15a24; }
.crm-priority--vip { color: #6d43a4; }
.crm-priority--low { color: #78909f; }
.crm-drawer { width: min(520px,100%); }
.drawer-tabs--three { grid-template-columns: repeat(3,1fr); }
.crm-contact-strip { display: flex; align-items: center; gap: 8px; margin: 14px 0 18px; padding: 10px; border-radius: 10px; background: #eef5fa; }
.crm-contact-strip a { padding: 6px 8px; border-radius: 7px; color: var(--wine); background: #fff; font-size: 7px; font-weight: 850; }
.crm-contact-strip span { margin-left: auto; color: #526a7c; font-size: 7px; font-weight: 750; }
.crm-drawer-history, .crm-drawer-tasks { display: grid; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.crm-drawer-history article { position: relative; display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.crm-drawer-history article > span { color: var(--wine); font-size: 6px; font-weight: 900; }
.crm-drawer-history strong { font-size: 9px; }
.crm-drawer-history p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.crm-drawer-history small { color: #9aa5ad; font-size: 7px; }
.crm-drawer-tasks article { display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.crm-drawer-tasks article > button { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #cfdbe4; border-radius: 7px; cursor: pointer; color: var(--wine); background: #fff; }
.crm-drawer-tasks article > div { display: grid; gap: 4px; }
.crm-drawer-tasks strong { font-size: 8px; }
.crm-drawer-tasks small { color: var(--muted); font-size: 7px; }
.crm-drawer-tasks article.completed { opacity: .55; }
.crm-drawer-tasks article.completed strong { text-decoration: line-through; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Focused authentication */
.auth-mode-badge { display: inline-flex; margin-bottom: 12px; padding: 6px 9px; border-radius: 999px; color: #557187; background: #edf4f9; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.auth-mode-badge--admin { color: #fff; background: var(--wine); }
.admin-login-launch { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 11px 14px; border: 1px solid #cfdee9; border-radius: 11px; cursor: pointer; color: var(--wine); text-align: left; background: #f5faff; }
.admin-login-launch > span { display: grid; gap: 4px; }
.admin-login-launch strong { font-size: 10px; }
.admin-login-launch small { color: #667d8f; font-size: 8px; }
.admin-login-launch > svg { margin-left: auto; }
.admin-login-launch--back { min-height: 38px; justify-content: center; color: #667784; background: transparent; font-size: 9px; font-weight: 800; }
.auth-single-page { min-height: 100svh; display: grid; place-items: center; padding: 25px; background: radial-gradient(circle at top left,#e8f4fb 0,transparent 35%),#f3f6f8; }
.auth-single-card { width: min(470px,100%); display: flex; align-items: stretch; flex-direction: column; padding: 38px; border: 1px solid #dce6ed; border-radius: 20px; background: #fff; box-shadow: 0 22px 70px rgba(9,52,83,.11); }
.auth-single-card .brand-logo { align-self: flex-start; margin-bottom: 36px; }
.auth-single-card h1 { margin: 7px 0 10px; color: #17344c; font-family: Georgia,serif; font-size: 31px; font-weight: 500; letter-spacing: -.035em; }
.auth-single-card > p { margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.auth-single-card .form-notice { margin-top: 14px; }
.single-page-link { margin-top: 18px; color: var(--wine); text-align: center; font-size: 10px; font-weight: 850; }
.single-page-button { justify-content: center; text-decoration: none; }
.confirmation-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #9c6d20; background: var(--amber-soft); }
.confirmation-mark--success { color: var(--green); background: var(--green-soft); }

/* Admin modules */
.admin-module-nav { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; margin-bottom: 14px; }
.admin-module-nav a { min-height: 88px; display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 4px 9px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; background: #fff; box-shadow: 0 7px 20px rgba(7,53,95,.025); transition: border-color .2s,transform .2s,box-shadow .2s; }
.admin-module-nav a:hover { border-color: #8eb5d1; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(7,53,95,.08); }
.admin-module-nav span { grid-row: 1 / span 2; align-self: center; color: #83a8c2; font-size: 8px; font-weight: 900; }
.admin-module-nav strong { color: #183951; font-size: 9px; }
.admin-module-nav small { color: var(--muted); font-size: 7px; }
.admin-topbar-title { color: #17344c; font-size: 10px; }

/* Accounting */
.accounting-admin,.orders-admin,.notifications-admin { max-width: 1800px; margin: 0 auto; }
.accounting-kpis,.order-admin-kpis,.notification-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-bottom: 14px; }
.accounting-kpis article,.order-admin-kpis article,.notification-kpis article { min-height: 103px; display: flex; justify-content: center; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.accounting-kpis small,.order-admin-kpis small,.notification-kpis small { color: var(--muted); font-size: 8px; font-weight: 750; }
.accounting-kpis strong,.order-admin-kpis strong,.notification-kpis strong { color: #173b55; font-size: 20px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.accounting-kpis span,.order-admin-kpis span,.notification-kpis span { color: #738695; font-size: 7px; }
.accounting-kpis .danger strong { color: #ad4353; }
.accounting-kpis .safe strong { color: var(--green); }
.accounting-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.55fr); gap: 14px; }
.accounting-ledger,.order-workspace { overflow: hidden; }
.ledger-type { display: inline-flex; padding: 5px 7px; border-radius: 12px; color: #9b6720; background: var(--amber-soft); font-size: 7px; font-weight: 850; }
.ledger-type.credit { color: var(--green); background: var(--green-soft); }
.overdue-accounts { align-self: start; padding: 19px; }
.overdue-accounts > div:last-child { display: grid; }
.overdue-accounts article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 9px; padding: 13px 0; border-top: 1px solid #edf0f2; }
.overdue-accounts article > div { display: grid; gap: 4px; }
.overdue-accounts strong { font-size: 8px; }
.overdue-accounts small { color: var(--muted); font-size: 7px; }
.overdue-accounts article > span { color: #ad4353; font-size: 9px; font-weight: 850; }
.overdue-accounts a { grid-column: 1 / -1; color: var(--wine); font-size: 7px; font-weight: 850; }

/* Orders */
.order-workspace { margin-bottom: 16px; }
.tracking-input { min-width: 130px; min-height: 32px; padding: 0 9px; border: 1px solid #d9e2e9; border-radius: 8px; outline: 0; font-size: 7px; }
.tracking-input:focus { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(11,79,138,.08); }

/* Notifications */
.notification-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(310px,.75fr); gap: 14px; margin-bottom: 14px; }
.notification-settings,.smtp-status { padding: 21px; }
.notification-settings > label { display: grid; gap: 7px; margin: 12px 0; }
.notification-settings > label span { color: var(--muted); font-size: 8px; font-weight: 750; }
.notification-settings > label input { min-height: 42px; padding: 0 12px; border: 1px solid #d9e2e9; border-radius: 9px; outline: 0; font-size: 9px; }
.notification-toggles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.notification-toggles label { display: flex; align-items: flex-start; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfd; }
.notification-toggles input { margin-top: 2px; accent-color: var(--wine); }
.notification-toggles span { display: grid; gap: 4px; }
.notification-toggles strong { font-size: 8px; }
.notification-toggles small { color: var(--muted); font-size: 7px; line-height: 1.45; }
.smtp-status h2 { margin: 7px 0 12px; color: #183951; font-size: 16px; }
.smtp-status > p { color: var(--muted); font-size: 8px; line-height: 1.65; }
.smtp-badge { display: inline-flex; padding: 6px 8px; border-radius: 13px; color: #96651d; background: var(--amber-soft); font-size: 7px; font-weight: 900; }
.smtp-badge.ready { color: var(--green); background: var(--green-soft); }
.smtp-status dl { display: grid; margin: 15px 0; border-top: 1px solid var(--line); }
.smtp-status dl div { display: flex; justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.smtp-status dt { color: var(--muted); font-size: 7px; }
.smtp-status dd { margin: 0; color: #24465e; font-size: 7px; font-weight: 800; }
.email-value { font-size: 11px !important; }
.notification-outbox { overflow: hidden; }
.notification-status { display: inline-flex; padding: 5px 7px; border-radius: 12px; color: #96651d; background: var(--amber-soft); font-size: 7px; font-weight: 850; }
.notification-status--sent { color: var(--green); background: var(--green-soft); }
.notification-status--failed { color: #ad4353; background: #fcecef; }

/* B2B sales workflow */
.checkout-drawer,.order-detail-drawer,.order-admin-drawer { width: min(620px,100%); }
.dealer-drawer--wide { width: min(590px,100%); }
.checkout-lines,.order-detail-lines { display: grid; gap: 8px; margin-bottom: 17px; }
.checkout-lines article { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfd; }
.checkout-lines article > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkout-lines strong,.order-detail-lines strong { font-size: 8px; }
.checkout-lines small,.order-detail-lines small { color: var(--muted); font-size: 7px; }
.checkout-lines input { min-height: 37px; padding: 0 10px; border: 1px solid #d9e2e9; border-radius: 8px; outline: 0; font-size: 8px; }
.checkout-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-top: 5px; padding: 15px; border-radius: 11px; color: #fff; background: var(--wine); }
.checkout-total span { color: rgba(255,255,255,.72); font-size: 7px; }
.checkout-total strong { font-size: 18px; }
.order-detail-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 15px; }
.order-detail-meta > div { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfd; }
.order-detail-meta small { color: var(--muted); font-size: 7px; }
.order-detail-meta strong { color: #183951; font-size: 8px; }
.revision-callout { margin-bottom: 15px; padding: 14px; border-left: 3px solid #c38c2d; border-radius: 0 10px 10px 0; background: var(--amber-soft); }
.revision-callout span { color: #94641e; font-size: 7px; font-weight: 900; letter-spacing: .08em; }
.revision-callout p,.order-general-note p { margin: 7px 0 0; color: #5b6570; font-size: 8px; line-height: 1.6; }
.order-detail-lines article { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.order-detail-lines article > div { display: grid; gap: 4px; }
.order-detail-lines span { color: #4f6779; font-size: 8px; }
.order-detail-lines b { color: #173b55; font-size: 8px; }
.order-general-note { margin: 14px 0; padding: 13px; border-radius: 10px; background: #f3f7fa; }
.order-general-note small { color: var(--muted); font-size: 7px; font-weight: 850; }
.revision-response { display: grid; gap: 11px; margin-top: 17px; padding: 15px; border: 1px solid #dce7ee; border-radius: 12px; background: #f7fbfd; }
.revision-response label { display: grid; gap: 7px; }
.revision-response label span { color: var(--muted); font-size: 8px; font-weight: 750; }
.revision-response textarea { padding: 11px; border: 1px solid #d9e2e9; border-radius: 9px; resize: vertical; font: inherit; font-size: 8px; }
.revision-response > div { display: flex; justify-content: flex-end; gap: 8px; }
.order-history { display: grid; gap: 0; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.order-history > article { min-height: 43px; display: grid; grid-template-columns: 11px minmax(0,1fr); align-items: center; gap: 8px; }
.order-history i { width: 7px; height: 7px; border-radius: 50%; background: var(--wine-2); box-shadow: 0 0 0 4px #e9f4fb; }
.order-history article > div { display: grid; gap: 3px; }
.order-history strong { text-transform: capitalize; font-size: 8px; }
.order-history small { color: var(--muted); font-size: 7px; }
.order-transition-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.portal-access-audit { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 12px; border-radius: 10px; background: #eef5fa; }
.portal-access-audit span { color: #62798a; font-size: 7px; }
.dealer-product-access { display: grid; gap: 10px; padding: 14px; border: 1px solid #dce7ee; border-radius: 11px; background: #f7fafc; }
.dealer-product-access > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dealer-product-access > div strong { font-size: 8px; }
.dealer-product-access > div small { color: var(--muted); font-size: 7px; }
.dealer-product-access > section { max-height: 230px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; overflow-y: auto; }
.dealer-product-access label { display: flex; align-items: flex-start; gap: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.dealer-product-access input { margin-top: 2px; accent-color: var(--wine); }
.dealer-product-access label span { display: grid; gap: 3px; }
.dealer-product-access label strong { font-size: 7px; }
.dealer-product-access label small { color: var(--muted); font-size: 6px; }

/* Price lists */
.pricing-admin { max-width: 1800px; margin: 0 auto; }
.pricing-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-bottom: 14px; }
.pricing-kpis article { min-height: 100px; display: flex; justify-content: center; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.pricing-kpis small { color: var(--muted); font-size: 8px; font-weight: 750; }
.pricing-kpis strong { color: #173b55; font-size: 20px; letter-spacing: -.04em; }
.pricing-kpis span { color: #738695; font-size: 7px; }
.pricing-layout { display: grid; grid-template-columns: minmax(250px,.38fr) minmax(0,1.62fr); gap: 14px; }
.price-list-nav { align-self: start; padding: 18px; }
.price-list-nav > button { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 4px 9px; padding: 12px; border: 1px solid transparent; border-top-color: var(--line); cursor: pointer; text-align: left; background: transparent; }
.price-list-nav > button.active { border-color: #b9d0df; border-radius: 10px; background: #edf6fb; }
.price-list-nav > button span { grid-row: 1 / span 2; align-self: center; padding: 5px 6px; border-radius: 7px; color: var(--wine); background: #fff; font-size: 6px; font-weight: 900; }
.price-list-nav > button strong { font-size: 8px; }
.price-list-nav > button small { color: var(--muted); font-size: 7px; }
.price-list-products { overflow: hidden; }
.pricing-input { width: 105px; min-height: 33px; padding: 0 8px; border: 1px solid #d9e2e9; border-radius: 8px; outline: 0; font-size: 8px; }
.pricing-input--qty { width: 70px; }

@media (max-width: 1180px) {
  .auth-shell { grid-template-columns: minmax(390px,.85fr) minmax(470px,1.15fr); }
  .auth-benefits { grid-template-columns: 1fr; gap: 9px; }
  .auth-benefits > div { padding-top: 10px; }
  .kpi-grid, .product-grid, .admin-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
  .crm-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-layout { grid-template-columns: 1fr; }
  .admin-module-nav { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .accounting-grid,.notification-layout { grid-template-columns: 1fr; }
  .pricing-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth-shell { display: block; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100svh; justify-content: flex-start; padding: 30px 22px 22px; }
  .auth-panel__mobile-brand { display: inline-flex; align-self: flex-start; margin-bottom: 55px; }
  .auth-card { margin-block: auto; }
  .portal-sidebar { transform: translateX(-100%); transition: transform .24s ease; }
  .portal-sidebar--open { transform: translateX(0); }
  .sidebar-close { display: grid; place-items: center; }
  .portal-main { width: 100%; margin-left: 0; }
  .mobile-menu { display: grid; }
  .overview-grid, .overview-grid--bottom, .payment-layout, .support-grid { grid-template-columns: 1fr; }
  .cart-dock { left: 20px; }
  .admin-sidebar { display: none; }
  .admin-main { width: 100%; margin-left: 0; }
  .dealer-toolbar { align-items: stretch; flex-direction: column; }
  .dealer-toolbar .table-search { width: 100%; }
  .dealer-toolbar > span { margin-left: 0; }
  .inventory-two-column { grid-template-columns: 1fr; }
  .crm-pipeline { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .accounting-kpis,.order-admin-kpis,.notification-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pricing-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .auth-heading h2 { font-size: 30px; }
  .auth-form--grid { grid-template-columns: 1fr; }
  .auth-form .span-2 { grid-column: auto; }
  .demo-launch__actions { grid-template-columns: 1fr; }
  .demo-ribbon { align-items: flex-start; flex-wrap: wrap; margin-top: -5px; }
  .demo-ribbon > button { margin-left: 27px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .auth-legal { padding-top: 28px; text-align: center; }
  .portal-topbar { padding-inline: 13px; }
  .portal-topbar .global-search { display: none; }
  .demo-pill { display: none; }
  .quick-order { padding: 0 11px; }
  .portal-content, .admin-content { padding: 23px 14px 40px; }
  .portal-heading { align-items: flex-start; flex-direction: column; }
  .portal-heading__action { width: 100%; }
  .portal-heading__action > * { width: 100%; justify-content: center; }
  .kpi-grid, .order-kpis, .aging-grid, .product-grid, .admin-kpis, .document-grid { grid-template-columns: 1fr; }
  .overview-grid { gap: 13px; }
  .compact-orders > div { grid-template-columns: 34px 1fr auto; padding-block: 8px; }
  .compact-orders .status, .compact-orders b { grid-column: 2; }
  .compact-orders > div > svg { display: none; }
  .bar-chart span { display: none; }
  .catalog-toolbar { padding: 12px; }
  .product-grid { padding-bottom: 120px; }
  .product-image { aspect-ratio: 1.22/1; }
  .product-body h2 { min-height: 0; }
  .cart-dock { right: 12px; bottom: 12px; left: 12px; align-items: flex-start; flex-direction: column; }
  .cart-dock > div { width: 100%; }
  .cart-dock > div button { margin-left: auto; }
  .data-toolbar { align-items: stretch; flex-direction: column; }
  .table-search { width: 100%; }
  .account-hero { grid-template-columns: 1fr; gap: 22px; padding: 23px; }
  .account-hero > a { justify-content: center; }
  .payment-methods { grid-template-columns: 1fr; }
  .admin-topbar { padding-inline: 14px; }
  .admin-topbar .global-search { display: none; }
  .application-list > div { grid-template-columns: 38px 1fr; padding-block: 10px; }
  .application-list time, .application-actions, .application-state { grid-column: 2; }
  .account-summary-grid { grid-template-columns: 1fr; }
  .dealer-status-filter { overflow-x: auto; padding-bottom: 3px; }
  .dealer-status-filter button { flex: 0 0 auto; }
  .security-grid { grid-template-columns: 1fr; }
  .heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .heading-actions > * { width: 100%; justify-content: center; }
  .crm-kpis, .crm-pipeline { grid-template-columns: 1fr; }
  .crm-contact-strip { align-items: stretch; flex-wrap: wrap; }
  .crm-contact-strip span { width: 100%; margin-left: 0; }
  .admin-module-nav,.accounting-kpis,.order-admin-kpis,.notification-kpis,.notification-toggles { grid-template-columns: 1fr; }
  .pricing-kpis { grid-template-columns: 1fr; }
  .order-detail-meta,.portal-access-audit { grid-template-columns: 1fr; }
  .dealer-product-access > section { grid-template-columns: 1fr; }
  .revision-response > div { align-items: stretch; flex-direction: column; }
  .auth-single-card { padding: 26px 21px; }
  .movement-list > div { grid-template-columns: 31px 1fr 40px; padding-block: 9px; }
  .movement-list time { display: none; }
}

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