/* ========================================================
   FLECHAS - PLAN DE LECTURA BÍBLICA ANUAL & LECTOR INTEGRADO
   Diseño Oficial Responsivo, Elegante y Completo
   ======================================================== */

:root {
    --primary: #e11d48;
    --primary-hover: #be123c;
    --primary-light: #ffe4e6;
    --primary-subtle: #fff1f2;
    --accent-gold: #f59e0b;
    --bg-main: #fcf8f8;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #f1e2e4;
    --border-hover: #fecdd3;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 10px 25px -5px rgba(225, 29, 72, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(225, 29, 72, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Tema de Lectura */
    --reader-bg: #ffffff;
    --reader-text: #1e293b;
    --reader-border: #e2e8f0;
    --reader-font-size: 1.15rem;
    --reader-line-height: 1.85;
}

/* Modo Sepia */
body.theme-sepia {
    --reader-bg: #fbf0d9;
    --reader-text: #433422;
    --reader-border: #e6d3af;
}

/* Modo Oscuro / Noche */
body.theme-dark {
    --reader-bg: #0f172a;
    --reader-text: #e2e8f0;
    --reader-border: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ========================================================
   CABECERA PRINCIPAL & HUB DE NAVEGACIÓN UNIFICADO
   ======================================================== */
.main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.brand-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.4rem;
}

.nav-hub {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-hub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-hub-link:hover {
    background: var(--primary-subtle);
    color: var(--primary);
}

.nav-hub-link.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.25);
}

.mobile-nav-divider,
.mobile-logout-btn {
    display: none !important;
}

/* Menú de Usuario */
.user-menu-area {
    position: relative;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.85rem 0.35rem 0.4rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.user-badge:hover {
    border-color: var(--primary);
    background: #ffffff;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #be123c 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.user-text-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-greeting {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.user-name {
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 700;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 250px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    padding: 0.75rem;
    z-index: 1100;
    animation: fadeIn 0.2s ease-out;
}

.user-dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.65rem;
}

.d-user-email {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    word-break: break-all;
}

.d-user-id {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.dropdown-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.dropdown-btn.logout-btn {
    color: #dc2626;
}

.dropdown-btn.logout-btn:hover {
    background: #fef2f2;
}

/* ========================================================
   CONTENEDOR PRINCIPAL
   ======================================================== */
.bible-app-main {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 1. Encabezado de Sección y Pestañas de Plan */
.plan-header-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.plan-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.plan-title-block h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.plan-title-block p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.plan-badge-tag {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
}

/* Selector de las 3 Opciones de Plan */
.plan-tabs-group {
    display: flex;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.35rem;
    border-radius: var(--radius-md);
    gap: 0.4rem;
    flex-wrap: wrap;
}

.plan-tab-btn {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: left;
}

.plan-tab-btn:hover {
    background: rgba(255, 255, 255, 0.7);
}

.plan-tab-btn.active {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #cbd5e1;
}

.plan-tab-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.plan-tab-btn.active .plan-tab-icon {
    background: var(--primary);
    color: #ffffff;
}

.plan-tab-text {
    display: flex;
    flex-direction: column;
}

.plan-tab-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
}

.plan-tab-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* ========================================================
   2. PANEL HERO DE PROGRESO Y MÉTRICAS
   ======================================================== */
.progress-hero-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
}

.gauge-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.progress-circle-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 0.75rem;
}

.progress-circle-wrap svg {
    transform: rotate(-90deg);
    width: 140px;
    height: 140px;
}

.circle-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 12;
}

.circle-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    transition: stroke-dashoffset 0.8s ease-in-out;
}

.progress-circle-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.progress-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.gauge-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}

.gauge-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stats-and-action-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stats-triple-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.bg-rose { background: #ffe4e6; color: #e11d48; }
.bg-amber { background: #fef3c7; color: #d97706; }
.bg-green { background: #dcfce7; color: #16a34a; }

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.stat-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.continue-reading-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 1rem;
}

.banner-text-info strong {
    font-size: 1.05rem;
    display: block;
    margin-bottom: 2px;
}

.banner-text-info span {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.btn-hero-read {
    background: linear-gradient(135deg, var(--primary) 0%, #be123c 100%);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.btn-hero-read:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.45);
}

/* ========================================================
   3. BARRA DE FILTROS & MESES
   ======================================================== */
.calendar-filter-bar {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.months-scroll-strip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.month-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.month-chip:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.month-chip.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.search-and-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.search-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrap input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
    background: #f8fafc;
}

.search-input-wrap input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.status-filter-pills {
    display: flex;
    gap: 0.35rem;
}

.status-pill {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: var(--transition);
}

.status-pill.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* ========================================================
   4. GRILLA DE DÍAS (365 DÍAS)
   ======================================================== */
.days-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.15rem;
}

.day-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: var(--transition);
    position: relative;
}

.day-card:hover {
    box-shadow: var(--shadow-card);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.day-card.completed-day {
    background: #fafffc;
    border-color: #86efac;
}

.day-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-badge-stack {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-number-tag {
    background: #0f172a;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
}

.day-date-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.day-status-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
}

.day-status-pill.pending {
    background: #f1f5f9;
    color: #64748b;
}

.day-status-pill.done {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.day-passage-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: #0f172a;
}

.chapters-checklist-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.chapter-check-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
}

.chapter-check-item.checked {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.chapter-label-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.chapter-name-text {
    font-size: 0.86rem;
    font-weight: 700;
    color: #334155;
}

.chapter-check-item.checked .chapter-name-text {
    text-decoration: line-through;
    color: #059669;
}

.btn-open-reader {
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-open-reader:hover {
    background: var(--primary-light);
}

.day-card-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.65rem;
}

.btn-mark-day-all {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-mark-day-all:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* ========================================================
   5. LECTOR BÍBLICO INTEGRADO (DRAWER / VISOR INMERSIVO)
   ======================================================== */
.bible-reader-overlay-wrap {
    position: relative;
    z-index: 100000;
}

.bible-reader-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 780px;
    height: 100vh;
    background: var(--reader-bg);
    color: var(--reader-text);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
    z-index: 100000;
    flex-direction: column;
    animation: drawerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--reader-border);
}

.bible-reader-drawer.open,
#bibleReaderDrawer.open,
#bibleReaderOverlay.open .bible-reader-drawer,
#bibleReaderOverlay.open aside {
    display: flex !important;
}

@keyframes drawerSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.reader-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99999;
}

.reader-backdrop.open,
#readerBackdrop.open,
#bibleReaderOverlay.open .reader-backdrop {
    display: block !important;
}

/* Cabecera del Lector */
.reader-header {
    background: var(--reader-bg);
    border-bottom: 1px solid var(--reader-border);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-shrink: 0;
}

.reader-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reader-passage-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--reader-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reader-close-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: var(--reader-text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.reader-close-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Barra de Controles: Versión, Libro, Cap, Tamaño, Tema */
.reader-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.82rem;
}

.reader-controls-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.reader-select {
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--reader-border);
    background: var(--reader-bg);
    color: var(--reader-text);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

.reader-controls-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-reader-tool {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--reader-border);
    color: var(--reader-text);
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reader-tool:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-reader-tool.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Cuerpo de Lectura */
.reader-body-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 2.5rem;
    background: var(--reader-bg);
    color: var(--reader-text);
    font-size: var(--reader-font-size);
    line-height: var(--reader-line-height);
}

.bible-chapter-container {
    max-width: 680px;
    margin: 0 auto;
}

.bible-loading-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.bible-loading-state i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.chapter-headline {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--reader-text);
    text-align: center;
}

.chapter-version-meta {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.verse-item {
    margin-bottom: 0.75rem;
    display: inline;
}

.verse-num {
    font-size: 0.72em;
    font-weight: 800;
    color: var(--primary);
    vertical-align: super;
    margin-right: 4px;
    margin-left: 6px;
    user-select: none;
}

.verse-text {
    color: var(--reader-text);
}

/* Pie del Lector */
.reader-footer {
    background: var(--reader-bg);
    border-top: 1px solid var(--reader-border);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.btn-nav-chap {
    background: transparent;
    border: 1px solid var(--reader-border);
    color: var(--reader-text);
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.btn-nav-chap:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-mark-as-read {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    transition: var(--transition);
}

.btn-mark-as-read:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.btn-mark-as-read.already-read {
    background: #e2e8f0;
    color: #64748b;
    box-shadow: none;
    cursor: default;
}

/* ========================================================
   REGLAS RESPONSIVAS (< 992px, < 768px, < 480px)
   ======================================================== */
@media (max-width: 992px) {
    .progress-hero-grid {
        grid-template-columns: 1fr;
    }

    .stats-triple-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .brand-area {
        order: 1 !important;
    }

    .user-menu-area {
        order: 2 !important;
        margin-left: auto !important;
        margin-right: 10px !important;
    }

    .mobile-nav-toggle {
        order: 3 !important;
        display: block !important;
    }

    .user-text-info {
        display: flex !important;
    }

    .user-badge {
        padding: 4px 8px !important;
    }

    .user-dropdown-menu {
        position: fixed !important;
        top: 65px !important;
        right: 12px !important;
        left: auto !important;
        width: 260px !important;
        max-width: calc(100vw - 24px) !important;
    }

    .brand-tagline {
        display: block !important;
    }

    .mobile-nav-divider {
        display: block !important;
        height: 1px !important;
        background: #fee2e2 !important;
        margin: 6px 0 !important;
    }

    .mobile-logout-btn {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 12px 16px !important;
        border-radius: 10px !important;
        border: 1px solid #fecdd3 !important;
        background: #fff1f2 !important;
        color: #e11d48 !important;
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        width: 100% !important;
        text-align: left !important;
        transition: all 0.2s ease !important;
    }

    .mobile-logout-btn:hover {
        background: #fee2e2 !important;
        color: #be123c !important;
    }

    .nav-hub {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        z-index: 1050;
    }

    .nav-hub.mobile-open {
        display: flex;
    }

    .nav-hub-link {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .stats-triple-row {
        grid-template-columns: 1fr;
    }

    .plan-tabs-group {
        flex-direction: column;
    }

    .days-grid-container {
        grid-template-columns: 1fr;
    }

    .reader-body-scroll {
        padding: 1.25rem 1rem;
    }

    .reader-header {
        padding: 0.75rem 1rem;
        gap: 0.55rem;
    }

    .reader-footer {
        padding: 0.65rem 0.9rem;
    }
}

@media (max-width: 992px) {
    .bible-reader-drawer {
        top: 56px !important;
        bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
        height: auto !important;
        max-height: calc(100vh - 120px - env(safe-area-inset-bottom, 0px)) !important;
        max-height: calc(100dvh - 120px - env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 600px) {
    .plan-title-block h1 {
        font-size: 1.45rem;
    }

    .chapter-headline {
        font-size: 1.5rem;
    }

    .reader-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
    }

    .reader-controls-right {
        justify-content: space-between;
    }

    .reader-footer {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
        padding: 0.65rem 0.85rem !important;
    }

    .reader-footer #btnPrevChapter {
        grid-column: 1 / 2 !important;
        grid-row: 1 / 2 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 0.55rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    .reader-footer #btnNextChapter {
        grid-column: 2 / 3 !important;
        grid-row: 1 / 2 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 0.55rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    .reader-footer #btnMarkCurrentRead {
        grid-column: 1 / -1 !important;
        grid-row: 2 / 3 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 0.6rem 1rem !important;
    }
}

/* Botón de Reiniciar Plan fuera del menú de usuario */
.btn-reset-plan-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    padding: 7px 16px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.btn-reset-plan-card:hover {
    background: #ffedd5;
    border-color: #fb923c;
    color: #9a3412;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(194, 65, 12, 0.15);
}

.btn-reset-plan-card i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.btn-reset-plan-card:hover i {
    transform: rotate(-180deg);
}

.btn-reset-plan-toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    color: #b45309;
    border: 1px solid #fde68a;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.btn-reset-plan-toolbar:hover {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
    transform: translateY(-1px);
}

.btn-reset-plan-toolbar i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-reset-plan-toolbar:hover i {
    transform: rotate(-180deg);
}
