/* ── Panel de administración ── */
body { background: var(--bg); min-height: 100vh; }

.admin-header {
  border-bottom: 1px solid var(--border); background: var(--bg-soft);
  padding: 14px 0;
}
.admin-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-header img { height: 40px; }
.admin-header .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.admin-main { padding: 36px 0 80px; }

/* Login gate */
.gate {
  max-width: 400px; margin: 12vh auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 44px 36px;
}
.gate img { height: 50px; margin-bottom: 22px; }
.gate h1 { font-size: 1.3rem; margin-bottom: 8px; }
.gate p { color: var(--muted); font-size: .88rem; margin-bottom: 24px; }
.gate input {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 1rem; outline: none; margin-bottom: 14px;
  text-align: center; letter-spacing: .2em;
}
.gate input:focus { border-color: var(--accent); }
.gate .err { color: #ff6b6b; font-size: .82rem; min-height: 1.2em; margin-top: 10px; }

/* Botones */
.abtn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: .87rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: all .2s;
}
.abtn:hover { border-color: var(--accent); transform: translateY(-2px); }
.abtn.primary { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; border: none; }
.abtn.danger { color: #ff6b6b; }
.abtn.danger:hover { border-color: #ff6b6b; }
.abtn.cyan { background: rgba(46,155,230,.12); border-color: rgba(46,155,230,.4); color: var(--cyan); }

/* Stats */
.stats-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 28px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 22px;
}
.stat-card .v { font-family: "Sora", sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.stat-card .l { color: var(--muted); font-size: .82rem; }

/* Tabla */
.table-toolbar { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 16px; }
.table-toolbar input {
  flex: 1; min-width: 220px; max-width: 360px;
  padding: 11px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); outline: none;
}
.table-toolbar input:focus { border-color: var(--accent); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th {
  text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 14px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
td { padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); font-size: .9rem; }
tr:last-child td { border-bottom: none; }
td input, td select {
  width: 100%; background: transparent; border: 1px solid transparent;
  color: var(--text); padding: 8px 10px; border-radius: 8px; font-size: .9rem; outline: none;
  transition: all .15s;
}
td input:hover, td select:hover { border-color: var(--border); }
td input:focus, td select:focus { border-color: var(--accent); background: var(--bg); }
td select option { background: var(--surface); }
.del-btn {
  background: none; border: none; color: var(--muted); font-size: 1.05rem;
  padding: 6px 10px; border-radius: 8px; transition: all .15s;
}
.del-btn:hover { color: #ff6b6b; background: rgba(255, 107, 107, .1); }

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 80px);
  background: var(--surface-2); border: 1px solid var(--accent);
  color: var(--text); padding: 13px 26px; border-radius: 99px; font-weight: 600;
  font-size: .9rem; opacity: 0; transition: all .35s; z-index: 200;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
