/* 
 * MG Eventos - Frontend Styles
 * Ruta: assets/frontend-style.css
 * Todos los estilos usan prefijo MG_Evento- para evitar conflictos
 */

/* ========================================
   LOGIN PAGE STYLES
======================================== */

.MG_Evento-login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.MG_Evento-login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 100%;
    max-width: 440px;
}

.MG_Evento-login-header {
    background: #1a1a1a;
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
    position: relative;
}

.MG_Evento-login-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.MG_Evento-login-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.MG_Evento-login-subtitle {
    margin: 0;
    opacity: 0.8;
    font-size: 14px;
    font-weight: 400;
    color: #ccc;
}

.MG_Evento-error-box {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px 20px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.MG_Evento-error-icon {
    background: #dc3545;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.MG_Evento-error-message {
    color: #721c24;
    font-size: 14px;
    line-height: 1.5;
}

.MG_Evento-login-form {
    padding: 40px 30px 30px;
}

.MG_Evento-form-group {
    margin-bottom: 24px;
}

.MG_Evento-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.MG_Evento-form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    font-size: 16px;
    transition: all 0.3s ease;
    color: #333;
    box-sizing: border-box;
}

.MG_Evento-form-input:focus {
    outline: none;
    border-color: #1a1a1a;
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.MG_Evento-submit-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    background: #1a1a1a;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.MG_Evento-submit-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.MG_Evento-login-footer {
    padding: 25px 30px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.MG_Evento-help-text {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* ========================================
   DASHBOARD STYLES
======================================== */

:root {
    --mg-primary: #2563eb;
    --mg-primary-dark: #1d4ed8;
    --mg-accent: #06b6d4;
    --mg-success: #10b981;
    --mg-text: #1e293b;
    --mg-text-light: #64748b;
    --mg-border: #e2e8f0;
    --mg-sidebar-bg: #1e293b;
    --mg-radius: 12px;
}

.MG_Evento-dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ========================================
   SIDEBAR
======================================== */

.MG_Evento-sidebar {
    background: var(--mg-sidebar-bg);
    color: #f1f5f9;
    width: 280px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.MG_Evento-sidebar.collapsed {
    width: 80px;
}

.MG_Evento-sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.MG_Evento-sidebar.collapsed .MG_Evento-sidebar-header {
    padding: 30px 15px;
}

.MG_Evento-event-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
}

.MG_Evento-sidebar.collapsed .MG_Evento-event-title {
    display: none;
}

.MG_Evento-event-date {
    color: #94a3b8;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
}

.MG_Evento-sidebar.collapsed .MG_Evento-event-date {
    display: none;
}

.MG_Evento-sidebar-photo {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.MG_Evento-sidebar-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.MG_Evento-sidebar.collapsed .MG_Evento-sidebar-photo {
    display: none;
}

.MG_Evento-sidebar-nav {
    padding: 20px 0;
    flex: 1;
}

.MG_Evento-nav-item {
    margin-bottom: 5px;
}

.MG_Evento-nav-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    white-space: nowrap;
}

.MG_Evento-sidebar.collapsed .MG_Evento-nav-link {
    padding: 15px;
    justify-content: center;
}

.MG_Evento-nav-link:hover,
.MG_Evento-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--mg-accent);
}

.MG_Evento-nav-icon {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.MG_Evento-sidebar.collapsed .MG_Evento-nav-icon {
    margin-right: 0;
}

.MG_Evento-nav-text {
    font-weight: 500;
}

.MG_Evento-sidebar.collapsed .MG_Evento-nav-text {
    display: none;
}

.MG_Evento-sidebar-toggle {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.MG_Evento-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.MG_Evento-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   MAIN CONTENT
======================================== */

.MG_Evento-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.MG_Evento-top-bar {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid var(--mg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.MG_Evento-page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--mg-text);
    margin: 0;
}

.MG_Evento-user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.MG_Evento-logout-btn {
    background: var(--mg-primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.MG_Evento-logout-btn i {
    font-size: 16px;
}

.MG_Evento-logout-btn:hover {
    background: var(--mg-primary-dark);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.MG_Evento-content-area {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* ========================================
   CARDS
======================================== */

.MG_Evento-card {
    background: white;
    border-radius: var(--mg-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid var(--mg-border);
}

.MG_Evento-card-header {
    background: white;
    padding: 25px 30px;
    border-bottom: 1px solid var(--mg-border);
}

.MG_Evento-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--mg-text);
    margin: 0;
}

.MG_Evento-card-body {
    padding: 30px;
}

/* ========================================
   INFO GRID
======================================== */

.MG_Evento-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.MG_Evento-info-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: var(--mg-radius);
    border-left: 4px solid var(--mg-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.MG_Evento-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--mg-primary), transparent);
}

.MG_Evento-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: white;
}

.MG_Evento-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.MG_Evento-info-icon {
    width: 40px;
    height: 40px;
    background: var(--mg-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    flex-shrink: 0;
}

.MG_Evento-info-icon i {
    font-size: 20px;
}

.MG_Evento-info-content {
    flex: 1;
}

.MG_Evento-info-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--mg-text-light);
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.MG_Evento-info-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--mg-text);
    margin: 0;
    line-height: 1.4;
}

.MG_Evento-info-description {
    color: var(--mg-text-light);
    font-size: 14px;
    margin-top: 10px;
    line-height: 1.5;
}

/* ========================================
   MENU GRID
======================================== */

.MG_Evento-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.MG_Evento-menu-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: var(--mg-radius);
    border-left: 4px solid var(--mg-accent);
    transition: all 0.3s ease;
}

.MG_Evento-menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: white;
}

.MG_Evento-menu-category {
    font-size: 16px;
    font-weight: 600;
    color: var(--mg-text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.MG_Evento-menu-category i {
    color: var(--mg-accent);
}

.MG_Evento-menu-description {
    color: var(--mg-text-light);
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   TABLES
======================================== */

.MG_Evento-tables-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.MG_Evento-sort-options {
    display: flex;
    gap: 10px;
    background: #f8fafc;
    padding: 8px;
    border-radius: 8px;
}

.MG_Evento-sort-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--mg-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--mg-text-light);
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.MG_Evento-sort-btn i {
    font-size: 14px;
}

.MG_Evento-sort-btn.active,
.MG_Evento-sort-btn:hover {
    background: var(--mg-primary);
    color: white;
    border-color: var(--mg-primary);
}

.MG_Evento-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.MG_Evento-table-card {
    background: #f8fafc;
    border-radius: var(--mg-radius);
    overflow: hidden;
    border: 1px solid var(--mg-border);
    transition: all 0.3s ease;
}

.MG_Evento-table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Mesa Principal destacada */
.MG_Evento-table-ppal {
    border: 3px solid #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.MG_Evento-table-ppal:hover {
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

.MG_Evento-table-header {
    background: var(--mg-primary);
    color: white;
    padding: 20px;
}

.MG_Evento-table-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.MG_Evento-table-guests {
    padding: 20px;
}

.MG_Evento-guest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    gap: 10px;
}

.MG_Evento-guest-item:last-child {
    border-bottom: none;
}

.MG_Evento-guest-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.MG_Evento-guest-name {
    font-weight: 500;
    color: var(--mg-text);
}

.MG_Evento-asistencia-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.MG_Evento-btn-asistir,
.MG_Evento-btn-cancelar {
    background: none;
    border: 2px solid;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.MG_Evento-btn-asistir {
    border-color: #10b981;
    color: #10b981;
}

.MG_Evento-btn-asistir:hover {
    background: #10b981;
    color: white;
    transform: scale(1.1);
}

.MG_Evento-btn-cancelar {
    border-color: #ef4444;
    color: #ef4444;
}

.MG_Evento-btn-cancelar:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.MG_Evento-confirmado,
.MG_Evento-no-asiste {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.MG_Evento-confirmado {
    background: #d1fae5;
    color: #065f46;
}

.MG_Evento-no-asiste {
    background: #fee2e2;
    color: #991b1b;
}

.MG_Evento-guest-count {
    background: var(--mg-accent);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    min-width: 70px;
    text-align: center;
}

.MG_Evento-guest-type {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.MG_Evento-type-adolescente {
    background: #fef3c7;
    color: #92400e;
}

.MG_Evento-type-niño {
    background: #dbeafe;
    color: #1e40af;
}

.MG_Evento-type-bebé {
    background: #fce7f3;
    color: #9f1239;
}

.MG_Evento-type-adulto {
    background: #f0f0f1;
    color: #646970;
}

/* Agrupación por letra */
.MG_Evento-letter-group {
    margin-bottom: 25px;
}

.MG_Evento-letter-header {
    background: var(--mg-primary);
    color: white;
    padding: 15px 20px;
    border-radius: var(--mg-radius) var(--mg-radius) 0 0;
}

.MG_Evento-letter-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.MG_Evento-letter-guests {
    background: #f8fafc;
    padding: 20px;
    border-radius: 0 0 var(--mg-radius) var(--mg-radius);
    border: 1px solid var(--mg-border);
    border-top: none;
}

/* ========================================
   PHOTOS GRID
======================================== */

.MG_Evento-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.MG_Evento-photo-item {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.MG_Evento-photo-item:hover {
    transform: scale(1.05);
    border-color: var(--mg-primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.MG_Evento-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.MG_Evento-photo-item:hover img {
    transform: scale(1.1);
}

/* ========================================
   MODAL
======================================== */

.MG_Evento-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.MG_Evento-modal.active {
    display: flex;
}

.MG_Evento-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: var(--mg-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.MG_Evento-modal-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.MG_Evento-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.MG_Evento-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* ========================================
   ERROR MESSAGE
======================================== */

.MG_Evento-error {
    background: white;
    border-radius: var(--mg-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 50px auto;
}

.MG_Evento-error p {
    font-size: 16px;
    color: var(--mg-text);
    margin-bottom: 20px;
}

.MG_Evento-error a {
    color: var(--mg-primary);
    text-decoration: none;
    font-weight: 600;
}

.MG_Evento-error a:hover {
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .MG_Evento-dashboard-container {
        flex-direction: column;
    }
    
    .MG_Evento-sidebar {
        width: 100%;
        height: auto;
    }
    
    .MG_Evento-sidebar.collapsed {
        width: 100%;
        height: 70px;
    }
    
    .MG_Evento-sidebar.collapsed .MG_Evento-sidebar-nav {
        display: none;
    }
    
    .MG_Evento-sidebar.collapsed .MG_Evento-sidebar-toggle {
        display: none;
    }
    
    .MG_Evento-nav-link {
        padding: 12px 20px;
    }
    
    .MG_Evento-content-area {
        padding: 20px;
    }
    
    .MG_Evento-top-bar {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .MG_Evento-user-actions {
        justify-content: center;
    }
    
    .MG_Evento-info-grid {
        grid-template-columns: 1fr;
    }
    
    .MG_Evento-menu-grid {
        grid-template-columns: 1fr;
    }
    
    .MG_Evento-tables-grid {
        grid-template-columns: 1fr;
    }
    
    .MG_Evento-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}