/* Colibrí — "tropical modern": warm paper, deep plumage greens and an iridescent hummingbird accent.
   Every color that follows the company's palette reads --brand, --brand-strong, --accent, --sidebar and --brand-tint,
   which ThemePalette.CssVariables sets on the shell. The values in :root are Colibrí's own palette. */

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("lib/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("lib/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Fraunces";
    src: url("lib/fonts/fraunces-latin.woff2") format("woff2");
    font-weight: 500 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Fraunces";
    src: url("lib/fonts/fraunces-latin-ext.woff2") format("woff2");
    font-weight: 500 800;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --brand: #0E8F74;
    --brand-strong: #0A6E5A;
    --accent: #E8417C;
    --sidebar: #0B2E2A;
    --brand-tint: #E6F5F1;

    --paper: #F7F5F0;
    --surface: #FFFFFF;
    --ink: #14231F;
    --ink-soft: #46554F;
    --muted: #7C8985;
    --line: #E7E2D8;
    --line-soft: #F0ECE4;
    --danger: #D6336C;
    --warning: #E8890C;
    --success: #2B9348;

    --plumage: linear-gradient(120deg, #0B6E5B 0%, #12B886 38%, #3BC9DB 64%, #E8417C 100%);
    --font-display: "Fraunces", "Georgia", serif;
    --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(20, 35, 31, .06), 0 1px 1px rgba(20, 35, 31, .04);
    --shadow: 0 8px 28px -12px rgba(20, 35, 31, .18), 0 2px 6px rgba(20, 35, 31, .05);
    --shadow-lg: 0 30px 60px -24px rgba(11, 46, 42, .35);
    --sidebar-width: 264px;
}

/* ---------- Base ---------- */

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 650; letter-spacing: -.015em; color: var(--ink); font-variation-settings: "SOFT" 60, "WONK" 0; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.2rem); line-height: 1.12; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.08rem; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; }

::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

h1:focus { outline: none; }

.eyebrow, .section-kicker {
    font-family: var(--font-body);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: .45rem;
}

.optional { color: var(--muted); font-weight: 400; font-size: .85em; }


/* ---------- Buttons ---------- */

.btn { font-weight: 600; border-radius: var(--radius-sm); padding: .55rem 1.05rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease; }
.btn-lg { padding: .78rem 1.35rem; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: .35rem .75rem; font-size: .85rem; }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-brand { background: var(--brand); color: #fff; border: 1px solid var(--brand); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn-brand:hover, .btn-brand:focus-visible { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.btn-brand:disabled, .btn-brand.disabled { background: var(--brand); border-color: var(--brand); color: #fff; opacity: .6; }

.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--brand-tint); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); color: var(--brand-strong); }

.btn-link { color: var(--brand); font-weight: 600; text-decoration: none; }

.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; color: var(--ink-soft); border: 1px solid transparent; background: transparent; }
.btn-icon:hover { background: var(--brand-tint); color: var(--brand-strong); }
.btn-icon-danger:hover { background: #FCE8EF; color: var(--danger); }

/* ---------- Forms ---------- */

.field { margin-bottom: 1.1rem; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend, .field-label-row label { display: block; font-size: .86rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .4rem; }
.field legend { float: none; width: auto; }
.field-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field-hint { color: var(--muted); font-size: .8rem; margin-top: .35rem; display: block; }

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    padding: .62rem .85rem;
    font-size: .95rem;
    background-color: var(--surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.form-control:disabled { background: var(--line-soft); color: var(--ink-soft); }
.form-control.invalid, .form-control.modified.invalid { border-color: var(--danger); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); border-color: var(--brand); }
.validation-message { color: var(--danger); font-size: .82rem; margin-top: .35rem; }

.input-icon { position: relative; }
.input-icon > .bi { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .form-control { padding-left: 2.5rem; }
.password-input .form-control { padding-right: 2.75rem; }
.password-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 8px; }
.password-toggle:hover { color: var(--brand); background: var(--brand-tint); }

.nit-input { display: flex; align-items: stretch; }
.nit-input .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; font-variant-numeric: tabular-nums; }
.nit-dv { display: inline-flex; align-items: center; gap: .3rem; padding: 0 .9rem; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--brand-tint); color: var(--ink-soft); font-size: .8rem; font-weight: 600; }
.nit-dv strong { color: var(--brand-strong); font-size: 1.05rem; font-variant-numeric: tabular-nums; min-width: .8em; text-align: center; }

.form-actions { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .5rem; }

/* ---------- Notices ---------- */

.notice { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .92rem; animation: drop-in .25s ease; }
.notice > .bi { font-size: 1.1rem; margin-top: .05rem; }
.notice-body { flex: 1; }
.notice-body ul { padding-left: 1.1rem; margin: 0; }
.notice .btn-close { font-size: .7rem; margin-top: .2rem; }
.notice-success { background: #EAF6EE; border-color: #CBE8D4; color: #1F6B35; }
.notice-error { background: #FDEEF3; border-color: #F7CFDD; color: #A51D4E; }
.notice-info { background: var(--brand-tint); border-color: color-mix(in srgb, var(--brand) 25%, transparent); color: var(--brand-strong); }

/* ---------- Logo ---------- */

.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); }
.logo img { border-radius: 28%; flex: none; }
.logo-name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; display: inline-flex; align-items: flex-start; }
.logo-dot { width: .38em; height: .38em; border-radius: 50%; background: var(--accent); margin-left: .12em; margin-top: .22em; }
.logo-inverse { color: #fff; }

/* ---------- Plumes (decorative blurred blobs) ---------- */

.plume { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
.plume-1 { width: 420px; height: 420px; background: #12B886; top: -120px; right: -120px; }
.plume-2 { width: 340px; height: 340px; background: #E8417C; bottom: -140px; left: -80px; animation-delay: -6s; opacity: .4; }
.plume-3 { width: 260px; height: 260px; background: #3BC9DB; top: 40%; left: 45%; animation-delay: -11s; opacity: .35; }

/* ---------- Auth pages ---------- */

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; }

.auth-art { position: relative; overflow: hidden; background: #0B2E2A; color: #fff; }
.auth-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent); }
.auth-art-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem clamp(2rem, 4vw, 4rem); }
.auth-art-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 700; color: #8CE99A; }
.auth-art h2 { color: #fff; font-size: clamp(1.8rem, 1rem + 1.8vw, 2.6rem); line-height: 1.12; font-weight: 600; max-width: 14ch; margin-bottom: 2rem; }
.auth-art-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.auth-art-points li { display: flex; gap: .8rem; align-items: center; color: rgba(255,255,255,.86); font-size: .98rem; }
.auth-art-points .bi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #8CE99A; flex: none; }
.auth-art-foot { color: rgba(255,255,255,.6); font-size: .88rem; margin: 0; }

.auth-main { display: flex; flex-direction: column; padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 3rem; }
.auth-top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.auth-home:hover { text-decoration: none; }
.auth-art-home { align-self: flex-start; color: inherit; text-decoration: none; border-radius: 12px; }
.auth-art-home:hover, .auth-art-home:focus-visible { text-decoration: none; opacity: .85; }
.auth-mobile-logo { visibility: hidden; }
.auth-card { width: 100%; max-width: 440px; margin: auto; padding-top: 2rem; animation: rise .45s cubic-bezier(.2, .7, .2, 1); }
.auth-card-wide { max-width: 620px; }
.auth-title { margin-bottom: .4rem; }
.auth-subtitle { color: var(--ink-soft); margin-bottom: 1.6rem; }
.auth-alt { margin-top: 1.6rem; text-align: center; color: var(--ink-soft); font-size: .92rem; }
.auth-done { text-align: center; }
.auth-done-icon { width: 76px; height: 76px; margin: 0 auto 1.4rem; border-radius: 24px; display: grid; place-items: center; font-size: 2.1rem; color: #fff; background: var(--plumage); box-shadow: var(--shadow-lg); animation: pop .5s cubic-bezier(.2, .9, .3, 1.3); }
.trial-note { display: inline-flex; gap: .5rem; align-items: center; background: #FFF4E6; color: #9C4F00; border-radius: 999px; padding: .45rem 1rem; font-size: .88rem; font-weight: 600; margin-bottom: 1.5rem; }

.language-picker { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); }
.language-picker .form-select { width: auto; border-radius: 999px; padding: .3rem 2rem .3rem .8rem; font-size: .85rem; }

/* Wizard */
.wizard-steps { list-style: none; padding: 0; margin: 0 0 1.6rem; display: flex; gap: .5rem; }
.wizard-steps li { flex: 1; display: flex; align-items: center; gap: .55rem; font-size: .84rem; font-weight: 600; color: var(--muted); padding-bottom: .7rem; border-bottom: 3px solid var(--line); }
.wizard-steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink-soft); font-size: .8rem; }
.wizard-steps li.is-active { color: var(--ink); border-color: var(--brand); }
.wizard-steps li.is-active span { background: var(--brand); color: #fff; }
.wizard-steps li.is-done { color: var(--brand-strong); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.wizard-steps li.is-done span { background: var(--brand-tint); color: var(--brand-strong); }
.wizard-actions { display: flex; gap: .75rem; }

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.type-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; padding: .85rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; font-size: .86rem; font-weight: 600; color: var(--ink-soft); transition: all .15s ease; }
.type-tile .bi { font-size: 1.35rem; color: var(--muted); }
.type-tile:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.type-tile.is-selected { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.type-tile.is-selected .bi { color: var(--brand); }

/* Context picker */
.context-list { display: grid; gap: .6rem; }
.context-card { display: flex; align-items: center; gap: .9rem; width: 100%; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; transition: all .15s ease; }
.context-card:hover:not(:disabled) { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.context-card.is-current { border-color: var(--brand); background: var(--brand-tint); }
.context-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-strong); font-weight: 700; flex: none; }
.context-icon-platform { background: #0B2E2A; color: #8CE99A; font-size: 1.2rem; }
.context-icon-platform .logo img { display: block; }
.context-icon-logo { background: #fff; border: 1px solid var(--line); overflow: hidden; padding: 3px; }
.context-icon-logo img { width: 100%; height: 100%; object-fit: contain; }
.context-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.context-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-text small { color: var(--muted); }
.context-go { color: var(--muted); }
.context-type { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--line-soft); color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Landing ---------- */

.landing { overflow-x: hidden; }
.landing-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 2rem; padding: .9rem clamp(1.25rem, 5vw, 4.5rem); background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.landing-brand:hover { text-decoration: none; }
.landing-links { display: flex; gap: 1.6rem; flex: 1; }
.landing-links a { color: var(--ink-soft); font-weight: 600; font-size: .93rem; }
.landing-links a:hover { color: var(--brand); text-decoration: none; }
.landing-nav-actions { display: flex; align-items: center; gap: .6rem; }

.hero { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem); max-width: 1320px; margin: 0 auto; }
.hero-kicker { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 700; color: var(--brand-strong); box-shadow: var(--shadow-sm); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(232, 65, 124, .6); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.3rem); line-height: 1.02; letter-spacing: -.035em; margin: 1.2rem 0 1.3rem; font-weight: 600; }
.hero h1 em { font-style: italic; font-weight: 500; background: var(--plumage); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.hero-lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 36rem; line-height: 1.6; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 2rem 0 1.2rem; }
.hero-trust { color: var(--ink-soft); font-size: .9rem; display: flex; gap: .5rem; align-items: center; }
.hero-trust .bi { color: var(--accent); }

.hero-visual { position: relative; min-height: 470px; }
.hero-visual .plume-1 { top: -40px; right: 0; width: 360px; height: 360px; }
.hero-visual .plume-2 { bottom: -30px; left: 10%; width: 300px; height: 300px; }
.mock-pos { position: relative; z-index: 2; width: min(420px, 92%); margin: 1.5rem auto 0; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 1.15rem; transform: rotate(-2deg); }
.mock-pos-head { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: .9rem; }
.mock-dots { display: inline-flex; gap: 5px; }
.mock-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock-dots i:first-child { background: #FF8787; }
.mock-dots i:nth-child(2) { background: #FFD43B; }
.mock-dots i:nth-child(3) { background: #69DB7C; }
.mock-search { display: flex; gap: .6rem; align-items: center; padding: .7rem .85rem; border-radius: 12px; background: var(--paper); border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-soft); letter-spacing: .06em; }
.mock-search .bi { color: var(--brand); font-size: 1.15rem; }
.mock-lines { list-style: none; padding: 0; margin: .85rem 0; }
.mock-lines li { display: grid; grid-template-columns: 1fr auto 5.2rem; gap: .8rem; padding: .55rem .2rem; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.mock-lines li span:nth-child(2) { color: var(--muted); }
.mock-lines li strong { text-align: right; font-variant-numeric: tabular-nums; }
.mock-lines li:first-child { animation: flash 3.5s ease 1.2s infinite; border-radius: 8px; }
.mock-total { display: flex; justify-content: space-between; align-items: baseline; padding: .4rem .2rem .8rem; }
.mock-total span { color: var(--ink-soft); font-weight: 600; }
.mock-total strong { font-family: var(--font-display); font-size: 2rem; letter-spacing: -.02em; }
.mock-pay { display: flex; gap: .45rem; flex-wrap: wrap; }
.mock-chip { display: inline-flex; gap: .35rem; align-items: center; padding: .38rem .7rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand-strong); font-size: .78rem; font-weight: 700; }
.mock-badge { position: absolute; z-index: 3; top: 8%; left: -2%; display: flex; gap: .7rem; align-items: center; padding: .8rem 1rem; border-radius: 16px; background: #0B2E2A; color: #fff; box-shadow: var(--shadow-lg); animation: float 6s ease-in-out infinite; }
.mock-badge .bi { font-size: 1.6rem; color: #8CE99A; }
.mock-badge strong { display: block; font-size: .9rem; }
.mock-badge small { color: rgba(255,255,255,.65); font-size: .74rem; letter-spacing: .04em; }
.mock-stock { position: absolute; z-index: 3; bottom: -7%; right: -2%; width: 190px; padding: .9rem 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: float 7s ease-in-out -3s infinite; }
.mock-stock small { color: var(--muted); font-weight: 600; font-size: .75rem; }
.mock-stock strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--brand-strong); }
.mock-bars { display: flex; align-items: flex-end; gap: 5px; height: 44px; margin-top: .4rem; }
.mock-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--brand) 30%, transparent); }
.mock-bars i:last-child { background: var(--accent); }

.landing-section { padding: clamp(3rem, 6vw, 5.5rem) clamp(1.25rem, 5vw, 4.5rem); max-width: 1320px; margin: 0 auto; text-align: center; }
.landing-section h2 { font-size: clamp(1.7rem, 1.1rem + 1.8vw, 2.6rem); max-width: 24ch; margin: 0 auto 2.4rem; line-height: 1.12; }
.business-strip { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; }
.business-pill { display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.25rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.business-pill:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.business-pill .bi { color: var(--brand); font-size: 1.15rem; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: left; }
.feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.feature-card h3 { margin: 1.1rem 0 .45rem; }
.feature-card p { color: var(--ink-soft); font-size: .92rem; margin: 0; line-height: 1.55; }
.feature-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-strong); font-size: 1.3rem; flex: none; }
.feature-card:nth-child(4n+2) .feature-icon { background: #FCE8EF; color: #C2255C; }
.feature-card:nth-child(4n+3) .feature-icon { background: #E3FAFC; color: #0C8599; }
.feature-card:nth-child(4n) .feature-icon { background: #FFF4E6; color: #D9480F; }

.invoice-band { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; margin: 2rem clamp(1rem, 4vw, 3rem); padding: clamp(2.5rem, 5vw, 4.5rem); border-radius: 32px; background: #0B2E2A; color: #fff; overflow: hidden; }
.invoice-band::before { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%; background: var(--plumage); filter: blur(90px); opacity: .45; }
.invoice-band > * { position: relative; }
.invoice-band h2 { color: #fff; font-size: clamp(1.7rem, 1.1rem + 1.8vw, 2.5rem); line-height: 1.12; margin-bottom: 1rem; }
.invoice-band p { color: rgba(255,255,255,.78); font-size: 1.05rem; line-height: 1.6; }
.invoice-band .section-kicker { color: #8CE99A; }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.check-list li { display: flex; gap: .65rem; align-items: center; }
.check-list .bi { color: #8CE99A; font-size: 1.15rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { display: flex; gap: 1rem; padding: 1.2rem 1.3rem; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); }
.steps li > span { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; background: #fff; color: #0B2E2A; }
.steps strong { display: block; margin-bottom: .2rem; }
.steps p { margin: 0; font-size: .92rem; color: rgba(255,255,255,.7); }

.cta-band { text-align: center; padding: clamp(3rem, 6vw, 5rem) 1.5rem; margin: 3rem clamp(1rem, 4vw, 3rem); border-radius: 32px; background: var(--plumage); color: #fff; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.7rem); max-width: 22ch; margin: 0 auto 1rem; }
.cta-band p { max-width: 40rem; margin: 0 auto 2rem; font-size: 1.05rem; color: rgba(255,255,255,.9); }
.cta-band .btn-light { color: #0B2E2A; font-weight: 700; }

.landing-footer { display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; padding: 2rem 1.5rem 3rem; color: var(--muted); font-size: .88rem; }

/* ---------- App shell ---------- */

.shell { min-height: 100vh; display: flex; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 40; display: flex; flex-direction: column; background: var(--sidebar); color: rgba(255,255,255,.82); transition: transform .25s ease, background-color .3s ease; }
.sidebar::before { content: ""; position: absolute; top: 0; right: 0; width: 3px; height: 100%; background: linear-gradient(180deg, var(--brand), var(--accent)); opacity: .9; }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.35rem 1.2rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.08); color: inherit; text-decoration: none; }
.sidebar-brand:hover, .sidebar-brand:focus-visible { text-decoration: none; background: rgba(255,255,255,.04); }
.company-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: #fff; padding: 3px; flex: none; }
.company-initials { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--accent)); flex: none; }
.company-initials-lg { width: 96px; height: 96px; border-radius: 24px; font-size: 2.2rem; }
.sidebar-company { min-width: 0; display: flex; flex-direction: column; }
.sidebar-company strong { color: #fff; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-company small { color: rgba(255,255,255,.55); font-size: .78rem; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .8rem .75rem; }
.nav-section { margin: 1.1rem .7rem .4rem; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; margin-bottom: 2px; border-radius: 10px; color: rgba(255,255,255,.78); font-weight: 600; font-size: .93rem; transition: background-color .15s ease, color .15s ease; }
.nav-item .bi { font-size: 1.1rem; width: 1.3rem; text-align: center; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-item.active { background: color-mix(in srgb, var(--brand) 85%, #fff 0%); color: #fff; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--brand) 90%, transparent); }
.nav-item.active .bi { opacity: 1; }
.nav-item-soon { cursor: default; color: rgba(255,255,255,.42); }
.nav-item-soon:hover { background: transparent; color: rgba(255,255,255,.42); }
.nav-item-soon em { margin-left: auto; font-style: normal; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.55); }

.sidebar-foot { padding: 1rem 1.2rem 1.3rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-powered { opacity: .55; background: none; border: 0; padding: .2rem; margin: -.2rem; border-radius: 8px; color: inherit; cursor: pointer; transition: opacity .15s ease; }
.sidebar-powered:hover, .sidebar-powered:focus-visible { opacity: 1; }
.sidebar-powered .logo-name { font-size: 1rem; }
.sidebar-version { font-size: .76rem; color: rgba(255,255,255,.45); }

.shell-main { flex: 1; min-width: 0; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.shell-scrim { display: none; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .9rem; min-height: 68px; padding: 0 clamp(1rem, 3vw, 2.2rem); background: color-mix(in srgb, var(--paper) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-menu { display: none; border: 0; background: transparent; font-size: 1.6rem; color: var(--ink); width: 42px; height: 42px; border-radius: 10px; }
.topbar-spacer { flex: 1; }
.trial-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .85rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand-strong); font-size: .82rem; font-weight: 700; }
.trial-chip-soon { background: #FFF4E6; color: #B35C00; }
/* The trial chip with the invitation to the online store under it */
.topbar-info { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-width: 0; padding: .45rem 0; }
.store-invite { display: flex; align-items: center; gap: .15rem; min-width: 0; font-size: .8rem; color: var(--ink-soft); }
.store-invite-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-invite-text a { color: var(--brand-strong); font-weight: 600; }
.store-invite .btn-icon { width: 30px; height: 30px; font-size: .95rem; }

.user-menu { position: relative; }
.user-menu-button { display: flex; align-items: center; gap: .7rem; border: 1px solid transparent; background: transparent; padding: .3rem .55rem .3rem .3rem; border-radius: 999px; color: var(--ink); }
.user-menu-button:hover { background: var(--surface); border-color: var(--line); }
.user-menu-text { display: flex; flex-direction: column; text-align: left; line-height: 1.2; max-width: 220px; }
.user-menu-text strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-text small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-backdrop { position: fixed; inset: 0; z-index: 1; }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 2; width: 260px; padding: .45rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: drop-in .18s ease; }
.user-menu-who { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--line-soft); margin-bottom: .3rem; display: flex; flex-direction: column; }
.user-menu-who small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.user-menu-panel a, .user-menu-panel button { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .7rem; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-weight: 600; font-size: .9rem; text-align: left; }
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--brand-tint); color: var(--brand-strong); text-decoration: none; }
.user-menu-panel .bi { color: var(--muted); }

.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .82rem; color: var(--brand-strong); background: var(--brand-tint); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.avatar-square { border-radius: 11px; font-size: 1rem; }
.company-avatar { position: relative; flex: none; }
.avatar-logo { background: #fff; overflow: hidden; padding: 3px; }
.avatar-logo img { width: 100%; height: 100%; object-fit: contain; }
.avatar-type { position: absolute; right: -7px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; background: var(--brand); color: #fff; border: 2px solid var(--surface); }

.content { flex: 1; padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1rem, 3vw, 2.4rem) 5rem; width: 100%; min-width: 0; }

/* ---------- Page building blocks ---------- */

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; animation: rise .35s ease; }
.page-header h1 { margin: 0; }
.page-subtitle { color: var(--ink-soft); margin: .45rem 0 0; max-width: 46rem; }
.page-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-header-main { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.page-header-image { width: 72px; height: 72px; flex: none; object-fit: contain; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 4px; }

.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.1rem, 2.5vw, 1.6rem); margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); }
.card-panel-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.card-panel-header h2 { margin: 0; }
.card-panel-header p { margin: .3rem 0 0; color: var(--ink-soft); font-size: .92rem; }
.section-title { margin: 2rem 0 1rem; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; }
.settings-grid .card-panel { margin: 0; }

.tabs { display: inline-flex; gap: .3rem; padding: .3rem; border-radius: 12px; background: var(--line-soft); margin-bottom: 1.25rem; }
.tab { border: 0; background: transparent; padding: .5rem 1rem; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--ink-soft); display: inline-flex; gap: .45rem; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--surface); color: var(--brand-strong); box-shadow: var(--shadow-sm); }

.empty-state { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; }
.empty-state-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 20px; display: grid; place-items: center; font-size: 1.7rem; background: var(--brand-tint); color: var(--brand); }
.empty-state p { color: var(--ink-soft); max-width: 30rem; margin: .4rem auto 0; }

.loading { display: flex; align-items: center; justify-content: center; gap: .8rem; padding: 3rem; color: var(--muted); font-weight: 600; }
.loading-wing { width: 22px; height: 22px; border-radius: 50% 0 50% 50%; background: var(--plumage); animation: flap .7s ease-in-out infinite alternate; }

.badge-soft { display: inline-flex; align-items: center; padding: .14rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--brand-tint); color: var(--brand-strong); white-space: nowrap; }
.phase-tag { display: inline-flex; padding: .1rem .5rem; border-radius: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #FFF4E6; color: #B35C00; vertical-align: middle; margin-left: .35rem; }

.role-badge { display: inline-flex; padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; margin: 0 .25rem .25rem 0; white-space: nowrap; }
.role-admin { background: #0B2E2A; color: #fff; }
.role-manager { background: #E3FAFC; color: #0B7285; }
.role-cashier { background: #FCE8EF; color: #A61E4D; }
.role-customer { background: #FFF4E6; color: #B35C00; }

.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-on { color: var(--success); }
.status-off { color: var(--muted); }
.status-pending { color: var(--warning); }
.status-trial { color: var(--brand); }

/* Stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.5rem; }
.stat-tile { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: var(--brand-tint); color: var(--brand-strong); flex: none; }
.stat-accent .stat-icon { background: #FCE8EF; color: #C2255C; }
.stat-warning .stat-icon { background: #FFF4E6; color: #D9480F; }
.stat-danger .stat-icon { background: #F1F3F5; color: #495057; }
.stat-negative .stat-icon { background: #FFE3E3; color: #C92A2A; }
.stat-success .stat-icon { background: #E6FCF5; color: #087F5B; }
.stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--ink-soft); font-size: .8rem; margin-top: .25rem; }

/* Tables */
.toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.toolbar .search { flex: 1; max-width: 380px; }
.toolbar-count { color: var(--muted); font-size: .85rem; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow-x: auto; box-shadow: var(--shadow-sm); }
.data-table { margin: 0; --bs-table-bg: transparent; }
.data-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: .9rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FCFBF8; }
.data-table td { padding: .85rem 1rem; vertical-align: middle; border-color: var(--line-soft); }
.data-table tbody tr { transition: background-color .12s ease; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--brand-tint) 55%, transparent); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tr.is-muted td { opacity: .55; }
.person { display: flex; align-items: center; gap: .75rem; min-width: 220px; }
.person small { display: block; color: var(--muted); font-size: .8rem; }

.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.role-legend-item { padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.role-legend-item small { display: block; color: var(--ink-soft); margin-top: .35rem; line-height: 1.45; }

.role-picker { display: grid; gap: .55rem; }
.starter-options { display: grid; gap: .55rem; }
.document-picker { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.role-option { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .15s ease; }
.role-option input { margin-top: .25rem; accent-color: var(--brand); width: 18px; height: 18px; }
.role-option small { display: block; color: var(--muted); font-size: .82rem; }
.role-option.is-selected { border-color: var(--brand); background: var(--brand-tint); }

/* Dialog */
.dialog-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(11, 30, 27, .45); backdrop-filter: blur(3px); animation: fade .2s ease; }
.dialog { position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); animation: dialog-in .25s cubic-bezier(.2, .8, .2, 1); }
.dialog-wide { width: min(760px, calc(100vw - 2rem)); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.4rem .6rem; }
.dialog-header h2 { margin: 0; }
.dialog-body { padding: .6rem 1.4rem 1rem; overflow-y: auto; }
.dialog-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem 1.4rem 1.3rem; border-top: 1px solid var(--line-soft); }

/* Terms and plans */
.btn-terms { border: 0; background: none; padding: 0 .2rem; margin-left: .25rem; color: var(--brand); font-size: 1.05rem; line-height: 1; vertical-align: -.1rem; }
.btn-terms:hover, .btn-terms:focus-visible { color: var(--brand-strong); }
.terms { font-size: .92rem; line-height: 1.6; color: var(--ink-soft); }
.terms-clauses { padding-left: 1.3rem; }
.terms-clauses li { margin-bottom: .7rem; }
.terms-clauses strong { color: var(--ink); }
.terms-plans-title { font-size: 1.1rem; margin: 1.4rem 0 .8rem; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-bottom: .8rem; }
.plan-card { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--brand-tint); }
.plan-name { color: var(--brand-strong); font-size: 1rem; }
.plan-price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.plan-price small { font-family: var(--font-body); font-size: .8rem; font-weight: 500; color: var(--muted); }

/* ---------- Catalog ---------- */
.toolbar-select { width: auto; min-width: 240px; }
.data-table tr.is-clickable { cursor: pointer; }
.product-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--surface); }
.product-thumb-empty { display: grid; place-items: center; color: var(--muted); background: var(--line-soft); font-size: 1.1rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; color: var(--muted); font-size: .88rem; }
.import-errors { border-color: #F7CFDD; }
.import-errors h2 { color: var(--danger); }
.import-errors .data-table { max-height: 360px; }

.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.form-section { font-size: 1rem; margin: 1.4rem 0 .8rem; padding-top: 1.1rem; border-top: 1px solid var(--line-soft); }
.price-breakdown { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: -.4rem 0 1.1rem; padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--brand-tint); font-size: .85rem; color: var(--ink-soft); }
.price-breakdown strong { color: var(--ink); margin-left: .25rem; }
.input-suffix { display: flex; align-items: center; gap: .5rem; max-width: 180px; }
.input-suffix span { color: var(--muted); font-weight: 600; }
.barcode-entry { display: flex; gap: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .3rem .25rem .7rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand-strong); font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip button { border: 0; background: none; padding: 0 .2rem; color: inherit; line-height: 1; border-radius: 50%; }
.chip button:hover { background: color-mix(in srgb, var(--brand) 18%, transparent); }
.image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.image-tile { position: relative; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.image-tile.is-main { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.image-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.image-tile figcaption { display: flex; justify-content: flex-end; gap: .2rem; padding: .25rem; border-top: 1px solid var(--line-soft); }
.image-main { position: absolute; top: .4rem; left: .4rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }

/* ---------- Inventory ---------- */
.data-table tr.is-negative td { background: #FDF1F5; }
.data-table tr.is-negative:hover td { background: #FBE6EE; }
.badge-negative { display: inline-block; margin-right: .4rem; padding: .1rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 700; background: #FCE8EF; color: var(--danger); vertical-align: middle; }
.toolbar-date { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted); margin: 0; }
.toolbar-date .form-control { width: auto; }
.kardex-table td, .kardex-table th { font-variant-numeric: tabular-nums; }
.kardex-opening td { background: var(--line-soft); }
.valuation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }

.document-header { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.product-search { position: relative; margin-bottom: 1rem; }
.search-results { position: absolute; z-index: 20; top: 46px; left: 0; right: 0; max-height: 340px; overflow-y: auto; margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.search-results li { padding: .55rem .7rem; border-radius: 8px; cursor: pointer; }
.search-results li:hover { background: var(--brand-tint); }
.search-results small { display: block; color: var(--muted); }
.lines-table td { vertical-align: middle; }
.qty-input { width: 100px; margin-left: auto; text-align: right; }
.cost-input { width: 130px; margin-left: auto; text-align: right; }
.cost-source { display: block; margin-top: .2rem; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.count-notice { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; border-radius: 10px; background: var(--brand-tint); color: var(--ink); font-weight: 600; }
.document-totals { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem 1.6rem; padding: .9rem 0 .4rem; color: var(--ink-soft); font-size: .92rem; }
.document-totals strong { color: var(--ink); margin-left: .3rem; }
.document-total { font-size: 1.05rem; }
.document-total strong { font-family: var(--font-display); font-size: 1.25rem; }
.document-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem 1.2rem; margin: 0 0 1rem; }
.document-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.document-facts dd { margin: .15rem 0 0; font-weight: 600; }

.product-stock { margin-top: 1.25rem; }
.stock-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.stock-list li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.stock-list li.is-negative strong { color: var(--danger); }
.stock-cost { display: flex; justify-content: space-between; margin-bottom: .6rem; font-size: .9rem; color: var(--ink-soft); }
.suggested-price { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .7rem .8rem; margin-bottom: .5rem; border-radius: var(--radius-sm); background: var(--brand-tint); font-size: .85rem; }
.suggested-price strong { font-size: 1.05rem; color: var(--brand-strong); }

/* ---------- Home ---------- */

.welcome { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: clamp(1.5rem, 3.5vw, 2.4rem); margin-bottom: 1.5rem; border-radius: 24px; background: var(--sidebar); color: #fff; }
.welcome::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 85%, transparent), transparent 65%); opacity: .7; }
.welcome::after { content: ""; position: absolute; width: 340px; height: 340px; right: 18%; bottom: -230px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 70%, transparent), transparent 65%); opacity: .55; }
.welcome > * { position: relative; z-index: 1; }
.welcome h1 { color: #fff; margin: 0 0 .5rem; }
.welcome p { color: rgba(255,255,255,.78); margin: 0; max-width: 38rem; }
.welcome .eyebrow { color: color-mix(in srgb, var(--brand) 40%, #fff); }
.trial-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); max-width: 360px; }
.trial-card p { font-size: .86rem; }
.trial-ring { --progress: 1; width: 78px; height: 78px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, var(--sidebar) 78%, transparent 79% 100%), conic-gradient(var(--accent) calc(var(--progress) * 360deg), rgba(255,255,255,.14) 0); }
.trial-ring strong { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.trial-ring small { font-size: .6rem; color: rgba(255,255,255,.7); max-width: 54px; line-height: 1.1; }

.progress-bar-soft { width: 220px; height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.progress-bar-soft span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .6s ease; }

.setup-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.setup-list li { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--line-soft); background: #FCFBF8; }
.setup-check { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); color: var(--brand); }
.setup-list li.is-done .setup-check { background: var(--brand); border: 0; color: #fff; }
.setup-list li.is-done strong { color: var(--ink-soft); }
.setup-list li.is-soon { opacity: .65; }
.setup-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.setup-text small { color: var(--muted); }

/* ---------- Company look ---------- */

.logo-editor { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.logo-preview { width: 120px; height: 120px; border-radius: 24px; display: grid; place-items: center; background: repeating-conic-gradient(var(--line-soft) 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 8px; }
.logo-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.logo-actions .field-hint { flex-basis: 100%; margin: 0; }

.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.palette { display: flex; flex-direction: column; gap: .6rem; padding: .6rem; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.palette:hover:not(:disabled) { transform: translateY(-3px); box-shadow: var(--shadow); }
.palette.is-selected { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.palette-preview { display: flex; height: 92px; border-radius: 11px; overflow: hidden; border: 1px solid var(--line-soft); }
.pp-side { width: 32%; background: var(--sidebar); display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; }
.pp-side i { height: 7px; border-radius: 4px; background: rgba(255,255,255,.18); }
.pp-side i:first-child { background: var(--brand); }
.pp-main { flex: 1; padding: 12px 10px; background: var(--paper); display: flex; flex-direction: column; gap: 7px; }
.pp-line { height: 7px; border-radius: 4px; background: var(--line); width: 85%; }
.pp-short { width: 55%; }
.pp-row { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.pp-button { width: 46px; height: 16px; border-radius: 5px; background: var(--brand); }
.pp-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); }
.palette-name { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .9rem; padding: 0 .2rem .1rem; }
.palette-name .bi { color: var(--brand); }

/* ---------- Profile ---------- */

.language-options { display: grid; gap: .5rem; }
.language-option { display: flex; align-items: center; gap: .65rem; padding: .75rem .95rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; text-align: left; }
.language-option:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.language-option.is-selected { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-strong); }

/* ---------- Permissions matrix ---------- */

.matrix { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.matrix-head, .matrix-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 120px); align-items: center; }
.matrix-head { position: sticky; top: 68px; z-index: 5; padding: .8rem 1.2rem; background: #FCFBF8; border-bottom: 1px solid var(--line); border-radius: 18px 18px 0 0; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.matrix-role { text-align: center; }
.matrix-role .role-badge { margin: 0; text-transform: none; letter-spacing: 0; }
.matrix-group h2 { display: flex; gap: .55rem; align-items: center; margin: 0; padding: 1rem 1.2rem .5rem; font-size: 1rem; }
.matrix-group h2 .bi { color: var(--brand); }
.matrix-row { padding: .7rem 1.2rem; border-top: 1px solid var(--line-soft); }
.matrix-row:hover { background: color-mix(in srgb, var(--brand-tint) 45%, transparent); }
.matrix-label strong { display: block; font-size: .92rem; }
.matrix-label small { color: var(--muted); font-size: .8rem; }
.matrix-cell { display: flex; justify-content: center; cursor: pointer; margin: 0; }

.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #DEE2E6; transition: background-color .2s ease; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch input:disabled { cursor: not-allowed; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); display: grid; place-items: center; font-size: .6rem; color: var(--brand); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); pointer-events: none; }
.switch.is-on { background: var(--brand); }
.switch.is-on .switch-knob { transform: translateX(18px); }
.switch.is-locked { opacity: .65; }
.switch:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

.save-bar { position: fixed; z-index: 35; left: calc(50% + var(--sidebar-width) / 2); bottom: 1.4rem; transform: translate(-50%, 150%); display: flex; align-items: center; gap: 1.5rem; padding: .7rem .7rem .7rem 1.2rem; border-radius: 16px; background: #0B2E2A; color: #fff; box-shadow: var(--shadow-lg); transition: transform .3s cubic-bezier(.2, .9, .3, 1.2); }
.save-bar.is-visible { transform: translate(-50%, 0); }
.save-bar > span { display: flex; gap: .5rem; align-items: center; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.save-bar > div { display: flex; gap: .4rem; }
.save-bar .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }

/* ---------- Standalone pages ---------- */

.standalone { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .8rem; padding: 2rem; }
.standalone p { color: var(--ink-soft); max-width: 30rem; }

/* ---------- Blazor error UI ---------- */

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; padding: .8rem 1.25rem; background: #FFF4E6; color: #7A3E00; box-shadow: 0 -2px 10px rgba(0,0,0,.1); }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .9rem; top: .6rem; }
#blazor-error-ui .reload { margin-left: .5rem; font-weight: 700; }

/* ---------- Motion ---------- */

.reveal { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.reveal-2 { animation-delay: .12s; }
.reveal-3 { animation-delay: .24s; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, 30px) scale(1.12); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232, 65, 124, .55); } 70% { box-shadow: 0 0 0 9px rgba(232, 65, 124, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 65, 124, 0); } }
@keyframes flash { 0%, 70%, 100% { background: transparent; } 80% { background: color-mix(in srgb, var(--brand) 14%, transparent); } }
@keyframes flap { from { transform: rotate(-18deg) scaleY(.85); } to { transform: rotate(14deg) scaleY(1.05); } }

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

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { grid-template-columns: 1fr; }
    .hero-visual { min-height: 440px; }
    .invoice-band { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .auth-mobile-logo { visibility: visible; }

    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .menu-open .sidebar { transform: none; }
    .menu-open .shell-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(11, 30, 27, .4); }
    .shell-main { margin-left: 0; }
    .topbar-menu { display: grid; place-items: center; }
    .save-bar { left: 50%; transform: translate(-50%, 150%); }
    .save-bar.is-visible { transform: translate(-50%, 0); }
    .landing-links { display: none; }
}

@media (max-width: 640px) {
    .field-row { grid-template-columns: 1fr; }
    .product-layout { grid-template-columns: 1fr; }
    .toolbar-select { flex: 1; }
    .document-picker { grid-template-columns: 1fr; }
    .type-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-grid { grid-template-columns: 1fr; }
    .user-menu-text { display: none; }
    .trial-chip { font-size: .74rem; padding: .3rem .65rem; }
    .landing-nav { gap: .75rem; }
    .landing-nav .language-picker, .landing-nav .btn-ghost { display: none; }
    .mock-badge { left: 0; top: 0; }
    .mock-stock { display: none; }
    .matrix-head, .matrix-row { grid-template-columns: minmax(0, 1fr) repeat(3, 58px); padding-left: .8rem; padding-right: .8rem; }
    .matrix-role .role-badge { font-size: .62rem; padding: .15rem .35rem; }
    .save-bar { flex-direction: column; gap: .6rem; width: calc(100vw - 2rem); padding: .8rem; }
    .progress-bar-soft { width: 100%; }
}

/* ===== POS (Phase 3) ===== */
.pos-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pos-session { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand-strong); }
.pos-shortcuts { color: var(--muted); font-size: .8rem; margin-right: auto; }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.pos-main { min-height: 60vh; }
.pos-search .form-control { font-size: 1.15rem; }
.pos-lines .qty-input { width: 90px; margin-left: auto; }
.price-input { width: 130px; margin-left: auto; text-align: right; }
.pos-side { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .9rem; }
.pos-customer { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 14px; }
.pos-customer > i { font-size: 1.4rem; color: var(--brand); }
.pos-customer > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pos-customer small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-totals { display: grid; grid-template-columns: 1fr auto; gap: .3rem .8rem; margin: 0; color: var(--ink-soft); }
.pos-totals dt { font-weight: 500; }
.pos-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pos-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: .7rem; border-top: 1px dashed var(--line); }
.pos-total strong { font-family: var(--font-display); font-size: 2.1rem; font-variant-numeric: tabular-nums; }
.pos-pay { width: 100%; padding: .9rem; font-size: 1.15rem; }
kbd { font-family: inherit; font-size: .72rem; padding: .1rem .35rem; border-radius: 5px; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .35); }
.btn-ghost kbd { background: var(--paper); border-color: var(--line); color: var(--ink-soft); }
.pos-last { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .85rem; color: var(--muted); }

.pay-due { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem .9rem; margin-bottom: 1rem; border-radius: 14px; background: var(--brand-tint); }
.pay-due strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--brand-strong); }
.pay-row { display: grid; grid-template-columns: 150px 150px minmax(0, 1fr) auto; gap: .5rem; align-items: center; margin-bottom: .55rem; }
.pay-row label { font-weight: 600; display: flex; align-items: center; gap: .4rem; margin: 0; }
.pay-cash { grid-template-columns: 150px 220px minmax(0, 1fr); margin-bottom: 1rem; }
.pay-quick { display: flex; gap: .35rem; flex-wrap: wrap; }
.pay-summary { display: flex; justify-content: space-between; gap: 1rem; padding-top: .8rem; border-top: 1px dashed var(--line); font-size: 1.05rem; }
.pay-change strong { color: var(--success); font-size: 1.3rem; }
.pay-done { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.2rem 0; }
.pay-done i { font-size: 2.6rem; color: var(--success); }
.pay-done strong { font-family: var(--font-display); font-size: 2.6rem; }
.lookup-online { display: flex; gap: 1rem; align-items: center; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.lookup-online strong { margin: .3rem 0 .1rem; }
.lookup-image { width: 88px; height: 88px; object-fit: contain; border-radius: 10px; background: #fff; flex-shrink: 0; }
.lookup-similar { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.lookup-similar li { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 12px; }
.lookup-similar li > div { flex: 1; min-width: 0; }
.lookup-similar small { display: block; color: var(--ink-soft); }
.input-with-action { display: flex; gap: .4rem; }
.input-with-action .form-select, .input-with-action .form-control { flex: 1; min-width: 0; }
.inline-create { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .2rem 0 .8rem; padding: .7rem .8rem; border: 1px dashed var(--line); border-radius: 12px; background: var(--paper); }
.inline-create strong { width: 100%; font-size: .9rem; }
.inline-create .form-control { flex: 1 1 10rem; }
.inline-create .inline-short { flex: 0 1 6.5rem; }
.pay-choices { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: .8rem 0 .2rem; }
.connector-steps { display: grid; gap: .45rem; padding-left: 1.2rem; }
.connector-wait { display: flex; align-items: center; gap: .5rem; margin: .4rem 0 0; color: var(--ink-soft); }

.pick-list { list-style: none; padding: 0; margin: .8rem 0 0; display: flex; flex-direction: column; gap: .35rem; max-height: 340px; overflow-y: auto; }
.pick-item { width: 100%; display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.pick-item:hover, .pick-item:focus { border-color: var(--brand); background: var(--brand-tint); }
.pick-item > i { font-size: 1.2rem; color: var(--brand); }
.pick-item span { display: flex; flex-direction: column; }
.pick-item small { color: var(--muted); }

.close-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.notice-danger { background: #FFE3E3; color: #C92A2A; }
.btn-danger-soft { color: #C92A2A; }
.btn-danger-soft:hover { background: #FFE3E3; color: #C92A2A; }

.sale-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: start; }
.sale-facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin-bottom: 1rem; }
.sale-facts dt { color: var(--muted); font-weight: 500; }
.sale-facts dd { margin: 0; }
.sale-payments { list-style: none; padding: 0; margin: 0 0 1rem; }
.sale-payments li { display: flex; align-items: center; gap: .45rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.sale-payments li strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.account-orders { list-style: none; padding: 0; margin: 0; }
.account-orders > li { display: flex; flex-direction: column; gap: .4rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.account-order-head { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.account-order-total { margin-left: auto; font-variant-numeric: tabular-nums; }
.account-order-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.receipt-preview { position: sticky; top: 1rem; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.table-title { font-size: .95rem; font-weight: 700; margin: 0; padding: .9rem 1rem .4rem; }

/* The receipt: a preview on screen, the only thing on paper. */
.receipt { font-family: "Courier New", ui-monospace, monospace; font-size: 12px; line-height: 1.35; color: #000; background: #fff; padding: 10px 8px; }
.receipt-80 { width: 76mm; }
.receipt-58 { width: 54mm; font-size: 10.5px; }
.receipt-preview .receipt { border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-sm); }
.receipt-head, .receipt-block, .receipt-foot { display: flex; flex-direction: column; align-items: center; text-align: center; }
.receipt-block { align-items: flex-start; text-align: left; margin: 8px 0; padding: 6px 0; border-top: 1px dashed #000; border-bottom: 1px dashed #000; }
.receipt-logo { max-width: 60%; max-height: 60px; object-fit: contain; margin-bottom: 4px; filter: grayscale(1); }
.receipt-company { font-size: 1.15em; }
.receipt-voided { text-align: center; font-weight: 700; font-size: 1.3em; border: 2px solid #000; margin: 6px 0; }
.receipt-lines, .receipt-totals { width: 100%; border-collapse: collapse; }
.receipt-lines td, .receipt-totals td { padding: 0; vertical-align: top; }
.receipt-totals { margin-top: 6px; padding-top: 4px; border-top: 1px dashed #000; }
.receipt-total td { font-weight: 700; font-size: 1.25em; padding: 3px 0; }
.receipt-foot { margin-top: 10px; gap: 2px; }
.print-area { display: contents; }
.pos-layout ~ .print-area .receipt { display: none; }

@media print {
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
    .print-area .receipt { display: block !important; position: absolute; left: 0; top: 0; border: 0; box-shadow: none; border-radius: 0; }
}

@media (max-width: 1100px) {
    .pos-layout, .sale-layout { grid-template-columns: 1fr; }
    .pos-side, .receipt-preview { position: static; }
}
@media (max-width: 640px) {
    .pay-row, .pay-cash { grid-template-columns: 1fr; }
}

/* ===== Electronic invoicing (Phase 4) ===== */
.status-danger { color: #C92A2A; }
.einvoice-card { margin-bottom: 1rem; }
.einvoice-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.einvoice-head h3 { margin: 0 auto 0 0; }
.einvoice-body { display: flex; gap: 1rem; align-items: flex-start; }
.einvoice-qr { width: 110px; height: 110px; image-rendering: pixelated; flex: none; }
.einvoice-cufe { word-break: break-all; font-family: ui-monospace, monospace; font-size: .78rem; }
.einvoice-error { color: #C92A2A; font-size: .88rem; margin: .4rem 0; white-space: pre-line; overflow-wrap: anywhere; }
/* The whole error, one line per message (Factus sends several), wrapped. */
.einvoice-error-inline { color: #C92A2A; max-width: 420px; white-space: pre-line; overflow-wrap: anywhere; }
.einvoice-sending { display: inline-flex; align-items: center; gap: .4rem; color: var(--brand-strong); font-size: .85rem; font-weight: 600; }
.exchange-text { max-height: 60vh; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; font-size: .78rem; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.einvoice-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.receipt-einvoice { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; margin-top: 8px; padding-top: 6px; border-top: 1px dashed #000; }
.receipt-qr { width: 30mm; height: 30mm; image-rendering: pixelated; margin: 4px 0; }
.receipt-cufe { word-break: break-all; font-size: .85em; }
.receipt-test { font-weight: 700; }
.mode-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem; }
.mode-option { display: flex; flex-direction: column; gap: .25rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.mode-option small { color: var(--muted); }
.mode-option.is-selected { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 2px var(--brand-tint); }
.certificate-facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0 0 .5rem; }
.certificate-facts dt { color: var(--muted); font-weight: 600; }
.certificate-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .certificate-facts { grid-template-columns: 1fr; } .certificate-facts dd { margin-bottom: .4rem; } }
.terms-certificate { margin-top: 1rem; }
.secret-value { display: block; padding: .6rem .8rem; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: 1rem; overflow-wrap: anywhere; user-select: all; }
.setup-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .8rem; }
.setup-step { display: flex; gap: 1rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.setup-step h3 { font-size: 1.02rem; margin: 0 0 .3rem; }
.setup-step p { margin: 0 0 .5rem; color: var(--ink-soft); }
.setup-mark { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); font-weight: 700; }
.setup-step.is-done .setup-mark { background: var(--success); border-color: var(--success); color: #fff; }

/* ===== Subscriptions (Phase 5) ===== */
a.trial-chip { text-decoration: none; }
.billing-banner { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: 0 1.6rem; padding: .7rem 1rem; border-radius: 14px; font-weight: 600; }
.billing-banner > span { flex: 1; min-width: 200px; }
.billing-full { background: #FFF4E6; color: #8F4700; }
.billing-readonly { background: #FFE8CC; color: #8F3A00; }
.billing-blocked { background: #FFE3E3; color: #A61E1E; }
.card-on-file { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; margin-bottom: .6rem; }
.card-on-file i { font-size: 1.6rem; color: var(--brand); }
.card-on-file div { display: flex; flex-direction: column; }
.card-on-file small { color: var(--muted); }
.is-current-plan { background: var(--brand-tint); border-radius: 10px; padding-left: .5rem !important; padding-right: .5rem !important; }
tr.is-focused td { background: var(--brand-tint); }
@media (max-width: 640px) { .billing-banner { margin: 0 1rem; } }
.billing-banner + .billing-banner { margin-top: .5rem; }

/* Factus documents: capacity bars (used dark, assigned light, still to assign the track; 2px gaps), alerts with icon and words */
.quota-meter { display: flex; gap: 2px; height: 12px; margin: .8rem 0 .6rem; }
.quota-meter.is-compact { height: 6px; margin: 0 0 .35rem; min-width: 110px; }
.quota-meter > span { min-width: 3px; border-radius: 4px; }
.quota-used { background: var(--brand-strong); }
.quota-assigned { background: color-mix(in srgb, var(--brand) 40%, var(--surface)); }
.quota-free { background: var(--line-soft); box-shadow: inset 0 0 0 1px var(--line); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: .3rem; }
.quota-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 0; font-size: .82rem; }
.quota-legend dt { white-space: nowrap; }
.quota-legend dt { font-weight: 500; color: var(--ink-soft); }
.quota-legend dd { margin: .1rem 0 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.quota-packages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 1rem; }
.quota-package header { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.quota-package header strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.quota-package-id { font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.quota-package-actions { display: flex; gap: .2rem; }
.quota-package-dates { margin: .4rem 0 0; color: var(--ink-soft); font-size: .88rem; }
.quota-package.is-expired { opacity: .65; }
.quota-cell small { display: block; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.quota-cell small strong { color: var(--ink); }
.quota-alerts { margin-top: 1rem; }
.quota-all-good { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--ink-soft); }
.quota-all-good i { color: var(--success); font-size: 1.2rem; }
.alert-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.alert-item { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .65rem .9rem; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); }
.alert-item.is-warning { border-left-color: #E8890C; }
.alert-item.is-critical { border-left-color: #C92A2A; background: #FFF5F5; }
.alert-severity { display: inline-flex; align-items: center; gap: .35rem; min-width: 6.5rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.alert-item.is-warning .alert-severity i { color: #D9480F; }
.alert-item.is-critical .alert-severity i { color: #C92A2A; }
.alert-text { flex: 1; min-width: 220px; color: var(--ink); }
.count-notice.is-over { background: #FFE3E3; }
.quota-balances { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 1rem; }
.quota-balance { display: flex; flex-direction: column; gap: .25rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.quota-balance-kind { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.quota-balance > strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.quota-balance .badge-negative, .quota-balance .badge-soft { align-self: flex-start; }

/* ===== Support (Phase 6) ===== */
.help-fab { position: fixed; right: 22px; bottom: 22px; z-index: 1040; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 1.5rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); display: grid; place-items: center; }
.help-fab:hover { background: var(--brand-strong); }
.help-panel { position: fixed; right: 22px; bottom: 90px; z-index: 1040; width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 48px rgba(0, 0, 0, .22); overflow: hidden; }
.help-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1rem; background: var(--brand); color: #fff; }
.help-panel-head div { display: flex; flex-direction: column; }
.help-panel-head small { opacity: .85; font-size: .78rem; }
.help-panel-head .btn { color: #fff; background: rgba(255, 255, 255, .16); border-color: transparent; }
.help-panel-head .btn:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.help-messages { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .55rem; }
.help-bubble { max-width: 88%; padding: .55rem .8rem; border-radius: 14px; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.help-bubble p:last-child, .help-bubble ul:last-child, .help-bubble ol:last-child { margin-bottom: 0; }
.help-bubble ul, .help-bubble ol { padding-left: 1.1rem; }
.help-user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.help-bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.help-articles { display: flex; flex-direction: column; gap: .3rem; }
.help-articles a { font-size: .85rem; }
.help-typing { display: inline-flex; gap: 4px; }
.help-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: help-dot 1s infinite ease-in-out; }
.help-typing span:nth-child(2) { animation-delay: .15s; }
.help-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes help-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.help-input { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--line); }
.help-panel-actions { display: flex; gap: .35rem; }
.help-panel-head .help-head-whatsapp { background: #25D366; }
.help-panel-head .help-head-whatsapp:hover, .help-panel-head .help-head-whatsapp:focus-visible { background: #1EBE5A; }
.btn-whatsapp { background: #25D366; border-color: #25D366; color: #fff; font-weight: 700; }
.btn-whatsapp:hover, .btn-whatsapp:focus { background: #1EBE5A; border-color: #1EBE5A; color: #fff; }

/* ---------- Who built Colibrí ---------- */

.developer { display: flex; flex-direction: column; gap: 1rem; }
.developer-banner { width: 100%; height: auto; border-radius: 14px; display: block; background: #0B0E1F; }
.developer-by { margin: 0; text-align: center; color: var(--ink-soft); }
.developer-by strong { color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; }
.developer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.developer-contact li { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border: 1px solid var(--line-soft); border-radius: 12px; }
.developer-contact .bi { color: var(--brand); }
.developer-contact span { color: var(--muted); font-size: .85rem; min-width: 5rem; }
.developer-contact a { margin-left: auto; font-weight: 600; overflow-wrap: anywhere; text-align: right; }
.developer-pitch { display: flex; gap: .8rem; padding: .9rem 1rem; border-radius: 14px; background: var(--brand-tint); }
.developer-pitch .bi { color: var(--brand); font-size: 1.3rem; }
.developer-pitch p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .9rem; }
.help-whatsapp { align-self: flex-start; }
.help-report { border: 0; border-top: 1px solid var(--line); background: var(--paper); padding: .5rem; font-size: .85rem; color: var(--ink-soft); }
.help-report:hover { color: var(--brand-strong); }
.help-search { max-width: 560px; width: 100%; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.help-grid-single { grid-template-columns: 1fr; margin-bottom: 0; }
.help-card { display: flex; gap: .8rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); }
.help-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.help-card > i { font-size: 1.3rem; color: var(--brand); }
.help-card span { display: flex; flex-direction: column; gap: .2rem; }
.help-card small { color: var(--ink-soft); }
.help-article { line-height: 1.65; }
.help-article h2 { font-size: 1.15rem; margin-top: 1.4rem; }
.help-article h2:first-child { margin-top: 0; }
.help-article code { background: var(--paper); padding: .1rem .35rem; border-radius: 6px; }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .help-layout { grid-template-columns: 1fr; } }
.help-video { position: relative; padding-top: 56.25%; margin-bottom: 1.2rem; border-radius: 14px; overflow: hidden; background: #000; }
.help-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.help-video-dialog { margin-bottom: 0; }
.help-video-link { margin-top: -.6rem; font-size: .9rem; }
.help-video-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.help-intro { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1.4rem; background: linear-gradient(120deg, var(--brand-tint), var(--surface) 70%); }
.help-intro-icon { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--plumage); color: #fff; font-size: 2rem; }
.help-intro-text h2 { font-size: 1.3rem; margin: 0 0 .2rem; }
.help-intro-text p { color: var(--ink-soft); margin-bottom: .7rem; }
@media (max-width: 575.98px) { .help-intro { flex-direction: column; align-items: flex-start; } }
.report-shot { display: block; max-width: 100%; max-height: 260px; margin-top: .6rem; border: 1px solid var(--line); border-radius: 10px; }
.ticket-list { display: flex; flex-direction: column; gap: .8rem; }
.ticket-card .einvoice-head h3 { margin: 0 auto 0 0 !important; }
.ticket-text { white-space: pre-wrap; margin-bottom: .6rem; }
.ticket-reply { display: flex; gap: .5rem; margin-top: .8rem; padding: .7rem .9rem; background: var(--brand-tint); border-radius: 12px; }
.ticket-transcript { white-space: pre-wrap; font-size: .8rem; background: var(--paper); padding: .7rem; border-radius: 10px; max-height: 260px; overflow-y: auto; }
.ticket-edit { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.ticket-priority-urgent { background: #FFE3E3; color: #C92A2A; }
.ticket-priority-high { background: #FFF4E6; color: #B35C00; }
@media print { .help-fab, .help-panel { display: none !important; } }

/* ===== Online store (Phase 7) ===== */
.storefront { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.store-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 3rem); background: var(--sidebar); color: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); }
.store-brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; font-family: var(--font-display); font-size: 1.25rem; }
.store-brand img { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.store-nav { display: flex; align-items: center; gap: .5rem; }
.store-nav-link, .store-cart-link { display: inline-flex; align-items: center; gap: .4rem; color: #fff; text-decoration: none; padding: .45rem .8rem; border-radius: 999px; }
.store-nav-link:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.store-cart-link { background: var(--accent); font-weight: 700; }
.store-cart-link:hover { color: #fff; filter: brightness(1.05); }
.store-cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--ink); font-size: .78rem; display: inline-grid; place-items: center; }
.store-main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2rem) 3rem; }
.store-foot { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1.2rem; color: var(--muted); font-size: .85rem; }
.store-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 1.5rem; align-items: end; margin-bottom: 1.2rem; }
.store-hero h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .4rem; }
.store-facts { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--ink-soft); font-size: .9rem; }
.store-facts i { color: var(--brand); }
.store-search .form-control { border-radius: 999px; }
.store-hero-tools { display: flex; flex-direction: column; align-items: stretch; gap: .6rem; }
.store-hero-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.reorder-orders, .reorder-missing { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.reorder-orders li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.reorder-orders li > div { min-width: 0; }
.reorder-orders small.d-block { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch; }
.reorder-missing li { display: flex; justify-content: space-between; gap: .6rem; padding: .3rem 0; border-bottom: 1px solid var(--line-soft); }
.store-categories { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .35rem .9rem; font-size: .88rem; }
.chip.is-active, .chip:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-strong); }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.store-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow .15s; }
.store-card:hover { box-shadow: var(--shadow-sm); }
.store-card-image { display: block; }

/* A product's images: a square frame, every image the same size, never stretched (cropped to fill, or whole with is-contain), fading every few seconds */
.image-carousel { position: relative; aspect-ratio: 1; overflow: hidden; background: #fff; }
.image-carousel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.image-carousel > img.is-shown { opacity: 1; }
.image-carousel.is-contain > img:not(.is-placeholder) { object-fit: contain; padding: 1rem; }
.image-carousel-dots { position: absolute; left: 0; right: 0; bottom: .5rem; display: flex; justify-content: center; gap: .35rem; }
.image-carousel-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(20, 35, 31, .25); }
.image-carousel-dots button.is-active { background: var(--brand); width: 18px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .image-carousel > img { transition: none; } }
.store-card-body { display: flex; flex-direction: column; gap: .45rem; padding: .8rem .9rem 1rem; flex: 1; }
.store-card-name { color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.3; flex: 1; }
.store-price { font-family: var(--font-display); font-size: 1.2rem; color: var(--brand-strong); }
.store-price small { font-family: inherit; font-size: .72rem; color: var(--muted); font-weight: 500; }
.store-price-lg { font-size: 1.9rem; }
.store-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.store-gallery-main { border: 1px solid var(--line); border-radius: 18px; }
.store-thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.store-thumbs button { width: 64px; height: 64px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.store-thumbs button.is-active { border-color: var(--brand); }
.store-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.store-product-info h1 { font-family: var(--font-display); margin: .5rem 0; }
.store-description { white-space: pre-wrap; color: var(--ink-soft); }
.store-buy { display: flex; gap: .6rem; max-width: 380px; }
.store-buy .form-control { width: 110px; }
.store-title { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 1rem; }
.store-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.store-summary { position: sticky; top: 90px; display: flex; flex-direction: column; gap: .8rem; }
.cart-list { list-style: none; padding: 0; margin: 0; }
.cart-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cart-image { width: 56px; height: 56px; flex: none; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.cart-image img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.cart-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-name small { color: var(--muted); }
.cart-qty { display: inline-flex; align-items: center; gap: .3rem; }
.cart-total { min-width: 100px; text-align: right; font-variant-numeric: tabular-nums; }
.store-order-status { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; margin-bottom: 1rem; }
.order-steps { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--muted); }
.order-steps li.is-done { color: var(--success); font-weight: 600; }
.store-login { max-width: 440px; margin: 2rem auto; }

/* Colibrí's Wompi keys: sandbox and production side by side, the one in force outlined */
.wompi-environments { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 1rem; margin-top: 1rem; }
.wompi-environment { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wompi-environment.is-in-force { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.wompi-environment header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.mode-option.is-disabled { opacity: .6; cursor: not-allowed; }

/* shoppers' portal (/compras): each store painted with its company's palette */
.portal { min-height: 100vh; background: var(--paper); }
.portal .store-login { margin-top: 3rem; }
.portal-stores { max-width: 960px; margin: 2.5rem auto; padding: 0 1rem; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 1rem; margin-top: 1.25rem; }
.portal-store { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: 1.4rem 1rem; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); text-align: center; transition: transform .15s ease, box-shadow .15s ease; }
.portal-store:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.portal-store img { width: 72px; height: 72px; object-fit: contain; }
.portal-store-mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-strong); font-size: 1.8rem; }
.portal-store strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.portal-store-go { color: var(--brand-strong); font-weight: 600; font-size: .9rem; }
.order-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.order-actions .form-control { flex: 1; min-width: 220px; }
@media (max-width: 860px) {
    .store-hero, .store-product, .store-checkout { grid-template-columns: 1fr; }
    .store-summary { position: static; }
    .store-nav-link span { display: none; }
}


/* Accounting (Phase 8) */
.accounting-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.5rem; }
.stat-tile .stat-value.is-text { font-size: 1.15rem; line-height: 1.2; }
.stat-tile > div { min-width: 0; }
.accounting-action .toolbar { flex-wrap: wrap; align-items: center; }
.accounting-chart input { max-width: 12rem; }
.accounting-chart td { vertical-align: middle; }

/* Payroll (Phase 9) */
.payroll-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.payroll-next-name { font-family: var(--font-display); font-size: 1.15rem; }
.toolbar-year { max-width: 7rem; }
.payslip-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.payslip-head > div { display: flex; flex-direction: column; gap: .15rem; }
.payslip-head span { color: var(--muted); font-size: .88rem; }
.payslip-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; }
.payslip-columns h3 { font-size: 1rem; margin-bottom: .5rem; }
.payslip-table { margin-bottom: .5rem; }
.payslip-table td, .payslip-table th { padding: .45rem .25rem; vertical-align: top; }
@media print {
    .payslip { border: 0; box-shadow: none; padding: 0; }
}

/* Features by kind of store (Phase 10) */
.feature-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: .75rem; }
.feature-options .mode-option strong { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.batch-inputs { display: flex; gap: .35rem; margin-top: .35rem; max-width: 22rem; }
.batch-inputs input { min-width: 0; }
.variant-matrix th, .variant-matrix td { vertical-align: middle; }
.variant-cell { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; min-width: 6.5rem; }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.table-card-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: 1rem; border-radius: 16px; border: 1px solid var(--line);
    background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; min-height: 7.5rem; }
.table-card-tile strong { font-family: var(--font-display); font-size: 1.15rem; }
.table-card-tile small { color: var(--muted); }
.table-card-tile.is-busy { border-color: var(--brand); background: var(--brand-tint); }
.table-card-tile .table-total { font-weight: 700; font-size: 1.05rem; }
.dish-draft { display: grid; grid-template-columns: 5rem 1fr 1.4fr auto; gap: .5rem; align-items: center; margin-top: .5rem; }
.kitchen-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 1rem; }
.kitchen-ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; box-shadow: var(--shadow-sm); }
.kitchen-ticket.is-late { border-color: #C92A2A; box-shadow: 0 0 0 2px rgba(201, 42, 42, .15); }
.kitchen-ticket header { display: flex; justify-content: space-between; align-items: baseline; }
.kitchen-ticket header strong { font-family: var(--font-display); font-size: 1.25rem; }
.kitchen-ticket ul { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-direction: column; gap: .5rem; }
.kitchen-line { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: 10px; background: var(--paper); }
.kitchen-line em { display: block; color: #C92A2A; font-style: normal; font-size: .85rem; }
.kitchen-line.is-preparing { background: var(--brand-tint); }
.kitchen-line.is-ready { opacity: .65; }
@media (max-width: 575.98px) {
    .dish-draft { grid-template-columns: 4.5rem 1fr auto; }
    .dish-draft input:not(.qty-input) { grid-column: 1 / -1; }
}

/* training videos on the home page and the help center */
.video-thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b0e2e; cursor: pointer; box-shadow: var(--shadow); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.video-thumb:hover img { transform: scale(1.04); }
.video-thumb-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--accent); font-size: 2.2rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .2s ease; }
.video-thumb:hover .video-thumb-play { transform: scale(1.08); }
.landing-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2.6rem); align-items: center; margin-top: 3rem; text-align: left; }
.landing-intro-copy h3 { font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); margin: .3rem 0 .6rem; }
.landing-intro-copy p { color: var(--ink-soft); }
.landing-videos-title { margin: 3rem 0 1.2rem; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; text-align: left; }
.video-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: .8rem .8rem 1rem; }
.video-card .video-thumb { border-radius: 14px; box-shadow: none; }
.video-card h4 { font-size: 1rem; margin: .8rem .2rem .3rem; }
.video-card-number { color: var(--brand-strong); }
.video-card p { color: var(--ink-soft); font-size: .88rem; margin: 0 .2rem .6rem; }
.video-card-link { font-size: .88rem; margin-left: .2rem; }
@media (max-width: 767.98px) { .landing-intro { grid-template-columns: 1fr; } }
