/* style.css — theme design system, plain CSS. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Tokens — dark "quioko-like": near-black violet surfaces, neon lime accent with
   DARK text on primary buttons (--color-primary-fg), violet glow as secondary
   accent. In this dark palette the -600/-700 steps run BRIGHTER than -500 where
   they color text on dark grounds. */
:root {
    /* Brand (neon lime). RGB triplet without rgb()/commas → opacity via rgb(var(--x) / 0.5). */
    --color-primary-50: 34 45 10;    /* dark lime tint (selected/hover fills) */
    --color-primary-100: 42 56 12;
    --color-primary-200: 56 73 16;
    --color-primary-500: 183 239 0;  /* #b7ef00 */
    --color-primary-600: 164 219 0;  /* button hover (slightly deeper) */
    --color-primary-700: 208 246 110;/* readable light-lime text on dark fills */
    --color-primary-900: 228 250 172;
    --color-primary-fg: 8 3 14;      /* near-black text on lime buttons */

    /* Secondary accent — violet glow used for hero gradients/shadows */
    --color-accent: 138 43 249;      /* #8a2bf9 */
    --color-accent-soft: 125 25 255; /* #7d19ff, radial glows */

    /* Sidebar */
    --color-sidebar: 13 6 24;        /* #0d0618 */
    --color-sidebar-fg: 255 255 255;

    /* Page backgrounds */
    --color-page: 8 3 14;            /* #08030e */
    --color-page-public: 8 3 14;

    /* Surfaces and UI grays (deep violet-black scale) */
    --color-surface: 18 9 31;        /* #12091f cards/header */
    --color-surface-muted: 27 14 43; /* soft backgrounds: readout, thead, hover, light code */
    --color-border: 58 36 82;
    --color-border-soft: 39 22 59;
    --color-text: 255 255 255;
    --color-text-soft: 190 176 204;  /* #beb0cc */
    --color-text-muted: 138 121 158;

    /* Shape */
    --radius: 1.25rem;
    --radius-control: 0.875rem;
    --radius-pill: 9999px;
    --shadow-card: none;
    --shadow-control: none;
    --shadow-menu: 0 8px 24px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 30px rgb(var(--color-primary-500) / 0.35);
    --shadow-glow-accent: 0 0 40px rgb(var(--color-accent-soft) / 0.35);
    /* Typography: tenants override only this var (plus their own @font-face for web fonts). */
    --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Base */
body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column; /* public by default; .app--auth → row */
    background: rgb(var(--color-page-public));
    color: rgb(var(--color-text));
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}
/* Ambient violet/lime glow on public (marketing) pages only — the dense
   authenticated app stays flat for readability over tables/forms. */
body:not(.app--auth) {
    background-image:
        radial-gradient(ellipse 1100px 640px at 12% -8%, rgb(var(--color-accent-soft) / 0.42), transparent 62%),
        radial-gradient(ellipse 900px 600px at 100% 0%, rgb(var(--color-accent) / 0.26), transparent 58%),
        radial-gradient(ellipse 700px 480px at 100% 0%, rgb(var(--color-primary-500) / 0.10), transparent 55%);
    background-repeat: no-repeat;
    background-attachment: fixed;
}
/* Form controls don't inherit body font-family by default; force it. */
button, input, select, textarea { font-family: inherit; }
body.app--auth {
    flex-direction: row;
    background: rgb(var(--color-page));
}

/* Auth/public visibility (.hidden is toggled on the ui-*-only elements). */
.hidden { display: none !important; }
[x-cloak] { display: none !important; }

* { box-sizing: border-box; }
img { max-width: 100%; }

/* Layout (app shell) */

/* Mobile sidebar overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 30;
}
@media (min-width: 1024px) { .overlay { display: none; } }

/* Sidebar */
.sidebar {
    position: fixed;
    inset-block: 0;
    left: 0;
    z-index: 40;
    width: 240px;
    min-height: 100vh;
    background: rgb(var(--color-sidebar));
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transform: translateX(-100%);
    transition: transform 0.2s;
}
.sidebar.is-open { transform: translateX(0); }
@media (min-width: 1024px) { .sidebar { transform: translateX(0); } }

.sidebar-logo {
    height: 4.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
}
.sidebar-logo img { height: 2.75rem; max-width: 100%; object-fit: contain; }
.sidebar-brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: rgb(var(--color-sidebar-fg));
    letter-spacing: -0.025em;
}

.nav {
    flex: 1;
    padding: 0.5rem 0.75rem 0;
    overflow-y: auto;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 7px 0.75rem;
    margin-bottom: 2px;
    border-radius: var(--radius-control);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: rgb(var(--color-sidebar-fg) / 0.5);
    transition: all 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}
.nav-link:hover { color: rgb(var(--color-sidebar-fg)); background: rgb(var(--color-sidebar-fg) / 0.06); }
.nav-link.is-active { color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-500) / 0.08); }
.nav-link svg, .nav-link i { width: 1rem; height: 1rem; flex-shrink: 0; opacity: 0.7; }

.sidebar-logout { padding: 0 0.75rem 0.75rem; }
@media (min-width: 1024px) { .sidebar-logout { display: none; } }

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

/* Header */
.header {
    background: rgb(var(--color-surface));
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 20;
}
.header--auth {
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}
.header--public { width: 100%; }
.header-inner {
    max-width: 72rem;
    margin: 0 auto;
    width: 100%;
    height: 3.5rem;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
@media (min-width: 768px) {
    .header--auth { padding: 0 1.5rem; }
    .header-inner { padding: 0 1.5rem; }
}
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 15px;
    color: rgb(var(--color-text));
    letter-spacing: -0.025em;
    text-decoration: none;
}
.header-brand img { height: 2.25rem; max-width: 100%; object-fit: contain; }

/* Header icon button (hamburger, etc.) */
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgb(var(--color-text-soft));
    display: inline-flex;
    align-items: center;
    transition: color 0.15s;
    padding: 0;
}
.icon-btn:hover { color: rgb(var(--color-text)); }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }
@media (min-width: 1024px) { .icon-btn--mobile { display: none; } }

/* Panel name hidden in the navbar by request; re-enable via display + font styles. */
.header-mobile-brand { display: none; }

/* Header action button (balance, language, currency, logout) */
.header-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    cursor: pointer;
    color: rgb(var(--color-text) / 0.7);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-control);
    font-size: 12px;
    transition: all 0.15s;
    text-decoration: none;
}
.header-btn:hover { color: rgb(var(--color-text)); background: rgb(255 255 255 / 0.06); }
.header-btn svg { width: 0.875rem; height: 0.875rem; }
.header-btn--balance { color: rgb(var(--color-text)); font-weight: 500; padding: 0.25rem 0.625rem; }
.header-btn--balance:hover { color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-50)); }
.header-btn--balance svg { color: rgb(var(--color-text-muted)); }
.header-btn--logout:hover { color: rgb(255 94 94); background: rgb(255 62 62 / 0.12); }
.desktop-only { display: none; }
@media (min-width: 1024px) { .desktop-only { display: flex; } }

/* Public nav links */
.pubnav {
    display: none;
    align-items: center;
    gap: 0.25rem;
    font-size: 13px;
    font-weight: 500;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
@media (min-width: 768px) { .pubnav { display: flex; } }
.pubnav-link {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-control);
    color: rgb(var(--color-text-soft));
    text-decoration: none;
    transition: all 0.15s;
    position: relative;
}
.pubnav-link:hover { color: rgb(var(--color-text)); }
.pubnav-link.is-active { color: rgb(var(--color-primary-500)); }
.pubnav-link.is-active::after {
    content: "";
    position: absolute;
    left: 0.875rem;
    right: 0.875rem;
    bottom: 0.125rem;
    height: 2px;
    border-radius: 2px;
    background: rgb(var(--color-primary-500));
}
/* Auth CTAs + lang/currency, pinned to the far right of the public header. */
.header-public-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.pubnav-auth { display: none; align-items: center; gap: 0.5rem; margin-left: 0.25rem; }
@media (min-width: 768px) { .pubnav-auth { display: flex; } }
.menu-btn { display: inline-flex; margin-left: 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;
    position: relative;
    z-index: 50;
}
@media (min-width: 768px) { .pubmenu-mobile { display: none; } }
.pubmenu-mobile a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-control);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(var(--color-text-soft));
    text-decoration: none;
    transition: all 0.15s;
}
.pubmenu-mobile a:hover { color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-500) / 0.05); }
.pubmenu-mobile a.is-active { color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-500) / 0.06); }
.pubmenu-mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgb(var(--color-border-soft));
}
.pubmenu-mobile-auth .btn { width: 100%; }

/* Dropdowns (language / currency) */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    margin-top: 0.25rem;
    background: rgb(var(--color-surface));
    border: 1px solid rgb(var(--color-border-soft));
    border-radius: var(--radius-control);
    box-shadow: var(--shadow-menu);
    padding: 0.25rem 0;
    min-width: 120px;
    z-index: 50;
}
.dropdown-menu--right { right: 0; }
.dropdown-menu--left { left: 0; }
/* Shared header switchers (langSwitcher/currencySwitcher partials) carry no
   alignment modifier: the header context decides. */
.header--auth .dropdown-menu { right: 0; }
.header--public .dropdown-menu { left: 0; }
/* Full-width scrollable menu (new_order category/service select). */
.dropdown-menu--full { left: 0; right: 0; width: 100%; max-height: 16rem; overflow-y: auto; }
.dropdown-item.is-selected { background: rgb(var(--color-primary-50)); color: rgb(var(--color-primary-700)); }
.dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.375rem 0.75rem;
    font-size: 12px;
    color: rgb(var(--color-text-soft));
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}
.dropdown-item:hover { color: rgb(var(--color-text)); background: rgb(var(--color-surface-muted)); }

/* Main / footer */
.main {
    flex: 1;
    padding: 0.5rem 1rem 1rem;
    overflow-y: auto;
}
@media (min-width: 768px) { .main { padding: 0.75rem 1.5rem 1.5rem; } }
@media (min-width: 1024px) { .main { padding: 0.75rem 2.5rem 2.5rem; } }
.container { max-width: 72rem; margin: 0 auto; width: 100%; }
/* Instant click feedback: while a navigation request is in flight, htmx marks
   #content (hx-indicator on <body>) and the outgoing page dims immediately. */
#content { transition: opacity 0.12s; }
#content.htmx-request { opacity: 0.55; }
/* The authenticated app is data-dense (10-column order tables): give it more
   room than the public pages. Wide-screen space goes to the tables instead of
   dead side margins. */
body.app--auth .container { max-width: 88rem; }

.footer {
    flex-shrink: 0;
    background: rgb(var(--color-surface) / 0.5);
    padding: 1rem;
    font-size: 11px;
    color: rgb(var(--color-text-soft) / 0.6);
    text-align: center;
}
@media (min-width: 768px) { .footer { padding: 1rem 1.5rem; } }

/* Floating chat buttons (WhatsApp / Telegram) */
.chat-fab-stack {
    position: fixed;
    bottom: 1.5rem;
    z-index: 50;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.75rem;
}
.chat-fab-stack--left { left: 1.5rem; }
.chat-fab-stack--right { right: 1.5rem; }
.chat-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-pill);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease-out;
}
.chat-fab:hover { filter: brightness(1.08); }

.chat-fab--whatsapp { background: linear-gradient(to bottom, #2EE373, #1FA855); }
.chat-fab--telegram { background: linear-gradient(to bottom, #36B0EE, #1A88BC); }
.chat-fab svg { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25)); }
.chat-fab--whatsapp svg { width: 1.75rem; height: 1.75rem; }
.chat-fab--telegram svg { width: 2.25rem; height: 2.25rem; }

/* Components */

/* Card */
.card {
    background: rgb(var(--color-surface));
    border-radius: var(--radius);
    border: 1px solid rgb(var(--color-border-soft));
}
.card--pad { padding: 1.25rem; }
@media (min-width: 768px) { .card--pad { padding: 1.5rem; } }

/* Form controls */
.label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgb(var(--color-text-soft));
    margin-bottom: 0.375rem;
}
.input, .select, .textarea, .select-trigger {
    width: 100%;
    border: 1px solid rgb(var(--color-border));
    border-radius: var(--radius-control);
    background: rgb(var(--color-surface));
    padding: 9px 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem; /* uniform height across inputs, selects and triggers */
    color: rgb(var(--color-text));
    box-shadow: var(--shadow-control);
    transition: all 0.15s;
    font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus, .select-trigger:focus {
    outline: none;
    border-color: rgb(var(--color-primary-500));
    box-shadow: 0 0 0 2px rgb(var(--color-primary-500) / 0.1);
}
/* Button replacing a native <select>: label left, chevron right. */
.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-align: left;
    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: 1rem; height: 1rem; flex-shrink: 0; }
.select-trigger .chevron { width: 1rem; height: 1rem; flex-shrink: 0; color: rgb(var(--color-text-muted)); transition: transform 0.15s; }
.select-trigger .chevron.is-open { transform: rotate(180deg); }

/* Search with magnifier on the left (new_order autocomplete); cf. .search (button right). */
.search-left { position: relative; }
.search-left > svg {
    position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
    width: 1rem; height: 1rem; color: rgb(var(--color-text-muted)); pointer-events: none;
}
.search-left .input { padding-left: 2.25rem; }
.input:disabled, .select:disabled, .textarea:disabled {
    background: rgb(var(--color-surface-muted) / 0.8);
    color: rgb(var(--color-text-soft));
    cursor: not-allowed;
}
.textarea { resize: vertical; }
.select { appearance: none; cursor: pointer; }
.checkbox {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    border-radius: 0.25rem;
    border: 1px solid rgb(var(--color-border));
    accent-color: rgb(var(--color-primary-500));
}
.field { margin-bottom: 0; }
.help { margin-top: 0.25rem; font-size: 12px; color: rgb(var(--color-text-soft)); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 9px 1.25rem;
    border-radius: var(--radius-pill);
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1.25rem;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--block { width: 100%; }
.btn--sm { padding: 0.375rem 0.75rem; font-size: 13px; }
.btn--primary {
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    box-shadow: 0 0 22px rgb(var(--color-primary-500) / 0.28);
}
.btn--primary:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgb(0 0 0 / 0.35), var(--shadow-glow);
}
.btn--primary:active { filter: brightness(0.95); transform: translateY(0); }
.btn--outline {
    background: rgb(var(--color-surface));
    color: rgb(var(--color-text));
    border: 1px solid rgb(var(--color-border));
    box-shadow: var(--shadow-control);
}
.btn--outline:hover:not(:disabled) { background: rgb(var(--color-surface-muted)); }
/* Square icon button */
.btn--icon { padding: 0.375rem; gap: 0; }
/* Very small row action buttons (tables). */
.btn--xs { padding: 0.125rem 0.5rem; font-size: 11px; border-radius: var(--radius-control); }
/* Colored semantic actions (refill=success, cancel=danger). */
.btn--success {
    background: rgb(46 231 182 / 0.1); color: #2ee7b6; border: 1px solid rgb(46 231 182 / 0.35);
    box-shadow: var(--shadow-control);
}
.btn--success:hover:not(:disabled) { background: rgb(46 231 182 / 0.18); }
.btn--danger {
    background: rgb(255 62 62 / 0.1); color: #ff6b6b; border: 1px solid rgb(255 62 62 / 0.35);
    box-shadow: var(--shadow-control);
}
.btn--danger:hover:not(:disabled) { background: rgb(255 62 62 / 0.18); }

/* Accent links */
.link {
    font-weight: 500;
    color: rgb(var(--color-primary-500));
    transition: color 0.15s;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
}
.link:hover { color: rgb(var(--color-primary-500) / 0.8); }

/* Chip (network-logo filter on new_order) */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    flex-shrink: 0;
    border-radius: var(--radius-control);
    border: 1px solid rgb(var(--color-border-soft));
    background: rgb(var(--color-surface));
    color: rgb(var(--color-text-soft));
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.chip:hover { background: rgb(var(--color-surface-muted)); }
.chip img, .chip svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.chip.is-active {
    border-color: rgb(var(--color-primary-500));
    background: rgb(var(--color-primary-50));
    color: rgb(var(--color-primary-700));
    box-shadow: 0 0 0 2px rgb(var(--color-primary-500) / 0.1);
}

/* Readout (read-only box: description, charge, average time) */
.readout {
    width: 100%;
    border: 1px solid rgb(var(--color-border-soft));
    border-radius: var(--radius-control);
    background: rgb(var(--color-surface-muted));
    padding: 9px 0.75rem;
    font-size: 0.875rem;
    color: rgb(var(--color-text-soft));
    white-space: pre-line;
}
.readout--value { color: rgb(var(--color-text)); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Search (input with embedded button/magnifier) */
.search { position: relative; width: 100%; }
@media (min-width: 640px) { .search { width: 18rem; } }
.search .input { padding-right: 3rem; }
.search-btn {
    position: absolute;
    inset-block: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    border: none;
    border-radius: 0 var(--radius-control) var(--radius-control) 0;
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    cursor: pointer;
    transition: filter 0.15s;
}
.search-btn:hover { filter: brightness(1.1); }
.search-btn svg { width: 1rem; height: 1rem; }

/* Data table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; text-align: left; font-size: 0.875rem; border-collapse: collapse; }
.table thead tr { border-bottom: 1px solid rgb(var(--color-border-soft)); }
.table th {
    padding: 0.625rem 0.75rem;
    font-size: 11px;
    font-weight: 600;
    color: rgb(var(--color-text-soft) / 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.table td { padding: 0.625rem 0.75rem; vertical-align: top; }
.table tbody tr { border-top: 1px solid rgb(var(--color-border-soft)); }
.table tbody tr:hover { background: rgb(var(--color-surface-muted) / 0.5); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* Long URL in a cell: truncate with ellipsis instead of letting it dictate the
   table width (the full link stays in href/title). */
.table .cell-trunc {
    display: inline-block;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}
.table-empty { padding: 2rem 1rem; text-align: center; font-size: 0.875rem; color: rgb(var(--color-text-soft)); }

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-pill);
    padding: 0.125rem 0.5rem;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.badge--pending     { background: rgb(255 175 0 / 0.12);  color: #ffbe33; } /* amber */
.badge--processing  { background: rgb(77 163 255 / 0.12); color: #4da3ff; } /* blue */
.badge--in-progress { background: rgb(56 189 248 / 0.12); color: #38bdf8; } /* sky */
.badge--completed   { background: rgb(183 239 0 / 0.12);  color: #b7ef00; } /* neon lime */
.badge--partial     { background: rgb(255 159 67 / 0.12); color: #ff9f43; } /* orange */
.badge--canceled    { background: rgb(164 177 205 / 0.12); color: #a4b1cd; } /* slate */
.badge--rejected    { background: rgb(255 62 62 / 0.12);  color: #ff5e5e; } /* red */
.badge--answered    { background: rgb(77 163 255 / 0.12); color: #4da3ff; }
.badge--closed      { background: rgb(164 177 205 / 0.1); color: #8f9cb8; }
.badge--welcome     { background: rgb(167 139 250 / 0.12); color: #a78bfa; }
.badge--neutral     { background: rgb(164 177 205 / 0.12); color: #a4b1cd; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: rgb(var(--color-text-soft));
}
.pagination-nav { display: flex; align-items: center; gap: 0.5rem; }
.page-btn {
    border: 1px solid rgb(var(--color-border));
    border-radius: var(--radius-control);
    background: rgb(var(--color-surface));
    /* Buttons do NOT inherit text color — without this the ‹ › arrows render
       in the UA default (near-black) and vanish on the dark surface. */
    color: rgb(var(--color-text-soft));
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1;
    box-shadow: var(--shadow-control);
    cursor: pointer;
    transition: all 0.15s;
}
.page-btn:hover:not(:disabled) { background: rgb(var(--color-surface-muted)); color: rgb(var(--color-text)); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Skeleton */
@keyframes pulse { 50% { opacity: 0.5; } }
.skeleton { background: rgb(var(--color-border-soft)); border-radius: var(--radius-control); animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }
.skeleton-line { height: 2.5rem; }

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 1rem; height: 1rem; animation: spin 1s linear infinite; }

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
}
.modal-box {
    position: relative;
    width: 100%;
    max-width: 32rem;
    background: rgb(var(--color-surface));
    border-radius: var(--radius);
    box-shadow: var(--shadow-menu);
    padding: 1.25rem;
    max-height: 80vh;
    overflow-y: auto;
}
@media (min-width: 768px) { .modal-box { padding: 1.5rem; } }
.modal-close {
    background: none; border: none; cursor: pointer;
    color: rgb(var(--color-text-muted));
    font-size: 1.25rem; line-height: 1;
}
.modal-close:hover { color: rgb(var(--color-text-soft)); }

/* Alert */
.alert {
    border-radius: var(--radius-control);
    padding: 0.5rem 0.75rem;
    font-size: 13px;
}
.alert--warning { border: 1px solid rgb(255 175 0 / 0.35); background: rgb(255 175 0 / 0.08); color: #ffd166; }

/* Toast (created dynamically at runtime) */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-control);
    box-shadow: var(--shadow-menu);
    font-size: 0.875rem;
    font-weight: 700;
    z-index: 50;
    color: #fff;
    transition: opacity 0.3s;
}
.toast--ok { background: #b7ef00; color: #08030e; }
.toast--error { background: #ff3e3e; }

/* Landing hero (logged-out homepage = login.html). Glow blobs + big headline
   on the left, the auth card on the right; stacks on mobile. */
.hero { position: relative; padding: 2.5rem 0 1rem; overflow: hidden; }
.hero-glow {
    position: absolute;
    inset: -10% -10% auto -10%;
    height: 34rem;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 30rem 20rem at 15% 20%, rgb(var(--color-accent-soft) / 0.55), transparent 68%),
        radial-gradient(ellipse 24rem 18rem at 60% -10%, rgb(var(--color-accent) / 0.38), transparent 62%),
        radial-gradient(ellipse 22rem 16rem at 85% 0%, rgb(var(--color-primary-500) / 0.16), transparent 60%);
}
.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}
@media (min-width: 900px) {
    .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgb(var(--color-border));
    background: rgb(var(--color-surface) / 0.7);
    border-radius: var(--radius-pill);
    padding: 0.375rem 0.875rem 0.375rem 0.625rem;
    margin-bottom: 1.25rem;
}
.hero-kicker::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgb(var(--color-primary-500));
    box-shadow: 0 0 8px rgb(var(--color-primary-500) / 0.8);
}
.hero-title {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: rgb(var(--color-text));
    margin: 0 0 1.125rem;
}
.hero-title-accent { color: rgb(var(--color-primary-500)); }
.hero-sub {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgb(var(--color-text-soft));
    max-width: 34rem;
    margin: 0 0 1.75rem;
}
.hero-cta { gap: 0.875rem; margin-bottom: 2.5rem; }
.btn--lg { padding: 0.875rem 1.75rem; font-size: 1rem; }

/* Hero stat cards (10K+ orders / uptime / instant start). */
.hero-stats { gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.hero-stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.125rem;
    background: rgb(var(--color-surface) / 0.7);
    border: 1px solid rgb(var(--color-border-soft));
    border-radius: var(--radius-control);
}
.hero-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background: rgb(var(--color-primary-500) / 0.12);
    color: rgb(var(--color-primary-500));
    flex-shrink: 0;
}
.hero-stat-icon svg { width: 1.125rem; height: 1.125rem; }
.hero-stat-value { display: block; font-size: 1.1875rem; font-weight: 700; color: rgb(var(--color-text)); letter-spacing: -0.01em; line-height: 1.25; }
.hero-stat-label { display: block; font-size: 11px; font-weight: 500; color: rgb(var(--color-text-soft)); }
.hero-stat-title { font-size: 0.9375rem; font-weight: 700; line-height: 1.2; color: rgb(var(--color-text)); }

/* Supported-platforms row (login hero): colored app-icon-style badges. */
.hero-platforms { margin-top: 0.5rem; }
.hero-platforms-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(var(--color-text-muted));
    margin-bottom: 0.75rem;
}
.platform-row { gap: 1.25rem; row-gap: 0.75rem; }
.platform-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    font-weight: 600;
    color: rgb(var(--color-text));
}
.platform-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    flex-shrink: 0;
}
.platform-badge img { width: 0.875rem; height: 0.875rem; }
.platform-badge--instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.platform-badge--tiktok { background: #000; }
.platform-badge--youtube { background: #ff0000; }
.platform-badge--facebook { background: #1877f2; }
.platform-badge--x { background: #000; }

/* Compact trust bar under the hero (single card, N columns). */
.trust-bar {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    background: rgb(var(--color-surface));
    border: 1px solid rgb(var(--color-border-soft));
    border-radius: var(--radius);
    margin: 0.5rem 0 3.5rem;
    overflow: hidden;
}
.trust-item {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.375rem 1.5rem;
    border-right: 1px solid rgb(var(--color-border-soft));
}
.trust-item:last-child { border-right: none; }
.trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgb(var(--color-primary-500) / 0.12);
    color: rgb(var(--color-primary-500));
    flex-shrink: 0;
}
.trust-icon svg { width: 1.25rem; height: 1.25rem; }
.trust-title { font-size: 0.875rem; font-weight: 600; color: rgb(var(--color-text)); margin: 0 0 0.125rem; }
.trust-text { font-size: 0.8125rem; line-height: 1.4; color: rgb(var(--color-text-soft)); margin: 0; }
@media (max-width: 900px) {
    .trust-item { flex: 1 1 50%; border-right: none; border-bottom: 1px solid rgb(var(--color-border-soft)); }
    .trust-item:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 560px) {
    .trust-item { flex: 1 1 100%; border-bottom: 1px solid rgb(var(--color-border-soft)); }
    .trust-item:last-child { border-bottom: none; }
}

/* Section head laid out as a row (heading left, link right) — services teaser. */
.section-head--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    text-align: left;
    max-width: none;
    margin: 0 0 0;
}
.section-head--row .section-sub { max-width: 30rem; }
.services-teaser-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Services teaser cards (Seguidores / Likes / Visualizaciones). */
.services-teaser-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 3.5rem;
}
.service-teaser-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgb(var(--color-surface));
    border: 1px solid rgb(var(--color-border-soft));
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.service-teaser-card:hover {
    border-color: rgb(var(--color-primary-500) / 0.4);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgb(0 0 0 / 0.35);
}
.service-teaser-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.875rem;
    color: #fff;
    flex-shrink: 0;
}
.service-teaser-icon svg { width: 1.375rem; height: 1.375rem; }
.service-teaser-icon--instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.service-teaser-icon--likes { background: #fb3958; }
.service-teaser-icon--views { background: #ff3b3b; }
.service-teaser-body { flex: 1; min-width: 0; }
.service-teaser-body h3 { font-size: 0.9375rem; font-weight: 600; margin: 0 0 0.25rem; color: rgb(var(--color-text)); }
.service-teaser-body p { font-size: 0.8125rem; line-height: 1.45; margin: 0; color: rgb(var(--color-text-soft)); }
.service-teaser-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgb(var(--color-surface-muted));
    color: rgb(var(--color-text));
    flex-shrink: 0;
}

/* Decorative glow ring behind the auth card inside the hero grid. */
.hero-panel { position: relative; }
.hero-panel::before {
    content: "";
    position: absolute;
    inset: -2.5rem;
    z-index: -1;
    background: radial-gradient(circle at 50% 40%, rgb(var(--color-accent-soft) / 0.38), transparent 65%);
    pointer-events: none;
}

/* Section heading (feature grid intro). */
.section-head { text-align: center; max-width: 34rem; margin: 3.5rem auto 0; position: relative; z-index: 1; }
.section-head .eyebrow { display: block; margin-bottom: 0.625rem; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.01em; color: rgb(var(--color-text)); margin: 0 0 0.625rem; }
.section-sub { font-size: 0.9375rem; line-height: 1.6; color: rgb(var(--color-text-soft)); margin: 0; }

/* Auth (login / signup / reset) */
.auth-page { display: flex; align-items: flex-start; justify-content: center; padding-top: 3rem; }
.auth-box { width: 100%; max-width: 380px; padding: 0 1rem; }
.auth-card {
    padding: 2rem;
    border-color: rgb(var(--color-accent) / 0.35);
    box-shadow: 0 20px 60px rgb(0 0 0 / 0.35), 0 0 50px rgb(var(--color-accent-soft) / 0.12);
}
.auth-title { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; color: rgb(var(--color-text)); }
.auth-alt { text-align: center; font-size: 13px; color: rgb(var(--color-text-soft)); padding-top: 0.25rem; }
/* Status/help paragraph on auth pages ("email sent", "invalid token"). */
.auth-hint { text-align: center; font-size: 13px; color: rgb(var(--color-text-soft)); }
@media (min-width: 768px) {
    .auth-page { align-items: center; padding-top: 0; min-height: 75vh; }
    .auth-box { padding: 0; }
}
/* Inside the hero grid the auth card sits in its own column — it doesn't need
   the standalone page's min-height centering. */
.hero-panel .auth-page { min-height: 0; padding-top: 0; }

/* Card section title (h2 inside .card--pad). Keeps the browser's default top
   margin — collapses against the card padding exactly like the old inline style. */
.card-title { font-size: 13px; font-weight: 600; color: rgb(var(--color-text)); margin-bottom: 1rem; }

/* Responsive form grid (account page et al). --wide = the profile variant. */
.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)); }
/* Submit row spanning the whole grid. */
.form-actions { grid-column: 1 / -1; padding-top: 0.25rem; }

/* Inline error message under a form control. */
.error-text { font-size: 12px; color: #ff5e5e; }

/* Highlighted amount box (addfunds modals: "amount to pay"). */
.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.625rem 0.75rem;
    margin-bottom: 1rem;
}
.amount-box--copy { cursor: pointer; }
.amount-box-label {
    font-size: 11px;
    font-weight: 500;
    color: rgb(var(--color-primary-700));
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.125rem;
}
.amount-box-value { font-size: 1.125rem; font-weight: 600; color: rgb(var(--color-primary-900)); }

/* Tiny uppercase section label (Endpoint / Request / Response, modal kickers). */
.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(var(--color-text-soft));
}

/* Inline code chip (API docs). Pair with .mono. */
.code-chip {
    border-radius: var(--radius-control);
    background: rgb(var(--color-surface-muted));
    padding: 0.125rem 0.375rem;
    font-size: 13px;
    color: rgb(var(--color-text));
}

/* Code block (API docs request/response). --dark = the request variant. */
.code-block {
    background: rgb(var(--color-surface-muted));
    color: rgb(var(--color-text-soft));
    padding: 0.75rem 1rem;
    border-radius: var(--radius-control);
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    line-height: 1.625;
    box-shadow: 0 0 0 1px rgb(var(--color-border-soft));
}
.code-block--dark { background: #05020a; color: #e2e8f0; box-shadow: none; }

/* Utilities */
.stack > * + * { margin-top: 1rem; }      /* column with uniform spacing */
.form-stack > * + * { margin-top: 1rem; } /* semantic alias for forms */
.stack-sm > * + * { margin-top: 0.5rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
/* Label + link row (e.g. "Password" + "forgot my password"). */
.field-row { display: flex; align-items: center; justify-content: space-between; 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: ui-monospace, SFMono-Regular, Menlo, monospace; }
/* THE id style: every entity/reference id in tables and lists renders the same
   way — small mono, tabular digits, no wrap. Pair with `muted` (plain id) or
   `link` (clickable id); color comes from that pairing. */
.cell-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
/* Dimmest text tier (placeholder dashes, de-emphasized hints). */
.dim { color: rgb(var(--color-text-muted)); }
.nowrap { white-space: nowrap; }
/* Type-size helpers (match the sizes the theme already uses everywhere). */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 12px; }
.text-2xs { font-size: 11px; }
/* Flex row that wraps (button + input pairs, etc.). */
.row-wrap { display: flex; gap: 0.75rem; flex-wrap: wrap; }
