:root {
  --navy: #0a192f; --slate: #172a45; --slate-2: #1d3557; --line: #2a4066;
  --text: #f1f5fb; --muted: #94a7c4; --accent: #38bdf8; --accent-2: #3b82f6;
  --ok: #34d399; --danger: #f87171;
  --font: "Inter", "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--navy); min-height: 100vh;
  background-image: radial-gradient(900px 500px at 50% -10%, rgba(59, 130, 246, .14), transparent 70%); background-attachment: fixed;
  animation: pageIn .5s var(--ease) both; transition: opacity .25s ease; }
body.leaving { opacity: 0; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---- navigation ---- */
nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 48px); background: rgba(10, 25, 47, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 700; letter-spacing: .08em; font-size: .9rem; display: flex; align-items: center; gap: 10px; }
.logo::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, .2); }
.links { display: flex; flex-wrap: wrap; gap: 4px; }
.links a, .links button { position: relative; background: none; border: 0; cursor: pointer; font-size: .85rem; font-weight: 500; padding: 9px 14px; border-radius: 6px; color: var(--muted); transition: color .2s, background .2s; }
.links a:hover, .links button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.links a.active { color: var(--accent); background: rgba(56, 189, 248, .1); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.clock { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .08em; color: var(--ok);
  border: 1px solid rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .08); padding: 5px 12px; border-radius: 999px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---- layout ---- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 80px; }
.panel { background: var(--slate); border: 1px solid var(--line); border-radius: 10px; }
.page-title { padding: 48px 0 28px; }
.page-title h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 700; letter-spacing: -.01em; animation: fadeUp .6s var(--ease) both; }
.page-title p { margin-top: 6px; color: var(--muted); animation: fadeUp .6s var(--ease) .08s both; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--accent); } .crumbs a:hover { text-decoration: underline; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sec-head h2 { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sec-head span { font-size: .85rem; color: var(--muted); }

/* ---- buttons / forms ---- */
.btn { display: inline-block; text-align: center; cursor: pointer; font-size: .9rem; font-weight: 600; padding: 11px 20px; border-radius: 7px; border: 1px solid var(--accent-2);
  background: var(--accent-2); color: #fff; transition: background .2s, transform .2s, box-shadow .2s, border-color .2s; }
.btn:hover { background: #2f6fe0; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(59, 130, 246, .3); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); background: rgba(56, 189, 248, .08); box-shadow: none; }
.btn:focus-visible, .links a:focus-visible, .links button:focus-visible, .drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.btn.block { display: block; width: 100%; }

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field input, .field textarea, .field select { width: 100%; background: var(--navy); border: 1px solid var(--line); border-radius: 7px; padding: 11px 13px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, .18); }
.field.bad input { border-color: var(--danger); }
.msg { min-height: 1.3em; margin-bottom: 14px; font-size: .88rem; color: var(--danger); }
.msg.ok { color: var(--ok); }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; font-size: .88rem; font-weight: 500;
  background: var(--slate-2); border: 1px solid var(--accent); padding: 11px 20px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: all .35s var(--ease); max-width: 92vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- dashboard ---- */
.hero { text-align: center; padding: clamp(56px, 9vw, 110px) 0 48px; }
.hero h1 { font-size: clamp(2rem, 5.6vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; animation: fadeUp .7s var(--ease) both; }
.hero .sub { margin-top: 18px; color: var(--accent); font-weight: 600; letter-spacing: .12em; font-size: .9rem; animation: fadeUp .7s var(--ease) .1s both; }
.hero .note { margin-top: 10px; color: var(--muted); animation: fadeUp .7s var(--ease) .2s both; }
.hero .cta { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; animation: fadeUp .7s var(--ease) .3s both; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat { padding: 22px; animation: fadeUp .7s var(--ease) both; transition: transform .3s var(--ease), border-color .3s; }
.stat:nth-child(1) { animation-delay: .35s; } .stat:nth-child(2) { animation-delay: .45s; } .stat:nth-child(3) { animation-delay: .55s; } .stat:nth-child(4) { animation-delay: .65s; }
.stat:hover { transform: translateY(-3px); border-color: var(--accent); }
.stat small { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.stat strong { display: block; margin-top: 6px; font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .bar { height: 3px; margin-top: 14px; border-radius: 2px; background: rgba(56, 189, 248, .15); overflow: hidden; }
.stat .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1.4s var(--ease) .6s; }

/* ---- cinematic hero ---- */
#net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body[data-page="index"] .wrap { position: relative; z-index: 1; }
.hero-cine { position: relative; padding: clamp(72px, 12vw, 150px) 0 64px; overflow: hidden; }
.hero-cine .eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .22em; font-size: .75rem; animation: fadeUp .7s var(--ease) both; }
.hero-cine h1 { margin-top: 22px; min-height: 1.2em; font-size: clamp(2rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: .04em; text-shadow: 0 0 40px rgba(56, 189, 248, .25); }
.caret { display: inline-block; width: .08em; height: .95em; margin-left: .08em; vertical-align: -.08em; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-cine .sub { margin-top: 20px; color: var(--text); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; font-size: .85rem; }
.radar { position: absolute; left: 50%; top: 50%; width: min(620px, 120vw); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: -1;
  background: repeating-radial-gradient(circle, transparent 0 59px, rgba(56, 189, 248, .09) 60px 61px);
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%); mask-image: radial-gradient(circle, #000 30%, transparent 70%); }
.radar i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(56, 189, 248, .22), transparent 22%); animation: sweep 7s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }

/* ---- file grid ---- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.toolbar input { width: min(360px, 100%); background: var(--slate); border: 1px solid var(--line); border-radius: 7px; padding: 10px 13px; outline: none; transition: border-color .2s, box-shadow .2s; }
.toolbar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, .18); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { padding: 22px; display: flex; flex-direction: column; gap: 12px; opacity: 0; animation: fadeUp .6s var(--ease) forwards; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.card h3 { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.card p { color: var(--muted); font-size: .92rem; flex: 1; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .75rem; color: var(--muted); letter-spacing: .06em; }
.level { color: var(--accent); font-weight: 600; border: 1px solid rgba(56, 189, 248, .4); background: rgba(56, 189, 248, .08); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags span { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); padding: 2px 9px; border-radius: 4px; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty a { color: var(--accent); }

/* ---- upload ---- */
.xfer { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.xfer > .panel { padding: 24px; animation: fadeUp .6s var(--ease) both; }
.xfer > .panel + .panel { animation-delay: .1s; }
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 6px; min-height: 240px; padding: 28px 20px; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 10px; background: var(--navy); transition: border-color .25s, background .25s, transform .25s var(--ease); }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(56, 189, 248, .05); }
.drop.over { transform: scale(1.01); }
.drop svg { width: 46px; height: 46px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop strong { font-weight: 600; }
.drop small { color: var(--muted); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chosen { display: none; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--navy); }
.chosen.show { display: block; animation: fadeUp .4s var(--ease) both; }
.chosen .row { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.chosen .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chosen .row span:last-child { color: var(--muted); flex: none; }
.track { height: 6px; margin-top: 10px; border-radius: 3px; background: rgba(56, 189, 248, .15); overflow: hidden; }
.track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .2s linear; }
.success { display: none; text-align: center; padding: 8px 0; }
.success.show { display: block; animation: fadeUp .5s var(--ease) both; }
.success h3 { color: var(--ok); font-size: 1.15rem; margin-bottom: 6px; }
.success p { color: var(--muted); font-size: .9rem; margin-bottom: 18px; overflow-wrap: anywhere; }
.success .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hide { display: none !important; }

/* ---- dossier ---- */
.dossier { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dossier .panel { padding: 26px; animation: fadeUp .6s var(--ease) both; }
.dossier .panel + .panel { animation-delay: .1s; }
.dossier h2 { font-size: 1.15rem; margin-bottom: 4px; overflow-wrap: anywhere; }
.desc { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 12px; }
.status { display: inline-block; margin-top: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .08em; padding: 3px 11px; border-radius: 999px; color: var(--ok); border: 1px solid rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .08); }
dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; font-size: .92rem; }
dt { color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; align-self: center; }
dd { overflow-wrap: anywhere; }
dd.mono { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; }
.dl-box .btn { padding: 15px 20px; }
.dl-box small { display: block; margin-top: 10px; text-align: center; color: var(--muted); font-size: .8rem; }

/* ---- login ---- */
.auth { min-height: calc(100vh - 130px); display: grid; place-items: center; padding: 40px 0; }
.auth-box { width: min(420px, 100%); padding: 32px 28px; animation: fadeUp .6s var(--ease) both; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.auth-box h1 { font-size: 1.4rem; margin-bottom: 4px; }
.auth-box > p { color: var(--muted); margin-bottom: 24px; font-size: .92rem; }
.auth-box.denied { animation: shake .4s ease both; border-color: var(--danger); }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

@media (max-width: 900px) { .xfer, .dossier { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .clock { display: none; } .links a, .links button { padding: 8px 10px; font-size: .8rem; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---- landing page ---- */
body[data-page="index"] { overflow-x: hidden; }
.hero-cine .lede { max-width: 640px; margin: 14px auto 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.block { padding: clamp(48px, 8vw, 96px) 0 0; }
.hero-cine + .block { padding-top: 0; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem !important; }
.live b { color: var(--ok); letter-spacing: .12em; }
.live em { font-style: normal; color: var(--muted); }
.kicker { color: var(--accent); font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.title { margin: 10px 0 32px; font-size: clamp(1.5rem, 3.6vw, 2.4rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; max-width: 22em; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.prose p { color: var(--muted); margin-bottom: 16px; font-size: 1.02rem; }
.pillars { list-style: none; display: grid; gap: 12px; }
.pillars li { padding: 16px 18px; display: grid; gap: 2px; }
.pillars b { color: var(--accent); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.pillars span { color: var(--muted); font-size: .92rem; }
.info-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.info-grid figure { padding: 20px; }
.info-grid svg { width: 100%; height: auto; display: block; }
figcaption { margin-top: 12px; text-align: center; color: var(--muted); font-size: .78rem; letter-spacing: .08em; }
.flow .lines path { stroke-dasharray: 5 6; animation: dash 1.6s linear infinite; opacity: .55; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.flow .src rect { fill: var(--navy); stroke: var(--line); }
.flow .out rect { fill: rgba(52, 211, 153, .08); stroke: rgba(52, 211, 153, .5); }
.flow text { fill: var(--text); }
.flow .core { fill: var(--slate-2); stroke: var(--accent); stroke-width: 2; }
.flow .core-ring { fill: none; stroke: var(--accent); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: ring 3s ease-out infinite; }
@keyframes ring { from { transform: scale(.8); opacity: .6; } to { transform: scale(1.15); opacity: 0; } }
.flow .core-t { font-size: 11px; font-weight: 700; letter-spacing: .08em; fill: var(--accent); }
.radar-chart .shape { transform-box: fill-box; transform-origin: center; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.93); } }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.feature { padding: 26px; transition: transform .3s var(--ease), border-color .3s; }
.feature:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature svg { width: 36px; height: 36px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 16px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .93rem; }
.site-foot { position: relative; z-index: 1; margin-top: clamp(64px, 9vw, 110px); border-top: 1px solid var(--line); background: rgba(10, 25, 47, .92); padding: 40px clamp(16px, 4vw, 48px) 28px; }
.foot-in { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.foot-brand { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; max-width: 340px; }
.foot-brand p { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-content: flex-start; }
.foot-links a { color: var(--muted); font-size: .9rem; transition: color .2s; }
.foot-links a:hover { color: var(--accent); }
.foot-contact { flex-basis: 100%; color: var(--muted); font-size: .85rem; }
.disclaimer { max-width: 1200px; margin: 24px auto 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; line-height: 1.6; }
@media (max-width: 900px) { .about-grid, .info-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .flow .lines path, .flow .core-ring, .radar-chart .shape { animation: none; } }
