:root {
  --black: #0a0a0a;
  --coal: #141414;
  --steel: #1e1e1e;
  --line: #2c2c2c;
  --amber: #f2a93b;
  --red: #d8262c;
  --blue: #1f52b0;
  --white: #f5f3ee;
  --muted: #a3a09a;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--black); color: var(--white);
  font-family: "Barlow", system-ui, sans-serif; line-height: 1.5;
  min-height: 100vh;
}
body.is-guest {
  background:
    radial-gradient(ellipse at top, rgba(242,169,59,.12), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.02) 22px 26px),
    var(--black);
}
a { color: inherit; text-decoration: none; }
.mono { font-family: "Space Mono", monospace; text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; color: var(--muted); }

/* Icono contenedor */
.icon {
  --h: 22px;
  display: inline-flex; align-items: center; justify-content: space-evenly;
  width: calc(var(--h) * 2.6); height: var(--h);
  border: calc(var(--h) * .13) solid var(--amber); border-radius: calc(var(--h) * .2);
  padding-inline: calc(var(--h) * .25);
}
.icon i { width: calc(var(--h) * .1); height: 55%; background: var(--amber); border-radius: 9px; }
.icon--lg { --h: 50px; }
.icon--lg i { animation: eq 1.2s ease-in-out infinite; }
.icon--lg i:nth-child(2) { animation-delay: .15s; }
.icon--lg i:nth-child(3) { animation-delay: .3s; }
.icon--lg i:nth-child(4) { animation-delay: .45s; }
.icon--lg i:nth-child(5) { animation-delay: .6s; }
@keyframes eq { 50% { transform: scaleY(.45); } }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding: 1rem 5%;
  background: rgba(10,10,10,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(242,169,59,.2);
}
.brand { display: flex; align-items: center; gap: .8rem; font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: .06em; }
.brand small { font-family: "Space Mono", monospace; font-size: .6rem; color: var(--amber); letter-spacing: .3em; text-transform: uppercase; }
.topbar nav { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.topbar nav a, .link {
  font-family: "Space Mono", monospace; font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--white); transition: color .3s;
}
.topbar nav a:hover, .link:hover { color: var(--amber); }
.link { background: none; border: 0; cursor: pointer; }
.inline { display: inline; }

.main { width: min(1100px, 92%); margin: 2.5rem auto 5rem; }
.main--center { min-height: 100vh; margin: 0 auto; display: grid; place-items: center; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
h1 { font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 3rem; text-transform: uppercase; line-height: 1; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.5rem; border-radius: 8px; cursor: pointer;
  font-family: "Space Mono", monospace; font-weight: 700; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase;
  background: var(--amber); color: var(--black); border: 2px solid var(--amber);
  transition: background .3s, color .3s, box-shadow .3s, transform .2s;
}
.btn:hover { background: transparent; color: var(--amber); box-shadow: 0 0 20px rgba(242,169,59,.35); }
.btn:active { transform: scale(.97); }
.btn--ghost { background: transparent; color: var(--amber); }
.btn--ghost:hover { background: var(--amber); color: var(--black); }
.btn--danger { background: transparent; color: #ff6b6f; border-color: #6b1d20; }
.btn--danger:hover { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 0 20px rgba(216,38,44,.4); }
.btn--small { padding: .45rem .9rem; font-size: .62rem; }
.btn--full { width: 100%; }

/* Flash */
.flash {
  padding: .9rem 1.2rem; border-radius: 8px; margin-bottom: 1.5rem;
  border-left: 4px solid var(--amber); background: rgba(242,169,59,.1);
  transition: opacity .5s, transform .5s var(--ease);
}
.flash--error { border-color: var(--red); background: rgba(216,38,44,.12); color: #ffb3b5; }
.flash.is-hidden { opacity: 0; transform: translateY(-10px); }

/* Panel / formularios */
.panel { background: var(--steel); border: 1px solid var(--line); border-radius: 14px; padding: 2rem; }
.form, .login { display: grid; gap: 1.2rem; }
.form { max-width: 640px; }
label { display: grid; gap: .45rem; font-family: "Space Mono", monospace; font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: .85rem 1rem; border-radius: 8px;
  background: var(--black); color: var(--white); border: 1px solid #333;
  font: 1rem "Barlow", sans-serif; letter-spacing: normal; text-transform: none;
  transition: border-color .3s, box-shadow .3s; color-scheme: dark;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(242,169,59,.15); }
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.check { display: flex; align-items: center; gap: .7rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--amber); }

.login { width: min(380px, 92vw); text-align: center; justify-items: center; padding: 2.8rem 2.2rem; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: rise .7s var(--ease); }
.login h1 { font-size: 3.4rem; letter-spacing: .06em; margin-top: .6rem; }
.login label { width: 100%; text-align: left; }
.login .back { margin-top: .4rem; transition: color .3s; }
.login .back:hover { color: var(--amber); }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

/* Secciones */
.section { margin-bottom: 2.5rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--coal); }
.section__head {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 6px, rgba(255,255,255,.06) 6px 10px, transparent 10px 26px), var(--accent);
}
.section__head h2 { font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 2rem; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.section__head .mono { color: rgba(255,255,255,.85); flex: 1; }
.section__head .btn { background: rgba(10,10,10,.75); border-color: transparent; color: var(--white); }
.section__head .btn:hover { background: var(--black); color: var(--amber); }
.section--orange { --accent: #c9771a; }
.section--red    { --accent: #a91d22; }
.section--blue   { --accent: #17418d; }
.empty { padding: 1.5rem; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-family: "Space Mono", monospace; font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); }
td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .25s; }
tbody tr:hover { background: rgba(242,169,59,.05); }
td strong { display: block; font-size: 1.05rem; }
td small { color: var(--muted); }
.price { font-family: "Space Mono", monospace; color: var(--amber); white-space: nowrap; }
.actions { display: flex; gap: .5rem; justify-content: flex-end; white-space: nowrap; }
tr.is-off td:not(:nth-child(4)):not(.actions) { opacity: .4; }

.pill { border: 0; border-radius: 99px; padding: .3rem .8rem; cursor: pointer; font: 700 .6rem "Space Mono", monospace; letter-spacing: .1em; text-transform: uppercase; transition: filter .2s; }
.pill:hover { filter: brightness(1.2); }
.pill--on { background: rgba(80,200,120,.15); color: #6fe39a; }
.pill--off { background: rgba(255,255,255,.08); color: var(--muted); }

@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  th:first-child, td:first-child { display: none; }
  .actions { flex-direction: column; }
}
