/* Botones */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px var(--space-lg);
    background-color: var(--color-ink);
    color: var(--color-paper);
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--text-sm);
}

.button:hover {
    background-color: var(--color-black);
}

.button.primary {
    background-color: var(--color-primary, var(--color-accent, #8B1E1E));
    color: var(--la-aurora-primary-text, var(--color-paper, #ffffff));
}

.button.primary:hover {
    background-color: var(--color-primary-hover, var(--color-accent-dark, #601414));
}

.button.loading {
    color: transparent !important;
    position: relative;
    pointer-events: none;
}
.button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-paper);
    border-top-color: transparent;
    border-radius: 50%;
    animation: button-spin 0.8s linear infinite;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
}
@keyframes button-spin {
    to { transform: rotate(360deg); }
}

.button.ghost, .button-ghost {
    background-color: transparent;
    color: var(--color-ink);
    border: 1px solid var(--color-line);
}

.button.ghost:hover, .button-ghost:hover {
    background-color: var(--color-soft);
    border-color: var(--color-muted);
}

.button.outline {
    background-color: transparent;
    border: 2px solid var(--color-ink);
    color: var(--color-ink);
}

.button.outline:hover {
    background-color: var(--color-ink);
    color: var(--color-paper);
}

/* Variantes para fondos oscuros (ej. book-hero) */
.dark-context .button.ghost,
.dark-context .button.outline,
.book-hero .button.ghost,
.book-hero .button.outline {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.dark-context .button.ghost:hover,
.dark-context .button.outline:hover,
.book-hero .button.ghost:hover,
.book-hero .button.outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Hero Section */
.hero-section {
    background-color: var(--color-black);
    color: var(--color-paper);
    padding: var(--space-4xl) 0;
    text-align: center;
}

.hero-section h1 {
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: var(--space-lg);
}

.hero-section p {
    font-size: clamp(18px, 2vw, 24px);
    color: var(--color-soft);
    max-width: 800px;
    margin: 0 auto var(--space-2xl);
}

/* Grilla de Libros */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-xl);
}

/* Card de Libro */
.book-card {
    display: flex;
    gap: var(--space-lg);
    background: var(--color-paper);
    border: 1px solid var(--color-line);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.book-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.book-cover {
    width: 124px;
    flex-shrink: 0;
    border-radius: 4px;
    box-shadow: var(--shadow-base);
}

.book-info {
    display: flex;
    flex-direction: column;
}

.book-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin-bottom: 8px;
    font-weight: 700;
}

.book-title {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.book-author {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin-bottom: 12px;
}

.book-excerpt {
    font-size: 0.9rem;
    color: var(--color-ink);
    margin-bottom: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* Buscador */
.search-bar {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 40px;
    display: flex;
}

.search-input {
    flex-grow: 1;
    padding: 16px 24px;
    border: 1px solid var(--color-line);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    background: var(--color-soft);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-muted);
    background: var(--color-paper);
}

.search-button {
    padding: 0 32px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

@media (max-width: 640px) {
    .book-card {
        flex-direction: column;
    }
    .book-cover {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}

/* Notificaciones Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: var(--color-paper);
    color: var(--color-ink);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-toast);
    border-left: 4px solid var(--color-accent);
    font-size: 0.95rem;
    font-weight: 500;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform var(--transition-base), opacity var(--transition-base);
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success { border-left-color: var(--color-green); }
.toast.error { border-left-color: var(--color-red); }

/* Drag and Drop Zone */
.dropzone {
    border: 2px dashed var(--color-line);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    background: var(--color-soft);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--color-accent);
    background: var(--color-paper);
}

.dropzone .dropzone-icon {
    font-size: 2rem;
    color: var(--color-muted);
    margin-bottom: 12px;
}

.dropzone .dropzone-text {
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: 4px;
}

.dropzone .dropzone-hint {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.dropzone input[type="file"], .dropzone-input {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* Modals y Dialogs */
dialog {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-hover);
    padding: 32px;
    background: var(--color-paper);
    color: var(--color-ink);
    max-width: 500px;
    width: 100%;
    margin: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

dialog[open] {
    opacity: 1;
    transform: translateY(0);
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-base) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Skeleton Loaders (Premium Experience) */
.skeleton {
    background: linear-gradient(90deg, var(--color-soft) 25%, var(--color-paper) 50%, var(--color-soft) 75%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.5s infinite ease-in-out;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5rem;
    width: 100%;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }

.skeleton-image {
    width: 100%;
    height: 100%;
    min-height: 180px;
}

/* Focus States for Accessibility */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Micro-interacciones extras para inputs */
.search-input {
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(143, 50, 24, 0.15); /* Accent color with opacity */
}

/* Search Dropdown Styles */
.search-dropdown-wrapper {
    position: relative;
    width: 100%;
}

.search-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
    /* Glassmorphism base */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(var(--color-surface-rgb, 255, 255, 255), 0.95);
    /* Animation */
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
    color: var(--color-text);
}

.search-dropdown-item:hover,
.search-item-active {
    background-color: var(--color-bg-alt);
    color: var(--color-primary);
}

.search-item-img {
    width: 40px;
    height: 56px; /* Para portadas */
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-right: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-item-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.search-item-info {
    flex-grow: 1;
    overflow: hidden;
}

.search-item-title {
    font-weight: 600;
    font-size: var(--text-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.search-item-subtitle {
    font-size: var(--text-xs);
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-empty {
    padding: 1rem;
    text-align: center;
    color: var(--color-text-light);
    font-size: var(--text-sm);
}

/* ==========================================================================
   MOBILE-FIRST UX COMPONENTS (CHIPS & ACCORDIONS)
   ========================================================================== */

/* Contenedor de chips horizontales deslizables */
.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 4px;
    margin-bottom: var(--space-lg);
    scrollbar-width: none; /* Ocultar scrollbar en Firefox */
    -webkit-overflow-scrolling: touch;
}

.category-chips::-webkit-scrollbar {
    display: none; /* Ocultar scrollbar en Chrome/Safari */
}

.category-chip {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--color-soft);
    border: 1px solid var(--color-line);
    border-radius: 50px;
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    color: var(--color-muted);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.category-chip.active, .category-chip:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

/* Acordeones Premium (sin modales) */
.accordion-wrapper {
    border-bottom: 1px solid var(--color-line);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--color-ink);
    font-weight: 600;
    font-size: var(--text-lg);
    transition: color var(--transition-fast);
}

.accordion-header:hover {
    color: var(--color-accent);
}

.accordion-icon {
    transition: transform var(--transition-base);
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base), padding var(--transition-base);
}

.accordion-content.open {
    max-height: 1000px;
    padding-bottom: var(--space-lg);
}

/* ==========================================================================
   DASHBOARD LAYOUT & USER PANEL
   ========================================================================== */
.tenant-dynamic-view-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
main.la-aurora-main {
    max-width: 100% !important;
    padding-top: 0 !important;
}
/* Ocultar la barra flotante pública cuando estamos en el panel de usuario */
body.dashboard-mode .bottom-nav {
    display: none !important;
}

.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 70px);
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    align-items: stretch;
    background-color: #fbfbfd;
    font-family: var(--font-ui, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    color: #1d1d1f;
    overflow: hidden;
    border-left: 1px solid rgba(0, 0, 0, 0.04);
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}

/* Core Typographic Coherence for Dashboard & Buyer Panel UI */
.dashboard-layout,
.dashboard-layout h1,
.dashboard-layout h2,
.dashboard-layout h3,
.dashboard-layout h4,
.dashboard-layout h5,
.dashboard-layout h6,
.dashboard-layout button,
.dashboard-layout input,
.dashboard-layout select,
.dashboard-layout textarea,
.dashboard-layout table,
.dashboard-layout th,
.dashboard-layout td,
.dashboard-nav-item {
    font-family: var(--font-ui, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif) !important;
}

.dashboard-layout h1,
.dashboard-layout h2,
.dashboard-layout h3,
.dashboard-layout h4 {
    font-weight: 700 !important;
    letter-spacing: -0.015em !important;
}

.dashboard-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 24px 12px;
    transition: transform var(--transition-base);
    flex-shrink: 0;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.dashboard-sidebar-header {
    padding: 0 12px 16px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    max-width: 100%;
}

.dashboard-sidebar-header span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #86868b;
    text-transform: uppercase;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-sizing: border-box;
}

.dashboard-nav-item {
    padding: 9px 12px;
    border-radius: 10px;
    color: #424245;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.dashboard-nav-item:hover {
    background: rgba(0, 0, 0, 0.03);
    color: #1d1d1f;
}

.dashboard-nav-item.active {
    background: #1d1d1f;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.dashboard-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 1.8px;
}

.dashboard-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #86868b;
    padding: 20px 12px 6px 12px;
    font-weight: 600;
}

.dashboard-content {
    flex-grow: 1;
    padding: 36px 44px;
    background: #fbfbfd;
    overflow-y: auto;
    min-height: 100%;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Precision Modern Sans-Serif Headers (Apple / Linear Grade) */
.editorial-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #1d1d1f;
}

/* Metric / Stat Card Apple Style */
.apple-stat-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.apple-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #86868b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.apple-stat-value {
    font-size: 2.4rem;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
    letter-spacing: -0.03em;
    color: #1d1d1f;
    line-height: 1.1;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.apple-stat-sub {
    font-size: 0.85rem;
    color: #86868b;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
    font-weight: 400;
}

/* Dashboard KPI Grid & Mobile Optimization */
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }
    .apple-stat-card {
        padding: 14px 16px !important;
        border-radius: 12px !important;
    }
    .apple-stat-label {
        font-size: 0.65rem !important;
        gap: 5px !important;
        margin-bottom: 8px !important;
    }
    .apple-stat-value {
        font-size: 1.65rem !important;
        gap: 4px !important;
    }
    .apple-stat-sub {
        font-size: 0.75rem !important;
    }
}

/* Dashboard Bottom Navigation Bar */
.dashboard-mobile-bottom-nav,
.ios-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 60px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 999;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .dashboard-mobile-bottom-nav,
    .ios-bottom-nav {
        display: flex;
    }
    .dashboard-content {
        padding-bottom: 80px !important;
    }
}

.dashboard-mobile-bottom-nav .ios-nav-item,
.ios-bottom-nav .ios-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex: 1;
}

.dashboard-mobile-bottom-nav .ios-nav-item svg,
.ios-bottom-nav .ios-nav-item svg {
    width: 20px;
    height: 20px;
}

.dashboard-mobile-bottom-nav .ios-nav-item.active,
.ios-bottom-nav .ios-nav-item.active {
    color: var(--color-primary, #2563eb);
    font-weight: 700;
}

.dashboard-mobile-bottom-nav .ios-nav-item:active,
.ios-bottom-nav .ios-nav-item:active {
    transform: scale(0.92);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    background: #ffffff;
    border: 1px dashed rgba(0, 0, 0, 0.12);
    border-radius: 16px;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    color: #86868b;
    margin-bottom: 16px;
    stroke-width: 1.5px;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
    letter-spacing: -0.015em;
    color: #1d1d1f;
    margin: 0 0 8px 0;
}

.empty-state p {
    color: #86868b;
    margin: 0 0 24px 0;
    max-width: 400px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.dashboard-tab {
    display: none;
    animation: fadeIn 0.25s ease;
}

.dashboard-tab.active {
    display: block;
}

.dashboard-hamburger {
    display: none !important;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 99;
}

@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 100;
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    .dashboard-sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.active {
        display: block;
    }
    .dashboard-content {
        padding: 20px 16px;
    }
}
    .dashboard-hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
        padding: 6px 10px;
        font-size: 1.2rem;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 6px;
        cursor: pointer;
        line-height: 1;
    }
}

@media (min-width: 769px) {
    .dashboard-mobile-header {
        display: none !important;
    }
}

/* Status Chips y Mensajes (App UI) */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-chip.pending { background: #fef3c7; color: #92400e; }
.status-chip.delivered { background: #dcfce7; color: #166534; }
.status-chip.shipped { background: #e0f2fe; color: #075985; }
.status-chip.cancelled { background: #fee2e2; color: #991b1b; }

.inbox-card {
    background: var(--color-paper);
    border: 1px solid var(--color-line);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.inbox-card:hover {
    box-shadow: var(--shadow-base);
    transform: translateY(-2px);
}

/* ==========================================================================
   ACCESS / LOGIN FORM STYLES
   ========================================================================== */
.access-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
    gap: 24px;
    align-items: stretch;
    max-width: 940px;
    margin: 40px auto 60px;
}

.access-intro,
.access-form {
    border: 1px solid var(--color-line, #e2e8f0);
    border-radius: 16px;
}

.access-intro {
    padding: clamp(30px, 4vw, 48px);
    color: var(--la-aurora-text, var(--color-ink, #2A2A2A));
    background: var(--la-aurora-bg-alt, var(--color-surface, #F4F1E9));
    border: 1px solid var(--la-aurora-border, var(--color-border, #E5E0D5));
}

.access-intro h1 {
    margin: 8px 0 18px;
    max-width: 520px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 700;
    color: var(--la-aurora-primary, var(--color-primary, #8B1E1E));
}

.access-intro p {
    font-size: 1.08rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    color: var(--la-aurora-text, var(--color-ink, #2A2A2A));
}

.access-intro ul {
    margin: 20px 0 0;
    padding-left: 22px;
}

.access-intro li {
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--la-aurora-text-muted, var(--color-muted, #555555));
}

.access-intro li + li {
    margin-top: 10px;
}

.access-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: clamp(24px, 4vw, 36px);
    background: var(--la-aurora-bg-alt, #ffffff);
    border: 1px solid var(--la-aurora-border, #e2e8f0);
    box-shadow: var(--shadow-sm, 0 4px 20px rgba(0,0,0,0.04));
    border-radius: 16px;
}

.access-form h2 {
    margin: 0 0 4px;
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.2;
    color: var(--la-aurora-text, var(--color-ink, #0f172a));
}

.access-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--la-aurora-text, var(--color-ink, #0f172a));
    font-weight: 600;
    font-size: 0.95rem;
}

.access-form input[type="text"],
.access-form input[type="email"],
.access-form input[type="tel"] {
    width: 100%;
    min-height: 48px;
    padding: 11px 16px;
    border: 1.5px solid var(--la-aurora-border, #94a3b8) !important;
    border-radius: 10px;
    background: var(--la-aurora-bg, #ffffff);
    color: var(--la-aurora-text, #0f172a);
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.access-form input:focus {
    outline: none;
    border-color: var(--la-aurora-primary, var(--color-primary, #8B1E1E)) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--la-aurora-primary, #8B1E1E) 18%, transparent) !important;
}

.access-form button.button.primary,
.access-form button[type="submit"] {
    background-color: var(--la-aurora-primary, var(--color-primary, #8B1E1E)) !important;
    color: var(--la-aurora-primary-text, #ffffff) !important;
    border: none !important;
    border-radius: var(--radius-pill, 25px) !important;
    font-family: var(--font-sans, inherit);
    font-weight: 700 !important;
    font-size: 1rem !important;
    padding: 14px 24px !important;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-shadow: var(--shadow-sm, 0 2px 6px rgba(0,0,0,0.1));
    width: 100%;
}

.access-form button.button.primary:hover,
.access-form button[type="submit"]:hover {
    background-color: var(--la-aurora-primary-hover, #601414) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.15));
}

.eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--color-muted, #64748b);
    margin: 0 0 4px 0;
}
.access-intro .eyebrow {
    color: var(--la-aurora-primary, var(--color-primary, #8B1E1E));
}

@media (max-width: 768px) {
    .access-layout {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }
}

/* ==========================================================================
   PUBLIC LANDING & FUNNEL STYLES (ARLIBROS HOME & MANIFIESTO)
   ========================================================================== */
.funnel-main {
    font-family: var(--font-ui);
    color: var(--color-ink);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-up {
    animation: fadeUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

.funnel-hero {
    min-height: 80vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: var(--space-3xl) var(--space-xl);
    gap: var(--space-3xl);
    background: radial-gradient(circle at right, var(--color-soft) 0%, var(--color-paper) 100%);
    position: relative;
    max-width: var(--wrap-width);
    margin: 0 auto;
}
@media (max-width: 900px) {
    .funnel-hero { grid-template-columns: 1fr; padding: var(--space-xl) var(--space-md); min-height: auto; }
}
.hero-content {
    max-width: 600px;
}
.funnel-eyebrow {
    color: var(--color-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
    font-size: var(--text-xs);
    display: inline-block;
}
.funnel-hero h1 {
    font-size: var(--text-display); 
    font-family: var(--font-editorial);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
    color: var(--color-ink);
}
.funnel-hero p.lead {
    font-size: var(--text-lg);
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}
.hero-visual {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}
.hero-visual img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--space-2xl) var(--space-lg);
    margin: var(--space-3xl) auto 0;
    background: var(--color-ink);
    border-radius: var(--border-radius-lg);
    flex-wrap: wrap;
    gap: var(--space-lg);
    max-width: var(--wrap-width);
    color: var(--color-paper);
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: var(--text-display);
    font-family: var(--font-editorial);
    color: var(--color-paper);
    line-height: 1;
    margin-bottom: var(--space-xs);
}
.stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.manifesto-section {
    padding: var(--space-4xl) var(--space-lg);
    background: var(--color-soft);
    border-radius: var(--border-radius-lg);
    margin: var(--space-3xl) auto;
    max-width: var(--wrap-width);
}
.manifesto-container {
    max-width: 760px;
    margin: 0 auto;
}
.manifesto-text h2 {
    font-size: var(--text-display);
    margin-bottom: var(--space-lg);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-ink);
    font-family: var(--font-editorial);
}
.manifesto-text p {
    font-size: var(--text-lg);
    line-height: 1.8;
    margin-bottom: var(--space-md);
    color: var(--color-muted);
}
.manifesto-quote {
    font-size: var(--text-2xl);
    font-family: var(--font-editorial);
    font-style: italic;
    line-height: 1.4;
    border-left: 4px solid var(--color-accent);
    padding-left: var(--space-lg);
    margin: var(--space-2xl) 0;
    color: var(--color-ink);
}

.solution-section {
    padding: var(--space-4xl) var(--space-lg);
    max-width: var(--wrap-width);
    margin: 0 auto;
}
.solution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}
.solution-grid.reversed {
    direction: rtl;
    margin-top: var(--space-4xl);
}
.solution-grid.reversed > * {
    direction: ltr;
}
@media (max-width: 900px) {
    .solution-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
    .solution-grid.reversed { margin-top: var(--space-2xl); direction: ltr; }
}
.solution-content h3 {
    font-family: var(--font-editorial);
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
    color: var(--color-ink);
}
.solution-content p {
    font-size: var(--text-lg);
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}
.check-list {
    list-style: none;
    padding: 0;
}
.check-list li {
    font-size: var(--text-base);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    color: var(--color-ink);
}
.check-list li::before {
    content: "✦";
    color: var(--color-accent);
}
.solution-visual-wrapper {
    position: relative;
}
.browser-mockup {
    background: #fdfdfd;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-line);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
}
.browser-header {
    background: #f1f5f9;
    border-bottom: 1px solid var(--color-line);
    padding: 0.5rem 1rem;
    display: flex;
    gap: 6px;
    align-items: center;
}
.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}
.browser-dot:nth-child(1) { background: #ff5f56; }
.browser-dot:nth-child(2) { background: #ffbd2e; }
.browser-dot:nth-child(3) { background: #27c93f; }
.floating-card {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-base);
    max-width: 260px;
    border: 1px solid var(--color-line);
}
.floating-card p {
    font-size: var(--text-xs);
    margin: 0;
    color: var(--color-ink);
}

.choose-path-section {
    padding: var(--space-4xl) var(--space-lg);
    background: var(--color-soft);
    border-radius: var(--border-radius-lg);
    text-align: center;
    max-width: var(--wrap-width);
    margin: 0 auto;
}
.choose-path-section h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-3xl);
    margin-bottom: var(--space-2xl);
}
.path-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}
.path-card {
    background: var(--color-paper);
    padding: var(--space-2xl) var(--space-lg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-line);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
}
.path-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.path-card .icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}
.path-card h3 {
    font-size: var(--text-2xl);
    font-family: var(--font-editorial);
    margin-bottom: var(--space-sm);
}
.path-card p {
    color: var(--color-muted);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    flex-grow: 1;
}

.featured-books-section {
    padding: var(--space-4xl) var(--space-lg);
    max-width: var(--wrap-width);
    margin: 0 auto;
}
.featured-books-section h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-3xl);
    text-align: center;
    margin-bottom: var(--space-xs);
}
.featured-books-section p.subtitle {
    text-align: center;
    color: var(--color-muted);
    font-size: var(--text-lg);
    margin-bottom: var(--space-2xl);
}
.featured-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.faq-section {
    padding: var(--space-3xl) var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
}
.faq-section h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-3xl);
    text-align: center;
    margin-bottom: var(--space-2xl);
}
.faq-item {
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-line);
    padding-bottom: var(--space-lg);
}
.faq-item h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-ink);
}
.faq-item p {
    color: var(--color-muted);
    line-height: 1.6;
}

.final-cta {
    background: var(--color-ink);
    color: var(--color-paper);
    text-align: center;
    padding: var(--space-4xl) var(--space-lg);
    border-radius: var(--border-radius-lg);
    max-width: var(--wrap-width);
    margin: var(--space-3xl) auto;
}
.final-cta h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-display);
    margin-bottom: var(--space-md);
    color: var(--color-paper);
}
.final-cta p {
    font-size: var(--text-xl);
    opacity: 0.9;
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   LEER PAGE STYLES
   ========================================================================== */
.leer-hero {
    text-align: center;
    padding: var(--space-4xl) var(--space-lg);
    background: linear-gradient(to bottom, var(--color-soft), var(--color-paper));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.leer-hero h1 {
    font-size: var(--text-display);
    font-family: var(--font-editorial);
    margin-bottom: var(--space-lg);
    color: var(--color-ink);
    line-height: 1.15;
    max-width: 800px;
}
.leer-hero p {
    font-size: var(--text-xl);
    color: var(--color-muted);
    max-width: 600px;
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
}

.leer-benefits {
    padding: var(--space-4xl) var(--space-lg);
    background: var(--color-paper);
}
.leer-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    max-width: var(--wrap-width);
    margin: 0 auto;
}
.benefit-card {
    background: var(--color-soft);
    padding: var(--space-2xl) var(--space-lg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-line);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    text-align: left;
}
.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.benefit-card .icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
    display: inline-block;
}
.benefit-card h3 {
    font-size: var(--text-2xl);
    font-family: var(--font-editorial);
    margin-bottom: var(--space-md);
    color: var(--color-ink);
}
.benefit-card p {
    color: var(--color-muted);
    line-height: 1.6;
}

.leer-split-section {
    padding: var(--space-4xl) var(--space-lg);
    max-width: var(--wrap-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}
.leer-split-content h2 {
    font-size: var(--text-3xl);
    font-family: var(--font-editorial);
    margin-bottom: var(--space-lg);
    color: var(--color-ink);
}
.leer-split-content p {
    font-size: var(--text-lg);
    color: var(--color-muted);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}
.leer-split-visual {
    background: var(--color-soft);
    border-radius: var(--border-radius-lg);
    padding: var(--space-3xl);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--color-line);
    box-shadow: var(--shadow-sm);
}
.visual-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    opacity: 0.15;
    position: absolute;
}
.visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.visual-content span {
    font-size: 4rem;
}

.leer-books {
    padding: var(--space-4xl) var(--space-lg);
    background: var(--color-soft);
    border-top: 1px solid var(--color-line);
}
.leer-books-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}
.leer-books-header h2 {
    font-size: var(--text-3xl);
    font-family: var(--font-editorial);
    margin-bottom: var(--space-md);
}
.leer-books-header p {
    color: var(--color-muted);
    font-size: var(--text-lg);
}

.leer-app-showcase {
    padding: var(--space-4xl) var(--space-lg);
    max-width: var(--wrap-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}
.showcase-content h2 {
    font-size: var(--text-3xl);
    font-family: var(--font-editorial);
    margin-bottom: var(--space-lg);
    color: var(--color-ink);
}
.showcase-content p {
    font-size: var(--text-lg);
    color: var(--color-muted);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}
.showcase-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}
.feature-item strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--color-ink);
    font-size: var(--text-lg);
}
.feature-item p {
    font-size: var(--text-sm);
    margin-bottom: 0;
}
.showcase-mockup {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}
.mockup-frame {
    width: 320px;
    height: 560px;
    background: var(--color-paper);
    border-radius: var(--border-radius-lg);
    border: 8px solid var(--color-ink);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: rotateY(-8deg) rotateX(4deg);
    transition: transform var(--transition-base);
}
.mockup-frame:hover {
    transform: rotateY(0) rotateX(0);
}
.mockup-header {
    padding: var(--space-md);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-line);
    color: var(--color-muted);
    font-size: var(--text-sm);
    background: var(--color-soft);
}
.mockup-body {
    padding: var(--space-lg);
    flex: 1;
    font-family: 'Georgia', serif;
    color: var(--color-ink);
    line-height: 1.8;
    font-size: var(--text-base);
    overflow-y: auto;
}
.mockup-highlight {
    background: rgba(79, 70, 229, 0.12);
    padding: var(--space-xs) 0;
    position: relative;
    border-radius: var(--border-radius-sm);
}
.mockup-comment-tooltip {
    position: absolute;
    right: -10px;
    top: -15px;
    background: var(--color-accent);
    color: #fff;
    font-size: var(--text-xs);
    padding: 2px 8px;
    border-radius: 12px;
    font-family: var(--font-ui);
    font-weight: bold;
}
.mockup-footer {
    padding: var(--space-md);
    background: var(--color-soft);
    border-top: 1px solid var(--color-line);
    font-size: var(--text-xs);
    color: var(--color-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}
.mockup-progress {
    width: 100%;
    height: 4px;
    background: var(--color-line);
    border-radius: 2px;
}
.mockup-progress-bar {
    width: 45%;
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .leer-hero h1 { font-size: var(--text-3xl); }
    .leer-split-section, .leer-app-showcase { grid-template-columns: 1fr; gap: var(--space-2xl); }
    .mockup-frame { transform: none; }
}

/* Dashboard Desktop & Mobile Header Overrides */
@media (min-width: 769px) {
    .dashboard-mobile-header {
        display: none !important;
    }
}

/* Status Chips */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    background: var(--color-soft);
    color: var(--color-ink);
    border: 1px solid var(--color-line);
}
.status-chip.pending {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
.status-chip.delivered, .status-chip.paid {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}
.status-chip.shipped {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.status-chip.warning {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

/* App-style Inbox / Messages */
.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.inbox-card {
    background: var(--color-paper, #ffffff);
    border: 1px solid var(--color-line, #e2e8f0);
    border-radius: var(--border-radius, 10px);
    padding: 16px 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.inbox-card:hover {
    border-color: var(--color-primary, #2563eb);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.inbox-card.unread {
    background: #f5f9ff;
    border-left: 4px solid var(--color-primary, #2563eb);
}
.inbox-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.inbox-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-ink, #0f172a);
}
.inbox-card-date {
    font-size: 0.78rem;
    color: var(--color-muted, #64748b);
}
.inbox-card-sub {
    font-size: 0.82rem;
    color: var(--color-muted, #64748b);
    margin-bottom: 8px;
}
/* iOS / PWA Bottom Navigation Bar */
.ios-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 62px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
}

.ios-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #86868b;
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    padding: 6px 0;
    flex: 1;
    cursor: pointer;
}

.ios-nav-item.active {
    color: #1d1d1f;
    font-weight: 700;
}

.ios-nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8px;
}

/* Dashboard Hub Grid (2/3 Main + 1/3 Widget Sidebar) */
.dashboard-hub-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-hub-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-widget-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

.dashboard-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.dashboard-widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-event-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.dashboard-event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ==========================================================================
   APPLE BOOKS CARD SYSTEM (Zero-DB / Panel Usuario / Catálogo)
   ========================================================================== */
.apple-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 22px;
}

.apple-book-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
    box-sizing: border-box;
}

.apple-book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
}

.apple-book-cover-anchor {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px 18px 16px;
    background: linear-gradient(180deg, #fbfbfd 0%, #f4f4f7 100%);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    height: 210px;
    box-sizing: border-box;
}

.apple-book-cover-img {
    height: 175px;
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 
        -2px 0 4px rgba(0, 0, 0, 0.08) inset,
        4px 10px 22px -2px rgba(0, 0, 0, 0.2),
        0 2px 6px -1px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-book-card:hover .apple-book-cover-img {
    transform: scale(1.04) translateY(-3px);
}

.apple-book-info {
    padding: 16px 18px 18px 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
}

.apple-book-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.35;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.apple-book-title a {
    color: #1d1d1f;
    text-decoration: none;
    transition: color 0.15s ease;
}

.apple-book-title a:hover {
    color: #2563eb;
}

.apple-book-author {
    font-size: 0.82rem;
    color: #86868b;
    font-weight: 400;
}

.apple-book-btn {
    width: 100%;
    justify-content: center;
    border-radius: 980px;
    padding: 9px 14px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.apple-book-btn.primary {
    background: #1d1d1f;
    color: #ffffff;
}

.apple-book-btn.primary:hover {
    background: #000000;
    transform: scale(1.01);
}

.apple-book-btn.secondary {
    background: rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
}

.apple-book-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* ==========================================
   NORMALIZACIÓN TEMA LA AURORA & BLOQUES
   ========================================== */

/* 1. Espaciado Armónico de Secciones */
.la-aurora-section {
    padding: 3.25rem 0;
    position: relative;
    box-sizing: border-box;
}

.la-aurora-section.bg-alt {
    background: var(--la-aurora-bg-alt, var(--color-bg-light, #f8fafc));
}

/* 2. Encabezados de Sección Unificados */
.la-aurora-section .section-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.la-aurora-section .section-header h1,
.la-aurora-section .section-header h2 {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--la-aurora-text, var(--color-ink, #1e293b));
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.la-aurora-section .section-header p {
    font-size: 1.05rem;
    color: var(--la-aurora-text-muted, var(--color-text-muted, #64748b));
    margin: 0;
    line-height: 1.5;
}

/* 3. Normalización de Rich Text y Quill (Custom Pages, Biografía, etc.) */
.custom-page-body, 
.quienes-somos-body, 
.custom-html-wrapper {
    color: var(--la-aurora-text, #2d3748);
    line-height: 1.85;
    font-size: 1.05rem;
}

.custom-page-body p, 
.quienes-somos-body p, 
.custom-html-wrapper p {
    margin-bottom: 1.25rem;
    margin-top: 0;
}

.custom-page-body h1, .quienes-somos-body h1, .custom-html-wrapper h1,
.custom-page-body h2, .quienes-somos-body h2, .custom-html-wrapper h2,
.custom-page-body h3, .quienes-somos-body h3, .custom-html-wrapper h3,
.custom-page-body h4, .quienes-somos-body h4, .custom-html-wrapper h4 {
    font-family: var(--font-serif, Georgia, serif);
    color: var(--la-aurora-primary, #1a202c);
    font-weight: 700;
    line-height: 1.35;
    margin-top: 1.8rem;
    margin-bottom: 0.75rem;
}

.custom-page-body h1, .quienes-somos-body h1, .custom-html-wrapper h1 { font-size: 1.85rem; }
.custom-page-body h2, .quienes-somos-body h2, .custom-html-wrapper h2 { font-size: 1.5rem; border-bottom: 1px solid var(--la-aurora-border, #e2e8f0); padding-bottom: 0.4rem; }
.custom-page-body h3, .quienes-somos-body h3, .custom-html-wrapper h3 { font-size: 1.25rem; }
.custom-page-body h4, .quienes-somos-body h4, .custom-html-wrapper h4 { font-size: 1.1rem; }

/* Alineaciones Quill */
.custom-page-body .ql-align-center, .quienes-somos-body .ql-align-center { text-align: center; }
.custom-page-body .ql-align-right, .quienes-somos-body .ql-align-right { text-align: right; }
.custom-page-body .ql-align-justify, .quienes-somos-body .ql-align-justify { text-align: justify; }

/* Imágenes con ceñido de texto */
.custom-page-body img, .quienes-somos-body img, .custom-html-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm, 6px);
    margin: 1rem 0;
}

.custom-page-body img[style*="float: left"], .quienes-somos-body img[style*="float: left"] {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
    max-width: 50%;
}

.custom-page-body img[style*="float: right"], .quienes-somos-body img[style*="float: right"] {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
    max-width: 50%;
}

/* Incrustación de Video Responsivo (YouTube, Vimeo) */
.custom-page-body iframe, .custom-page-body .ql-video,
.quienes-somos-body iframe, .quienes-somos-body .ql-video,
.custom-html-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    height: auto;
    border: none;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Citas destacadas */
.custom-page-body blockquote, .quienes-somos-body blockquote {
    border-left: 4px solid var(--la-aurora-primary, #2b4c7e);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--la-aurora-text-muted, #4a5568);
}

@media (max-width: 768px) {
    .la-aurora-section {
        padding: 2.25rem 0;
    }
    .custom-page-body img[style*="float: left"],
    .custom-page-body img[style*="float: right"],
    .quienes-somos-body img[style*="float: left"],
    .quienes-somos-body img[style*="float: right"] {
        float: none;
        display: block;
        margin: 1rem auto;
        max-width: 100%;
    }
}

/* ==========================================================================
   SIDE CART DRAWER & BADGES
   ========================================================================== */
.cart-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary, #2563eb);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    margin-left: 4px;
    line-height: 1;
}

.side-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.side-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-bg, #ffffff);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.side-cart-drawer.active {
    transform: translateX(-420px);
}
@media (max-width: 480px) {
    .side-cart-drawer {
        right: -100%;
        max-width: 100%;
    }
    .side-cart-drawer.active {
        transform: translateX(-100%);
    }
}

.side-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--color-line, rgba(0, 0, 0, 0.08));
}
.side-cart-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}
.side-cart-close-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-muted, #64748b);
    padding: 4px;
}

.side-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}
.side-cart-empty {
    text-align: center;
    padding: 40px 10px;
}

.side-cart-item {
    display: flex;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px dashed var(--color-line, rgba(0, 0, 0, 0.08));
}
.side-cart-item-img {
    width: 60px;
    height: 85px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}
.side-cart-item-info {
    flex: 1;
}
.side-cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: var(--color-text, #0f172a);
}
.side-cart-item-format {
    font-size: 0.8rem;
    color: var(--color-muted, #64748b);
    margin-bottom: 4px;
}
.side-cart-item-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-primary, #2563eb);
    margin-bottom: 8px;
}

.side-cart-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.side-cart-qty-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-line, #cbd5e1);
    border-radius: 6px;
    overflow: hidden;
}
.side-cart-qty-controls button {
    background: var(--color-bg-alt, #f8fafc);
    border: none;
    padding: 4px 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}
.side-cart-qty-controls button:hover {
    background: #e2e8f0;
}
.side-cart-qty-controls span {
    padding: 0 10px;
    font-weight: 600;
    font-size: 0.88rem;
}
.side-cart-remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

.side-cart-addon-box {
    margin-top: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 10px;
    border-radius: 8px;
}

.side-cart-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--color-line, rgba(0, 0, 0, 0.08));
    background: var(--color-bg-alt, #f8fafc);
}
.side-cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 14px;
}
.side-cart-subtotal strong {
    color: var(--color-primary, #2563eb);
}
.side-cart-actions {
    display: flex;
    gap: 10px;
}
.side-cart-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 12px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.2;
}
.side-cart-btn-secondary {
    flex: 1;
    background: var(--color-bg-alt, #f1f5f9);
    color: var(--color-text, #1e293b);
    border: 1px solid var(--color-line, #cbd5e1);
}
.side-cart-btn-secondary:hover {
    background: #e2e8f0;
}
.side-cart-btn-primary {
    flex: 1.2;
}

/* ==========================================================================
   Animaciones & Micro-interacciones Premium (Launch Ready)
   ========================================================================== */

/* 1. Transiciones de Entrada Suaves */
@keyframes fadeUpIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section,
.book-grid,
.author-card,
.summary-container {
    animation: fadeUpIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 2. Micro-interacciones en Botones */
.button,
.btn-primary,
.btn-secondary {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.2s ease, 
                color 0.2s ease !important;
}

.button:hover,
.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.button:active,
.btn-primary:active,
.btn-secondary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 3. Elevación 3D en Portadas de Libros (Apple Books Feel) */
.book-cover,
.book-card img,
.book-card-cover {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, box-shadow;
}

.book-card:hover .book-cover,
.book-card:hover img,
.book-card-item:hover img {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.25), 
                -2px 0 6px inset rgba(0, 0, 0, 0.15) !important;
}

/* 4. Badges & Chips Interactivos */
.badge,
.tag,
.format-badge {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.badge:hover,
.tag:hover,
.format-badge:hover {
    transform: scale(1.04);
}

/* 5. Accesibilidad - Respetar Preferencias de Movimiento Reducido */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}






