@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #002d84;
    --primary-hover: #001e5c;
    --secondary-color: #bb1919;
    --secondary-hover: #8f1212;
    --bg-light: #f4f7f6;
    --sidebar-bg: #001338;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: #333;
    overflow-x: hidden;
}

/* Custom Colors & Utilities */
.text-primary-custom { color: var(--primary-color) !important; }
.text-secondary-custom { color: var(--secondary-color) !important; }
.bg-primary-custom { background-color: var(--primary-color) !important; }
.bg-secondary-custom { background-color: var(--secondary-color) !important; }

/* Buttons */
.btn-primary-custom { 
    background-color: var(--primary-color); 
    border: none; 
    color: white; 
    padding: 10px 24px; 
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease; 
    box-shadow: 0 4px 15px rgba(0, 45, 132, 0.2); 
}
.btn-primary-custom:hover, .btn-primary-custom:focus { 
    background-color: var(--primary-hover); 
    transform: translateY(-2px); 
    color: white; 
    box-shadow: 0 8px 20px rgba(0, 45, 132, 0.3); 
}

.btn-secondary-custom { 
    background-color: var(--secondary-color); 
    border: none; 
    color: white; 
    padding: 10px 24px; 
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease; 
    box-shadow: 0 4px 15px rgba(187, 25, 25, 0.2); 
}
.btn-secondary-custom:hover, .btn-secondary-custom:focus { 
    background-color: var(--secondary-hover); 
    transform: translateY(-2px); 
    color: white; 
    box-shadow: 0 8px 20px rgba(187, 25, 25, 0.3); 
}

/* Login Pages */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #000c24 100%);
    position: relative;
}
.login-page.admin-login {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #4a0606 100%);
}
.login-page.club-login {
    background: linear-gradient(135deg, #198754 0%, #0b3d2b 100%);
}

/* Decorative Circles for Login */
.login-page::before, .login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    z-index: 1;
}
.login-page::before {
    top: -100px;
    left: -100px;
}
.login-page::after {
    bottom: -100px;
    right: -100px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    backdrop-filter: blur(15px);
    z-index: 2;
    position: relative;
}

.login-header { 
    text-align: center; 
    margin-bottom: 2.5rem; 
}
.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.admin-login .login-header i { color: var(--secondary-color); }
.login-header h2 { 
    font-weight: 700; 
    color: var(--primary-color); 
    font-size: 1.8rem;
}
.admin-login .login-header h2 { color: var(--secondary-color); }
.club-login .login-header i { color: #198754; }
.club-login .login-header h2 { color: #198754; }
.login-header p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-top: 5px;
}

.form-control { 
    border-radius: 10px; 
    padding: 12px 16px; 
    border: 1px solid #dee2e6; 
    transition: all 0.3s; 
    font-size: 0.95rem;
}
.form-control:focus { 
    border-color: var(--primary-color); 
    box-shadow: 0 0 0 4px rgba(0, 45, 132, 0.1); 
}
.admin-login .form-control:focus { 
    border-color: var(--secondary-color); 
    box-shadow: 0 0 0 4px rgba(187, 25, 25, 0.1); 
}
.club-login .form-control:focus { 
    border-color: #198754; 
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.1); 
}
.form-floating > label { 
    padding: 12px 16px; 
    color: #6c757d;
}

/* Dashboard Wrapper */
.wrapper { display: flex; width: 100%; }

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    min-height: 100vh;
    color: white;
    transition: all 0.3s;
    box-shadow: 4px 0 20px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}
.admin-dashboard .sidebar { background: #3d0505; }

.sidebar-brand {
    padding: 24px 20px;
    background: var(--primary-color);
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-dashboard .sidebar-brand { background: var(--secondary-color); }

.sidebar-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.sidebar-brand a i { font-size: 1.5rem; }

.sidebar-menu { list-style: none; padding: 0; margin-top: 20px; }
.sidebar-menu li { padding: 4px 16px; }
.sidebar-menu a {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
}
.sidebar-menu a i { margin-right: 14px; font-size: 1.2rem; width: 20px; text-align: center; }
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(5px);
}
.admin-dashboard .sidebar-menu a:hover, .admin-dashboard .sidebar-menu a.active { 
    background: rgba(187, 25, 25, 0.4); 
}

/* Main Content */
.main-content {
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: 280px; /* offset for sidebar */
    transition: all 0.3s;
}

/* Topbar */
.topbar {
    background: white;
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    z-index: 10;
    position: sticky;
    top: 0;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}
.admin-dashboard .user-avatar { color: var(--secondary-color); }
.user-info h6 { margin: 0; font-weight: 600; font-size: 0.95rem; color: #333; }
.user-info span { font-size: 0.8rem; color: #6c757d; }

.content { padding: 30px; flex-grow: 1; }

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}
.admin-dashboard .page-title { color: var(--secondary-color); }

.page-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}
.admin-dashboard .page-title::after { background: var(--primary-color); }

/* Statistic Cards */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}
.stat-card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0,0,0,0.08); }
.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 20px;
    transition: all 0.3s ease;
}
.stat-card:hover .stat-icon { transform: scale(1.1) rotate(5deg); }
.stat-icon.primary { background: rgba(0, 45, 132, 0.1); color: var(--primary-color); }
.stat-icon.secondary { background: rgba(187, 25, 25, 0.1); color: var(--secondary-color); }
.stat-icon.success { background: rgba(25, 135, 84, 0.1); color: #198754; }
.stat-icon.warning { background: rgba(255, 193, 7, 0.1); color: #ffc107; }

.stat-info { flex-grow: 1; }
.stat-info h3 { margin: 0; font-size: 2rem; font-weight: 700; color: #2c3e50; line-height: 1; }
.stat-info p { margin: 8px 0 0; color: #6c757d; font-size: 0.95rem; font-weight: 500; }

/* Custom Cards for Forms/Tables */
.custom-card {
    background: white;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    margin-bottom: 24px;
    overflow: hidden;
}
.custom-card .card-header {
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    padding: 20px 24px;
    font-weight: 700;
    font-size: 1.15rem;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.custom-card .card-body { padding: 30px; }

/* Forms */
.form-label { font-weight: 500; color: #495057; font-size: 0.9rem; margin-bottom: 8px; }
.form-select { border-radius: 10px; padding: 12px 16px; border: 1px solid #dee2e6; font-size: 0.95rem; }
.form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(0, 45, 132, 0.1); }
.admin-dashboard .form-select:focus { border-color: var(--secondary-color); box-shadow: 0 0 0 4px rgba(187, 25, 25, 0.1); }

/* Table Styling */
.table-responsive { border-radius: 12px; }
.table-custom { margin-bottom: 0; }
.table-custom th { 
    border-bottom: 2px solid rgba(0,0,0,0.05); 
    color: #6c757d; 
    font-weight: 600; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 0.5px;
    padding: 16px;
    background: #fdfdfd;
}
.table-custom td { 
    padding: 16px; 
    vertical-align: middle; 
    border-bottom: 1px solid rgba(0,0,0,0.03);
    color: #495057;
    font-size: 0.95rem;
}
.table-custom tbody tr { transition: all 0.2s; }
.table-custom tbody tr:hover { background-color: rgba(0, 45, 132, 0.02); }
.admin-dashboard .table-custom tbody tr:hover { background-color: rgba(187, 25, 25, 0.02); }

/* Badges */
.badge { padding: 6px 12px; border-radius: 30px; font-weight: 500; font-size: 0.8rem; }
.bg-light-success { background: rgba(25, 135, 84, 0.15); color: #146c43; }
.bg-light-danger { background: rgba(220, 53, 69, 0.15); color: #b02a37; }
.bg-light-warning { background: rgba(255, 193, 7, 0.15); color: #997404; }
.bg-light-info { background: rgba(13, 202, 240, 0.15); color: #087990; }

/* Mobile toggler */
.sidebar-toggler { display: none; background: transparent; border: none; font-size: 1.5rem; color: #333; }

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-toggler { display: block; }
}

/* Club Dashboard & Lane Selection Grid */
.club-dashboard .sidebar { background: #0b3d2b; }
.club-dashboard .sidebar-brand { background: #198754; }
.club-dashboard .sidebar-menu a:hover, .club-dashboard .sidebar-menu a.active { background: rgba(25, 135, 84, 0.4); }

.lane-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 20px;
    gap: 15px;
}

.day-column {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    min-width: 280px;
    background: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.day-header {
    background: #f8f9fa;
    padding: 10px;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
}
.day-header .day-name { font-weight: 700; color: #333; margin-bottom: 2px; }
.day-header .time-slot { font-size: 0.85rem; color: #666; font-weight: 600; }

.lane-slots {
    display: flex;
    height: 250px;
}

.lane-slot-col {
    flex: 1;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}
.lane-slot-col:last-child { border-right: none; }

.lane-number {
    text-align: center;
    padding: 8px 0;
    background: #f1f3f5;
    font-weight: 700;
    border-top: 2px solid #e0e0e0;
    font-size: 0.95rem;
    color: #495057;
}

.slot {
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    color: transparent; /* Text hidden by default if empty */
}
.slot span {
    transform: rotate(270deg); /* Text rotated for vertical reading */
    white-space: nowrap;
}

.slot:hover { background: #f8f9fa; }

/* Booked (Red) */
.slot.booked {
    background-color: #ff0000;
    color: white;
    cursor: not-allowed;
}
.slot.booked:hover { background-color: #e60000; }

/* Available/Priced (Green) */
.slot.available {
    background-color: #8cc63f;
    color: #1a4000;
}
.slot.available:hover {
    background-color: #7ab82a;
    color: white;
}

/* User Selection (Darker Green/Border) */
.slot.selected {
    background-color: #198754;
    color: white;
    box-shadow: inset 0 0 0 3px #146c43;
}

/* Base custom buttons for club */
.btn-club-primary {
    background-color: #198754; 
    border: none; 
    color: white; 
    padding: 10px 24px; 
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.2); 
}
.btn-club-primary:hover { background-color: #146c43; color: white; transform: translateY(-2px); }

