/* ============================================================================
   Samagrah — shared design system (tokens, base, buttons, nav, footer).
   Page-specific styles live in each page's <style is:global> block.
   NOTE: styles are kept GLOBAL (not Astro-scoped) on purpose — the landing
   hero queue and WhatsApp bubbles are created at runtime with
   document.createElement and would not match a scoped [data-astro-*] selector.
   ========================================================================== */

:root {
  /* light theme (default) */
  --paper: #f2f6ef;
  --surface: #ffffff;
  --surface-2: #eaf1e6;
  --ink: #0e1a12;
  --ink-soft: #51605780;
  --ink-mid: #4d5c53;
  --line: #d8e2d3;
  --line-strong: #c3d1bd;
  --brand: #0f9b43;
  --brand-bright: #14bd54;
  --brand-deep: #0a5c2c;
  --due: #c9860f;
  --due-bg: #f8eccf;
  --overdue: #d63a2d;
  --overdue-bg: #f9dedb;
  --paid: #0f9b43;
  --paid-bg: #d9efdf;
  --wa: #1faa5a;

  --shadow-sm: 0 1px 2px rgba(12,40,24,.06), 0 2px 6px rgba(12,40,24,.05);
  --shadow-md: 0 8px 24px rgba(12,40,24,.09), 0 2px 6px rgba(12,40,24,.05);
  --shadow-lg: 0 30px 70px rgba(8,40,22,.16), 0 8px 20px rgba(8,40,22,.08);

  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-mono: "Cascadia Code", "SF Mono", ui-monospace, "Consolas", monospace;

  --rl: 14px;
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #081210;
    --surface: #0f1f19;
    --surface-2: #14281f;
    --ink: #eaf4ec;
    --ink-soft: #9fb3a680;
    --ink-mid: #9db0a4;
    --line: #21362b;
    --line-strong: #2c463799;
    --brand: #23c65c;
    --brand-bright: #3ee277;
    --brand-deep: #0c7a38;
    --due: #eab13f;
    --due-bg: #37300f;
    --overdue: #f0574a;
    --overdue-bg: #3a1a16;
    --paid: #29c85f;
    --paid-bg: #123322;
    --wa: #2ecc71;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 10px 30px rgba(0,0,0,.5);
    --shadow-lg: 0 30px 80px rgba(0,0,0,.6), 0 8px 20px rgba(0,0,0,.4);
  }
}
:root[data-theme="light"] {
  --paper: #f2f6ef; --surface: #ffffff; --surface-2: #eaf1e6;
  --ink: #0e1a12; --ink-soft: #51605780; --ink-mid: #4d5c53;
  --line: #d8e2d3; --line-strong: #c3d1bd;
  --brand: #0f9b43; --brand-bright: #14bd54; --brand-deep: #0a5c2c;
  --due: #c9860f; --due-bg: #f8eccf;
  --overdue: #d63a2d; --overdue-bg: #f9dedb;
  --paid: #0f9b43; --paid-bg: #d9efdf; --wa: #1faa5a;
  --shadow-sm: 0 1px 2px rgba(12,40,24,.06), 0 2px 6px rgba(12,40,24,.05);
  --shadow-md: 0 8px 24px rgba(12,40,24,.09), 0 2px 6px rgba(12,40,24,.05);
  --shadow-lg: 0 30px 70px rgba(8,40,22,.16), 0 8px 20px rgba(8,40,22,.08);
}
:root[data-theme="dark"] {
  --paper: #081210; --surface: #0f1f19; --surface-2: #14281f;
  --ink: #eaf4ec; --ink-soft: #9fb3a680; --ink-mid: #9db0a4;
  --line: #21362b; --line-strong: #2c463799;
  --brand: #23c65c; --brand-bright: #3ee277; --brand-deep: #0c7a38;
  --due: #eab13f; --due-bg: #37300f;
  --overdue: #f0574a; --overdue-bg: #3a1a16;
  --paid: #29c85f; --paid-bg: #123322; --wa: #2ecc71;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 10px 30px rgba(0,0,0,.5);
  --shadow-lg: 0 30px 80px rgba(0,0,0,.6), 0 8px 20px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { text-wrap: balance; line-height: 1.1; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--brand); border-radius: 2px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 11px; cursor: pointer;
  border: 1px solid transparent; transition: transform .18s ease, box-shadow .2s ease, background .2s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  color: #fff; box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--brand) 60%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:disabled { opacity: .7; cursor: default; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }

/* ---------- NAV ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
header.nav.stuck { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand .name { font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand .name b { color: var(--brand); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; color: var(--ink-mid); font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active { color: var(--brand); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 520px) { .nav-cta .btn-ghost { display: none; } }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 54px; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-inner .brand .name { font-size: 18px; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { font-size: 14px; color: var(--ink-mid); }
.foot-links a:hover { color: var(--ink); }
.copy { font-size: 13px; color: var(--ink-mid); width: 100%; margin-top: 10px; }
.copy b { color: var(--ink-mid); font-weight: 600; }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==== LANDING (index.html) ==== */
/* ---------- HERO ---------- */
  .hero { position: relative; padding: 74px 0 90px; overflow: hidden; }
  .hero-glow {
    position: absolute; inset: -20% -10% auto auto; width: 780px; height: 780px;
    background: radial-gradient(circle at 65% 35%, color-mix(in srgb, var(--brand) 34%, transparent), transparent 62%);
    filter: blur(10px); pointer-events: none; z-index: 0; opacity: .8;
  }
  .hero-grid {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.02fr 1.05fr; gap: 54px; align-items: center;
  }
  @media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }

  .hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.05rem); font-weight: 800; margin-top: 20px; }
  .hero h1 .hl { color: var(--brand); position: relative; white-space: nowrap; }
  .hero .sub { font-size: clamp(1.05rem, 1.6vw, 1.24rem); color: var(--ink-mid); margin-top: 22px; max-width: 33ch; }
  .hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
  .hero-note { margin-top: 20px; font-size: 13.5px; color: var(--ink-mid); display: flex; align-items: center; gap: 8px; }
  .hero-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--paid); box-shadow: 0 0 0 4px var(--paid-bg); }

  /* ---------- HERO LIVE PANEL ---------- */
  .panel {
    position: relative; background: var(--surface); border: 1px solid var(--line);
    border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px; overflow: hidden;
  }
  .panel::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--brand-deep), var(--brand-bright), var(--brand-deep));
  }
  .panel-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 14px; }
  .panel-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; }
  .panel-title .lg { width: 22px; height: 22px; }
  .live { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--paid);
          display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; }
  .live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--paid); animation: pulse 1.8s infinite; }
  @keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 color-mix(in srgb, var(--paid) 60%, transparent);} 50%{ box-shadow: 0 0 0 6px transparent;} }

  .panel-body { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; }
  @media (max-width: 420px) { .panel-body { grid-template-columns: 1fr; } }

  .queue { display: flex; flex-direction: column; gap: 10px; }
  .col-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mid); padding-left: 2px; }

  .ticket {
    background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--brand);
    border-radius: 10px; padding: 11px 12px; box-shadow: var(--shadow-sm);
  }
  .ticket.new { animation: ticketIn 9s ease infinite; }
  .ticket .tk-top { display: flex; align-items: center; justify-content: space-between; }
  .ticket .tk-id { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mid); font-weight: 600; }
  .ticket .tk-name { font-weight: 600; font-size: 14.5px; margin-top: 6px; }
  .ticket .tk-meta { font-size: 12px; color: var(--ink-mid); margin-top: 3px; display: flex; align-items: center; gap: 7px; }
  .avatar { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
            font-size: 9.5px; font-weight: 700; color: #fff; font-family: var(--font-mono); }

  .pill {
    font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px;
  }
  .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .pill.due { color: var(--due); background: var(--due-bg); }
  .pill.overdue { color: var(--overdue); background: var(--overdue-bg); }
  .pill.paid { color: var(--paid); background: var(--paid-bg); }
  .pill.open { color: var(--brand); background: var(--paid-bg); }

  /* status cycling pill in hero ticket */
  .status-cycle { position: relative; }
  .status-cycle .pill { position: absolute; right: 0; top: 0; animation: none; }
  .cyc { opacity: 0; animation: cycle 9s infinite; }
  .cyc.s1 { animation-delay: 0s; }
  .cyc.s2 { animation-delay: 3s; }
  .cyc.s3 { animation-delay: 6s; }
  @keyframes cycle { 0%,2%{opacity:0; transform: translateY(-4px) scale(.9);} 6%,30%{opacity:1; transform: none;} 34%,100%{opacity:0; transform: translateY(3px) scale(.96);} }

  .side { display: flex; flex-direction: column; gap: 10px; }
  .stat {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  }
  .stat .lbl { font-size: 11px; color: var(--ink-mid); font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
  .stat .val { font-family: var(--font-mono); font-weight: 700; font-size: 22px; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
  .stat .val.green { color: var(--paid); }
  .bar { height: 6px; border-radius: 4px; background: var(--line); margin-top: 9px; overflow: hidden; }
  .bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand-deep), var(--brand-bright)); }

  .wa-chip {
    display: flex; align-items: center; gap: 9px; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; animation: waPop 9s ease infinite;
  }
  .wa-ic { width: 26px; height: 26px; border-radius: 7px; background: var(--wa); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
  .wa-chip .wa-txt { font-size: 12px; line-height: 1.35; }
  .wa-chip .wa-txt b { display: block; font-size: 12.5px; }
  .wa-chip .wa-txt span { color: var(--ink-mid); }

  @keyframes ticketIn { 0%{ opacity: 0; transform: translateY(-14px) scale(.96);} 8%,100%{ opacity: 1; transform: none;} }
  @keyframes waPop { 0%,55%{ opacity: 0; transform: translateX(12px);} 63%,94%{ opacity: 1; transform: none;} 100%{ opacity: 0; transform: translateX(6px);} }

  /* ---------- LOGO STRIP ---------- */
  .strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
  .strip-inner { display: flex; align-items: center; gap: 26px; padding: 20px 0; flex-wrap: wrap; justify-content: space-between; }
  .strip-inner .lead { font-size: 13.5px; color: var(--ink-mid); font-weight: 500; }
  .replaces { display: flex; gap: 10px 22px; flex-wrap: wrap; }
  .replaces span { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-mid); position: relative; padding-left: 18px; }
  .replaces span::before { content: "✕"; position: absolute; left: 0; color: var(--overdue); font-size: 11px; }

  /* ---------- SECTION SHELL ---------- */
  section.feature { padding: 92px 0; }
  .feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
  section.feature.flip .feat-grid { direction: rtl; }
  section.feature.flip .feat-grid > * { direction: ltr; }
  @media (max-width: 900px) {
    .feat-grid { grid-template-columns: 1fr; gap: 34px; }
    section.feature.flip .feat-grid { direction: ltr; }
    section.feature { padding: 64px 0; }
  }
  .feat-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 800; margin-top: 16px; }
  .feat-copy p.lede { font-size: 1.12rem; color: var(--ink-mid); margin-top: 18px; max-width: 44ch; }
  .feat-list { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 13px; }
  .feat-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
  .feat-list .tick { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; background: var(--paid-bg); color: var(--brand);
                     display: flex; align-items: center; justify-content: center; margin-top: 1px; }
  .num-badge { font-family: var(--font-mono); font-size: 12px; color: var(--brand); font-weight: 700; letter-spacing: .1em; }

  .stage {
    position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: var(--shadow-md); padding: 22px; min-height: 340px; overflow: hidden;
  }
  .stage-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
  .stage-head .st-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }

  /* ===== F1: Orders -> Tickets animation ===== */
  .f1-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
  .order-form { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 14px; }
  .form-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; color: var(--ink-mid); }
  .form-row:last-child { border-bottom: 0; }
  .form-row .k { font-family: var(--font-mono); font-size: 11px; width: 62px; color: var(--ink-mid); }
  .form-row .v { color: var(--ink); font-weight: 600; }
  .arrow-run { display: flex; align-items: center; justify-content: center; color: var(--brand); }
  .arrow-run svg { animation: nudge 1.8s ease-in-out infinite; }
  @keyframes nudge { 0%,100%{ transform: translateX(0);} 50%{ transform: translateX(5px);} }
  .f1-queue { display: flex; flex-direction: column; gap: 9px; }
  .fly-ticket { animation: fly 4.5s ease-in-out infinite; }
  @keyframes fly {
    0% { opacity: 0; transform: translateX(-40px) translateY(6px) scale(.9); }
    18% { opacity: 1; transform: none; }
    82% { opacity: 1; transform: none; }
    100% { opacity: 1; transform: none; }
  }
  .fly-ticket:nth-child(2) { animation-delay: 1.4s; }
  .fly-ticket:nth-child(3) { animation-delay: 2.8s; }

  /* ===== F2: Due / Overdue timeline ===== */
  .timeline { position: relative; padding: 30px 6px 10px; }
  .track { height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--paid) 0%, var(--due) 55%, var(--overdue) 100%); position: relative; opacity: .35; }
  .track-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--paid), var(--due), var(--overdue)); width: 20%; animation: fill 6s ease-in-out infinite; }
  @keyframes fill { 0%{ width: 12%; } 45%{ width: 62%; } 90%,100%{ width: 96%; } }
  .due-line { position: absolute; left: 62%; top: -8px; bottom: -8px; width: 2px; background: var(--ink-mid); opacity: .4; }
  .due-line span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; color: var(--ink-mid); white-space: nowrap; }
  .runner { position: absolute; top: 50%; left: 12%; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--paid); transform: translate(-50%,-50%); box-shadow: var(--shadow-sm); animation: run 6s ease-in-out infinite, runColor 6s ease-in-out infinite; z-index: 2; }
  @keyframes run { 0%{ left: 12%; } 45%{ left: 62%; } 90%,100%{ left: 96%; } }
  @keyframes runColor { 0%,40%{ border-color: var(--paid); } 46%,74%{ border-color: var(--due); } 80%,100%{ border-color: var(--overdue); } }
  .flag-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
  .flag-card { display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
  .flag-card .fc-l { display: flex; align-items: center; gap: 10px; }
  .flag-card .tk-id { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mid); }
  .flag-card .nm { font-weight: 600; font-size: 14px; }
  .flag-card.f-overdue { border-color: color-mix(in srgb, var(--overdue) 40%, var(--line)); animation: flagShake 6s ease-in-out infinite; }
  @keyframes flagShake { 0%,60%{ transform: none; } 64%{ transform: translateX(-3px);} 68%{ transform: translateX(3px);} 72%{ transform: translateX(-2px);} 76%,100%{ transform: none; } }

  /* ===== F3: Cash ===== */
  .cash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
  .cash-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
  .cash-card .cc-lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mid); }
  .cash-card .cc-val { font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.5rem,3vw,1.9rem); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
  .cash-card .cc-val.green { color: var(--paid); }
  .cash-card .cc-sub { font-size: 11.5px; color: var(--ink-mid); margin-top: 4px; }
  .ledger { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .ledger-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 13px; font-size: 13px; border-top: 1px solid var(--line); }
  .ledger-row:first-child { border-top: 0; background: var(--surface-2); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mid); }
  .ledger-row .amt { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
  .ledger-row .amt.in { color: var(--paid); }

  /* ===== F4: Employees ===== */
  .emp-board { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .emp-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px; }
  .emp-col h4 { margin: 0 0 10px; font-size: 12px; font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mid); font-weight: 600; display: flex; align-items: center; gap: 7px; }
  .emp-col h4 .cnt { margin-left: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; font-size: 10px; color: var(--ink-mid); }
  .task-card { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
  .task-card:last-child { margin-bottom: 0; }
  .task-card .tc-top { display: flex; align-items: center; justify-content: space-between; }
  .task-card .tc-id { font-family: var(--font-mono); font-size: 10px; color: var(--ink-mid); }
  .task-card .tc-name { font-size: 12.5px; font-weight: 600; margin-top: 5px; }
  .task-card.moving { animation: slideCol 5s ease-in-out infinite; }
  @keyframes slideCol { 0%,20%{ transform: translateY(0); opacity: 1; } 30%{ transform: translateY(-6px); opacity: .5; } 40%{ transform: translateX(10px); opacity: 0; } 41%{ transform: translateX(-10px);} 55%,100%{ transform: none; opacity: 1; } }
  .emp-strip { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
  .emp-pill { display: flex; align-items: center; gap: 7px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px 4px 4px; font-size: 12px; }
  .emp-load { width: 46px; height: 5px; border-radius: 4px; background: var(--line); overflow: hidden; }
  .emp-load > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-deep), var(--brand-bright)); }

  /* ===== F5: WhatsApp ===== */
  .chat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 0; overflow: hidden; max-width: 360px; margin: 0 auto; }
  .chat-head { display: flex; align-items: center; gap: 11px; padding: 12px 14px; background: var(--wa); color: #fff; }
  .chat-head .ch-av { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-weight: 700; }
  .chat-head .ch-nm { font-weight: 700; font-size: 14px; line-height: 1.2; }
  .chat-head .ch-st { font-size: 11px; opacity: .85; }
  .chat-body { padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; background:
      var(--surface-2); }
  .bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; box-shadow: var(--shadow-sm); opacity: 0; }
  .bubble .t { display: block; font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-mid); margin-top: 4px; text-align: right; }
  .bubble.inb { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
  .bubble.out { align-self: flex-end; background: var(--paid-bg); border: 1px solid color-mix(in srgb, var(--paid) 30%, var(--line)); border-bottom-right-radius: 4px; }
  .b1 { animation: bubbleIn .5s ease forwards; animation-delay: .3s; }
  .b2 { animation: bubbleIn .5s ease forwards; animation-delay: 1.6s; }
  .b3 { animation: bubbleIn .5s ease forwards; animation-delay: 3s; }
  .b4 { animation: bubbleIn .5s ease forwards; animation-delay: 4.2s; }
  @keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
  .sys-line { text-align: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-mid); opacity: 0; animation: bubbleIn .5s ease forwards; animation-delay: 2.3s; }
  .sys-line span { background: var(--due-bg); color: var(--due); padding: 3px 9px; border-radius: 999px; }

  /* ---------- MANIFESTO ---------- */
  .manifesto { padding: 96px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
  .manifesto .mglow { position: absolute; inset: auto auto -40% -10%; width: 640px; height: 640px; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 20%, transparent), transparent 60%); pointer-events: none; }
  .manifesto-in { position: relative; z-index: 1; max-width: 760px; }
  .manifesto .mlogo { width: 46px; height: 46px; margin-bottom: 26px; }
  .manifesto q { font-family: var(--font-serif); font-size: clamp(1.7rem, 3.8vw, 2.7rem); line-height: 1.28; font-weight: 500; letter-spacing: -.01em; display: block; }
  .manifesto q b { color: var(--brand); font-weight: 600; font-style: italic; }
  .manifesto .mnote { margin-top: 26px; color: var(--ink-mid); font-size: 1.02rem; max-width: 56ch; }
  .manifesto .mnote b { color: var(--ink); font-weight: 600; }

  /* ---------- STATS BAND ---------- */
  .metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 56px 0; }
  @media (max-width: 720px) { .metrics { grid-template-columns: 1fr 1fr; gap: 26px 20px; } }
  .metric .mv { font-family: var(--font-mono); font-weight: 700; font-size: clamp(2rem, 4vw, 2.9rem); color: var(--brand); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .metric .ml { font-size: 14px; color: var(--ink-mid); margin-top: 6px; }

  /* ---------- CTA ---------- */
  .cta { padding: 30px 0 100px; }
  .cta-box {
    position: relative; overflow: hidden;
    background: linear-gradient(140deg, var(--brand-deep), var(--brand) 70%, var(--brand-bright));
    border-radius: 24px; padding: 60px 44px; text-align: center; box-shadow: var(--shadow-lg);
  }
  .cta-box::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 120%, rgba(255,255,255,.22), transparent 45%); pointer-events: none; }
  .cta-box h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; position: relative; }
  .cta-box p { color: rgba(255,255,255,.9); margin: 16px auto 0; max-width: 52ch; position: relative; font-size: 1.1rem; }
  .cta-box .cta-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; position: relative; flex-wrap: wrap; }
  .cta-box .btn-white { background: #fff; color: var(--brand-deep); }
  .cta-box .btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
  .cta-box .btn-outline { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
  .cta-box .btn-outline:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }


  /* live hero work queue */
  .queue-list { display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
  .queue-list .ticket { margin: 0; }
  .q-item { animation: qIn .5s cubic-bezier(.2,.7,.2,1); }
  @keyframes qIn { from { opacity: 0; transform: translateY(-16px) scale(.97); } to { opacity: 1; transform: none; } }
  .q-item.leaving { animation: qOut .45s ease forwards; }
  @keyframes qOut { to { opacity: 0; transform: translateX(22px) scale(.95); } }
  .stat .bar > i { transition: width .7s cubic-bezier(.2,.7,.2,1); }
  .stat .val.flash { animation: valFlash .9s ease; }
  @keyframes valFlash { 0% { color: var(--brand-bright); transform: translateY(-3px); } 100% { transform: none; } }

  /* interactive whatsapp input */
  .chat-body { max-height: 264px; overflow-y: auto; scroll-behavior: smooth; }
  .chat-input { display: flex; align-items: center; gap: 8px; padding: 10px 11px; background: var(--surface); border-top: 1px solid var(--line); }
  .chat-input input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 10px 15px; font-family: var(--font-sans); font-size: 13.5px; outline: none; transition: border-color .2s, box-shadow .2s; }
  .chat-input input::placeholder { color: var(--ink-mid); }
  .chat-input input:focus { border-color: var(--wa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wa) 22%, transparent); }
  .wa-send { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--wa); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s ease, filter .2s; }
  .wa-send:hover { transform: scale(1.07); filter: brightness(1.06); }
  .wa-send:active { transform: scale(.92); }
  .bubble.live { animation: bubbleIn .35s ease forwards; }
  .bubble.typing { padding: 12px 14px; }
  .bubble .dots { display: inline-flex; gap: 4px; align-items: center; }
  .bubble .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mid); display: inline-block; animation: dotb 1.2s infinite; }
  .bubble .dots i:nth-child(2) { animation-delay: .18s; }
  .bubble .dots i:nth-child(3) { animation-delay: .36s; }
  @keyframes dotb { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .reveal { opacity: 1; transform: none; }
    .cyc.s3 { opacity: 1; }
  }

/* ==== CONTACT & DELETE-ACCOUNT (contact.html / delete-account.html) ==== */
/* ---------- PAGE HEADER ---------- */
    .page-head { position: relative; padding: 60px 0 26px; overflow: hidden; }
    .page-head .glow {
      position: absolute; inset: -30% -10% auto auto; width: 640px; height: 640px;
      background: radial-gradient(circle at 65% 35%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 62%);
      pointer-events: none; z-index: 0;
    }
    .page-head .inner { position: relative; z-index: 1; max-width: 720px; }
    .page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 800; margin-top: 16px; }
    .page-head p.sub { font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: var(--ink-mid); margin-top: 18px; max-width: 60ch; }
    .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
    .chip {
      font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em;
      background: var(--surface); border: 1px solid var(--line); color: var(--ink-mid);
      padding: 6px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px;
    }
    .chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

    /* ---------- CONTACT GRID ---------- */
    .contact { padding: 30px 0 90px; }
    .contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: start; }
    @media (max-width: 940px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

    .col-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
    .col-title h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 800; }
    .col-title .count { font-family: var(--font-mono); font-size: 13px; color: var(--ink-mid); }

    /* ---------- FAQ ---------- */
    .faq { display: flex; flex-direction: column; gap: 12px; }
    .faq-item {
      background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
      overflow: hidden; transition: border-color .2s, box-shadow .2s;
    }
    .faq-item[open] { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow-sm); }
    .faq-item summary {
      list-style: none; cursor: pointer; padding: 18px 20px;
      display: flex; align-items: center; justify-content: space-between; gap: 16px;
      font-weight: 700; font-size: 16.5px; color: var(--ink); user-select: none;
    }
    .faq-item summary::-webkit-details-marker { display: none; }
    .faq-item summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 12px; }
    .faq-item summary .q-ic {
      flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
      background: var(--paid-bg); color: var(--brand); display: flex; align-items: center; justify-content: center;
      transition: transform .25s ease; font-size: 18px; line-height: 1;
    }
    .faq-item[open] summary .q-ic { transform: rotate(45deg); }
    .faq-ans { padding: 0 20px 20px; color: var(--ink-mid); font-size: 15.5px; line-height: 1.65; }
    .faq-ans p + p { margin-top: 12px; }
    .faq-ans b { color: var(--ink); font-weight: 600; }
    .faq-ans .mini-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
    .faq-ans .mini-list li { display: flex; gap: 10px; align-items: flex-start; }
    .faq-ans .mini-list .tick { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; background: var(--paid-bg); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 12px; margin-top: 1px; }
    .faq-ans a.inline { color: var(--brand); font-weight: 600; border-bottom: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); }

    .faq-foot {
      margin-top: 18px; padding: 16px 18px; border-radius: 12px;
      background: var(--surface-2); border: 1px dashed var(--line-strong);
      font-size: 14px; color: var(--ink-mid);
    }
    .faq-foot b { color: var(--ink); }

    /* ---------- FORM ---------- */
    .form-card {
      position: relative; background: var(--surface); border: 1px solid var(--line);
      border-radius: 20px; box-shadow: var(--shadow-lg); padding: 26px; overflow: hidden;
    }
    .form-card::before {
      content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
      background: linear-gradient(90deg, var(--brand-deep), var(--brand-bright), var(--brand-deep));
    }
    .form-head { margin-bottom: 20px; }
    .form-head h2 { font-size: 1.5rem; font-weight: 800; }
    .form-head p { color: var(--ink-mid); font-size: 14.5px; margin-top: 8px; }
    .form-head .reply { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 13px; color: var(--paid); font-family: var(--font-mono); }
    .form-head .reply .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--paid); box-shadow: 0 0 0 4px var(--paid-bg); }

    form.cf { display: flex; flex-direction: column; gap: 15px; }
    .frow { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
    @media (max-width: 480px) { .frow { grid-template-columns: 1fr; } }
    .field { display: flex; flex-direction: column; gap: 6px; }
    .field label { font-size: 13px; font-weight: 600; color: var(--ink); }
    .field label .req { color: var(--overdue); }
    .field input, .field select, .field textarea {
      width: 100%; font-family: var(--font-sans); font-size: 15px; color: var(--ink);
      background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
      padding: 11px 13px; outline: none; transition: border-color .18s, box-shadow .18s;
    }
    .field textarea { resize: vertical; min-height: 108px; }
    .field input:focus, .field select:focus, .field textarea:focus {
      border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
    }
    .field.invalid input, .field.invalid select, .field.invalid textarea {
      border-color: var(--overdue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--overdue) 18%, transparent);
    }
    .field .err { font-size: 12.5px; color: var(--overdue); min-height: 0; display: none; }
    .field.invalid .err { display: block; }

    /* honeypot */
    .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

    /* captcha */
    .captcha {
      display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
      background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
    }
    .captcha .cap-q { display: flex; flex-direction: column; gap: 6px; }
    .captcha .cap-q .lbl { font-size: 12px; font-weight: 600; color: var(--ink); }
    .captcha .cap-box { display: flex; align-items: center; gap: 10px; }
    .captcha .puzzle {
      font-family: var(--font-mono); font-weight: 700; font-size: 18px; letter-spacing: .04em;
      background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px;
      padding: 9px 13px; color: var(--ink); user-select: none; min-width: 96px; text-align: center;
      font-variant-numeric: tabular-nums;
    }
    .captcha .refresh {
      width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line-strong);
      background: var(--surface); color: var(--ink-mid); cursor: pointer; display: flex; align-items: center; justify-content: center;
      transition: transform .2s, color .2s, border-color .2s; flex: 0 0 auto;
    }
    .captcha .refresh:hover { color: var(--brand); border-color: var(--brand); }
    .captcha .refresh.spin svg { animation: spin .5s ease; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .captcha .cap-in { flex: 1; min-width: 120px; }
    .captcha .cap-in input { width: 100%; }

    .submit-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
    .submit-row .btn-primary { flex: 0 0 auto; }
    .fineprint { font-size: 12.5px; color: var(--ink-mid); }
    .fineprint a { color: var(--brand); }

    /* status banners */
    .banner { border-radius: 12px; padding: 14px 16px; font-size: 14.5px; display: none; align-items: flex-start; gap: 11px; }
    .banner.show { display: flex; animation: bIn .4s ease; }
    @keyframes bIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
    .banner .b-ic { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
    .banner.ok { background: var(--paid-bg); border: 1px solid color-mix(in srgb, var(--paid) 35%, var(--line)); color: var(--ink); }
    .banner.ok .b-ic { background: var(--paid); color: #fff; }
    .banner.bad { background: var(--overdue-bg); border: 1px solid color-mix(in srgb, var(--overdue) 35%, var(--line)); color: var(--ink); }
    .banner.bad .b-ic { background: var(--overdue); color: #fff; }
    .banner b { font-weight: 700; }
    .banner .b-body { line-height: 1.45; }
    .banner .b-body span { color: var(--ink-mid); }

    /* success replaces form */
    .success-card { text-align: center; padding: 24px 8px; display: none; }
    .success-card.show { display: block; animation: bIn .5s ease; }
    .success-card .s-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--paid-bg); color: var(--brand); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
    .success-card h3 { font-size: 1.5rem; font-weight: 800; }
    .success-card p { color: var(--ink-mid); margin: 12px auto 0; max-width: 42ch; }
    .success-card button { margin-top: 22px; }

/* ============================================================================
   Account-deletion page additions (delete-account.html)
   ========================================================================== */
.steps { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps .sx { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; background: var(--paid-bg); color: var(--brand); font-family: var(--font-mono); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.steps .sx-body { font-size: 15px; color: var(--ink-mid); line-height: 1.55; }
.steps .sx-body strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.steps a { color: var(--brand); font-weight: 600; }

.check-field { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 14.5px; color: var(--ink); line-height: 1.5; }
.check-field input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); cursor: pointer; }

.radio-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.radio-opt { display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); cursor: pointer; font-size: 14.5px; font-weight: 500; color: var(--ink); transition: border-color .18s, box-shadow .18s, background .18s; }
.radio-opt input[type="radio"] { accent-color: var(--brand); width: 17px; height: 17px; cursor: pointer; }
.radio-opt:has(input:checked) { border-color: var(--brand); background: var(--paid-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }

.hint { font-size: 12.5px; color: var(--ink-mid); }

.request-number { display: block; font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.4rem, 4vw, 1.9rem); letter-spacing: .06em; color: var(--brand); background: var(--paid-bg); border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: 12px; padding: 14px 18px; margin: 18px auto 6px; max-width: 320px; user-select: all; }
.request-meta { font-size: 13px; color: var(--ink-mid); margin-top: 8px; }
.rr-note { font-size: 14px; color: var(--ink-mid); margin-top: 14px; }
.success-card .btn { margin-top: 20px; }
.success-card .result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* 404 */
.notfound { min-height: 62vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 0; }
.notfound .code { font-family: var(--font-mono); font-weight: 800; font-size: clamp(4rem, 16vw, 9rem); line-height: 1; color: var(--brand); letter-spacing: -.04em; }
.notfound h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-top: 12px; }
.notfound p { color: var(--ink-mid); margin: 16px auto 0; max-width: 46ch; }
.notfound .nf-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }