
    :root {
      --primary: #003a75;
      --primary-dark: #001d3d;
      --primary-light: #e6f0fa;
      --accent: #00b4a6;
      --accent-dark: #00877b;
      --amber: #f59e0b;
      --bg: #f0f4fa;
      --surface: rgba(255,255,255,0.92);
      --text: #1a2232;
      --text-secondary: #4a5568;
      --muted: #6b7a99;
      --border: rgba(0,58,117,0.1);
      --danger: #b3261e;
      --success: #0f7b3b;
      --card-radius: 16px;
      --topbar-h: 60px;
      --shadow-sm: 0 2px 8px rgba(0,30,80,0.07);
      --shadow-md: 0 8px 24px rgba(0,30,80,0.1);
      --shadow-lg: 0 20px 50px rgba(0,30,80,0.14);
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: 'Inter', system-ui, -apple-system, sans-serif;
      background: var(--bg);
      background-image:
        radial-gradient(at 0% 0%, rgba(0,180,166,0.07) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0,58,117,0.06) 0px, transparent 50%);
      background-attachment: fixed;
      color: var(--text);
      line-height: 1.55;
      min-height: 100vh;
      font-feature-settings: 'cv02','cv03','cv04','cv11';
    }

    /* ========== TOPBAR ========== */
    .topbar {
      position: sticky;
      top: 0;
      z-index: 100;
      height: var(--topbar-h);
      background: var(--primary-dark);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 0 24px;
      box-shadow: 0 2px 12px rgba(0,10,30,0.3);
    }
    .topbar-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    .topbar-brand img {
      height: 32px;
      width: auto;
      filter: brightness(10);
      opacity: 0.92;
    }
    .topbar-title {
      font-size: 0.85rem;
      font-weight: 600;
      color: rgba(255,255,255,0.75);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .topbar-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .topbar-user {
      font-size: 0.78rem;
      font-weight: 500;
      color: rgba(255,255,255,0.6);
      padding: 4px 10px;
      background: rgba(255,255,255,0.08);
      border-radius: 999px;
      white-space: nowrap;
    }
    .topbar-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-family: inherit;
      font-size: 0.78rem;
      font-weight: 600;
      border: 1px solid rgba(255,255,255,0.18);
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.85);
      border-radius: 8px;
      padding: 6px 12px;
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s;
      white-space: nowrap;
    }
    .topbar-btn:hover {
      background: rgba(255,255,255,0.16);
      border-color: rgba(255,255,255,0.3);
    }
    .topbar-btn:active { transform: scale(0.97); }
    .topbar-btn.accent {
      background: var(--accent);
      border-color: var(--accent);
      color: white;
    }
    .topbar-btn.accent:hover {
      background: var(--accent-dark);
      border-color: var(--accent-dark);
    }
    #readonlyBanner {
      font-size: 0.75rem;
      font-weight: 600;
      color: #fbbf24;
      padding: 4px 12px;
      background: rgba(251,191,36,0.12);
      border-radius: 999px;
      border: 1px solid rgba(251,191,36,0.25);
    }

    /* ========== APP CONTAINER ========== */
    .app {
      max-width: 1400px;
      margin: 0 auto;
      padding: 24px 20px 60px;
    }

    /* ========== HERO SECTION ========== */
    .hero-section {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 22px;
      align-items: stretch;
      margin-bottom: 24px;
    }
    @media (max-width: 900px) {
      .hero-section { grid-template-columns: 1fr; }
    }

    /* Meta panel (left) */
    .meta-panel {
      background: var(--surface);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid rgba(255,255,255,0.7);
      border-radius: var(--card-radius);
      padding: 24px;
      box-shadow: var(--shadow-md);
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .meta-panel-header {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 20px;
      margin-bottom: 0;
      width: 100%;
    }
    body.is-admin .meta-panel-header {
      flex-direction: row;
      margin-bottom: 20px;
      gap: 14px;
    }
    .meta-panel-logo-col {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .meta-panel-logo-col img {
      height: 80px;
      width: auto;
      flex-shrink: 0;
    }
    body.is-admin .meta-panel-logo-col img {
      height: 44px;
    }
    .meta-panel-info-col {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      gap: 24px;
    }
    body.is-admin .meta-panel-info-col {
      flex: 1;
      width: auto;
      gap: 14px;
    }
    .meta-panel-titles {
      flex: 1;
    }
    .meta-panel-date-box {
      width: 220px;
      flex-shrink: 0;
    }
    body.is-admin .meta-panel-date-box {
      width: 28%;
    }
    .meta-panel-titles h1 {
      margin: 0 0 4px;
      font-size: 1.3rem;
      font-weight: 800;
      color: var(--primary);
      letter-spacing: -0.03em;
      line-height: 1.2;
    }
    .meta-panel-titles p {
      margin: 0;
      font-size: 0.83rem;
      color: var(--muted);
      line-height: 1.45;
      max-width: 520px;
    }
    .meta-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 14px;
      border-top: 1px solid var(--border);
      padding-top: 18px;
    }
    body:not(.is-admin) .meta-grid {
      display: none !important;
    }
    .meta-grid > div {
      display: flex;
      flex-direction: column;
    }
    .meta-grid > div > input {
      margin-top: auto;
    }

    /* Score hero (right) */
    .score-hero {
      min-width: 280px;
      max-width: 351px;
      background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
      border-radius: var(--card-radius);
      padding: 28px 26px 22px;
      box-shadow: var(--shadow-lg);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      position: relative;
      overflow: hidden;
    }
    .score-hero::before {
      content: '';
      position: absolute;
      top: -60px;
      right: -60px;
      width: 200px;
      height: 200px;
      background: radial-gradient(circle, rgba(0,180,166,0.25) 0%, transparent 65%);
      pointer-events: none;
    }
    .score-hero::after {
      content: '';
      position: absolute;
      bottom: -40px;
      left: -40px;
      width: 130px;
      height: 130px;
      background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
      pointer-events: none;
    }
    .score-hero-label {
      font-size: 0.78rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: rgba(255,255,255,0.55);
      margin-bottom: 6px;
    }
    .score-hero-value {
      font-size: 4rem;
      font-weight: 800;
      color: white;
      line-height: 1;
      letter-spacing: -0.03em;
      font-variant-numeric: tabular-nums;
      text-shadow: 0 4px 16px rgba(0,0,0,0.2);
    }
    .score-hero-raw {
      font-size: 0.78rem;
      color: rgba(255,255,255,0.5);
      margin-top: 6px;
      font-variant-numeric: tabular-nums;
    }
    .score-progress-bar {
      width: 100%;
      height: 6px;
      background: rgba(255,255,255,0.12);
      border-radius: 999px;
      margin-top: 16px;
      overflow: hidden;
    }
    .score-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--accent) 0%, #a3e6e1 100%);
      border-radius: 999px;
      transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
      width: 0%;
    }
    .score-hero-status {
      margin-top: 14px;
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      border: 1px solid transparent;
      padding: 6px 14px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      backdrop-filter: blur(4px);
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      transition: all 0.3s ease;
    }
    .badge-na { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.15); }
    .badge-very-low { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); }
    .badge-low { background: rgba(249, 115, 22, 0.25); color: #fdba74; border-color: rgba(249, 115, 22, 0.4); }
    .badge-medium { background: rgba(234, 179, 8, 0.25); color: #fde047; border-color: rgba(234, 179, 8, 0.4); }
    .badge-high { background: rgba(34, 197, 94, 0.25); color: #86efac; border-color: rgba(34, 197, 94, 0.4); }
    .badge-excellent { background: rgba(6, 182, 212, 0.25); color: #67e8f9; border-color: rgba(6, 182, 212, 0.4); }
    @media (max-width: 900px) {
      .score-hero { min-width: unset; max-width: unset; }
      .score-hero-value { font-size: 3rem; }
    }

    /* ========== LAYOUT MAIN ========== */
    .layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 350px;
      gap: 24px;
      align-items: start;
    }
    @media (max-width: 1080px) { .layout { grid-template-columns: 1fr; } }

    /* ========== SECTION CARDS ========== */
    .section-card {
      background: var(--surface);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(255,255,255,0.65);
      border-radius: var(--card-radius);
      box-shadow: var(--shadow-sm);
      padding: 22px 22px 20px;
      margin-bottom: 16px;
      transition: box-shadow 0.25s ease, transform 0.25s ease;
    }
    .section-card:hover {
      box-shadow: var(--shadow-md);
      transform: translateY(-1px);
    }
    .section-header {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 10px;
    }
    .section-title { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
    .section-title h2 {
      margin: 0;
      font-size: 1rem;
      font-weight: 700;
      color: var(--primary);
      letter-spacing: -0.01em;
    }
    .section-subtitle { font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
    .section-score {
      text-align: right;
      font-size: 0.75rem;
      color: var(--muted);
      flex-shrink: 0;
      min-width: 60px;
    }
    .section-score .value { font-weight: 700; color: var(--primary); font-size: 1.05rem; }

    /* Capitulo progress bar */
    .capitulo-progress-wrap {
      margin: 10px 0 12px;
      height: 5px;
      background: #e2e8f0;
      border-radius: 999px;
      overflow: hidden;
    }
    .capitulo-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
      border-radius: 999px;
      width: 0%;
      transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
    }

    .pill {
      display: inline-block;
      font-size: 0.7rem;
      background: var(--primary-light);
      color: var(--primary);
      padding: 3px 9px;
      border-radius: 6px;
      margin-bottom: 12px;
      font-weight: 600;
      border: 1px solid rgba(0,58,117,0.1);
    }

    /* ========== QUESTION LIST ========== */
    .question-list {
      margin: 0;
      padding: 0;
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 16px;
    }
    .question-item {
      border-radius: 11px;
      border: 1px solid #e2e8f0;
      padding: 12px 16px;
      background: rgba(248, 250, 255, 0.7);
      transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    }
    .question-item:hover {
      background: rgba(255,255,255,0.95);
      border-color: rgba(0,180,166,0.35);
      box-shadow: 0 3px 10px rgba(0,180,166,0.05);
    }
    .question-text { font-size: 0.85rem; font-weight: 500; color: #1e293b; margin-bottom: 8px; line-height: 1.5; }
    .question-scale {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      font-size: 0.75rem;
      color: var(--muted);
      flex-wrap: wrap;
    }
    .scale-label { font-weight: 500; color: #64748b; }
    .scale-options { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
    .scale-options label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1.5px solid #cbd5e1;
      background: white;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 600;
      color: #475569;
      transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
      margin-bottom: 0;
      position: relative;
    }
    .scale-options label:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: rgba(0,180,166,0.06);
      transform: scale(1.1);
    }
    .scale-options input { display: none; }
    .scale-options input:checked + span {
      background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
      width: 100%;
      height: 100%;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      color: white;
      border-color: var(--accent);
      box-shadow: 0 4px 12px rgba(0,180,166,0.35);
    }
    @media (min-width: 768px) {
      .question-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: 10px 16px;
      }
      .question-text { margin-bottom: 0; flex: 1; }
      .question-scale { flex-shrink: 0; justify-content: flex-end; width: auto; }
    }

    .observaciones {
      margin-top: 12px;
      border-top: 1px dashed #dde3ed;
      padding-top: 12px;
    }

    /* ========== SIDEBAR ========== */
    .sidebar-panel {
      background: var(--surface);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid rgba(255,255,255,0.85);
      border-radius: 20px;
      box-shadow: 0 12px 32px rgba(0, 30, 80, 0.08), 0 2px 8px rgba(0, 30, 80, 0.04);
      overflow: hidden;
      position: sticky;
      top: calc(var(--topbar-h) + 20px);
    }

    /* Sidebar actions strip */
    .sidebar-actions {
      padding: 22px 20px;
      background: rgba(255,255,255,0.5);
      border-bottom: 1px solid rgba(0,58,117,0.06);
    }
    .sidebar-actions-title {
      font-size: 0.72rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--primary);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .sidebar-actions .btn-row { margin-top: 0; gap: 8px; }

    /* Tabs (Segmented Control) */
    .sidebar-tabs {
      display: flex;
      background: #e2e8f0;
      padding: 5px;
      margin: 16px 16px 0;
      border-radius: 12px;
      gap: 4px;
      box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
      position: relative;
      z-index: 1;
    }
    .tab-slider {
      position: absolute;
      top: 4px;
      bottom: 4px;
      left: 0;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0, 20, 50, 0.08), 0 1px 3px rgba(0, 20, 50, 0.04);
      transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
      z-index: -1;
    }
    .tab-btn {
      flex: 1 1 0%;
      padding: 6px 2px;
      font-family: inherit;
      color: var(--text-secondary);
      background: transparent !important;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: color 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
      text-align: center;
      box-shadow: none !important;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
    }
    .tab-icon {
      font-size: 1.05rem;
      line-height: 1;
      opacity: 0.7;
      transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    .tab-label {
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 0.01em;
    }
    .tab-btn:hover { color: var(--primary); }
    .tab-btn:hover .tab-icon {
      opacity: 1;
      transform: scale(1.1);
    }
    .tab-btn.active {
      color: var(--primary-dark);
    }
    .tab-btn.active .tab-icon {
      opacity: 1;
    }
    .tab-panel {
      display: none;
      padding: 20px 18px;
      max-height: calc(100vh - var(--topbar-h) - 40px);
      overflow-y: auto;
    }
    .tab-panel.active { display: block; animation: fadeTabIn 0.3s ease; }
    @keyframes fadeTabIn {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .tab-panel h3 {
      margin: 0 0 14px;
      font-size: 0.9rem;
      font-weight: 800;
      color: var(--primary);
      letter-spacing: -0.01em;
    }

    /* ========== INPUTS & FORM ========== */
    label {
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--text-secondary);
      display: block;
      margin-bottom: 4px;
    }
    input[type="text"],
    input[type="date"],
    input[type="email"],
    input[type="password"],
    textarea {
      width: 100%;
      border-radius: 10px;
      border: 1.5px solid #cbd5e1;
      padding: 9px 12px;
      font-size: 0.84rem;
      font-family: inherit;
      outline: none;
      background: rgba(251,252,255,0.85);
      color: var(--text);
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    }
    input:focus, textarea:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(0,58,117,0.1);
      background: white;
    }
    textarea { min-height: 72px; resize: vertical; }

    /* ========== BUTTONS ========== */
    .btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    button {
      border-radius: 9px;
      border: none;
      padding: 8px 14px;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.18s ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      line-height: 1.3;
    }
    button:active { transform: scale(0.97); }
    .btn-primary {
      background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
      color: white;
      box-shadow: 0 3px 10px rgba(0,180,166,0.22);
    }
    .btn-primary:hover {
      box-shadow: 0 5px 16px rgba(0,180,166,0.32);
      filter: brightness(1.04);
      transform: translateY(-1px);
    }
    .btn-danger {
      background: linear-gradient(135deg, var(--danger) 0%, #8c1e18 100%);
      color: white;
      box-shadow: 0 3px 10px rgba(179,38,30,0.22);
    }
    .btn-danger:hover {
      box-shadow: 0 5px 16px rgba(179,38,30,0.32);
      filter: brightness(1.04);
      transform: translateY(-1px);
    }
    .btn-secondary {
      background: #eef1f8;
      color: #334155;
      box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }
    .btn-secondary:hover {
      background: #e2e8f0;
      color: #1e293b;
      transform: translateY(-1px);
    }
    .btn-ghost {
      background: rgba(0,58,117,0.06);
      border: 1px solid rgba(0,58,117,0.12);
      color: var(--primary);
      padding: 5px 10px;
      font-size: 0.75rem;
      border-radius: 7px;
    }
    .btn-ghost:hover {
      background: rgba(0,58,117,0.1);
      border-color: rgba(0,58,117,0.22);
      transform: translateY(-1px);
    }
    .btn-ghost-on-dark {
      background: rgba(255,255,255,0.1);
      border: 1px solid rgba(255,255,255,0.2);
      color: white;
      padding: 5px 10px;
      font-size: 0.75rem;
      border-radius: 7px;
    }
    .btn-ghost-on-dark:hover {
      background: rgba(255,255,255,0.18);
      transform: translateY(-1px);
    }

    /* ========== ALERTS / MESSAGES ========== */
    .alert {
      font-size: 0.78rem;
      color: var(--danger);
      margin-top: 8px;
      background: rgba(179,38,30,0.06);
      border-left: 3px solid var(--danger);
      padding: 8px 12px;
      border-radius: 6px;
      display: none;
    }
    .alert.visible { display: block; }
    .success-msg {
      font-size: 0.78rem;
      color: var(--success);
      margin-top: 8px;
      background: rgba(15,123,59,0.06);
      border-left: 3px solid var(--success);
      padding: 8px 12px;
      border-radius: 6px;
      display: none;
    }
    .success-msg.visible { display: block; }
    .hint { font-size: 0.75rem; color: var(--muted); margin-top: 4px; line-height: 1.45; }

    /* ========== SUMMARY TABLE ========== */
    .summary-table { width: 100%; border-collapse: collapse; font-size: 0.76rem; }
    .summary-table th, .summary-table td {
      padding: 7px 5px;
      border-bottom: 1px solid #f1f5f9;
      text-align: left;
    }
    .summary-table th {
      font-weight: 600;
      color: #475569;
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .summary-table tr:last-child td { border-bottom: none; }
    .summary-table td { color: #334155; }
    .summary-table td.score { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
    .summary-table tfoot td {
      font-weight: 700;
      border-top: 2px solid #cbd5e1;
      padding-top: 8px;
      font-size: 0.8rem;
      color: var(--primary);
    }

    /* ========== SAVED ITEMS ========== */
    .saved-list {
      margin-top: 8px;
      border-top: 1px solid #f1f5f9;
      padding-top: 8px;
    }
    .saved-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      padding: 6px 0;
      border-bottom: 1px dashed #f1f5f9;
    }
    .saved-item:last-child { border-bottom: none; }
    .saved-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .saved-name { font-size: 0.78rem; font-weight: 600; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .saved-date { font-size: 0.7rem; color: var(--muted); }
    .saved-buttons { display: flex; gap: 4px; flex-shrink: 0; }
    .saved-empty { font-size: 0.76rem; color: var(--muted); margin-top: 4px; }

    /* ========== STATS CHIPS ========== */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
      gap: 8px;
      margin-top: 8px;
    }
    .stat-chip {
      border-radius: 10px;
      background: rgba(241,245,249,0.8);
      border: 1px solid #e2e8f0;
      padding: 9px 10px;
      transition: transform 0.2s;
    }
    .stat-chip:hover { transform: translateY(-1px); background: rgba(241,245,249,1); }
    .stat-chip-title { font-size: 0.68rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; }
    .stat-chip-value { font-weight: 700; margin-top: 3px; color: var(--primary); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

    /* ========== BADGE ========== */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 10px;
      border-radius: 999px;
      background: var(--primary-light);
      color: var(--primary);
      font-size: 0.72rem;
      font-weight: 600;
      border: 1px solid rgba(0,58,117,0.1);
    }

    /* ========== ADMIN OVERLAY ========== */
    .admin-evals-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15,23,42,0.4);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 200;
    }
    .admin-evals-card {
      background: rgba(255,255,255,0.97);
      backdrop-filter: blur(15px);
      border: 1px solid rgba(255,255,255,0.8);
      border-radius: 20px;
      box-shadow: var(--shadow-lg);
      max-width: 1100px;
      width: 96%;
      max-height: 88vh;
      display: flex;
      flex-direction: column;
      padding: 24px;
    }
    .admin-evals-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }
    .admin-evals-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--primary); }
    .admin-evals-body { overflow: auto; flex: 1; margin-top: 8px; border-top: 1px solid #e2e8f0; padding-top: 12px; }
    .admin-evals-table { width: 100%; border-collapse: collapse; font-size: 0.76rem; }
    .admin-evals-table th, .admin-evals-table td { padding: 8px 6px; border-bottom: 1px solid #f1f5f9; text-align: left; vertical-align: middle; }
    .admin-evals-table th { font-weight: 600; color: #475569; font-size: 0.7rem; text-transform: uppercase; white-space: nowrap; }
    .admin-evals-table td.small { font-size: 0.7rem; color: var(--muted); }
    .badge-admin-close {
      border-radius: 8px;
      padding: 6px 14px;
      font-size: 0.78rem;
      font-weight: 600;
      background: #eef1f7;
      color: #475569;
      cursor: pointer;
      border: none;
      font-family: inherit;
      transition: background 0.2s;
    }
    .badge-admin-close:hover { background: #e2e8f0; color: #1e293b; }
    .admin-evals-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
    .admin-evals-filters input { max-width: 300px; }

    /* ========== LOGIN / RESET ========== */
    .login-wrapper {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #f0f4fa 0%, #dce6f5 100%);
      background-image:
        radial-gradient(at 0% 0%, rgba(0,180,166,0.18) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(0,58,117,0.18) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0,180,166,0.12) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(0,58,117,0.14) 0px, transparent 50%);
      background-size: 200% 200%;
      animation: meshGradient 20s ease infinite;
      position: relative;
      overflow: hidden;
    }
    .login-wrapper::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image: linear-gradient(rgba(0,58,117,0.035) 1px, transparent 1px),
                        linear-gradient(90deg, rgba(0,58,117,0.035) 1px, transparent 1px);
      background-size: 22px 22px;
      pointer-events: none;
    }
    @keyframes meshGradient {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }
    .login-card {
      background: rgba(255,255,255,0.88);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid rgba(255,255,255,0.65);
      border-radius: 20px;
      box-shadow: 0 24px 48px rgba(0,29,61,0.1), 0 1px 3px rgba(0,0,0,0.04);
      padding: 40px 34px 32px;
      max-width: 440px;
      width: 90%;
      animation: cardEntrance 0.55s cubic-bezier(0.16,1,0.3,1) both;
      z-index: 1;
    }
    @keyframes cardEntrance {
      from { opacity: 0; transform: translateY(22px) scale(0.98); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }
    .login-logo-container { text-align: center; margin-bottom: 22px; }
    .login-logo-container img {
      max-height: 52px;
      width: auto;
      filter: drop-shadow(0 2px 5px rgba(0,0,0,0.07));
      transition: transform 0.3s;
    }
    .login-logo-container img:hover { transform: scale(1.05); }
    .login-card h1 {
      margin: 0 0 6px;
      font-size: 1.4rem;
      font-weight: 800;
      color: var(--primary);
      text-align: center;
      letter-spacing: -0.03em;
    }
    .login-card h2 {
      margin: 0 0 6px;
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--primary);
      text-align: center;
      letter-spacing: -0.02em;
    }
    .login-card > div > p, .login-card > p {
      margin: 0 0 22px;
      font-size: 0.85rem;
      color: var(--muted);
      text-align: center;
      line-height: 1.5;
    }
    .login-field { margin-bottom: 16px; position: relative; }
    .login-field label {
      font-size: 0.78rem;
      font-weight: 600;
      color: #4a5568;
      display: block;
      margin-bottom: 5px;
      transition: color 0.2s;
    }
    .login-field-input-wrapper { position: relative; display: flex; align-items: center; }
    .login-field-input-wrapper svg {
      position: absolute;
      left: 13px;
      width: 17px;
      height: 17px;
      color: #a0aec0;
      pointer-events: none;
      transition: color 0.2s;
      flex-shrink: 0;
    }
    .login-field input[type="text"],
    .login-field input[type="password"],
    .login-field input[type="email"] {
      width: 100%;
      border-radius: 11px;
      border: 1.5px solid #e2e8f0;
      padding: 10px 14px 10px 42px;
      font-size: 0.88rem;
      font-family: inherit;
      outline: none;
      background: rgba(251,252,255,0.85);
      color: var(--text);
      transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
    }
    .login-field input:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(0,58,117,0.12);
      background: #fff;
    }
    .login-field:focus-within label { color: var(--primary); }
    .login-field:focus-within svg { color: var(--primary); }
    .login-error {
      font-size: 0.78rem;
      color: var(--danger);
      margin-top: 10px;
      background: rgba(179,38,30,0.06);
      border-left: 3px solid var(--danger);
      padding: 8px 12px;
      border-radius: 6px;
      display: none;
      animation: shakeError 0.4s ease;
    }
    .login-error.visible { display: block; }
    @keyframes shakeError {
      0%,100% { transform: translateX(0); }
      25% { transform: translateX(-4px); }
      75% { transform: translateX(4px); }
    }
    .login-card .btn-row {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
      margin-top: 18px;
    }
    .login-card .btn-primary {
      background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
      color: white;
      box-shadow: 0 4px 14px rgba(0,58,117,0.22);
      border: none;
      border-radius: 11px;
      padding: 11px 20px;
      font-size: 0.9rem;
      font-weight: 700;
      cursor: pointer;
      width: 100%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
      font-family: inherit;
      letter-spacing: 0.01em;
    }
    .login-card .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 18px rgba(0,58,117,0.3);
      filter: brightness(1.07);
    }
    .login-card .btn-primary:active { transform: translateY(0); }
    .login-card .btn-secondary {
      background: #eef1f8;
      color: #4a5568;
      border: none;
      border-radius: 11px;
      padding: 11px 20px;
      font-size: 0.88rem;
      font-weight: 600;
      cursor: pointer;
      width: 100%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: background 0.15s, color 0.15s;
      font-family: inherit;
    }
    .login-card .btn-secondary:hover { background: #e2e8f0; color: #2d3748; }
    #loginPanel, #resetPanel { animation: fadeInPanel 0.3s ease-out; }
    @keyframes fadeInPanel {
      from { opacity: 0; transform: scale(0.98); }
      to   { opacity: 1; transform: scale(1); }
    }

    /* ========== BADGES ========== */
    .badge-eval {
      font-size: 0.65rem;
      padding: 3px 6px;
      border-radius: 6px;
      margin-left: 8px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      display: inline-block;
      vertical-align: middle;
    }
    .badge-inicial {
      background-color: #e0f2fe;
      color: #0284c7;
    }
    .badge-secundaria {
      background-color: #dcfce7;
      color: #16a34a;
    }
    .badge-historica {
      background-color: #f1f5f9;
      color: #64748b;
    }
