/* Nova Iuris · panel */
:root{
  --teal:#02393C; --teal-2:#04474B; --turq:#35E0D9; --turq-2:#8FEDE8;
  --paper:#F2F7F6; --surface:#FFFFFF; --ink:#082A2C; --muted:#557273; --line:#D6E4E3;
  --ok:#0F7A5A; --danger:#B4372F;
  --sans:"Figtree",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --display:"Cormorant Garamond",Georgia,serif;
  --caps:"Cinzel",Georgia,serif;
}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:15px;line-height:1.5}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--turq);outline-offset:2px}
.wrap{max-width:1080px;margin:0 auto;padding-inline:20px}
.muted{color:var(--muted)}
h1,h2{margin:0}
em{font-style:normal;color:var(--muted);font-weight:400;font-size:12px}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:999px;padding:11px 20px;font-weight:600;font-size:14px;border:1.5px solid transparent;text-decoration:none;white-space:nowrap}
.btn:disabled{opacity:.55;cursor:wait}
.btn-turq{background:var(--turq);color:var(--teal)}
.btn-teal{background:var(--teal);color:#fff}
.btn-teal:hover{background:var(--teal-2)}
.btn-ghost{background:var(--surface);border-color:var(--line);color:var(--ink)}
.btn-ghost:hover{border-color:var(--muted)}
.btn-danger{background:transparent;border-color:#E7C3BF;color:var(--danger)}
.btn-danger:hover{background:var(--danger);color:#fff;border-color:var(--danger)}
dialog .btn-danger{background:var(--danger);color:#fff;border-color:var(--danger)}
.btn.sm{padding:6px 13px;font-size:13px}

/* Login */
.login{min-height:100vh;display:grid;place-items:center;padding:24px 16px;background:radial-gradient(ellipse at 50% 30%,#04474B,#012628 70%)}
.login-card{width:100%;max-width:380px;background:#032F32;border:1px solid rgba(53,224,217,.2);border-radius:18px;padding:32px 28px;display:flex;flex-direction:column;gap:16px;color:#E6F7F6}
.login-card img{width:130px;align-self:center}
.login-card h1{font-family:var(--caps);font-size:16px;letter-spacing:.18em;text-transform:uppercase;text-align:center;color:var(--turq);font-weight:600}
.login-card label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:#9CC9C7}
.login-card input{background:#02393C;border:1px solid rgba(53,224,217,.3);border-radius:10px;padding:11px 12px;color:#fff}
.login-card .err{margin:0;background:rgba(180,55,47,.18);color:#FFC9C3;border-radius:8px;padding:9px 12px;font-size:13px}
.back{color:#9CC9C7;font-size:13px;text-align:center}

/* Barra */
.bar{background:var(--teal);color:#E6F7F6}
.bar-in{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-block:12px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.brand b{display:block;font-family:var(--caps);letter-spacing:.14em;text-transform:uppercase;color:var(--turq);font-size:16px;line-height:1.1}
.brand small{display:block;font-size:12px;color:#9CC9C7}
.bar nav{display:flex;gap:20px;font-size:14px}
.bar nav a{color:#CDEBEA;text-decoration:none}
.bar nav a:hover{color:var(--turq)}

.main{display:flex;flex-direction:column;gap:24px;padding-block:28px 60px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:24px}
.card-head{margin-bottom:18px}
.card-head h2{font-family:var(--display);font-size:30px;line-height:1.05;font-weight:600}
.card-head p{margin:6px 0 0;color:var(--muted);font-size:14px}
.n{font-family:var(--sans);font-size:13px;font-weight:700;background:var(--paper);border-radius:999px;padding:2px 10px;vertical-align:middle;color:var(--muted)}
label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:var(--muted)}
input:not([type=checkbox]):not([type=file]),textarea{border:1px solid var(--line);background:var(--paper);border-radius:10px;padding:10px 12px;color:var(--ink);font-weight:500;font-size:15px;width:100%}
textarea{resize:vertical}
input[type=file]{font-size:13px}
label.check{flex-direction:row;align-items:center;gap:8px;color:var(--ink);font-weight:500;font-size:14px}
.stack{display:flex;flex-direction:column;gap:14px}
.row{display:grid;grid-template-columns:130px 1fr;gap:12px}
.status{margin:0;min-height:20px;font-size:13px;color:var(--ok)}
.status.err{color:var(--danger)}

/* Subida */
.upload{display:grid;grid-template-columns:200px 1fr;gap:24px}
.cover{aspect-ratio:1/1.414;border-radius:6px;background:var(--paper);border:1px dashed var(--line);display:flex;align-items:center;justify-content:center;text-align:center;font-size:12px;color:var(--muted);padding:12px;overflow:hidden;position:relative}
.cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.fields{display:flex;flex-direction:column;gap:14px;min-width:0}
.drop{border:1.5px dashed #9CC9C7;border-radius:12px;padding:20px;text-align:center;background:#F7FBFB;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;transition:border-color .2s,background .2s}
.drop.over{border-color:var(--teal);background:#E9F6F5}
.drop svg{width:26px;height:26px;color:var(--teal)}
.drop label{display:inline;color:var(--teal);font-weight:700;text-decoration:underline;font-size:inherit;cursor:pointer}
.drop small{color:var(--muted);word-break:break-all}
.progress{height:6px;border-radius:999px;background:var(--paper);overflow:hidden}
.progress i{display:block;height:100%;width:0;background:var(--turq);transition:width .2s}

/* Lista */
.list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.item{display:grid;grid-template-columns:64px 1fr auto;gap:16px;align-items:center;padding:14px 0;border-top:1px solid var(--line)}
.item:first-child{border-top:0;padding-top:0}
.item img{width:64px;height:90px;object-fit:cover;border-radius:3px;box-shadow:0 4px 10px -4px rgba(2,57,60,.4)}
.info{display:flex;flex-direction:column;gap:3px;min-width:0}
.info .ed{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.info b{font-family:var(--display);font-size:21px;line-height:1.1;font-weight:600}
.pill{align-self:flex-start;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;border-radius:999px;padding:2px 9px;margin-top:3px}
.pill.on{background:#DDF6EE;color:var(--ok)}
.pill.off{background:#EEF0F0;color:#6B7B7C}
.acts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.warn{color:#9A5B00;font-weight:600}
.msgs{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.msg{padding:16px 0;border-top:1px solid var(--line)}
.msg:first-child{border-top:0;padding-top:0}
.msg-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:13px}
.msg-head b{font-size:15px}
.msg-head a{color:var(--teal)}
.msg-head .btn{margin-left:auto}
.msg-asunto{font-weight:600;margin-top:6px}
.msg-txt{margin:6px 0 0;white-space:normal;color:var(--ink);max-width:80ch}
.two{display:grid;grid-template-columns:1.3fr 1fr;gap:24px}

dialog{border:0;border-radius:16px;padding:24px;width:calc(100% - 32px);max-width:520px;background:var(--surface);color:var(--ink);box-shadow:0 30px 80px -20px rgba(0,0,0,.45)}
dialog::backdrop{background:rgba(1,30,32,.6)}
dialog h2{font-family:var(--display);font-size:28px;font-weight:600}
dialog p{margin:0}
.dlg-acts{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}

.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:90;background:var(--teal);color:#fff;font-weight:600;padding:10px 18px;border-radius:999px;font-size:14px;max-width:calc(100% - 32px)}
.toast[hidden]{display:none}

@media (max-width:760px){
  .upload{grid-template-columns:1fr}
  .cover{max-width:170px}
  .two{grid-template-columns:1fr}
  .item{grid-template-columns:52px 1fr}
  .item img{width:52px;height:73px}
  .acts{grid-column:1/-1;justify-content:flex-start}
  .bar nav{gap:14px}
  .brand small{display:none}
}
