/* CRYPTOR — motion redesign. Every surface moves with intent. */

:root {
    --bg: #05070d;
    --bg-2: #090d16;
    --panel: rgba(146, 160, 193, 0.045);
    --panel-strong: rgba(146, 160, 193, 0.08);
    --border: rgba(146, 160, 193, 0.14);
    --border-soft: rgba(146, 160, 193, 0.09);
    --text: #e7ecf5;
    --muted: #8a93a8;
    --faint: #5b6375;
    --accent: #5b8cff;
    --accent-2: #8f6bff;
    --good: #3ddc97;
    --warn: #ffb454;
    --bad: #ff5c7a;
    --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
    --sans: "Inter", "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
    --radius: 14px;
    --ease: cubic-bezier(0.3, 0.8, 0.2, 1);          /* calm settle */
    --spring: cubic-bezier(0.34, 1.45, 0.4, 1);      /* expressive overshoot */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── backdrop ─────────────────────────────────────────── */
.backdrop {
    position: fixed; inset: 0; z-index: -2; overflow: hidden;
    background: radial-gradient(1200px 700px at 75% -10%, #0c1322 0%, transparent 60%),
                radial-gradient(900px 600px at -10% 110%, #0b0f1d 0%, transparent 55%),
                var(--bg);
}
.backdrop::after {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(146,160,193,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(146,160,193,0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(900px 500px at 50% 0%, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(900px 500px at 50% 0%, black 0%, transparent 75%);
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(100px);
    animation: drift 36s ease-in-out infinite alternate;
}
.orb.a { width: 520px; height: 520px; left: -160px; top: 8%;
         background: var(--accent); opacity: 0.17; }
.orb.b { width: 640px; height: 640px; right: -200px; top: 40%;
         background: var(--accent-2); opacity: 0.15;
         animation-delay: -14s; animation-duration: 44s; }
@keyframes drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(46px, -34px, 0) scale(1.1); }
    100% { transform: translate3d(84px, -58px, 0) scale(1.18); }
}

::selection { background: rgba(91, 140, 255, 0.35); }

/* ── nav ───────────────────────────────────────────────── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    background: rgba(5, 7, 13, 0.72);
    border-bottom: 1px solid var(--border-soft);
    animation: navDrop 0.8s var(--ease);
}
@keyframes navDrop { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.nav-inner {
    max-width: 1080px; margin: 0 auto; padding: 0 24px;
    height: 62px; display: flex; align-items: center; gap: 28px;
}
.brand {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    font-weight: 600; letter-spacing: 0.32em; font-size: 13px; color: var(--text);
    text-decoration: none; user-select: none;
}
.brand .mark { width: 18px; height: 18px; flex: none; transition: transform 0.6s var(--spring); }
.brand .mark path { stroke: var(--accent); }
.brand:hover .mark { transform: rotate(180deg) scale(1.12); }

.nav-links { display: flex; gap: 4px; flex: 1; position: relative; }
/* the pill glides between tabs */
.nav-links #nav-pill {
    position: absolute; top: 50%; left: 0; height: 33px; width: 0;
    border-radius: 9px; z-index: 0; opacity: 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(91,140,255,0.17), rgba(143,107,255,0.15));
    border: 1px solid rgba(91, 140, 255, 0.4);
    box-shadow: 0 0 18px rgba(91, 140, 255, 0.18);
    transition: transform 0.55s var(--spring), width 0.55s var(--spring), opacity 0.35s;
}
.nav-links a {
    color: var(--muted); text-decoration: none; font-size: 13.5px;
    padding: 7px 13px; border-radius: 8px; position: relative; z-index: 1;
    transition: color 0.3s, transform 0.3s var(--spring);
}
.nav-links a:hover { color: var(--text); transform: translateY(-1px); }
.nav-links a.active { color: var(--text); }

.nav-user { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--faint); }
.nav-user .chip {
    font-family: var(--mono); font-size: 11px; color: var(--muted);
    border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px;
    animation: chipIn 0.5s var(--spring);
}
@keyframes chipIn { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }

/* ── views: directional slide ─────────────────────────── */
main { max-width: 1080px; margin: 0 auto; padding: 108px 24px 90px; display: grid; }
main > .view { grid-area: 1 / 1; }

.view { display: none; }
.view.active { display: block; animation: slideIn 0.65s var(--ease) both; }
.view.leaving { display: block; pointer-events: none; animation: slideOut 0.4s var(--ease) both; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(var(--in, 70px)) scale(0.985); filter: blur(7px); }
    to   { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); filter: blur(0); }
    to   { opacity: 0; transform: translateX(var(--out, -70px)) scale(0.985); filter: blur(7px); }
}

.reveal { opacity: 0; transform: translateY(30px); filter: blur(5px);
          transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.reveal.shown { opacity: 1; transform: translateY(0); filter: blur(0); }

/* ── hero ──────────────────────────────────────────────── */
.hero { text-align: center; padding: 90px 0 70px; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--muted); border: 1px solid var(--border);
    border-radius: 999px; padding: 6px 14px; margin-bottom: 28px;
    background: var(--panel);
    opacity: 0; animation: rise 0.7s var(--ease) 0.1s forwards;
}
.hero .eyebrow .dot { width: 5px; height: 5px; border-radius: 50%;
    background: var(--good); box-shadow: 0 0 8px var(--good);
    animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); }
                   50% { opacity: 0.45; transform: scale(0.7); } }

.hero h1 {
    font-size: clamp(34px, 6vw, 58px); font-weight: 700; letter-spacing: -0.03em;
    line-height: 1.12; max-width: 780px; margin: 0 auto 22px;
}
/* masked word reveal — set up by app.js */
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; }
.hero h1 .wi { display: inline-block; transform: translateY(115%);
               animation: wordUp 0.85s var(--spring) forwards; }
@keyframes wordUp { to { transform: translateY(0); } }

.hero h1 .grad {
    background: linear-gradient(92deg, var(--accent), var(--accent-2), #d9a8ff, var(--accent));
    background-size: 260% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: gradShift 7s ease-in-out infinite alternate;
}
@keyframes gradShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 36px; font-size: 16.5px;
          opacity: 0; animation: rise 0.8s var(--ease) 0.7s forwards; }
.cta-row { display: flex; gap: 14px; justify-content: center;
           opacity: 0; animation: rise 0.8s var(--ease) 0.9s forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* ── buttons: shine sweep + press ──────────────────────── */
.btn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 22px; border-radius: 10px; border: 1px solid transparent;
    font-size: 14px; font-weight: 600; font-family: var(--sans);
    cursor: pointer; text-decoration: none; color: #fff;
    transition: transform 0.35s var(--spring), box-shadow 0.35s, border-color 0.35s, color 0.3s;
}
.btn svg { width: 15px; height: 15px; transition: transform 0.35s var(--spring); }
.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 4px 22px rgba(91, 140, 255, 0.35);
}
.btn.primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 34px rgba(91, 140, 255, 0.5); }
.btn.primary:hover svg { transform: translateX(3px); }
.btn.primary:active { transform: translateY(0) scale(0.97); }
.btn.primary::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.38) 50%, transparent 60%);
    transform: translateX(-130%); pointer-events: none;
}
.btn.primary:hover::after { animation: shine 0.9s ease; }
@keyframes shine { to { transform: translateX(130%); } }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn.small { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }
.btn.danger { background: transparent; border-color: rgba(255, 92, 122, 0.35); color: var(--bad); }
.btn.danger:hover { background: rgba(255, 92, 122, 0.08); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ── features ──────────────────────────────────────────── */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.feature {
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel), transparent 140%);
    padding: 22px 22px 20px;
    opacity: 0; transform: translateY(34px);
    animation: featIn 0.8s var(--ease) forwards;
    transition: transform 0.45s var(--spring), border-color 0.45s, box-shadow 0.45s;
}
.feature:nth-child(1) { animation-delay: 1.05s; }
.feature:nth-child(2) { animation-delay: 1.25s; }
.feature:nth-child(3) { animation-delay: 1.45s; }
@keyframes featIn { to { opacity: 1; transform: translateY(0); } }
.feature:hover { transform: translateY(-6px) scale(1.015); border-color: var(--border);
                 box-shadow: 0 18px 44px rgba(0,0,0,0.35); }
.feature svg { width: 20px; height: 20px; margin-bottom: 14px; }
.feature svg path { stroke: var(--accent); }
.feature h3 { font-size: 14.5px; margin-bottom: 6px; font-weight: 600; }
.feature p { font-size: 13px; color: var(--muted); }

/* ── section headers ───────────────────────────────────── */
.section-head { text-align: center; margin: 84px 0 38px; }
.section-head h2 { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); margin-top: 8px; font-size: 14.5px; }

/* ── pricing ───────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan {
    position: relative; display: flex; flex-direction: column;
    border: 1px solid var(--border-soft); border-radius: 16px; padding: 28px 26px 24px;
    background: linear-gradient(180deg, var(--panel), transparent 160%);
    opacity: 0; transform: translateY(38px) scale(0.97);
    animation: planIn 0.85s var(--spring) forwards;
    transition: transform 0.5s var(--spring), border-color 0.5s, box-shadow 0.5s;
}
.plan:nth-child(1) { animation-delay: 0.1s; }
.plan:nth-child(2) { animation-delay: 0.26s; }
.plan:nth-child(3) { animation-delay: 0.42s; }
@keyframes planIn { to { opacity: 1; transform: translateY(0) scale(1); } }
.plan:hover { transform: translateY(-8px) scale(1.015); border-color: var(--border);
              box-shadow: 0 24px 54px rgba(0,0,0,0.4); }
.plan.popular {
    border-color: rgba(91, 140, 255, 0.45);
    box-shadow: 0 0 0 1px rgba(91, 140, 255, 0.18), 0 18px 50px rgba(91, 140, 255, 0.13);
}
.plan.popular:hover { box-shadow: 0 0 0 1px rgba(91,140,255,.3), 0 26px 64px rgba(91, 140, 255, 0.22); }
.plan .tag {
    position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
    font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    padding: 4px 12px; border-radius: 999px; font-weight: 700;
    animation: tagGlow 2.6s ease-in-out infinite alternate;
}
@keyframes tagGlow { from { box-shadow: 0 0 10px rgba(91,140,255,.4); }
                     to   { box-shadow: 0 0 22px rgba(143,107,255,.6); } }
.plan h3 { font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.plan .price { font-size: 36px; font-weight: 700; margin: 12px 0 2px; letter-spacing: -0.02em; }
.plan .price small { font-size: 13px; color: var(--faint); font-weight: 400; }
.plan ul { list-style: none; margin: 18px 0 26px; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted);
           opacity: 0; animation: liIn 0.5s var(--ease) forwards; }
.plan li:nth-child(1) { animation-delay: 0.55s; }
.plan li:nth-child(2) { animation-delay: 0.68s; }
.plan li:nth-child(3) { animation-delay: 0.81s; }
.plan li:nth-child(4) { animation-delay: 0.94s; }
@keyframes liIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
.plan li svg { width: 14px; height: 14px; margin-top: 3.5px; flex: none; }
.plan li svg path { stroke: var(--good); }
.free-note {
    margin-top: 22px; text-align: center; color: var(--faint); font-size: 13px;
    border: 1px dashed var(--border-soft); border-radius: var(--radius); padding: 16px;
}
.buy-note { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 26px; }
.buy-note a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(91,140,255,.4); }

/* ── cards / panels ────────────────────────────────────── */
.card {
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel), transparent 150%);
    padding: 26px;
    animation: cardIn 0.7s var(--spring) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(0.97); }
                    to   { opacity: 1; transform: translateY(0) scale(1); } }
.card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card .sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

/* ── auth ──────────────────────────────────────────────── */
.auth-wrap { max-width: 460px; margin: 30px auto 0; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 22px; background: var(--panel);
    padding: 4px; border-radius: 10px; border: 1px solid var(--border-soft); }
.auth-tabs button {
    flex: 1; padding: 9px; background: none; border: none; color: var(--muted);
    font-family: var(--sans); font-size: 13.5px; font-weight: 600; cursor: pointer;
    border-radius: 8px; transition: all 0.35s var(--spring); z-index: 1;
}
.auth-tabs button.on { background: var(--bg-2); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px;
    letter-spacing: 0.04em; text-transform: uppercase; }
.field input {
    width: 100%; background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text); border-radius: 10px; padding: 12px 14px; font-size: 14px;
    font-family: var(--mono); transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease);
}
.field input:focus { outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.16); transform: translateY(-1px); }

/* ── key modal ─────────────────────────────────────────── */
.modal-veil {
    position: fixed; inset: 0; z-index: 90; display: none;
    background: rgba(3, 5, 10, 0.78); backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
}
.modal-veil.on { display: flex; animation: fadeIn 0.4s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    width: min(620px, calc(100vw - 40px)); border: 1px solid var(--border);
    border-radius: 18px; background: linear-gradient(180deg, #0d1220, #080b14);
    padding: 30px; animation: modalIn 0.65s var(--spring);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(34px) scale(0.93); }
                     to   { opacity: 1; transform: translateY(0) scale(1); } }
.modal h3 { font-size: 17px; margin-bottom: 6px; }
.modal .warn { color: var(--warn); font-size: 13px; margin: 14px 0 18px;
    display: flex; gap: 9px; align-items: flex-start; }
.modal .warn svg { width: 15px; height: 15px; margin-top: 2px; flex: none; animation: wiggle 2.4s ease-in-out infinite; }
.modal .warn svg path { stroke: var(--warn); }
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(9deg); } 96% { transform: rotate(-8deg); } }
.key-box {
    font-family: var(--mono); font-size: 12.5px; line-height: 1.8;
    background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
    padding: 16px; word-break: break-all; color: var(--accent);
    user-select: all; margin-bottom: 18px;
    background-image: linear-gradient(90deg, var(--bg) 30%, rgba(91,140,255,.16) 50%, var(--bg) 70%);
    background-size: 200% 100%;
    animation: keyScan 1.4s ease .3s backwards;
}
@keyframes keyScan { from { background-position: -200% 0; } to { background-position: 200% 0; } }

/* ── dashboard ─────────────────────────────────────────── */
.dash { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.dash .card:nth-child(2) { animation-delay: 0.12s; }
.plan-badge {
    display: inline-flex; align-items: center; gap: 8px; font-size: 11px;
    letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
    border-radius: 999px; padding: 5px 13px; margin-bottom: 14px;
    animation: chipIn 0.55s var(--spring) 0.15s backwards;
}
.plan-badge.free    { color: var(--muted);  border: 1px solid var(--border); }
.plan-badge.onecrypt{ color: var(--warn);   border: 1px solid rgba(255,180,84,.4); }
.plan-badge.pro     { color: var(--accent); border: 1px solid rgba(91,140,255,.45); }
.plan-badge.cryptor, .plan-badge.admin { color: #d9a8ff; border: 1px solid rgba(217,168,255,.45); }

.stat-row { display: flex; justify-content: space-between; font-size: 13px;
    color: var(--muted); padding: 9px 0; border-bottom: 1px solid var(--border-soft);
    opacity: 0; animation: liIn 0.5s var(--ease) forwards; }
.stat-row:nth-of-type(1) { animation-delay: 0.2s; }
.stat-row:nth-of-type(2) { animation-delay: 0.3s; }
.stat-row:nth-of-type(3) { animation-delay: 0.4s; }
.stat-row:nth-of-type(4) { animation-delay: 0.5s; }
.stat-row:last-child { border-bottom: none; }
.stat-row b { color: var(--text); font-weight: 600; font-family: var(--mono); font-size: 12.5px; }

.meter { height: 6px; border-radius: 4px; background: var(--panel-strong); overflow: hidden; margin: 8px 0 4px; }
.meter > div { height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    background-size: 200% 100%;
    animation: meterFlow 3s ease-in-out infinite alternate;
    transition: width 1.4s var(--ease); }
@keyframes meterFlow { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* ── dropzone: breathing + drag physics ────────────────── */
.dropzone {
    position: relative;
    border: 1.5px dashed var(--border); border-radius: 16px; padding: 46px 30px;
    text-align: center; cursor: pointer; background: var(--panel);
    transition: border-color 0.35s, background 0.35s, transform 0.45s var(--spring), box-shadow 0.4s;
    animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe {
    0%, 100% { border-color: rgba(146, 160, 193, 0.14); }
    50%      { border-color: rgba(146, 160, 193, 0.32); }
}
.dropzone:hover { border-color: rgba(91,140,255,.6); background: rgba(91, 140, 255, 0.06);
    transform: translateY(-2px); box-shadow: 0 14px 40px rgba(91,140,255,0.14);
    animation: none; }
.dropzone.drag { border-color: var(--accent); background: rgba(91, 140, 255, 0.1);
    transform: scale(1.025); box-shadow: 0 0 60px rgba(91, 140, 255, 0.22) inset, 0 18px 50px rgba(91,140,255,.25);
    animation: none; }
.dropzone svg { width: 30px; height: 30px; margin-bottom: 14px;
    transition: transform 0.45s var(--spring);
    animation: floaty 3.2s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.dropzone:hover svg { animation: none; transform: translateY(-4px) scale(1.1); }
.dropzone.drag svg { animation: none; transform: translateY(4px) scale(1.2); }
.dropzone svg path { stroke: var(--accent); }
.dropzone .big { font-size: 15px; font-weight: 600; }
.dropzone .hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }

/* file chip flies in */
.file-chip {
    display: none; align-items: center; gap: 12px; margin-top: 16px;
    border: 1px solid var(--border-soft); border-radius: 12px; padding: 13px 16px;
    background: var(--bg-2); font-size: 13px;
}
.file-chip.on { display: flex; animation: chipFly 0.6s var(--spring); }
@keyframes chipFly { from { opacity: 0; transform: translateY(-18px) scale(0.92); }
                     to   { opacity: 1; transform: translateY(0) scale(1); } }
.file-chip .name { font-family: var(--mono); font-size: 12px; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.file-chip .size { color: var(--faint); font-size: 11.5px; }

/* progress: shimmer rail + cycling stages */
.progress { display: none; margin-top: 16px; }
.progress.on { display: block; animation: chipFly 0.5s var(--ease); }
.progress .bar { height: 5px; border-radius: 3px; overflow: hidden;
    background: var(--panel-strong); position: relative; }
.progress .bar::after {
    content: ""; position: absolute; inset: 0; width: 55%;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
    animation: sweep 2.6s ease-in-out infinite;
}
@keyframes sweep { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
.progress .label { font-size: 12px; color: var(--muted); margin-top: 10px;
    display: flex; align-items: center; gap: 8px; }
.progress .label::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.1s ease-in-out infinite;
}
@keyframes stageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.stage-anim { animation: stageIn 0.45s var(--ease); }

/* result: pop + drawn check */
.result {
    display: none; margin-top: 18px; border: 1px solid rgba(61, 220, 151, 0.25);
    border-radius: 14px; padding: 20px; background: rgba(61, 220, 151, 0.05);
}
.result.on { display: block; animation: resultPop 0.7s var(--spring); }
@keyframes resultPop { from { opacity: 0; transform: scale(0.9) translateY(14px); }
                       60%  { transform: scale(1.02) translateY(0); }
                       to   { opacity: 1; transform: scale(1); } }
.result .head { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 6px; }
.result .head svg { width: 17px; height: 17px; }
.result .head svg path { stroke: var(--good); stroke-dasharray: 26; stroke-dashoffset: 26; }
.result.on .head svg path { animation: drawCheck 0.65s ease 0.18s forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.result .meta { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.result .meta b { color: var(--text); font-family: var(--mono); font-weight: 500; }

.locked { position: relative; overflow: hidden; }
.locked .veil {
    position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 14px;
    background: linear-gradient(180deg, rgba(5,7,13,0.82), rgba(5,7,13,0.94));
    backdrop-filter: blur(7px); border-radius: var(--radius);
}
.locked .veil svg { width: 22px; height: 22px; animation: floaty 3.4s ease-in-out infinite; }
.locked .veil svg path { stroke: var(--warn); }
.locked .veil p { color: var(--muted); font-size: 13.5px; max-width: 320px; text-align: center; }

/* ── admin ─────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { border: 1px solid var(--border-soft); border-radius: 12px; padding: 18px 20px;
    background: linear-gradient(180deg, var(--panel), transparent 150%);
    opacity: 0; transform: translateY(22px) scale(0.96);
    animation: planIn 0.7s var(--spring) forwards;
    transition: transform 0.4s var(--spring), border-color 0.4s; }
.stat:nth-child(1) { animation-delay: 0.05s; }
.stat:nth-child(2) { animation-delay: 0.15s; }
.stat:nth-child(3) { animation-delay: 0.25s; }
.stat:nth-child(4) { animation-delay: 0.35s; }
.stat:hover { transform: translateY(-3px); border-color: var(--border); }
.stat .num { font-size: 26px; font-weight: 700; font-family: var(--mono); letter-spacing: -0.02em; }
.stat .lbl { font-size: 11px; color: var(--faint); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 2px; }

.table-wrap { border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
    text-align: left; padding: 11px 14px; color: var(--faint); font-size: 10.5px;
    letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
    border-bottom: 1px solid var(--border-soft); background: var(--panel);
    white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); color: var(--muted); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.25s, transform 0.3s var(--ease); }
tbody tr:hover { background: var(--panel); }
tbody tr.rowin { opacity: 0; animation: liIn 0.45s var(--ease) forwards; }
td .mono { font-family: var(--mono); font-size: 11.5px; }
td b { color: var(--text); font-weight: 600; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
select.sel {
    background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
    border-radius: 7px; padding: 6px 9px; font-size: 12px; font-family: var(--sans); cursor: pointer;
}
.icon-btn {
    background: none; border: 1px solid var(--border); border-radius: 7px; color: var(--muted);
    padding: 6px 9px; cursor: pointer; font-size: 12px; transition: all 0.25s var(--spring);
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn.del:hover { color: var(--bad); border-color: var(--bad); }

/* ── toast: spring slide with overshoot ───────────────── */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 99;
    display: flex; flex-direction: column; gap: 10px; }
.toast {
    border: 1px solid var(--border); border-left: 3px solid var(--accent);
    background: #0d1220; border-radius: 10px; padding: 13px 18px; font-size: 13.5px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.5);
    animation: toastIn 0.6s var(--spring);
    max-width: 360px;
}
.toast.err { border-left-color: var(--bad); }
.toast.ok  { border-left-color: var(--good); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(110%); }
    70%  { transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.divider { height: 1px; background: var(--border-soft); margin: 22px 0; }

@media (max-width: 860px) {
    .features, .pricing, .stats { grid-template-columns: 1fr; }
    .dash { grid-template-columns: 1fr; }
    .nav-links a { padding: 7px 8px; font-size: 12.5px; }
    .nav-user .chip { display: none; }
}
