/* AndesGrid Hub · panel. Mismos tokens que andesgrid.cl (assets/site.css):
   motivo unico el hexagono, verde #00B86B, Manrope display + Inter texto. */
:root {
  --ground: #FFFFFF;
  --surface: #F3F4F6;
  --surface-2: #E5E7EB;
  --ink: #0B1220;
  --ink-2: #111827;
  --muted: #374151;
  --accent: #00B86B;
  --accent-text: #00804A;
  --earth: #D6CFC4;
  --danger: #E5484D;
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-text: 'Inter', system-ui, sans-serif;
  --hex: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  --hex-btn: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/1.55 var(--font-text); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; margin: 0; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.04; }
h2 { font-size: 22px; }
h3 { font-size: 17px; letter-spacing: -0.02em; }
a { color: var(--accent-text); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(16px, 3vw, 32px); }

/* Barra */
.bar { background: var(--ground); border-bottom: 1px solid var(--surface-2); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 24px/1 var(--font-display); letter-spacing: -0.04em; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { font: 600 15px/1 var(--font-text); color: var(--ink); text-decoration: none; padding: 6px 0; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.nav .quien { color: var(--muted); font-size: 14px; }

/* Bloques */
main { padding-block: clamp(24px, 4vw, 44px) 80px; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.head p { color: var(--muted); max-width: 64ch; }
.card { background: var(--ground); border: 1px solid var(--surface-2); padding: clamp(16px, 2.4vw, 28px); margin-bottom: 24px; }
.card > h2, .card > h3 { margin-bottom: 4px; }
.card .hint { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }

/* Formularios */
.form { display: grid; gap: 14px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
label { display: grid; gap: 6px; font: 600 13px/1.2 var(--font-text); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
input, select { font: 400 16px/1 var(--font-text); color: var(--ink); background: var(--ground); border: 1px solid var(--surface-2); padding: 12px 14px; min-height: 46px; }
input:focus, select:focus { border-color: var(--accent-text); outline: none; }
.check { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); }
.check input { min-height: 0; width: 18px; height: 18px; accent-color: var(--accent-text); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 28px; border: 0; background: var(--accent); color: var(--ink); font: 700 15px/1 var(--font-display); text-decoration: none; clip-path: var(--hex-btn); cursor: pointer; transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--small { min-height: 36px; padding: 0 18px; font-size: 13px; }
.btn--plain { background: transparent; color: var(--accent-text); clip-path: none; text-decoration: underline; padding: 0 6px; min-height: 36px; }
.btn--danger { background: transparent; color: var(--danger); clip-path: none; text-decoration: underline; padding: 0 6px; min-height: 36px; }
@media (hover: hover) { .btn:hover { background: var(--ink); color: #fff; } .btn--ink:hover { background: var(--accent); color: var(--ink); } .btn--plain:hover, .btn--danger:hover { background: var(--surface); } }

/* Tablas */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
thead th { text-align: left; font: 600 12px/1.2 var(--font-text); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 12px 10px 0; border-bottom: 1px solid var(--surface-2); white-space: nowrap; }
tbody td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--surface); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.sub { color: var(--muted); font-size: 13px; }
.tabla-scroll { overflow-x: auto; }

/* Estado */
.estado { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.punto { width: 12px; height: 13px; background: var(--accent); clip-path: var(--hex); flex: none; }
.estado--mudo .punto { background: var(--earth); }
.estado--nunca .punto { background: var(--surface-2); }

/* Avisos */
.aviso { padding: 14px 18px; margin-bottom: 20px; border-left: 4px solid var(--accent); background: var(--ground); font-size: 15px; }
.aviso--error { border-left-color: var(--danger); }
.clave { display: block; margin-top: 10px; padding: 14px; background: var(--ink); color: #fff; word-break: break-all; }
.vacio { color: var(--muted); padding: 10px 0; }

/* Login */
.login { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.login main { padding: 0; }
.login .wrap { padding-inline: 0; }
.login .card { width: min(420px, 100%); margin: 0; }
.login .brand { margin-bottom: 20px; font-size: 28px; }
