/* ==========================================================================
   PUBLIC COACHING CAMP PORTAL — GLASSMORPHIC & CYBER SPORTS THEME
   ========================================================================== */

/* Design System Variables */
:root {
    --bg-dark-1: #070f20;
    --bg-dark-2: #020612;
    --card-bg: rgba(10, 22, 45, 0.55);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-muted: #b0c4de;
    
    /* Accents */
    --accent-blue: #0d6efd;
    --accent-teal: #00f2fe;
    --accent-green: #00e676;
    --accent-gold: #f5c518;
    --accent-red: #ff3d71;
    
    /* Glows */
    --teal-glow: 0 0 15px rgba(0, 242, 254, 0.3);
    --green-glow: 0 0 15px rgba(0, 230, 118, 0.3);
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
}

/* --- Base Body Reset --- */
body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark-1) 0%, var(--bg-dark-2) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 50px;
}

/* scanlines texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(0deg,
        transparent,
        transparent 4px,
        rgba(0, 0, 0, 0.05) 4px,
        rgba(0, 0, 0, 0.05) 5px);
    pointer-events: none;
    z-index: 999;
    opacity: 0.4;
}

/* Ambient glow spotlight */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(13, 110, 253, 0.12) 0%, transparent 65%),
        radial-gradient(ellipse 50% 50% at 80% 90%, rgba(0, 242, 254, 0.06) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* --- Premium Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark-2);
}
::-webkit-scrollbar-thumb {
    background: rgba(13, 110, 253, 0.25);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 110, 253, 0.45);
}

/* --- Card Containers --- */
.registration-card, .login-card, .success-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: var(--border-radius-lg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45) !important;
    color: var(--text-primary) !important;
    transition: var(--transition-smooth);
}

.card-header {
    background: linear-gradient(135deg, #091e3a 0%, #1e3a8a 50%, #2563eb 100%) !important;
    border-bottom: 1px solid var(--card-border) !important;
    color: var(--text-primary) !important;
    padding: 24px 30px !important;
}

/* Sub-sections */
.text-secondary {
    color: var(--accent-teal) !important;
}

h5.border-bottom {
    border-color: rgba(255, 255, 255, 0.08) !important;
    padding-bottom: 10px;
    margin-top: 25px;
    font-weight: 700;
}

/* --- Form Fields & Labels --- */
label, .form-label {
    color: #ffffff !important; /* Force high visibility white text for input labels */
    font-weight: 600 !important;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: inline-block;
}

.form-control, .form-select {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-primary) !important;
    border-radius: var(--border-radius-md) !important;
    padding: 12px 18px !important;
    transition: var(--transition-smooth) !important;
}

.form-select option {
    background-color: #070f20;
    color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: var(--accent-teal) !important;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25) !important;
    outline: none !important;
}

/* Form Helper and Info Texts */
.form-text {
    color: var(--text-muted) !important;
    font-size: 0.8rem;
}

.bg-light {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* --- Program Dynamic Rows --- */
.program-row {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--border-radius-md);
    padding: 15px;
    margin-bottom: 15px;
    transition: var(--transition-smooth);
}
.program-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(0, 242, 254, 0.15);
}

/* Add Program Button */
.btn-add {
    background: rgba(0, 242, 254, 0.05) !important;
    color: var(--accent-teal) !important;
    border: 1.5px dashed rgba(0, 242, 254, 0.3) !important;
    border-radius: var(--border-radius-md) !important;
    transition: var(--transition-smooth);
}
.btn-add:hover {
    background: rgba(0, 242, 254, 0.12) !important;
    border-color: var(--accent-teal) !important;
    box-shadow: var(--teal-glow);
    transform: translateY(-1px);
}

/* --- Submit and Action Buttons --- */
.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #00f2fe 100%) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: var(--border-radius-md) !important;
    padding: 14px 28px !important;
    transition: var(--transition-smooth) !important;
}
.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--teal-glow) !important;
    background: linear-gradient(135deg, #00f2fe 0%, #0d6efd 100%) !important;
}

.btn-light {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}
.btn-light:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* --- Terms Scrollbox & Container --- */
#terms-section {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--border-radius-md) !important;
    color: var(--text-primary) !important;
}

#terms-content {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
    border-radius: var(--border-radius-md) !important;
    padding: 20px !important;
}

#terms-content strong {
    color: #ffffff !important;
}

#terms-content ul li {
    color: var(--text-muted) !important;
}

#terms-content hr {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* --- Total Sections --- */
.total-section {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.08) 0%, rgba(0, 242, 254, 0.04) 100%) !important;
    border: 1px solid rgba(13, 110, 253, 0.2) !important;
    border-radius: var(--border-radius-md) !important;
    padding: 20px !important;
}

.total-section h4 {
    color: #ffffff !important;
}

.total-section h3 {
    color: var(--accent-green) !important;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

/* --- SweetAlert2 styling overrides for Dark Theme --- */
.swal2-popup {
    background: rgba(10, 22, 45, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border) !important;
    color: #ffffff !important;
}

.swal2-title, .swal2-html-container {
    color: #ffffff !important;
}

/* --- Required Fields Red Asterisk --- */
label:not(.form-check-label):has(~ [required])::after,
.form-label:not(.form-check-label):has(~ [required])::after,
label:not(.form-check-label):has(~ * [required])::after,
.form-label:not(.form-check-label):has(~ * [required])::after {
    content: " *";
    color: var(--accent-red, #ff3d71) !important;
    font-weight: bold;
}

/* --- High Visibility Registered Program Section Text Overrides --- */
.registration-card .text-muted,
.registration-card .text-secondary,
.registration-card small,
.registration-card span.small,
.registration-card h6.text-secondary,
.registration-card small.text-muted,
.registration-card span.text-muted,
.registration-card .form-text {
    color: #ffffff !important;
    opacity: 0.95 !important;
}

/* --- Premium Dark Glass SweetAlert2 Styles --- */
.glass-popup {
    background: rgba(7, 15, 32, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65) !important;
    border-radius: var(--border-radius-lg) !important;
    padding: 30px 24px !important;
}

.glass-popup .swal2-title {
    font-family: 'Outfit', sans-serif !important;
    color: #ffffff !important;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}

.glass-popup .swal2-html-container {
    color: #ffffff !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.glass-popup .swal2-actions {
    margin-top: 25px !important;
    width: 100% !important;
    justify-content: center !important;
}

.glass-popup .swal2-icon.swal2-info {
    border-color: var(--accent-teal, #00f2fe) !important;
    color: var(--accent-teal, #00f2fe) !important;
}

/* Scrollable Container for Attendance Logs */
.attendance-swal-container {
    max-height: 280px;
    overflow-y: auto;
    margin-top: 15px;
    padding-right: 5px;
}

/* Custom scrollbar for logs modal container */
.attendance-swal-container::-webkit-scrollbar {
    width: 6px;
}
.attendance-swal-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}
.attendance-swal-container::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.3);
    border-radius: 3px;
}
.attendance-swal-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 254, 0.5);
}

/* Glass table inside modal */
.attendance-swal-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent !important;
}

.attendance-swal-table th {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--accent-teal, #00f2fe) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.8px;
    padding: 10px 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12) !important;
    text-align: left;
}

.attendance-swal-table td {
    padding: 12px 15px;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    text-align: left;
    font-size: 0.9rem;
}

.attendance-swal-table tr:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Present/Absent badges */
.attendance-swal-table .badge-present {
    background: rgba(0, 230, 118, 0.15) !important;
    color: var(--accent-green, #00e676) !important;
    border: 1px solid rgba(0, 230, 118, 0.3) !important;
    font-weight: 600 !important;
    padding: 5px 12px !important;
    border-radius: 30px !important;
    font-size: 0.75rem !important;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.15);
}

.attendance-swal-table .badge-absent {
    background: rgba(255, 61, 113, 0.15) !important;
    color: var(--accent-red, #ff3d71) !important;
    border: 1px solid rgba(255, 61, 113, 0.3) !important;
    font-weight: 600 !important;
    padding: 5px 12px !important;
    border-radius: 30px !important;
    font-size: 0.75rem !important;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 8px rgba(255, 61, 113, 0.15);
}
