/* RaceControl panel — mismo lenguaje que la landing: negro, Inter, pelo fino, píldoras. */
:root {
  --black: #000;
  --text: #f5f5f7;
  --gray: #86868b;
  --muted: #6e6e73;
  --red: #e10600;
  --green: #00e676;
  --hairline: rgba(255, 255, 255, .12);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

body.panel {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.p-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.p-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.p-brand { display: inline-flex; align-items: center; opacity: .92; }
.p-brand:hover { opacity: 1; }
.p-brand img { height: 15px; width: auto; }
.p-links { display: flex; align-items: center; gap: 28px; }
.p-links a { color: var(--text); opacity: .8; text-decoration: none; font-size: 12px; }
.p-links a:hover { opacity: 1; }

.p-wrap { max-width: 1280px; margin: 0 auto; padding: 64px 28px 110px; }
.p-wrap.narrow { max-width: 560px; }

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 10px;
}
.scene-title {
  margin: 0;
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.04;
  font-size: clamp(2rem, 4.5vw, 3rem);
  text-wrap: balance;
}
.lede { color: var(--gray); font-size: 17px; line-height: 1.5; margin: 18px 0 0; }
.lede code, .meta code { font-family: var(--mono); font-size: .85em; color: var(--text); }
.meta { color: var(--gray); font-size: 13px; line-height: 1.6; }
.meta a, .lede a, .card a { color: var(--text); }

.section-title {
  margin: 56px 0 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray);
}

.card {
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, .02);
}
.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.card h3 code { font-family: var(--mono); font-size: .8em; font-weight: 400; color: var(--gray); }
.key { font-family: var(--mono); font-size: 13px; word-break: break-all; }
ul.rows { list-style: none; margin: 16px 0 0; padding: 0; }
ul.rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 12px 12px 0;
}
table.tbl td { padding: 12px 12px 12px 0; border-top: 1px solid var(--hairline); vertical-align: middle; }
table.tbl td:last-child, table.tbl th:last-child { padding-right: 0; text-align: right; }
table.tbl .sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; font-family: var(--mono); }
table.tbl form.inline-form { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
table.tbl form.inline-form input {
  width: 130px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
}
table.tbl form.inline-form select {
  max-width: 130px;
  background: #111;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
}
.pill-dot {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 980px;
  border: 1px solid var(--hairline);
  color: var(--gray);
  white-space: nowrap;
}
.pill-dot.on { color: #b8f5d6; border-color: rgba(0, 230, 118, .35); }
@media (max-width: 640px) {
  table.tbl th:nth-child(2), table.tbl td:nth-child(2) { display: none; }
}

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .35);
}
.field select option { background: #111; }
pre.cmd {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  background: rgba(255, 255, 255, .02);
  white-space: pre-wrap;
  word-break: break-all;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: #000;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 980px;
  border: 0;
  cursor: pointer;
}
.pill:hover { opacity: .92; }
.pill-small { font-size: 12px; padding: 7px 15px; }
.pill-red { background: var(--red); color: #fff; }
.pill-ghost { background: transparent; color: var(--text); border: 1px solid var(--hairline); }
.textlink { color: var(--gray); font-size: 15px; text-decoration: none; background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
.textlink:hover { color: var(--text); }
.textlink.danger:hover { color: var(--red); }
.actions { display: flex; align-items: center; gap: 20px; margin-top: 20px; flex-wrap: wrap; }

.alert {
  border: 1px solid rgba(225, 6, 0, .4);
  background: rgba(225, 6, 0, .08);
  color: #ffb4ab;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 24px;
}
.notice {
  border: 1px solid rgba(0, 230, 118, .25);
  background: rgba(0, 230, 118, .06);
  color: #b8f5d6;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 24px;
}
.notice code, .alert code { font-family: var(--mono); font-size: .85em; }

.key-dialog { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; margin: 0; border: 1px solid var(--hairline); border-radius: 18px; padding: 32px; background: #090909; color: var(--text); box-shadow: 0 24px 90px rgba(0,0,0,.65); }
.key-dialog::backdrop { background: rgba(0,0,0,.76); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.key-dialog .key-command { max-height: 180px; overflow: auto; margin-top: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }

.p-foot { max-width: 1280px; margin: 0 auto; padding: 0 28px 48px; color: var(--muted); font-size: 12px; }

/* Admin Core: misma organización, piel del landing. */
body.app-layout { font-family: var(--font); background: var(--black); -webkit-font-smoothing: antialiased; }
body.app-layout > main[style] { background: var(--black) !important; }
::selection { background: var(--red); color: #fff; }
body.app-layout details summary { cursor: pointer; }

.stats-scroll { overflow-x: auto; margin: 32px 0 0; border: 1px solid var(--hairline); border-radius: 16px; }
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
  min-width: 780px;
}
.stat { background: var(--black); padding: 18px 20px; min-width: 0; }
.stat b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b small { font-size: 15px; color: var(--gray); font-weight: 500; }
.stat span { display: block; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat .ok { color: var(--green); }
.stat .warn { color: var(--amber, #ffd600); }


/* Settings: herramientas de workspace en lenguaje panel. */
.split { display: grid; gap: 16px; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.input-sm {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
}
.input-sm:focus { outline: none; border-color: rgba(255, 255, 255, .35); }
select.input-sm option { background: #111; }
.counter { color: var(--muted); font-size: 12px; margin-left: auto; }
.check-block { border: 1px solid var(--hairline); border-radius: 12px; padding: 14px; min-width: 0; }
.check-block h4 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
.check-list { max-height: 180px; overflow-y: auto; overflow-x: hidden; display: grid; gap: 2px; margin-top: 8px; }
@media (min-width: 560px) { .check-list { grid-template-columns: 1fr 1fr; } }
.check-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; font-size: 12px; color: rgba(255,255,255,.85); }
.check-row:hover { background: rgba(255,255,255,.04); }
.check-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.event-list { max-height: 420px; overflow-y: auto; display: grid; gap: 6px; padding-right: 4px; }
.event-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 10px; font-size: 13px; }
.event-row:hover { background: rgba(255,255,255,.03); }
.event-row strong { display: block; font-weight: 500; }
.event-row small { color: var(--muted); font-size: 12px; }
.event-row code { font-family: var(--mono); font-size: 11px; color: var(--muted); }
details.card > summary { cursor: pointer; font-size: 13px; color: var(--gray); }
details.card > summary:hover { color: var(--text); }


/* Variante ancha con dos columnas (workspace). */
.p-wrap.wide { max-width: 1680px; }
.cols { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1080px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cols .section-title { margin-top: 0; }
.cols .event-list { max-height: 560px; }
.cols .check-list { max-height: 240px; }
.cols .split.checks { grid-template-columns: 1fr 1fr; }
.cols .split.checks .check-list { grid-template-columns: 1fr; }

@media (max-width: 640px) {
  .p-links { display: none; }
  .p-wrap { padding-top: 48px; }
}

/* Organization artwork: fixed-size previews prevent uploads from moving controls. */
.hud-branding{margin-top:64px;padding-top:32px;border-top:1px solid #ffffff1f;scroll-margin-top:76px}
.branding-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}
.branding-item{min-width:0}.branding-item h3{font-size:16px;margin:20px 0 8px}.branding-item .meta{min-height:2.8em}
.branding-preview{height:112px;display:flex;align-items:center;justify-content:center;background:#060607;border:1px solid #ffffff12;border-radius:6px;padding:16px}
.branding-preview img{max-width:100%;max-height:80px;object-fit:contain}.branding-preview span{font-size:12px;color:#86868b}
.branding-item [hidden]{display:none!important}.branding-item input[type=file]{width:100%;min-width:0;font-size:12px}.branding-item small{font-size:11px;color:#a1a1a6;line-height:1.5}
.hud-branding .actions{gap:20px;flex-wrap:wrap}.hud-branding .actions .meta{flex:1;min-width:180px}
@media(max-width:1000px){.branding-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.branding-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:759px){.cols .split.checks{grid-template-columns:minmax(0,1fr)}.cols .check-block{min-width:0}.cols .input-sm{max-width:100%;box-sizing:border-box}}
