:root { --bg:#05070c; --panel:rgba(9,13,24,.80); --line:#22314f; --text:#e8ecf3; --muted:#9db0cf; --accent:#e23d3d; --accent2:#4db2ff; --ok:#39b56a; }
* { box-sizing:border-box; }
html,body { margin:0; min-height:100%; }
body { font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color:var(--text); background:var(--bg) center/cover fixed no-repeat; background-image:linear-gradient(rgba(5,7,12,.10),rgba(5,7,12,.45)),url(/bg.jpg); }
@media (max-aspect-ratio:1/1) { body { background-size:100% auto; background-position:center bottom; } }
#app { max-width:980px; margin:0 auto; padding:16px; }
h1,h2,h3 { margin:0 0 12px; }
h2 { font-size:1.15rem; }
.brand { display:block; width:100%; max-width:300px; aspect-ratio:892/104; margin:0 0 10px; background:url(/logo.jpg) center/contain no-repeat; mix-blend-mode:screen; font-size:0; color:transparent; overflow:hidden;
}
/* la intro animada solo en las pantallas de entrada, no al cambiar de pestaña */
body.auth .brand { animation:brand-in 1.2s cubic-bezier(.2,.8,.2,1) both, brand-glow 4s ease-in-out 1.2s infinite; }
@keyframes brand-in { from { opacity:0; transform:scale(1.25); filter:blur(10px) brightness(2.2); } to { opacity:1; transform:none; filter:blur(0) brightness(1); } }
@keyframes brand-glow { 0%,100% { filter:brightness(1); } 50% { filter:brightness(1.35) drop-shadow(0 0 6px rgba(60,150,255,.8)); } }
@media (prefers-reduced-motion:reduce) { .brand { animation:none; } }
header.top .brand { width:230px; margin:0; }
/* pantallas de entrada: la ilustración entera y la caja pequeña arriba a la derecha */
body.auth { background-color:#000000; background-image:url(/bg.jpg); background-size:contain; background-position:center; }
body.auth #app { max-width:none; padding:0; }
body.auth .narrow { position:fixed; top:20px; right:20px; width:clamp(240px,20vw,340px); max-height:calc(100vh - 40px); overflow:auto; margin:0; padding:14px; font-size:.82rem; background:rgba(20,23,31,.90); box-shadow:0 0 0 1px rgba(77,178,255,.18),0 0 24px rgba(0,0,0,.6); }
body.auth .narrow .brand { margin:0 auto 10px; }
body.auth .narrow h2 { font-size:1rem; }
body.auth .narrow input[type=text], body.auth .narrow input[type=password] { padding:7px 9px; }
body.auth .narrow button { padding:6px 12px; }
@media (max-width:640px) { body.auth { background-size:100% auto; background-position:center bottom; } body.auth .narrow { position:static; width:auto; max-height:none; margin:12px; } }
.card { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:18px; margin-bottom:16px; backdrop-filter:blur(6px); }
.narrow { max-width:420px; margin:10vh auto 0; }
.muted { color:var(--muted); }
.small { font-size:.85rem; }
.error { color:#ff8585; }
label { display:block; margin:10px 0 4px; color:var(--muted); font-size:.9rem; }
input[type=text],input[type=password],input[type=number],select,textarea { width:100%; padding:10px 12px; border-radius:9px; border:1px solid var(--line); background:#0e1118; color:var(--text); font:inherit; }
input[type=color] { width:56px; height:38px; padding:2px; border:1px solid var(--line); border-radius:8px; background:#0e1118; }
button { font:inherit; padding:9px 14px; border-radius:9px; border:1px solid var(--line); background:#222a39; color:var(--text); cursor:pointer; }
button:hover { border-color:var(--muted); }
button:disabled { opacity:.5; cursor:default; }
button.primary { background:var(--accent); border-color:var(--accent); font-weight:600; }
button.danger { color:#ff8585; }
button.link { background:none; border:none; padding:4px 6px; color:var(--accent2); }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.spread { justify-content:space-between; }
.grow { flex:1 1 160px; min-width:0; }
.mt { margin-top:14px; }
header.top { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
header.top .who { display:flex; align-items:center; gap:10px; margin-left:auto; }
.avatar { width:40px; height:40px; border-radius:50%; object-fit:cover; background:#222a39; border:1px solid var(--line); display:inline-flex; align-items:center; justify-content:center; font-weight:700; }
.avatar.big { width:96px; height:96px; font-size:2rem; }
nav { display:flex; gap:6px; flex-wrap:wrap; margin-top:12px; }
nav button.on { border-color:var(--accent2); color:var(--accent2); }
.usage { height:8px; background:#0e1118; border-radius:5px; overflow:hidden; margin-top:6px; }
.usage > div { height:100%; background:linear-gradient(90deg,#1769e0,var(--accent2)); box-shadow:0 0 8px var(--accent2); width:0; }
.drop { border:2px dashed var(--line); border-radius:12px; padding:22px; text-align:center; color:var(--muted); }
.drop.over { border-color:var(--accent2); color:var(--text); }
.item { border-top:1px solid var(--line); padding:12px 0; }
.item:first-child { border-top:none; }
.filename { font-weight:600; overflow-wrap:anywhere; margin:0; }
.linkbox { margin-top:8px; padding:10px; background:#0e1118; border-radius:9px; border:1px solid var(--line); }
.linkbox input { font-size:.85rem; }
progress { width:100%; height:10px; margin-top:8px; accent-color:var(--accent2); }
table { width:100%; border-collapse:collapse; }
th,td { text-align:left; padding:8px 6px; border-top:1px solid var(--line); vertical-align:middle; }
th { color:var(--muted); font-weight:500; font-size:.85rem; border-top:none; }
.scroll { overflow-x:auto; }
.tag { font-size:.75rem; padding:2px 7px; border-radius:20px; border:1px solid var(--line); color:var(--muted); }
.tag.off { color:#ff8585; border-color:#ff8585; }
.recovery { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.95rem; background:#0e1118; border:1px solid var(--line); border-radius:9px; padding:12px; overflow-wrap:anywhere; user-select:all; }
.notice { background:#0e1118; border:1px solid var(--accent2); border-radius:9px; padding:12px; margin-bottom:12px; overflow-wrap:anywhere; }
#toast { position:fixed; left:50%; bottom:22px; transform:translateX(-50%); background:#222a39; border:1px solid var(--line); padding:10px 16px; border-radius:10px; max-width:90vw; z-index:10; }
#toast.err { border-color:#ff8585; color:#ff8585; }
[hidden] { display:none !important; }
.usage.warn > div { background:linear-gradient(90deg,#d98a1c,#ffb648); box-shadow:0 0 8px #ffb648; }
.usage.full > div { background:linear-gradient(90deg,#c62828,#ff5a5a); box-shadow:0 0 8px #ff5a5a; }
td .usage { min-width:120px; }
img.qr { display:block; width:200px; height:200px; background:#fff; border-radius:10px; padding:6px; margin:10px 0; }
.tag.ok { color:var(--ok); border-color:var(--ok); }
tr.bad td { color:#ff9c9c; }
