/* LogSync design system: soft gradients, glass surfaces, calm motion. Logical properties everywhere, so Arabic (RTL) is a mirror, not a rewrite. */
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cairo'; src: url('../fonts/cairo-arabic.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --bg: #080b16; --bg2: #0e1326; --surface: rgba(255,255,255,.055); --surface-2: rgba(255,255,255,.09); --line: rgba(255,255,255,.11);
  --text: #eef1ff; --muted: #9aa3c7; --faint: #6b7499;
  --a1: #7c5cff; --a2: #22d3ee; --a3: #f472b6;
  --ok: #34d399; --warn: #fbbf24; --bad: #fb7185; --info: #60a5fa;
  --r: 22px; --r-s: 14px; --shadow: 0 18px 50px -12px rgba(0,0,0,.55); --glow: 0 0 0 1px var(--line), 0 18px 50px -18px rgba(124,92,255,.45);
  --ease: cubic-bezier(.22,.9,.28,1); --font: 'Inter', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 68px; --top-h: 62px; color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f6ff; --bg2: #e9edfd; --surface: rgba(255,255,255,.72); --surface-2: rgba(255,255,255,.95); --line: rgba(30,40,90,.12);
  --text: #141a38; --muted: #565f86; --faint: #8a92b4; --shadow: 0 18px 44px -14px rgba(60,70,140,.28); --glow: 0 0 0 1px var(--line), 0 18px 44px -18px rgba(124,92,255,.35); color-scheme: light;
}
@media (prefers-color-scheme: light) { :root:not([data-theme]) {
  --bg: #f4f6ff; --bg2: #e9edfd; --surface: rgba(255,255,255,.72); --surface-2: rgba(255,255,255,.95); --line: rgba(30,40,90,.12);
  --text: #141a38; --muted: #565f86; --faint: #8a92b4; --shadow: 0 18px 44px -14px rgba(60,70,140,.28); --glow: 0 0 0 1px var(--line), 0 18px 44px -18px rgba(124,92,255,.35); color-scheme: light; } }

/* eight card gradients, picked per profile */
[data-g="0"] { --g1: #22d3ee; --g2: #7c5cff; --g3: #c084fc; }
[data-g="1"] { --g1: #fb923c; --g2: #f43f5e; --g3: #c026d3; }
[data-g="2"] { --g1: #38bdf8; --g2: #2563eb; --g3: #4f46e5; }
[data-g="3"] { --g1: #4ade80; --g2: #0d9488; --g3: #0284c7; }
[data-g="4"] { --g1: #a78bfa; --g2: #ec4899; --g3: #f97316; }
[data-g="5"] { --g1: #fde047; --g2: #f97316; --g3: #ef4444; }
[data-g="6"] { --g1: #fb7185; --g2: #e11d48; --g3: #7c3aed; }
[data-g="7"] { --g1: #5eead4; --g2: #3b82f6; --g3: #8b5cf6; }
.grad { background: linear-gradient(135deg, var(--g1, var(--a2)), var(--g2, var(--a1)) 60%, var(--g3, var(--a3))); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:lang(ar) body, [lang="ar"] body { font-family: 'Cairo', 'Inter', system-ui, sans-serif; line-height: 1.65; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 750; letter-spacing: -.02em; line-height: 1.12; }
h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.02rem; font-weight: 650; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .86rem; } .tiny { font-size: .76rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--a2); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in oklab, var(--a1) 55%, transparent); }
.num { font-variant-numeric: tabular-nums; }

/* ambient background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 700px at 80% -10%, color-mix(in oklab, var(--a1) 22%, transparent), transparent 60%), radial-gradient(900px 600px at -10% 110%, color-mix(in oklab, var(--a2) 18%, transparent), transparent 60%), var(--bg); }
.bg i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .35; animation: drift 28s ease-in-out infinite alternate; }
.bg i:nth-child(1) { background: var(--a1); inset-inline-start: -12vmax; top: -14vmax; }
.bg i:nth-child(2) { background: var(--a2); inset-inline-end: -16vmax; bottom: -18vmax; animation-duration: 36s; animation-delay: -9s; opacity: .26; }
.bg i:nth-child(3) { background: var(--a3); inset-inline-end: 12vmax; top: 22vmax; width: 26vmax; height: 26vmax; animation-duration: 42s; opacity: .14; }
@keyframes drift { to { transform: translate3d(7vmax, 5vmax, 0) scale(1.12); } }

/* shell */
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding-inline: max(16px, env(safe-area-inset-left)); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); background: color-mix(in oklab, var(--bg) 62%, transparent); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 1.12rem; }
.brand .mark { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--a2), var(--a1) 60%, var(--a3)); box-shadow: 0 8px 22px -6px var(--a1); color: #fff; }
.spacer { flex: 1; }
.main { width: min(1120px, 100%); margin-inline: auto; padding: 22px max(16px, env(safe-area-inset-left)) calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); min-height: calc(100dvh - var(--top-h)); }
.nav { position: fixed; z-index: 30; inset-inline: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: flex; justify-content: space-around; align-items: center; backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); background: color-mix(in oklab, var(--bg) 70%, transparent); border-top: 1px solid var(--line); }
.nav a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 12px; border-radius: 16px; color: var(--muted); font-size: .72rem; font-weight: 600; transition: color .25s, transform .25s var(--ease); }
.nav a.on { color: var(--text); } .nav a.on svg { color: var(--a2); filter: drop-shadow(0 0 8px color-mix(in oklab, var(--a2) 70%, transparent)); }
.nav a:active { transform: scale(.92); }
.nav .fab { transform: translateY(-16px); width: 62px; height: 62px; padding: 0; border-radius: 22px; place-items: center; color: #fff; background: linear-gradient(135deg, var(--a2), var(--a1) 65%, var(--a3)); box-shadow: 0 14px 30px -8px var(--a1), 0 0 0 5px color-mix(in oklab, var(--bg) 80%, transparent); }
.nav .fab svg { color: #fff !important; filter: none !important; }
.badge { position: absolute; top: 2px; inset-inline-end: 6px; min-width: 18px; height: 18px; padding-inline: 5px; border-radius: 9px; background: var(--a3); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; }
@media (min-width: 1024px) {
  .nav { inset-inline: auto; inset-block: var(--top-h) 0; inset-inline-start: 0; width: 92px; height: auto; flex-direction: column; justify-content: flex-start; gap: 6px; padding-top: 18px; border-top: 0; border-inline-end: 1px solid var(--line); }
  .nav .fab { transform: none; width: 54px; height: 54px; margin-block: 6px; box-shadow: 0 14px 30px -10px var(--a1); }
  .main { padding-inline-start: 124px; padding-bottom: 60px; }
  .nav.hidden-d ~ .main { padding-inline-start: max(16px, env(safe-area-inset-left)); }
}
.noshell .nav, .noshell .top { display: none; } .noshell .main { padding-inline-start: max(16px, env(safe-area-inset-left)); padding-bottom: 24px; }

/* surfaces */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.card.tight { padding: 12px 14px; }
.card.hover { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; cursor: pointer; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--glow); border-color: color-mix(in oklab, var(--a1) 45%, var(--line)); }
.card.hover:active { transform: scale(.985); }
.stack { display: grid; gap: 14px; } .row { display: flex; align-items: center; gap: 10px; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .end { justify-content: flex-end; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }

/* gradient profile card */
.pcard { position: relative; overflow: hidden; border-radius: var(--r); padding: 20px; color: #fff; min-height: 164px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; background: linear-gradient(135deg, var(--g1), var(--g2) 62%, var(--g3)); box-shadow: 0 22px 44px -22px var(--g2); transition: transform .4s var(--ease), box-shadow .4s var(--ease); isolation: isolate; }
.pcard::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px 220px at 90% -20%, rgba(255,255,255,.34), transparent 60%), radial-gradient(300px 200px at 0% 120%, rgba(0,0,0,.28), transparent 70%); }
.pcard::after { content: ''; position: absolute; inset-inline-end: -40px; bottom: -50px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255,255,255,.12); z-index: -1; }
a.pcard:hover, .pcard.hover:hover { transform: translateY(-4px) scale(1.012); box-shadow: 0 30px 56px -22px var(--g2); }
.pcard h3 { font-size: 1.22rem; font-weight: 750; letter-spacing: -.01em; text-shadow: 0 1px 14px rgba(0,0,0,.18); }
.pcard .sub { opacity: .9; font-size: .88rem; }
.pcard .pill { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.26); color: #fff; }
.pcard.big { min-height: 210px; padding: 26px; } .pcard.big h3 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: .78rem; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.bad { color: var(--bad); } .pill.info { color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 750; color: #fff; background: linear-gradient(135deg, var(--a2), var(--a1)); overflow: hidden; background-size: cover; background-position: center; }
.avatar.s { width: 30px; height: 30px; font-size: .8rem; } .avatar.l { width: 56px; height: 56px; font-size: 1.2rem; }

/* buttons and forms */
.btn { --b: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--b); font-weight: 650; cursor: pointer; transition: transform .2s var(--ease), box-shadow .25s, background .25s, opacity .2s; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:hover { box-shadow: 0 8px 22px -10px rgba(0,0,0,.5); transform: translateY(-1px); } .btn:active { transform: scale(.96); }
.btn.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--a2), var(--a1) 62%, var(--a3)); background-size: 140% 140%; box-shadow: 0 14px 30px -12px var(--a1); }
.btn.primary:hover { background-position: 100% 0; box-shadow: 0 18px 34px -12px var(--a1); }
.btn.ghost { background: transparent; } .btn.danger { color: var(--bad); } .btn.small { min-height: 36px; padding: 6px 13px; font-size: .88rem; border-radius: 12px; } .btn.icon { padding: 0; width: 44px; } .btn.icon.small { width: 36px; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn.busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.field { display: grid; gap: 6px; } .field > label, .lbl { font-size: .82rem; font-weight: 650; color: var(--muted); }
.in { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.in:focus { border-color: var(--a2); box-shadow: 0 0 0 4px color-mix(in oklab, var(--a2) 22%, transparent); background: var(--surface-2); }
textarea.in { min-height: 96px; resize: vertical; } select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-inline-end: 38px; }
[dir="rtl"] select.in { background-position: 20px 55%, 14px 55%; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 12px; font-weight: 650; color: var(--muted); cursor: pointer; transition: color .25s, background .3s var(--ease); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 8px 20px -10px var(--a1); }
.switch { position: relative; width: 50px; height: 30px; flex: none; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; transition: background .3s; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: transform .3s var(--ease); }
.switch[aria-checked="true"] { background: linear-gradient(135deg, var(--a2), var(--a1)); border-color: transparent; } .switch[aria-checked="true"]::after { transform: translateX(20px); } [dir="rtl"] .switch[aria-checked="true"]::after { transform: translateX(-20px); }
.themes { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; } .themes button { aspect-ratio: 1; border-radius: 14px; border: 2px solid transparent; cursor: pointer; transition: transform .25s var(--ease), border-color .2s; } .themes button.on { border-color: var(--text); transform: scale(1.08); }
.opts { display: grid; gap: 8px; } .opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; text-align: start; width: 100%; }
.opt.on { border-color: var(--a2); background: color-mix(in oklab, var(--a2) 12%, var(--surface)); } .opt:active { transform: scale(.985); } .opt b { display: block; } .opt span { color: var(--muted); font-size: .85rem; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; } .check input { accent-color: var(--a1); width: 18px; height: 18px; }

/* tabs, lists */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-block: 20px 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; border: 0; background: none; padding: 12px 14px; color: var(--muted); font-weight: 650; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; transition: color .25s; }
.tabs button.on { color: var(--text); } .tabs button.on::after { content: ''; position: absolute; inset-inline: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--a2), var(--a1)); animation: grow .35s var(--ease); }
@keyframes grow { from { transform: scaleX(0); } }
.list { display: grid; gap: 10px; } .item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.item .grow { flex: 1; min-width: 0; } .item .t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; } .item.rej { opacity: .6; } .item.rej .t { text-decoration: line-through; }
.day { margin: 18px 4px 8px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); display: grid; gap: 12px; justify-items: center; } .empty .ico { width: 76px; height: 76px; border-radius: 26px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--a2); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(2deg); } }
.stat { display: grid; gap: 4px; } .stat b { font-size: 1.9rem; letter-spacing: -.02em; font-weight: 800; background: linear-gradient(135deg, var(--a2), var(--a1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ring { --v: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--v) * 1%), rgba(255,255,255,.25) 0); position: relative; flex: none; }
.ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: rgba(8,11,22,.35); backdrop-filter: blur(6px); } .ring b { position: relative; font-size: 1.15rem; }
.bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--a2), var(--a1)); transition: width .8s var(--ease); }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; } table.t th { text-align: start; color: var(--faint); font-weight: 650; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; } table.t td { padding: 10px; border-top: 1px solid var(--line); }
.scroll-x { overflow-x: auto; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in oklab, var(--a1) 22%, transparent), color-mix(in oklab, var(--a2) 14%, transparent)); }
.banner.warn { background: color-mix(in oklab, var(--warn) 16%, transparent); }

/* hero (signed out) */
.hero { min-height: calc(100dvh - 40px); display: grid; align-content: center; justify-items: center; text-align: center; gap: 22px; padding-block: 40px; }
.hero h1 { font-size: clamp(2.3rem, 8vw, 4.6rem); max-width: 14ch; } .hero p { max-width: 46ch; color: var(--muted); font-size: 1.08rem; }
.gtext { background: linear-gradient(120deg, var(--a2), var(--a1) 45%, var(--a3), var(--a2)); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 9s linear infinite; }
@keyframes sheen { to { background-position: 250% 0; } }
.features { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); width: min(960px, 100%); text-align: start; margin-top: 14px; }
.features .card .ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; margin-bottom: 10px; background: linear-gradient(135deg, var(--a2), var(--a1)); }

/* sheets, toasts, overlays */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(4,6,14,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; align-items: end; justify-items: center; animation: fade .25s both; }
.sheet { width: min(560px, 100%); max-height: 92dvh; overflow: auto; border-radius: 28px 28px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); background: color-mix(in oklab, var(--bg2) 94%, transparent); border: 1px solid var(--line); border-bottom: 0; box-shadow: var(--shadow); animation: sheet-in .45s var(--ease) both; }
.sheet.wide { width: min(760px, 100%); } .sheet .grab { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: -10px auto 14px; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 28px; border-bottom: 1px solid var(--line); max-height: 88dvh; animation-name: pop-in; } .sheet .grab { display: none; } }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } } @keyframes pop-in { from { transform: scale(.94) translateY(12px); opacity: 0; } } @keyframes fade { from { opacity: 0; } }
.scrim.out { animation: fade .2s reverse both; } .scrim.out .sheet { animation: sheet-out .22s var(--ease) both; } @keyframes sheet-out { to { transform: translateY(30px); opacity: 0; } }
.toasts { position: fixed; z-index: 120; inset-inline: 0; top: calc(var(--top-h) + 8px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: 14px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(460px, 100%); padding: 12px 16px; border-radius: 16px; font-weight: 600; background: color-mix(in oklab, var(--bg2) 92%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(16px); animation: toast-in .5s var(--ease) both; }
.toast.ok svg { color: var(--ok); } .toast.bad svg { color: var(--bad); } .toast.warn svg { color: var(--warn); } .toast.out { animation: toast-out .3s ease both; }
@keyframes toast-in { from { transform: translateY(-16px) scale(.96); opacity: 0; } } @keyframes toast-out { to { transform: translateY(-10px); opacity: 0; } }

/* page + stagger transitions */
.view { animation: rise .55s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.st > * { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.st > *:nth-child(1) { --i: 0 } .st > *:nth-child(2) { --i: 1 } .st > *:nth-child(3) { --i: 2 } .st > *:nth-child(4) { --i: 3 } .st > *:nth-child(5) { --i: 4 } .st > *:nth-child(6) { --i: 5 } .st > *:nth-child(n+7) { --i: 6 }
.step-in { animation: step-in .45s var(--ease) both; } @keyframes step-in { from { opacity: 0; transform: translateX(26px); } } [dir="rtl"] .step-in { animation-name: step-in-r; } @keyframes step-in-r { from { opacity: 0; transform: translateX(-26px); } }
.skel { border-radius: var(--r); min-height: 130px; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; } @keyframes shimmer { to { background-position: -220% 0; } }
.flip { } [dir="rtl"] .flip { transform: scaleX(-1); }

/* QR and scanner */
.qrbox { display: grid; justify-items: center; gap: 14px; text-align: center; } .qrbox canvas { width: min(300px, 80vw); height: auto; border-radius: 28px; box-shadow: var(--shadow); background: #fff; animation: pop-in .6s var(--ease) both; }
.qrbox.live canvas { transition: opacity .3s; } .count { --p: 100; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: conic-gradient(var(--a2) calc(var(--p) * 1%), var(--surface-2) 0); position: relative; } .count::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg2); } .count span { position: relative; }
.scan { position: fixed; inset: 0; z-index: 70; background: #000; display: grid; overflow: hidden; }
.scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan .shade { position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%, transparent 0 28%, rgba(0,0,0,.62) 52%); pointer-events: none; }
.scan .frame { position: absolute; top: 46%; inset-inline-start: 50%; width: min(66vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
[dir="rtl"] .scan .frame { transform: translate(50%, -50%); }
.scan .frame i { position: absolute; width: 38px; height: 38px; border: 4px solid #fff; border-radius: 12px; animation: breathe 2.2s ease-in-out infinite; }
.scan .frame i:nth-child(1) { top: 0; inset-inline-start: 0; border-inline-end: 0; border-bottom: 0; } .scan .frame i:nth-child(2) { top: 0; inset-inline-end: 0; border-inline-start: 0; border-bottom: 0; } .scan .frame i:nth-child(3) { bottom: 0; inset-inline-start: 0; border-inline-end: 0; border-top: 0; } .scan .frame i:nth-child(4) { bottom: 0; inset-inline-end: 0; border-inline-start: 0; border-top: 0; }
.scan .frame::after { content: ''; position: absolute; inset-inline: 8%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--a2), transparent); box-shadow: 0 0 18px var(--a2); animation: sweep 2.4s ease-in-out infinite; }
@keyframes sweep { 0%, 100% { top: 6%; } 50% { top: 92%; } } @keyframes breathe { 50% { opacity: .55; transform: scale(.94); } }
.scan .bar-top { position: absolute; top: max(14px, env(safe-area-inset-top)); inset-inline: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #fff; }
.scan .bar-bot { position: absolute; bottom: max(22px, env(safe-area-inset-bottom)); inset-inline: 16px; display: grid; gap: 12px; justify-items: center; color: #fff; text-align: center; }
.scan .glass { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(14px); color: #fff; }
.result { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 6px 0 4px; } .result .big { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #fff; animation: pop-in .55s var(--ease) both; }
.result .big.ok { background: linear-gradient(135deg, #34d399, #0ea5e9); box-shadow: 0 0 0 10px color-mix(in oklab, var(--ok) 18%, transparent); } .result .big.warn { background: linear-gradient(135deg, #fbbf24, #f97316); } .result .big.bad { background: linear-gradient(135deg, #fb7185, #e11d48); } .result .big.info { background: linear-gradient(135deg, #60a5fa, #7c5cff); }
.result .big svg path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .6s .25s var(--ease) forwards; } @keyframes draw { to { stroke-dashoffset: 0; } }
.passcard { width: min(380px, 100%); margin-inline: auto; padding: 26px 22px; border-radius: 30px; color: #fff; display: grid; justify-items: center; gap: 16px; background: linear-gradient(145deg, var(--g1), var(--g2) 60%, var(--g3)); box-shadow: 0 30px 60px -24px var(--g2); position: relative; overflow: hidden; }
.passcard::before { content: ''; position: absolute; inset: 0; background: radial-gradient(400px 260px at 100% 0, rgba(255,255,255,.35), transparent 60%); } .passcard > * { position: relative; } .passcard canvas { width: 100%; max-width: 270px; height: auto; border-radius: 22px; background: #fff; }
.poster { display: none; }
@media print { body * { visibility: hidden; } .poster, .poster * { visibility: visible; } .poster { display: grid; position: absolute; inset: 0; background: #fff; color: #111; justify-items: center; align-content: center; gap: 22px; text-align: center; } .poster canvas { width: 70vmin; height: auto; } .poster h1 { font-size: 40pt; } .printable, .printable * { visibility: visible; } .printable { position: absolute; inset: 0; background: #fff; color: #111; padding: 16mm; } .no-print { display: none !important; } .bg { display: none; } }
.tip { padding: 10px 12px; border-radius: 12px; background: color-mix(in oklab, var(--a2) 10%, transparent); border: 1px dashed color-mix(in oklab, var(--a2) 40%, var(--line)); font-size: .86rem; color: var(--muted); }
@media (max-width: 520px) { .themes { grid-template-columns: repeat(4, 1fr); } .hide-s { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
