/* NOESSO Demo · sistema visual */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Superficies y texto */
  --c-bg: #f4f6f7;
  --c-surface: #ffffff;
  --c-surface-2: #fbfcfc;
  --c-border: #e2e8ee;
  --c-border-strong: #cbd5de;
  --c-text: #0f1a24;
  --c-text-2: #3c4956;
  --c-muted: #6a7785;

  /* Marca */
  --c-primary: #0d5f5f;
  --c-primary-700: #0a4949;
  --c-primary-800: #073a3a;
  --c-primary-50: #e8f2f1;
  --c-primary-100: #d0e4e2;

  /* Acento cálido (uso parsimonioso) */
  --c-accent: #b76d22;
  --c-accent-soft: #faecd9;

  /* Estado */
  --c-danger: #b3261e;
  --c-danger-soft: #fdecea;
  --c-success: #1e7d4a;
  --c-success-soft: #e6f4ec;
  --c-warning: #8a5a00;
  --c-warning-soft: #fff4d6;
  --c-info: #1c4e80;
  --c-info-soft: #e6eef7;

  /* Radios */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 5px;

  /* Sombras */
  --shadow-xs: 0 1px 1px rgba(15, 26, 36, 0.04);
  --shadow-sm: 0 1px 2px rgba(15, 26, 36, 0.05), 0 1px 3px rgba(15, 26, 36, 0.04);
  --shadow-md: 0 6px 18px rgba(15, 26, 36, 0.08);
  --shadow-lg: 0 18px 40px rgba(15, 26, 36, 0.14);

  /* Tipografía */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

/* El atributo [hidden] debe ganar a cualquier display posterior. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01";
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

a { color: var(--c-primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--c-primary-700); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  margin: 0 0 .5rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--c-text);
  line-height: 1.25;
}
h1 { font-size: 1.85rem; letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 .75rem; color: var(--c-text-2); }

.muted { color: var(--c-muted); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: var(--c-primary);
  font-weight: 600;
  margin: 0 0 .4rem;
}

::selection { background: var(--c-primary-100); color: var(--c-primary-800); }

/* Focus visible coherente */
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ---------- Layout ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--c-border);
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
  flex: 1;
}

.footer {
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  text-align: center;
  padding: 1rem 1.25rem;
  color: var(--c-muted);
  font-size: .85rem;
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--c-text);
  font-weight: 600;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-800));
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.18);
}
.brand-mark svg { width: 60%; height: 60%; }
.brand-mark-lg { width: 64px; height: 64px; border-radius: 14px; }

.brand-name {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.brand-sub {
  display: block;
  font-size: .72rem;
  color: var(--c-muted);
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* ---------- Topbar derecha ---------- */
.topbar-actions { display: inline-flex; align-items: center; gap: .9rem; }
.inline { display: inline; margin: 0; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .25rem .65rem .25rem .25rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 999px;
}
.user-chip:hover { border-color: var(--c-border-strong); }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--c-primary-50);
  color: var(--c-primary-700);
  font-weight: 600;
  font-size: .82rem;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-chip-name { font-size: .87rem; font-weight: 500; color: var(--c-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: .6rem 1.05rem;
  font: inherit;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease,
              color .15s ease, transform .12s ease, box-shadow .15s ease;
}
a.btn:hover { text-decoration: none; }  /* gana al a:hover global */
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary,
a.btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-primary:hover:not(:disabled),
a.btn-primary:hover {
  background: var(--c-primary-700);
  color: #fff;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.12);
}

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border-strong);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--c-primary-50);
  border-color: var(--c-primary);
  color: var(--c-primary-700);
}

.btn-subtle {
  background: var(--c-surface);
  color: var(--c-text-2);
  border-color: var(--c-border);
}
.btn-subtle:hover:not(:disabled) { background: var(--c-surface-2); color: var(--c-text); }

.btn-block { width: 100%; }
.btn .icon { width: 16px; height: 16px; }

/* ---------- Flash messages ---------- */
.flashes { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.flash {
  padding: .7rem .95rem;
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
  border: 1px solid transparent;
  font-size: .92rem;
  display: flex;
  align-items: flex-start;
  gap: .55rem;
}
.flash::before {
  content: "";
  flex-shrink: 0;
  width: 8px; height: 8px;
  margin-top: .45rem;
  border-radius: 50%;
  background: currentColor;
}
.flash-success { background: var(--c-success-soft); color: var(--c-success); border-color: #c8e7d4; }
.flash-error   { background: var(--c-danger-soft);  color: var(--c-danger);  border-color: #f3c2bd; }
.flash-warning { background: var(--c-warning-soft); color: var(--c-warning); border-color: #ecd7a0; }
.flash-info,
.flash-message { background: var(--c-info-soft); color: var(--c-info); border-color: #c6d6ea; }

/* ---------- Auth ---------- */
.auth-page { background: var(--c-bg); }

.auth-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.auth-aside {
  position: relative;
  overflow: hidden;
  padding: 3rem 3.25rem;
  color: #eaf3f2;
  background:
    radial-gradient(1200px 600px at 110% -10%, rgba(255,255,255,.12), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(160deg, var(--c-primary-700) 0%, var(--c-primary-800) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at 30% 30%, #000 25%, transparent 70%);
  pointer-events: none;
}
.auth-aside-inner { position: relative; z-index: 1; max-width: 460px; }
.auth-aside h2 {
  color: #fff;
  font-size: 1.85rem;
  margin: 2.25rem 0 1rem;
  letter-spacing: -0.018em;
  line-height: 1.2;
}
.auth-aside p { color: rgba(234, 243, 242, 0.85); margin-bottom: 0; }
.auth-aside .feature-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: .75rem;
}
.auth-aside .feature-list li {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  color: rgba(234, 243, 242, 0.9);
  font-size: .94rem;
}
.auth-aside .feature-list svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #7dd3c6;
}
.auth-aside .aside-foot {
  position: relative;
  z-index: 1;
  font-size: .78rem;
  color: rgba(234, 243, 242, 0.65);
  letter-spacing: .03em;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--c-bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
}
.auth-card h1 {
  font-size: 1.55rem;
  margin: 0 0 .35rem;
}
.auth-card .subtitle {
  color: var(--c-muted);
  margin: 0 0 1.75rem;
  font-size: .94rem;
}

.auth-card form { display: flex; flex-direction: column; }
.auth-card label {
  font-weight: 500;
  font-size: .85rem;
  color: var(--c-text-2);
  margin: .9rem 0 .35rem;
}
.auth-card label:first-of-type { margin-top: 0; }

.input {
  font: inherit;
  font-size: .95rem;
  padding: .7rem .85rem;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-text);
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.input:hover { border-color: #b3bfca; }
.input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-50);
}
.input::placeholder { color: #9aa6b2; }

.auth-card .btn { margin-top: 1.4rem; }
.auth-foot {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .82rem;
  color: var(--c-muted);
}

/* ---------- Dashboard ---------- */
.hero {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--c-border);
}
.hero h1 { font-size: 1.7rem; }

.cards {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--c-border-strong); }
.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--c-primary-50);
  color: var(--c-primary-700);
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-bottom: .9rem;
}
.card-icon svg { width: 20px; height: 20px; }
.card h2 { font-size: 1.08rem; margin-bottom: .3rem; }
.card .card-body { color: var(--c-text-2); font-size: .94rem; flex: 1; }
.card .card-cta { margin-top: 1.1rem; display: flex; gap: .5rem; align-items: center; }
.card .hint {
  margin: .75rem 0 0;
  font-size: .78rem;
  color: var(--c-muted);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  display: inline-block;
}

/* Tags por área */
.tag {
  display: inline-flex;
  align-items: center;
  padding: .2rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  background: var(--c-primary-50);
  color: var(--c-primary-700);
  border: 1px solid var(--c-primary-100);
}
.tag-adicciones { background: #fbe9e6; color: #8a2a23; border-color: #f3c2bd; }
.tag-menores    { background: #e6eef7; color: #1c4e80; border-color: #c6d6ea; }
.tag-gestion    { background: var(--c-primary-50); color: var(--c-primary-700); border-color: var(--c-primary-100); }

/* Aviso RGPD */
.notice {
  margin-top: 2.25rem;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(180deg, var(--c-primary-50), #f3f8f7);
  border: 1px solid var(--c-primary-100);
  border-radius: var(--radius);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.notice svg {
  width: 22px; height: 22px;
  color: var(--c-primary-700);
  flex-shrink: 0;
  margin-top: 2px;
}
.notice h3 {
  color: var(--c-primary-800);
  font-size: .98rem;
  margin: 0 0 .25rem;
}
.notice p { margin: 0; font-size: .9rem; color: var(--c-text-2); }

/* ---------- Page head ---------- */
.page-head { margin-bottom: 1.75rem; }
.page-head h1 { margin: .25rem 0 .5rem; }
.back-link {
  color: var(--c-muted);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.back-link:hover { color: var(--c-primary-700); }

/* ---------- Dropzone ---------- */
.dropzone {
  position: relative;
  display: block;
  border: 2px dashed var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.dropzone:hover { border-color: var(--c-primary); background: var(--c-primary-50); }
.dropzone:focus-visible { border-color: var(--c-primary); }
.dropzone.is-drag {
  border-color: var(--c-primary);
  background: var(--c-primary-50);
  transform: scale(1.005);
}
.dropzone.is-error { border-color: var(--c-danger); background: var(--c-danger-soft); }

.dz-icon { width: 38px; height: 38px; color: var(--c-primary); margin-bottom: .75rem; }
.dz-icon-file { color: var(--c-primary-700); }

.dropzone p { margin: .25rem 0; }
.dropzone .dz-formats { font-size: .82rem; }
.dz-filename { font-weight: 600; word-break: break-all; }
.dz-meta { font-size: .85rem; }

.dz-error {
  margin: .65rem 0 0;
  font-size: .88rem;
  color: var(--c-danger);
}

.btn-sm { padding: .35rem .7rem; font-size: .82rem; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: 1.25rem;
}

/* ---------- Progress overlay ---------- */
.progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 36, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.progress-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem 2rem 1.75rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.progress-card h2 { margin: .25rem 0 .5rem; font-size: 1.1rem; }

.spinner {
  width: 36px; height: 36px;
  margin: 0 auto .9rem;
  border-radius: 50%;
  border: 3px solid var(--c-primary-100);
  border-top-color: var(--c-primary);
  animation: nspin .9s linear infinite;
}
@keyframes nspin { to { transform: rotate(360deg); } }

.progress-bar {
  margin-top: 1.1rem;
  height: 6px;
  background: var(--c-primary-50);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0;
  background: var(--c-primary);
  transition: width .15s ease;
}
.progress-bar-fill.indeterminate {
  width: 40% !important;
  animation: nbar 1.2s ease-in-out infinite;
  background: linear-gradient(90deg,
    var(--c-primary) 0%, var(--c-primary-700) 50%, var(--c-primary) 100%);
}
@keyframes nbar {
  0%   { margin-left: -40%; }
  100% { margin-left: 100%; }
}

/* ---------- Detail (transcripción) ---------- */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.meta-item { display: flex; flex-direction: column; gap: .25rem; }
.meta-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-muted);
  font-weight: 600;
}
.meta-value { font-weight: 500; color: var(--c-text); }

.panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface-2);
}
.panel-head h2 { margin: 0; font-size: 1.02rem; }
.panel-actions { display: flex; gap: .5rem; }

.transcript {
  padding: 1.25rem 1.5rem 1.5rem;
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: .97rem;
  color: var(--c-text);
  max-height: 60vh;
  overflow-y: auto;
}

.report-card { max-width: 100%; }

/* ---------- Informe IA (panel ampliado de detail) ---------- */
.report-panel .panel-head {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .75rem;
}
.panel-sub {
  margin: .35rem 0 0;
  font-size: .85rem;
}
.panel-sub code {
  background: var(--c-primary-50);
  color: var(--c-primary-700);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .82em;
}

.report-loading {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--c-text-2);
}
.report-loading .spinner { margin-bottom: .75rem; }
.report-loading p { margin: .15rem 0; }
.small { font-size: .85rem; }

.report-render {
  padding: 1.5rem 1.75rem 1.75rem;
  line-height: 1.65;
  color: var(--c-text);
}
.report-render h1,
.report-render h2,
.report-render h3 {
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--c-primary-800);
}
.report-render h1 { font-size: 1.3rem; margin: 1.5rem 0 .5rem; }
.report-render h2 {
  font-size: 1.02rem;
  margin: 1.5rem 0 .35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-border);
}
.report-render h2:first-child { padding-top: 0; border-top: none; margin-top: 0; }
.report-render h3 { font-size: .94rem; margin: 1rem 0 .25rem; color: var(--c-text); }

.report-render p { margin: 0 0 .8rem; color: var(--c-text); }
.report-render strong { color: var(--c-text); }
.report-render em { color: var(--c-text-2); }

.report-render ul,
.report-render ol {
  margin: .25rem 0 .85rem;
  padding-left: 1.5rem;
}
.report-render li { margin-bottom: .25rem; }

.report-render blockquote {
  margin: .5rem 0 1rem;
  padding: .5rem 1rem;
  background: var(--c-primary-50);
  border-left: 3px solid var(--c-primary);
  border-radius: var(--radius-xs);
  color: var(--c-text-2);
}

/* ---------- Tabs (página de detalle) ---------- */
.tabs {
  display: flex;
  gap: .15rem;
  border-bottom: 1px solid var(--c-border);
  margin: .25rem 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 1.1rem;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 500;
  font-size: .95rem;
  color: var(--c-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.tab:hover { color: var(--c-text); }
.tab.is-active {
  color: var(--c-primary-700);
  border-bottom-color: var(--c-primary);
}
.tab-icon { width: 16px; height: 16px; flex-shrink: 0; }
.tab-badge {
  background: var(--c-success-soft);
  color: var(--c-success);
  font-size: .68rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
}

.tab-panel { animation: tabFadeIn .2s ease; }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Evaluación IA ---------- */
.eval-content {
  padding: 1.25rem 1.25rem 1.5rem;
  display: grid;
  gap: 1.1rem;
}
.eval-grid {
  display: grid;
  gap: 1.1rem;
}
.eval-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) {
  .eval-grid-2 { grid-template-columns: 1fr; }
}

.eval-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.35rem 1.35rem;
  box-shadow: var(--shadow-xs);
}
.eval-card h3 {
  font-size: .9rem;
  font-weight: 600;
  margin: 0 0 .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-muted);
}
.eval-card .muted { font-size: .9rem; }
.eval-card .small { font-size: .82rem; }

.eval-risk-card { display: flex; flex-direction: column; }

.eval-gauge-container {
  position: relative;
  height: 130px;
  width: 100%;
}
.eval-gauge-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: .15rem;
  pointer-events: none;
}
.eval-gauge-value {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--c-text);
  letter-spacing: -0.02em;
}
.eval-gauge-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  margin-top: .45rem;
  padding: .18rem .65rem;
  border-radius: 999px;
}
.eval-gauge-label.risk-bajo  { background: var(--c-success-soft); color: var(--c-success); }
.eval-gauge-label.risk-medio { background: var(--c-warning-soft); color: var(--c-warning); }
.eval-gauge-label.risk-alto  { background: var(--c-danger-soft);  color: var(--c-danger); }

.eval-chart-container { position: relative; width: 100%; }
.eval-chart-sm { height: 180px; }
.eval-chart-md { height: 220px; }

.eval-indicators-detail {
  margin-top: 1rem;
  display: grid;
  gap: .55rem;
}
.eval-indicator-row {
  font-size: .88rem;
  color: var(--c-text-2);
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--c-border);
}
.eval-indicator-row:last-child { border-bottom: none; padding-bottom: 0; }
.eval-indicator-row strong { color: var(--c-text); margin-right: .4rem; }
.eval-indicator-score {
  display: inline-block;
  font-weight: 600;
  margin-right: .55rem;
  font-variant-numeric: tabular-nums;
}

.eval-patterns { list-style: none; padding: 0; margin: 0; }
.eval-patterns li {
  padding: .65rem 0;
  border-bottom: 1px solid var(--c-border);
  font-size: .92rem;
}
.eval-patterns li:last-child { border-bottom: none; }
.eval-patterns strong {
  display: block;
  color: var(--c-text);
  margin-bottom: .2rem;
}
.eval-patterns .muted { display: block; }

.eval-summary-card {
  background: linear-gradient(180deg, var(--c-primary-50), #f3f8f7);
  border-color: var(--c-primary-100);
}
.eval-summary-card h3 { color: var(--c-primary-700); }
.eval-summary-card p {
  margin: 0;
  font-size: .96rem;
  color: var(--c-text);
  line-height: 1.55;
}

.eval-disclaimer {
  font-size: .8rem;
  text-align: center;
  font-style: italic;
  margin: .5rem 0 0;
}

/* ---------- Páginas de error ---------- */
.error-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}
.error-card {
  text-align: center;
  max-width: 480px;
  padding: 2rem 1.75rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.error-card .eyebrow { letter-spacing: .14em; }
.error-card h1 { margin: .5rem 0 .75rem; font-size: 1.6rem; }
.error-card .muted { margin: 0 0 1.5rem; }
.error-actions { display: flex; justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside {
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .auth-aside h2 { font-size: 1.4rem; margin-top: 1.25rem; }
  .auth-aside .feature-list { display: none; }
  .auth-aside .aside-foot { display: none; }
}

@media (max-width: 560px) {
  .topbar { padding: .75rem 1rem; }
  .container { padding: 1.5rem 1rem 2.5rem; }
  .user-chip-name { display: none; }
  h1 { font-size: 1.45rem; }
}
