*{box-sizing:border-box}
body{margin:0;font:15px/1.5 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#f4f5f7;color:#1c2330}
a{color:var(--brand,#2563eb);text-decoration:none}a:hover{text-decoration:underline}
code{background:#eef0f4;padding:1px 5px;border-radius:4px;font-size:13px}
.top{display:flex;align-items:center;justify-content:space-between;background:#111827;padding:0 22px;height:56px}
.top .brand{color:#fff;font-weight:700;font-size:17px}
.top nav a{color:#cbd5e1;margin-left:20px;padding:18px 0;display:inline-block}
.top nav a.on,.top nav a:hover{color:#fff;text-decoration:none;box-shadow:inset 0 -3px var(--brand)}
.wrap{max-width:1150px;margin:0 auto;padding:26px 18px 60px}
.page-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:12px}
h1{margin:0;font-size:24px;word-break:break-word}h2{margin:0 0 12px;font-size:17px}h3{margin:18px 0 8px;font-size:14px;color:#475569}
.card{background:#fff;border:1px solid #e3e6ec;border-radius:12px;padding:20px;margin-bottom:18px}
.card.empty{text-align:center;padding:50px;color:#64748b}
.muted{color:#64748b;font-size:13px}
.grid2{display:grid;grid-template-columns:1.1fr 1fr;gap:18px;align-items:start}
@media(max-width:900px){.grid2{grid-template-columns:1fr}}
.btn{display:inline-block;border:1px solid #cfd5df;background:#fff;color:#1c2330;padding:9px 16px;border-radius:8px;cursor:pointer;font:600 14px system-ui}
.btn:hover{background:#f1f3f7;text-decoration:none}
.btn.primary{background:var(--brand,#2563eb);border-color:var(--brand,#2563eb);color:#fff}.btn.primary:hover{filter:brightness(1.1)}
.btn.small{padding:5px 11px;font-size:13px}
.danger-btn{background:#dc2626;color:#fff;border-color:#dc2626}.danger-btn:hover{background:#b91c1c}
.card.danger{border-color:#fecaca;background:#fff8f8}
label{display:block;margin-bottom:14px;font-weight:600;font-size:14px}
label input:not([type=checkbox]):not([type=color]),label textarea,label select,.code{display:block;width:100%;margin-top:5px;padding:9px 11px;border:1px solid #cfd5df;border-radius:8px;font:14px system-ui;background:#fff}
label.chk{font-weight:500;display:flex;gap:8px;align-items:center}
input[type=color]{display:block;margin-top:5px;width:70px;height:38px;border:1px solid #cfd5df;border-radius:8px;padding:2px;background:#fff}
textarea.code,input.code{font:13px ui-monospace,Menlo,monospace;margin-bottom:8px;background:#f8fafc}
textarea{resize:vertical}
.alert{padding:11px 14px;border-radius:8px;margin-bottom:16px;font-size:14px}
.alert.ok{background:#dcfce7;color:#166534}.alert.err{background:#fee2e2;color:#991b1b}
.tag{background:#fef3c7;color:#92400e;padding:1px 8px;border-radius:99px;font-size:12px;margin-left:6px}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px;margin-bottom:18px}
.card .stats{margin-bottom:6px}
.stat{background:#fff;border:1px solid #e3e6ec;border-radius:12px;padding:14px 16px}
.card .stat{background:#f8fafc}
.stat b{display:block;font-size:24px}.stat span{color:#64748b;font-size:13px}
.table-wrap{padding:0;overflow-x:auto}
table{width:100%;border-collapse:collapse}
th{text-align:left;font-size:12px;text-transform:uppercase;color:#64748b;padding:12px 14px;border-bottom:1px solid #e3e6ec}
td{padding:12px 14px;border-bottom:1px solid #eef0f4;vertical-align:middle}
tr:last-child td{border-bottom:0}
.thumb{width:110px}.thumb img,.noimg{width:96px;height:54px;object-fit:cover;border-radius:6px;background:#111;display:grid;place-items:center;color:#555}
.actions{white-space:nowrap;text-align:right}
.preview{position:relative;width:100%;background:#000;border-radius:8px;overflow:hidden}
.preview iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.bars{display:flex;gap:4px;align-items:flex-end;height:90px}
.bar{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%}
.bar i{display:block;width:100%;background:var(--brand,#2563eb);border-radius:3px 3px 0 0;min-height:2px;opacity:.85}
.bar small{font-size:10px;color:#94a3b8;margin-top:3px}
.hrow{display:flex;align-items:center;gap:10px;margin-bottom:6px;font-size:13px}
.hrow span{width:64px;color:#64748b}.hrow b{width:36px;text-align:right}
.track{flex:1;background:#eef0f4;height:10px;border-radius:5px;overflow:hidden}.track i{display:block;height:100%;background:var(--brand,#2563eb)}
.logo-prev{background:#1f2937;padding:14px;border-radius:8px;margin-bottom:14px}
.logo-prev img{max-height:46px;display:block;margin-bottom:10px}.logo-prev .chk{color:#fff}
/* Subida */
.drop{border:2px dashed #cbd5e1;border-radius:12px;padding:44px 20px;text-align:center;cursor:pointer;transition:.15s}
.drop:hover,.drop.over{border-color:var(--brand,#2563eb);background:#f0f6ff}
.drop p{margin:4px 0}
.q-item{display:flex;gap:14px;align-items:center;border:1px solid #e3e6ec;border-radius:10px;padding:10px 14px;margin-top:12px}
.q-item img{width:96px;height:54px;object-fit:cover;border-radius:6px;background:#111}
.q-main{flex:1;min-width:0}.q-name{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.q-bar{height:8px;background:#eef0f4;border-radius:4px;margin:6px 0 3px;overflow:hidden}.q-bar i{display:block;height:100%;width:0;background:var(--brand,#2563eb);transition:width .2s}
.q-status{font-size:13px;color:#64748b}.q-status.err{color:#dc2626}.q-status.ok{color:#16a34a}
/* Login / instalador */
body.auth{display:grid;place-items:center;min-height:100vh;background:#111827}
.auth-card{width:min(380px,92%);margin:0}.auth-card h1{margin-bottom:16px;font-size:22px}
.auth-card .btn{width:100%}
.checks{list-style:none;padding:0;margin:0 0 14px;font-size:14px}.checks .ok{color:#16a34a}.checks .bad{color:#dc2626}
