/* HEPWA v2 — Mobile-first CSS */
:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --primary: #1a1a2e;
    --accent: #0f3460;
    --blue: #16c79a;
    --green: #27ae60;
    --yellow: #f39c12;
    --red: #e74c3c;
    --purple: #8e44ad;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e9ecef;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --nav-h: 60px;
    --header-h: 52px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html,
body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* Splash */
.splash {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    transition:
        opacity 0.4s,
        visibility 0.4s;
}
.splash.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.splash-name {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
}
.splash-sub {
    font-size: 13px;
    opacity: 0.6;
    margin-top: 4px;
}

/* App layout */
.app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--primary);
    color: white;
    -webkit-backdrop-filter: blur(10px);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.header-title {
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s;
}
.header-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

/* Content */
.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
    -webkit-overflow-scrolling: touch;
}

/* Bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: white;
    border-top: 1px solid var(--border);
    z-index: 100;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    gap: 2px;
    padding: 6px 12px;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.nav-item .nav-icon {
    font-size: 22px;
}
.nav-item.active {
    color: var(--accent);
}
.nav-item.active .nav-icon {
    transform: scale(1.1);
}

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    overflow: hidden;
    transition:
        transform 0.15s,
        box-shadow 0.15s;
}
.card:active {
    transform: scale(0.98);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 15px;
}
.card-body {
    padding: 0 16px 14px;
}
.card-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.section-header:first-child {
    margin-top: 0;
}

/* Patient card */
.patient-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.15s;
}
.patient-card:active {
    transform: scale(0.98);
}
.patient-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.patient-avatar.mujer {
    background: linear-gradient(135deg, #e91e63, #f06292);
}
.patient-avatar.hombre {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
}
.patient-info {
    flex: 1;
    min-width: 0;
}
.patient-name {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.patient-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}
.patient-time {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}
.patient-time.reservada {
    background: #fff3cd; /* Amarillo SYS: citas agendadas */
    color: #856404;
}
.patient-time.confirmada {
    background: #d4edda; /* Verde SYS: presencia confirmada */
    color: #155724;
}
.patient-time.realizada {
    background: #f0d4f5; /* Magenta SYS: atención concluida */
    color: #843c96;
}
.patient-time.informada {
    background: #d6eaf8; /* Azul SYS: informe/resultado listo */
    color: #1a5276;
}
.patient-time.incumplida {
    background: #f8d7da; /* Rojo SYS: no asistió */
    color: #721c24;
}
.patient-time.anulada {
    background: #eeeeee;
    color: #7f8c8d;
}
.patient-time.pendiente {
    background: #e2d5f1;
    color: #5b2c8e;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
}
.badge.green {
    background: #d4edda;
    color: #155724;
}
.badge.yellow {
    background: #fff3cd;
    color: #856404;
}
.badge.red {
    background: #f8d7da;
    color: #721c24;
}
.badge.purple {
    background: #e2d5f1;
    color: #5b2c8e;
}
.badge.blue {
    background: #d6eaf8;
    color: #1a5276;
}

/* Quick actions grid */
.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--card);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: transform 0.15s;
}
.action-btn:active {
    transform: scale(0.95);
}
.action-btn .action-icon {
    font-size: 28px;
}

/* Search bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0 14px;
    margin-bottom: 12px;
}
.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 14px 0;
    background: transparent;
    color: var(--text);
}
.search-bar input::placeholder {
    color: var(--text-light);
}
.search-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.search-spinner.active {
    display: block;
}
.search-clear {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
}

/* Resultados: lista de pacientes encontrados (flujo normal, no absoluto) */
.res-ac {
    margin-bottom: 8px;
}
.res-ac .ac-item {
    box-shadow: var(--shadow);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

/* Autocomplete dropdown */
.ac-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
}
.ac-dropdown.open {
    display: block;
}
.ac-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.ac-item:active {
    background: #f0f2f5;
}
.ac-item:last-child {
    border-bottom: none;
}
.ac-name {
    font-size: 14px;
    font-weight: 500;
}
.ac-ci {
    font-size: 12px;
    color: var(--text-light);
}
.ac-tel {
    font-size: 12px;
    color: var(--accent);
}
.ac-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

/* Search wrapper (relative for dropdown) */
.search-wrapper {
    position: relative;
}

/* Request card (lab/img) */
.req-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}
.req-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.req-icon.lab {
    background: #d4edda;
}
.req-icon.img {
    background: #d6eaf8;
}
.req-body {
    flex: 1;
    min-width: 0;
}
.req-date {
    font-size: 12px;
    color: var(--text-light);
}
.req-specialty {
    font-size: 14px;
    font-weight: 600;
    margin: 2px 0;
}
.req-doctor {
    font-size: 12px;
    color: var(--text-light);
}
.req-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.req-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.15s;
}
.req-btn:active {
    transform: scale(0.9);
}
.req-btn.read {
    background: #d5f5e3;
}
.req-btn.pdf {
    background: #fdebd0;
}
.req-btn.dl {
    background: #d6eaf8;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--card);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}
.tab.active {
    background: var(--accent);
    color: white;
}

/* PDF Modal */
.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.pdf-modal.open {
    transform: translateY(0);
}
.pdf-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
}
.pdf-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
}
.pdf-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdf-modes {
    display: flex;
    gap: 4px;
}
.pdf-mode-btn {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.pdf-mode-btn.active {
    background: rgba(255, 255, 255, 0.3);
}
.pdf-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    color: white;
    -webkit-overflow-scrolling: touch;
}
.pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Text reader mode */
.text-reader {
    padding: 8px 0;
}
.text-reader h2 {
    font-size: 18px;
    margin-bottom: 8px;
}
.text-reader .meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}
.text-reader p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}
.text-reader .page-break {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 20px 0 8px;
}
.text-reader .page-num {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* Canvas mode */
.canvas-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.canvas-viewer canvas {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.canvas-page-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px;
}

/* Acciones dentro del panel de procedimientos */
.proc-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.proc-actions .req-btn.dl {
    background: #d6eaf8;
}

/* Info modal (datos del paciente / solicitud) */
.info-modal {
    position: fixed;
    inset: 0;
    z-index: 550;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.info-modal.open {
    opacity: 1;
    pointer-events: auto;
}
.info-card {
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--accent);
    color: white;
    flex-shrink: 0;
}
.info-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.info-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
}
.info-body {
    overflow-y: auto;
    padding: 8px 16px 16px;
    -webkit-overflow-scrolling: touch;
}
.info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.info-row:last-child {
    border-bottom: none;
}
.info-label {
    color: var(--text-light);
    flex-shrink: 0;
}
.info-value {
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

/* Hospitalizados: secciones de la ficha */
.hosp-section {
    margin-bottom: 14px;
}
.hosp-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 0 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

/* Hospitalizados: lista de evoluciones */
.evo-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.evo-item:last-child {
    border-bottom: none;
}
.evo-head {
    font-size: 13px;
    color: var(--text);
}
.evo-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.evo-note {
    font-size: 13px;
    color: var(--text);
    margin-top: 6px;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--surface, #f7f7fa);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}
.evo-more {
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 0 10px;
}
.evo-nota-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface, #f7f7fa);
    font-size: 12px;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
}
.evo-nota-btn:active {
    background: #e8f0fe;
    transform: scale(0.97);
}
.evo-nota-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}
.evo-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 6px 0 2px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 600;
    transition: transform 0.3s ease;
    white-space: nowrap;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.spinner.dark {
    border-color: var(--border);
    border-top-color: var(--accent);
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty states */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
}
.empty-state .empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.empty-state .empty-text {
    font-size: 14px;
}
.empty-state .empty-hint {
    font-size: 12px;
    margin-top: 4px;
}

/* Pull to refresh indicator */
.ptr-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 0;
    overflow: hidden;
    transition: height 0.3s;
    color: var(--text-light);
    font-size: 13px;
    background: var(--bg);
}

.ptr-indicator.active {
    height: 40px;
}

/* Estadísticas del dashboard con la colorimetría del SYS */
.stat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-chip {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Greeting */
.greeting {
    margin-bottom: 4px;
}
.greeting-main {
    font-size: 22px;
    font-weight: 700;
}
.greeting-date {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}

/* Status bar */
.status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 13px;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}
.status-dot.offline {
    background: var(--red);
}

/* Login screen */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}
.login-box {
    width: 100%;
    max-width: 360px;
    background: white;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
}
.login-logo {
    font-size: 44px;
    text-align: center;
}
.login-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}
.login-sub {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    margin: 4px 0 20px;
}
.login-box input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    background: #f8f9fa;
    -webkit-user-select: text;
    user-select: text;
    transition: border 0.2s;
}
.login-box input:focus {
    border-color: var(--accent);
    background: white;
}
.login-btn {
    width: 100%;
    padding: 13px;
    margin-top: 4px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.login-btn:active {
    background: #0a2540;
}
.login-btn:disabled {
    opacity: 0.6;
}
.login-error {
    margin-top: 12px;
    padding: 10px;
    background: #f8d7da;
    color: #721c24;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, #e9ecef 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

/* Swipe hint */
.swipe-hint {
    text-align: center;
    padding: 8px;
    font-size: 12px;
    color: var(--text-light);
}

/* Responsive: tablets */
@media (min-width: 768px) {
    .content {
        max-width: 600px;
        margin: 0 auto;
    }
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
    }
}

/* === Resúmenes IA + contenido de reportes (v2.13) === */
.req-btn.ia {
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}
.ia-resumen {
    margin-top: 8px;
}
.ia-box {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #3b0764;
    white-space: normal;
}
.ia-box.ia-pending {
    color: #7c3aed;
    font-style: italic;
}
.ia-box.ia-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.reporte-texto {
    margin-top: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 45vh;
    overflow-y: auto;
    color: #334155;
}
.study-content-zone {
    margin-top: 4px;
}
