/* ==========================================================================
   TDS Salla Odoo Connector: design system
   Palette = Salla (deep teal + mint) blended with Odoo (purple), joined by
   the teal both brands share (#017E84). Layout uses logical properties so
   the same rules serve Arabic (RTL) and English (LTR).
   ========================================================================== */

:root {
    /* Brand */
    --salla-deep: #004D5A;
    --salla: #1FB5A5;
    --salla-mint: #BAF3E6;
    --bridge: #017E84;
    --odoo: #714B67;
    --odoo-violet: #8E5BA8;
    --odoo-soft: #F4E8F0;
    --grad-brand: linear-gradient(120deg, #1FB5A5 0%, #017E84 42%, #8E5BA8 100%);
    --grad-brand-soft: linear-gradient(120deg, #E6FAF6 0%, #EEF6F7 45%, #F6EEF8 100%);
    --grad-dark: linear-gradient(180deg, #07313A 0%, #0D2630 55%, #1E1A2B 100%);

    /* Semantic */
    --success: #10B981;
    --success-ink: #047857;
    --warning: #F59E0B;
    --warning-ink: #B45309;
    --danger: #EF4444;
    --danger-ink: #B42318;
    --info: #0EA5E9;
    --info-ink: #0369A1;

    /* Surfaces & text (legacy names kept so existing templates inherit the theme) */
    --bg: #F5F7F8;
    --bg-tint: #EEF3F4;
    --paper: #FFFFFF;
    --ink: #10242C;
    --ink-2: #475467;
    --ink-3: #667085;
    --line: #E3E8EB;
    --line-soft: #EEF2F4;
    --accent: #017E84;
    --accent-ink: #FFFFFF;
    --ok: #047857;
    --warn: #B45309;

    /* Shape */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(16, 36, 44, .05);
    --shadow: 0 1px 3px rgba(16, 36, 44, .06), 0 10px 28px -10px rgba(16, 36, 44, .12);
    --shadow-lg: 0 30px 70px -24px rgba(16, 36, 44, .30);
    --ring: 0 0 0 4px rgba(1, 126, 132, .16);

    --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --sidebar-w: 264px;
    --topbar-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 { letter-spacing: 0; }

a { color: var(--bridge); }
a:hover { color: var(--salla-deep); }

.mono, code, pre { font-family: var(--font-mono); }
.mono { font-feature-settings: "ss01"; letter-spacing: -0.01em; }
.serif { font-family: var(--font); font-weight: 700; }
.text-dim { color: var(--ink-2); }
.text-muted { color: var(--ink-3) !important; }
.text-salla { background: linear-gradient(120deg, #1FB5A5, #017E84); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-odoo { background: linear-gradient(120deg, #9B6BB8, #714B67); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-gradient {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

::selection { background: rgba(31, 181, 165, .22); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5DA; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #AEBBC2; }

:focus-visible { outline: 2px solid var(--bridge); outline-offset: 2px; }

/* ── Brand lockup ────────────────────────────────────────────────────────── */
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--ink); text-decoration: none; direction: ltr;
}
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; line-height: 1.12; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand-name small { font-size: 15px; font-weight: 700; }
.brand-name small[dir="rtl"] { text-align: end; }
.brand--light, .brand--light:hover { color: #fff; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-tds {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border-radius: 10px;
    font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer;
    border: 1px solid transparent; white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-tds:hover { transform: translateY(-1px); }
.btn-tds:active { transform: translateY(0); }
.btn-tds i { font-size: 16px; }
.btn-tds--primary { background: var(--salla-deep); color: #fff; box-shadow: 0 10px 22px -12px rgba(0, 77, 90, .8); }
.btn-tds--primary:hover { background: #00606F; color: #fff; }
.btn-tds--brand { background: var(--grad-brand); color: #fff; box-shadow: 0 12px 26px -12px rgba(1, 126, 132, .75); }
.btn-tds--brand:hover { color: #fff; filter: saturate(1.1) brightness(1.04); }
.btn-tds--ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-tds--ghost:hover { border-color: #C6D0D5; color: var(--ink); }
.btn-tds--light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .18); }
.btn-tds--light:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.btn-tds--lg { min-height: 52px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn-tds--sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
[dir="rtl"] .bi-arrow-right.flip-rtl, [dir="rtl"] .flip-rtl { transform: scaleX(-1); display: inline-block; }

/* Legacy buttons used across the app pages */
.btn-save {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--bridge); color: #fff; border: none;
    padding: 10px 22px; border-radius: 10px; font: 600 14px var(--font);
    cursor: pointer; box-shadow: 0 8px 20px -10px rgba(1, 126, 132, .8);
    transition: background .15s ease, transform .15s ease;
}
.btn-save:hover { background: #016B70; transform: translateY(-1px); }
.btn-save:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-outline-e {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: #fff; color: var(--ink-2);
    border: 1px solid var(--line); padding: 9px 18px; border-radius: 10px;
    font: 500 14px var(--font); cursor: pointer; text-decoration: none;
    transition: all .15s ease; box-shadow: var(--shadow-sm);
}
.btn-outline-e:hover { border-color: var(--bridge); color: var(--bridge); }

/* ── Language toggle ─────────────────────────────────────────────────────── */
.lang-toggle {
    display: inline-flex; gap: 2px; direction: ltr;
    border: 1px solid var(--line); border-radius: 999px; padding: 3px;
    background: #fff; width: fit-content;
}
.lang-toggle a {
    padding: 4px 12px; border-radius: 999px;
    font: 600 12px var(--font); color: var(--ink-3);
    text-decoration: none; letter-spacing: .02em;
}
.lang-toggle a:hover { color: var(--ink); }
.lang-toggle a.active { background: var(--salla-deep); color: #fff; }
.lang-toggle--dark { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.lang-toggle--dark a { color: rgba(255, 255, 255, .7); }
.lang-toggle--dark a.active { background: #fff; color: var(--salla-deep); }

/* ── Badges & pills ──────────────────────────────────────────────────────── */
.badge-e, .pill {
    display: inline-flex; align-items: center; gap: 5px;
    font: 600 11.5px/1.4 var(--font); padding: 3px 10px; border-radius: 999px;
    letter-spacing: 0; white-space: nowrap;
}
.badge-ok, .pill-ok     { background: #ECFDF3; color: var(--success-ink); }
.badge-err, .pill-err   { background: #FEF3F2; color: var(--danger-ink); }
.badge-q, .pill-warn    { background: #FFFAEB; color: var(--warning-ink); }
.badge-info, .pill-info { background: #EAF7F7; color: var(--bridge); }
.pill-odoo { background: var(--odoo-soft); color: var(--odoo); }
.pill-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.e-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.e-card-label {
    font: 600 15px var(--font); color: var(--ink);
    margin-bottom: 18px; letter-spacing: -0.01em;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 24px; border-bottom: 1px solid var(--line-soft);
}
.card-title { font: 600 16px var(--font); color: var(--ink); margin: 0; letter-spacing: -0.01em; }
.card-link { font: 600 13px var(--font); color: var(--bridge); text-decoration: none; }
.card-link:hover { color: var(--salla-deep); }

/* Icon tiles (colored squares that hold a Bootstrap icon) */
.icon-tile {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 20px;
}
.icon-tile--teal   { background: #E3F8F4; color: var(--bridge); }
.icon-tile--odoo   { background: var(--odoo-soft); color: var(--odoo); }
.icon-tile--mint   { background: #E6FAF6; color: #0E9384; }
.icon-tile--amber  { background: #FEF3E2; color: #DC6803; }
.icon-tile--green  { background: #E7F8EF; color: var(--success-ink); }
.icon-tile--red    { background: #FEF3F2; color: var(--danger-ink); }
.icon-tile--sky    { background: #E8F4FC; color: #0B6FA4; }
.icon-tile--brand  { background: var(--grad-brand); color: #fff; box-shadow: 0 10px 20px -10px rgba(1, 126, 132, .8); }

/* Stat cards */
.stat-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.stat-card--row { display: flex; align-items: flex-start; gap: 14px; }
.stat-num { font: 700 28px/1.1 var(--font); color: var(--ink); letter-spacing: -0.02em; margin: 2px 0; }
.stat-lbl { font: 500 13px var(--font); color: var(--ink-3); letter-spacing: 0; }
.stat-title { font: 600 14px var(--font); color: var(--ink); }
.stat-ico { font-size: 20px; color: var(--ink-3); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-input-e {
    width: 100%; min-height: 42px; padding: 9px 13px; font: 400 14px var(--font);
    background: #fff; border: 1px solid #D5DDE1; border-radius: 10px; color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-input-e:focus { outline: none; border-color: var(--bridge); box-shadow: var(--ring); }
.form-input-e::placeholder { color: #98A2B3; }
.form-label-e { font: 500 13px var(--font); color: var(--ink-2); margin-bottom: 6px; display: block; }
select.form-input-e { appearance: auto; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.e-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.e-table th {
    font: 600 12px var(--font); letter-spacing: 0; text-transform: none;
    color: var(--ink-3); background: #F8FAFB;
    padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: start;
    white-space: nowrap;
}
.e-table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); vertical-align: middle; }
.e-table tr:last-child td { border-bottom: none; }
.e-table tbody tr { transition: background .12s ease; }
.e-table tbody tr:hover td { background: #F8FBFB; }
.table-wrap { overflow-x: auto; }
.e-table .mono-val { white-space: nowrap; word-break: normal; }

/* ── Misc ────────────────────────────────────────────────────────────────── */
.mono-val { font-family: var(--font-mono); font-size: 12px; color: var(--bridge); word-break: break-all; }
.info-box { background: #F3F8F8; border: 1px solid #D9ECEC; border-radius: var(--radius); padding: 14px 18px; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--ink-3); font-size: 14px; }
.empty-state i { font-size: 34px; display: block; margin-bottom: 10px; color: #B7C4CA; }

/* ==========================================================================
   App shell (signed-in pages): dark sidebar + top bar
   ========================================================================== */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed; top: 0; inset-inline-start: 0;
    background: var(--grad-dark);
    color: rgba(255, 255, 255, .78);
    z-index: 1040;
    display: flex; flex-direction: column;
    overflow-y: auto;
    padding: 20px 14px 16px;
    transition: transform .25s ease;
}
.sidebar::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(420px 260px at 0% 0%, rgba(31, 181, 165, .16), transparent 60%),
        radial-gradient(380px 300px at 100% 100%, rgba(142, 91, 168, .20), transparent 60%);
}
.sidebar > * { position: relative; }
.sidebar-brand { padding: 4px 8px 22px; display: block; }
.sidebar-label {
    display: block; font: 600 11px var(--font); letter-spacing: .08em; text-transform: uppercase;
    color: rgba(255, 255, 255, .42); padding: 14px 12px 8px;
}
[dir="rtl"] .sidebar-label { letter-spacing: 0; }
.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; margin: 2px 0; border-radius: 11px;
    color: rgba(255, 255, 255, .74); text-decoration: none;
    font: 500 14px var(--font);
    transition: background .15s ease, color .15s ease;
}
.sidebar-link i { font-size: 17px; width: 20px; text-align: center; flex-shrink: 0; opacity: .9; }
.sidebar-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar-link.active {
    background: linear-gradient(100deg, var(--bridge) 0%, var(--salla) 52%, var(--odoo-violet) 100%);
    color: #fff; font-weight: 600;
    box-shadow: 0 12px 24px -12px rgba(1, 126, 132, .9), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.sidebar-link .count {
    margin-inline-start: auto; background: var(--danger); color: #fff;
    font: 700 11px/1 var(--font); padding: 4px 7px; border-radius: 999px;
}
.sidebar-status {
    margin-top: auto;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px; padding: 14px;
    font-size: 12.5px;
}
.sidebar-status .status-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; margin-bottom: 10px; font-size: 13.5px; }
.sidebar-status .status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }
.sidebar-status .status-dot.off { background: var(--warning); box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.sidebar-status .status-row { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .72); margin-top: 6px; min-width: 0; }
.sidebar-status .status-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-status .status-row img { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-logout {
    display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px; border-radius: 11px;
    color: rgba(255, 255, 255, .6); text-decoration: none; font: 500 13.5px var(--font);
}
.sidebar-logout:hover { color: #FCA5A5; background: rgba(239, 68, 68, .08); }

.app-topbar {
    position: fixed; top: 0; inset-inline-start: var(--sidebar-w); inset-inline-end: 0;
    height: var(--topbar-h); z-index: 1030;
    display: flex; align-items: center; gap: 14px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}
.app-topbar .page-name { font: 600 17px var(--font); color: var(--ink); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.app-topbar .spacer { flex: 1; }
.topbar-btn {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    color: var(--ink-2); background: transparent; border: 1px solid transparent; text-decoration: none; font-size: 18px;
    cursor: pointer;
}
.topbar-btn:hover { background: var(--bg-tint); color: var(--ink); }
.topbar-menu { display: none; }
.topbar-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--grad-brand); color: #fff; font: 700 13px var(--font);
}
.topbar-user .who { line-height: 1.2; min-width: 0; }
.topbar-user .who strong { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink); white-space: nowrap; max-width: 230px; }
.topbar-store-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar-plan { flex-shrink: 0; padding: 2px 6px; border: 1px solid #B7E8DE; border-radius: 999px; background: #EAF8F4; color: #007F68; font-size: 10px; line-height: 1.4; font-weight: 750; }
.topbar-user .who span { font-size: 12px; color: var(--ink-3); }
.app-topbar details.topbar-profile { position: relative; display: block; flex: 0 0 auto; min-width: 0; }
.app-topbar details.topbar-profile > summary.topbar-user {
    display: flex; align-items: center; gap: 10px; min-width: 0; list-style: none; cursor: pointer;
    border-radius: 12px; padding: 5px 8px; user-select: none;
}
.app-topbar details.topbar-profile > summary.topbar-user::-webkit-details-marker { display: none; }
.app-topbar details.topbar-profile > summary.topbar-user:hover { background: var(--bg-tint); }
.app-topbar details.topbar-profile > summary.topbar-user:focus-visible { outline: 2px solid var(--bridge); outline-offset: 2px; }
.profile-chevron { color: var(--ink-3); font-size: 11px; transition: transform .18s ease; }
.topbar-profile[open] .profile-chevron { transform: rotate(180deg); }
.app-topbar .profile-menu {
    position: absolute; z-index: 1100; inset-block-start: calc(100% + 8px); inset-inline-end: 0;
    display: grid; gap: 3px; width: min(300px, calc(100vw - 24px)); min-width: min(250px, calc(100vw - 24px));
    padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
    box-shadow: 0 18px 48px rgba(14, 39, 51, .18); text-align: start;
}
.profile-menu-heading { padding: 9px 11px 7px; color: var(--ink-3); font-size: 11px; font-weight: 700; }
.app-topbar .profile-menu a { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 11px; border-radius: 9px; color: var(--ink); font-size: 13px; line-height: 1.45; white-space: normal; text-decoration: none; }
.profile-menu a:hover, .profile-menu a:focus-visible { background: var(--bg-tint); color: var(--bridge); }
.profile-menu a:last-child { border-top: 1px solid var(--line-soft); border-radius: 0 0 9px 9px; }
.pill-neutral { background: #F2F4F7; color: #475467; }
.capture-notice { display: flex; align-items: flex-start; gap: 9px; max-width: 600px; margin-top: 15px; padding: 10px 12px; border: 1px solid #F1D29B; border-radius: 10px; background: #FFF8E8; color: #765217; font-size: 13px; }
.capture-notice i { margin-top: 2px; }
.field-hint { display: block; margin-top: 7px; color: var(--ink-3); font-size: 12px; }
/* The cross-document opt-in lives in base.html <head>; these only style the fade. */
::view-transition-old(root) { animation: app-page-out .14s ease both; }
::view-transition-new(root) { animation: app-page-in .2s ease both; }
@keyframes app-page-out { to { opacity: .82; } }
@keyframes app-page-in { from { opacity: .78; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .profile-chevron { transition: none; }
}

.main-content {
    margin-inline-start: var(--sidebar-w);
    padding: calc(var(--topbar-h) + 28px) 32px 40px;
    min-height: 100vh;
    min-width: 0;
}
.main-content > .d-flex:first-child h2,
.page-title { font-size: 26px !important; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.02em; }

/* Plan banner: fixed under the topbar, shown while the app plan blocks order sync. */
.plan-banner {
    position: fixed; top: var(--topbar-h); inset-inline-start: var(--sidebar-w); inset-inline-end: 0;
    z-index: 1029; display: flex; align-items: center; gap: 10px;
    padding: 12px 28px; background: #FFF4E5; color: #7A4B00;
    border-bottom: 1px solid #F0D9B0; font-size: 13.5px; line-height: 1.4;
}
.plan-banner i { font-size: 16px; }
.plan-banner a { margin-inline-start: auto; font-weight: 600; color: #7A4B00; text-decoration: underline; white-space: nowrap; }

.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    [dir="rtl"] .sidebar { transform: translateX(100%); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop {
        display: block; position: fixed; inset: 0; z-index: 1035; background: rgba(8, 24, 30, .45);
    }
    .app-topbar { inset-inline-start: 0; padding: 0 16px; }
    .plan-banner { inset-inline-start: 0; padding: 12px 16px; }
    .topbar-menu { display: grid; }
    .topbar-user .who { display: none; }
    .main-content { margin-inline-start: 0; padding: calc(var(--topbar-h) + 20px) 16px 32px; }
}

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.dash-hero {
    position: relative; overflow: hidden; border-radius: var(--radius-xl);
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 12px; align-items: center;
    padding: 30px 34px; margin-bottom: 24px; border: 1px solid #DDEBEC;
    background:
        radial-gradient(520px 260px at 95% 0%, rgba(142, 91, 168, .14), transparent 60%),
        radial-gradient(520px 260px at 55% 100%, rgba(31, 181, 165, .16), transparent 60%),
        linear-gradient(120deg, #FFFFFF 0%, #F3F9F9 100%);
    box-shadow: var(--shadow-sm);
}
.dash-hero h1 { font-size: clamp(24px, 2.4vw, 32px); margin: 0 0 8px; }
.dash-hero p { color: var(--ink-2); margin: 0; max-width: 46ch; }
@media (max-width: 1199.98px) { .dash-hero { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .dash-hero { padding: 22px 18px; } }

.onboarding .progress-track { height: 6px; border-radius: 6px; background: var(--line-soft); overflow: hidden; margin-bottom: 14px; }
.onboarding .progress-track span { display: block; height: 100%; border-radius: 6px; background: var(--grad-brand); }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.steps-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #FBFCFC; }
.steps-list li a { color: var(--ink); font-weight: 500; text-decoration: none; font-size: 14px; }
.steps-list li a:hover { color: var(--bridge); }
.steps-list li.done a { color: var(--ink-3); text-decoration: line-through; }
.step-check { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font: 700 12px var(--font); background: var(--bg-tint); color: var(--ink-2); }
.steps-list li.done .step-check { background: var(--success); color: #fff; }
@media (max-width: 767.98px) { .steps-list { grid-template-columns: 1fr; } }

.quick-link {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px; height: 100%;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    text-decoration: none; box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.quick-link:hover { border-color: #BFDCDC; transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-link .ql-text { display: flex; flex-direction: column; min-width: 0; }
.quick-link strong { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.quick-link .ql-text span { color: var(--ink-3); font-size: 12.5px; }
.quick-link .ql-arrow { margin-inline-start: auto; color: var(--ink-3); }

.conn-block { border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; margin-bottom: 12px; background: #FBFCFC; }
.conn-block:last-of-type { margin-bottom: 14px; }
.icon-tile--salla { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: var(--salla-deep); color: var(--salla-mint); }
.icon-tile--salla svg { width: 20px; height: 20px; }
.icon-tile--odoo { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; }
.icon-tile--odoo i { font-size: 17px; }
.subscription-panel { margin: 16px 0; padding: 16px; border: 1px solid #DCE8EB; border-radius: 14px; background: linear-gradient(145deg, #fff 0%, #F7FBFA 100%); }
.subscription-panel__heading { display: flex; align-items: center; gap: 11px; }
.subscription-panel__heading > div { min-width: 0; flex: 1; }
.subscription-panel__heading h2 { margin: 2px 0 0; color: var(--ink); font-size: 19px; font-weight: 750; }
.subscription-panel__eyebrow { color: var(--ink-3); font-size: 11px; }
.subscription-panel__details { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 12px; margin: 16px 0 0; }
.subscription-panel__details div { min-width: 0; }
.subscription-panel__details dt { color: var(--ink-3); font-size: 11px; }
.subscription-panel__details dd { margin: 3px 0 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.subscription-panel__note { display: flex; align-items: flex-start; gap: 7px; margin: 12px 0 0; color: var(--ink-3); font-size: 11.5px; line-height: 1.55; }
.subscription-panel__note i { flex: 0 0 auto; margin-top: 2px; color: var(--bridge); }
.conn-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.conn-head strong { font-size: 14.5px; }
.conn-head .pill { margin-inline-start: auto; }
.conn-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13px; }
.conn-list dt { color: var(--ink-3); font-weight: 500; }
.conn-list dd { margin: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: end; }
.conn-list dd[dir="ltr"] { unicode-bidi: plaintext; }

/* Merchant profile: identity, billing source, and sign-in are distinct. */
.profile-page .page-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.profile-page .page-intro p { margin: 0; color: var(--ink-3); }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.profile-card { min-width: 0; margin: 0; padding: 20px; }
.profile-security-card { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 20px; }
.profile-security-card .profile-card__heading { margin: 0; }
.profile-security-card .profile-security-action { margin: 0; }
.profile-card__heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.profile-card__heading > div { min-width: 0; }
.profile-card__heading h2 { margin: 0; font-size: 17px; }
.profile-card__heading p { margin: 3px 0 0; color: var(--ink-3); font-size: 12.5px; }
.profile-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.profile-details > div { min-width: 0; }
.profile-details dt { margin-bottom: 4px; color: var(--ink-3); font-size: 12px; }
.profile-details dd { margin: 0; color: var(--ink); font-size: 13.5px; font-weight: 550; overflow-wrap: anywhere; }
.profile-details dd[dir="ltr"] { text-align: start; }
.plan-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #FBFCFC; }
.plan-summary__label { display: block; margin-bottom: 2px; color: var(--ink-3); font-size: 12px; }
.plan-summary strong { font-size: 25px; line-height: 1.2; }
.profile-details--plan { margin-top: 16px; }
.plan-note { display: flex; gap: 8px; margin: 15px 0 0; padding: 10px 12px; border-radius: 10px; background: #F4F8F9; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.plan-note i { flex: 0 0 auto; color: var(--bridge); }
.plan-note--warn { background: #FFF4E5; color: #7A4B00; }
.plan-note--warn i { color: #DC6803; }
.plan-note--warn a { color: #7A4B00; font-weight: 600; }
.plan-features { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.plan-features li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.plan-features li i { flex: 0 0 auto; font-size: 15px; }
.plan-features li.is-on i { color: var(--success-ink); }
.plan-features li.is-off { color: var(--ink-3); }
.plan-features li.is-off i { color: var(--ink-3); }
.profile-signin-state { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--ink-2); }
.profile-signin-state i { color: var(--bridge); font-size: 18px; }
.profile-security-action { margin-top: 12px; }
@media (max-width: 767.98px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-page .page-intro { align-items: flex-start; flex-direction: column; }
    .profile-security-card { grid-column: auto; grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 419.98px) {
    .profile-card { padding: 16px; }
    .profile-details { grid-template-columns: 1fr; }
    .app-topbar { gap: 8px; padding: 0 10px; }
    .app-topbar .lang-toggle a { padding-inline: 9px; }
}

/* Page-level tweaks for the existing app pages */
.main-content .tab-nav { border-bottom-color: var(--line); }
.main-content .tab-btn { font-family: var(--font) !important; font-size: 13.5px !important; font-weight: 500; letter-spacing: 0 !important; }
.main-content .tab-btn.active { color: var(--bridge) !important; border-color: var(--bridge) !important; font-weight: 600; }
.main-content .setting-card { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.main-content .setting-card h6 {
    font-family: var(--font) !important; font-size: 15px !important; font-weight: 600 !important;
    text-transform: none !important; letter-spacing: -0.01em !important; color: var(--ink) !important;
}
.main-content input:checked + .slider { background: var(--bridge); }
.label-caps {
    font: 600 12px var(--font) !important; letter-spacing: 0 !important; text-transform: none !important;
}

/* ==========================================================================
   Public pages (home, sign-in)
   ========================================================================== */
.public-body { background: #fff; }
.site-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid rgba(227, 232, 235, .7);
}
.site-nav .inner {
    max-width: 1240px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; gap: 28px;
}
.site-nav .links { display: flex; gap: 26px; margin-inline-start: auto; }
.site-nav .links a { color: var(--ink-2); text-decoration: none; font: 500 14px var(--font); }
.site-nav .links a:hover { color: var(--ink); }
.site-nav .actions { display: flex; align-items: center; gap: 10px; }
.site-nav .signin { color: var(--ink); text-decoration: none; font: 600 14px var(--font); padding: 0 6px; }
@media (max-width: 860px) {
    .site-nav .links { display: none; }
    .site-nav .actions { margin-inline-start: auto; }
    .site-nav .signin { display: none; }
}

.section { max-width: 1240px; margin: 0 auto; padding: 88px 24px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font: 600 12px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--bridge);
}
[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad-brand); }
.section-title { font-size: clamp(28px, 3.2vw, 40px); margin: 12px 0 10px; }
.section-sub { color: var(--ink-2); font-size: 17px; max-width: 60ch; margin: 0; }

.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 480px at 85% 10%, rgba(142, 91, 168, .13), transparent 60%),
        radial-gradient(700px 480px at 60% 90%, rgba(31, 181, 165, .14), transparent 60%),
        linear-gradient(180deg, #FBFCFC 0%, #F4F8F8 100%);
}
.hero .inner {
    max-width: 1240px; margin: 0 auto; padding: 64px 24px 72px;
    display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 40px; align-items: center;
}
.hero h1 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1.1; margin: 18px 0 18px; letter-spacing: -0.02em; }
[dir="rtl"] .hero h1 { line-height: 1.25; letter-spacing: 0; }
.hero .lead { font-size: 19px; color: var(--ink-2); max-width: 38ch; margin: 0 0 30px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 36px; color: var(--ink-2); font: 500 14px var(--font); }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust i { font-size: 18px; }
@media (max-width: 991.98px) {
    .hero .inner { grid-template-columns: 1fr; padding-top: 40px; }
}

.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
.feature {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 24px; box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #CFE3E3; }
.feature h3 { font-size: 17px; margin: 18px 0 8px; }
.feature p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
@media (max-width: 991.98px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .feature-grid { grid-template-columns: 1fr; } }

.dark-band {
    position: relative; overflow: hidden; color: #fff;
    background: var(--grad-dark);
}
.dark-band::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(600px 300px at 10% 0%, rgba(31, 181, 165, .22), transparent 60%),
        radial-gradient(600px 360px at 95% 100%, rgba(142, 91, 168, .28), transparent 60%);
}
.dark-band > * { position: relative; }
.dark-band h2, .dark-band h3 { color: #fff; }
.dark-band .section-sub { color: rgba(255, 255, 255, .72); }
.dark-band .eyebrow { color: var(--salla-mint); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin-top: 48px; }
.step { position: relative; }
.step-icon {
    --step-glow: rgba(31, 181, 165, .25);
    width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #fff;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 24px var(--step-glow);
    animation: step-icon-pulse 3.6s ease-in-out infinite;
}
.step:nth-child(2) .step-icon { --step-glow: rgba(1, 126, 132, .35); }
.step:nth-child(3) .step-icon { --step-glow: rgba(142, 91, 168, .35); }
.step:nth-child(4) .step-icon { --step-glow: rgba(113, 75, 103, .45); }
.step-icon i { display: inline-block; }
.step:nth-child(2) .step-icon { animation-delay: -.9s; }
.step:nth-child(3) .step-icon { animation-delay: -1.8s; }
.step:nth-child(4) .step-icon { animation-delay: -2.7s; }
.step:nth-child(1) .step-icon i { animation: step-link 3.6s ease-in-out infinite; }
.step:nth-child(2) .step-icon i { animation: step-gear 9s linear infinite; }
.step:nth-child(3) .step-icon i { animation: step-sync 3s ease-in-out infinite; }
.step:nth-child(4) .step-icon i { animation: step-grow 3.6s ease-in-out infinite; }
.step:not(:last-child)::after {
    content: ""; position: absolute; top: 32px; inset-inline-start: 84px; inset-inline-end: 8px; height: 2px;
    background-image:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .28) 0 6px, transparent 6px 12px),
        linear-gradient(90deg, transparent, rgba(31, 181, 165, .12) 18%, rgba(86, 224, 205, .95) 50%, rgba(142, 91, 168, .42) 82%, transparent);
    background-repeat: repeat, no-repeat;
    background-size: 12px 2px, 90px 2px;
    background-position: 0 0, 0 0;
    animation: step-signal 2.8s linear infinite;
}
.steps:dir(rtl) .step:not(:last-child)::after { animation-direction: reverse; }
.step:nth-child(2)::after { animation-delay: -.9s; }
.step:nth-child(3)::after { animation-delay: -1.8s; }
@keyframes step-signal { to { background-position: 0 0, 100% 0; } }
@keyframes step-icon-pulse {
    0%, 100% { box-shadow: inset 0 0 24px var(--step-glow), 0 0 0 0 rgba(31, 181, 165, 0); }
    50% { box-shadow: inset 0 0 24px var(--step-glow), 0 0 0 7px rgba(31, 181, 165, .09); }
}
@keyframes step-link { 0%, 75%, 100% { transform: scale(1); } 82% { transform: scale(1.12); } }
@keyframes step-gear { to { transform: rotate(360deg); } }
@keyframes step-sync { 0%, 10% { transform: rotate(0); } 70%, 100% { transform: rotate(360deg); } }
@keyframes step-grow { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-3px); } }
.step-num {
    display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    font: 700 12px var(--font); color: #fff; background: var(--grad-brand); margin-inline-end: 8px;
}
.step h3 { font-size: 18px; margin: 22px 0 8px; display: flex; align-items: center; }
.step p { color: rgba(255, 255, 255, .7); font-size: 14.5px; margin: 0; max-width: 30ch; }
@media (max-width: 991.98px) {
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step::after { display: none; }
}
@media (max-width: 575.98px) { .steps { grid-template-columns: 1fr; } }

.legal { max-width: 820px; }
.legal h1 { margin-bottom: 4px; }
.legal-updated { color: var(--muted, #64748b); margin-bottom: 24px; }
.legal h2 { font-size: 1.25rem; margin: 28px 0 8px; }
.legal ul { padding-inline-start: 1.25rem; }
.legal li { margin-bottom: 8px; }

.faq { max-width: 820px; margin: 36px auto 0; display: grid; gap: 12px; }
.faq-heading { text-align: center; }
.faq details {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px;
    box-shadow: var(--shadow-sm);
}
.faq summary {
    cursor: pointer; list-style: none; padding: 18px 0; font: 600 16px var(--font); color: var(--ink);
    display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--bridge); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 0 0 18px; }

.cta-band {
    max-width: 1240px; margin: 0 auto 88px; padding: 0 24px;
}
.cta-band .box {
    border-radius: var(--radius-xl); padding: 44px 48px; color: #fff;
    background: var(--grad-brand); position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    box-shadow: 0 30px 60px -30px rgba(1, 126, 132, .7);
}
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(24px, 2.6vw, 32px); }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta-band .btn-tds--primary { background: #fff; color: var(--salla-deep); }

/* Footer */
.site-footer { background: #0B1F26; color: rgba(255, 255, 255, .76); padding: 56px 24px 28px; }
.site-footer .inner { max-width: 1240px; margin: 0 auto; }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr .8fr 1fr 1.2fr; gap: 32px; }
.site-footer .cols > * { min-width: 0; }
.site-footer h2 { color: #fff; font: 600 14px var(--font); margin: 0 0 14px; }
.site-footer p { font-size: 14px; line-height: 1.8; margin: 0 0 12px; }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.site-footer a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }
.site-footer .footer-links a { display: block; padding-block: 7px; font-size: 14px; }
.site-footer a.brand { display: inline-flex; color: #fff; margin-bottom: 16px; }
.site-footer .footer-legal-name { font-size: 12px; color: #fff; overflow-wrap: anywhere; }
.site-footer .footer-company-site { display: inline-block; padding-block: 8px; }
.site-footer .footer-contact a { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-block: 8px; font-size: 14px; }
.site-footer .footer-contact a span { font-size: 12px; color: rgba(255,255,255,.65); }
.site-footer .footer-contact bdi { overflow-wrap: anywhere; }
.site-footer .footer-company-details { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 24px; }
.site-footer address { font-style: normal; font-size: 13px; line-height: 1.8; max-width: 72ch; margin: 0 0 12px; }
[dir="rtl"] .site-footer address { text-align: right; }
.site-footer .footer-registration { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 12px; }
.site-footer .footer-trademarks { font-size: 12px; }
.site-footer .bottom { margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.site-footer .footer-copyright { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; font-size: 12px; }
.site-footer .footer-copyright bdi { overflow-wrap: anywhere; }
.site-footer .lang-toggle { display: grid; grid-template-columns: repeat(2, 44px); flex: 0 0 auto; align-items: center; padding: 3px; gap: 2px; }
.site-footer .lang-toggle a { display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 0; font-size: 12px; line-height: 1; text-decoration: none; }
.site-footer .lang-toggle a.active { color: var(--salla-deep); }
@media (max-width: 1000px) { .site-footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .site-footer { padding: 36px 20px 24px; }
    .site-footer .cols { gap: 24px 20px; }
    .site-footer .footer-identity, .site-footer .footer-contact { grid-column: 1 / -1; }
    .site-footer .footer-company-details { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .site-footer .bottom { flex-direction: column; text-align: center; gap: 16px; }
    .site-footer .footer-copyright { justify-content: center; }
}

/* ── Auth pages (merchant + admin sign-in) ───────────────────────────────── */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(400px, 0.9fr) minmax(0, 1.1fr);
    background: #fff;
}
.auth-panel {
    min-height: 100vh; padding: 28px 40px;
    display: flex; flex-direction: column; background: #fff; position: relative; z-index: 2;
}
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-card-wrap { flex: 1; display: grid; place-items: center; padding: 36px 0; }
.auth-card { width: min(100%, 420px); }
.auth-card .kicker, .admin-card .kicker {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
    font: 600 12px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--bridge);
}
[dir="rtl"] .auth-card .kicker, [dir="rtl"] .admin-card .kicker { letter-spacing: 0; font-size: 13.5px; }
.auth-card .kicker::before, .admin-card .kicker::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad-brand); }
.login-title, .admin-title {
    margin: 0; font: 700 clamp(30px, 3.4vw, 40px)/1.12 var(--font); letter-spacing: -0.02em; color: var(--ink);
}
[dir="rtl"] .login-title, [dir="rtl"] .admin-title { letter-spacing: 0; line-height: 1.35; }
.login-title em, .admin-title em {
    font-style: normal;
    background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-copy, .admin-copy { margin: 14px 0 26px; color: var(--ink-2); max-width: 42ch; font-size: 15.5px; }

.oauth-button, .manual-button, .admin-button {
    width: 100%; min-height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 0 18px; font: 600 15px var(--font); text-decoration: none; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.oauth-button { background: var(--salla-deep); color: #fff; border: 1px solid var(--salla-deep); box-shadow: 0 14px 28px -16px rgba(0, 77, 90, .9); }
.oauth-button:hover { transform: translateY(-1px); color: #fff; background: #00606F; }
.oauth-left, .manual-left { display: inline-flex; align-items: center; gap: 12px; }
.oauth-left img { width: 22px; height: 22px; }
.manual-button, .admin-button { margin-top: 4px; background: var(--bridge); color: #fff; border: 1px solid var(--bridge); box-shadow: 0 14px 28px -16px rgba(1, 126, 132, .9); }
.manual-button:hover, .admin-button:hover { transform: translateY(-1px); background: #016B70; color: #fff; }
.button-arrow { font-size: 18px; opacity: .85; }
[dir="rtl"] .button-arrow { transform: scaleX(-1); }
.live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--salla-mint);
    box-shadow: 0 0 0 4px rgba(186, 243, 230, .25); animation: tdsPulseDot 2.2s ease-in-out infinite;
}
@keyframes tdsPulseDot { 50% { box-shadow: 0 0 0 8px rgba(186, 243, 230, .06); } }
.login-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--ink-3); font-size: 12.5px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 20px; color: var(--ink-3); font: 500 12.5px var(--font); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.merchant-form, .admin-form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field label { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font: 500 13.5px var(--font); }
.field label span:not(:first-child) { color: var(--ink-3); font: 400 12px var(--font); }
.field input {
    width: 100%; height: 48px; border-radius: 12px; border: 1px solid #D5DDE1; background: #fff; color: var(--ink);
    padding: 0 14px; font: 400 14.5px var(--font); outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus { border-color: var(--bridge); box-shadow: var(--ring); }
.secret-box { position: relative; }
.secret-box input { padding-inline-end: 76px; }
.toggle-secret {
    position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
    border: 1px solid var(--line); background: #F8FAFB; color: var(--ink-2); border-radius: 8px;
    padding: 5px 10px; font: 500 12px var(--font); cursor: pointer;
}
.alert-soft {
    margin-bottom: 20px; padding: 12px 14px; border-radius: 12px;
    border: 1px solid #FECDCA; background: #FEF3F2; color: var(--danger-ink); font-size: 13.5px;
}
.login-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 22px; color: var(--ink-3); font-size: 13.5px; }
.login-links a { color: var(--bridge); font-weight: 600; text-decoration: none; }
.login-links a:hover { color: var(--salla-deep); text-decoration: underline; }
.login-meta summary { color: var(--ink-2); }
.auth-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    color: var(--ink-3); font-size: 12.5px; border-top: 1px solid var(--line-soft); padding-top: 18px;
}
.auth-footer .ok { display: inline-flex; align-items: center; gap: 8px; }
.auth-footer .ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

.auth-visual {
    position: relative; overflow: hidden; min-height: 100vh; padding: 36px 44px;
    display: flex; flex-direction: column; justify-content: center; gap: 28px;
    background:
        radial-gradient(640px 420px at 90% 5%, rgba(142, 91, 168, .16), transparent 60%),
        radial-gradient(640px 420px at 10% 95%, rgba(31, 181, 165, .18), transparent 60%),
        linear-gradient(160deg, #F4FAF9 0%, #F3F4F9 100%);
    border-inline-start: 1px solid var(--line-soft);
}
.auth-visual h2 { font-size: clamp(28px, 2.8vw, 40px); line-height: 1.15; margin: 10px 0 10px; max-width: 18ch; }
.auth-visual h2 em { font-style: normal; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-visual p { color: var(--ink-2); max-width: 52ch; margin: 0; }
.auth-visual--dark { background: var(--grad-dark); color: #fff; border: 0; }
.auth-visual--dark::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(560px 360px at 0% 0%, rgba(31, 181, 165, .22), transparent 60%),
        radial-gradient(560px 360px at 100% 100%, rgba(142, 91, 168, .3), transparent 60%);
}
.auth-visual--dark > * { position: relative; }
.auth-visual--dark h2 { color: #fff; }
.auth-visual--dark p { color: rgba(255, 255, 255, .72); }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric { background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.metric-value { font: 700 24px/1.1 var(--font); color: var(--ink); letter-spacing: -0.02em; }
.metric-label { margin-top: 6px; color: var(--ink-3); font-size: 12.5px; }

@media (max-width: 1020px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-panel { min-height: auto; }
    .auth-visual { min-height: auto; padding: 32px 20px 40px; border: 0; }
}
@media (max-width: 560px) {
    .auth-panel { padding: 20px 16px; }
    .metric-grid { grid-template-columns: 1fr; }
    .auth-footer { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Salla ⇄ Hub ⇄ Odoo animated flow (see templates/_flow.html)
   ========================================================================== */
.flow {
    position: relative; width: 100%; aspect-ratio: 1000 / 640;
    container-type: inline-size; direction: ltr; user-select: none;
}
.flow--compact { aspect-ratio: 1000 / 400; }
.flow > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow .wave-signal { filter: drop-shadow(0 0 2px rgba(255, 255, 255, .7)); }
.flow--offline .side-right .wave-signal { display: none; }

.flow-brand {
    position: absolute; top: 50%; width: 21%; aspect-ratio: 1.12;
    display: grid; place-items: center; background: #fff; border-radius: 3cqw;
    border: 1px solid rgba(227, 232, 235, .9);
    box-shadow: 0 2.4cqw 5cqw -2cqw rgba(16, 36, 44, .28), inset 0 -0.5cqw 0 rgba(16, 36, 44, .04);
}
.flow-brand--salla { left: 4%; transform: translateY(-50%) perspective(900px) rotateY(14deg); }
.flow-brand--odoo { right: 4%; transform: translateY(-50%) perspective(900px) rotateY(-14deg); }
.salla-logo { display: flex; align-items: center; gap: 1.2cqw; color: var(--salla-deep); }
.salla-logo .words { display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 700; }
.salla-logo .ar { font: 700 4.3cqw/1 var(--font); }
.salla-logo .en { font: 700 2.4cqw/1.1 var(--font); letter-spacing: -0.02em; margin-top: 0.4cqw; }
.salla-logo svg { width: 5.8cqw; height: 5.8cqw; }
.odoo-logo { width: 72%; height: auto; }

.flow-hub {
    position: absolute; left: 50%; top: 50%; width: 14%; aspect-ratio: 1;
    transform: translate(-50%, -50%); border-radius: 50%;
    display: grid; place-items: center;
    background: radial-gradient(circle at 35% 30%, #173F4A 0%, #0E2530 55%, #1C1628 100%);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 0 0 0.9cqw rgba(1, 126, 132, .08), 0 2cqw 5cqw -1cqw rgba(1, 126, 132, .55), 0 0 6cqw rgba(142, 91, 168, .35);
}
.flow-hub img { width: 62%; height: 62%; position: relative; z-index: 1; }

.flow-card {
    position: absolute; width: 17.5%; background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(227, 232, 235, .95); border-radius: 1.8cqw;
    padding: 1.3cqw 1.5cqw; box-shadow: 0 1.8cqw 4cqw -2cqw rgba(16, 36, 44, .3);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.flow-card .fc-head { display: flex; align-items: center; gap: 0.9cqw; font: 600 clamp(8px, 1.45cqw, 14px)/1.2 var(--font); color: var(--ink); }
.flow-card .fc-ico { width: 2.9cqw; height: 2.9cqw; border-radius: 0.8cqw; display: grid; place-items: center; font-size: 1.6cqw; flex-shrink: 0; }
.flow-card .fc-body { display: flex; align-items: center; gap: 1cqw; margin-top: 1cqw; }
.flow-card .bars { flex: 1; display: grid; gap: 0.6cqw; }
.flow-card .bars i { display: block; height: 0.7cqw; border-radius: 1cqw; background: #E9EEF1; }
.flow-card .bars i:nth-child(2) { width: 70%; }
.flow-card .thumb { width: 4.6cqw; height: 3.4cqw; border-radius: 0.8cqw; display: grid; place-items: center; font-size: 2.2cqw; }
.flow-card .order-id { font: 600 clamp(7px, 1.25cqw, 12px) var(--font); color: var(--ink-2); }
.flow-card .paid { margin-inline-start: auto; font: 600 clamp(7px, 1.1cqw, 11px) var(--font); color: var(--success-ink); background: #E7F8EF; padding: 0.2cqw 0.9cqw; border-radius: 1cqw; }
.flow-card .avatars { display: flex; gap: 0.5cqw; margin-top: 0.9cqw; }
.flow-card .avatars b { width: 2.4cqw; height: 2.4cqw; border-radius: 0.6cqw; display: block; }
.flow-card .plus { width: 2.4cqw; height: 2.4cqw; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; font-size: 1.6cqw; margin-inline-start: auto; }
@container (max-width: 520px) {
    .flow-card .bars, .flow-card .avatars { display: none; }
    .flow-card { padding: 1.4cqw; }
}

/* Live state: the Odoo side reflects the real connection */
.flow--offline .side-right { opacity: .18; filter: grayscale(1); }
.flow--offline .flow-brand--odoo { filter: grayscale(1); opacity: .55; }
.flow--capture .side-right { opacity: .82; }
.flow--capture .flow-brand--odoo { opacity: .94; }
.flow--capture .side-right .wave-signal { opacity: .78; }
.flow--warn .flow-alert {
    position: absolute; left: 65%; top: 50%; transform: translate(-50%, -50%);
    width: 4.2cqw; height: 4.2cqw; min-width: 22px; min-height: 22px; border-radius: 50%;
    display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 2.4cqw;
    box-shadow: 0 0 0 0.8cqw rgba(239, 68, 68, .18);
}

@media (prefers-reduced-motion: reduce) {
    .flow *, .flow *::before, .flow *::after, .live-dot { animation: none !important; }
    .step-icon, .step-icon i, .step:not(:last-child)::after { animation: none !important; }
    html { scroll-behavior: auto; }
}

/* Keep both language options reachable on narrow phones; the hero retains the primary action. */
@media (max-width: 420px) {
    .site-nav .actions > .btn-tds { display: none; }
    .site-nav .inner { gap: 12px; }
}
.security-page .security-card { max-width: 640px; padding: 28px; }
.security-page h2 { font-size: 20px; }
.security-page .field { max-width: 420px; }
.security-page .manual-button { max-width: 420px; }

/* ── Page section tabs (Orders, Sync log, Products) ─────────────────────── */
.page-tabs {
    display: flex; gap: 4px; margin: 0 0 1.5rem; padding: 4px; width: fit-content; max-width: 100%;
    overflow-x: auto; background: var(--bg-tint); border: 1px solid var(--line); border-radius: 999px;
    scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }
.page-tab {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 999px;
    font: 500 13.5px var(--font); color: var(--ink-2); text-decoration: none; white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.page-tab:hover { color: var(--ink); }
.page-tab:focus-visible { outline: none; box-shadow: var(--ring); }
.page-tab.active { background: var(--paper); color: var(--bridge); font-weight: 600; box-shadow: var(--shadow-sm); }
