/* MDANI TECH — application theme. Palette mirrors brand-kit/brand-colors.json */
@font-face { font-family: "Orbitron"; src: url("assets/fonts/Orbitron.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("assets/fonts/Exo2.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("assets/fonts/Exo2-Italic.ttf") format("truetype"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --emerald-deep: #031d05;
  --emerald: #0a8f3c;
  --neon: #2bff4f;
  --gold: #e8b923;
  --gold-light: #ffd75e;
  --silver: #d9dde2;
  --black: #020a04;

  --bg: var(--black);
  --text: #eef5f0;
  --muted: #9db4a5;
  --glass: rgba(10, 40, 20, .45);
  --glass-strong: rgba(6, 26, 12, .78);
  --line: rgba(43, 255, 79, .22);
  --line-strong: rgba(43, 255, 79, .55);
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  --silver-grad: linear-gradient(180deg, #fff 0%, #e6eaee 38%, #8e98a2 50%, #f3f5f7 60%, #aeb6bf 100%);
  --gold-grad: linear-gradient(180deg, #fff4b8 0%, #ffd75e 34%, #c08a12 52%, #ffe38a 64%, #a86f0b 100%);
  --font-display: "Exo 2", system-ui, sans-serif;
  --font-tech: "Orbitron", system-ui, sans-serif;
  --font-body: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --sidebar: 264px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- cinematic background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(1100px 700px at 15% -10%, rgba(10,143,60,.35), transparent 60%),
              radial-gradient(900px 600px at 110% 110%, rgba(232,185,35,.12), transparent 60%), var(--black); }
.bg-grid { position: absolute; inset: -50%; opacity: .22;
  background-image: linear-gradient(rgba(43,255,79,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(43,255,79,.18) 1px, transparent 1px);
  background-size: 56px 56px; transform: perspective(700px) rotateX(58deg) translateY(-8%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent); animation: grid 24s linear infinite; }
.bg-glow { position: absolute; width: 60vmax; height: 60vmax; left: 50%; top: 50%; translate: -50% -50%;
  background: radial-gradient(circle, rgba(43,255,79,.10), transparent 60%); animation: breathe 8s ease-in-out infinite; }
@keyframes grid { to { background-position: 0 56px, 0 0; } }
@keyframes breathe { 50% { opacity: .5; scale: 1.1; } }

/* ---------- brand type ---------- */
.wordmark { margin: 0; font: italic 900 clamp(34px, 6vw, 56px)/1 var(--font-display); letter-spacing: .01em; }
.wordmark.xl { font-size: clamp(36px, 5.5vw, 64px); }
.w-silver, .w-gold { background-clip: text; -webkit-background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0,0,0,.6)); }
.w-silver { background-image: var(--silver-grad); }
.w-gold { background-image: var(--gold-grad); }
.tagline { margin: 10px 0 0; font: 600 clamp(10px, 1.6vw, 13px)/1 var(--font-tech); letter-spacing: .32em; color: #eaf2ec; }
.eyebrow { margin: 0 0 10px; font: 600 11px/1 var(--font-tech); letter-spacing: .28em; text-transform: uppercase; color: var(--gold-light); }

/* ---------- glass ---------- */
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--neon), var(--emerald)); color: #021006; box-shadow: 0 0 0 1px rgba(43,255,79,.4), 0 8px 24px -8px rgba(43,255,79,.7); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 0 1px var(--neon), 0 10px 30px -6px rgba(43,255,79,.9); }
.btn-ghost { background: rgba(255,255,255,.03); border-color: rgba(232,185,35,.5); color: var(--gold-light); }
.btn-ghost:hover { background: rgba(232,185,35,.1); }
.icon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; }
.icon-btn:hover { border-color: var(--line-strong); color: var(--neon); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }

/* ---------- screens ---------- */
.screen { display: none; min-height: 100dvh; }
.screen.active { display: flex; animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; } }

/* splash */
.splash { flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 24px; }
.splash-emblem { position: relative; width: min(220px, 56vw); margin-bottom: 22px; animation: rise 1.1s cubic-bezier(.2,.8,.2,1) both; }
.splash-emblem img { width: 100%; height: auto; position: relative; }
.halo { position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(circle, rgba(43,255,79,.35), transparent 62%); animation: breathe 2.4s ease-in-out infinite; }
.splash .wordmark { animation: rise 1s .25s both; }
.splash .tagline { animation: rise 1s .4s both; }
.progress { width: min(260px, 70vw); height: 3px; margin-top: 34px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--emerald), var(--neon), var(--gold)); box-shadow: 0 0 12px var(--neon); animation: load 2.2s .3s ease-in-out forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes load { to { width: 100%; } }

/* login */
.login { align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); padding: 32px 28px 24px; display: flex; flex-direction: column; gap: 14px; text-align: center;
  border-color: var(--line-strong); box-shadow: var(--shadow), 0 0 40px -10px rgba(43,255,79,.35); }
.login-logo { width: 170px; height: auto; margin: -6px auto 4px; }
.login-card h2 { margin: 0; font: 700 22px/1.2 var(--font-display); }
.login-card .muted { margin: -8px 0 6px; }
.login-card label { display: grid; gap: 6px; text-align: left; font-size: 13px; color: var(--muted); }
input[type=email], input[type=password], input[type=search], select {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); }
input:focus, select:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(43,255,79,.15); }
.fineprint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- app layout ---------- */
.app { align-items: stretch; }
.sidebar { position: fixed; inset: 16px auto 16px 16px; width: var(--sidebar); display: flex; flex-direction: column; padding: 18px 14px; z-index: 30; background: var(--glass-strong); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; border-bottom: 1px solid var(--line); text-decoration: none; }
.brand img { filter: drop-shadow(0 0 10px rgba(43,255,79,.45)); }
.brand b { font: italic 900 20px/1 var(--font-display); }
.brand small { display: block; margin-top: 5px; font: 600 7.5px/1 var(--font-tech); letter-spacing: .2em; color: var(--muted); }
.nav { display: grid; gap: 4px; padding: 16px 0; overflow-y: auto; }
.nav-label { margin: 14px 10px 4px; font: 600 10px/1 var(--font-tech); letter-spacing: .22em; color: rgba(157,180,165,.7); }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--muted); text-decoration: none; border: 1px solid transparent; transition: .2s; }
.nav a:hover { color: var(--text); background: rgba(43,255,79,.06); }
.nav a.active { color: var(--text); background: linear-gradient(90deg, rgba(43,255,79,.16), rgba(43,255,79,.02)); border-color: var(--line); box-shadow: inset 3px 0 0 var(--neon); }
.nav a.active svg { color: var(--neon); }
.profile { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--line); }
.profile small { display: block; color: var(--muted); font-size: 12px; }
.avatar { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  font: 800 14px/1 var(--font-tech); color: #1a1200; background: var(--gold-grad); box-shadow: 0 0 0 2px var(--black), 0 0 0 3px var(--gold); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 38px; height: 38px; font-size: 12px; }

.main { flex: 1; min-width: 0; margin-left: calc(var(--sidebar) + 32px); padding: 16px 20px 40px 0; display: flex; flex-direction: column; gap: 18px; }
.topbar { position: sticky; top: 16px; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--glass-strong); }
.topbar-logo, .menu-btn { display: none; }
.search { flex: 1; position: relative; max-width: 460px; margin-right: auto; }
.search svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--muted); width: 18px; }
.search input { padding-left: 40px; min-height: 42px; }

.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding: 34px 36px;
  border-color: var(--line-strong); background: linear-gradient(120deg, rgba(10,143,60,.28), rgba(3,29,5,.55) 55%, rgba(232,185,35,.08)); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: linear-gradient(90deg, transparent, var(--neon), var(--gold), transparent); box-shadow: 0 0 14px var(--neon); }
.hero-copy { max-width: 520px; margin: 16px 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-emblem { width: clamp(150px, 20vw, 250px); height: auto; filter: drop-shadow(0 0 28px rgba(43,255,79,.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-1.5deg); } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 16px 18px; }
.stat small { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.stat b { display: block; margin-top: 4px; font: 700 26px/1.1 var(--font-tech); }
.stat b.gold { color: var(--gold-light); text-shadow: 0 0 18px rgba(232,185,35,.4); }
.stat b.neon { color: var(--neon); text-shadow: 0 0 18px rgba(43,255,79,.4); }
.stat em { font-style: normal; font-size: 12px; color: var(--neon); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.section-head h2 { margin: 0; font: 700 14px/1 var(--font-tech); letter-spacing: .2em; text-transform: uppercase; }

.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tool { position: relative; text-align: left; padding: 18px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: transform .25s, border-color .25s, box-shadow .25s; animation: rise .6s both; }
.tool:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(43,255,79,.25), 0 0 30px -8px rgba(43,255,79,.5); }
.tool h3 { margin: 0; font: 700 16px/1.2 var(--font-display); }
.tool p { margin: 0; color: var(--muted); font-size: 13px; }
.tool .tag { position: absolute; top: 14px; right: 14px; font: 600 9px/1 var(--font-tech); letter-spacing: .14em; padding: 5px 7px; border-radius: 6px; color: #1a1200; background: var(--gold-grad); }
.tool-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: var(--neon);
  background: radial-gradient(circle at 30% 20%, rgba(43,255,79,.25), rgba(3,29,5,.6)); border: 1px solid var(--line-strong); box-shadow: inset 0 0 12px rgba(43,255,79,.2); }
.tool-icon svg { width: 24px; height: 24px; }
.tool-icon.gold { color: var(--gold-light); border-color: rgba(232,185,35,.55); background: radial-gradient(circle at 30% 20%, rgba(232,185,35,.25), rgba(3,29,5,.6)); }

.recent { padding: 6px 0; }
.row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid rgba(43,255,79,.08); }
.row:first-child { border-top: 0; }
.ext { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font: 700 10px/1 var(--font-tech); color: var(--neon); border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.ext.gold { color: var(--gold-light); border-color: rgba(232,185,35,.4); }
.row b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row small { color: var(--muted); }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 99px; color: var(--neon); background: rgba(43,255,79,.1); border: 1px solid var(--line); }
.foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font: 600 10px/1 var(--font-tech); letter-spacing: .22em; color: var(--muted); }

.bottom-nav, .scrim { display: none; }

/* ---------- dialog ---------- */
.tool-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; color: var(--text); background: var(--glass-strong); border-color: var(--line-strong); }
.tool-dialog::backdrop { background: rgba(0,6,2,.7); backdrop-filter: blur(4px); }
.tool-dialog[open] { animation: rise .35s both; }
.dialog-inner { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.dialog-inner header { display: flex; gap: 14px; align-items: flex-start; }
.dialog-inner header > div { flex: 1; }
.dialog-inner h3 { margin: 2px 0 2px; font: 700 18px/1.2 var(--font-display); }
.dialog-inner header p { margin: 0; font-size: 13px; }
.drop { display: grid; justify-items: center; gap: 6px; padding: 26px 16px; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: 14px; background: rgba(43,255,79,.04); cursor: pointer; transition: .2s; }
.drop svg { width: 30px; height: 30px; color: var(--neon); }
.drop.over, .drop:hover { background: rgba(43,255,79,.1); border-color: var(--neon); }
.dlg-options { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dlg-options label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dlg-options select { min-height: 38px; width: auto; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 160px; overflow: auto; }
.file-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(0,0,0,.3); font-size: 13px; }
.file-list li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-inner > .muted.small { margin: 0; }

/* ---------- loader & toast ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 18px; background: rgba(2,10,4,.82); backdrop-filter: blur(6px); }
.loader[hidden] { display: none; }
.loader-ring { position: relative; display: grid; place-items: center; width: 140px; height: 140px; }
.loader-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(43,255,79,.15); border-top-color: var(--neon); border-right-color: var(--gold); animation: spin 1s linear infinite; filter: drop-shadow(0 0 8px var(--neon)); }
.loader p { margin: 0; font: 600 12px/1 var(--font-tech); letter-spacing: .24em; color: var(--silver); }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; z-index: 110; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--glass-strong); border: 1px solid var(--line-strong); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .3s; }
.toast.show { opacity: 1; translate: -50% 0; }
.toast.error { border-color: rgba(255,110,90,.7); color: #ffd3cc; }

/* ---------- profile, views, library ---------- */
.opt { color: rgba(157,180,165,.6); font-size: 12px; }
input[type=text] { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); }
.profile .who { flex: 1; min-width: 0; }
.profile .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile .icon-btn { width: 36px; height: 36px; }
.profile .icon-btn svg { width: 18px; height: 18px; }
.view { display: flex; flex-direction: column; gap: 18px; }
.view[hidden] { display: none; }
.link { color: var(--gold-light); font-size: 13px; text-decoration: none; }
.link:hover { text-decoration: underline; }
.lib-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 24px 26px; }
.lib-title { margin: 0; font: 700 26px/1.2 var(--font-display); }
.lib-head .muted { margin: 4px 0 0; }
.lib-actions { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.lib-search { display: block; min-width: 220px; max-width: 340px; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 5px 12px; border-radius: 99px; font-size: 12.5px; cursor: pointer; color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.chip.active, .chip:hover { color: var(--text); border-color: var(--neon); background: rgba(43,255,79,.1); }
.chip.tag { padding: 2px 9px; font-size: 11.5px; color: var(--gold-light); border-color: rgba(232,185,35,.4); }
.chip.tag button { margin-left: 4px; border: 0; background: none; color: inherit; cursor: pointer; padding: 0; }
.row .meta { min-width: 0; }
.row .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; align-items: center; }
.row .tags input { width: 110px; min-height: 26px; padding: 0 8px; font-size: 12px; border-radius: 8px; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions .icon-btn { width: 36px; height: 36px; }
.row-actions .icon-btn svg { width: 18px; height: 18px; }
.row-actions select { min-height: 36px; padding: 0 8px; width: 120px; font-size: 13px; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.lib .row { grid-template-columns: auto 1fr auto; }

/* ---------- about ---------- */
.about-hero .hero-copy { color: var(--text); font-size: 17px; max-width: 560px; }
.about-body { padding: 26px 30px; font-size: 16px; line-height: 1.75; }
.about-body p { margin: 0 0 14px; color: #d3e2d8; max-width: 820px; }
.about-body p:last-child { margin-bottom: 0; }
.services { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 20px; padding: 0; }
.services li { padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--neon); border: 1px solid var(--line-strong); background: rgba(43,255,79,.06); }
.services li:nth-child(even) { color: var(--gold-light); border-color: rgba(232,185,35,.45); background: rgba(232,185,35,.06); }
.about-pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pillar { padding: 24px; display: grid; gap: 10px; align-content: start; border-color: var(--line-strong); }
.pillar.gold { border-color: rgba(232,185,35,.45); }
.pillar h2 { margin: 4px 0 0; font: 700 13px/1 var(--font-tech); letter-spacing: .22em; text-transform: uppercase; color: var(--neon); }
.pillar.gold h2 { color: var(--gold-light); }
.pillar p { margin: 0; font-size: 17px; line-height: 1.6; }
.credit { padding: 24px 28px; background: linear-gradient(120deg, rgba(232,185,35,.1), rgba(3,29,5,.6)); border-color: rgba(232,185,35,.4); }
.credit-row { display: flex; align-items: center; gap: 18px; }
.avatar.lg { width: 64px; height: 64px; font-size: 16px; }
.credit-role { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.credit-name { margin: 2px 0 0; font: italic 800 clamp(22px, 3vw, 30px)/1.15 var(--font-display); }
.about-sign { display: grid; justify-items: center; gap: 14px; padding: 18px 0 6px; text-align: center; }
.about-sign img { width: min(420px, 100%); height: auto; }
.values { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; font: 600 11px/1 var(--font-tech); letter-spacing: .24em; text-transform: uppercase; color: var(--gold-light); }
.values span + span::before { content: "•"; margin: 0 12px; color: var(--neon); }
.foot .link { font: inherit; letter-spacing: inherit; }

/* ---------- dialog extras ---------- */
.dlg-options .grow { flex: 1 1 100%; }
.dlg-options .grow input { min-height: 40px; }
.opt-head { flex: 1 1 100%; margin: 6px 0 -2px; padding-top: 8px; border-top: 1px solid var(--line); font: 600 10px/1 var(--font-tech); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); }
.opt-head:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.dlg-options .num input { width: 96px; min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); }
.dlg-options .num input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(43,255,79,.15); }
.dlg-options input[type=color] { width: 44px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0,0,0,.35); cursor: pointer; }
.file-list li { align-items: center; }
.file-list .ctl { display: flex; gap: 4px; flex: none; align-items: center; }
.file-list .ctl button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; }
.file-list .ctl button:disabled { opacity: .3; cursor: default; }
.file-list .ctl svg { width: 14px; height: 14px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--neon); }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.btn-danger { background: transparent; border-color: rgba(255,110,90,.5); color: #ff9c8c; }
.btn-danger:hover { background: rgba(255,110,90,.1); }
.loader p { max-width: 80vw; text-align: center; line-height: 1.5; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .sidebar { inset: 0 auto 0 0; border-radius: 0 var(--radius) var(--radius) 0; transform: translateX(-105%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  .sidebar.open { transform: none; }
  .scrim.show { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.55); }
  .main { margin-left: 0; padding: 12px 16px calc(96px + env(safe-area-inset-bottom)); }
  .menu-btn { display: grid; }
  .topbar { top: 12px; }
  .topbar-logo { display: block; height: 30px; width: auto; }
  .topbar .search { display: none; }
  .topbar [data-nav="about"] { margin-left: auto; }
  .hero { grid-template-columns: 1fr; text-align: center; padding: 26px 18px; }
  .hero-emblem { order: -1; margin: 0 auto; width: 150px; }
  .hero-copy { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .about-pillars { grid-template-columns: 1fr; }
  .about-body { padding: 20px; }
  .credit-row { flex-direction: column; text-align: center; }
  .credit .eyebrow { text-align: center; }
  .values { line-height: 2; }
  .bottom-nav { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; justify-content: space-around; padding: 6px; background: var(--glass-strong); }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; padding: 6px 8px; border-radius: 10px; font-size: 10.5px; color: var(--muted); text-decoration: none; }
  .bottom-nav a.active { color: var(--neon); }
}
@media (max-width: 520px) {
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tool h3 { font-size: 14.5px; overflow-wrap: anywhere; }
  .tool { padding: 14px; }
  .tool p { display: none; }
  .tool .tag { top: 10px; right: 10px; }
  .stat b { font-size: 20px; }
  .row { grid-template-columns: auto 1fr auto; }
  .row .pill { display: none; }
  .lib .row { grid-template-columns: auto 1fr; }
  .lib .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .lib-search { min-width: 0; max-width: none; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }
