:root {
    /* IBM Carbon Design System - Dark Mode (g100) Palette */
    --bg-app: #161616;              /* $background - Carbon Gray 100 */
    --bg-surface: #262626;          /* $layer-01 - Carbon Gray 90 surface */
    --bg-surface-light: #393939;    /* $layer-02 - Carbon Gray 80 surface light */
    --bg-surface-hover: #4c4c4c;    /* $layer-03 - Carbon Gray 70 */
    --primary: #0f62fe;             /* $interactive-01 - Carbon Blue 60 */
    --primary-hover: #0353e9;       /* Carbon Blue 60 Hover */
    --primary-glow: rgba(15, 98, 254, 0.3);
    --accent: #1192e8;              /* $support-info - Carbon Cyan 40 / Blue 40 */
    --text-main: #f4f4f4;           /* $text-primary - Carbon Off-White */
    --text-muted: #c6c6c6;          /* $text-secondary - Carbon Gray 30 */
    --text-helper: #8d8d8d;         /* $text-helper - Carbon Gray 40 */
    --success: #24a148;             /* $support-success - Carbon Green 50 */
    --warning: #f1c21b;             /* $support-warning - Carbon Yellow 30 */
    --danger: #da1e28;              /* $support-error - Carbon Red 60 */
    --border-subtle: #393939;       /* $border-subtle - Carbon Gray 80 */
    --border-strong: #525252;       /* $border-strong - Carbon Gray 70 */

    --font-main: 'IBM Plex Sans', 'Outfit', system-ui, -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    /* App-like feel */
    display: flex;
    justify-content: center;
}

#app {
    width: 100%;
    max-width: 100%;
    /* Enhanced for Full Screen Desktop/Tablet */
    background-color: var(--bg-app);
    height: 100%;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 auto;
}

.responsive-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tablet/Desktop Adjustments */
@media (min-width: 768px) {
    .input-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 columns for wider screens */
    }

    .export-controls {
        grid-template-columns: repeat(4, 1fr);
    }

    .export-group {
        grid-column: span 4;
    }

    .btn-pdf {
        grid-column: span 2 !important;
    }

    .responsive-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .responsive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-surface-light);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Two-column layout for dashboards on desktop */
/* Clean Grid Layouts Across Views */
.player-surveys-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .player-surveys-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .player-surveys-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.team-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.dashboard-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .dashboard-grid-container {
        grid-template-columns: 1.6fr 1fr;
    }
}

.coach-dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-main {
    order: 2;
}

.dashboard-sidebar {
    order: 1;
}

@media (min-width: 1024px) {
    .coach-dashboard-layout {
        display: grid;
        grid-template-columns: 1.6fr 1fr;
        gap: 24px;
    }
    .dashboard-main {
        order: 0;
    }
    .dashboard-sidebar {
        order: 0;
    }
}

.profile-dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-main {
    order: 1;
}

.profile-sidebar {
    order: 2;
}

@media (min-width: 1024px) {
    .profile-dashboard-layout {
        display: grid;
        grid-template-columns: 1.6fr 1fr;
        gap: 24px;
    }
    .profile-main {
        order: 0;
    }
    .profile-sidebar {
        order: 0;
    }
}

/* Form Grid for Admin creation */
.admin-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .admin-form-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        align-items: end;
    }
    /* Make custom team UIs span across all three columns */
    #player-team-ui, #coach-team-ui, .admin-form-grid button {
        grid-column: span 3;
    }
}

/* Roster Table enhancements on mobile */
@media (max-width: 768px) {
    .player-tr td {
        padding: 10px 6px !important;
        font-size: 0.8rem !important;
    }
    th {
        padding: 10px 6px !important;
        font-size: 0.7rem !important;
    }
    .team-tabs {
        padding-right: 12px;
    }
    
    .dashboard {
        padding: 12px !important;
    }
    
    .card {
        padding: 16px !important;
        margin-bottom: 12px !important;
        border-radius: var(--radius-md) !important;
    }
    
    .header h2 {
        font-size: 1.25rem !important;
    }
    
    .team-tab {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
    
    .player-item {
        padding: 12px !important;
        gap: 12px !important;
    }
    
    .floating-nav {
        bottom: 12px !important;
        padding: 8px 16px !important;
        gap: 16px !important;
        border-radius: 20px !important;
    }
    
    .nav-item {
        font-size: 16px !important;
    }

    #map-view {
        height: 220px !important;
        margin-top: 12px !important;
    }
}


/* Typography */
h1 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

p {
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px var(--primary-glow);
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-surface-light);
    color: var(--text-main);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
}

.btn-large {
    padding: 24px;
    font-size: 1.2rem;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse-sync {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 24px 60px 24px;
    background-color: #0022f5 !important;
    background-image: linear-gradient(180deg, #000000 0%, #000000 30%, #000233 50%, #000cb8 75%, #0022f5 100%) !important;
    background-attachment: scroll !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    font-family: 'Tektur', sans-serif !important;
}

.login-screen *:not(i):not(.fa-solid):not(.fa-regular):not(.fa-brands) {
    font-family: 'Tektur', sans-serif !important;
}

.login-screen button,
.login-screen input,
.login-screen select,
.login-screen p,
.login-screen a,
.login-screen span,
.login-screen h1,
.login-screen h2,
.login-screen h3,
.login-screen h4,
.login-screen h5,
.login-screen h6 {
    font-family: 'Tektur', sans-serif !important;
}

.btn-register {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    transition: all 0.3s ease !important;
    font-family: 'Tektur', sans-serif !important;
}
.btn-register:hover, .btn-register:active {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

.login-screen::before {
    display: none;
}

/* Dynamic SCUD Minimalist Logo Title */
.scud-logo-title {
    font-family: 'Tektur', sans-serif !important;
    font-style: italic !important;
    font-size: 11.9rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    letter-spacing: -2px;
    margin-bottom: 20px;
    color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 
        0 0 25px rgba(0, 255, 255, 0.7),
        4px 0 0 rgba(255, 0, 0, 0.8),
        -4px 0 0 rgba(0, 255, 255, 0.8) !important;
}

@media (max-width: 480px) {
    .scud-logo-title {
        font-size: 3rem !important;
        letter-spacing: -1.5px;
    }
}

/* Layered speed trail ghosts */
.scud-logo-title::before {
    display: none !important;
}

.scud-logo-title::after {
    display: none !important;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container p {
    color: var(--text-muted) !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px;
    margin-top: 8px !important;
    opacity: 0.9;
    text-transform: uppercase;
}

.logo-icon {
    display: block;
    font-size: 48px;
    color: var(--primary);
    margin: 0 auto 16px auto;
    opacity: 0.9;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Database Connection Status Badge */
.db-status-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'IBM Plex Mono', monospace !important;
}

.db-status-badge .status-dot {
    font-size: 0.6rem;
}

.db-status-badge .status-dot.green {
    color: #4caf50;
    text-shadow: 0 0 6px #4caf50;
}

.db-status-badge .status-dot.red {
    color: var(--danger);
    text-shadow: 0 0 6px var(--danger);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 10px;
}

/* Dashboard Styling */
.dashboard {
    padding: 20px;
    padding-bottom: 80px;
}

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

.header-text {
    flex: 1;
}

.header-text h3 {
    font-size: 0.9rem;
    color: var(--primary);
}

.header-text h2 {
    font-size: 1.5rem;
}

/* Team Tabs */
.team-tabs {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 8px;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.team-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.team-tab {
    padding: 8px 16px;
    background: var(--bg-surface-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.team-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.team-tab.active {
    background: var(--primary);
    color: #000000;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Profile Navigation Tabs */
.profile-tabs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
}

.profile-tab-btn {
    flex: 1;
    padding: 12px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.profile-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.profile-tab-btn.active {
    background: var(--primary);
    color: #000000;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Almanac Calendar Styles */
.almanac-card {
    background: rgba(18, 18, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.almanac-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.almanac-month-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.almanac-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}

.almanac-weekday {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 4px 0;
    text-transform: uppercase;
}

.almanac-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.almanac-day.empty-offset {
    background: transparent;
    border: none;
    pointer-events: none;
}

.almanac-day.filled {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid #00e676;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

.almanac-day.filled .almanac-status-icon {
    color: #00e676;
    font-size: 0.75rem;
    margin-top: 2px;
}

.almanac-day.today {
    border: 2px solid var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    color: var(--text-main);
}

.almanac-day.today.filled {
    border-color: #00e676;
}

.almanac-day.future {
    opacity: 0.35;
}

.almanac-legend {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.almanac-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.almanac-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.almanac-dot.filled {
    background: #00e676;
    box-shadow: 0 0 6px #00e676;
}

.almanac-dot.empty {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.almanac-dot.today {
    border: 2px solid var(--primary);
    background: transparent;
}

/* Checkbox Grid for Admin */
.team-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #333;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: 0.2s;
}

.checkbox-label:hover {
    color: var(--text-main);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-cloud {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.btn-icon-logout {
    width: 44px;
    height: 44px;
    background: var(--bg-surface-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--danger);
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .cloud-text {
        display: none;
    }

    .header h2 {
        font-size: 1.2rem;
    }
}

/* Status Chips */
.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status.sleeping {
    background: rgba(81, 45, 168, 0.2);
    color: #B39DDB;
}

.status.active {
    background: rgba(0, 230, 118, 0.1);
    color: var(--success);
}

.status.eating {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.status.other {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent);
}

/* Player List Item */
.player-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: transform 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.player-item:active {
    transform: scale(0.98);
    background: var(--bg-surface-light);
}

.player-info h4 {
    font-weight: 600;
    margin-bottom: 4px;
}

.player-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
}

/* Map Container */
#map-view {
    height: 300px;
    width: 100%;
    border-radius: var(--radius-md);
    margin-top: 20px;
    z-index: 1;
}

/* Export Section */
.export-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.export-group {
    grid-column: span 2;
    background: var(--bg-surface);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.export-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

.btn-excel {
    background: #1D6F42;
    /* Excel Green */
    color: white;
}

.btn-csv {
    background: #2196F3;
    /* Blue */
    color: white;
}

.btn-sm {
    padding: 12px;
    font-size: 0.9rem;
}

/* Player Input Screen */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.action-group {
    grid-column: span 2;
    display: flex;
    gap: 8px;
}

.action-group .action-card {
    flex: 1;
}

.action-card {
    background: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.action-card i {
    font-size: 32px;
    color: var(--text-muted);
    transition: 0.3s;
}

.action-card.active {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

.action-card.active i {
    color: white;
}

.floating-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 35, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 30px;
    display: flex;
    gap: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.nav-item {
    color: var(--text-muted);
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.nav-item.active {
    color: var(--primary);
    transform: translateY(-2px);
}

/* --- Login Form --- */
.login-form {
    width: 100%;
    max-width: 320px;
    margin: 30px auto;
    text-align: center;
}

.login-form .btn-primary {
    border-radius: var(--radius-sm) !important;
    background: var(--primary) !important;
    box-shadow: none !important;
    padding: 14px 28px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease;
    width: 100%;
}

.login-form .btn-primary:hover {
    background: #e64a19 !important;
    transform: none;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
    width: 100%;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 14px 20px 14px 44px;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-sm) !important;
    color: #fff !important;
    font-size: 1rem;
    font-family: var(--font-main);
    outline: none;
    transition: all 0.2s ease;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: none;
    transform: none;
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: 0.2s;
    display: flex;
    align-items: center;
}

.input-group input:focus+label {
    color: var(--primary);
}

/* --- Admin Dashboard --- */
.user-list-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-surface-light);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 0;
    border-left: 4px solid var(--border-strong);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.user-list-item.role-coach {
    border-left-color: var(--warning);
}

.user-list-item.role-player {
    border-left-color: var(--success);
}

.user-list-item.role-admin {
    border-left-color: var(--danger);
}

.admin-search-filter-bar select option {
    background-color: #16181e;
    color: #ffffff;
    padding: 8px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* --- Player Profile View --- */
.clickable {
    cursor: pointer;
    transition: 0.2s;
}

.clickable:hover {
    opacity: 0.8;
}

.history-list {
    margin-top: 10px;
}

.history-item {
    background: var(--bg-surface);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-time {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.status-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pill.status-sleeping {
    color: #B39DDB;
    background: rgba(179, 157, 219, 0.1);
}

.status-pill.status-active {
    color: var(--success);
    background: rgba(0, 230, 118, 0.1);
}

.status-pill.status-eating {
    color: var(--warning);
    background: rgba(255, 193, 7, 0.1);
}

.status-pill.status-other {
    color: var(--accent);
    background: rgba(0, 229, 255, 0.1);
}

.location-pill {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* --- Quick Sleep Button --- */
.btn-quick-sleep {
    width: 100%;
    padding: 32px;
    border: none;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #1A237E, #311B92);
    color: white;
    font-size: 1.5rem;
    font-family: var(--font-main);
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(49, 27, 146, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.btn-quick-sleep.is-sleeping {
    background: linear-gradient(135deg, #FF6F00, #FF8F00);
    box-shadow: 0 10px 30px rgba(255, 111, 0, 0.4);
}

.btn-quick-sleep i {
    font-size: 3.5rem;
    animation: pulse-soft 3s infinite ease-in-out;
}

.btn-quick-sleep:active {
    transform: scale(0.96);
}

@keyframes pulse-soft {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

/* --- Borg Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    /* Display controlled via JS (flex/none) */
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

/* --- Survey Modal Additions --- */
.survey-section {
    margin-bottom: 24px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 16px;
}
.survey-section:last-child {
    border-bottom: none;
}
.survey-question {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 12px;
    font-weight: 500;
}
.range-slider {
    width: 100%;
    margin-bottom: 8px;
    accent-color: var(--success);
}
.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.mic-btn {
    background: rgba(255, 87, 34, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    margin: 0 auto;
}
.mic-btn.recording {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    animation: pulse-recording 1.5s infinite;
}
@keyframes pulse-recording {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 61, 0, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(255, 61, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 61, 0, 0); }
}
.audio-preview {
    margin-top: 10px;
    width: 100%;
}
.audio-preview audio {
    width: 100%;
    height: 40px;
}

.modal-card h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.modal-card p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.borg-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.borg-btn {
    aspect-ratio: 1;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-main);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.borg-btn:hover {
    filter: brightness(1.1);
}

.borg-btn:active {
    transform: scale(0.9);
}

.borg-1,
.borg-2 {
    background: #E53935;
}

/* Red - Poor */
.borg-3,
.borg-4 {
    background: #FB8C00;
}

/* Orange - Fair */
.borg-5,
.borg-6 {
    background: #FDD835;
    color: #333;
}

/* Yellow - Good */
.borg-7,
.borg-8 {
    background: #7CB342;
}

/* Light Green - Very Good */
.borg-9,
.borg-10 {
    background: #00E676;
}

/* Green - Excellent */

/* --- Charting & Indicators --- */
.bar-chart-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 30px;
    align-items: center;
    gap: 10px;
}

.bar-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease-out;
}

.bar-value {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pill.status-red { background: rgba(255, 61, 0, 0.1); color: var(--danger); border: 1px solid rgba(255, 61, 0, 0.3); }
.status-pill.status-yellow { background: rgba(255, 193, 7, 0.1); color: var(--warning); border: 1px solid rgba(255, 193, 7, 0.3); }
.status-pill.status-green { background: rgba(0, 230, 118, 0.1); color: var(--success); border: 1px solid rgba(0, 230, 118, 0.3); }

.alert-card {
    border-left: 4px solid var(--danger);
    background: rgba(255, 61, 0, 0.05) !important;
}

.trend-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.trend-item:last-child { border-bottom: none; }

.trend-val {
    font-weight: 700;
}

/* Avatar button style (logout & back buttons) */
.avatar {
    width: 44px;
    height: 44px;
    background: var(--bg-surface-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.avatar:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--primary);
    transform: scale(1.05);
}

/* Slider tick markings */
.slider-markings {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    margin-top: -4px;
    margin-bottom: 12px;
}

.slider-markings .mark {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.slider-markings .mark:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.slider-markings .mark.active {
    color: #fff;
    background: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 8px var(--primary);
}

/* Player Surveys Layout */
.player-surveys-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.survey-card-inline {
    background: var(--bg-surface);
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-soft);
    padding: 28px 24px !important;
    height: fit-content;
}

.hydration-card {
    border-left: 4px solid var(--accent) !important;
}
/* Global Input Fields */
.input-field {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--text-muted);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-main);
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.input-field:focus {
    border-color: var(--primary);
    background: var(--bg-surface-light);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.input-field::placeholder {
    color: var(--text-helper);
}

textarea.input-field {
    resize: vertical;
    min-height: 80px;
}

/* High Resolution Profile Banner Image Styling */
.profile-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    filter: contrast(1.05) brightness(1.03);
    will-change: transform;
}

.player-profile-banner {
    background: #0a0b0d;
    box-shadow: inset 0 -20px 30px rgba(10, 11, 13, 0.8);
}
