/* Admin Panel Styles */

.admin-container {
    margin-bottom: 40px;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Login Section */
.login-section {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px 30px !important;
}

.login-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.login-section small {
    display: block;
    color: #999;
    margin-top: 5px;
    font-size: 12px;
}

.error-message {
    background: #fed7d7;
    color: #742a2a;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #fc8181;
}

/* Admin Navigation */
.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 30px;
}

.nav-btn {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #666;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.nav-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.admin-section.active {
    display: block;
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.admin-section h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #555;
    font-size: 18px;
}

/* Admin Toolbar */
.admin-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.refresh-indicator {
    font-size: 12px;
    color: #666;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
}

.admin-toolbar select {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

/* Registrations List */
.registrations-list {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.registration-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    margin: 10px;
    border-radius: 8px;
}

.registration-item:last-child {
    border-bottom: none;
}

.registration-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ddd;
    overflow: hidden;
    flex-shrink: 0;
}

.registration-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.registration-info {
    text-align: left;
}

.registration-info strong {
    display: block;
    color: #333;
    margin-bottom: 4px;
}

.registration-info small {
    display: block;
    color: #999;
    font-size: 12px;
    margin: 2px 0;
}

.registration-actions {
    display: flex;
    gap: 5px;
}

.registration-actions button {
    padding: 6px 10px;
    font-size: 12px;
}

/* Event Form */
.event-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.event-form h3 {
    margin-top: 0;
    color: #333;
}

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

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input {
    width: auto;
    margin: 0;
}

/* Events List */
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.event-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.event-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.event-card h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.event-card p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.event-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.event-card-actions button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-card h3 {
    margin-top: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin: 10px 0 0 0;
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.chart-placeholder {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 2px dashed #e0e0e0;
}

.chart-placeholder h4 {
    margin-top: 0;
    color: #333;
}

.chart-placeholder p {
    color: #999;
    margin: 10px 0 0 0;
}

/* Settings Form */
.settings-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.settings-form h3 {
    margin-top: 0;
    color: #333;
}

.settings-form small {
    color: #999;
    display: block;
    margin: 10px 0;
}

/* Danger Zone */
.danger-zone {
    background: #fed7d7;
    border: 2px solid #fc8181;
    border-radius: 8px;
    padding: 20px;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

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

.danger-zone small {
    color: #742a2a;
}

/* Modal Dialog */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

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

/* Responsive */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-nav {
        padding: 0 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .registration-item {
        grid-template-columns: auto 1fr;
    }

    .registration-actions {
        grid-column: 1 / -1;
        margin-top: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
