/* ─── Self-hosted brand fonts (eliminates Google Fonts third-party block) ── */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 900;           /* variable font covers all weights */
  font-display: swap;
  src: url('/static/fonts/dmsans-variable.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/dmmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/dmmono-500.woff2') format('woff2');
}

/* ─── Error pages (404, 500, 413, 429) ──────────────────────────────────── */
.error-page {
  max-width: 520px;
  margin: 80px auto;
  padding: 40px 24px;
  text-align: center;
}
.error-page .error-monogram {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #0d0d1a;
  border: 1px solid rgba(124,111,247,0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.error-page .error-monogram svg { width: 42px; height: 42px; }
.error-page .error-code {
  font-size: 88px;
  font-weight: 700;
  letter-spacing: -4px;
  color: var(--purple);
  line-height: 1;
  margin-bottom: 8px;
}
.error-page .error-title {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.5px;
  margin-bottom: 12px;
}
.error-page .error-msg {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 28px;
}
.error-page .error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.error-page .error-report {
  font-size: 12px;
  color: var(--text3);
}
.error-page .error-report a { color: var(--text2); text-decoration: underline; }

/* ─── A11y: skip-to-content link (visible on keyboard focus only) ──────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--purple);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.15s;
}
.skip-link:focus { top: 8px; outline: 2px solid #fff; outline-offset: 2px; }

/* ─── Legal pages (Privacy, Terms) ──────────────────────────────────────── */
.legal-page {
  max-width: 760px;
  margin: 48px auto;
  padding: 0 24px 80px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}
.legal-page h2 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.3px;
  margin: 40px 0 12px;
}
.legal-page section { margin-bottom: 8px; }
.legal-page p { color: var(--text2); margin: 0 0 14px; }
.legal-page ul { color: var(--text2); padding-left: 22px; margin: 0 0 14px; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--purple); text-decoration: none; }
.legal-page a:hover { text-decoration: underline; }
.legal-page strong { color: #fff; font-weight: 600; }

/* ─── Oratus Dark Theme ────────────────────────────────────────────────────── */

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #e8e8f0;
  --text2: #9090a8;
  --text3: #5a5a72;
  --purple: #7c6ff7;
  --purple2: #5a54c4;
  --purple-bg: rgba(124,111,247,0.1);
  --green: #2dd4a0;
  --green-bg: rgba(45,212,160,0.08);
  --amber: #f5a623;
  --amber-bg: rgba(245,166,35,0.08);
  --red: #f06060;
  --red-bg: rgba(240,96,96,0.08);
  --blue: #60a8f0;
  --blue-bg: rgba(96,168,240,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--purple); text-decoration: none; }
a:hover { color: #9a90ff; }

/* ─── Navigation ─────────────────────────────────────────────────────────── */

.nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.5px;
  color: #fff;
  flex-shrink: 0;
}
.nav-logo span { color: var(--purple); }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all .15s;
}
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.active { color: var(--purple); background: var(--purple-bg); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-user {
  font-size: 12px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
}

.nav-logout {
  color: var(--text3) !important;
  font-size: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text2);
  border-radius: 1px;
}

/* ─── Page layout ────────────────────────────────────────────────────────── */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.3px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text3);
  margin-top: 4px;
}

/* ─── Flash messages ─────────────────────────────────────────────────────── */

.flash-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px 0;
}

.flash {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fadeUp .3s ease;
}

.flash-error {
  background: var(--red-bg);
  border: 1px solid rgba(240,96,96,0.2);
  color: var(--red);
}

.flash-success {
  background: var(--green-bg);
  border: 1px solid rgba(45,212,160,0.2);
  color: var(--green);
}

.flash-info {
  background: var(--blue-bg);
  border: 1px solid rgba(96,168,240,0.2);
  color: var(--blue);
}

.flash-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  opacity: .6;
  padding: 0 4px;
}
.flash-close:hover { opacity: 1; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.card-meta {
  font-size: 11px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
}

/* ─── Stat grid ──────────────────────────────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}

.stat-label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
}

.stat-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
}

/* ─── Score general (big card) ───────────────────────────────────────────── */

.score-general {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sg-label { font-size: 12px; color: var(--text3); margin-bottom: 4px; }
.sg-session { font-size: 13px; color: var(--text2); }
.sg-num { font-size: 42px; font-weight: 600; line-height: 1; }
.sg-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }
.sg-weights { font-size: 11px; color: var(--text3); margin-top: 4px; font-family: 'DM Mono', monospace; }

/* ─── Score colors ───────────────────────────────────────────────────────── */

.score-red { color: var(--red); }
.score-amber { color: var(--amber); }
.score-green { color: var(--green); }
.score-blue { color: var(--blue); }

/* ─── Layer sections ─────────────────────────────────────────────────────── */

.layer-section { margin-bottom: 16px; }

.layer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.layer-emoji { font-size: 16px; }
.layer-name { font-size: 13px; font-weight: 500; color: #fff; }
.layer-avg { font-size: 12px; color: var(--text3); margin-left: auto; font-family: 'DM Mono', monospace; }

.score-grid-layer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

/* ─── Score cards ────────────────────────────────────────────────────────── */

.score-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .2s;
}
.score-card:hover { border-color: var(--border2); }
.score-card.expanded { border-color: rgba(124,111,247,0.3); }
.score-card.coming-soon { opacity: .45; cursor: default; }

.sc-label { font-size: 11px; color: var(--text3); margin-bottom: 6px; text-transform: capitalize; }
.sc-num-row { display: flex; align-items: baseline; gap: 6px; }
.sc-num { font-size: 20px; font-weight: 600; }

.sc-bar { height: 3px; background: var(--border2); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.sc-bar-fill { height: 100%; border-radius: 2px; transition: width .8s ease; }

.sc-diag { font-size: 12px; color: var(--text2); margin-top: 8px; line-height: 1.55; }

.sc-detail { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.score-card.expanded .sc-detail { display: block; }

.sc-detail-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text3);
  margin-bottom: 5px;
  margin-top: 8px;
}
.sc-detail-label:first-child { margin-top: 0; }

.sc-evidence {
  font-size: 11px;
  color: var(--text2);
  padding: 2px 0 2px 10px;
  position: relative;
  line-height: 1.55;
}
.sc-evidence::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text3);
}

.sc-accion { font-size: 12px; color: var(--green); line-height: 1.55; }
.sc-libros { font-size: 11px; color: var(--purple); padding: 2px 0; }
.sc-coming { font-size: 11px; color: var(--text3); font-style: italic; margin-top: 4px; }

/* ─── Dynamic scores ─────────────────────────────────────────────────────── */

.dynamic-section { margin-bottom: 20px; }

.dynamic-badge {
  font-size: 10px;
  font-weight: 500;
  border-radius: 4px;
  padding: 2px 6px;
  background: rgba(124,111,247,0.15);
  color: var(--purple);
  font-family: 'DM Mono', monospace;
}

/* ─── Section titles ─────────────────────────────────────────────────────── */

.sec {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

/* ─── Insights ───────────────────────────────────────────────────────────── */

.insight {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border: 1px solid;
}

.ins-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 4px;
}
.ins-title { font-size: 13px; font-weight: 500; color: #fff; margin-bottom: 5px; }
.ins-desc { font-size: 12px; line-height: 1.65; }
.ins-meta { display: flex; gap: 10px; margin-top: 7px; flex-wrap: wrap; }
.ins-ref { font-size: 11px; opacity: .6; font-style: italic; }
.ins-min { font-size: 11px; font-family: 'DM Mono', monospace; opacity: .5; }

.i-critico { background: var(--red-bg); border-color: rgba(240,96,96,0.2); }
.i-critico .ins-type { color: var(--red); }
.i-critico .ins-desc { color: #d4a0a0; }

.i-atencion { background: var(--amber-bg); border-color: rgba(245,166,35,0.2); }
.i-atencion .ins-type { color: var(--amber); }
.i-atencion .ins-desc { color: #c4a880; }

.i-logro { background: var(--green-bg); border-color: rgba(45,212,160,0.2); }
.i-logro .ins-type { color: var(--green); }
.i-logro .ins-desc { color: #90c4b4; }

.i-mejora { background: var(--blue-bg); border-color: rgba(96,168,240,0.2); }
.i-mejora .ins-type { color: var(--blue); }
.i-mejora .ins-desc { color: #90b4d4; }

/* ─── Books ──────────────────────────────────────────────────────────────── */

.book {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.book-spine { width: 4px; border-radius: 2px; background: var(--purple); flex-shrink: 0; }
.book-title { font-size: 13px; font-weight: 500; color: #fff; margin-bottom: 2px; }
.book-author { font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.book-concept { font-size: 12px; color: var(--purple); margin-bottom: 4px; font-weight: 500; }
.book-razon { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.book-app { font-size: 11px; color: var(--green); line-height: 1.55; }

/* ─── Habit card ─────────────────────────────────────────────────────────── */

.habit {
  background: var(--purple-bg);
  border: 1px solid rgba(124,111,247,0.2);
  border-radius: 12px;
  padding: 16px 18px;
}

.habit-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--purple);
  margin-bottom: 6px;
}

.habit-capa {
  font-size: 10px;
  background: rgba(124,111,247,0.15);
  color: var(--purple);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 8px;
  font-family: 'DM Mono', monospace;
}

.habit-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.habit-desc { font-size: 12px; color: #b0a8f0; line-height: 1.6; margin-bottom: 8px; }
.habit-measure { font-size: 11px; color: var(--text3); font-style: italic; }

/* ─── Minuta ─────────────────────────────────────────────────────────────── */

.minuta {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.min-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.min-title { font-size: 13px; font-weight: 500; color: #fff; }

.min-section { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.min-section:last-child { border-bottom: none; }

.min-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text3);
  margin-bottom: 7px;
}

.min-item {
  font-size: 12px;
  color: var(--text2);
  padding: 3px 0 3px 12px;
  position: relative;
  line-height: 1.55;
}
.min-item::before {
  content: "\00B7";
  position: absolute;
  left: 0;
  color: var(--text3);
}

.email-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text2);
  white-space: pre-wrap;
  line-height: 1.8;
}

/* ─── Patterns ───────────────────────────────────────────────────────────── */

.pattern {
  font-size: 12px;
  color: var(--text2);
  padding: 7px 12px;
  background: var(--bg3);
  border-radius: 8px;
  border-left: 2px solid var(--purple);
  margin-bottom: 6px;
  line-height: 1.55;
}

/* ─── Tags ───────────────────────────────────────────────────────────────── */

.tag {
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  padding: 3px 9px;
  display: inline-block;
}

.tag-prospeccion { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(96,168,240,0.2); }
.tag-demo { background: var(--purple-bg); color: var(--purple); border: 1px solid rgba(124,111,247,0.2); }
.tag-negociacion { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(245,166,35,0.2); }
.tag-renovacion { background: var(--green-bg); color: var(--green); border: 1px solid rgba(45,212,160,0.2); }

/* ─── Forms ──────────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--purple);
}

.form-input::placeholder { color: var(--text3); }

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%235a5a72' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .2px;
}

.btn-primary {
  background: var(--purple);
  color: #fff;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
}
.btn-primary:hover { background: var(--purple2); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border2); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  padding: 6px 12px;
}
.btn-ghost:hover { color: var(--text); }

/* ─── Drop zone (file upload) ────────────────────────────────────────────── */

.drop-zone {
  border: 2px dashed var(--border2);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 16px;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--purple);
  background: var(--purple-bg);
}

.drop-zone-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: .6;
}

.drop-zone-text {
  font-size: 13px;
  color: var(--text3);
}
.drop-zone-text strong { color: var(--text2); }

.drop-zone-formats {
  font-size: 11px;
  color: var(--text3);
  margin-top: 6px;
  font-family: 'DM Mono', monospace;
}

/* ─── Feedback buttons ───────────────────────────────────────────────────── */

.feedback-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.feedback-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg3);
  font-size: 18px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feedback-btn:hover { border-color: var(--border2); transform: scale(1.1); }
.feedback-btn.active { border-color: var(--purple); background: var(--purple-bg); }

/* ─── Session list ───────────────────────────────────────────────────────── */

.session-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all .15s;
  text-decoration: none;
  color: var(--text);
}
.session-row:hover {
  border-color: var(--border2);
  background: var(--bg3);
  color: var(--text);
}

.session-score {
  font-size: 18px;
  font-weight: 600;
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}

.session-info { flex: 1; min-width: 0; }
.session-empresa { font-size: 13px; font-weight: 500; color: #fff; }
.session-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }

.session-arrow {
  color: var(--text3);
  font-size: 16px;
  flex-shrink: 0;
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  border: 1px solid var(--border);
  background: var(--bg2);
  text-decoration: none;
  transition: all .15s;
}
.pagination a:hover { border-color: var(--border2); color: var(--text); }
.pagination .active { background: var(--purple-bg); border-color: rgba(124,111,247,0.3); color: var(--purple); }

/* ─── Filter tabs ────────────────────────────────────────────────────────── */

.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.filter-tab:hover { border-color: var(--border2); color: var(--text); }
.filter-tab.active { background: var(--purple-bg); border-color: rgba(124,111,247,0.3); color: var(--purple); }

/* ─── Auth pages ─────────────────────────────────────────────────────────── */

.auth-page {
  max-width: 420px;
  margin: 0 auto;
  padding-top: 80px;
}

.auth-logo {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -.5px;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
}
.auth-logo span { color: var(--purple); }

.auth-subtitle {
  font-size: 13px;
  color: var(--text3);
  text-align: center;
  margin-bottom: 32px;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  font-size: 11px;
  color: var(--text3);
}

.oauth-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.oauth-btn:hover { border-color: var(--border2); background: var(--bg2); }

.oauth-icon {
  width: 18px;
  height: 18px;
}

.auth-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text3);
}
.auth-footer a { color: var(--purple); }

/* ─── Empty state ────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text3);
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: .5;
}

.empty-text {
  font-size: 14px;
  margin-bottom: 16px;
}

/* ─── Loading spinner ────────────────────────────────────────────────────── */

.loading {
  text-align: center;
  padding: 48px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 14px;
}

.loading-text {
  font-size: 13px;
  color: var(--text3);
}

/* ─── Error pages ────────────────────────────────────────────────────────── */

.error-page {
  text-align: center;
  padding-top: 120px;
}

.error-code {
  font-size: 64px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 8px;
}

.error-msg {
  font-size: 16px;
  color: var(--text2);
  margin-bottom: 24px;
}

/* ─── Animations ─────────────────────────────────────────────────────────── */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeUp .4s ease forwards; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-right { display: none; }

  .page { padding: 20px 16px 60px; }

  .stat-grid { grid-template-columns: 1fr 1fr; }
  .score-grid-layer { grid-template-columns: 1fr; }

  .score-general { flex-direction: column; text-align: center; gap: 12px; }

  .session-row { flex-wrap: wrap; }

  .auth-page { padding-top: 40px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ─── Score qualitative label ─────────────────────────────────────────────── */

.sg-qual {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .3px;
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
}

.sg-qual-red    { color: var(--red); }
.sg-qual-amber  { color: var(--amber); }
.sg-qual-yellow { color: #e0c85c; }
.sg-qual-green  { color: var(--green); }
.sg-qual-blue   { color: var(--blue); }

/* ─── Toggle switch ───────────────────────────────────────────────────────── */

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: background .2s, border-color .2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: var(--text3);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--purple);
  border-color: var(--purple);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}

/* ─── Print / PDF export ──────────────────────────────────────────────────
   When the user prints to PDF from the browser, we want a clean, light-on-white
   layout with no scroll boxes, no cut-off content, and sections that don't break
   across pages mid-sentence. */
@media print {
  html, body {
    background: #fff !important;
    color: #000 !important;
  }

  /* Hide anything that doesn't belong on a printed/saved report */
  nav, .nav, .navbar, header nav,
  .btn, button, .feedback-row,
  .page-footer, footer {
    display: none !important;
  }

  /* Show the full transcription — no scroll, no cut-off */
  pre, .transcription, .email-block {
    max-height: none !important;
    overflow: visible !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
  }

  /* Don't split these elements across pages */
  .score-card, .min-section, .card, .pattern,
  .insight, .libro, .habito, .minuta {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Readable text on paper */
  .sc-num, .score-general-number { color: #000 !important; }
  .sc-diag, .sc-evidence, .sc-libros, .sc-accion,
  .min-item, .min-label, .email-block {
    color: #222 !important;
  }

  /* Keep color bars visible (forces Chrome to print background colors) */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  /* Generous margins and sensible page setup */
  @page { margin: 18mm 14mm; }
}
