/*
Theme Name: Paide Scouting Portal
Theme URI: https://example.com/
Author: Marko + ChatGPT
Description: Private Paide Linnameeskond scouting portal with HTML dashboards and server-based data files.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: paide-scouting-portal
*/

:root {
    --sp-bg: #020712;
    --sp-bg-elevated: #071424;
    --sp-border: #1b2940;
    --sp-text: #f5f7ff;
    --sp-text-muted: #9aa3c2;
    --sp-accent: #00c853;
    --sp-accent-soft: rgba(0, 200, 83, 0.15);
    --sp-paide-blue: #001c4c;
    --sp-paide-red: #e53935;
    --sp-card-radius: 16px;
    --sp-shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
    --sp-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    font-family: var(--sp-font-sans);
    background:
        radial-gradient(circle at top, rgba(0, 0, 0, 0.8), rgba(0,0,0,1)),
        url('assets/img/paide-stripes.png') center/cover fixed no-repeat;
    color: var(--sp-text);
}

/* Global links */
a {
    color: var(--sp-accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: linear-gradient(90deg, rgba(0, 12, 40, 0.95), rgba(10, 41, 92, 0.96));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.7);
}

/* Nav */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}
.main-nav li a {
    color: var(--sp-text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.main-nav li a:hover {
    color: var(--sp-text);
}

/* Front layout */
.scouting-front {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}

/* Full-viewport dashboards: keep WP header, dashboard fills rest of viewport */
.scout-dashboard-wrap {
    margin: 1.5rem 0;
    overflow: hidden;
    border-radius: var(--sp-card-radius);
    box-shadow: var(--sp-shadow-soft);
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.25);
}

.scout-dashboard-wrap--viewport {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: 0;
    background: transparent;
}

/* Page templates that should be edge-to-edge */
body.page-template-page-mangijate-andmebaas .scouting-front,
body.page-template-page-ind-analuus .scouting-front,
body.page-template-page-liigade-analuus .scouting-front,
body.page-template-page-klubi-taktika .scouting-front,
body.page-template-page-scouting-calendar .scouting-front,
body.page-template-page-mangijate-vordlus-top .scouting-front,
body.page-template-page-paide-mangude-kokkuvote .scouting-front {
    max-width: none;
    padding: 0;
}
.scouting-front-hero {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
    gap: 2rem;
    align-items: center;
}
@media (max-width: 880px) {
    .scouting-front-hero {
        grid-template-columns: 1fr;
    }
}
.scouting-front-hero h1 {
    font-size: clamp(2rem, 3vw, 2.7rem);
    margin-bottom: 0.8rem;
}
.scouting-front-hero p {
    color: var(--sp-text-muted);
    max-width: 36rem;
}

/* Paide badge */
.paide-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.9rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sp-text-muted);
}
.paide-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sp-paide-red), var(--sp-paide-blue));
}

/* Cards */
.scouting-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.3rem;
    margin-top: 1.8rem;
}
.scouting-card {
    background: radial-gradient(circle at top left, rgba(0, 200, 83, 0.12), rgba(5, 13, 32, 0.98));
    border-radius: var(--sp-card-radius);
    border: 1px solid rgba(0, 0, 0, 0.7);
    box-shadow: var(--sp-shadow-soft);
    padding: 1.4rem 1.3rem;
    position: relative;
    overflow: hidden;
}
.scouting-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(229, 57, 53, 0.18), transparent 55%);
    opacity: 0.5;
    pointer-events: none;
}
.scouting-card h2 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}
.scouting-card p {
    color: var(--sp-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
}
.scouting-card a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 200, 83, 0.5);
    background: linear-gradient(90deg, var(--sp-accent-soft), rgba(0, 0, 0, 0.3));
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Pitch preview */
.pitch-preview {
    background: radial-gradient(circle at center, #22753b 0, #105423 40%, #04260f 100%);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.8);
    box-shadow: var(--sp-shadow-soft);
    padding: 1.2rem 1rem 1.4rem;
    position: relative;
    overflow: hidden;
}
.pitch-preview::before,
.pitch-preview::after {
    content: "";
    position: absolute;
    inset: 8%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.pitch-preview::after {
    inset: 34% 38%;
    border-radius: 999px;
}
.pitch-label {
    position: absolute;
    bottom: 0.9rem;
    left: 1.2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Dashboard wrapper */
.scout-dashboard-wrap {
    background: #020712;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.85);
    box-shadow: var(--sp-shadow-soft);
}

/* Login */
.scouting-login-wrap {
    max-width: 420px;
    margin: 3.5rem auto 4rem;
    background: radial-gradient(circle at top, rgba(0, 200, 83, 0.18), rgba(1, 5, 18, 0.98));
    border-radius: 22px;
    padding: 2.2rem 2rem 2.4rem;
    box-shadow: var(--sp-shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.85);
}
.scouting-login-wrap h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
}
.scouting-login-wrap p {
    margin-top: 0;
    margin-bottom: 1.4rem;
    font-size: 0.9rem;
    color: var(--sp-text-muted);
}
.scouting-login-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--sp-text-muted);
}
.scouting-login-logo-mark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: conic-gradient(from 160deg, var(--sp-paide-red), var(--sp-paide-blue), #00c853, var(--sp-paide-red));
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6);
}

/* Login form tweaks */
.scouting-login-wrap form p {
    margin-bottom: 0.75rem;
}
.scouting-login-wrap label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sp-text-muted);
}
.scouting-login-wrap input[type="text"],
.scouting-login-wrap input[type="password"] {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.55);
    color: var(--sp-text);
}
.scouting-login-wrap input[type="submit"] {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(120deg, var(--sp-accent), #67ff9f);
    color: #020712;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    cursor: pointer;
}
.scouting-login-wrap input[type="submit"]:hover {
    opacity: 0.94;
}

.scouting-login-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--sp-text-muted);
}

/* Paide header */
.site-header {
    background: linear-gradient(90deg, rgba(0, 12, 40, 0.96), rgba(0, 41, 92, 0.98));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.8);
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.site-logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.site-logo {
    width: 42px;
    height: auto;
    display: block;
}
.site-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.site-title-main {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.site-title-sub {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--sp-text-muted);
}
.main-nav {
    font-size: 0.85rem;
}
@media (max-width: 720px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.scouting-login-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.4rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--sp-text-muted);
}
.scouting-login-logo img {
    width: 40px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 12px rgba(0,0,0,0.65));
}
.scouting-login-logo-text-main {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e5e7eb;
}
.scouting-login-logo-text-sub {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sp-text-muted);
}


/* Scouting Hub */
.scouting-hub-page {
    padding: 2rem 1.2rem 3rem;
}
.scouting-hub-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
    gap: 1.2rem;
    align-items: stretch;
    margin-bottom: 1.4rem;
}
.scouting-hub-hero h1 {
    margin: 0.6rem 0 0.8rem;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
}
.scouting-hub-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}
.hub-stat,
.scouting-card-panel,
.hub-league-card,
.hub-player-card,
.hub-calendar-item {
    background: rgba(7, 15, 30, 0.92);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow: var(--sp-shadow-soft);
}
.hub-stat {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hub-stat strong {
    font-size: 1.8rem;
}
.hub-stat span {
    color: var(--sp-text-muted);
}
.scouting-hub-alert {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(0, 200, 83, 0.16);
    border: 1px solid rgba(0, 200, 83, 0.45);
}
.scouting-hub-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.2rem;
}
.scouting-card-panel {
    padding: 1.1rem;
}
.hub-sidebar {
    position: sticky;
    top: calc(var(--sp-header-h, 84px) + 14px);
    height: fit-content;
}
.hub-filter-form,
.hub-entry-form {
    display: grid;
    gap: 0.75rem;
}
.hub-filter-form label span,
.hub-entry-form h2,
.hub-section-head h2 {
    display: block;
    margin-bottom: 0.35rem;
}
.hub-filter-form select,
.hub-entry-form input,
.hub-entry-form select,
.hub-entry-form textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #fff;
    padding: 0.75rem 0.85rem;
    box-sizing: border-box;
}
.hub-filter-actions,
.hub-player-links,
.hub-section-head {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: space-between;
}
.hub-filter-actions button,
.hub-entry-form button {
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(0,200,83,0.95), rgba(0,120,255,0.8));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.hub-filter-actions a,
.hub-player-links a,
.hub-league-head a,
.hub-team-list a {
    color: #9ad7ff;
}
.hub-focus-box {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.hub-main {
    display: grid;
    gap: 1.2rem;
}
.hub-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.hub-entry-form {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
}
.hub-two-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.hub-calendar-list,
.hub-league-columns,
.hub-player-grid {
    display: grid;
    gap: 1rem;
}
.hub-calendar-item {
    padding: 1rem;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 1rem;
}
.hub-calendar-date span,
.hub-league-head span,
.hub-player-meta,
.hub-team-list span,
.hub-empty,
.hub-section-head p {
    color: var(--sp-text-muted);
}
.hub-notes p {
    margin: 0.4rem 0 0;
}
.hub-league-columns {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.hub-league-card,
.hub-player-card {
    padding: 1rem;
}
.hub-league-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
}
.hub-team-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 0.65rem;
}
.hub-team-list li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.hub-player-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.hub-player-links {
    justify-content: flex-start;
    margin-top: 1rem;
    flex-wrap: wrap;
}
@media (max-width: 1080px) {
    .scouting-hub-layout,
    .scouting-hub-hero {
        grid-template-columns: 1fr;
    }
    .hub-sidebar {
        position: static;
    }
}
@media (max-width: 760px) {
    .hub-form-grid,
    .hub-two-cols,
    .hub-calendar-item,
    .scouting-hub-summary {
        grid-template-columns: 1fr;
    }
}


/* Scouting Hub v3 */
.hub-app-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: calc(100vh - 78px);
    background: linear-gradient(180deg, rgba(1,13,42,0) 0%, rgba(1,8,24,.12) 100%);
}
.hub-sidebar-panel {
    background: linear-gradient(180deg, rgba(5, 16, 46, 0.92) 0%, rgba(6, 12, 28, 0.86) 100%);
    color: #eef4ff;
    padding: 1.25rem 1rem 1rem;
    border-right: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    height: calc(100vh - 78px);
    overflow: auto;
    backdrop-filter: blur(18px);
}
.hub-sidebar-panel a { color: #eef4ff; }
.hub-sidebar-top { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1rem; }
.hub-sidebar-top h1 { margin: .25rem 0; font-size: 2rem; color:#fff; }
.hub-sidebar-top p { margin:0; color:rgba(229,238,255,.72); font-size:.95rem; }
.hub-primary-add {
    background: rgba(255,255,255,.12); color:#fff; padding:.75rem 1rem; border-radius:999px; font-weight:700; white-space:nowrap; border:1px solid rgba(255,255,255,.1);
}
.hub-filter-card {
    background: rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    border-radius:22px;
    padding:1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    margin-bottom:1rem;
}
.hub-filter-card h2, .hub-section-head h2 { margin:0; font-size:1rem; color:#fff; }
.hub-league-checks { display:grid; gap:.55rem; margin-top:.85rem; }
.hub-check-row { display:flex; align-items:center; gap:.6rem; font-size:.95rem; color:rgba(237,242,255,.9); }
.hub-check-row input { margin:0; accent-color:#8ab4ff; }
.hub-check-color, .hub-team-color, .hub-browser-color { width:10px; height:10px; border-radius:99px; display:inline-block; flex:0 0 auto; }
.hub-filter-actions { display:flex; gap:.6rem; margin-top:1rem; }
.hub-filter-actions button, .hub-filter-actions a, .hub-inline-actions a, .hub-section-head a, .hub-modal-form button {
    border:0; border-radius:12px; padding:.7rem .95rem; font-weight:600; cursor:pointer; background:#111827; color:#fff; text-decoration:none; display:inline-flex; align-items:center; justify-content:center;
}
.hub-filter-actions a, .hub-inline-actions a, .hub-section-head a { background:rgba(255,255,255,.1); color:#f3f6ff; }
.hub-team-list { display:grid; gap:.55rem; margin-top:.9rem; max-height:45vh; overflow:auto; padding-right:.2rem; }
.hub-team-row {
    display:flex; gap:.7rem; align-items:flex-start; padding:.85rem .9rem; border-radius:16px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.06); text-decoration:none;
}
.hub-team-row.is-active { background:rgba(110,168,255,.16); border-color:rgba(138,180,255,.35); }
.hub-team-copy { display:flex; flex-direction:column; gap:.2rem; }
.hub-team-copy strong { color:#fff; font-size:.96rem; }
.hub-team-copy small { color:rgba(226,232,240,.72); }
.hub-main-panel { padding:1.25rem; }
.scouting-hub-alert { margin-bottom:1rem; background:#eafaf0; color:#116b32; border:1px solid #c3e8cf; border-radius:14px; padding:.85rem 1rem; }
.hub-calendar-shell {
    background:rgba(255,255,255,.97); border-radius:30px; border:1px solid rgba(255,255,255,.5); box-shadow:0 18px 50px rgba(0,0,0,.12); overflow:hidden;
}
.hub-calendar-toolbar {
    display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1.25rem 1.4rem; background:#fbfbfc; border-bottom:1px solid rgba(0,0,0,.06);
}
.hub-calendar-toolbar h2 { color:#111827; margin:0; font-size:2rem; }
.hub-calendar-toolbar p { color:#6b7280; margin:.2rem 0 0; }
.hub-toolbar-right { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
.hub-view-switch, .hub-date-nav { background:#f3f4f6; border-radius:999px; padding:.2rem; display:flex; gap:.2rem; }
.hub-view-switch a, .hub-date-nav a { padding:.55rem .9rem; border-radius:999px; color:#374151; text-decoration:none; }
.hub-view-switch a.is-active, .hub-date-nav a.today { background:#fff; color:#111827; box-shadow:0 1px 4px rgba(0,0,0,.08); }
.hub-month-weekdays, .hub-month-grid { display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); }
.hub-month-weekdays div { padding:.9rem 1rem; color:#475467; font-weight:600; border-bottom:1px solid rgba(0,0,0,.06); }
.hub-month-cell { min-height:135px; border-right:1px solid rgba(0,0,0,.06); border-bottom:1px solid rgba(0,0,0,.06); padding:.8rem; background:#fff; }
.hub-month-cell:nth-child(7n) { border-right:0; }
.hub-month-cell.is-muted { background:#fafafa; color:#9ca3af; }
.hub-month-cell.is-today { background:#f8fbff; }
.hub-cell-top { display:flex; justify-content:space-between; align-items:center; font-weight:700; color:#1f2937; margin-bottom:.6rem; }
.hub-cell-add { color:#9ca3af; font-size:1.1rem; }
.hub-cell-events { display:grid; gap:.35rem; }
.hub-event-pill, .hub-week-event, .hub-list-card { --event-color:#2f80ed; }
.hub-event-pill { display:flex; gap:.45rem; align-items:flex-start; min-width:0; font-size:.84rem; color:#111827; }
.hub-event-pill .dot { width:4px; min-width:4px; height:16px; border-radius:999px; background:var(--event-color); margin-top:.05rem; }
.hub-event-pill .copy { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hub-more-link { color:#6b7280; font-size:.84rem; text-decoration:none; }
.hub-week-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.hub-week-col { min-height:460px; border-right:1px solid rgba(0,0,0,.06); }
.hub-week-col:last-child { border-right:0; }
.hub-week-head { padding:1rem; border-bottom:1px solid rgba(0,0,0,.06); color:#111827; display:grid; gap:.15rem; }
.hub-week-head span { color:#6b7280; font-size:.92rem; }
.hub-week-events { padding:.8rem; display:grid; gap:.6rem; }
.hub-week-event { border-left:4px solid var(--event-color); background:#f8fafc; padding:.8rem; border-radius:12px; }
.hub-week-event strong { color:#111827; display:block; margin-bottom:.25rem; }
.hub-week-event small { color:#6b7280; }
.hub-day-list { padding:1rem; display:grid; gap:.9rem; }
.hub-list-card { border-left:4px solid var(--event-color); background:#fff; padding:1rem 1rem 1rem 1.1rem; display:grid; grid-template-columns:1.4fr 1fr; gap:1rem; border-bottom:1px solid rgba(0,0,0,.05); }
.hub-list-card:last-child { border-bottom:0; }
.hub-list-card h3, .hub-player-card h3, .hub-detail-card h3 { margin:0; color:#111827; }
.hub-list-card p, .hub-player-card p, .hub-detail-card p { color:#6b7280; margin:.3rem 0 0; }
.hub-year-grid { padding:1rem; display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:.9rem; }
.hub-year-card { background:#f8fafc; border:1px solid rgba(0,0,0,.06); border-radius:18px; padding:1rem; display:grid; gap:.35rem; color:#111827; text-decoration:none; }
.hub-year-card span { color:#6b7280; }
.hub-browser-panel {
    margin-top:1rem; background:linear-gradient(180deg, rgba(5, 16, 46, 0.86) 0%, rgba(6, 12, 28, 0.92) 100%); color:#eef4ff; border-radius:28px; border:1px solid rgba(255,255,255,.08); box-shadow:0 18px 50px rgba(0,0,0,.18); padding:1.2rem;
}
.hub-browser-head { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; margin-bottom:1rem; }
.hub-browser-head h2 { margin:0; color:#fff; }
.hub-browser-head p { margin:.35rem 0 0; color:rgba(229,238,255,.72); }
.hub-browser-stats { display:flex; gap:.65rem; flex-wrap:wrap; }
.hub-browser-stats span, .hub-league-pill {
    display:inline-flex; align-items:center; gap:.45rem; padding:.45rem .7rem; border-radius:999px; background:rgba(255,255,255,.08); color:#fff; border:1px solid rgba(255,255,255,.08); font-size:.82rem;
}
.hub-league-pill::before { content:''; width:8px; height:8px; border-radius:999px; background:var(--league-color, #8ab4ff); }
.hub-active-leagues { display:flex; gap:.55rem; flex-wrap:wrap; margin-bottom:1rem; }
.hub-browser-grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:.8rem; }
.hub-browser-card {
    display:grid; grid-template-columns:auto 1fr auto; gap:.75rem; align-items:center; padding:1rem; background:rgba(255,255,255,.06); color:#fff; text-decoration:none; border-radius:20px; border:1px solid rgba(255,255,255,.08);
}
.hub-browser-card strong { display:block; color:#fff; }
.hub-browser-card small { display:block; color:rgba(229,238,255,.7); margin-top:.15rem; }
.hub-browser-card em { font-style:normal; color:rgba(229,238,255,.78); font-size:.85rem; }
.hub-browser-card.is-active, .hub-browser-card:hover { background:rgba(110,168,255,.14); border-color:rgba(138,180,255,.34); }
.hub-empty { color:#94a3b8; margin:0; }
.hub-empty-large { padding:1rem 0; }
.hub-link-row { display:flex; gap:.8rem; flex-wrap:wrap; }
.hub-link-row a { color:#8ab4ff; }
.hub-inline-actions { display:flex; gap:.6rem; flex-wrap:wrap; }
.hub-player-meta { display:flex; gap:.6rem; flex-wrap:wrap; margin:.8rem 0; }
.hub-player-meta span { background:#f3f4f6; color:#374151; padding:.35rem .55rem; border-radius:999px; font-size:.82rem; }
.hub-team-drawer {
    position:fixed; inset:0; z-index:998; display:block;
}
.hub-team-drawer-panel {
    position:absolute; top:0; right:0; width:min(560px, 100vw); height:100%; background:#fff; box-shadow:-18px 0 60px rgba(0,0,0,.28); z-index:2; overflow:auto;
}
.hub-team-drawer-head { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; padding:1.25rem 1.25rem 1rem; border-bottom:1px solid rgba(0,0,0,.06); }
.hub-team-drawer-head h2 { margin:.7rem 0 .2rem; color:#111827; }
.hub-team-drawer-head p { margin:0; color:#6b7280; }
.hub-team-drawer-body { padding:1.1rem 1.25rem 1.4rem; display:grid; gap:1.1rem; }
.hub-drawer-meta { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:.8rem; }
.hub-drawer-meta div { background:#f8fafc; border-radius:18px; padding:.95rem; display:grid; gap:.25rem; }
.hub-drawer-meta strong { color:#111827; }
.hub-drawer-meta span, .hub-drawer-notes p { color:#6b7280; }
.hub-drawer-notes h3, .hub-drawer-section-head h3 { margin:0 0 .45rem; color:#111827; }
.hub-drawer-section-head { display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.hub-drawer-player-list { display:grid; gap:.8rem; }
.hub-drawer-player-card { background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:18px; padding:1rem; box-shadow:0 12px 30px rgba(0,0,0,.06); }
.hub-drawer-player-card h4 { margin:0; color:#111827; font-size:1.05rem; }
.hub-drawer-player-card p { color:#6b7280; margin:.3rem 0 0; }
.hub-modal { position:fixed; inset:0; z-index:999; display:none; }
.hub-modal.is-open { display:block; }
.hub-modal-backdrop { position:absolute; inset:0; background:rgba(10,15,28,.55); backdrop-filter:blur(6px); }
.hub-modal-dialog { position:relative; z-index:2; width:min(760px, calc(100vw - 2rem)); margin:4rem auto; background:#fff; border-radius:28px; box-shadow:0 25px 70px rgba(0,0,0,.25); overflow:hidden; }
.hub-modal-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1rem; border-bottom:1px solid rgba(0,0,0,.06); }
.hub-modal-tabs { display:flex; gap:.5rem; flex-wrap:wrap; }
.hub-modal-tab { background:#f3f4f6; border:0; border-radius:999px; padding:.6rem .9rem; cursor:pointer; }
.hub-modal-tab.is-active { background:#111827; color:#fff; }
.hub-close-modal { font-size:1.6rem; line-height:1; color:#6b7280; text-decoration:none; }
.hub-modal-body { padding:1rem; }
.hub-modal-form { display:none; gap:.8rem; }
.hub-modal-form.is-active { display:grid; }
.hub-modal-form h3 { color:#111827; margin:0 0 .2rem; }
.hub-modal-form input, .hub-modal-form select, .hub-modal-form textarea { width:100%; box-sizing:border-box; border:1px solid #d0d5dd; border-radius:14px; padding:.82rem .95rem; font:inherit; color:#111827; background:#fff; }
.hub-two-cols { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; }
@media (max-width: 1180px) {
    .hub-app-shell { grid-template-columns:1fr; }
    .hub-sidebar-panel { position:relative; height:auto; top:auto; }
    .hub-browser-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .hub-main-panel { padding:.8rem; }
    .hub-calendar-toolbar, .hub-sidebar-top, .hub-browser-head, .hub-list-card, .hub-drawer-section-head { grid-template-columns:1fr; display:grid; }
    .hub-toolbar-right, .hub-two-cols, .hub-week-grid, .hub-year-grid, .hub-drawer-meta, .hub-browser-grid { grid-template-columns:1fr; }
    .hub-month-weekdays { display:none; }
    .hub-month-grid { grid-template-columns:1fr; }
    .hub-month-cell { min-height:auto; }
    .hub-team-drawer-panel { width:100vw; }
}


/* Scouting Hub v4 browser refinements */
.hub-sidebar-note-card {
    background: linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.03) 100%);
}
.hub-sidebar-flow { display:grid; gap:.7rem; margin-top:.8rem; }
.hub-sidebar-flow div { display:grid; grid-template-columns:30px 1fr; gap:.65rem .8rem; align-items:center; }
.hub-sidebar-flow span {
    width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px;
    background:rgba(138,180,255,.16); color:#fff; border:1px solid rgba(138,180,255,.24); font-weight:700;
}
.hub-sidebar-flow strong { color:#fff; display:block; }
.hub-sidebar-flow small { color:rgba(229,238,255,.72); display:block; margin-top:.12rem; }
.hub-browser-columns { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:1rem; }
.hub-browser-column {
    background: rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.07); border-radius:24px; padding:1rem;
    min-height: 320px; backdrop-filter: blur(10px);
}
.hub-column-head { display:flex; align-items:center; justify-content:space-between; gap:.8rem; margin-bottom:.8rem; }
.hub-column-head h3 { margin:0; color:#fff; font-size:1rem; }
.hub-column-head span { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.08); color:#fff; border-radius:999px; padding:.35rem .65rem; font-size:.8rem; }
.hub-browser-stack { display:grid; gap:.75rem; max-height: 420px; overflow:auto; padding-right:.2rem; }
.hub-league-browser-card, .hub-player-browser-card { min-height: 84px; }
.hub-player-browser-card em { min-width:46px; text-align:right; }
.hub-player-drawer .hub-team-drawer-panel { width:min(520px, 100vw); }
.hub-drawer-meta-player { grid-template-columns:repeat(2, minmax(0,1fr)); }
@media (max-width: 1180px) {
    .hub-browser-columns { grid-template-columns:1fr; }
    .hub-browser-stack { max-height:none; }
}
