/* ============================================================
 * YouthSoccerGenie — Main App Stylesheet
 * Build: YSG_V18_DASHBOARD_SIDEBAR
 * Includes: Login page, sidebar overrides, topbar, dashboard
 * Source: coaches-portal-v5.1.html (approved mockup)
 * ============================================================ */

html, body {
    font-family: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #F4F0E8;
    background-image:
        radial-gradient(circle at 15% 85%, rgba(212,168,75,0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(212,168,75,0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(11,26,46,0.02) 0%, transparent 70%);
    min-height: 100vh;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4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4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ============================================================
 * BLANK LAYOUT — YSG_V17_LOGIN_VISUAL
 * Used by Login/Register pages. No sidebar, no topbar.
 * ============================================================ */
.blank-layout {
    min-height: 100vh;
}

/* ============================================================
 * LOGIN PAGE — YSG_V17_LOGIN_VISUAL
 * Source: coaches-portal-v5.1.html (#page-login)
 * Full split-panel design with decorative gradients.
 * ============================================================ */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

/* Decorative radial gradient — bottom-left gold glow */
.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at 20% 80%, rgba(212,168,75,0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Decorative radial gradient — top-right gold glow */
.login-left::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 500px;
    height: 500px;
    margin-left: auto;
    background: radial-gradient(circle at 80% 20%, rgba(212,168,75,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-left-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 400px;
}

.login-left h1 {
    color: var(--gold);
    font-size: 2.5rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 16px;
}

.login-left p {
    color: var(--cream);
    font-size: 16px;
    line-height: 1.7;
}

.login-stats-row {
    margin-top: 32px;
    display: flex;
    gap: 24px;
    justify-content: center;
}

.login-stat {
    text-align: center;
}

.login-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
}

.login-stat-label {
    font-size: 12px;
    color: var(--cream);
    opacity: 0.8;
}

.login-testimonial {
    background: rgba(212,168,75,0.1);
    border-left: 3px solid var(--gold);
    padding: 16px;
    border-radius: 6px;
    margin-top: 32px;
    font-size: 13px;
    color: var(--cream);
    font-style: italic;
}

.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px;
    background: var(--white);
    position: relative;
}

.login-box {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-box h2 {
    color: var(--navy);
    margin-bottom: 8px;
    font-size: 1.8rem;
    font-family: 'Playfair Display', serif;
}

.login-box .subtitle {
    color: var(--muted);
    margin-bottom: 32px;
    font-size: 14px;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.login-logo img {
    width: 48px;
    height: 48px;
}

.login-logo span {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--navy);
    font-weight: 700;
}

.login-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.login-remember {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.login-forgot {
    font-size: 13px;
    color: #8B6914;
    text-decoration: none;
}

.login-forgot:hover {
    text-decoration: underline;
}

.login-toggle {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--muted);
}

.login-toggle a {
    color: #8B6914;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.login-toggle a:hover {
    text-decoration: underline;
}

/* Login responsive */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-left {
        min-height: 200px;
        padding: 32px;
    }

    .login-left h1 {
        font-size: 1.5rem;
    }

    .login-right {
        padding: 32px;
    }
}

/* ============================================================
 * APP SHELL — YSG_V18_DASHBOARD_SIDEBAR
 * Source: coaches-portal-v5.1.html (app shell)
 * ============================================================ */
.app {
    display: flex;
    min-height: 100vh;
}

/* ===== TOPBAR ===== */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--navy);
    display: flex;
    align-items: center;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-team {
    background: var(--gold-dim);
    color: var(--navy);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.btn-dark-mode {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}

.btn-dark-mode:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ===== MAIN CONTENT AREA ===== */
.main {
    margin-left: 240px;
    flex: 1;
    min-height: 100vh;
    position: relative;
}

.content {
    padding: 32px;
    position: relative;
    z-index: 1;
    background: transparent;
    min-height: calc(100vh - 60px);
}

/* ===== STAT CARDS — exact mockup match ===== */
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.stat-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

/* ===== CARDS ===== */
.card {
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'DM Sans', sans-serif;
}

.card-header .icon {
    margin-right: 8px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-gold {
    background: rgba(212,168,75,0.92);
    color: var(--navy);
}

.btn-gold:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: rgba(255,255,255,0.88);
    color: var(--navy);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,168,75,0.15);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-gold {
    background: var(--gold-dim);
    color: var(--gold);
}

.badge-green {
    background: rgba(39,174,96,0.12);
    color: var(--green);
}

.badge-red {
    background: rgba(231,76,60,0.12);
    color: var(--red);
}

.badge-blue {
    background: rgba(52,152,219,0.12);
    color: var(--blue);
}

.badge-muted {
    background: rgba(139,155,180,0.15);
    color: var(--muted);
}

/* ===== GRID ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

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

/* ===== TEXT UTILITIES ===== */
.text-muted {
    color: var(--muted);
}

/* ===== HAMBURGER (mobile sidebar toggle) ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--navy);
    cursor: pointer;
    padding: 8px;
}

/* ===== RESPONSIVE — TOPBAR & CONTENT ===== */
@media (max-width: 768px) {
    .main {
        margin-left: 0;
    }

    .topbar {
        padding: 0 16px;
    }

    .hamburger {
        display: block;
    }

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

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 16px;
    }
}

/* ============================================================
 * PLAYER ROSTER PAGE — YSG_V28_PLAYERS_CARDS_ITER2
 * Source: coaches-portal-v5.1.html (Players & Roster page)
 * Added in iteration 2 — these CSS classes were missing from
 * app.css in iteration 1, causing detail panel to render as
 * block element at page bottom instead of fixed right overlay.
 * ============================================================ */

/* ===== VIEW TOGGLE TABS ===== */
.tabs { display:flex; gap:4px; border-bottom:2px solid var(--border); margin-bottom:24px; }
.tab-btn { padding:10px 20px; background:none; border:none; color:var(--muted); font-weight:600; font-size:14px; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; transition:all 0.2s; }
.tab-btn:hover { color:var(--navy); }
.tab-btn.active { color:var(--gold); border-bottom-color:var(--gold); }

/* ===== PLAYER CARDS GRID ===== */
.player-cards-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:16px; }
.player-card { background:var(--white); border:1px solid var(--border); border-radius:var(--radius-lg); padding:16px; text-align:center; cursor:pointer; transition:all 0.2s; position:relative; }
.player-card:hover { border-color:var(--gold); box-shadow:var(--shadow-md); transform:translateY(-2px); }
.player-avatar { width:56px; height:56px; border-radius:50%; background:linear-gradient(135deg, var(--gold), var(--gold-hover)); display:flex; align-items:center; justify-content:center; margin:0 auto 12px; font-size:18px; font-weight:700; color:var(--navy); }
.player-name { font-size:14px; font-weight:700; color:var(--navy); margin-bottom:4px; }
.player-jersey { font-size:24px; font-weight:700; color:var(--muted); opacity:0.5; margin-bottom:8px; }
.player-pos-badge { display:inline-block; background:var(--gold-dim); color:#8B6914; padding:3px 10px; border-radius:12px; font-size:11px; font-weight:600; margin-bottom:8px; }
.player-stat-bar { height:6px; background:var(--light-bg); border-radius:3px; overflow:hidden; margin-top:8px; }
.player-stat-fill { height:100%; background:linear-gradient(90deg, var(--gold), var(--gold-hover)); }

/* ===== ATTENDANCE TOGGLES ===== */
.attendance-toggle { display:flex; align-items:center; gap:8px; margin-top:12px; padding-top:12px; border-top:1px solid var(--border); }
.toggle-btn { width:40px; height:24px; background:var(--red); border:none; border-radius:12px; cursor:pointer; position:relative; transition:background 0.2s, box-shadow 0.2s; }
.toggle-btn.active { background:var(--green); }
.toggle-btn::after { content:''; position:absolute; width:20px; height:20px; background:white; border-radius:50%; top:2px; left:2px; transition:left 0.2s; }
.toggle-btn.active::after { left:18px; }

/* ===== DETAIL SLIDE-IN PANEL ===== */
.detail-panel { position:fixed; right:-400px; top:0; width:400px; height:100vh; background:var(--white); border-left:1px solid var(--border); box-shadow:var(--shadow-lg); z-index:300; transition:right 0.3s; overflow-y:auto; }
.detail-panel.open { right:0; }
.detail-panel-header { background:var(--navy); color:var(--cream); padding:20px; display:flex; justify-content:space-between; align-items:center; }
.detail-panel-close { background:none; border:none; color:var(--cream); font-size:24px; cursor:pointer; }
.detail-panel-body { padding:20px; }
.detail-section { margin-bottom:24px; }
.detail-section-title { font-size:13px; font-weight:700; color:var(--navy); text-transform:uppercase; margin-bottom:12px; }

/* ===== SKILL SLIDERS — gradient (mockup lines 304-375) ===== */
.slider-row { margin-bottom:16px; }
.slider-label { display:flex; justify-content:space-between; font-size:13px; margin-bottom:6px; }
.slider-label-val { color:var(--gold); font-weight:700; }
.slider-label-avg { color:var(--muted); font-size:12px; }

/* Gradient slider track — blue → yellow → green */
input[type="range"].skill-slider {
  width:100%; height:8px; border-radius:5px; outline:none; -webkit-appearance:none;
  background: linear-gradient(to right, #3B82F6 0%, #EAB308 50%, #22C55E 100%);
}
input[type="range"].skill-slider::-webkit-slider-thumb {
  -webkit-appearance:none; appearance:none; width:16px; height:16px; border-radius:50%;
  background:white; cursor:pointer; border:2px solid #3B82F6; box-shadow:0 2px 6px rgba(0,0,0,0.2);
}
input[type="range"].skill-slider::-moz-range-thumb {
  width:16px; height:16px; border-radius:50%; background:white; cursor:pointer;
  border:2px solid #3B82F6; box-shadow:0 2px 6px rgba(0,0,0,0.2);
}
input[type="range"].skill-slider::-moz-range-track { background:transparent; border:none; }

/* Fallback for plain range inputs (non-slider contexts) */
input[type="range"]:not(.skill-slider) { width:100%; height:6px; border-radius:3px; background:var(--light-bg); outline:none; -webkit-appearance:none; }
input[type="range"]:not(.skill-slider)::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:20px; height:20px; border-radius:50%; background:var(--gold); cursor:pointer; }
input[type="range"]:not(.skill-slider)::-moz-range-thumb { width:20px; height:20px; border-radius:50%; background:var(--gold); cursor:pointer; border:none; }

/* Compact single-line slider layout inside detail panel */
.detail-section:has(.slider-row) .slider-row { display:flex; align-items:center; gap:12px; padding:8px 0; margin:0; }
.detail-section:has(.slider-row) .slider-label { display:flex; width:80px; gap:0; align-items:center; margin-bottom:0; }
.detail-section:has(.slider-row) .slider-label span:first-child { font-size:12px; font-weight:600; color:var(--navy); width:100%; }
.detail-section:has(.slider-row) input[type="range"].skill-slider { flex:1; height:6px; margin:0; min-width:100px; }
.detail-section:has(.slider-row) .slider-label-val { min-width:35px; font-size:12px; font-weight:700; color:var(--gold); text-align:center; }
.detail-section:has(.slider-row) .slider-label-avg { min-width:50px; font-size:11px; color:var(--muted); text-align:right; }

/* ===== RESPONSIVE — PLAYER CARDS ===== */
@media (max-width: 768px) {
    .detail-panel { width:100%; right:-100%; }
    .player-cards-grid { grid-template-columns:repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .player-cards-grid { grid-template-columns:1fr; }
}
