/* ============================================================================
 *  Thrivium — tema visual (negro + violeta, motivo estrella TVT)
 * ========================================================================== */

:root {
  --bg:        #0a0910;
  --bg-2:      #0e0c15;
  --surface:   #14121d;
  --surface-2: #1b1826;
  --line:      #292336;
  --line-soft: #201c2c;

  --brand:      #8b7cf6;  /* violeta principal (idéntico al de los hosts) */
  --brand-2:    #6f52f0;
  --brand-deep: #5a3ee0;
  --brand-soft: #c4b8ff;
  --brand-glow: rgba(139, 124, 246, 0.35);

  --text:   #f3f1fb;
  --muted:  #9a94ac;
  --faint:  #66607a;

  --ok:     #58d38c;
  --warn:   #ffcb52;
  --danger: #f2617a;
  --danger-deep: #c8384f;

  --radius:   14px;
  --radius-s: 9px;
  --shadow:   0 18px 40px -18px rgba(0,0,0,0.8);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 78% -8%, rgba(139,124,246,0.16), transparent 60%),
    radial-gradient(800px 500px at 10% 110%, rgba(90,62,224,0.10), transparent 55%),
    var(--bg);
}

a { color: var(--brand-soft); text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; margin: 0; }

::selection { background: var(--brand-glow); color: #fff; }

/* ---- scrollbars ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2438; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3350; }

/* ---- marca / logo ---- */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand .mark { width: 34px; height: 34px; flex: 0 0 34px; filter: drop-shadow(0 0 10px var(--brand-glow)); }
.brand .word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #fff;
}
.brand .word b { color: var(--brand); font-weight: 700; }

/* ---- botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, opacity .15s;
  text-transform: none;
}
.btn:hover { border-color: #3a3350; background: #221d31; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 22px -10px var(--brand-glow);
}
.btn-primary:hover { background: linear-gradient(180deg, #9a8cff 0%, #6a4ee6 100%); }
.btn-danger { background: transparent; border-color: rgba(242,97,122,.4); color: var(--danger); }
.btn-danger:hover { background: rgba(242,97,122,.12); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: #fff; background: var(--surface); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---- pills / badges ---- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid var(--line);
  color: var(--muted); background: var(--surface);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill.live   { color: #cffee0; background: rgba(88,211,140,.10); border-color: rgba(88,211,140,.35); }
.pill.live .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(88,211,140,.6); animation: pulse 1.8s infinite; }
.pill.offline { color: #b9b3c8; }
.pill.offline .dot { background: #4a4458; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 6px; font-weight: 700; }
.badge.admin { color: var(--brand-soft); background: rgba(139,124,246,.14); }
.badge.vip   { color: var(--warn); background: rgba(255,203,82,.13); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(88,211,140,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(88,211,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(88,211,140,0); }
}

/* ---- cards ---- */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }

/* ---- inputs ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
input::placeholder, textarea::placeholder { color: var(--faint); }

/* ---- tablas ---- */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--faint); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
}
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(139,124,246,.045); }

.mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.right { text-align: right; }
.center { text-align: center; }

/* ---- barra de cupos ---- */
.slots { height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.slots > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-deep), var(--brand)); border-radius: 999px; transition: width .4s ease; }

/* ---- toasts ---- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.toast {
  min-width: 240px; max-width: 360px;
  padding: 12px 15px; border-radius: var(--radius-s);
  background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13.5px; color: var(--text);
  animation: slidein .22s ease;
  border-left: 3px solid var(--brand);
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- utilidades ---- */
.row { display: flex; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; align-items: center; }
.grid { display: grid; gap: 16px; }
.split { display: grid; gap: 18px; align-items: start; }
.split.a { grid-template-columns: 1.6fr 1fr; }
.split.b { grid-template-columns: 1fr 340px; }
@media (max-width: 1040px) { .split.a, .split.b { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 10px; }
.spread { display: flex; align-items: center; gap: 10px; }
.hidden { display: none !important; }
.empty { padding: 34px; text-align: center; color: var(--faint); font-size: 14px; }
