/* Header Menu Styles */
.header-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #333;
}

.nav-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-1px);
}

/* Admin Panel Styles */
.admin-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* When header is visible */
body:not(.admin-logged-in) .admin-container {
    padding-top: 70px; /* Account for fixed header */
}

/* When admin is logged in, header remains visible */
body.admin-logged-in .admin-container {
    padding-top: 70px; /* Account for fixed header */
}

/* Login Section */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px); /* Subtract header height */
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 0 auto;
    box-sizing: border-box;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

/* Admin Panel */
.admin-panel {
    min-height: 100vh;
    background: #f8f9fa;
}

/* Navigation Tabs */
.admin-nav {
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-tabs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 0;
}

.nav-tab {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab:hover {
    color: #333;
    background: #f8f9fa;
}

.nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9fa;
}

.nav-tab i {
    font-size: 1rem;
}

/* Admin Sections */
.admin-section {
    display: block;
}

.admin-section.hidden {
    display: none;
}

.admin-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section .logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.header-text h1 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
}

.header-text p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Filters Section */
.filters-section {
    margin-bottom: 30px;
}

.filter-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

.filter-card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group .form-label {
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

/* Reuniones por fecha */
.reuniones-fecha {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.reunion-item {
    padding: 10px;
    margin-bottom: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reunion-item:hover {
    background: #e3f2fd;
    border-color: #2196f3;
}

.reunion-item.selected {
    background: #2196f3;
    color: white;
    border-color: #1976d2;
}

.reunion-item h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.reunion-item p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Reuniones Management */
.reuniones-management {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.management-header {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.management-header h2 {
    color: #333;
    margin: 0;
    font-size: 1.3rem;
}

.reuniones-list {
    padding: 0;
}

.list-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.list-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.1rem;
}

.list-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Reuniones Table */
.reuniones-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.reuniones-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.reuniones-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.reuniones-table tbody tr:hover {
    background: #f8f9fa;
}

.estado-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.estado-badge.activa {
    background: #e8f5e8;
    color: #2e7d32;
}

.estado-badge.finalizada {
    background: #ffebee;
    color: #c62828;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.btn-edit {
    background: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-toggle {
    background: #17a2b8;
    color: white;
}

.btn-toggle:hover {
    background: #138496;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.results-header {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h2 {
    color: #333;
    margin: 0;
    font-size: 1.3rem;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.total-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.asistentes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.asistentes-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.asistentes-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.asistentes-table tbody tr:hover {
    background: #f8f9fa;
}

.whatsapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.whatsapp-badge.si {
    background: #e8f5e8;
    color: #2e7d32;
}

.whatsapp-badge.no {
    background: #ffebee;
    color: #c62828;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.loading-content i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.loading-content p {
    margin: 0;
    color: #333;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    margin: 0 auto;
    position: relative;
}

.modal-large {
    max-width: 700px;
    margin: 0 auto;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.modal-header.error {
    background: #ffebee;
    color: #c62828;
}

.modal-header.warning {
    background: #fff3cd;
    color: #856404;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    flex: 1;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Reunion Form */
.reunion-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group .form-label {
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group .form-input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group .form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .nav-brand span {
        display: none;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .admin-container {
        padding-top: 60px;
    }
    
    body:not(.admin-logged-in) .admin-container {
        padding-top: 60px;
    }
    
    body.admin-logged-in .admin-container {
        padding-top: 60px;
    }
    
    .login-section {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: calc(100vh - 60px);
        padding: 20px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .filter-options {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .results-actions {
        justify-content: center;
    }
    
    .asistentes-table {
        font-size: 0.8rem;
    }
    
    .asistentes-table th,
    .asistentes-table td {
        padding: 8px 6px;
    }
}

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .management-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .list-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .reuniones-table {
        font-size: 0.8rem;
    }
    
    .reuniones-table th,
    .reuniones-table td {
        padding: 8px 6px;
    }

@media (max-width: 480px) {
    .admin-main {
        padding: 20px 15px;
    }
    
    .filter-card,
    .results-section,
    .reuniones-management {
        margin: 0 -5px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    .nav-tab {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .btn-small {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}