/* NOEMA — panel de administración */

:root{
  --bg:#0F0F0F;
  --surface:#161616;
  --surface-2:#1D1D1D;
  --border:#272727;
  --text:#EDE8E0;
  --text-muted:#8A8580;
  --accent:#8ED8D1;
  --accent-deep:#0ABAB5;
  --success:#22C55E;
  --warning:#FBBF24;
  --error:#EF4444;
  --side-w:232px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  font-size:14px; line-height:1.55; -webkit-font-smoothing:antialiased;
}
a{color:inherit; text-decoration:none}

/* ── Estructura ─────────────────────────────────────────── */
.shell{display:flex; min-height:100%}

.side{
  width:var(--side-w); flex:0 0 var(--side-w);
  background:var(--surface); border-right:1px solid var(--border);
  display:flex; flex-direction:column; padding:20px 14px;
  position:sticky; top:0; height:100vh;
}
.brand{display:flex; align-items:center; gap:10px; padding:0 8px 22px; }
.brand-mark{width:26px; height:auto; display:block}
.brand span{font-weight:700; letter-spacing:.22em; font-size:13px}

.menu{display:flex; flex-direction:column; gap:2px; flex:1}
.menu-item{
  display:flex; align-items:center; gap:10px;
  padding:9px 10px; border-radius:7px; color:var(--text-muted);
  font-size:13.5px; transition:background .15s, color .15s;
}
.menu-item svg{width:17px; height:17px; flex:0 0 17px}
.menu-item:hover{background:var(--surface-2); color:var(--text)}
.menu-item.is-active{background:rgba(142,216,209,.1); color:var(--accent)}

.side-foot{border-top:1px solid var(--border); padding-top:12px; margin-top:12px}
.who{padding:0 10px 10px}
.who-name{font-size:13px; font-weight:600}
.who-mail{font-size:11.5px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis}

.main{flex:1; min-width:0; display:flex; flex-direction:column}
.topbar{
  height:60px; display:flex; align-items:center; padding:0 28px;
  border-bottom:1px solid var(--border); background:var(--surface);
}
.topbar h1{font-size:16px; font-weight:600; margin:0; letter-spacing:-.01em}
.content{padding:26px 28px 60px; flex:1}

/* ── Piezas ─────────────────────────────────────────────── */
.stats{display:flex; gap:12px; flex-wrap:wrap; margin-bottom:22px}
.stat{
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  padding:15px 18px; min-width:150px; flex:0 1 auto;
}
.stat-label{
  font-size:11px; text-transform:uppercase; letter-spacing:.11em;
  color:var(--text-muted); font-weight:600; margin-bottom:5px;
}
.stat-value{font-size:26px; font-weight:700; letter-spacing:-.02em; line-height:1.15}
.stat-value.accent{color:var(--accent)}

.card{
  background:var(--surface); border:1px solid var(--border);
  border-radius:10px; padding:20px 22px; margin-bottom:16px;
}
.card-title{
  font-size:11px; text-transform:uppercase; letter-spacing:.13em;
  color:var(--text-muted); font-weight:700; margin:0 0 14px;
}

table{width:100%; border-collapse:collapse; font-size:13.5px}
th{
  text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.1em;
  color:var(--text-muted); font-weight:600; padding:0 12px 10px; border-bottom:1px solid var(--border);
}
td{padding:11px 12px; border-bottom:1px solid var(--border)}
tbody tr:last-child td{border-bottom:0}
tbody tr{transition:background .12s}
tbody tr:hover{background:var(--surface-2)}
.muted{color:var(--text-muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12.5px}

.dot{display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:7px}
.dot--on{background:var(--success)}
.dot--off{background:var(--text-muted)}
.dot--bad{background:var(--error)}

.empty{text-align:center; padding:52px 20px; color:var(--text-muted)}
.empty svg{width:34px; height:34px; opacity:.45; margin-bottom:12px}
.empty p{margin:0 0 4px; font-size:14px}
.empty small{font-size:12.5px; opacity:.75}

.btn{
  display:inline-flex; align-items:center; gap:7px; cursor:pointer;
  font:inherit; font-size:13px; font-weight:600;
  background:var(--accent); color:#0F0F0F; border:0;
  padding:8px 14px; border-radius:7px;
  transition:transform .12s, filter .12s;
}
.btn:hover{transform:translateY(-1px); filter:brightness(1.06)}
.btn svg{width:15px; height:15px}
.btn--ghost{background:transparent; color:var(--text-muted); border:1px solid var(--border)}
.btn--ghost:hover{color:var(--text); border-color:var(--accent)}

.banner{
  display:flex; align-items:center; gap:8px;
  border-radius:8px; padding:10px 16px; margin-bottom:16px; font-size:13px;
}
.banner--ok{background:rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.3); color:var(--success)}
.banner--error{background:rgba(239,68,68,.1); border:1px solid rgba(239,68,68,.3); color:var(--error)}

.toolbar{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; flex-wrap:wrap}

/* ── Login ──────────────────────────────────────────────── */
.login-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
}
.login{width:100%; max-width:352px}
.login-brand{display:flex; flex-direction:column; align-items:center; gap:14px; margin-bottom:30px}
.login-brand svg{width:52px; height:auto}
.login-brand span{font-weight:700; letter-spacing:.28em; font-size:13px}
.login form{
  background:var(--surface); border:1px solid var(--border);
  border-radius:12px; padding:24px; display:flex; flex-direction:column; gap:14px;
}
label{
  display:block; font-size:11px; text-transform:uppercase; letter-spacing:.11em;
  color:var(--text-muted); font-weight:600; margin-bottom:6px;
}
input[type=email],input[type=password],input[type=text]{
  width:100%; font:inherit; font-size:14px;
  background:var(--surface-2); color:var(--text);
  border:1px solid var(--border); border-radius:7px; padding:10px 12px;
  transition:border-color .15s;
}
input:focus{outline:0; border-color:var(--accent)}
.login .btn{justify-content:center; width:100%; padding:10px}
.login-foot{text-align:center; margin-top:18px; font-size:11.5px; color:var(--text-muted)}

@media (max-width:720px){
  :root{--side-w:64px}
  .brand span,.menu-item span,.who{display:none}
  .menu-item{justify-content:center}
  .content{padding:20px 16px 48px}
  .topbar{padding:0 16px}
}

textarea{
  width:100%; font:inherit; font-size:14px; line-height:1.6;
  background:var(--surface-2); color:var(--text);
  border:1px solid var(--border); border-radius:7px; padding:10px 12px;
  transition:border-color .15s; resize:vertical;
}
textarea:focus{outline:0; border-color:var(--accent)}
select{
  width:100%; font:inherit; font-size:14px;
  background:var(--surface-2); color:var(--text);
  border:1px solid var(--border); border-radius:7px; padding:10px 12px;
}
select:focus{outline:0; border-color:var(--accent)}
input[type=file]{
  width:100%; font:inherit; font-size:13px; color:var(--text-muted);
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:7px; padding:9px 12px;
}
input[type=file]::file-selector-button{
  font:inherit; font-size:12.5px; font-weight:600; cursor:pointer;
  background:var(--surface); color:var(--text); border:1px solid var(--border);
  border-radius:5px; padding:5px 10px; margin-right:10px;
}

/* ── "Recordarme" ───────────────────────────────────────── */
label.check{
  display:flex; align-items:center; gap:9px; cursor:pointer;
  text-transform:none; letter-spacing:0; font-size:13.5px;
  color:var(--text-muted); font-weight:400; margin:0;
}
label.check input{width:auto; accent-color:var(--accent); cursor:pointer}
label.check:hover{color:var(--text)}

/* ── Emails ─────────────────────────────────────────────── */
.field-row{display:flex; gap:14px; flex-wrap:wrap}
.savehint{font-size:12px; margin:12px 0 0; min-height:17px}

.upload-row{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:4px}
.upload-row .btn{margin:0}

.pairbox{
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:9px; padding:16px; margin-top:14px;
}

.uploadstatus{
  margin-top:12px; font-size:13px; color:var(--accent);
  background:rgba(142,216,209,.08); border:1px solid rgba(142,216,209,.25);
  border-radius:7px; padding:9px 13px;
}
.uploadstatus.is-bad{
  color:var(--error); background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.28);
}

.photos{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; margin-top:18px}
.photo{background:var(--surface-2); border:1px solid var(--border); border-radius:9px; overflow:hidden}
.photo img{display:block; width:100%; height:150px; object-fit:cover; background:#0A0A0A}
.photo-body{padding:11px 12px 12px}
.photo-meta{display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:11.5px; margin-bottom:9px}
.photo .cap{font-size:13px; padding:7px 10px}
.photo-actions{display:flex; gap:6px; margin-top:9px}

.tag{
  font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.09em;
  color:var(--text-muted); background:var(--surface); border:1px solid var(--border);
  border-radius:4px; padding:2px 7px;
}
.tag--pair{color:var(--accent); border-color:rgba(142,216,209,.35); background:rgba(142,216,209,.09)}

.ico{
  font:inherit; font-size:13px; line-height:1; cursor:pointer;
  background:var(--surface); color:var(--text-muted);
  border:1px solid var(--border); border-radius:6px; padding:6px 10px;
  transition:color .15s, border-color .15s;
}
.ico:hover:not(:disabled){color:var(--text); border-color:var(--accent)}
.ico:disabled{opacity:.35; cursor:default}
.ico--danger{margin-left:auto}
.ico--danger:hover{color:var(--error); border-color:rgba(239,68,68,.45)}

/* ── Aviso de cookies ───────────────────────────────────── */
.cookiebar{
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  background:rgba(22,22,22,.98); backdrop-filter:blur(10px);
  border-top:1px solid var(--border);
  padding:13px 20px calc(13px + env(safe-area-inset-bottom));
  display:flex; align-items:center; justify-content:center; gap:18px; flex-wrap:wrap;
}
.cookiebar p{margin:0; font-size:13px; color:var(--text-muted)}
.cookiebar a{color:var(--accent)}
.cookiebar button{
  font:inherit; font-size:12.5px; font-weight:700; cursor:pointer;
  background:var(--accent); color:#0F0F0F; border:0;
  padding:7px 16px; border-radius:6px; white-space:nowrap;
}
