/* Panel de GEB (diseño de 2026-11): azul noche, papel gris claro, acento naranja.
   Sin fuentes externas: la CSP solo deja cargar de 'self'. Inter, Manrope y JetBrains Mono se usan si están
   instaladas; si no, Segoe UI y Consolas. */
:root {
  --sans: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: Manrope, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --night: #0A1A3A;
  --night-2: #13264D;
  --night-line: #2B3D63;
  --sky: #4C9BF5;
  --ink: #0F1A2E;
  --ink-2: #3D4759;
  --muted: #5A6478;
  --page: #F4F6FA;
  --card: #FFFFFF;
  --line: #E3E8F0;
  --line-soft: #EEF1F6;
  --field: #C9D2E0;
  --link: #1559B5;
  --orange: #F07C1E;
  --amber: #F59A3C;
  --ok-bg: #E6F6F4;
  --ok: #0B6158;
  --warn-bg: #FFF5EC;
  --warn-line: #F7C99E;
  --warn: #6B3505;
  --warn-icon: #9A4A08;
  --bad-bg: #FDECEC;
  --bad: #A3271C;
  --info-bg: #EAF2FD;
  --info: #0B4A9E;
  --grey-bg: #EEF0F4;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
a { color: var(--link); }
a:hover { color: #0B3F87; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--orange); outline-offset: 1px; border-color: var(--night); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.icon { flex: none; display: block; }

/* Marca */
.brand { display: flex; align-items: center; gap: 12px; }
.brand .word { font-family: var(--display); font-weight: 800; letter-spacing: 0.08em; }
.brand .sub { font-size: 14px; color: #C9D4E7; }
.brand .bar { width: 1px; height: 20px; background: var(--night-line); }

/* Cabecera con sesión */
.top { background: var(--night); color: #FFFFFF; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; }
.who { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #C9D4E7; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #1F4E99; color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.who button { height: 36px; padding: 0 12px; border: 1px solid var(--night-line); border-radius: 8px; background: transparent; color: #FFFFFF; font: inherit; font-size: 14px; cursor: pointer; }
.who button:hover { background: var(--night-2); }

/* Con sesión: navegación, contenido y columna lateral */
.shell { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px; align-items: flex-start; }
.side { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; }
.side a:hover { background: #E8ECF3; color: var(--night); }
.side a[aria-current="page"] { background: var(--card); color: var(--night); font-weight: 600; box-shadow: inset 3px 0 0 var(--orange), 0 1px 2px rgba(10, 26, 58, 0.06); }
main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.heading { display: flex; flex-direction: column; gap: 6px; }
.heading h1 { font-size: 30px; }
.lead { font-size: 15px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.pad { padding: 20px; }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1.2; }
.stat .hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.free { background: #1F6FD1; }
.dot.used { background: #8A94A6; }
.dot.reuse { background: var(--orange); }
.dot.all { background: var(--night); }

/* Tabla de códigos */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--card); color: var(--ink-2); border: 1px solid var(--field); }
.chip[aria-pressed="true"] { background: var(--night); color: #FFFFFF; border-color: var(--night); }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--field); border-radius: 10px; min-width: 220px; flex: 0 1 280px; background: var(--card); }
.search:focus-within { outline: 3px solid var(--orange); outline-offset: 1px; }
.search input { border: 0; outline: 0; font: inherit; font-size: 14px; flex: 1; min-width: 0; background: transparent; color: var(--ink); }
.table-wrap { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; padding: 12px 16px; white-space: nowrap; }
td { padding: 14px 16px; border-top: 1px solid var(--line-soft); vertical-align: middle; color: var(--ink-2); }
td.code { font-family: var(--mono); font-size: 13px; white-space: nowrap; color: var(--ink); }
td.when { color: var(--muted); white-space: nowrap; }
td.actions { padding: 10px 16px; text-align: right; white-space: nowrap; }
.host { font-size: 13px; color: var(--night); background: #EEF3FB; border-radius: 6px; padding: 4px 8px; white-space: nowrap; }
.pill { display: inline-flex; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.free { background: var(--info-bg); color: var(--info); }
.pill.used { background: var(--grey-bg); color: var(--ink-2); }
.pill.reuse { background: #FFF1E3; color: #8A4006; }
.pill.prod { background: var(--ok-bg); color: var(--ok); }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.icon-button:hover { border-color: var(--field); background: var(--page); }
.icon-button.done { color: var(--ok); border-color: var(--ok); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* Formulario de nuevo código, debajo de la tabla */
.panel { padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: end; }
.form-foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.form-foot .note { flex: 1 1 320px; }
.form-foot .primary { flex: none; }
.panel .opens { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px; }
#custom { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
#custom[hidden] { display: none; }
.panel-form, #custom { display: flex; flex-direction: column; gap: 18px; }
.panel h2 { font-size: 20px; }
.panel .lead { font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label-row label { font-size: 14px; font-weight: 600; }
.pair .field label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field label .optional { font-weight: 400; color: var(--muted); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
input[type="text"], input[type="password"], input[type="url"], select, textarea { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); background: var(--card); }
textarea { height: auto; padding: 10px 12px; font-family: var(--mono); font-size: 13px; resize: vertical; }
.with-button { display: flex; gap: 8px; }
.with-button input { flex: 1; min-width: 0; font-family: var(--mono); }
.opens { background: var(--page); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.opens b { font-weight: 600; color: var(--muted); }
.opens span { font-family: var(--mono); word-break: break-all; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--night); }

/* Botones */
.primary { height: 48px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--night); color: #FFFFFF; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.primary:hover { background: #142B5C; color: #FFFFFF; }
.primary:disabled { background: #D6DEEA; color: var(--muted); cursor: not-allowed; }
.secondary { height: 44px; padding: 0 14px; border: 1px solid var(--night); border-radius: 10px; background: var(--card); color: var(--night); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.secondary:hover { background: var(--page); color: var(--night); }
.small { height: 32px; padding: 0 10px; font-size: 12px; border-color: var(--field); border-radius: 8px; }

/* Avisos */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.note svg { margin-top: 1px; }
.note.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); }
.note.info { background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.message { padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.5; display: flex; flex-direction: column; gap: 10px; }
.message.progress { background: var(--page); color: var(--ink-2); }
.message.ok { background: var(--ok-bg); color: var(--ok); }
.message.error { background: var(--bad-bg); color: var(--bad); }
.message .link { font-family: var(--mono); font-size: 12px; color: var(--ink); background: var(--card); border-radius: 8px; padding: 8px 10px; word-break: break-all; }
.error-line { color: var(--bad); font-size: 14px; padding: 0 16px 16px; }

/* Descargas */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.dl { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.dl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dl-title { display: flex; gap: 12px; align-items: center; min-width: 0; }
.dl-title h2 { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.dl-title span { font-size: 13px; color: var(--muted); }
.dl-title > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.tile.win { background: var(--info-bg); }
.tile.pilot { background: #FFF1E3; }
.tile.mac { background: var(--grey-bg); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 2px 0 0; word-break: break-all; }
.hash { display: flex; align-items: center; gap: 8px; background: var(--page); border-radius: 10px; padding: 8px 8px 8px 12px; }
.hash > span { font-size: 12px; color: var(--muted); }
.hash code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.dl > .primary, .dl > .secondary { height: 48px; font-size: 15px; }
.soon { border-style: dashed; border-color: var(--field); justify-content: center; align-items: flex-start; gap: 12px; }
.soon p { font-size: 14px; color: var(--muted); }
.verify { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.verify h2 { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.verify p { font-size: 14px; color: var(--ink-2); }
.verify code { display: block; background: var(--night); color: #E6ECF7; border-radius: 10px; padding: 14px 16px; font-family: var(--mono); font-size: 13px; overflow-x: auto; white-space: nowrap; }

/* Entrar */
.split { min-height: 100vh; display: flex; flex-wrap: wrap; }
.hero { flex: 1 1 480px; min-width: 0; background: var(--night); color: #FFFFFF; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; position: relative; overflow: hidden; }
.hero .globe { position: absolute; right: -200px; bottom: -220px; opacity: 0.18; }
.hero > * { position: relative; }
.hero .brand .word { font-size: 18px; }
.hero .brand .sub { font-size: 12px; color: #B9C6DD; }
.hero .brand > div { display: flex; flex-direction: column; }
.pitch { max-width: 460px; display: flex; flex-direction: column; gap: 20px; }
.tag { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #FFD3AE; background: rgba(240, 124, 30, 0.16); border: 1px solid rgba(240, 124, 30, 0.45); border-radius: 999px; padding: 6px 12px; }
.tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.pitch h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; }
.pitch p { font-size: 17px; line-height: 1.6; color: #C9D4E7; }
.fine { font-size: 13px; color: #9FB0CC; }
.signin { flex: 1 1 480px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.signin form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 24px; }
.signin h2 { font-size: 32px; }
.signin .lead { margin-top: 8px; }
.signin input { height: 48px; padding: 0 14px; font-size: 16px; }
.reveal { position: relative; display: flex; }
.reveal input { flex: 1; padding-right: 56px; }
.reveal button { position: absolute; right: 4px; top: 4px; width: 44px; height: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.reveal button[aria-pressed="true"] { color: var(--night); }
.signin .primary { height: 52px; font-size: 16px; }
.alert { padding: 12px 14px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 14px; font-weight: 600; }

@media (max-width: 720px) {
  .top { padding: 12px 16px; }
  .brand .sub { display: none; }
  .brand .bar { display: none; }
  .shell { padding: 16px; gap: 16px; }
  .side { max-width: none; flex-direction: row; flex-basis: 100%; }
  .side a { flex: 1 1 0; justify-content: center; }
  .side a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--orange), 0 1px 2px rgba(10, 26, 58, 0.06); }
  .panel { max-width: none; }
  .search { flex-basis: 100%; min-width: 0; }
  .hero { padding: 32px 24px; gap: 32px; }
  .pitch h1 { font-size: 32px; }
  .signin { padding: 32px 16px; }
}
.message button { align-self: flex-start; }
.soon h2 { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: 0; }
