/* ==========================================================================
   Standard theme — design system
   Colors are RGB triplets without rgb() so opacity works: rgb(var(--x) / 0.5).
   The -600/-700 steps are DARKER than -500. Change the accent by editing the
   --color-primary-* block only.
   ========================================================================== */
:root {
    /* Accent: trust blue #1F5BD6 */
    --color-primary-50: 238 243 255;
    --color-primary-100: 222 232 253;
    --color-primary-200: 201 216 247;
    --color-primary-500: 31 91 214;
    --color-primary-600: 26 79 188;
    --color-primary-700: 23 67 163;
    --color-primary-900: 17 46 112;
    --color-primary-fg: 255 255 255;

    --color-sidebar: 255 255 255;
    --color-sidebar-fg: 12 17 28;

    --color-page: 245 246 248;
    --color-page-public: 245 246 248;

    --color-surface: 255 255 255;
    --color-surface-muted: 238 240 244;
    --color-border: 211 216 224;
    --color-border-soft: 226 229 235;
    --color-border-strong: 188 194 205;
    --color-text: 12 17 28;
    --color-text-2: 52 60 76;
    --color-text-soft: 90 98 115;
    --color-text-muted: 107 115 133;

    --color-success: 6 118 71;
    --color-success-bg: 236 253 243;
    --color-danger: 180 35 42;
    --color-danger-bg: 254 242 242;
    --color-warning: 147 55 13;
    --color-warning-bg: 255 247 230;

    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-control: 0.5rem;
    --radius-pill: 9999px;
    --shadow-card: 0 1px 2px rgb(12 17 28 / 0.04);
    --shadow-raised: 0 0 0 1px rgb(var(--color-border-soft)), 0 12px 32px -12px rgb(12 17 28 / 0.14);
    --shadow-control: none;
    --shadow-menu: 0 0 0 1px rgb(var(--color-border-soft)), 0 12px 32px -12px rgb(12 17 28 / 0.22);
    --focus-ring: 0 0 0 3px rgb(var(--color-primary-500) / 0.16);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --wrap: 74rem;
    --gutter: 1rem;
    --control-h: 2.75rem;
    --header-h: 3.5rem;
    --sidebar-w: 248px;

    /* To change the font, override only this var (plus its <link> in layout.html). */
    --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
@media (min-width: 768px) { :root { --gutter: 1.5rem; --header-h: 4rem; } }
@media (min-width: 1024px) { :root { --gutter: 2.5rem; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    scrollbar-color: rgb(var(--color-border)) rgb(var(--color-page));
    interpolate-size: allow-keywords;
}
body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: rgb(var(--color-page-public));
    color: rgb(var(--color-text));
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
body.app--auth {
    flex-direction: row;
    background: rgb(var(--color-page));
}
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
img { max-width: 100%; }
::selection { background: rgb(var(--color-primary-100)); color: rgb(var(--color-primary-900)); }
:focus-visible { outline: 2px solid rgb(var(--color-primary-500)); outline-offset: 2px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(var(--color-border)); border: 3px solid rgb(var(--color-page)); border-radius: 12px; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--color-border-strong)); }

.hidden { display: none !important; }
[x-cloak] { display: none !important; }

.overlay {
    position: fixed;
    inset: 0;
    background: rgb(12 17 28 / 0.36);
    z-index: 30;
}
@media (min-width: 1024px) { .overlay { display: none; } }

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 40;
    width: var(--sidebar-w);
    max-width: 86vw;
    min-height: 100vh;
    background: rgb(var(--color-sidebar));
    border-inline-end: 1px solid rgb(var(--color-border-soft));
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.sidebar.is-open { transform: translateX(0); box-shadow: 0 12px 32px -12px rgb(12 17 28 / 0.28); }
@media (min-width: 1024px) { .sidebar { transform: translateX(0); } }

.sidebar-logo {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 1.25rem;
    flex-shrink: 0;
    min-width: 0;
}
.sidebar-logo img { height: 1.75rem; max-width: 7rem; object-fit: contain; }
.sidebar-brand {
    font-size: 17px;
    font-weight: 600;
    color: rgb(var(--color-sidebar-fg));
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav {
    flex: 1;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0 0.625rem;
    border-radius: var(--radius-control);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: rgb(var(--color-text-2));
    transition: background-color 0.15s, color 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: start;
}
@media (min-width: 1024px) { .nav-link { min-height: 2.375rem; font-size: 14px; } }
.nav-link:hover { color: rgb(var(--color-text)); background: rgb(var(--color-page)); }
.nav-link.is-active { color: rgb(var(--color-primary-700)); background: rgb(var(--color-primary-50)); }
.nav-link svg, .nav-link i { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: rgb(var(--color-text-muted)); transition: color 0.15s; }
.nav-link i { display: inline-grid; place-items: center; font-size: 1rem; }
.nav-link:hover svg, .nav-link:hover i { color: rgb(var(--color-text-2)); }
.nav-link.is-active svg, .nav-link.is-active i { color: rgb(var(--color-primary-500)); }

.sidebar-logout { padding: 0.75rem; border-top: 1px solid rgb(var(--color-border-soft)); flex-shrink: 0; }
@media (min-width: 1024px) { .sidebar-logout { display: none; } }

.nav-badge {
    margin-inline-start: auto;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    border-radius: var(--radius-pill);
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ---------- Main column ---------- */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
@media (min-width: 1024px) {
    body.app--auth .main-wrapper { margin-inline-start: var(--sidebar-w); }
}

/* ---------- Headers ---------- */
.header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(var(--color-page) / 0.86);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid rgb(var(--color-border-soft));
}
.header--auth {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-block: 0; padding-inline: 0.375rem 0.5rem;
}
@media (min-width: 768px) { .header--auth { padding: 0 var(--gutter); gap: 0.5rem; } }
.header--public { width: 100%; }
.header-inner {
    max-width: calc(var(--wrap) + 2 * var(--gutter));
    margin: 0 auto;
    width: 100%;
    height: var(--header-h);
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.header-inner > .row { min-width: 0; gap: 0.25rem; }
.header-actions { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
@media (min-width: 768px) { .header-actions { gap: 0.5rem; } }
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    min-height: 2.75rem;
    margin-inline-end: 0.5rem;
    font-weight: 600;
    font-size: 17px;
    color: rgb(var(--color-text));
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
}
.header-brand img { height: 1.75rem; max-width: 7rem; object-fit: contain; }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgb(var(--color-text));
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: var(--radius-control);
    transition: background-color 0.15s;
    padding: 0;
}
.icon-btn:hover { background: rgb(var(--color-surface-muted)); }
.icon-btn svg { width: 1.375rem; height: 1.375rem; }
@media (min-width: 1024px) { .icon-btn--mobile { display: none; } }

/* Store name next to the menu button on phones/tablets. */
.header-mobile-brand {
    display: block;
    min-width: 0;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 1024px) { .header-mobile-brand { display: none; } }

.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2.75rem;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    color: rgb(var(--color-text-2));
    padding: 0 0.5rem;
    border-radius: var(--radius-control);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
@media (min-width: 768px) {
    .header-btn { height: 2.25rem; padding: 0 0.75rem; border-color: rgb(var(--color-border)); background: rgb(var(--color-surface)); }
}
.header-btn:hover, .header-btn.is-active { color: rgb(var(--color-text)); border-color: rgb(var(--color-border-strong)); background: rgb(var(--color-surface)); }
.header-btn svg { width: 1.125rem; height: 1.125rem; color: rgb(var(--color-text-muted)); flex-shrink: 0; }
.header-btn--balance {
    height: 2.5rem;
    padding-block: 0; padding-inline: 0.625rem 0.75rem;
    border-radius: var(--radius-pill);
    border-color: rgb(var(--color-border));
    background: rgb(var(--color-surface));
    color: rgb(var(--color-text));
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .header-btn--balance { height: 2.25rem; padding-block: 0; padding-inline: 0.75rem 0.875rem; border-radius: var(--radius-pill); } }
.header-btn--balance svg { color: rgb(var(--color-primary-500)); }
.header-btn--balance:hover { color: rgb(var(--color-text)); }
.header-btn--logout:hover { color: rgb(var(--color-danger)); border-color: rgb(var(--color-danger) / 0.35); background: rgb(var(--color-danger-bg)); }
.header-btn--logout:hover svg { color: rgb(var(--color-danger)); }
/* Phones: language and account show only their icon, currency only its code. */
@media (max-width: 559px) {
    .header-btn--lang { width: 2.75rem; justify-content: center; padding: 0; }
    .header-btn--lang span { display: none; }
    .header-btn--account { width: 2.75rem; justify-content: center; padding: 0; }
    .header-btn--account span { display: none; }
    .header-btn--currency { padding: 0 0.375rem; }
    .header-btn--currency svg { display: none; }
}
.desktop-only { display: none; }
@media (min-width: 1024px) { .desktop-only { display: flex; } }

/* Public navigation */
.pubnav { display: none; align-items: center; gap: 0.25rem; flex: 1; font-size: 14px; font-weight: 500; }
@media (min-width: 768px) { .pubnav { display: flex; } }
.pubnav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: var(--radius-control);
    border: 1px solid transparent;
    color: rgb(var(--color-text-2));
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.pubnav-link:hover { color: rgb(var(--color-text)); background: rgb(var(--color-surface-muted)); }
.pubnav .pubnav-link--signin { order: 10; margin-inline-start: auto; border-color: rgb(var(--color-border)); color: rgb(var(--color-text)); }
.pubnav .pubnav-link--signin:hover { border-color: rgb(var(--color-border-strong)); background: rgb(var(--color-surface)); }
.pubnav .pubnav-link--cta { order: 11; margin-inline-start: 0.25rem; background: rgb(var(--color-primary-500)); color: rgb(var(--color-primary-fg)); }
.pubnav .pubnav-link--cta:hover { background: rgb(var(--color-primary-600)); color: rgb(var(--color-primary-fg)); }
.menu-btn { display: inline-grid; margin-inline-end: -0.5rem; }
@media (min-width: 768px) { .menu-btn { display: none; } }

.pubmenu-mobile {
    border-top: 1px solid rgb(var(--color-border-soft));
    background: rgb(var(--color-surface));
    padding: 0.5rem var(--gutter) 0.75rem;
    position: relative;
    z-index: 50;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 24px -16px rgb(12 17 28 / 0.25);
}
@media (min-width: 768px) { .pubmenu-mobile { display: none; } }
.pubmenu-mobile a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0 0.5rem;
    border-radius: var(--radius-control);
    font-size: 16px;
    font-weight: 500;
    color: rgb(var(--color-text-2));
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.pubmenu-mobile a:hover { color: rgb(var(--color-text)); background: rgb(var(--color-page)); }
.pubmenu-mobile .pubnav-link--cta {
    order: 20;
    margin-top: 0.5rem;
    justify-content: center;
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
}
.pubmenu-mobile .pubnav-link--cta:hover { background: rgb(var(--color-primary-600)); color: rgb(var(--color-primary-fg)); }

/* ---------- Dropdowns ---------- */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    margin-top: 0.375rem;
    background: rgb(var(--color-surface));
    border-radius: var(--radius);
    box-shadow: var(--shadow-menu);
    padding: 0.375rem;
    min-width: 9rem;
    max-height: 20rem;
    overflow-y: auto;
    z-index: 50;
}
.dropdown-menu--right { inset-inline-end: 0; }
.dropdown-menu--left { inset-inline-start: 0; }
.header--auth .dropdown-menu { inset-inline-end: 0; }
.header--public .dropdown-menu { inset-inline-start: 0; }
.dropdown-menu--full { inset-inline-start: 0; inset-inline-end: 0; width: 100%; max-height: 18rem; overflow-y: auto; }
.dropdown-item {
    display: block;
    width: 100%;
    text-align: start;
    min-height: 2.5rem;
    padding: 0.5625rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 14px;
    line-height: 1.4;
    color: rgb(var(--color-text-2));
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.1s, color 0.1s;
}
.dropdown-item:hover { color: rgb(var(--color-text)); background: rgb(var(--color-page)); }
.dropdown-item.is-selected { background: rgb(var(--color-primary-50)); color: rgb(var(--color-primary-700)); }
.dropdown-item.is-selected .cell-id { color: rgb(var(--color-primary-700)); }

/* ---------- Content ---------- */
.main {
    flex: 1;
    padding: 0.75rem var(--gutter) 2rem;
    overflow-x: clip;
}
body.app--auth .main { padding-top: 1.5rem; }
@media (max-width: 559px) {
    body.app--auth .main { padding: 0.5rem 0.5rem calc(1rem + env(safe-area-inset-bottom)); }
}
.container { max-width: var(--wrap); margin: 0 auto; width: 100%; }
/* #content dims instantly while the next page loads. */
#content { transition: opacity 0.12s; }
#content.htmx-request { opacity: 0.55; }
body.app--auth .container { max-width: 88rem; }

.footer {
    flex-shrink: 0;
    border-top: 1px solid rgb(var(--color-border-soft));
    padding: 1.25rem var(--gutter);
    font-size: 13px;
    color: rgb(var(--color-text-soft));
    text-align: center;
}

/* ---------- Floating chat buttons ---------- */
.chat-fab-stack {
    position: fixed;
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.75rem;
}
.chat-fab-stack--left { left: 1.25rem; }
.chat-fab-stack--right { right: 1.25rem; }
.chat-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: var(--radius-pill);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgb(12 17 28 / 0.3);
    transition: transform 0.2s var(--ease), filter 0.15s;
}
.chat-fab:hover { filter: brightness(1.06); transform: translateY(-1px); }
.chat-fab--whatsapp { background: #1fa855; }
.chat-fab--telegram { background: #229ed9; }
.chat-fab--whatsapp svg { width: 1.625rem; height: 1.625rem; }
.chat-fab--telegram svg { width: 2rem; height: 2rem; }

/* ---------- Cards ---------- */
.card {
    background: rgb(var(--color-surface));
    border-radius: var(--radius);
    border: 1px solid rgb(var(--color-border-soft));
    box-shadow: var(--shadow-card);
}
.card--pad { padding: 1rem; }
@media (min-width: 768px) { .card--pad { padding: 1.5rem; } }
.card-title { margin: 0 0 1rem; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: rgb(var(--color-text)); }

/* ---------- Forms ---------- */
.label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgb(var(--color-text-2));
    margin-bottom: 0.375rem;
}
.input, .select, .textarea, .select-trigger {
    width: 100%;
    min-height: var(--control-h);
    border: 1px solid rgb(var(--color-border));
    border-radius: var(--radius-control);
    background: rgb(var(--color-surface));
    padding: 0.625rem 0.75rem;
    font-size: 16px;
    line-height: 1.4;
    color: rgb(var(--color-text));
    caret-color: rgb(var(--color-primary-500));
    box-shadow: var(--shadow-control);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
@media (min-width: 768px) { .input, .select, .textarea, .select-trigger { font-size: 15px; } }
.input::placeholder, .textarea::placeholder { color: rgb(var(--color-text-muted)); }
.input:hover, .select:hover, .textarea:hover, .select-trigger:hover { border-color: rgb(var(--color-border-strong)); }
.input:focus, .select:focus, .textarea:focus, .select-trigger:focus {
    outline: none;
    border-color: rgb(var(--color-primary-500));
    box-shadow: var(--focus-ring);
}
.input:user-invalid, .textarea:user-invalid { border-color: rgb(var(--color-danger)); }
.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-align: start;
    cursor: pointer;
}
.select-trigger > span:first-child {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
}
.select-trigger .trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger img { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.select-trigger .chevron { width: 1.125rem; height: 1.125rem; flex-shrink: 0; color: rgb(var(--color-text-muted)); transition: transform 0.2s var(--ease); }
.select-trigger .chevron.is-open { transform: rotate(180deg); }

.search-left { position: relative; }
.search-left > svg {
    position: absolute; inset-inline-start: 0.875rem; top: 50%; transform: translateY(-50%);
    width: 1.125rem; height: 1.125rem; color: rgb(var(--color-text-muted)); pointer-events: none;
}
.search-left .input { padding-inline-start: 2.5rem; }
.input:disabled, .select:disabled, .textarea:disabled {
    background: rgb(var(--color-page));
    border-color: rgb(var(--color-border-soft));
    color: rgb(var(--color-text-soft));
    cursor: not-allowed;
}
.textarea { resize: vertical; min-height: 6rem; }
/* Native arrow on purpose; base-select (Chrome/Edge) keeps our border/padding/font. */
.select {
    cursor: pointer;
    appearance: auto;
    appearance: base-select;
}
@supports (appearance: base-select) {
    .select::picker-icon {
        content: "";
        width: 1.125rem;
        height: 1.125rem;
        background: rgb(var(--color-text-muted));
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.17l3.71-3.94a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06z'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.17l3.71-3.94a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06z'/%3E%3C/svg%3E") center / contain no-repeat;
        transition: rotate 0.2s var(--ease);
    }
    .select:open::picker-icon { rotate: 180deg; }
    .select::picker(select) {
        appearance: base-select;
        border: 0;
        border-radius: var(--radius);
        box-shadow: var(--shadow-menu);
        background: rgb(var(--color-surface));
        padding: 0.375rem;
        margin-top: 0.375rem;
    }
    .select option {
        min-height: 2.5rem;
        padding: 0.5rem 0.625rem;
        border-radius: 0.375rem;
        font-size: 14px;
        color: rgb(var(--color-text-2));
    }
    .select option:hover { background: rgb(var(--color-page)); color: rgb(var(--color-text)); }
    .select option:checked { background: rgb(var(--color-primary-50)); color: rgb(var(--color-primary-700)); }
    .select option::checkmark { color: rgb(var(--color-primary-500)); }
}
.checkbox {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    margin: 0;
    border-radius: 0.25rem;
    border: 1px solid rgb(var(--color-border));
    accent-color: rgb(var(--color-primary-500));
    cursor: pointer;
}
.field { margin-bottom: 0; }
.help { margin: 0.375rem 0 0; font-size: 13px; color: rgb(var(--color-text-soft)); font-variant-numeric: tabular-nums; }
.error-text { font-size: 13px; color: rgb(var(--color-danger)); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-grid--wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-actions { grid-column: 1 / -1; padding-top: 0.25rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--control-h);
    padding: 0 1.125rem;
    border-radius: var(--radius-control);
    border: 1px solid transparent;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
@media (min-width: 768px) { .btn { min-height: 2.5rem; font-size: 14px; } }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--block { width: 100%; min-height: var(--control-h); font-size: 15px; }
.btn--sm { min-height: 2.25rem; padding: 0 0.75rem; font-size: 13px; }
.btn--primary {
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
}
.btn--primary:hover:not(:disabled) { background: rgb(var(--color-primary-600)); }
.btn--primary:active:not(:disabled) { background: rgb(var(--color-primary-700)); }
.btn--outline {
    background: rgb(var(--color-surface));
    color: rgb(var(--color-text));
    border-color: rgb(var(--color-border));
    box-shadow: var(--shadow-control);
}
.btn--outline:hover:not(:disabled) { border-color: rgb(var(--color-border-strong)); background: rgb(251 251 252); }
.btn--icon { padding: 0; width: var(--control-h); gap: 0; }
.btn--icon svg { width: 1.125rem; height: 1.125rem; }
.btn--xs { min-height: 1.75rem; padding: 0 0.5rem; font-size: 12px; border-radius: 0.375rem; }
.btn--success {
    background: rgb(var(--color-success-bg)); color: rgb(var(--color-success)); border-color: rgb(var(--color-success) / 0.3);
}
.btn--success:hover:not(:disabled) { background: rgb(var(--color-success) / 0.12); }
.btn--danger {
    background: rgb(var(--color-danger-bg)); color: rgb(var(--color-danger)); border-color: rgb(var(--color-danger) / 0.28);
}
.btn--danger:hover:not(:disabled) { background: rgb(var(--color-danger) / 0.1); }

.link {
    font: inherit;
    font-weight: 500;
    color: rgb(var(--color-primary-700));
    text-decoration: none;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.link:hover { text-decoration: underline; }

/* ---------- Chips (network filter) ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.75rem;
    flex-shrink: 0;
    border-radius: var(--radius-control);
    border: 1px solid rgb(var(--color-border));
    background: rgb(var(--color-surface));
    color: rgb(var(--color-text-2));
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
@media (min-width: 1024px) { .chip { height: 2.25rem; } }
.chip:hover { border-color: rgb(var(--color-border-strong)); background: rgb(251 251 252); color: rgb(var(--color-text)); }
.chip img, .chip svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.chip svg { color: rgb(var(--color-text-soft)); }
.chip.is-active {
    border-color: rgb(var(--color-primary-200));
    background: rgb(var(--color-primary-50));
    color: rgb(var(--color-primary-700));
}
.chip.is-active svg { color: rgb(var(--color-primary-500)); }

/* ---------- Read-only values ---------- */
.readout {
    width: 100%;
    min-height: var(--control-h);
    border: 1px solid rgb(var(--color-border-soft));
    border-radius: var(--radius-control);
    background: rgb(var(--color-page));
    padding: 0.625rem 0.75rem;
    font-size: 15px;
    line-height: 1.55;
    color: rgb(var(--color-text-2));
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.readout--value { color: rgb(var(--color-text)); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Rich HTML content: block content, not pre-line. */
.readout--rich { white-space: normal; line-height: 1.55; }
.readout--rich > :first-child { margin-top: 0; }
.readout--rich > :last-child { margin-bottom: 0; }
.readout--rich p, .readout--rich ul, .readout--rich ol, .readout--rich table { margin: 0 0 0.6em; }
.readout--rich ul, .readout--rich ol { padding-inline-start: 1.25rem; }
.readout--rich ul { list-style: disc; }
.readout--rich ol { list-style: decimal; }
.readout--rich h1, .readout--rich h2, .readout--rich h3, .readout--rich h4 {
    margin: 0.6em 0 0.3em; font-weight: 600; color: rgb(var(--color-text)); font-size: 1em;
}
.readout--rich a { color: rgb(var(--color-primary-700)); text-decoration: underline; text-underline-offset: 3px; }
.readout--rich strong { color: rgb(var(--color-text)); }
.readout--rich code {
    font-family: var(--font-mono); font-size: 0.875em;
    padding: 0.1em 0.35em; border-radius: 4px;
    background: rgb(var(--color-surface)); border: 1px solid rgb(var(--color-border-soft));
    color: rgb(var(--color-text)); user-select: all;
}
.readout--rich img { max-width: 100%; height: auto; border-radius: var(--radius-control); display: block; margin: 0.5em 0; }
.readout--rich video, .readout--rich iframe {
    display: block; max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto;
    border: 0; border-radius: var(--radius-control); margin: 0.5em 0; background: #000;
}
.readout--rich table { border-collapse: collapse; width: 100%; font-size: 0.9em; }
.readout--rich th, .readout--rich td { border: 1px solid rgb(var(--color-border-soft)); padding: 0.35em 0.5em; text-align: start; }
.readout--rich th { background: rgb(var(--color-surface)); color: rgb(var(--color-text)); }

/* ---------- Search with button ---------- */
.search { position: relative; width: 100%; }
@media (min-width: 640px) { .search { width: 20rem; } }
.search .input { padding-inline-end: 3.25rem; }
.search-btn {
    position: absolute;
    top: 4px;
    bottom: 4px;
    inset-inline-end: 4px;
    display: grid;
    place-items: center;
    width: 2.375rem;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    cursor: pointer;
    transition: background-color 0.15s;
}
.search-btn:hover { background: rgb(var(--color-primary-600)); }
.search-btn svg { width: 1.125rem; height: 1.125rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
.table { width: 100%; text-align: start; font-size: 14px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: start; } /* th centra por defecto si hereda "start" */
.table thead tr { border-bottom: 1px solid rgb(var(--color-border-soft)); }
.table th {
    padding: 0.625rem 0.875rem;
    font-size: 12.5px;
    font-weight: 500;
    color: rgb(var(--color-text-soft));
    white-space: nowrap;
    background: rgb(var(--color-page) / 0.6);
}
.table td { padding: 0.75rem 0.875rem; vertical-align: top; color: rgb(var(--color-text-2)); }
.table tbody tr { border-top: 1px solid rgb(var(--color-border-soft)); transition: background-color 0.1s; }
.table tbody tr:first-child { border-top: 0; }
.table tbody tr:hover { background: rgb(var(--color-page) / 0.7); }
.table .num { text-align: end; font-variant-numeric: tabular-nums; }
.table .cell-trunc {
    display: inline-block;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}
.table-empty { padding: 2.5rem 1rem; text-align: center; font-size: 14px; color: rgb(var(--color-text-soft)); }
.table tbody tr.row--attention { background: rgb(var(--color-primary-50)); }
.table tbody tr.row--attention:hover { background: rgb(var(--color-primary-100) / 0.7); }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 1.5rem;
    border-radius: var(--radius-pill);
    padding: 0 0.5625rem;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    background: rgb(100 116 139 / 0.1);
    color: #475569;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge--pending     { background: rgb(var(--color-warning-bg)); color: rgb(var(--color-warning)); }
.badge--processing  { background: rgb(var(--color-primary-50)); color: rgb(var(--color-primary-700)); }
.badge--in-progress { background: rgb(224 242 254); color: #075985; }
.badge--completed   { background: rgb(var(--color-success-bg)); color: rgb(var(--color-success)); }
.badge--partial     { background: rgb(255 237 213 / 0.8); color: #9a3412; }
.badge--canceled    { background: rgb(100 116 139 / 0.1); color: #475569; }
.badge--rejected    { background: rgb(var(--color-danger-bg)); color: rgb(var(--color-danger)); }
.badge--answered    { background: rgb(var(--color-primary-50)); color: rgb(var(--color-primary-700)); }
.badge--closed      { background: rgb(100 116 139 / 0.1); color: #475569; }
.badge--welcome     { background: rgb(124 58 237 / 0.1); color: #5b21b6; }
.badge--neutral     { background: rgb(100 116 139 / 0.1); color: #475569; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 14px;
    color: rgb(var(--color-text-soft));
    font-variant-numeric: tabular-nums;
}
.pagination-nav { display: flex; align-items: center; gap: 0.5rem; }
.page-btn {
    display: inline-grid;
    place-items: center;
    width: var(--control-h);
    height: var(--control-h);
    border: 1px solid rgb(var(--color-border));
    border-radius: var(--radius-control);
    background: rgb(var(--color-surface));
    /* Buttons do not inherit color: without this the arrows vanish on dark surfaces. */
    color: rgb(var(--color-text-2));
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
    box-shadow: var(--shadow-control);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
@media (min-width: 768px) { .page-btn { width: 2.25rem; height: 2.25rem; } }
.page-btn:hover:not(:disabled) { border-color: rgb(var(--color-border-strong)); color: rgb(var(--color-text)); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Loading ---------- */
@keyframes pulse { 50% { opacity: 0.55; } }
.skeleton { background: rgb(var(--color-surface-muted)); border-radius: var(--radius-control); animation: pulse 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.skeleton-line { height: var(--control-h); }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 1.125rem; height: 1.125rem; animation: spin 0.8s linear infinite; vertical-align: middle; }

/* ---------- Modal (bottom sheet on phones) ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgb(12 17 28 / 0.4);
}
.modal-box {
    position: relative;
    width: 100%;
    max-width: 32rem;
    background: rgb(var(--color-surface));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-menu);
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    max-height: 88vh;
    max-height: 88dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}
@media (min-width: 640px) {
    .modal-backdrop { align-items: center; padding: 1.5rem; }
    .modal-box { border-radius: var(--radius-lg); padding: 1.5rem; max-height: 80vh; }
}
.modal-close {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-block: -0.5rem; margin-inline: 0 -0.5rem;
    flex-shrink: 0;
    background: none;
    border: none;
    border-radius: var(--radius-control);
    cursor: pointer;
    color: rgb(var(--color-text-muted));
    font-size: 1.375rem;
    line-height: 1;
    transition: background-color 0.15s, color 0.15s;
}
.modal-close:hover { color: rgb(var(--color-text)); background: rgb(var(--color-surface-muted)); }

/* ---------- Alerts & toast ---------- */
.alert {
    border-radius: var(--radius-control);
    padding: 0.625rem 0.875rem;
    font-size: 14px;
    line-height: 1.5;
}
.alert--warning { border: 1px solid rgb(245 158 11 / 0.35); background: rgb(var(--color-warning-bg)); color: rgb(var(--color-warning)); }

.toast {
    position: fixed;
    top: calc(0.75rem + env(safe-area-inset-top));
    inset-inline-start: 0.75rem;
    inset-inline-end: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    box-shadow: 0 12px 32px -8px rgb(12 17 28 / 0.35);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    z-index: 60;
    color: #fff;
    transition: opacity 0.3s;
}
@media (min-width: 640px) { .toast { inset-inline-start: auto; inset-inline-end: 1.5rem; top: 1.5rem; max-width: 26rem; } }
.toast--ok { background: rgb(var(--color-text)); color: #fff; }
.toast--error { background: rgb(var(--color-danger)); }

/* ---------- Auth pages (signup, reset, verify) ---------- */
.auth-page { display: flex; align-items: flex-start; justify-content: center; padding: 1rem 0 2rem; }
.auth-box { width: 100%; max-width: 420px; }
.auth-card { padding: 1.25rem 1rem; border-radius: var(--radius-lg); border: 0; box-shadow: var(--shadow-raised); }
@media (min-width: 560px) { .auth-card { padding: 2rem; } }
.auth-title { margin: 0 0 1rem; font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; color: rgb(var(--color-text)); }
.auth-alt { margin: 0; text-align: center; font-size: 15px; color: rgb(var(--color-text-soft)); padding-top: 0.25rem; }
.auth-alt .link { display: inline-block; padding: 0.625rem 0.125rem; margin: -0.625rem 0; }
.auth-hint { text-align: center; font-size: 14px; color: rgb(var(--color-text-soft)); }
@media (min-width: 768px) {
    .auth-page { align-items: center; padding: 2rem 0; min-height: 70vh; }
}

/* ---------- Money boxes, receipts, code ---------- */
.amount-box {
    text-align: center;
    border-radius: var(--radius-control);
    background: rgb(var(--color-primary-50));
    border: 1px solid rgb(var(--color-primary-200));
    padding: 0.75rem;
    margin-bottom: 1rem;
}
.amount-box--copy { cursor: pointer; transition: border-color 0.15s; }
.amount-box--copy:hover { border-color: rgb(var(--color-primary-500)); }
.amount-box-label {
    font-size: 13px;
    font-weight: 500;
    color: rgb(var(--color-primary-700));
    margin-bottom: 0.125rem;
}
.amount-box-value { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; color: rgb(var(--color-primary-900)); font-variant-numeric: tabular-nums; }

.eyebrow {
    font-size: 13px;
    font-weight: 500;
    color: rgb(var(--color-text-soft));
}

.code-chip {
    border-radius: 0.375rem;
    background: rgb(var(--color-surface-muted));
    padding: 0.125rem 0.375rem;
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgb(var(--color-text));
}

.code-block {
    background: rgb(var(--color-page));
    color: rgb(var(--color-text-2));
    padding: 0.875rem 1rem;
    border-radius: var(--radius-control);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.65;
    border: 1px solid rgb(var(--color-border-soft));
}
/* --dark is the request variant (light despite the name). */
.code-block--dark { background: rgb(var(--color-surface)); color: rgb(var(--color-text)); }

.receipt {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-control);
    background: rgb(var(--color-success-bg));
    border: 1px solid rgb(var(--color-success) / 0.25);
    font-size: 14px;
}
.receipt-title { margin: 0; font-weight: 600; color: rgb(var(--color-success)); }
.receipt-rows { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; color: rgb(var(--color-text-2)); overflow-wrap: anywhere; }
.receipt-rows span { font-variant-numeric: tabular-nums; color: rgb(var(--color-text)); font-weight: 500; }

/* ---------- Layout helpers ---------- */
/* Alpine <template> siblings are skipped so the first visible child never gets a top gap. */
.stack > :not(template) ~ :not(template) { margin-top: 1rem; }
.form-stack > :not(template) ~ :not(template) { margin-top: 1rem; }
.stack-sm > :not(template) ~ :not(template) { margin-top: 0.5rem; }
.stack-lg > :not(template) ~ :not(template) { margin-top: 1.25rem; }
@media (min-width: 768px) { .stack-lg > :not(template) ~ :not(template) { margin-top: 1.5rem; } }
.field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.375rem; }
.row { display: flex; align-items: center; gap: 0.5rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.grow { flex: 1; }
.muted { color: rgb(var(--color-text-soft)); }
.strong { font-weight: 600; color: rgb(var(--color-text)); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }
/* Every entity id renders with .cell-id; pair with .muted (plain) or .link (clickable). */
.cell-id {
    font-family: var(--font-mono);
    font-size: 12.5px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.dim { color: rgb(var(--color-text-muted)); }
.nowrap { white-space: nowrap; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 13px; }
.text-2xs { font-size: 12px; }
.row-wrap { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ==========================================================================
   New order (mobile-first)
   ========================================================================== */
.order-card { max-width: 48rem; margin-inline: auto; }
@media (min-width: 768px) { .order-card.card--pad { padding: 1.75rem 2rem 2rem; } }
@media (max-width: 1023px) {
    /* One swipeable row of icon-only chips. */
    .chip-row {
        flex-wrap: nowrap;
        gap: 0.375rem;
        overflow-x: auto;
        margin-inline: -1rem;
        padding-inline: 1rem;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        scroll-padding-inline: 1rem;
    }
    .chip-row::-webkit-scrollbar { display: none; }
    .chip-row .chip { padding: 0; width: 2.75rem; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .chip-row { margin-inline: -1.5rem; padding-inline: 1.5rem; }
    .order-card .chip-row { margin-inline: -2rem; padding-inline: 2rem; }
}
@media (max-width: 559px) {
    .order-card.card--pad { padding: 0.875rem 0.875rem 1rem; }
    .order-card.stack-lg > :not(template) ~ :not(template) { margin-top: 0.875rem; }
    .order-card .chip-row { margin-inline: -0.875rem; padding-inline: 0.875rem; }
    .order-card .label { font-size: 13px; margin-bottom: 0.25rem; }
    /* The same submit button, pinned to the bottom of the viewport. */
    .order-submit {
        position: sticky;
        bottom: calc(0.5rem + env(safe-area-inset-bottom));
        z-index: 5;
        min-height: 3rem;
        font-size: 16px;
        box-shadow: 0 6px 16px -4px rgb(12 17 28 / 0.28);
    }
    .order-submit:disabled { opacity: 1; background: rgb(var(--color-primary-200)); color: rgb(var(--color-primary-900) / 0.7); }
}

/* ==========================================================================
   Landing (public home: hero + login, then sections)
   ========================================================================== */
.landing { font-size: 16px; line-height: 1.55; }
.landing :where(h1, h2, h3) { margin: 0; font-weight: 600; color: rgb(var(--color-text)); }
.landing :where(p) { margin: 0; }

/* Full-bleed backgrounds without changing the content column. */
.lp-band { position: relative; isolation: isolate; }
.lp-band::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: calc(50% - 50vw);
    inset-inline-end: calc(50% - 50vw);
    z-index: -1;
    background: rgb(var(--color-surface));
}

/* Hero */
.hero { position: relative; isolation: isolate; padding: 0.75rem 0 1.5rem; }
.hero::after {
    content: "";
    position: absolute;
    inset-inline-start: calc(50% - 50vw);
    inset-inline-end: calc(50% - 50vw);
    bottom: 0;
    height: 40%;
    z-index: -1;
    background: rgb(var(--color-surface-muted));
    clip-path: polygon(0 38%, 100% 0, 100% 100%, 0 100%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: center; }
.hero-title {
    font-size: 1.875rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
    max-width: 18ch;
}
.hero-title em { font-style: normal; color: rgb(var(--color-primary-500)); }
.hero-lede { margin-top: 0.5rem; font-size: 16px; color: rgb(var(--color-text-2)); max-width: 36ch; line-height: 1.5; }
.hero-login { width: 100%; max-width: 460px; }
.hero-login .auth-card { padding: 1.25rem 1rem 1rem; }
.hero-login .auth-title { font-size: 19px; margin-bottom: 0.875rem; }
.hero-login .form-stack > :not(template) ~ :not(template) { margin-top: 0.75rem; }
.hero-login .link.text-xs { display: inline-block; padding: 0.625rem 0; margin: -0.625rem 0; font-size: 13px; }

/* Sections */
.lp-section { padding: 3.25rem 0; }
.lp-head h2 { font-size: 1.5rem; line-height: 1.12; letter-spacing: -0.024em; }
.lp-head p { margin-top: 0.5rem; font-size: 15px; color: rgb(var(--color-text-soft)); max-width: 44ch; }

/* Reasons: one ruled panel */
.lp-reasons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.lp-panel { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid rgb(var(--color-border)); }
.lp-reason { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 0.875rem; padding: 1rem 0; }
.lp-reason:not(:last-child) { border-bottom: 1px solid rgb(var(--color-border-soft)); }
.lp-reason svg { grid-row: span 2; margin-top: 1px; color: rgb(var(--color-text-soft)); }
.lp-reason h3 { font-size: 16px; letter-spacing: -0.01em; margin-bottom: 0.125rem; }
.lp-reason p { color: rgb(var(--color-text-soft)); font-size: 15px; line-height: 1.55; }

/* Steps: connected timeline */
.lp-steps {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
    position: relative;
    --fill: 0%;
}
.lp-steps.is-on { --fill: 100%; }
.lp-steps::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 40px;
    inset-inline-start: 19px;
    width: 2px;
    background: linear-gradient(180deg, rgb(var(--color-primary-500)) 0 0) top / 100% var(--fill) no-repeat, rgb(var(--color-border-soft));
    transition: background-size 1.4s var(--ease);
}
@property --fill { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
.lp-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 1rem; padding-bottom: 1.25rem; position: relative; }
.lp-step:last-child { padding-bottom: 0; }
.lp-node {
    position: relative;
    z-index: 1;
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgb(var(--color-surface));
    border: 1px solid rgb(var(--color-border));
    box-shadow: 0 0 0 6px rgb(var(--color-surface));
    font-weight: 600;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}
.lp-steps.is-on .lp-node { background: rgb(var(--color-primary-500)); color: rgb(var(--color-primary-fg)); border-color: rgb(var(--color-primary-600)); }
.lp-steps.is-on .lp-step:nth-child(2) .lp-node { transition-delay: 0.32s; }
.lp-steps.is-on .lp-step:nth-child(3) .lp-node { transition-delay: 0.64s; }
.lp-steps.is-on .lp-step:nth-child(4) .lp-node { transition-delay: 0.96s; }
.lp-step h3 { font-size: 16px; letter-spacing: -0.01em; margin: 0.5rem 0 0.125rem; }
.lp-step p { font-size: 15px; color: rgb(var(--color-text-soft)); }

/* Testimonials: one swipeable row on phones */
.lp-voices-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 0.5rem 2rem; }
.lp-note { font-size: 13px; color: rgb(var(--color-text-soft)); }
.lp-voices {
    margin: 1.25rem calc(-1 * var(--gutter)) 0;
    padding: 0 var(--gutter) 4px;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.lp-voices::-webkit-scrollbar { display: none; }
.lp-side { display: contents; }
.lp-quote {
    flex: 0 0 84%;
    scroll-snap-align: start;
    margin: 0;
    background: rgb(var(--color-surface));
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 1px rgb(var(--color-border-soft));
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}
.lp-quote blockquote { margin: 0; font-size: 15px; line-height: 1.6; color: rgb(var(--color-text-2)); }
.lp-quote--lead blockquote { font-size: 17px; line-height: 1.45; letter-spacing: -0.01em; color: rgb(var(--color-text)); font-weight: 500; }
.lp-qmark { display: block; width: 22px; height: 17px; margin-bottom: 0.75rem; color: rgb(var(--color-border)); }
.lp-who { display: flex; align-items: center; gap: 0.75rem; font-size: 14px; font-weight: 600; color: rgb(var(--color-text)); }
.lp-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: rgb(var(--color-text-2)); background: rgb(var(--color-surface-muted)); }

/* FAQ accordion */
.lp-faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.lp-acc { border-top: 1px solid rgb(var(--color-border-soft)); }
.lp-acc details { border-bottom: 1px solid rgb(var(--color-border-soft)); }
.lp-acc summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    min-height: 3.25rem;
    padding: 0.75rem 0.125rem;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: rgb(var(--color-text));
    transition: color 0.15s;
}
.lp-acc summary::-webkit-details-marker { display: none; }
.lp-acc summary:hover { color: rgb(var(--color-primary-700)); }
.lp-acc summary:focus-visible { outline-offset: -2px; border-radius: 0.375rem; }
.lp-chev { flex: none; width: 28px; height: 28px; display: grid; place-items: center; color: rgb(var(--color-text-soft)); transition: transform 0.35s var(--ease), color 0.2s; }
.lp-acc details[open] .lp-chev { transform: rotate(45deg); color: rgb(var(--color-text)); }
.lp-acc details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete; }
.lp-acc details[open]::details-content { block-size: auto; }
.lp-ans { padding-block: 0 1rem; padding-inline: 0.125rem 2.5rem; color: rgb(var(--color-text-soft)); font-size: 15px; max-width: 62ch; }

@media (min-width: 560px) {
    .hero { padding: 2rem 0 3.5rem; }
    .hero::after { height: 62%; }
    .hero-title { font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.035em; }
    .hero-lede { margin-top: 1.25rem; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
    .hero-login .auth-card { padding: 2rem 2rem 1.75rem; }
    .hero-login .auth-title { font-size: 22px; margin-bottom: 1.5rem; }
    .hero-login .form-stack > :not(template) ~ :not(template) { margin-top: 1rem; }
    .lp-section { padding: 4.5rem 0; }
    .lp-head h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.1; letter-spacing: -0.028em; }
    .lp-head p { margin-top: 0.875rem; font-size: 17px; }
    .lp-panel { grid-template-columns: 1fr 1fr; }
    .lp-reason { display: block; padding-block: 2rem 2.25rem; padding-inline: 0 2rem; }
    .lp-reason:nth-child(even) { padding-block: 2rem 2.25rem; padding-inline: 2rem 0; }
    .lp-reason:not(:last-child) { border-bottom: 0; }
    .lp-reason:nth-child(-n+2) { border-bottom: 1px solid rgb(var(--color-border-soft)); }
    .lp-reason svg { margin: 0 0 1.25rem; }
    .lp-reason h3 { font-size: 19px; margin-bottom: 0.5rem; }
    .lp-reason p { max-width: 34ch; }
    .lp-voices { margin: 2.5rem 0 0; padding: 0; overflow: visible; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1rem; }
    .lp-side { display: grid; gap: 1rem; }
    .lp-quote { padding: 2rem; gap: 1.5rem; }
    .lp-quote blockquote { font-size: 16px; }
    .lp-quote--lead { grid-row: span 2; padding: 2.5rem; }
    .lp-quote--lead blockquote { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.625rem); line-height: 1.4; letter-spacing: -0.015em; max-width: 30ch; }
    .lp-qmark { width: 28px; height: 22px; margin-bottom: 1.25rem; }
    .lp-acc summary { font-size: 17px; padding: 1.25rem 0.25rem; }
    .lp-ans { padding-block: 0 1.5rem; padding-inline: 0.25rem 3.5rem; font-size: 16px; }
}
@media (min-width: 900px) {
    .hero { padding: 4rem 0 5.5rem; }
    .hero-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 3rem; }
    .hero-title { max-width: 13ch; }
    .hero-login { max-width: none; }
    .lp-section { padding: 6rem 0; }
    .lp-reasons, .lp-faq { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4rem; }
    .lp-reasons .lp-head { position: sticky; top: calc(var(--header-h) + 3rem); }
    .lp-steps-sec .lp-head { text-align: center; }
    .lp-steps-sec .lp-head p { margin-inline: auto; }
    .lp-steps { margin-top: 3.5rem; max-width: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
    .lp-steps::before {
        top: 19px; bottom: auto; inset-inline-start: 12.5%; inset-inline-end: 12.5%; width: auto; height: 2px;
        background: linear-gradient(90deg, rgb(var(--color-primary-500)) 0 0) left / var(--fill) 100% no-repeat, rgb(var(--color-border-soft));
    }
    .lp-step { display: block; text-align: center; padding: 0; }
    .lp-node { margin: 0 auto 1.5rem; }
    .lp-step h3 { font-size: 19px; margin: 0 0 0.5rem; }
    .lp-step p { max-width: 26ch; margin: 0 auto; }
}
@media (min-width: 1100px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 4rem; }
}
/* The public footer sits on the landing's last band edge. */
body:not(.app--auth) .footer { text-align: start; }
body:not(.app--auth) .footer > span { display: block; max-width: var(--wrap); margin: 0 auto; }

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

/* Network chips wrap onto new lines on phones so every network stays visible
   (no sideways scroll). */
@media (max-width: 1023px) {
    .chip-row, .order-card .chip-row, body.app--auth .order-card .chip-row {
        flex-wrap: wrap;
        overflow: visible;
        margin-inline: 0;
        padding-inline: 0;
    }
}

/* ---------- RTL (ar, fa, he, ur) ----------
   Lo direccional ya usa propiedades lógicas; aquí solo lo que estas no cubren. */
@media (max-width: 1023.98px) {
    [dir="rtl"] .sidebar:not(.is-open) { transform: translateX(100%); }
}
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
/* Código, IDs, claves y URLs se leen siempre de izquierda a derecha. */
[dir="rtl"] :is(code, kbd, samp, span.mono, span.cell-id, button.cell-id) { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] :is(pre, .code-block) { direction: ltr; text-align: left; }
[dir="rtl"] input:is([type="email"], [type="url"], [type="tel"], [type="number"], .mono) { direction: ltr; }
@media (min-width: 900px) {
    [dir="rtl"] .lp-steps::before { background-position: right center, 0 0; }
}

/* Icon library (own sprite, iconHtml / navIcon): an icon takes the text color;
   a network logo its brand color, or --brand-icon-color when the theme forces one tone. */
.icon-slot { display: inline-flex; flex-shrink: 0; }
.icon-slot .icon { display: block; }
.icon--brand, .nav-link .icon--brand { color: var(--brand-icon-color, var(--brand)); }
