/* SamNet One — design system. RTL-first, light/dark, no build step. */
:root {
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --ink: #0b0b0f; --ink-2: #1c1c22;
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #fafafb; --surface-3: #f0f0f3;
  --line: #e6e6eb; --line-2: #d6d6de;
  --text: #121216; --muted: #6a6a76; --faint: #9a9aa5;
  --accent: #4338ca; --accent-2: #5b50e8; --accent-soft: #eeedff; --on-accent: #fff;
  --green: #15803d; --green-soft: #e8f7ee; --red: #c62828; --red-soft: #fdecec; --amber: #b45309; --amber-soft: #fdf3e2;
  --blue: #1d4ed8; --blue-soft: #e9f0ff; --violet: #6d28d9; --violet-soft: #f2ecff; --teal: #0f766e; --teal-soft: #e3f6f3; --gray-soft: #f0f0f3;
  --radius: 14px; --radius-sm: 10px; --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(16,16,24,.05), 0 1px 1px rgba(16,16,24,.03);
  --shadow-lg: 0 12px 40px -12px rgba(16,16,24,.25), 0 2px 6px rgba(16,16,24,.06);
  --sidebar: 268px; --topbar: 64px;
  --metal: radial-gradient(120% 140% at 50% 45%, #a7a7ad 0%, #4a4a50 45%, #121214 100%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c10; --surface: #15151b; --surface-2: #1a1a21; --surface-3: #22222b; --line: #2a2a34; --line-2: #383844;
    --text: #ececf1; --muted: #a0a0ad; --faint: #6f6f7c; --ink: #f4f4f7; --ink-2: #dcdce3;
    --accent: #8b84ff; --accent-2: #a59fff; --accent-soft: #23214a; --on-accent: #0c0c10;
    --green: #4ade80; --green-soft: #0f2a1a; --red: #f87171; --red-soft: #321416; --amber: #fbbf24; --amber-soft: #2e2410;
    --blue: #7aa2ff; --blue-soft: #14203d; --violet: #b69bff; --violet-soft: #241a3d; --teal: #5eead4; --teal-soft: #0f2a27; --gray-soft: #22222b;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 16px 50px -12px rgba(0,0,0,.7);
    --metal: radial-gradient(120% 140% at 50% 45%, #f2f2f5 0%, #b9b9c0 45%, #6d6d75 100%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c10; --surface: #15151b; --surface-2: #1a1a21; --surface-3: #22222b; --line: #2a2a34; --line-2: #383844;
  --text: #ececf1; --muted: #a0a0ad; --faint: #6f6f7c; --ink: #f4f4f7; --ink-2: #dcdce3;
  --accent: #8b84ff; --accent-2: #a59fff; --accent-soft: #23214a; --on-accent: #0c0c10;
  --green: #4ade80; --green-soft: #0f2a1a; --red: #f87171; --red-soft: #321416; --amber: #fbbf24; --amber-soft: #2e2410;
  --blue: #7aa2ff; --blue-soft: #14203d; --violet: #b69bff; --violet-soft: #241a3d; --teal: #5eead4; --teal-soft: #0f2a27; --gray-soft: #22222b;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 16px 50px -12px rgba(0,0,0,.7);
  --metal: radial-gradient(120% 140% at 50% 45%, #f2f2f5 0%, #b9b9c0 45%, #6d6d75 100%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.7; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code, .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; direction: ltr; unicode-bidi: embed; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i-lg { width: 22px; height: 22px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .85rem; } .tiny { font-size: .76rem; }
.nowrap { white-space: nowrap; } .right { text-align: end; } .center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }

/* ------------------------------------------------------------- brand */
.logo { width: 34px; height: 34px; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; letter-spacing: .01em; }
.brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.metal-text { background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; white-space: nowrap; }
.btn:hover { border-color: var(--faint); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-primary:hover { background: var(--ink-2); color: var(--surface); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-2); color: var(--on-accent); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.btn-sm { min-height: 32px; padding: 4px 11px; font-size: .84rem; }
.btn-lg { min-height: 50px; padding: 12px 24px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

/* ------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-green { background: var(--green-soft); color: var(--green); } .badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); } .badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-violet { background: var(--violet-soft); color: var(--violet); } .badge-teal { background: var(--teal-soft); color: var(--teal); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; color: var(--muted); background: var(--surface); }

/* ------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi-label { color: var(--muted); font-size: .84rem; display: flex; align-items: center; gap: 8px; }
.kpi-value { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.kpi-sub { font-size: .8rem; color: var(--muted); }
.kpi-icon { position: absolute; inset-inline-end: 16px; top: 16px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.trend-up { color: var(--green); } .trend-down { color: var(--red); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .i { width: 40px; height: 40px; stroke-width: 1.5; color: var(--faint); margin-bottom: 10px; }
.empty h3 { color: var(--text); }

/* ------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .88rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .error { font-size: .8rem; color: var(--red); }
.req::after { content: " *"; color: var(--red); }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.7; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--red); }
.input-ltr { direction: ltr; text-align: left; }
.input-sm { min-height: 34px; padding: 5px 10px; font-size: .88rem; }
.input-group { display: flex; } .input-group .input { border-radius: 0; } .input-group > :first-child { border-start-start-radius: var(--radius-sm); border-end-start-radius: var(--radius-sm); }
.input-group > :last-child { border-start-end-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); }
.addon { display: flex; align-items: center; padding: 0 12px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--muted); font-size: .88rem; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 4px; flex: none; }
.switch { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 2px 0 0; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch:checked { background: var(--accent); } .switch:checked::after { inset-inline-start: 21px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 4px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; font-size: .92rem; }
.form-actions { display: flex; gap: 10px; justify-content: flex-start; padding-top: 6px; flex-wrap: wrap; }

/* ------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: start; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a.rowlink { font-weight: 600; }
.cell-sub { display: block; font-size: .78rem; color: var(--muted); }
@media (max-width: 720px) {
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table.responsive td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; }
  .table.responsive tbody tr:hover td { background: transparent; }
}
.pager { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); flex-wrap: wrap; }

/* ------------------------------------------------------------- toolbar, tabs */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .input { width: auto; min-width: 160px; }
.search { position: relative; flex: 1; min-width: 200px; }
.search .i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-inline-start: 38px; width: 100%; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 11px 14px; border: 0; background: none; font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a[aria-current="page"], .tabs button[aria-selected="true"] { color: var(--text); border-color: var(--ink); }
.tabs .count { background: var(--surface-3); border-radius: 99px; padding: 0 7px; font-size: .74rem; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.seg a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ------------------------------------------------------------- alerts / toasts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid; font-size: .92rem; margin-bottom: 16px; }
.alert-success { background: var(--green-soft); border-color: transparent; color: var(--green); }
.alert-error { background: var(--red-soft); border-color: transparent; color: var(--red); }
.alert-warning { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.alert-info { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.toasts { position: fixed; z-index: 90; bottom: 20px; inset-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: var(--ink); color: var(--surface); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: toast-in .25s ease-out; font-size: .92rem; }
.toast-error { background: var(--red); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------- workspace shell */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-inline-end: 1px solid var(--line); padding: 16px 12px 24px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; }
.sidebar .brand { padding: 4px 10px 16px; }
.nav-group { margin-top: 12px; }
.nav-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: var(--faint); padding: 0 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: .92rem; }
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--ink); color: var(--surface); }
.nav-link .count { margin-inline-start: auto; background: var(--red); color: #fff; border-radius: 99px; font-size: .7rem; padding: 0 7px; line-height: 1.6; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.cmdk-trigger { display: flex; align-items: center; gap: 10px; min-width: 260px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--faint); font: inherit; font-size: .9rem; cursor: pointer; }
.cmdk-trigger kbd { margin-inline-start: auto; }
kbd { font-family: inherit; font-size: .72rem; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); }
.topbar-actions { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; object-fit: cover; }
.avatar-sm { width: 26px; height: 26px; font-size: .7rem; }
.dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.content { padding: 28px; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumbs { font-size: .82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.menu-btn { display: none; }
@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); z-index: 60; transform: translateX(100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  [dir="ltr"] .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
  .menu-btn { display: inline-flex; }
  .cmdk-trigger { min-width: 0; width: 40px; padding: 0; justify-content: center; } .cmdk-trigger span, .cmdk-trigger kbd { display: none; }
  .content { padding: 18px 16px 90px; }
  .topbar { padding: 0 12px; }
}

/* ------------------------------------------------------------- dropdown / dialog */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; } .dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: .9rem; color: var(--text); background: none; border: 0; cursor: pointer; text-align: start; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); }
.dropdown-menu .sep { height: 1px; background: var(--line); margin: 6px 0; }
dialog { border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); }
dialog::backdrop { background: rgba(8,8,12,.5); backdrop-filter: blur(2px); }
dialog .card-head { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.cmdk { width: min(640px, calc(100vw - 24px)); margin-top: 10vh; }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font: inherit; font-size: 1.05rem; background: transparent; color: var(--text); outline: none; }
.cmdk ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.cmdk li a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; }
.cmdk li a[aria-selected="true"], .cmdk li a:hover { background: var(--surface-3); color: var(--text); }
.cmdk .group { font-size: .72rem; color: var(--faint); padding: 8px 12px 4px; font-weight: 700; }

/* ------------------------------------------------------------- kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--surface-3); border-radius: var(--radius); padding: 10px; min-height: 160px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-weight: 700; font-size: .88rem; }
.col.drag-over { outline: 2px dashed var(--accent); outline-offset: -4px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: grab; font-size: .88rem; }
.kcard:active { cursor: grabbing; } .kcard.dragging { opacity: .5; }
.kcard-title { font-weight: 600; margin-bottom: 6px; display: block; }
.kcard-meta { display: flex; gap: 8px; align-items: center; justify-content: space-between; color: var(--muted); font-size: .78rem; }

/* ------------------------------------------------------------- timeline, lists */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 28px 18px 0; }
[dir="ltr"] .timeline li { padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 7px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; inset-inline-start: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.timeline .tl-meta { font-size: .78rem; color: var(--muted); }
.dl { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 10px 16px; margin: 0; font-size: .92rem; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* ------------------------------------------------------------- charts (server-rendered SVG) */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); } .chart .bar-2 { fill: var(--line-2); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; } .chart .area { fill: var(--accent-soft); }
.chart .axis { stroke: var(--line); } .chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center; font-size: .86rem; }
.funnel-bar { height: 26px; background: var(--accent-soft); border-radius: 6px; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }

/* ------------------------------------------------------------- auth screens */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: #0b0b0f; color: #f4f4f7; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; width: 640px; height: 640px; inset-inline-end: -220px; bottom: -260px; background: radial-gradient(circle, rgba(139,132,255,.32), transparent 60%); }
.auth-side h2 { font-size: 2rem; max-width: 420px; position: relative; }
.auth-side p { color: #a9a9b6; max-width: 420px; position: relative; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.5rem; }
.otp { letter-spacing: 12px; font-size: 1.5rem; text-align: center; direction: ltr; font-weight: 700; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ------------------------------------------------------------- public site */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-nav { display: flex; align-items: center; gap: 22px; height: 70px; }
.site-nav nav { display: flex; gap: 4px; margin-inline-start: 20px; }
.site-nav nav a { padding: 8px 12px; border-radius: 9px; font-weight: 500; font-size: .94rem; color: var(--muted); white-space: nowrap; }
.site-nav nav a:hover, .site-nav nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }
.site-nav .actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.site-menu-btn { display: none; }
@media (max-width: 1080px) {
  .site-nav nav { display: none; position: absolute; top: 70px; inset-inline: 0; flex-direction: column; background: var(--surface); padding: 12px 20px 18px; border-bottom: 1px solid var(--line); margin: 0; box-shadow: var(--shadow-lg); }
  body.nav-open .site-nav nav { display: flex; }
  .site-menu-btn { display: inline-flex; }
  .site-nav .actions .hide-sm { display: none; }
}
.hero { position: relative; overflow: hidden; padding: 96px 0 84px; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 760px; background: radial-gradient(closest-side, var(--accent-soft), transparent); opacity: .9; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.18; letter-spacing: -.03em; margin-bottom: 18px; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 580px; }
.hero-mark { position: relative; aspect-ratio: 1; max-width: 420px; margin-inline-start: auto; display: grid; place-items: center; }
.hero-mark::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle at 50% 45%, var(--surface), var(--surface-3)); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg); }
.hero-mark svg { position: relative; width: 62%; animation: float 7s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(0,0,0,.18)); }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-mark svg { animation: none; } * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 900px) { .hero { padding: 56px 0; } .hero-grid { grid-template-columns: 1fr; } .hero-mark { max-width: 240px; margin: 0 auto; order: -1; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 18px; }
.eyebrow b { color: var(--accent); }
.section { padding: 84px 0; } .section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 40px; } .section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.02em; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.feature { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; height: 100%; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.feature-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--ink); color: var(--surface); margin-bottom: 16px; }
.feature h3 { font-size: 1.08rem; }
.feature p { color: var(--muted); font-size: .94rem; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat b { display: block; font-size: 2.2rem; letter-spacing: -.03em; } .stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.price-card { display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); height: 100%; position: relative; }
.price-card.featured { border: 2px solid var(--ink); box-shadow: var(--shadow-lg); }
.price-card .ribbon { position: absolute; top: -12px; inset-inline-start: 22px; background: var(--ink); color: var(--surface); font-size: .75rem; font-weight: 700; padding: 3px 12px; border-radius: 99px; }
.price { font-size: 2.2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 4px; }
.price small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.price s { font-size: 1rem; color: var(--faint); font-weight: 500; margin-inline-start: 6px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 22px; display: flex; flex-direction: column; gap: 9px; font-size: .92rem; flex: 1; }
.ticks li { display: flex; gap: 10px; } .ticks li .i { color: var(--green); margin-top: 3px; }
.cta { border-radius: 28px; padding: 56px; background: #0b0b0f; color: #f4f4f7; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; width: 520px; height: 520px; inset-inline-start: -160px; top: -200px; background: radial-gradient(circle, rgba(139,132,255,.35), transparent 62%); }
.cta > * { position: relative; z-index: 1; } .cta p { color: #b4b4c0; }
.cta .btn-primary { background: #fff; color: #0b0b0f; border-color: #fff; }
.site-foot { border-top: 1px solid var(--line); padding: 56px 0 28px; background: var(--surface); margin-top: 40px; }
.site-foot h4 { font-size: .9rem; margin-bottom: 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; color: var(--muted); }
.prose { font-size: 1.04rem; line-height: 1.95; max-width: 760px; }
.prose h2 { margin-top: 1.6em; } .prose img { border-radius: var(--radius); }

/* ------------------------------------------------------------- checkout stepper */
.steps { display: flex; gap: 8px; margin-bottom: 26px; counter-reset: step; flex-wrap: wrap; }
.steps li { list-style: none; flex: 1; min-width: 110px; font-size: .82rem; font-weight: 600; color: var(--faint); padding-top: 10px; border-top: 3px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step) ". "; }
.steps li.done { color: var(--muted); border-color: var(--ink); } .steps li.current { color: var(--text); border-color: var(--accent); }
.option { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; align-items: flex-start; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.option input { accent-color: var(--accent); margin-top: 5px; }
.summary { position: sticky; top: 90px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .92rem; }
.summary-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.1rem; }
.sigpad { width: 100%; height: 190px; border: 2px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); touch-action: none; cursor: crosshair; display: block; }
.doc { background: #fff; color: #111; padding: 48px 56px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 860px; margin: 0 auto; font-size: 14px; line-height: 2; }
.doc h1 { font-size: 22px; text-align: center; } .doc h3 { font-size: 15px; margin-top: 18px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; } .doc td, .doc th { border: 1px solid #ddd; padding: 6px 10px; text-align: start; }
@media (max-width: 720px) { .doc { padding: 24px 18px; } }
@media print {
  body { background: #fff; } .no-print, .sidebar, .topbar, .site-head, .site-foot, .toasts { display: none !important; }
  .shell { display: block; } .content { padding: 0; } .doc { box-shadow: none; padding: 0; max-width: none; }
}
/* logo stops follow the theme (inline SVG uses these vars) */
:root { --logo-a: #9a9a9a; --logo-b: #3a3a3a; --logo-c: #141414; }
:root[data-theme="dark"] { --logo-a: #ffffff; --logo-b: #c9c9cf; --logo-c: #7c7c84; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --logo-a: #ffffff; --logo-b: #c9c9cf; --logo-c: #7c7c84; } }
.on-dark { --logo-a: #ffffff; --logo-b: #c9c9cf; --logo-c: #7c7c84; }
.logo-hero { width: 62%; height: auto; position: relative; animation: float 7s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(0,0,0,.18)); }
@media (prefers-reduced-motion: reduce) { .logo-hero { animation: none; } }
blockquote { border-inline-start: 3px solid var(--accent); margin: 1em 0; padding: 4px 16px; color: var(--muted); }
/* uploaded brand logo (light/dark variants) */
.brand-logo { display: inline-flex; align-items: center; flex: none; }
.brand-logo img { height: 100%; width: auto; max-width: 180px; object-fit: contain; }
.brand-logo.logo { height: 34px; width: auto; }
.brand-logo.logo-hero { width: 62%; height: auto; } .brand-logo.logo-hero img { width: 100%; height: auto; max-width: none; }
.brand-logo .logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo:has(.logo-dark) .logo-light, .on-dark .brand-logo:has(.logo-dark) .logo-light { display: none; }
:root[data-theme="dark"] .brand-logo .logo-dark, .on-dark .brand-logo .logo-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo:has(.logo-dark) .logo-light { display: none; } :root:not([data-theme="light"]) .brand-logo .logo-dark { display: block; } }
.swatch { width: 54px; height: 42px; padding: 4px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
/* floating WhatsApp: brand-dark pill with the green WhatsApp badge, greeting bubble and a soft pulse */
.wa-fab { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 45; display: flex; align-items: center; gap: 10px; padding: 6px; padding-inline-start: 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--ink), color-mix(in srgb, var(--ink) 70%, var(--accent))); color: #fff; font-weight: 700; font-size: .92rem; text-decoration: none;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08) inset; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; animation: wa-in .6s 1s both cubic-bezier(.2,.8,.2,1); }
:root[data-theme="dark"] .wa-fab { background: linear-gradient(135deg, #1d1d26, #2a2a36); }
.wa-fab:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -12px rgba(0,0,0,.5); color: #fff; }
.wa-ico { position: relative; width: 46px; height: 46px; border-radius: 50%; background: #25d366; display: grid; place-items: center; flex: none; }
.wa-ico::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; animation: wa-pulse 2.4s 2s infinite; z-index: -1; }
.wa-online { position: absolute; top: 1px; inset-inline-end: 1px; width: 11px; height: 11px; border-radius: 50%; background: #b7ffcf; border: 2px solid #25d366; }
.wa-bubble { position: absolute; bottom: calc(100% + 12px); inset-inline-end: 0; width: max-content; max-width: 230px; background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 16px 16px 4px 16px; padding: 10px 14px; font-weight: 500; font-size: .88rem; line-height: 1.6; box-shadow: var(--shadow-lg, 0 12px 30px rgba(0,0,0,.15));
  opacity: 0; transform: translateY(8px) scale(.96); transform-origin: bottom right; pointer-events: none; animation: wa-bubble 7s 4s both; }
.wa-bubble b { display: block; }
.wa-bubble small { display: block; color: var(--muted); font-size: .76rem; }
.wa-fab:hover .wa-bubble { animation: none; opacity: 1; transform: none; }
@keyframes wa-in { from { opacity: 0; transform: translateY(30px) scale(.8); } }
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
@keyframes wa-bubble { 0% { opacity: 0; transform: translateY(8px) scale(.96); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(8px) scale(.96); } }
@media (max-width: 560px) { .wa-fab { padding-inline-start: 6px; } .wa-label { display: none; } }
@media (prefers-reduced-motion: reduce) { .wa-fab, .wa-ico::before, .wa-bubble { animation: none; } }
@media print { .wa-fab { display: none; } }
button[data-push][data-state="on"] .i { color: var(--green); }
/* portfolio cards */
.work-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; height: 100%; }
.work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.work-cover { position: relative; aspect-ratio: 16 / 10; background: var(--surface-3); display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.work-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s; }
.work-card:hover .work-cover img { transform: scale(1.04); }
.work-tag { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(11,11,15,.78); color: #fff; font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; backdrop-filter: blur(4px); }
.work-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.work-body h3 { margin-bottom: 6px; }
.work-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.work-metrics b { display: block; font-size: 1.15rem; letter-spacing: -.02em; }
.work-metrics span { font-size: .74rem; color: var(--muted); }
.brand-name { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
@media (max-width: 480px) { .brand-name { max-width: 120px; } }

/* ===================================================================== 3D logo */
.logo3d { --rx: 0deg; --ry: 0deg; --face-a: #b9b9c0; --face-b: #3c3c44; --face-c: #0e0e12; --side: #111116;
  position: relative; width: min(420px, 82vw); aspect-ratio: 1; margin-inline-start: auto; perspective: 1100px; display: grid; place-items: center; }
:root[data-theme="dark"] .logo3d { --face-a: #ffffff; --face-b: #c4c4cc; --face-c: #7a7a84; --side: #4a4a55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo3d { --face-a: #ffffff; --face-b: #c4c4cc; --face-c: #7a7a84; --side: #4a4a55; } }
.logo3d-glow { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle at 50% 42%, var(--surface) 0%, var(--surface-3) 55%, transparent 72%); box-shadow: inset 0 0 0 1px var(--line); }
.logo3d-glow::after { content: ""; position: absolute; inset: -14%; border-radius: 50%; background: conic-gradient(from 0deg, transparent, var(--accent-soft), transparent 40%); animation: logo-orbit 16s linear infinite; opacity: .9; z-index: -1; filter: blur(18px); }
.logo3d-stage { position: relative; width: 62%; aspect-ratio: 1; transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.logo3d-sway { position: absolute; inset: 0; transform-style: preserve-3d; animation: logo-sway 9s ease-in-out infinite; }
.logo3d.is-tilting .logo3d-stage { transition-duration: .12s; }
.logo3d-layer, .logo3d-face { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* each layer sits a little deeper and darker: together they read as a solid extrusion */
.logo3d-layer { color: var(--side); transform: translateZ(calc(var(--i) * -2.1px)); filter: brightness(calc(1 - var(--i) / var(--n) * .55)); }
.logo3d-face { transform: translateZ(1px); filter: drop-shadow(0 1px 0 rgba(255,255,255,.18)); }
.logo3d-img { object-fit: contain; }
.logo3d-img.logo3d-layer { filter: brightness(calc(.55 - var(--i) / var(--n) * .3)) saturate(.6); }
.logo3d-sheen { mix-blend-mode: soft-light; }
.logo3d-shadow { position: absolute; bottom: 9%; left: 50%; width: 46%; height: 7%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.28), transparent); animation: logo-shadow 9s ease-in-out infinite; filter: blur(2px); }
@keyframes logo-sway { 0%, 100% { transform: translateY(0) rotateX(6deg) rotateY(-24deg); } 50% { transform: translateY(-14px) rotateX(-4deg) rotateY(24deg); } }
@keyframes logo-shadow { 0%, 100% { transform: translateX(-50%) scale(1); opacity: .9; } 50% { transform: translateX(-50%) scale(.82); opacity: .55; } }
@keyframes logo-orbit { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .logo3d { width: min(280px, 70vw); margin: 0 auto; order: -1; } }

/* ===================================================================== hero ambience */
.hero::after { content: ""; position: absolute; width: 520px; height: 520px; inset-inline-end: -160px; top: 40px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); filter: blur(20px); animation: drift 18s ease-in-out infinite alternate; pointer-events: none; }
.hero .wrap::before { content: ""; position: absolute; inset: -60px -40px; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 60% 70% at 70% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 60% 70% at 70% 40%, #000 30%, transparent 75%); pointer-events: none; z-index: -1; }
.hero .wrap { position: relative; z-index: 1; }
@keyframes drift { to { transform: translate(-120px, 80px) scale(1.15); } }
.hero h1 .metal-text { background-size: 200% 200%; animation: metal-shift 8s ease-in-out infinite; }
@keyframes metal-shift { 50% { background-position: 100% 50%; } }

/* ===================================================================== motion system */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s), transform .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
.js .hero-enter > * { opacity: 0; transform: translateY(18px); animation: enter .9s cubic-bezier(.2,.7,.2,1) forwards; }
.js .hero-enter > *:nth-child(2) { animation-delay: .08s; } .js .hero-enter > *:nth-child(3) { animation-delay: .16s; } .js .hero-enter > *:nth-child(4) { animation-delay: .24s; } .js .hero-enter > *:nth-child(5) { animation-delay: .32s; }
@keyframes enter { to { opacity: 1; transform: none; } }
.site-head { transition: box-shadow .3s, background .3s; }
.site-head.scrolled { box-shadow: 0 6px 24px -12px rgba(0,0,0,.25); }
.btn-primary, .btn-accent { position: relative; overflow: hidden; }
.btn-primary::after, .btn-accent::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; }
.btn-primary:hover::after, .btn-accent:hover::after { transform: translateX(120%); }
.feature-icon { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.feature:hover .feature-icon { transform: translateY(-3px) rotate(-6deg); }
.price-card { transition: transform .25s, box-shadow .25s; } .price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.js .content { animation: page-in .45s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
.kpi, .card { transition: box-shadow .25s, border-color .25s; } a.card:hover, .kpi:hover { box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: reduce) {
  .logo3d-sway, .logo3d-shadow, .logo3d-glow::after, .hero::after, .hero h1 .metal-text, .js .content { animation: none !important; }
  .js .reveal, .js .hero-enter > * { opacity: 1 !important; transform: none !important; animation: none !important; }
}
.sigpad.signed { border-style: solid; border-color: var(--accent); background: var(--surface); }
.shake { animation: shake .45s; } @keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.js .hero-enter.entered > * { opacity: 1; transform: none; animation: none; }

/* ===================================================================== contract document */
.contract-doc { --cd-ink: #101014; --cd-line: #e3e3ea; --cd-soft: #f6f6f9; --cd-accent: var(--accent);
  position: relative; background: #fff; color: var(--cd-ink); max-width: 880px; margin: 0 auto; padding: 44px 52px 34px; border-radius: 10px;
  box-shadow: 0 30px 70px -30px rgba(16,16,24,.35), 0 0 0 1px rgba(16,16,24,.06); font-size: 14px; line-height: 2; overflow: hidden; }
.contract-doc::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, #0b0b0f, var(--cd-accent), #0b0b0f); }
.cd-watermark { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-size: 76px; font-weight: 800; color: rgba(16,16,24,.045); white-space: nowrap; pointer-events: none; z-index: 0; }
.contract-doc > * { position: relative; z-index: 1; }
.cd-head { display: grid; grid-template-columns: 1fr auto auto; gap: 22px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--cd-line); }
.cd-brand { display: flex; gap: 14px; align-items: center; }
.cd-brand strong { display: block; font-size: 17px; }
.cd-brand span { display: block; font-size: 11.5px; color: #6a6a76; line-height: 1.7; }
.cd-logo { width: 54px; height: 54px; object-fit: contain; --logo-a: #9a9a9a; --logo-b: #3a3a3a; --logo-c: #141414; }
.cd-meta table { border-collapse: collapse; font-size: 12px; }
.cd-meta th { color: #6a6a76; font-weight: 500; padding: 1px 0 1px 12px; text-align: start; } .cd-meta td { font-weight: 700; padding: 1px 0; }
.cd-kicker { font-size: 11px; letter-spacing: .06em; font-weight: 700; color: var(--cd-accent); margin-bottom: 4px; }
.cd-qr { text-align: center; } .cd-qr small { display: block; font-size: 10px; color: #6a6a76; line-height: 1.5; }
.cd-qr [data-qr] img, .cd-qr [data-qr] canvas { width: 86px !important; height: 86px !important; }
.cd-title { font-size: 22px; text-align: center; margin: 26px 0 20px; }
.cd-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.cd-party { background: var(--cd-soft); border: 1px solid var(--cd-line); border-radius: 12px; padding: 14px 16px; line-height: 1.8; }
.cd-party strong { display: block; font-size: 15px; margin: 2px 0 4px; }
.cd-party span { display: block; font-size: 12.5px; color: #4a4a55; }
.cd-party-tag { font-size: 11px; font-weight: 700; color: var(--cd-accent); letter-spacing: .02em; }
.cd-preamble { background: #fff; border-inline-start: 3px solid var(--cd-accent); padding: 4px 14px; color: #33333b; }
.cd-summary { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--cd-line); border-radius: 12px; overflow: hidden; margin: 18px 0 26px; }
.cd-summary > div { padding: 10px 14px; border-inline-start: 1px solid var(--cd-line); border-top: 1px solid var(--cd-line); margin: -1px 0 0 -1px; }
.cd-summary span { display: block; font-size: 11.5px; color: #6a6a76; } .cd-summary strong { font-size: 14px; }
.contract-doc h2 { font-size: 16px; margin: 24px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--cd-line); }
.cd-clause { margin-bottom: 12px; page-break-inside: avoid; break-inside: avoid; }
.cd-clause h3 { font-size: 14.5px; margin: 0 0 2px; display: flex; gap: 10px; align-items: center; }
.cd-clause p { margin: 0; color: #2c2c33; text-align: justify; }
.cd-num { flex: none; width: 24px; height: 24px; border-radius: 7px; background: #0b0b0f; color: #fff; font-size: 12px; display: grid; place-items: center; }
.cd-bilingual { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; } .cd-bilingual [dir="ltr"] p { text-align: left; font-size: 13px; color: #4a4a55; }
.cd-schedule table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cd-schedule th, .cd-schedule td { border-bottom: 1px solid var(--cd-line); padding: 7px 10px; text-align: start; }
.cd-schedule thead th { background: var(--cd-soft); font-size: 12px; color: #4a4a55; } .cd-schedule tfoot th { font-size: 14px; }
.cd-schedule .num { text-align: end; white-space: nowrap; }
.cd-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; page-break-inside: avoid; break-inside: avoid; }
.cd-sign { border: 1px solid var(--cd-line); border-radius: 12px; padding: 14px 16px; line-height: 1.7; }
.cd-sign strong, .cd-sign > span { display: block; }
.cd-sign-box { position: relative; height: 104px; margin: 10px 0 6px; border-bottom: 1.5px dashed #b9b9c4; display: flex; align-items: flex-end; justify-content: center; gap: 10px; }
.cd-sign-box img { max-height: 96px; max-width: 70%; object-fit: contain; }
.cd-stamp { position: absolute; inset-inline-end: 6px; bottom: 4px; max-height: 92px !important; opacity: .9; transform: rotate(-8deg); mix-blend-mode: multiply; }
.cd-muted { font-size: 11.5px; color: #8a8a95; }
.cd-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--cd-line); font-size: 10.5px; color: #8a8a95; word-break: break-all; }
.cd-scroll { max-height: 70vh; overflow-y: auto; border-radius: 12px; padding: 6px; background: var(--surface-3); }
@media (max-width: 720px) {
  .contract-doc { padding: 26px 18px; font-size: 13.5px; }
  .cd-head { grid-template-columns: 1fr; } .cd-parties, .cd-signatures, .cd-bilingual { grid-template-columns: 1fr; } .cd-summary { grid-template-columns: 1fr 1fr; }
  .cd-watermark { font-size: 44px; }
}
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  .contract-doc { box-shadow: none; padding: 0; max-width: none; border-radius: 0; } .contract-doc::before { display: none; }
  .cd-scroll { max-height: none; overflow: visible; background: none; }
  .cd-num { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .cd-party, .cd-schedule thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* visitors */
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); animation: live 1.8s infinite; vertical-align: middle; }
@keyframes live { 70% { box-shadow: 0 0 0 9px transparent; } }
.geo-list li { gap: 10px; }
.geo-flag { font-size: 1.4rem; line-height: 1; }
.geo-bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.geo-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
/* portfolio manager */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pf-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.pf-item:hover { box-shadow: var(--shadow-lg, 0 12px 30px rgba(0,0,0,.12)); transform: translateY(-2px); }
.pf-item.is-draft { opacity: .72; }
.pf-cover { position: relative; aspect-ratio: 16/10; background: var(--surface-3); display: grid; place-items: center; color: var(--faint); }
.pf-cover img { width: 100%; height: 100%; object-fit: cover; }
.pf-badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.pf-body { padding: 14px 16px 6px; flex: 1; }
.pf-body h3 { margin: 4px 0 6px; font-size: 1.02rem; }
.pf-actions { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pf-actions form { margin: 0; }

/* identity step on the signing page + staff evidence */
.idv { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; background: var(--surface); }
.idv.is-done { border-color: var(--green); }
.idv h3 { margin: 0 0 4px; font-size: 1.02rem; }
.idv-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.idv-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.idv-step strong { display: block; font-size: .93rem; }
.idv-step small { color: var(--muted); }
.idv-ico { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); }
.idv-step.done .idv-ico { background: var(--green-soft); color: var(--green); }
.idv-note { margin: 10px 0 0; font-size: .86rem; color: var(--muted); }
.idv-note.warn { color: var(--amber); }
.idv-error { margin-top: 10px; }
.idv-evidence { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.idv-evidence a { display: block; text-align: center; color: var(--muted); }
.idv-evidence img { width: 100%; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-3); }
.idv-review { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.idv-review .input { flex: 1 1 140px; }

/* Sami: SamNet's animated illustrations */
.illus { display: block; width: 100%; max-width: 320px; height: auto; margin-inline: auto; overflow: visible; }
.illus-sm { max-width: 190px; margin-bottom: 8px; }
.illus * { transform-box: fill-box; }
.il-paper { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.5; }
.il-line, .il-handle { fill: none; stroke: var(--line-2); stroke-width: 4; stroke-linecap: round; }
.il-handle { stroke: var(--ink); stroke-width: 8; }
.il-glass { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: var(--ink); stroke-width: 6; }
.il-accent, .il-bar, .il-sun { fill: var(--accent); }
.il-bar { transform-origin: bottom; animation: il-grow 2.6s ease-in-out infinite alternate; }
.il-bar.b2 { animation-delay: .25s; } .il-bar.b3 { animation-delay: .5s; } .il-bar.b4 { animation-delay: .75s; }
.il-hill { fill: var(--surface-3); stroke: var(--line-2); }
.il-stripe { fill: rgba(0,0,0,.28); }
.il-chip, .il-dot, .il-hole { fill: #fff; }
.il-dot { animation: il-bounce 1.2s ease-in-out infinite; }
.il-dot.d2 { animation-delay: .15s; } .il-dot.d3 { animation-delay: .3s; }
.il-gear { fill: var(--line-2); stroke: var(--ink); stroke-width: 10; stroke-dasharray: 9 7; }
.il-q { fill: #fff; font: 700 48px var(--font); }
.il-sign { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: il-draw 4.5s ease-in-out infinite; }
.il-stamp circle { fill: var(--green-soft); stroke: var(--green); stroke-width: 2.5; }
.il-stamp path { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.il-stamp { transform-origin: center; animation: il-stamp 4.5s ease-in-out infinite; }
.il-robot { animation: il-bob 4.2s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(12,12,24,.16)); }
.il-shell { stroke: rgba(18,20,34,.14); stroke-width: 1; }
.il-arm { fill: none; stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 1px 0 rgba(18,20,34,.18)); }
.il-tip { stroke: rgba(18,20,34,.16); stroke-width: 1; }
.il-tip-led { fill: var(--accent); }
.il-wave { transform-box: view-box; transform-origin: 118px 138px; animation: il-wave 1.9s ease-in-out infinite alternate; }
.il-head { transform-box: view-box; transform-origin: 160px 112px; animation: il-tilt 7s ease-in-out infinite; }
.il-thrust { transform-origin: center; animation: il-thrust 2.1s ease-in-out infinite; }
.il-shadow { transform-origin: center; animation: il-shadow 4.2s ease-in-out infinite; }
.il-beacon { fill: var(--accent-2); animation: il-pulse 2.2s ease-in-out infinite; transform-origin: center; }
.il-status { fill: var(--accent); transform-origin: center; animation: il-status 2.6s ease-in-out infinite; }
.il-led { fill: color-mix(in srgb, var(--accent-2) 42%, #fff); }
.il-led-line { fill: none; stroke: color-mix(in srgb, var(--accent-2) 42%, #fff); stroke-width: 3.4; stroke-linecap: round; }
.il-smile { stroke-width: 2.6; opacity: .85; }
.il-eye { transform-origin: center; animation: il-blink 5.2s infinite; }
.il-face { animation: il-look 8s ease-in-out infinite; }
.il-mood-search .il-face { animation: il-look-far 4.6s ease-in-out infinite; }
.il-sheen { animation: il-sheen 6.5s ease-in-out infinite; }
.il-float { animation: il-float 4.4s ease-in-out infinite; }
.il-float.d2 { animation-delay: -2s; }
.il-pulse { animation: il-pulse 1.8s ease-in-out infinite; transform-origin: center; }
.il-spin { animation: il-spin 7s linear infinite; }
.il-confetti * { fill: var(--accent); animation: il-confetti 2.6s ease-in infinite; }
.il-confetti .c2, .il-confetti .c5 { fill: var(--green); animation-delay: .4s; } .il-confetti .c3, .il-confetti .c6 { fill: var(--amber); animation-delay: .8s; } .il-confetti .c4 { animation-delay: 1.2s; }
@keyframes il-float { 50% { transform: translateY(-9px); } }
@keyframes il-bob { 50% { transform: translateY(-7px); } }
@keyframes il-shadow { 50% { transform: scale(.84); opacity: .7; } }
@keyframes il-thrust { 50% { transform: scale(.78, .7); opacity: .6; } }
@keyframes il-tilt { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.8deg); } }
@keyframes il-look { 0%, 40%, 100% { transform: none; } 50%, 66% { transform: translateX(4px); } 76%, 88% { transform: translateX(-3px); } }
@keyframes il-look-far { 0%, 100% { transform: translateX(6px); } 50% { transform: translate(7px, -2px); } }
@keyframes il-status { 50% { transform: scaleX(.45); opacity: .55; } }
@keyframes il-sheen { 0%, 62% { transform: skewX(-18deg) translateX(0); } 100% { transform: skewX(-18deg) translateX(130px); } }
@keyframes il-grow { from { transform: scaleY(.55); } }
@keyframes il-bounce { 50% { transform: translateY(-5px); } }
@keyframes il-wave { from { transform: rotate(-5deg); } to { transform: rotate(10deg); } }
@keyframes il-pulse { 50% { transform: scale(1.3); opacity: .7; } }
@keyframes il-blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes il-spin { to { transform: rotate(360deg); } }
@keyframes il-draw { 0% { stroke-dashoffset: 1; } 45%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes il-stamp { 0%, 48% { opacity: 0; transform: scale(1.8); } 56%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes il-confetti { from { transform: translateY(-12px) rotate(0); opacity: 1; } to { transform: translateY(90px) rotate(200deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .illus * { animation: none !important; } .il-sign { stroke-dashoffset: 0; } }
.auth-scene { position: absolute; inset: 0; opacity: .7; }
.auth-art { position: relative; }
.auth-art .illus { max-width: 330px; --ink: #e8e8ee; --surface: #1a1a22; --surface-3: rgba(255,255,255,.07); --line-2: #3a3a46; }
@media (max-width: 860px) { .auth-art { display: none; } }

.scene-wait > :not(.scene-canvas), .scene-ready > :not(.scene-canvas) { visibility: hidden; }
.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .7s; }
.scene-ready > .scene-canvas { opacity: 1; }

.captcha { margin: 4px 0 14px; min-height: 65px; }

/* conversion funnel */
.funnel-row { display: grid; grid-template-columns: 190px 1fr 80px; align-items: center; gap: 12px; }
.funnel-label { font-size: .92rem; font-weight: 600; }
.funnel-row strong { text-align: end; font-variant-numeric: tabular-nums; }
.funnel-track { height: 30px; background: var(--surface-3); border-radius: 8px; overflow: hidden; }
.funnel-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.funnel-drop { margin: 6px 0 6px; padding-inline-start: 202px; font-size: .8rem; color: var(--muted); }
@media (max-width: 640px) { .funnel-row { grid-template-columns: 1fr 60px; } .funnel-track { grid-column: 1 / -1; order: 3; } .funnel-drop { padding-inline-start: 0; } }
