/*
Theme Name: Conjuntos AE Theme
Theme URI: https://conjuntosae.com
Author: Antigravity AI
Description: Premium Light SaaS Residential Management Theme.
Version: 1.5.0
Text Domain: conjuntos-ae-theme
*/

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

:root {
    --primary: #0E3950;
    /* Azul Conjuntos AE */
    --primary-hover: #0a2d3f;
    --accent: #ECAD20;
    /* Amarillo Conjuntos AE */
    --bg-app: #f1f5f9;
    --bg-white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Evitar scroll horizontal accidental */
}

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

h1,
h2,
h3,
.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Sidebar Styling - Clean Light */
.cae-app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling - Modern & Interactive */
.cae-app-layout {
    display: flex;
    min-height: 100vh;
}

.cae-sidebar {
    width: 280px;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 32px;
    left: 0;
    height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    z-index: 9990;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    overflow-y: auto;
}

/* Ajuste específico para cuando la Admin Bar de WP está presente */
body.admin-bar .cae-sidebar {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .cae-sidebar {
        top: 46px !important;
        height: calc(100vh - 46px);
    }
}

body:not(.admin-bar) .cae-sidebar {
    top: 0 !important;
    height: 100vh !important;
}

/* Ajuste para móviles cuando la Admin Bar cambia de altura */
@media screen and (max-width: 782px) {
    .cae-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* Si no hay Admin Bar (usuarios no logueados o admin bar desactivada) */
body:not(.admin-bar) .cae-sidebar {
    top: 0;
    height: 100vh;
}

/* Sidebar Collapsed State */
.cae-sidebar.collapsed {
    width: 80px;
    overflow: visible !important;
    /* Liberar tooltips */
}

.cae-sidebar.collapsed .sidebar-nav {
    overflow: visible !important;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    box-sizing: border-box;
}

.logo-container {
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s;
    max-height: 48px;
    /* Altura máxima razonable para el logo */
}

.logo-container a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-container img.custom-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.cae-sidebar.collapsed .logo-container {
    opacity: 0;
    pointer-events: none;
}

.logo-text {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.logo-text .accent {
    background: var(--primary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 4px;
}

/* Toggle Button - Yellow & Blue (Premium Contrast) */
.sidebar-toggle {
    background: var(--accent);
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:hover {
    background: var(--primary);
    color: var(--accent);
    transform: scale(1.05);
}

.cae-sidebar.collapsed .sidebar-toggle {
    width: 100%;
    margin-top: 10px;
}

.sidebar-nav {
    flex: 1;
    padding: 0 0.75rem;
    margin-top: 1rem;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li a {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    margin-bottom: 4px;
    white-space: nowrap;
}

.sidebar-list li a:hover,
.sidebar-list li.current-menu-item a {
    background: #f1f5f9;
    color: var(--primary);
}

/* LIMPIEZA ABSOLUTA DE ICONOS Y CUADROS RESIDUALES (SOLO BEFORE) */
.sidebar-list li::before,
.sidebar-list li a::before {
    content: none !important;
    display: none !important;
}

/* Solo habilitar el icono cuando hay una clase Dashicon en el LI */
.sidebar-list li[class*="dashicons-"] a::before {
    display: flex !important;
    font-family: "dashicons" !important;
    font-size: 20px;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Ocultar texto del menú en colapsado - MÉTODO SEGURO */
.cae-sidebar.collapsed .sidebar-list li a {
    font-size: 0 !important;
    padding: 12px 0 !important;
    justify-content: center !important;
    position: relative;
}

/* Restaurar tamaño para el icono en colapsado */
.cae-sidebar.collapsed .sidebar-list li a::before {
    font-size: 22px !important;
    margin-right: 0 !important;
}

/* Tooltips for collapsed state using CSS */
.cae-sidebar.collapsed .sidebar-list li a:hover::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10001;
    pointer-events: none;
    box-shadow: var(--shadow-md);
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Dynamic Icon Mapping - Map common dashicon classes to content codes */
/* MAPPING DE ICONOS ESPECÍFICOS CON !IMPORTANT */
.sidebar-list li.dashicons-admin-home a::before {
    content: "\f102" !important;
}

.sidebar-list li.dashicons-admin-users a::before {
    content: "\f110" !important;
}

.sidebar-list li.dashicons-calendar-alt a::before {
    content: "\f508" !important;
}

.sidebar-list li.dashicons-welcome-learn-more a::before {
    content: "\f118" !important;
}

.sidebar-list li.dashicons-media-document a::before {
    content: "\f497" !important;
}

.sidebar-list li.dashicons-book-alt a::before {
    content: "\f330" !important;
}

/* Mobile Toggle Styling - High Contrast Premium */
.mobile-toggle {
    display: none;
    background: var(--primary);
    border: none;
    color: #ffffff !important;
    width: 42px;
    height: 42px;
    cursor: pointer;
    margin-right: 15px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(14, 57, 80, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-toggle:hover {
    background: var(--accent);
    color: var(--primary) !important;
    transform: scale(1.05);
}

.mobile-toggle .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    line-height: normal;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
}

/* Sidebar Overlay */
.cae-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 57, 80, 0.4);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-open+.cae-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar Footer & User block */
.cae-sidebar.collapsed .sidebar-footer {
    overflow: visible !important;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.user-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar img {
    border-radius: 50%;
}

.user-detail {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.2s;
}

.cae-sidebar.collapsed .user-detail {
    display: none;
}

.user-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.logout-link {
    font-size: 0.75rem;
    color: #ef4444;
    text-decoration: none;
}

/* Tooltip for User Actions in Collapsed State */
.cae-sidebar.collapsed .user-block {
    justify-content: center;
    position: relative;
}

.user-avatar-link {
    display: flex;
    text-decoration: none;
    transition: transform 0.2s;
}

.user-avatar-link:hover {
    transform: scale(1.1);
}

.cae-sidebar.collapsed .user-avatar-link:hover::after {
    content: "Cerrar Sesión";
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 1001;
    pointer-events: none;
}

.login-sidemenu {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px;
}

.cae-sidebar.collapsed .login-sidemenu .label {
    display: none;
}

/* Main Wrapper Adjustment */
.cae-main-wrapper {
    padding-left: 280px;
    /* Usar padding en lugar de margin para evitar desbordamiento */
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 70px;
    /* Espacio para el footer fijo */
}

body.sidebar-collapsed .cae-main-wrapper {
    padding-left: 80px;
}

.cae-top-bar {
    height: 80px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.cae-top-bar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.top-bar-actions .button {
    background: var(--primary);
    color: #fff !important;
    padding: 8px 24px;
    border-radius: 50px;
    /* Estilo píldora más moderno */
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(14, 57, 80, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
}

.top-bar-actions .button:hover {
    background: transparent;
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(14, 57, 80, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .cae-sidebar {
        transform: translateX(-100%);
        width: 280px !important;
    }

    .cae-sidebar.mobile-open {
        transform: translateX(0);
    }

    .cae-main-wrapper {
        padding-left: 0 !important;
    }
}

.page-title h1 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0;
}

main.container {
    padding: 2.5rem;
    max-width: none;
    width: 100%;
    display: block;
}

/* Cards & Components */
.cae-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100%;
    /* Asegurar que llene el espacio si el contenedor es más alto */
}

.cae-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.cae-card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
}

.button,
button,
input[type="submit"] {
    background: var(--primary);
    color: #ffffff !important;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
    display: inline-block;
    text-align: center;
}

.button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.cae-footer {
    padding: 4rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* --- CARTELERA SLIDER (MODERNO) --- */
.cae-cartelera-wrapper {
    background: #f8fafc;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.cae-cartelera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cae-cartelera-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cae-cartelera-header h2 .dashicons {
    color: var(--accent);
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.cae-slider-nav {
    display: flex;
    gap: 10px;
}

.cae-slider-btn {
    background: var(--primary);
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(14, 57, 80, 0.2);
}

.cae-slider-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: normal;
}

.cae-slider-btn:hover {
    background: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
}

.cae-cartelera-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(33.333% - 13.333px);
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    padding-bottom: 10px;
}

.cae-cartelera-slider::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.cae-news-card-v2 {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid var(--border);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.cae-news-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.cae-news-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cae-news-thumb {
    height: 180px;
    overflow: hidden;
    background: #f1f5f9;
}

.cae-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cae-news-card-v2:hover .cae-news-thumb img {
    transform: scale(1.05);
}

.cae-news-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.cae-news-thumb.placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.cae-news-content {
    padding: 20px;
}

.cae-news-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.cae-news-content h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    line-height: 1.4;
    color: var(--primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cae-news-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.cae-read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-block;
    transition: color 0.2s;
}

.cae-news-card-v2:hover .cae-read-more {
    color: var(--primary);
}

/* Responsive Cartelera */
@media screen and (max-width: 1024px) {
    .cae-cartelera-slider {
        grid-auto-columns: calc(50% - 10px);
    }
}

@media screen and (max-width: 640px) {
    .cae-cartelera-slider {
        grid-auto-columns: 100%;
    }
}

/* Premium Forms */
.cae-form-card {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    overflow: hidden;
}

.cae-form-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.cae-form-header h2 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cae-form-header h2 .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.cae-form-header p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

.cae-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.cae-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cae-form-group.full-width {
    grid-column: span 2;
}

.cae-form-group label {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cae-premium-form input[type="text"],
.cae-premium-form select,
.cae-premium-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.cae-premium-form input:focus,
.cae-premium-form select:focus,
.cae-premium-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 57, 80, 0.1);
}

.cae-file-upload-wrapper {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
}

.cae-file-upload-wrapper:hover {
    border-color: var(--accent);
    background: #f8fafc;
}

.cae-form-actions {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.btn-large {
    padding: 14px 32px !important;
    font-size: 1.1rem !important;
}

@media (max-width: 768px) {
    .cae-form-grid {
        grid-template-columns: 1fr;
    }

    .cae-form-group.full-width {
        grid-column: span 1;
    }
}

/* Success Card */
.cae-success-card {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 600px;
    margin: 2rem auto;
}

.cae-success-icon {
    width: 80px;
    height: 80px;
    background: #eef7e9;
    color: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.cae-success-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.cae-success-content h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.cae-radicado-badge {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 12px;
    margin: 2rem 0;
    display: inline-block;
}

.cae-radicado-badge span {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.cae-radicado-badge strong {
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: 1px;
}

.cae-success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.cae-success-actions .button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 24px !important;
}

.button-secondary {
    background: #f1f5f9 !important;
    color: var(--primary) !important;
    border: 1px solid var(--border) !important;
}

.button-secondary:hover {
    background: #e2e8f0 !important;
}

/* PQRS List Styles */
.cae-pqrs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.cae-pqrs-lista-container {
    padding: 1rem 0;
}

.cae-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8fafc;
    border: 2px dashed var(--border);
    color: var(--text-secondary);
}

.cae-table-card {
    padding: 0;
    overflow: hidden;
}

.cae-pqrs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.95rem;
}

.cae-pqrs-table th {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: #64748b;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cae-pqrs-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--primary);
    vertical-align: middle;
}

.cae-pqrs-table tr:last-child td {
    border-bottom: none;
}

.cae-pqrs-table tr:hover {
    background: #fcfdfe;
}

.cae-badge {
    padding: 6px 12px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* PQRS Interactive Table */
.cae-link-radicado {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
}

.cae-link-radicado:hover {
    border-bottom-style: solid;
}

.cae-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 8px;
    color: var(--primary);
    transition: all 0.2s;
}

.cae-btn-icon:hover {
    background: var(--primary);
    color: #fff !important;
}

/* PQRS Detail View */
.cae-pqrs-detail {
    margin-top: 1rem;
}

.cae-detail-header {
    margin-bottom: 2rem;
}

.cae-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.cae-back-link:hover {
    color: var(--primary);
}

.cae-detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.cae-badge-large {
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    background: #f1f5f9;
    color: #475569;
}

.cae-badge-large[data-status="radicada"] {
    background: #fef3c7;
    color: #92400e;
}

.cae-badge-large[data-status="en_gestion"] {
    background: #dbeafe;
    color: #1e40af;
}

.cae-badge-large[data-status="respondida"] {
    background: #dcfce7;
    color: #166534;
}

.cae-badge-large[data-status="cerrada"] {
    background: #f1f5f9;
    color: #475569;
}

.cae-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.cae-response-card {
    border-left: 4px solid #27ae60;
    background: #f0fdf4;
}

.cae-response-card h3 {
    color: #166534;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cae-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cae-meta-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.cae-meta-list li:last-child {
    border-bottom: none;
}

.cae-meta-list strong {
    color: #64748b;
    font-weight: 500;
}

/* Timeline */
.cae-timeline {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    position: relative;
}

.cae-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.cae-timeline li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 1.5rem;
}

.cae-timeline li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-date {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.timeline-status {
    font-weight: 600;
    color: var(--primary);
    text-transform: capitalize;
}

.timeline-note {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.25rem 0 0;
}

/* Detail View Layout */
.cae-pqrs-detail {
    display: flow-root;
    width: 100%;
    margin-bottom: 4rem;
}

.cae-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .cae-detail-grid {
        grid-template-columns: 1fr;
    }

    .cae-detail-sidebar {
        order: 2;
    }

    .cae-detail-main {
        order: 1;
    }
}

/* Comment Form */
.cae-comment-form-card {
    margin-top: 2rem;
    border-top: 3px solid var(--primary);
}

.cae-comment-form-card h3 {
    margin-bottom: 0.5rem;
}

.cae-form-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.cae-comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s;
}

.cae-comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 57, 80, 0.1);
}

.cae-comment-form .cae-form-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Dashboard Stat Cards */
.cae-card-stat {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(14, 57, 80, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.5);
    min-height: 120px;
}

.cae-card-stat:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(14, 57, 80, 0.15);
}

.cae-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    font-size: 28px;
    transition: transform 0.3s ease;
}

.cae-card-stat:hover .cae-stat-icon {
    transform: scale(1.1) rotate(-5deg);
}

.cae-stat-info {
    flex: 1;
}

.cae-stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
    margin-bottom: 4px;
}

.cae-stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cae-stat-arrow {
    font-size: 1.5rem;
    color: var(--border);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.cae-card-stat:hover .cae-stat-arrow {
    opacity: 1;
    color: var(--primary);
    transform: translateX(5px);
}

/* Individual Stat Colors */
.cae-stat-pqrs .cae-stat-icon {
    background: rgba(14, 57, 80, 0.1);
    color: var(--primary);
}

.cae-stat-reservas .cae-stat-icon {
    background: rgba(30, 79, 107, 0.1);
    color: #1e4f6b;
}

.cae-stat-inducciones .cae-stat-icon {
    background: rgba(236, 173, 32, 0.1);
    color: #c08c1a;
}

/* Dashboard refinements */
.cae-dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
    font-weight: 800;
}

/* Fix Icons in Buttons */
.btn-send-comment {
    position: relative;
    overflow: hidden;
}

.btn-send-comment .cae-svg-icon {
    width: 20px;
    height: 20px;
    fill: #ffffff !important;
    margin-right: 10px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.btn-send-comment:hover .cae-svg-icon {
    transform: translate(3px, -3px) rotate(-10deg);
}

.btn-send-comment .dashicons {
    display: none !important;
    /* Desactivar dashicons anteriores en este botón */
}

.btn-send-comment:hover .dashicons {
    transform: translate(3px, -3px);
}

.cae-timeline li.timeline-user .timeline-status {
    color: var(--accent);
}

.cae-timeline li.timeline-user .timeline-note {
    background: #fdfae6;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    color: #854d0e;
}

.cae-timeline li.timeline-admin .timeline-note {
    background: #f1f5f9;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

/* Módulo de Reservas - Premium Design */
.cae-reservas-wrapper {
    padding: 20px 0;
}

.cae-reservas-intro {
    margin-bottom: 30px;
}

.cae-reservas-intro h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.8rem;
}

.cae-reservas-intro p {
    color: var(--text-secondary);
    margin: 5px 0 0;
}

.cae-zonas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cae-zona-card-v2 {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.cae-zona-card-v2:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.cae-zona-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.cae-zona-img.placeholder {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cae-zona-img.placeholder .dashicons {
    font-size: 50px;
    width: 60px;
    height: 60px;
    color: #cbd5e1;
}

.cae-zona-body {
    padding: 25px;
}

.cae-zona-body h4 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    color: var(--primary);
}

.cae-zona-meta {
    margin-bottom: 20px;
}

.cae-price {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.cae-price strong {
    color: var(--primary);
    font-size: 1.2rem;
}

.cae-price .free-badge {
    background: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.cae-btn-reserve {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.cae-btn-reserve:hover {
    background: var(--primary-hover);
}

/* Modal Premium */
.cae-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(14, 57, 80, 0.7);
    /* Azul transparente */
    backdrop-filter: blur(4px);
}

.cae-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    width: 90%;
    max-width: 550px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cae-modal-header {
    background: var(--primary);
    padding: 30px;
    color: #ffffff;
    position: relative;
}

.cae-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.cae-modal-header p {
    margin: 5px 0 0;
    opacity: 0.8;
}

.cae-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cae-modal-close:hover {
    opacity: 1;
}

/* Formulario en Modal */
.cae-modal .cae-premium-form {
    padding: 30px;
}

.cae-time-range {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.cae-time-range input {
    flex: 1;
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 6px;
    font-family: inherit;
}

.cae-range-sep {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.btn-full {
    width: 100%;
    margin-top: 20px;
    padding: 15px !important;
    font-size: 1.1rem !important;
}

/* FullCalendar Customization */
.cae-fullcalendar {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.fc-toolbar-title {
    font-family: 'Outfit', sans-serif !important;
    color: var(--primary);
}

.fc-button-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 8px !important;
}

.fc-button-primary:hover {
    background-color: var(--primary-hover) !important;
}

.fc-event {
    cursor: pointer;
    border: none !important;
    padding: 2px 5px !important;
    border-radius: 4px !important;
}

/* Módulo de Reservas - Mejoras */
.cae-zona-reglamento {
    transition: transform 0.3s ease;
}

.cae-zona-reglamento:hover {
    transform: translateY(-2px);
}

.cae-reglamento-content ul {
    margin-left: 20px;
    list-style-type: disc;
    margin-bottom: 15px;
}

.cae-reglamento-content p {
    margin-bottom: 10px;
}

/* Marcado de días pasados en el calendario */
.fc-day-past {
    background-color: rgba(231, 76, 60, 0.03) !important;
    cursor: not-allowed;
}

.fc-day-past .fc-daygrid-day-number {
    color: #e74c3c;
    opacity: 0.6;
}

.fc-timegrid-slot-past {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Ajustes generales de calendario */
.fc .fc-toolbar-title {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    font-weight: 700;
}

/* Modal de Avisos - Estilos Específicos */
#cae-notice-modal .cae-modal-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-bottom: none;
}

#cae-notice-modal .button-primary {
    background: #f59e0b;
    border-color: #d97706;
}

#cae-notice-modal .button-primary:hover {
    background: #d97706;
}

/* Distintivos de Días Hábiles */
.cae-zona-horarios-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.cae-dia-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.cae-dia-badge.active {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

/* --- SECCIÓN MIS RESERVAS --- */
.cae-my-reservas-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.cae-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cae-section-header h4 {
    margin: 0;
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cae-section-header h4 .dashicons {
    color: var(--accent);
}

.cae-toggle-history {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.cae-toggle-history:hover {
    color: var(--primary);
}

.cae-my-reservas-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.cae-reserva-item-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.cae-reserva-item-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cae-reserva-zona {
    display: block;
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 4px;
}

.cae-reserva-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cae-reserva-date .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #94a3b8;
}

/* Status Badges */
.cae-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pendiente .cae-status-badge {
    background: #fef3c7;
    color: #92400e;
}

.status-confirmada .cae-status-badge {
    background: #dcfce7;
    color: #166534;
}

.status-completada .cae-status-badge {
    background: #f1f5f9;
    color: #475569;
}

.status-cancelada .cae-status-badge {
    background: #fee2e2;
    color: #991b1b;
}

.cae-reservas-divider {
    text-align: center;
    position: relative;
    margin: 40px 0 30px;
}

.cae-reservas-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border);
    z-index: 1;
}

.cae-reservas-divider span {
    position: relative;
    z-index: 2;
    background: var(--bg-app);
    padding: 0 20px;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cae-no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
    background: #f1f5f9;
    border-radius: 10px;
}

/* Footer Styling - Fixed Bottom & Unified with Top Bar */
.cae-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 280px;
    /* Alineado con sidebar */
    height: 70px;
    background: var(--bg-white);
    padding: 0 2.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    z-index: 997;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .cae-footer {
    left: 80px;
}

.cae-footer .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0;
    max-width: none;
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.social-link:hover {
    color: var(--primary);
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.whatsapp-link:hover {
    background: #25D366 !important;
    color: #fff !important;
    border-color: #128C7E !important;
}

.social-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: normal;
}

@media (max-width: 768px) {
    .cae-footer {
        left: 0 !important;
        padding: 0 1.5rem;
    }

    .footer-copy {
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    .cae-footer {
        flex-direction: row;
        /* Mantener horizontal en footer fijo */
        padding: 0 1rem;
    }
}