/* GalaxyCRM demo. Brand colours are "r g b" triplets set by GX.theme.apply(). */
:root {
    --b50: 243 249 243; --b100: 230 243 231; --b200: 200 228 204; --b300: 158 203 163; --b400: 111 172 123;
    --b500: 69 138 86; --b600: 46 107 63; --b700: 35 81 50; --b800: 27 61 36; --b900: 18 40 26;
    --a50: 253 246 231; --a100: 250 232 196; --a200: 243 210 142; --a300: 232 182 88; --a400: 217 154 41;
    --a500: 179 125 24; --a600: 150 101 15; --a700: 122 82 12; --a800: 95 64 9; --a900: 70 47 7;
    --on-brand: 255 255 255;
    --on-accent: 17 24 39;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-head: 'Inter', system-ui, sans-serif;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --surface: #ffffff;
    --canvas: #f6f7f9;
    --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .font-head { font-family: var(--font-head); }
[hidden] { display: none !important; }
button { font: inherit; }
:focus-visible { outline: 2px solid rgb(var(--b500)); outline-offset: 2px; }

/* Boot */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: .9rem; }
.boot-dot { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgb(var(--b200)); border-top-color: rgb(var(--b600)); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Layout */
.app { display: flex; height: 100vh; overflow: hidden; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; overflow-y: auto; padding: 24px; outline: none; }
@media (max-width: 640px) { .main { padding: 16px; } }

/* Sidebar */
.sidebar { width: 256px; flex-shrink: 0; overflow-y: auto; display: flex; flex-direction: column; transition: transform .25s ease; }
.sb-brand .sidebar { background: rgb(var(--b900)); color: #fff; }
.sb-dark .sidebar { background: #111827; color: #fff; }
.sb-light .sidebar { background: #fff; color: var(--ink); border-right: 1px solid var(--line); }
.sb-head { padding: 20px 20px 16px; display: flex; align-items: center; gap: 12px; }
.sb-logo { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; background: rgb(var(--a400)); color: rgb(var(--on-accent)); }
.sb-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.sb-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.2; word-break: break-word; }
.sb-sub { font-size: .72rem; opacity: .6; margin-top: 2px; }
.sb-section { padding: 14px 20px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .5; }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 9px 20px; margin: 1px 10px; border-radius: 8px; font-size: .9rem; color: inherit; text-decoration: none; opacity: .82; transition: background .15s, opacity .15s; }
.sb-link i { width: 18px; text-align: center; opacity: .8; }
.sb-link:hover { opacity: 1; background: rgb(255 255 255 / .07); }
.sb-light .sb-link:hover { background: rgb(var(--b50)); }
.sb-link.active { opacity: 1; font-weight: 600; background: rgb(255 255 255 / .12); box-shadow: inset 3px 0 0 rgb(var(--a400)); }
.sb-light .sb-link.active { background: rgb(var(--b50)); color: rgb(var(--b800)); box-shadow: inset 3px 0 0 rgb(var(--b600)); }
.sb-link.active i { opacity: 1; color: rgb(var(--a300)); }
.sb-light .sb-link.active i { color: rgb(var(--b600)); }
.sb-count { margin-left: auto; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgb(var(--a400)); color: rgb(var(--on-accent)); }
.sb-foot { margin-top: auto; padding: 16px 20px; font-size: .72rem; opacity: .55; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid rgb(255 255 255 / .08); }
.sb-light .sb-user { border-top-color: var(--line); }
.sidebar-overlay { display: none; }
@media (max-width: 900px) {
    .sidebar { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; transform: translateX(-100%); }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / .45); }
}

/* Demo ribbon (GalaxyCRM's own bar, sits above the white-label system) */
.demobar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 16px; background: #12281A; color: #F3D28E; font-size: .8rem; font-family: 'Inter', sans-serif; }
.demobar strong { color: #fff; }
.demobar .db-spacer { flex: 1; }
.demobar button, .demobar a { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgb(243 210 142 / .35); background: transparent; color: #FAE8C4; padding: 4px 10px; border-radius: 99px; font-size: .76rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.demobar button:hover, .demobar a:hover { background: rgb(243 210 142 / .12); }
.demobar .db-cta { background: #D99A29; color: #12281A; border-color: #D99A29; font-weight: 700; }
.demobar .db-cta:hover { background: #E8B658; }
.demobar { flex-wrap: nowrap; overflow-x: auto; }
@media (max-width: 1280px) { .demobar .db-hide-md { display: none; } }
@media (max-width: 720px) { .demobar .db-hide-sm, .site-bar .db-hide-sm { display: none; } }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 1.3rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-menu { display: none; }
@media (max-width: 900px) { .tb-menu { display: inline-flex; } .topbar { padding: 10px 16px; } }
.tb-search { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: .85rem; background: var(--canvas); cursor: pointer; min-width: 220px; }
.tb-search kbd { margin-left: auto; font-size: .7rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: #fff; }
@media (max-width: 640px) { .tb-search { min-width: 0; } .tb-search span, .tb-search kbd { display: none; } }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; color: #4b5563; cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { background: var(--canvas); }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: #dc2626; color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }

/* Building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-size: .875rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: rgb(var(--b600)); color: rgb(var(--on-brand)); }
.btn-primary:hover { background: rgb(var(--b700)); }
.btn-accent { background: rgb(var(--a400)); color: rgb(var(--on-accent)); }
.btn-accent:hover { background: rgb(var(--a300)); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--canvas); }
.btn-danger { background: #fff; color: #b91c1c; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 6px 11px; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.link { color: rgb(var(--b700)); font-weight: 600; text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }
label.lbl { display: block; font-size: .78rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.inp { width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 9px; font: inherit; font-size: .9rem; background: #fff; color: var(--ink); }
.inp:focus { outline: none; border-color: rgb(var(--b500)); box-shadow: 0 0 0 3px rgb(var(--b500) / .18); }
textarea.inp { resize: vertical; min-height: 80px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: rgb(var(--b600)); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }

/* Tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tbl th { text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fafafa; white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid #f1f2f4; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover td { background: rgb(var(--b50) / .6); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Badges (status: icon + label, never colour alone) */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: .72rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge i { font-size: .65rem; }
.b-good { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.b-warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.b-bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.b-info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.b-neutral { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.b-brand { background: rgb(var(--b50)); color: rgb(var(--b800)); border-color: rgb(var(--b200)); }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 600; background: rgb(var(--a100)); color: rgb(var(--a800)); }

/* Tabs / segmented */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 10px 14px; font-size: .875rem; font-weight: 600; color: var(--muted); border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tab.active { color: rgb(var(--b700)); border-bottom-color: rgb(var(--b600)); }
.seg { display: inline-flex; padding: 3px; background: #eef0f3; border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: .8rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

/* Avatars */
.av { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; background: rgb(var(--b100)); color: rgb(var(--b800)); }
.av-lg { width: 56px; height: 56px; font-size: 1.1rem; }

/* Stat tiles */
.stat { padding: 18px 20px; }
.stat .k { font-size: .8rem; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 1.65rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .d { font-size: .78rem; margin-top: 4px; color: var(--muted); }
.stat .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--b50)); color: rgb(var(--b600)); }

/* Charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .bar { fill: rgb(var(--b500)); transition: fill .15s; }
.chart .bar.dim { fill: rgb(var(--b200)); }
.chart .hit:hover + .bar, .chart .bar.hover { fill: rgb(var(--b700)); }
.chart .grid { stroke: #eef0f3; stroke-width: 1; }
.chart .axis { fill: #9ca3af; font-size: 11px; font-family: var(--font-body); }
.chart-tip { position: absolute; pointer-events: none; background: #111827; color: #fff; font-size: .75rem; padding: 6px 9px; border-radius: 7px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; z-index: 2; }
.chart-tip.show { opacity: 1; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; align-items: center; gap: 10px; font-size: .85rem; padding: 5px 0; }
.hbar .track { height: 10px; background: #f1f2f4; border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; background: rgb(var(--b500)); }

/* Overlays */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgb(17 24 39 / .5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; box-shadow: 0 25px 60px rgb(0 0 0 / .25); animation: pop .18s ease; }
.modal.lg { max-width: 820px; } .modal.xl { max-width: 1060px; } .modal.sm { max-width: 420px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fafafa; border-radius: 0 0 16px 16px; flex-wrap: wrap; }
.overlay.drawer { padding: 0; justify-content: flex-end; align-items: stretch; }
.overlay.drawer .modal { max-width: 520px; border-radius: 0; height: 100%; overflow-y: auto; animation: slide .2s ease; display: flex; flex-direction: column; }
.overlay.drawer .modal-body { flex: 1; }
.overlay.drawer .modal-foot { border-radius: 0; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

/* Toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: 360px; background: #111827; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: .85rem; box-shadow: 0 12px 30px rgb(0 0 0 / .25); animation: pop .2s ease; cursor: pointer; }
.toast i { margin-top: 2px; }
.toast.success i { color: #34d399; } .toast.error i { color: #f87171; } .toast.info i { color: #93c5fd; } .toast.event i { color: #fbbf24; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .25s; }

/* Empty state */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty i { font-size: 2rem; color: rgb(var(--b300)); margin-bottom: 12px; display: block; }

/* Missions */
.mission { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: .875rem; border-bottom: 1px dashed var(--line); }
.mission:last-child { border-bottom: 0; }
.mission .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #d1d5db; display: grid; place-items: center; flex-shrink: 0; font-size: .7rem; color: transparent; }
.mission.done .tick { background: rgb(var(--b600)); border-color: rgb(var(--b600)); color: #fff; }
.mission.done .mt { text-decoration: line-through; color: var(--muted); }
.progress { height: 8px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: rgb(var(--b500)); border-radius: 99px; transition: width .4s; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #eef0f3; border-radius: 12px; padding: 10px; min-height: 300px; transition: background .15s; }
.kcol.over { background: rgb(var(--b100)); }
.kcol-head { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; font-weight: 700; padding: 4px 6px 10px; color: #374151; }
.kcard { background: #fff; border-radius: 10px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line); cursor: grab; font-size: .85rem; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.kcard:hover { border-color: rgb(var(--b300)); }
.kcard.dragging { opacity: .5; }

/* Calendar */
.cal { display: grid; grid-template-columns: 56px repeat(var(--days, 7), minmax(110px, 1fr)); min-width: 760px; position: relative; }
.cal-h { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: center; font-size: .78rem; font-weight: 600; }
.cal-h.today { color: rgb(var(--b700)); }
.cal-h.today b { background: rgb(var(--b600)); color: rgb(var(--on-brand)); border-radius: 99px; padding: 1px 7px; }
.cal-t { font-size: .7rem; color: var(--muted); text-align: right; padding: 0 8px; height: 48px; transform: translateY(-7px); }
.cal-c { height: 48px; border-left: 1px solid #f1f2f4; border-bottom: 1px solid #f1f2f4; cursor: pointer; }
.cal-c:hover { background: rgb(var(--b50)); }
.cal-ev { position: absolute; border-radius: 8px; padding: 4px 7px; font-size: .72rem; line-height: 1.25; overflow: hidden; cursor: pointer; border-left: 3px solid rgb(0 0 0 / .25); color: #111827; box-shadow: 0 1px 3px rgb(0 0 0 / .1); }
.cal-ev.cancelled { opacity: .45; text-decoration: line-through; }
.cal-ev.completed { opacity: .75; }

/* POS */
.pos { display: grid; grid-template-columns: 1fr 380px; gap: 16px; height: calc(100vh - 170px); min-height: 520px; }
@media (max-width: 1000px) { .pos { grid-template-columns: 1fr; height: auto; } }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; align-content: start; overflow-y: auto; padding: 2px; }
.pos-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: left; cursor: pointer; transition: border-color .15s, transform .05s; }
.pos-item:hover { border-color: rgb(var(--b400)); }
.pos-item:active { transform: scale(.98); }
.pos-item .em { font-size: 1.8rem; height: 56px; display: grid; place-items: center; border-radius: 10px; background: rgb(var(--b50)); margin-bottom: 8px; }
.pos-item.out { opacity: .45; cursor: not-allowed; }
.emoji-tile { display: grid; place-items: center; border-radius: 10px; background: rgb(var(--b50)); flex-shrink: 0; }

/* Customer-facing site */
.site { min-height: 100vh; background: #fff; }
.site-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: #12281A; color: #FAE8C4; font-size: .8rem; }
.site-bar .db-spacer { flex: 1; }
.site-bar button { border: 1px solid rgb(243 210 142 / .35); background: transparent; color: #FAE8C4; padding: 4px 10px; border-radius: 99px; font-size: .76rem; cursor: pointer; }
.site-bar button.on { background: #D99A29; color: #12281A; border-color: #D99A29; font-weight: 700; }
.site-nav { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 37px; z-index: 40; }
.site-nav a:not(.btn), .site-nav button.navlink { color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; background: none; border: 0; cursor: pointer; }
.site-nav a.on, .site-nav button.navlink.on { color: rgb(var(--b700)); font-weight: 700; }
.site-hero { background: linear-gradient(135deg, rgb(var(--b800)), rgb(var(--b600))); color: rgb(var(--on-brand)); padding: 72px 24px; }
.site-wrap { max-width: 1100px; margin: 0 auto; }
.site-section { padding: 56px 24px; }
.site-foot { background: rgb(var(--b900)); color: rgb(255 255 255 / .75); padding: 32px 24px; font-size: .85rem; }

/* Documents (quotes, invoices, receipts) */
.doc { background: #fff; color: #111827; padding: 44px; font-size: .88rem; max-width: 820px; margin: 0 auto; }
.doc-top { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 22px; border-bottom: 3px solid rgb(var(--b600)); }
.doc-logo { max-height: 64px; max-width: 200px; object-fit: contain; }
.doc-title { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: rgb(var(--b700)); text-align: right; letter-spacing: .02em; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.doc th { background: rgb(var(--b600)); color: rgb(var(--on-brand)); text-align: left; padding: 9px 12px; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.doc td { padding: 10px 12px; border-bottom: 1px solid #eee; }
.doc .tot td { border: 0; padding: 5px 12px; }
.doc .tot .grand td { font-size: 1.05rem; font-weight: 800; color: rgb(var(--b800)); border-top: 2px solid rgb(var(--b600)); padding-top: 10px; }
@media (max-width: 640px) { .doc { padding: 22px; } .doc-top { flex-direction: column; } .doc-title { text-align: left; } }

/* Phone mock (WhatsApp preview) */
.phone { width: 300px; max-width: 100%; border-radius: 34px; border: 10px solid #111827; background: #e5ddd5; overflow: hidden; box-shadow: 0 20px 40px rgb(0 0 0 / .18); margin: 0 auto; }
.phone-top { background: #075e54; color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.phone-body { padding: 14px 10px; min-height: 360px; display: flex; flex-direction: column; gap: 8px; }
.bubble { background: #fff; border-radius: 0 10px 10px 10px; padding: 8px 10px 4px; font-size: .8rem; max-width: 88%; box-shadow: 0 1px 1px rgb(0 0 0 / .1); white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: #dcf8c6; border-radius: 10px 0 10px 10px; }
.bubble small { display: block; text-align: right; color: #999; font-size: .65rem; }

/* Command palette */
.cmd { max-width: 620px; }
.cmd-input { width: 100%; border: 0; padding: 18px 20px; font-size: 1rem; outline: none; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.cmd-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmd-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: .9rem; }
.cmd-item.sel, .cmd-item:hover { background: rgb(var(--b50)); }
.cmd-item i { width: 18px; text-align: center; color: rgb(var(--b600)); }

/* Swatches & wizard */
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.sel { box-shadow: 0 0 0 2px rgb(var(--b700)); }
.opt-card { border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; text-align: left; background: #fff; transition: border-color .15s, background .15s; width: 100%; }
.opt-card:hover { border-color: rgb(var(--b300)); }
.opt-card.sel { border-color: rgb(var(--b600)); background: rgb(var(--b50)); }
.steps { display: flex; gap: 6px; }
.steps span { height: 4px; flex: 1; border-radius: 99px; background: #e5e7eb; }
.steps span.on { background: rgb(var(--b600)); }
.dropzone { border: 2px dashed #d1d5db; border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; color: var(--muted); font-size: .85rem; }
.dropzone:hover, .dropzone.over { border-color: rgb(var(--b500)); background: rgb(var(--b50)); }

/* Print: only the document */
.print-area { display: none; }
@media print {
    body > *:not(#printArea) { display: none !important; }
    .print-area { display: block !important; }
    .doc { padding: 0; max-width: none; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
