/* Admin and Mobile Attendance Stylesheet */
*, *::before, *::after {
    box-sizing: border-box;
}

body.admin-body {
    background: #f4f6f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #212529;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.admin-header-bar {
    background: #111827;
    color: #ffffff;
    padding: 12px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-header-inner {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-logo-area img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.admin-logo-area span.brand-title {
    font-size: 1.15em;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-nav a {
    color: #d1d5db;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-nav a:hover, .admin-nav a.active {
    background: #374151;
    color: #ffffff;
}

.admin-nav a.logout-btn {
    background: #dc3545;
    color: #ffffff;
}

.admin-nav a.logout-btn:hover {
    background: #b02a37;
}

.admin-container {
    margin: 24px auto;
    padding: 0 16px;
}

/* Page Header */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.admin-page-header h1 {
    font-size: 1.6em;
    margin: 0;
    color: #111827;
    font-weight: 700;
}

.admin-page-header .header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-label {
    font-size: 0.85em;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.7em;
    font-weight: 700;
    color: #111827;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95em;
}

.admin-table th {
    background: #f9fafb;
    color: #4b5563;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background-color: #f9fafb;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Form Cards */
.admin-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 24px;
    margin-bottom: 24px;
}

.admin-card h2, .admin-card h3 {
    margin-top: 0;
    color: #111827;
    font-size: 1.3em;
    margin-bottom: 16px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9em;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.82em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-paid { background: #d1fae5; color: #065f46; }
.badge-unpaid { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-refunded { background: #e5e7eb; color: #374151; }

.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }
.badge-waitlisted { background: #fef3c7; color: #92400e; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 38px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.82em;
    min-height: 30px;
}

.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }

.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }

.btn-secondary { background: #6b7280; color: #fff; }
.btn-secondary:hover { background: #4b5563; }

.btn-dark { background: #111827; color: #fff; }
.btn-dark:hover { background: #374151; }

.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}
.btn-outline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Mobile Attendance Sheet */
.attendance-summary-bar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.attendance-stat-box {
    text-align: center;
}

.attendance-stat-number {
    font-size: 1.5em;
    font-weight: 700;
    color: #111827;
}

.attendance-stat-label {
    font-size: 0.8em;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
}

.attendance-action-banner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-mark-all {
    background: #10b981;
    color: #ffffff;
    font-size: 1.05em;
    padding: 14px 20px;
    flex: 1;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-mark-all:hover {
    background: #059669;
}

.btn-save-attendance {
    background: #2563eb;
    color: #ffffff;
    font-size: 1.05em;
    padding: 14px 24px;
    flex: 1;
    border-radius: 8px;
    font-weight: 700;
}

.attendance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.attendance-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.15s;
    cursor: pointer;
    user-select: none;
}

.attendance-card.attended {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.attendance-card.noshow {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.attendance-card.cancelled {
    border-color: #d1d5db;
    background-color: #f9fafb;
    opacity: 0.6;
}

.attendance-person-info {
    flex: 1;
}

.attendance-name {
    font-size: 1.15em;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.attendance-meta {
    font-size: 0.85em;
    color: #6b7280;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Custom large checkbox for quick tapping on mobile */
.attendance-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attendance-checkbox {
    width: 32px;
    height: 32px;
    accent-color: #10b981;
    cursor: pointer;
}

/* Capacity Warning Modal / Banner */
.capacity-warning-banner {
    background-color: #fff3cd;
    border: 1px solid #ffe69c;
    color: #664d03;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.override-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-weight: 700;
    color: #842029;
    cursor: pointer;
}

.override-checkbox-label input {
    width: 20px;
    height: 20px;
    accent-color: #dc3545;
}

@media (max-width: 640px) {
    .admin-header-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-nav {
        justify-content: space-around;
        font-size: 0.85em;
    }
    .admin-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-page-header .header-actions {
        width: 100%;
    }
    .admin-page-header .header-actions .btn {
        flex: 1;
    }
    .attendance-action-banner {
        flex-direction: column;
    }
}

