/* Admin Dashboard Styles */

.admin-key-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.admin-key-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 360px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.admin-key-box h2 { margin-top: 0; }
.admin-key-box input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    margin: 8px 0;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    box-sizing: border-box;
}
.admin-key-box .btn { margin-right: 8px; }
.admin-signin-subtitle { color: var(--text-secondary, #666); margin-bottom: 1rem; font-size: 14px; }
.admin-signin-divider { text-align: center; margin: 1rem 0; color: var(--text-light, #999); font-size: 13px; }
#google-signin-container { display: flex; justify-content: center; margin-bottom: 0.5rem; }
.admin-google-disabled { font-size: 13px; color: var(--text-light, #999); margin: 0.5rem 0; text-align: center; }
.admin-key-fallback { margin-top: 0.5rem; }

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.admin-header {
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card-filter {
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.stat-card-filter:hover,
.stat-card-filter:focus {
    outline: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background: white;
}

.memberships-table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.memberships-table {
    width: 100%;
    border-collapse: collapse;
}

.memberships-table thead {
    background: var(--background-alt);
}

.memberships-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.memberships-table td {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-primary);
}

.memberships-table tbody tr:hover {
    background: var(--background-alt);
}

.membership-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.status-badge-table {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge-table.active {
    background: #d4edda;
    color: #155724;
}

.status-badge-table.expired {
    background: #f8d7da;
    color: #721c24;
}

.status-badge-table.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge-table.pending_payment {
    background: #fff3cd;
    color: #856404;
}

.status-badge-table.pending_approval {
    background: #cce5ff;
    color: #004085;
}

.status-badge-table.failed {
    background: #f8d7da;
    color: #721c24;
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        padding: 16px;
    }

    .memberships-table {
        font-size: 12px;
    }

    .memberships-table th,
    .memberships-table td {
        padding: 8px;
    }

    .admin-filters {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }
}

/* Events Carousel Manager Styles */
.admin-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-inline-hint {
    margin: 0.5rem 0 1rem;
    font-size: 0.875rem;
    color: #555;
    min-height: 1.25em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

.section-header h2 {
    margin: 0;
    font-size: 24px;
    color: #2D5016;
}

.events-manager {
    margin-top: 20px;
}

.events-list {
    margin-top: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #2D5016;
}

.admin-table tr:hover {
    background: #f9f9f9;
}

.admin-table img {
    max-width: 100px;
    height: auto;
    border-radius: 4px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 20px 24px;
    background: #2D5016;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    opacity: 0.7;
}

#event-form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2D5016;
    box-shadow: 0 0 0 2px rgba(45, 80, 22, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-edit {
    background: #2D5016;
    color: white;
}

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

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

/* Image Upload Styles */
.image-upload-area {
    margin-bottom: 10px;
}

.drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.drop-zone:hover {
    border-color: #2D5016;
    background: #f0f0f0;
}

.drop-zone.drag-over {
    border-color: #2D5016;
    background: #e8f5e9;
    border-style: solid;
}

.drop-text {
    font-size: 16px;
    color: #666;
    margin: 0 0 10px 0;
}

.drop-hint {
    font-size: 12px;
    color: #999;
    margin: 10px 0 0 0;
}

.image-preview {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #f9f9f9;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.btn-remove-image {
    display: block;
    margin: 10px auto 0;
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-remove-image:hover {
    background: #c82333;
}

/* Clubs Management Styles */
.region-group {
    margin-bottom: 32px;
}

.region-title {
    font-size: 20px;
    font-weight: 600;
    color: #2D5016;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-large {
    max-width: 900px;
}
