:root {
  --bg: #F3F6F7; --panel: #FFFFFF; --fg: #13232B; --muted: #5B6E77;
  --line: #DCE4E7; --accent: #0E7C86; --accent-soft: #D6EEF0; --warn: #B4432F;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 14px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
       gap: 10px; padding: 16px; max-width: 1180px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0; font-weight: 600; }
h1 .tld { font-family: var(--mono); color: var(--accent); }
.pill { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px;
        border-radius: 99px; border: 1px solid var(--warn); color: var(--warn); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; display: grid; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
h2 { font-size: 15px; margin: 0; font-weight: 600; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
select, .seg button { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line);
                      background: var(--panel); color: var(--fg); border-radius: 6px; cursor: pointer; }
.seg { display: flex; }
.seg button { border-radius: 0; margin-left: -1px; }
.seg button:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.seg button:last-child { border-radius: 0 6px 6px 0; }
.seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chartbox { position: relative; height: 320px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
              padding: 24px; width: 100%; max-width: 360px; display: grid; gap: 14px; }
.login label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.login input { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line);
               border-radius: 8px; color: var(--fg); }
.login .pill { justify-self: start; }
.btn { font: inherit; font-weight: 600; padding: 10px 14px; border: 0; border-radius: 8px;
       background: var(--accent); color: #fff; cursor: pointer; }
.btn-link { font: inherit; font-size: 13px; background: none; border: 1px solid var(--line);
            border-radius: 6px; padding: 5px 10px; cursor: pointer; color: var(--fg); }
.who { font-size: 13px; font-weight: 500; }
.error { color: var(--warn); font-size: 13px; margin: 0; min-height: 1em; }

body:not([data-role="identity"]) .only-identity { display: none; }
a.btn-link { text-decoration: none; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.form-row label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form-row input, .form-row select { font: inherit; font-size: 14px; padding: 8px 10px;
                                    border: 1px solid var(--line); border-radius: 8px; color: var(--fg); }
.ok { color: #1F8A4C; font-size: 13px; margin: 0; min-height: 1em; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.chartbox.small { height: 240px; }
.muted { font-size: 12.5px; color: var(--muted); }

.range-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
                 color: var(--muted); margin: 20px 0 -6px; }
.section-title:first-child { margin-top: 4px; }
.range-row { margin: 4px 0 16px; }
.subpanel { min-width: 0; }
.subpanel h3 { font-size: 14px; font-weight: 600; margin: 0; }
.subpanel p.muted { margin: 2px 0 10px; }
.panel > p.muted { margin: -4px 0 14px; }

.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.glance .kpi .value { font-size: 30px; font-weight: 700; margin: 6px 0 8px; }
.glance .kpi .sub   { display: block; margin-top: 4px; }
@media (max-width: 900px) {
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .glance { grid-template-columns: 1fr; }
}
  
/* Contenedor centrado */
main.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 32px; }

/* Billings: 3 columnas con separadores */
.billing-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.billing-cards .kpi {
  padding: 18px 24px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.billing-cards .kpi + .kpi { border-left: 1px solid var(--line); }
.billing-cards .kpi .value { font-size: 28px; font-weight: 700; margin: 4px 0 8px; }
.billing-cards .kpi .sub { display: block; margin-top: 6px; }

@media (max-width: 720px) {
  .billing-cards { grid-template-columns: 1fr; }
  .billing-cards .kpi + .kpi { border-left: 0; border-top: 1px solid var(--line); }
}

/* Header en 3 columnas: título | fecha | botones */
header.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.bar-left  { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.bar-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bar-title h1 { margin: 0; }
.bar-right { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }

.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.35;
  font-size: 13px;
  white-space: nowrap;
}
.stamp strong { font-size: 14px; }
.stamp span,
.stamp small  { color: var(--muted); }
.stamp small  { font-size: 11px; }

/* Pantallas estrechas: una debajo de otra */
@media (max-width: 900px) {
  header.bar { grid-template-columns: 1fr; }
  .stamp     { align-items: flex-start; text-align: left; }
  .bar-right { justify-content: flex-start; }
}

/* Header aligned with the page content, with breathing room */
header.bar {
  max-width: 1180px;
  margin: 0 auto 30px;
  padding: 25px 16px 22px;
  border-bottom: 1px solid var(--line);
}
.bar-left { gap: 8px; }
.who { font-size: 13px; color: var(--muted); }

/* Today: three cards side by side */
section.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.kpi .value { font-size: 30px; font-weight: 700; margin: 6px 0 8px; }

@media (max-width: 720px) {
  section.kpis { grid-template-columns: 1fr; }
}

/* At a glance: brand accents (Identity teal, GOA lilac) */
.glance .kpi {
  border-top: 3px solid #016271;
}
.glance .kpi .value {
  color: #016271;
}
.glance .kpi:last-child {            /* GOA share card */
  border-top-color: #e7c0f9;
  background: #fbf5fe;
}
.glance .kpi:last-child .value {
  color: #7a3f96;
}

/* Anguilla's .ai: milestones timeline */
.timeline ol {
  list-style: none;
  margin: 8px 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  position: relative;
}
.timeline ol::before {               /* the line */
  content: '';
  position: absolute;
  left: 0; right: 0; top: 7px;
  height: 2px;
  background: var(--line);
}
.timeline li {
  position: relative;
  padding: 28px 16px 0 0;
}
.timeline li::before {               /* the dot */
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #016271;
  box-shadow: 0 0 0 3px #fff;
}
.timeline li:last-child::before { background: #e7c0f9; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #7a3f96; }
.timeline .year { display: block; font-size: 20px; font-weight: 700; color: #016271; }
.timeline li:last-child .year { color: #7a3f96; }
.timeline .what { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.4; }

@media (max-width: 720px) {        /* mobile: vertical timeline */
  .timeline ol { grid-template-columns: 1fr; }
  .timeline ol::before { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline li { padding: 0 0 18px 30px; }
}
/* Footer signature */
.site-foot {
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 18px 16px 32px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.site-foot span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}
/* Print: clean report, no controls */
@page { size: A4 landscape; margin: 12mm; }
@media print {
  .bar-right, .controls, .seg, select { display: none !important; }
  body { background: #fff; }
  .panel, .kpi, .timeline { break-inside: avoid; box-shadow: none; }
  .glance { grid-template-columns: repeat(4, 1fr); }
}
/* Coming next: future ideas, dashed to show they are not built yet */
.upcoming {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.up-card {
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: transparent;
}
.up-card h3 { margin: 0 0 6px; font-size: 15px; color: #016271; }
.up-card p  { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }

@media (max-width: 900px) { .upcoming { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .upcoming { grid-template-columns: 1fr; } }

/* Hide the page until the session is confirmed */
body.checking { visibility: hidden; }