/* ===============================================
   PANEL DE ADMINISTRACIÓN - Dashboard moderno
   =============================================== */

:root {
    --admin-primary: #6366f1;
    --admin-success: #10b981;
    --admin-danger: #ef4444;
    --admin-warning: #f59e0b;
    --admin-bg: #f1f5f9;
    --admin-surface: #ffffff;
    --admin-text: #1e293b;
    --admin-text-light: #64748b;
}

/* Contenedor principal del dashboard */
.reservas-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--admin-primary), #4f46e5);
    padding: 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, var(--admin-success), #059669);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.stat-card:nth-child(2):hover {
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, var(--admin-danger), #dc2626);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.stat-card:nth-child(3):hover {
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.4);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabla de reservas */
.reservas-table-container {
    background: var(--admin-surface);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.reservas-table-container h2 {
    font-size: 1.8rem;
    color: var(--admin-text);
    margin-bottom: 25px;
    font-weight: 700;
}

.wp-list-table {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wp-list-table thead tr {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.wp-list-table th {
    font-weight: 700;
    color: var(--admin-text);
    padding: 18px 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--admin-primary);
}

.wp-list-table td {
    padding: 16px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.wp-list-table tbody tr {
    transition: all 0.2s ease;
}

.wp-list-table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.01);
}

.espacio-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.espacio-badge.escuela {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.espacio-badge.coworking {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.wp-list-table .reserva-estado {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.wp-list-table .reserva-estado.activa {
    background: var(--admin-success);
    color: white;
}

.wp-list-table .reserva-estado.cancelada {
    background: #94a3b8;
    color: white;
}

/* Botones de acción */
.wp-list-table a.button,
.button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.wp-list-table a.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===============================================
   PÁGINA DE CONFIGURACIÓN
   =============================================== */

.reservas-config-page {
    background: var(--admin-bg);
    padding: 20px 40px 40px 20px;
    margin-left: -20px;
    min-height: 100vh;
}

.reservas-config-page h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--admin-text);
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--admin-primary), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reservas-config-container {
    max-width: 1000px;
    background: var(--admin-surface);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.config-section {
    margin-bottom: 40px;
}

.config-section h2 {
    font-size: 1.8rem;
    color: var(--admin-text);
    margin-bottom: 10px;
    font-weight: 700;
}

.config-section .description {
    color: var(--admin-text-light);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.config-option {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.config-option:hover {
    border-color: var(--admin-primary);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.1);
    transform: translateX(5px);
}

.option-info {
    flex: 1;
}

.option-info strong {
    display: block;
    font-size: 1.3rem;
    color: var(--admin-text);
    margin-bottom: 5px;
}

.option-info p {
    color: var(--admin-text-light);
    font-size: 1rem;
    margin: 0;
}

/* Switch toggle moderno */
.switch-container {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: all 0.4s;
    border-radius: 34px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: all 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-container input:checked + .switch-slider {
    background: linear-gradient(135deg, var(--admin-primary), #4f46e5);
}

.switch-container input:checked + .switch-slider:before {
    transform: translateX(26px);
}

.switch-container input:focus + .switch-slider {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Caja de información */
.config-info-box {
    background: linear-gradient(135deg, #e0e7ff, #dbeafe);
    border: 2px solid var(--admin-primary);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

.config-info-box h3 {
    font-size: 1.4rem;
    color: var(--admin-text);
    margin-bottom: 15px;
    font-weight: 700;
}

.config-info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.config-info-box li {
    padding: 10px 0;
    color: var(--admin-text);
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.config-info-box li:last-child {
    border-bottom: none;
}

.config-info-box strong {
    color: var(--admin-primary);
    font-weight: 700;
}

/* Botón de guardar */
.button-primary.button-large {
    padding: 16px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--admin-primary), #4f46e5);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.button-primary.button-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.button-primary.button-large:active {
    transform: translateY(-1px);
}

/* Mensajes de notificación */
.notice {
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    border-left: 4px solid;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notice-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-left-color: var(--admin-success);
    color: #065f46;
}

/* ===============================================
   RESPONSIVE ADMIN
   =============================================== */

@media (max-width: 782px) {
    .reservas-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .reservas-config-page {
        padding: 20px;
        margin-left: 0;
    }
    
    .reservas-config-container {
        padding: 25px;
    }
    
    .config-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .wp-list-table {
        font-size: 14px;
    }
    
    .wp-list-table th,
    .wp-list-table td {
        padding: 10px 8px;
    }
}
/* ============================================
   DASHBOARD ADMIN - SHORTCODE [dashboard_admin]
   ============================================ */

.admin-dashboard-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    background: var(--admin-bg);
}

.admin-dashboard-wrapper .dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.admin-dashboard-wrapper .dashboard-header h2 {
    font-size: 2rem;
    color: var(--admin-text);
    margin: 0 0 10px 0;
    font-weight: 800;
}

.admin-dashboard-wrapper .dashboard-header p {
    color: var(--admin-text-light);
    font-size: 1.1rem;
}

/* GRID DE ESTADÍSTICAS DEL DASHBOARD */
.admin-dashboard-wrapper .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-dashboard-wrapper .stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 25px;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-dashboard-wrapper .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.admin-dashboard-wrapper .stat-card.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.admin-dashboard-wrapper .stat-card.upcoming {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.admin-dashboard-wrapper .stat-card.today {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.admin-dashboard-wrapper .stat-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.admin-dashboard-wrapper .stat-content {
    flex: 1;
}

.admin-dashboard-wrapper .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.admin-dashboard-wrapper .stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* SECCIÓN DE PRÓXIMAS RESERVAS */
.admin-dashboard-wrapper .dashboard-section {
    background: var(--admin-surface);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-dashboard-wrapper .dashboard-section h3 {
    font-size: 1.5rem;
    color: var(--admin-text);
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
}

.admin-dashboard-wrapper .reservas-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-dashboard-wrapper .reserva-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    transition: all 0.3s ease;
}

.admin-dashboard-wrapper .reserva-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.admin-dashboard-wrapper .reserva-icon {
    font-size: 2.5rem;
    min-width: 60px;
    text-align: center;
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-dashboard-wrapper .reserva-details {
    flex: 1;
}

.admin-dashboard-wrapper .reserva-title {
    font-size: 1.1rem;
    color: var(--admin-text);
    margin-bottom: 5px;
    font-weight: 700;
}

.admin-dashboard-wrapper .reserva-info-text {
    color: var(--admin-text-light);
    font-size: 0.95rem;
}

.admin-dashboard-wrapper .reserva-contact {
    display: flex;
    gap: 10px;
}

.admin-dashboard-wrapper .btn-contact {
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-dashboard-wrapper .btn-contact:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ACCIONES RÁPIDAS */
.admin-dashboard-wrapper .quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.admin-dashboard-wrapper .btn-action {
    display: block;
    padding: 16px 24px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: var(--admin-text);
    text-decoration: none;
    text-align: center;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.admin-dashboard-wrapper .btn-action:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* RESPONSIVE DASHBOARD ADMIN */
@media (max-width: 768px) {
    .admin-dashboard-wrapper .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-dashboard-wrapper .stat-card {
        padding: 20px !important;
    }
    
    .admin-dashboard-wrapper .stat-value {
        font-size: 2rem !important;
    }
    
    .admin-dashboard-wrapper .reserva-item {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-dashboard-wrapper .reserva-contact {
        width: 100%;
        justify-content: center;
    }
    
    .admin-dashboard-wrapper .quick-actions {
        grid-template-columns: 1fr;
    }
}
/* ============================================
   TABLA COMPLETA DE RESERVAS EN DASHBOARD ADMIN
   ============================================ */

.tabla-reservas-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.reservas-table-full {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reservas-table-full thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.reservas-table-full th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reservas-table-full td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.reserva-row:hover {
    background: #f8fafc;
}

.reserva-row.cancelada {
    opacity: 0.6;
}

.td-id {
    font-weight: 700;
    color: #6366f1;
}

.badge-espacio {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-espacio.escuela {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-espacio.coworking {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.badge-espacio.nave {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #3730a3;
}

.badge-estado {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-estado.activa {
    background: #d1fae5;
    color: #065f46;
}

.badge-estado.cancelada {
    background: #fee2e2;
    color: #991b1b;
}

.btn-eliminar-admin {
    display: inline-block;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-eliminar-admin:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media (max-width: 1024px) {
    .reservas-table-full {
        font-size: 0.85rem;
    }
    
    .reservas-table-full th,
    .reservas-table-full td {
        padding: 10px 8px;
    }
}
/* ================================================================
   RESPONSIVE PARA TARJETAS DEL DASHBOARD - SOLO LO NECESARIO
   ================================================================ */

@media (max-width: 768px) {
    /* Tarjetas más compactas en móvil */
    .card-pro {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .card-pro h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .card-pro h3 {
        font-size: 18px;
    }
    
    /* Alertas más compactas */
    .card-pro > div[style*="border-left"] {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .card-pro > div[style*="border-left"] > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px;
    }
    
    /* Botones apilados verticalmente en móvil */
    .card-pro button {
        width: 100%;
        margin-bottom: 8px;
        font-size: 13px;
    }
    
    .card-pro div[style*="display: flex; gap: 10px"] {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    /* Formularios ocupan todo el ancho */
    .card-pro .form-group {
        margin-bottom: 15px;
    }
    
    .card-pro input[type="text"],
    .card-pro input[type="number"],
    .card-pro select {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .card-pro .form-group button {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .card-pro {
        padding: 12px;
    }
    
    .card-pro h2 {
        font-size: 18px;
    }
    
    .card-pro h3 {
        font-size: 16px;
    }
}

/* ================================================================
   RESPONSIVE ESPECÍFICO - POOL Y CÓDIGOS NUKI
   ================================================================ */

@media (max-width: 768px) {
    /* =====================================
       TARJETAS DE ESTADÍSTICAS DEL POOL
       ===================================== */
    
    /* Grid de 3 columnas pasa a 1 columna en móvil */
    .card-pro > div[style*="display: grid"][style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Tarjetas individuales ocupan todo el ancho */
    .card-pro > div[style*="display: grid"] > div[style*="background"] {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* =====================================
       LISTA DE CÓDIGOS NUKI
       ===================================== */
    
    /* Tarjetas de usuarios con códigos */
    .card-pro > div[style*="border: 1px solid"][style*="border-radius"] {
        padding: 15px !important;
        margin-bottom: 12px !important;
    }
    
    /* Contenedor de información de usuario */
    .card-pro > div[style*="border"] > div {
        flex-wrap: wrap !important;
    }
    
    /* Código Nuki más visible */
    .card-pro span[style*="background: #6366f1"],
    .card-pro span[style*="background: #3b82f6"] {
        font-size: 14px !important;
        padding: 6px 12px !important;
    }
}

@media (max-width: 480px) {
    /* En móviles muy pequeños */
    .card-pro > div[style*="display: grid"][style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Tarjetas aún más compactas */
    .card-pro > div[style*="border"] {
        padding: 12px !important;
    }
}

/* ================================================================
   CÓDIGOS ACTIVOS - BOTONES DEBAJO EN MÓVIL
   ================================================================ */

@media (max-width: 768px) {
    /* FORZAR todas las tarjetas con border a columna */
    .card-pro > div[style*="border"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        min-width: unset !important;
        width: 100% !important;
        padding: 15px !important;
        margin-bottom: 12px !important;
    }
    
    /* FORZAR contenedor interior también a columna */
    .card-pro > div[style*="border"] > div[style*="flex"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    /* Botones en fila horizontal al final */
    .card-pro > div[style*="border"] > div:last-child {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        margin-top: 10px !important;
        width: 100% !important;
    }
    
    /* Botones iguales */
    .card-pro button,
    .card-pro > div[style*="border"] button {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: none !important;
        font-size: 13px !important;
        padding: 10px 8px !important;
        white-space: nowrap !important;
    }
    
    /* Spans de código más compactos */
    .card-pro span[style*="background"],
    .card-pro span[style*="padding"] {
        font-size: 13px !important;
        padding: 6px 10px !important;
        display: inline-block !important;
        margin: 5px 0 !important;
    }
}
