﻿/* ===========================================
   SOFT MONOCHROME UI - GLOBAL STYLES
   Based on Skillset Dashboard Design
   =========================================== */


:root {
    /* --- Color Palette --- */
    --bg-app: #F2F4F7;
    /* Light gray background from image */
    --bg-panel: #FFFFFF;
    /* White panels */
    --bg-dark: #111827;
    /* Deep black/charcoal for accents */
    --bg-input: #F3F4F6;
    /* Light gray for inputs */

    /* --- Text Colors --- */
    --text-main: #111827;
    /* Nearly black */
    --text-secondary: #6B7280;
    /* Medium gray */
    --text-light: #9CA3AF;
    /* Light gray */
    --text-white: #FFFFFF;
    /* White text */

    /* --- Accents --- */
    --accent-primary: #111827;
    /* Main Action Color (Black) */
    --accent-success: #10B981;
    /* Soft Green */
    --accent-warning: #F59E0B;
    /* Soft Orange */
    --accent-error: #EF4444;
    /* Soft Red */

    /* --- Spacing & Radius --- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    /* Main card radius */
    --radius-xl: 30px;
    /* Pill shapes */
    --radius-full: 9999px;

    /* --- Shadows --- */
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1);

    /* --- Brand Colors (UKS Blue) --- */
    --uks-blue-50: #f0f9ff;
    --uks-blue-100: #e0f2fe;
    --uks-blue-500: #0ea5e9;
    --uks-blue-600: #0284c7;
    --uks-blue-700: #0369a1;
}

/* --- Dark Mode Overrides --- */
body.theme-dark {
    --bg-app: #0f172a;
    --bg-panel: #1e293b;
    --bg-input: #334155;
    --bg-dark: #f8fafc;
    /* Invert for contrast */

    --text-main: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-light: #64748b;

    /* Adjust UKS Blue scales for dark mode compatibility */
    --uks-blue-50: #1e293b;
    /* Panel bg equivalent */
    --uks-blue-100: #334155;
    /* Input bg equivalent */
    --uks-blue-200: #475569;
    --uks-blue-500: #38bdf8;
    /* Brighter blue for dark mode */
    --uks-blue-600: #7dd3fc;
    --uks-blue-700: #baE6fd;

    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-blue: 0 4px 20px -2px rgba(56, 189, 248, 0.25);

    /* --- Detailed Component Overrides for Dark Mode --- */

    /* Buttons: Ensure visibility against dark bg */
    .btn-primary {
        background: var(--uks-blue-600);
        color: white;
    }

    .btn-primary:hover {
        background: var(--uks-blue-500);
        box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
    }

    .btn-secondary {
        background: var(--bg-panel);
        border-color: var(--text-secondary);
        color: var(--text-main);
    }

    .btn-secondary:hover {
        background: var(--bg-input);
        border-color: var(--text-light);
        color: white;
    }

    /* Inputs: Darker backgrounds, light text */
    .form-input,
    .form-select,
    .form-textarea,
    .search-input,
    .search-bar {
        background-color: var(--bg-input);
        color: var(--text-main);
        border-color: var(--bg-app);
    }

    .form-input:focus,
    .form-select:focus,
    .search-input:focus {
        background-color: var(--bg-panel);
        border-color: var(--uks-blue-500);
    }

    /* Cards: Ensure borders are subtle */
    .card,
    .dashboard-card,
    .records-card {
        border-color: var(--bg-input);
    }

    /* Tables: Invert hover and stripe contrasting */
    .table-modern tbody tr:hover {
        background-color: var(--bg-input);
    }

    /* Sidebar: Ensure distinct from main bg */
    .sidebar {
        background-color: #0f172a;
        /* Even darker than panel */
        border-right: 1px solid var(--bg-input);
    }

    /* Fix Sidebar Links in DM: Remove white glare */
    .nav-link.nav-link-active,
    .nav-link:hover {
        background-color: var(--uks-blue-600) !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    }

    .nav-link {
        color: var(--text-secondary);
    }

    /* Fix Highlight Card (was White) */
    .stat-card-highlight {
        background: linear-gradient(135deg, var(--uks-blue-800) 0%, var(--uks-blue-950) 100%) !important;
        color: white !important;
        border: 1px solid var(--uks-blue-700);
        box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5) !important;
    }

    .stat-card-highlight .dashboard-stat-label,
    .stat-card-highlight .dashboard-stat-value,
    .stat-card-highlight .dashboard-stat-trend {
        color: white !important;
    }

    /* Fix Quick Action Icons */
    .dashboard-action-icon {
        background-color: var(--bg-input) !important;
        color: var(--uks-blue-500) !important;
        border: 1px solid var(--bg-app);
    }

    .dashboard-action-card:hover .dashboard-action-icon {
        background-color: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }

    /* Fix Records Club Table (White Buttons) */
    .records-nav-table td {
        background-color: transparent !important;
        border-color: var(--bg-app) !important;
    }

    .records-nav-table .nav-link {
        background-color: var(--bg-input) !important;
        color: var(--text-main) !important;
        border-color: var(--bg-app) !important;
    }

    .records-nav-table .nav-link:hover {
        background-color: var(--uks-blue-600) !important;
        color: white !important;
        border-color: var(--uks-blue-600) !important;
    }

}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-app) !important;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

ul {
    list-style: none;
}

/* --- Layout Structure --- */
.layout-modern {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
/* --- Sidebar Creative Redesign --- */
.sidebar {
    width: 280px;
    background-color: rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
    border-right: none;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--uks-blue-100) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--uks-blue-100);
    border-radius: 20px;
}

.sidebar-header {
    margin-bottom: 2rem;
    padding: 0 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* Adding padding bottom for the separator */
    padding-bottom: 1.5rem;
}

/* The "Middle Line" - Fading Separation Line */
.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    /* Centered, not full width */
    height: 1px;
    background: linear-gradient(90deg,
            rgba(14, 165, 233, 0) 0%,
            rgba(14, 165, 233, 0.3) 50%,
            rgba(14, 165, 233, 0) 100%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Logo Text Container to stack lines if needed or keep inline */
.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-primary {
    color: var(--uks-blue-600);
    /* Blue as requested */
    font-size: 1.2rem;
}

.logo-secondary {
    color: var(--text-main);
    /* Dark/Black as requested */
    font-size: 1.1rem;
    font-weight: 700;
}

/* Icon Styling like the image (White box + Glow) */
.logo-icon {
    background: white;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 4px 15px -3px rgba(14, 165, 233, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(224, 242, 254, 0.5);
    /* Subtle border */
    position: relative;
}

/* The little blue dash under the icon from the image */
.logo-icon::after {
    content: '';
    position: absolute;
    bottom: -6px;
    /* Positioned just below the white box */
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    background: var(--uks-blue-500);
    border-radius: 10px;
}

.logo-icon img,
.logo-icon svg {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: none;
    /* Remove previous filter, let original colors show */
}

.sidebar-toggle,
.sidebar-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background-color: #FEF2F2;
    color: var(--accent-error);
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: 0.1em;
    padding-left: 1rem;
    opacity: 0.8;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    margin-bottom: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    /* High rounding for pill shape */
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Hover Effect: Slide & Light Blue */
.nav-link:hover {
    color: var(--uks-blue-700);
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transform: translateX(5px);
}

/* Active State: The "Premium" Look */
.nav-link-active {
    background: linear-gradient(135deg, var(--uks-blue-600) 0%, var(--uks-blue-500) 100%);
    color: white !important;
    box-shadow: 0 8px 20px -4px rgba(14, 165, 233, 0.4);
    transform: scale(1.02);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
    color: var(--text-light);
}

.nav-link:hover .nav-icon {
    color: var(--uks-blue-500);
    transform: scale(1.1);
}

.nav-link-active .nav-icon {
    color: white;
    opacity: 1;
}

/* Footer Card */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.02);
    /* Inverted subtle shadow */
    border: 1px solid var(--bg-app);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    /* Soft square instead of circle */
    background: linear-gradient(135deg, var(--uks-blue-100), var(--uks-blue-50));
    color: var(--uks-blue-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.user-role {
    font-size: 0.75rem;
    color: var(--uks-blue-600);
    /* Use color for role */
    font-weight: 500;
}

.logout-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    border-radius: 10px;
    transition: all 0.2s;
    padding: 0;
}

.logout-btn:hover {
    background-color: #FEF2F2;
    color: var(--accent-error);
    transform: rotate(90deg);
    /* Playful interaction */
}

/* Main Content Adjustment for wider sidebar */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 2rem;
    width: calc(100% - 280px);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-app);
    z-index: 40;
    padding: 1rem 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

h1.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search */
.search-container {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.search-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.search-box {
    display: none;
    /* JS toggles this */
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    margin-top: 0.5rem;
    min-width: 250px;
    align-items: center;
}

.search-box.active {
    display: flex;
}

.search-input {
    border: none;
    outline: none;
    background: var(--bg-input);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    width: 100%;
    font-size: 0.9rem;
}

.search-close {
    background: none;
    border: none;
    margin-left: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Notifications */
.notification-btn {
    position: relative;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s;
}

.notification-btn:hover {
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-error);
    color: white;
    font-size: 0.65rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid white;
}

/* User Menu */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-xl);
    transition: background 0.2s;
}

.user-menu-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--text-main);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.user-name-sm {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

/* User Dropdown */
.user-menu-dropdown {
    position: relative;
}

/* Fix Hover Gap with Invisible Bridge on Container */
.user-menu-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    pointer-events: auto;
}

/* Fix Hover Gap with Invisible Bridge on Menu */
.user-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 15px);
    width: 280px;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.15);
    padding: 0;
    z-index: 110;
    border: 1px solid var(--uks-blue-50);
    overflow: hidden;
    transform-origin: top right;
    animation: menuScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.user-menu:hover,
.user-menu-dropdown:hover .user-menu {
    /* Simple CSS hover or keep JS toggle logic */
    display: block;
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--uks-blue-50) 0%, white 100%);
    border-bottom: 1px solid var(--uks-blue-50);
}

.user-avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--uks-blue-500);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.user-details-md {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.user-menu-items {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.user-menu-item:hover {
    background: var(--uks-blue-50);
    color: var(--uks-blue-600);
    border-color: var(--uks-blue-100);
}

.user-menu-item svg {
    color: var(--text-light);
    transition: color 0.2s;
}

.user-menu-item:hover svg {
    color: var(--uks-blue-500);
}

/* Toggle Switch Style */
.menu-toggle-item {
    justify-content: space-between;
}

.toggle-switch {
    width: 40px;
    height: 22px;
    background: var(--text-light);
    border-radius: 20px;
    position: relative;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

/* Dark Mode Logic (applied via body class) */
body.theme-dark .toggle-switch {
    background: var(--uks-blue-500);
}

body.theme-dark .toggle-switch::after {
    transform: translateX(18px);
}

.user-menu-footer {
    padding: 0.5rem;
    border-top: 1px solid var(--bg-app);
    background: var(--bg-app);
}

.logout-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    color: var(--accent-error);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.logout-menu-item:hover {
    background: #FEF2F2;
    color: #DC2626;
}


/* --- Components: Cards --- */
.card {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* --- Components: Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: #000000;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-input);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #E5E7EB;
}

/* --- Components: Inputs --- */
.search-bar {
    background: var(--bg-panel);
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-soft);
    min-width: 300px;
    border: 1px solid transparent;
}

.search-bar:focus-within {
    border-color: var(--text-light);
}

/* --- Flash Messages --- */
.flash-message {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
}

.flash-success {
    background-color: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.flash-error {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* --- Data Tables & Records Styles --- */
.records-page,
.athletes-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

/* Filters Card */
.filters-card {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    margin-bottom: 2rem;
    overflow: hidden;
}

.filters-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bg-app);
}

.filters-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.filters-toggle {
    display: none;
    /* Often hidden on desktop, or used for mobile */
}

.filters-content {
    padding: 1.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-select {
    padding: 0.6rem 1rem;
    border: 1px solid var(--bg-app);
    background-color: var(--bg-input);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
}

.form-select:focus {
    border-color: var(--text-light);
    background-color: white;
}

.filters-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

/* Records Card */
.records-card {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bg-app);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.record-count {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg-app);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box-sm {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-sm {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--bg-app);
    background: var(--bg-input);
    font-size: 0.9rem;
    width: 240px;
    outline: none;
}

.search-input-sm:focus {
    background: white;
    border-color: var(--text-light);
}

.search-box-sm svg {
    position: absolute;
    left: 12px;
    color: var(--text-light);
}

/* Modern Table */
.table-container {
    overflow-x: auto;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.table-modern th {
    background: var(--bg-app);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    text-align: left;
}

.table-modern td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bg-app);
    color: var(--text-main);
    font-size: 0.95rem;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:hover {
    background-color: #FAFAFA;
    /* Very subtle hover */
}

/* Athlete Cell */
.athlete-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.athlete-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--text-main);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.athlete-info {
    display: flex;
    flex-direction: column;
}

.athlete-name {
    font-weight: 600;
    color: var(--text-main);
}

.athlete-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Badges */
.style-badge,
.pool-badge,
.age-group-badge,
.gender-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.style-badge {
    background: var(--bg-input);
    color: var(--text-main);
}

.pool-badge {
    background: var(--bg-app);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gender-badge.gender-M {
    background: #E0F2FE;
    color: #0369A1;
}

/* Keeping some color for gender/utility is good, or make monochrome: */
/* Monochrome Override */
.gender-badge.gender-M {
    background: var(--text-main);
    color: white;
}

.gender-badge.gender-F {
    background: var(--bg-input);
    color: var(--text-main);
}

.time-record {
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 700;
    color: var(--text-main);
}

/* Action Buttons in Table */
.table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.action-edit {
    background: var(--bg-input);
    color: var(--text-main);
}

.action-edit:hover {
    background: var(--text-light);
    color: white;
}

.action-delete {
    background: #FEF2F2;
    color: var(--accent-error);
}

.action-delete:hover {
    background: var(--accent-error);
    color: white;
}

.empty-state {
    padding: 4rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Button Danger */
/* Button Danger */
.btn-danger {
    background: var(--accent-error);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
}

.btn-danger:hover {
    background: #DC2626;
}

/* --- Athletes Page Specifics --- */

/* View Controls */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.view-buttons {
    display: flex;
    background: var(--bg-panel);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.view-btn {
    border: none;
    background: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: var(--bg-app);
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.view-btn:hover:not(.active) {
    color: var(--text-secondary);
}

.search-box-md {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input-md {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--bg-app);
    border-radius: var(--radius-full);
    background: var(--bg-panel);
    font-size: 0.95rem;
    outline: none;
    box-shadow: var(--shadow-soft);
    color: var(--text-main);
}

.search-input-md:focus {
    border-color: var(--text-light);
}

.search-box-md svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Grid View */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.athlete-card {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.athlete-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.athlete-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.athlete-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--text-main);
    color: white;
    /* Monochrome White text on Black bg */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.athlete-actions {
    display: flex;
    gap: 0.5rem;
}

.athlete-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.athlete-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.athlete-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.athlete-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-app);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.athlete-footer {
    display: flex;
    margin-top: auto;
}

.athlete-footer .btn-secondary {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* List View */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.athlete-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s;
}

.athlete-list-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-hover);
}

.list-item-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.list-item-main .athlete-avatar {
    /* Uses .athlete-avatar from previous block */
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.athlete-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta-item:not(:last-child)::after {
    content: "â€˘";
    margin-left: 1rem;
    opacity: 0.5;
}

.list-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.list-item-actions .btn-secondary {
    background: var(--bg-app);
    border: 1px solid transparent;
}

.list-item-actions .btn-secondary:hover {
    border-color: var(--text-light);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Pagination */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-panel);
    padding: 0.5rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-soft);
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: var(--bg-app);
    color: var(--text-main);
}

.pagination-active {
    background: var(--text-main);
    color: white;
}

.pagination-active:hover {
    background: var(--text-main);
    color: white;
}

/* Modern Table */
.table-container {
    overflow-x: auto;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.table-modern th {
    background: var(--bg-app);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    text-align: left;
}

.table-modern td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bg-app);
    color: var(--text-main);
    font-size: 0.95rem;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:hover {
    background-color: #FAFAFA;
    /* Very subtle hover */
}

/* Athlete Cell */
.athlete-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.athlete-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--text-main);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.athlete-info {
    display: flex;
    flex-direction: column;
}

.athlete-name {
    font-weight: 600;
    color: var(--text-main);
}

.athlete-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Badges */
.style-badge,
.pool-badge,
.age-group-badge,
.gender-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.style-badge {
    background: var(--bg-input);
    color: var(--text-main);
}

.pool-badge {
    background: var(--bg-app);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gender-badge.gender-M {
    background: #E0F2FE;
    color: #0369A1;
}

/* Keeping some color for gender/utility is good, or make monochrome: */
/* Monochrome Override */
.gender-badge.gender-M {
    background: var(--text-main);
    color: white;
}

.gender-badge.gender-F {
    background: var(--bg-input);
    color: var(--text-main);
}

.time-record {
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 700;
    color: var(--text-main);
}

/* Action Buttons in Table */
.table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.action-edit {
    background: var(--bg-input);
    color: var(--text-main);
}

.action-edit:hover {
    background: var(--text-light);
    color: white;
}

.action-delete {
    background: #FEF2F2;
    color: var(--accent-error);
}

.action-delete:hover {
    background: var(--accent-error);
    color: white;
}

.empty-state {
    padding: 4rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Button Danger */
.btn-danger {
    background: var(--accent-error);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
}

.btn-danger:hover {
    background: #DC2626;
}

/* --- Athletes Page Specifics --- */

/* View Controls */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.view-buttons {
    display: flex;
    background: var(--bg-panel);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.view-btn {
    border: none;
    background: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: var(--bg-app);
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.view-btn:hover:not(.active) {
    color: var(--text-secondary);
}

.search-box-md {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input-md {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--bg-app);
    border-radius: var(--radius-full);
    background: var(--bg-panel);
    font-size: 0.95rem;
    outline: none;
    box-shadow: var(--shadow-soft);
    color: var(--text-main);
}

.search-input-md:focus {
    border-color: var(--text-light);
}

.search-box-md svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Grid View */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.athlete-card {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.athlete-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.athlete-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.athlete-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--text-main);
    color: white;
    /* Monochrome White text on Black bg */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.athlete-actions {
    display: flex;
    gap: 0.5rem;
}

.athlete-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.athlete-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.athlete-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.athlete-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-app);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.athlete-footer {
    display: flex;
    margin-top: auto;
}

.athlete-footer .btn-secondary {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* List View */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.athlete-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s;
}

.athlete-list-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-hover);
}

.list-item-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.list-item-main .athlete-avatar {
    /* Uses .athlete-avatar from previous block */
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.athlete-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta-item:not(:last-child)::after {
    content: "â€˘";
    margin-left: 1rem;
    opacity: 0.5;
}

.list-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.list-item-actions .btn-secondary {
    background: var(--bg-app);
    border: 1px solid transparent;
}

.list-item-actions .btn-secondary:hover {
    border-color: var(--text-light);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Pagination */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-panel);
    padding: 0.5rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-soft);
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: var(--bg-app);
    color: var(--text-main);
}

.pagination-active {
    background: var(--text-main);
    color: white;
}

.pagination-active:hover {
    background: var(--text-main);
    color: white;
}

/* --- Athlete Profile Styles --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
}

/* Badge Generic */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-input);
    color: var(--text-secondary);
}

/* Table Style Mapping */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem;
    background: var(--bg-app);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-app);
    color: var(--text-main);
}

.table-responsive {
    overflow-x: auto;
}

/* --- Authentication Styles (Login) --- */
.auth-layout {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-app);
    overflow: hidden;
    color: var(--text-main);
}

.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top right, #E5E7EB, #F2F4F7 60%);
}

.floating-shapes .shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.shape-1 {
    background: #E0E7FF;
    width: 400px;
    height: 400px;
    top: -10%;
    right: -5%;
}

.shape-2 {
    background: #F3F4F6;
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: -5%;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 50px);
    }
}

.auth-container {
    display: flex;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-branding {
    flex: 1;
    background: var(--bg-dark);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-branding::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.brand-content {
    position: relative;
    z-index: 2;
}

.logo-large {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.logo-large h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    font-weight: 800;
}

.brand-message h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.features-list {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

/* Auth Form Panel */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: white;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.input-group {
    position: relative;
}

.input-group .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--bg-app);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-main);
    background: var(--bg-input);
    transition: all 0.2s;
}

.form-input:focus {
    background: white;
    border-color: var(--text-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--bg-dark);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 1rem;
}

.auth-submit-btn:hover {
    background: black;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.footer-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.password-toggle:hover {
    color: var(--text-main);
}

/* Form Options (Checkbox & Forgot Password) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--bg-app);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-wrapper input:checked~.checkmark {
    background: var(--text-main);
    border-color: var(--text-main);
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

.checkbox-wrapper input:checked~.checkmark::after {
    opacity: 1;
}

.forgot-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* Auth Alerts */
.auth-alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.auth-alert .alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Loader */
.loader {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Mobile Auth */
@media (max-width: 900px) {
    .auth-layout {
        height: auto;
        min-height: 100vh;
        padding: 2rem 1rem;
    }

    .auth-container {
        flex-direction: column;
        height: auto;
    }

    .auth-branding {
        padding: 2rem;
        display: none;
        /* Simplify on mobile */
    }

    .auth-form-panel {
        padding: 2rem;
    }
}

/* --- Admin Generic Styles (Import/Backup/Logs) --- */
.file-upload-area {
    border: 2px dashed var(--bg-app);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--bg-panel);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--text-main);
    background: var(--bg-input);
}

.upload-icon {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.import-summary {
    margin-top: 2rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.summary-card {
    background: var(--bg-panel);
    border: 1px solid var(--bg-app);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.summary-card.success {
    border-bottom: 4px solid var(--accent-success);
}

.summary-card.info {
    border-bottom: 4px solid var(--text-secondary);
}

.summary-card.warning {
    border-bottom: 4px solid var(--accent-warning);
}

.summary-card.neutral {
    border-bottom: 4px solid var(--text-light);
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--text-main);
}

.summary-title {
    font-weight: 600;
    color: var(--text-main);
}

.summary-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Logs View */
pre {
    color: var(--text-main);
}

/* Kpi Badge for Import */
.kpi-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.gender-M {
    background-color: var(--text-main);
}

.gender-F {
    background-color: var(--text-light);
}

/* --- Sidebar Admin Panel & Footer Enhancements --- */
.admin-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bg-app);
}

.admin-section .nav-section-label {
    color: var(--text-main);
    font-weight: 700;
}

.sidebar-footer {
    background: var(--bg-app);
    margin: 0 1rem 1rem 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.sidebar-footer:hover {
    background: #e5e7eb;
}

.user-info {
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    background: var(--bg-dark);
}

.logout-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
}

.logout-btn:hover {
    background: white;
    color: var(--accent-error);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* --- Admin Dashboard Styles --- */
.admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.admin-header .page-title {
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.admin-stat-card {
    background: var(--bg-panel);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-trend {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
}

.stat-trend.trend-up {
    background: #d1fae5;
    color: #065f46;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1;
}

.stat-progress {
    margin-top: auto;
}

.progress-bar {
    height: 6px;
    background: var(--bg-app);
    border-radius: var(--radius-full);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--text-main);
    border-radius: var(--radius-full);
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Actions Grid */
.admin-actions-section {
    margin-top: 2rem;
    width: 100%;
    grid-column: 1 / -1;
    /* Span all columns */
}

.admin-actions-section .section-title {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.admin-action-card {
    background: var(--bg-panel);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--text-main);
}

.admin-action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.action-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-app);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    flex-shrink: 0;
}

.action-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.action-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.action-arrow {
    margin-left: auto;
    color: var(--text-light);
}

/* Admin Content Grid (Activity & Status) */
.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-card,
.dashboard-card {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    height: 100%;
}

.admin-card .card-header,
.dashboard-card .card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--bg-app);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.card-content {
    padding: 1.5rem;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bg-app);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-input);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.activity-text {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* System Status */
.system-status {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
}

.status-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.status-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: #d1fae5;
    color: #065f46;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #059669;
    border-radius: 50%;
}

/* Data Management */
.data-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.data-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
}

.data-icon {
    color: var(--text-main);
    margin-bottom: 1rem;
}

.data-content {
    margin-bottom: 1rem;
}

.data-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.data-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.data-action .btn-secondary {
    width: 100%;
    justify-content: center;
}

/* --- Refined Guest Button --- */
.btn-guest {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--bg-app);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    margin-right: 0.5rem;
}

.btn-guest:hover {
    color: var(--text-main);
    border-color: var(--text-main);
    background: var(--bg-app);
}

/* --- Modern Form Styles (Add Athlete/Record) --- */
.form-page {
    max-width: 1000px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header .page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.form-container {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.section-divider {
    height: 1px;
    background: var(--bg-app);
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--bg-app);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-main);
    background: var(--bg-input);
    transition: all 0.2s;
}

.form-select:focus,
.form-textarea:focus {
    background: white;
    border-color: var(--text-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    font-size: 0.8rem;
    color: var(--accent-error);
    margin-left: 0.5rem;
}

.form-input.error,
.form-select.error {
    border-color: var(--accent-error);
    background: #fef2f2;
}

/* Checkbox Custom */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-checkbox input {
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-app);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.form-checkbox input:checked+.checkbox-label .checkbox-custom {
    background: var(--text-main);
    border-color: var(--text-main);
}

.form-checkbox input:checked+.checkbox-label .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--bg-app);
}

.btn-primary {
    background: var(--text-main);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: black;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-app);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-app);
    border-color: var(--text-light);
}

/* Preview Cards (Athlete/Record) */
.preview-card,
.record-preview-card {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--bg-app);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.preview-avatar {
    width: 48px;
    height: 48px;
    background: var(--text-main);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.preview-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.preview-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.preview-stats {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-stat {
    display: flex;
    flex-direction: column;
}

.preview-stat .stat-value {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.preview-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.preview-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.preview-placeholder svg {
    margin-bottom: 1rem;
    stroke: var(--text-light);
}

.preview-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.preview-badge.club {
    background: var(--text-main);
}

.preview-badge.county {
    background: var(--text-secondary);
}

.preview-content .preview-time {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.preview-details {
    display: flex;
    gap: 0.5rem;
}

.detail-item {
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--bg-app);
}

.time-input-group {
    position: relative;
}

.time-format {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-light);
    pointer-events: none;
}


/* ===========================================
   UKS DELFIN GARWOLIN - PROFESSIONAL DASHBOARD
   Soft Monochrome with Subtle Blue Accents
   =========================================== */

:root {
    /* --- Color Palette --- */
    --bg-app: #F2F4F7;
    --bg-panel: #FFFFFF;
    --bg-dark: #111827;
    --bg-input: #F3F4F6;

    /* --- Text Colors --- */
    --text-main: #111827;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-white: #FFFFFF;

    /* --- UKS Delfin Brand Colors --- */
    --uks-blue-50: #F0F9FF;
    /* Very light blue - backgrounds */
    --uks-blue-100: #E0F2FE;
    /* Light blue - subtle accents */
    --uks-blue-200: #BAE6FD;
    /* Soft blue - hover states */
    --uks-blue-300: #7DD3FC;
    /* Medium blue - icons, badges */
    --uks-blue-400: #38BDF8;
    /* Primary blue - buttons, active states */
    --uks-blue-500: #0EA5E9;
    /* Brand blue - main accent */
    --uks-blue-600: #0284C7;
    /* Dark blue - text on light */
    --uks-blue-700: #0369A1;
    /* Deep blue - important elements */
    --uks-blue-800: #075985;
    /* Very deep blue */

    /* --- Accents (updated with blue) --- */
    --accent-primary: var(--uks-blue-500);
    /* Main action color - blue */
    --accent-secondary: #64748B;
    /* Secondary - slate blue */
    --accent-success: #10B981;
    --accent-warning: #F59E0B;
    --accent-error: #EF4444;

    /* --- Spacing & Radius --- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 9999px;

    /* --- Shadows --- */
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-blue: 0 4px 20px -2px rgba(14, 165, 233, 0.15);
}

/* --- Logo & Brand Updates --- */
.logo {
    color: var(--uks-blue-600);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.logo-icon svg {
    color: var(--uks-blue-500);
}

/* --- Active Navigation States with Blue --- */
.nav-link-active {
    color: var(--uks-blue-600);
    background-color: var(--uks-blue-50);
    font-weight: 600;
    position: relative;
}

.nav-link-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background-color: var(--uks-blue-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nav-link:hover {
    background-color: var(--uks-blue-50);
    color: var(--uks-blue-600);
}

/* --- Button Enhancements --- */
.btn-primary {
    background-color: var(--uks-blue-500);
    color: white;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background-color: var(--uks-blue-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}

.btn-secondary {
    background-color: var(--uks-blue-50);
    color: var(--uks-blue-600);
    border: 1px solid var(--uks-blue-200);
}

.btn-secondary:hover {
    background-color: var(--uks-blue-100);
    border-color: var(--uks-blue-300);
}

/* --- Header Enhancements --- */
.dashboard-header {
    background: linear-gradient(135deg, var(--uks-blue-500) 0%, var(--uks-blue-600) 100%);
    color: white;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-blue);
}

.page-title {
    color: var(--uks-blue-700);
}

/* --- Card Enhancements --- */
.card {
    border: 1px solid var(--uks-blue-50);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--uks-blue-200);
    box-shadow: var(--shadow-blue);
}

/* --- Table Enhancements --- */
.table-modern th {
    background-color: var(--uks-blue-50);
    color: var(--uks-blue-700);
    font-weight: 600;
    border-bottom: 2px solid var(--uks-blue-200);
}

.table-modern tbody tr:hover {
    background-color: var(--uks-blue-50);
}

/* --- Badge Enhancements --- */
.gender-badge.gender-M {
    background: linear-gradient(135deg, var(--uks-blue-100) 0%, var(--uks-blue-200) 100%);
    color: var(--uks-blue-700);
    font-weight: 600;
}

.gender-badge.gender-F {
    background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 100%);
    color: #9D174D;
    font-weight: 600;
}

.pool-badge {
    background: var(--uks-blue-50);
    color: var(--uks-blue-600);
    border: 1px solid var(--uks-blue-200);
    font-weight: 600;
}

/* --- Time Records - Blue Accent --- */
.time-record {
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 700;
    color: var(--uks-blue-600);
    background: var(--uks-blue-50);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* --- Action Buttons with Blue --- */
.action-edit {
    background: var(--uks-blue-50);
    color: var(--uks-blue-600);
    border: 1px solid var(--uks-blue-200);
}

.action-edit:hover {
    background: var(--uks-blue-500);
    color: white;
    border-color: var(--uks-blue-500);
}

/* --- Stats Cards with Blue --- */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--uks-blue-300), var(--uks-blue-500));
}

.stat-value {
    color: var(--uks-blue-600);
}

/* --- Pagination with Blue --- */
.pagination-active {
    background: var(--uks-blue-500);
    color: white;
    box-shadow: 0 2px 5px rgba(14, 165, 233, 0.2);
}

.pagination-btn:hover {
    background: var(--uks-blue-50);
    color: var(--uks-blue-600);
}

/* --- Form Elements with Blue --- */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--uks-blue-300);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: white;
}

/* --- Status Indicators --- */
.status-indicator {
    background: linear-gradient(135deg, var(--uks-blue-100) 0%, var(--uks-blue-200) 100%);
    color: var(--uks-blue-700);
}

.status-dot {
    background: var(--uks-blue-500);
}

/* --- Notification Badge --- */
.notification-badge {
    background: var(--accent-error);
    box-shadow: 0 0 0 2px white;
}

/* --- Dashboard Specific Elements --- */

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.quick-stat {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--uks-blue-50);
    transition: all 0.3s ease;
}

.quick-stat:hover {
    transform: translateY(-2px);
    border-color: var(--uks-blue-200);
    box-shadow: var(--shadow-blue);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--uks-blue-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--uks-blue-500);
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--uks-blue-600);
    line-height: 1;
}

/* Records Navigation Table (Main Feature) */
.records-nav-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid var(--uks-blue-50);
}

.records-nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--uks-blue-700);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.records-nav-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--uks-blue-500);
    border-radius: var(--radius-sm);
}

.records-nav-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.records-nav-table th {
    background: var(--uks-blue-50);
    color: var(--uks-blue-700);
    font-weight: 600;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--uks-blue-100);
    font-size: 0.875rem;
}

.records-nav-table td {
    padding: 0.5rem;
    border: 1px solid var(--uks-blue-100);
    text-align: center;
    background: white;
}

/* Enhanced Nav Links */
.nav-link {
    display: block;
    padding: 0.75rem;
    color: var(--uks-blue-600);
    text-decoration: none;
    background-color: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--uks-blue-100);
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    background-color: var(--uks-blue-50);
    color: var(--uks-blue-700);
    border-color: var(--uks-blue-300);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

/* Gender Sections */
.gender-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--uks-blue-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--uks-blue-100);
}

.gender-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--uks-blue-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gender-title::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--uks-blue-500);
}

/* --- Athlete Cards with Blue --- */
.athlete-card {
    border: 1px solid var(--uks-blue-50);
}

.athlete-card:hover {
    border-color: var(--uks-blue-300);
    box-shadow: var(--shadow-blue);
}

.athlete-avatar-lg,
.athlete-avatar,
.user-avatar {
    background: linear-gradient(135deg, var(--uks-blue-400) 0%, var(--uks-blue-600) 100%);
    color: white;
    font-weight: 600;
}

/* --- Progress Bars with Blue --- */
.progress-bar {
    background: var(--uks-blue-100);
}

.progress-fill {
    background: linear-gradient(90deg, var(--uks-blue-300), var(--uks-blue-500));
}

/* --- Search Enhancements --- */
.search-input:focus,
.search-input-sm:focus,
.search-input-md:focus {
    border-color: var(--uks-blue-300);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* --- Filter Section --- */
.filters-card {
    border: 1px solid var(--uks-blue-50);
}

.filter-label {
    color: var(--uks-blue-600);
    font-weight: 600;
}

/* --- Utility Classes --- */
.text-blue {
    color: var(--uks-blue-600);
}

.bg-blue-light {
    background-color: var(--uks-blue-50);
}

.border-blue-light {
    border-color: var(--uks-blue-100);
}

/* --- Authentication Page Updates --- */
.auth-branding {
    background: linear-gradient(135deg, var(--uks-blue-600) 0%, var(--uks-blue-800) 100%);
}

.auth-submit-btn {
    background: var(--uks-blue-500);
}

.auth-submit-btn:hover {
    background: var(--uks-blue-600);
}

/* --- Admin Dashboard --- */
.admin-badge {
    background: linear-gradient(135deg, var(--uks-blue-500) 0%, var(--uks-blue-600) 100%);
}

.stat-trend.trend-up {
    background: linear-gradient(135deg, var(--uks-blue-100) 0%, var(--uks-blue-200) 100%);
    color: var(--uks-blue-700);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .records-nav-table {
        font-size: 0.875rem;
    }

    .nav-link {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .gender-section {
        padding: 1rem;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.3s ease-out;
}

/* --- Swimmer Specific Elements --- */
.swimmer-icon {
    color: var(--uks-blue-500);
}

/* --- Print Styles --- */
@media print {

    .sidebar,
    .header-right,
    .btn-primary,
    .action-btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .time-record {
        background: none;
        padding: 0;
    }
}

/* --- Loading States --- */
.loading-shimmer {
    background: linear-gradient(90deg,
            var(--uks-blue-50) 0%,
            var(--uks-blue-100) 50%,
            var(--uks-blue-50) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--uks-blue-50);
}

::-webkit-scrollbar-thumb {
    background: var(--uks-blue-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--uks-blue-400);
}

/* --- Responsive Design Improvements --- */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }

    .sidebar-toggle {
        display: block;
    }

    .admin-stats-grid,
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1rem;
        flex-direction: row;
        /* Enforce horizontal layout as requested */
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        height: 60px;
    }

    .header-left {
        width: auto;
        flex: 1;
        min-width: 0;
        /* Allow shrinking */
        gap: 0.5rem;
    }

    .header-right {
        width: auto;
        flex-shrink: 0;
    }

    .search-bar {
        width: 100%;
        min-width: auto;
    }

    .page-title {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
    }

    .title-full {
        display: none !important;
        /* Hide full club name on mobile */
    }

    .page-subtitle {
        display: none;
        /* Hide subtitle on mobile to save space */
    }

    /* Group Icons Logic */
    .header-actions .search-container,
    .header-actions .notification-dropdown,
    .user-menu-btn .user-name-sm,
    .user-menu-btn svg {
        display: none !important;
    }

    .mobile-only-actions {
        display: block !important;
        border-bottom: 1px solid var(--bg-app);
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .notification-badge-inline {
        background: var(--accent-error);
        color: white;
        font-size: 0.7rem;
        padding: 0.1rem 0.4rem;
        border-radius: var(--radius-full);
        margin-left: auto;
    }

    /* Homepage Records Tables */
    .records-tables-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .admin-stats-grid,
    .dashboard-grid,
    .admin-actions-grid,
    .quick-stats {
        grid-template-columns: 1fr !important;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    /* Tables need lateral scrolling on mobile */
    .table-modern {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Reset padding for mobile */
    .dashboard-container,
    .admin-dashboard {
        padding: 0.5rem;
    }

    .card,
    .admin-stat-card,
    .dashboard-card {
        padding: 1.25rem;
    }

    .nav-link {
        padding: 0.75rem;
        font-size: 1rem;
        /* Larger touch targets */
    }

    /* Stack gender columns in records table if complex */
    .records-nav-table th,
    .records-nav-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* Desktop Styles for Records Table Grid */
@media (min-width: 769px) {
    .records-tables-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .mobile-only-actions {
        display: none;
    }

    /* Close the media query from line 4231 */
}

/* ===========================================
   LANDING PAGE STYLES (Guest View)
   =========================================== */

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Inter', sans-serif;
}

/* --- Hero Section --- */
.landing-hero {
    text-align: center;
    padding: 6rem 1rem 4rem;
    background: radial-gradient(circle at top center, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    margin-bottom: 4rem;
    position: relative;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: var(--uks-blue-500);
    filter: blur(120px);
    opacity: 0.2;
    z-index: -1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--uks-blue-800) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--uks-blue-600);
    letter-spacing: -0.02em;
}

.hero-stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* --- Sections --- */
.landing-section {
    margin-bottom: 6rem;
}

.section-centered-header {
    text-align: center;
    margin-bottom: 3rem;
}

.landing-section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.landing-section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* --- Records Table Showcase (The Main Feature) --- */
.records-showcase {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
    /* Soft, distinct shadow */
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}

.records-showcase-header {
    background: linear-gradient(135deg, var(--uks-blue-50) 0%, white 100%);
    padding: 2rem;
    border-bottom: 1px solid var(--uks-blue-100);
    text-align: center;
}

.records-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Split Men/Women */
}

.records-column {
    padding: 2rem;
}

.records-column:first-child {
    border-right: 1px solid var(--bg-app);
}

.records-column-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.records-column-title.female {
    color: #DB2777;
}

/* Pink/Red for contrast */
.records-column-title.male {
    color: var(--uks-blue-600);
}

.records-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.record-link-item {
    display: flex;
    justify-content: space-between;
    /* Space out Label and Buttons */
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: background 0.2s;
}

.record-link-item:hover {
    background-color: var(--uks-blue-50);
}

.record-group-label {
    font-weight: 600;
    color: var(--text-main);
}

.record-buttons {
    display: flex;
    gap: 0.5rem;
}

.record-btn-pill {
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--bg-app);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.record-btn-pill:hover {
    background: var(--uks-blue-600);
    color: white;
    border-color: var(--uks-blue-600);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

/* --- Top Athletes Cards (Horizontal) --- */
.top-athletes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.athlete-showcase-card {
    background: white;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.athlete-showcase-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border-color: var(--uks-blue-100);
}

.athlete-showcase-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--uks-blue-100), white);
    color: var(--uks-blue-600);
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px -5px rgba(14, 165, 233, 0.2);
}

.athlete-showcase-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.athlete-showcase-stats {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.athlete-showcase-btn {
    margin-top: auto;
    /* Push to bottom */
    width: 100%;
}

/* Mobile Responsive Tweaks for Landing */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .records-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .records-column {
        padding: 1.5rem;
    }

    .records-column:first-child {
        border-right: none;
        border-bottom: 1px solid var(--bg-app);
    }

    .landing-hero {
        padding-top: 4rem;
    }
}
 / *   L o c a t i o n   C o l u m n   w o r d   w r a p   * / 
 . l o c a t i o n - c o l   { 
         w h i t e - s p a c e :   n o r m a l   ! i m p o r t a n t ; 
         w o r d - b r e a k :   b r e a k - a l l   ! i m p o r t a n t ; 
         l i n e - h e i g h t :   1 . 2   ! i m p o r t a n t ; 
         p a d d i n g - t o p :   8 p x   ! i m p o r t a n t ; 
         p a d d i n g - b o t t o m :   8 p x   ! i m p o r t a n t ; 
         m i n - w i d t h :   8 0 p x ; 
         m a x - w i d t h :   1 2 0 p x ; 
         t e x t - a l i g n :   c e n t e r ; 
 }  
 