:root {
    color-scheme: light dark;
    --bg: #f2f6fa;
    --surface: #ffffff;
    --surface-subtle: #f8fafc;
    --surface-row: #fafcfe;
    --surface-hover: #f1f5f9;
    --input-bg: #ffffff;
    --border: #d8e2ec;
    --border-subtle: #e5edf5;
    --text: #102a43;
    --muted: #52677d;
    --topbar-bg: #0b3554;
    --login-bg: linear-gradient(160deg, #0b3554 0%, #0f5c8e 60%, #1c7aa6 100%);
    --login-brand: #0b3554;
    --accent: #0f5c8e;
    --accent-hover: #0a4267;
    --link: #0f5c8e;
    --accent-soft: #e6f2fa;
    --accent-soft-text: #0a4267;
    --accent-soft-border: #bdd9ee;
    --accent-soft-hover: #d5e9f7;
    --focus-ring: rgba(15, 92, 142, 0.16);
    --success-bg: #e7f6ec;
    --success-text: #166534;
    --success-border: #bbf7d0;
    --warn-bg: #fffbeb;
    --warn-text: #92400e;
    --warn-border: #f59e0b;
    --warn-badge-bg: #fef3c7;
    --warn-shadow: rgba(180, 83, 9, 0.16);
    --error-bg: #fdecec;
    --error-text: #991b1b;
    --error-border: #fecaca;
    --danger: #b91c1c;
    --danger-border: #f3c4c4;
    --team-card-bg: #ffffff;
    --team-metrics-bg: #f8fafc;
    --team-item-bg: #fbfdff;
    --team-black-header: #18181b;
    --team-white-divider: rgba(16, 42, 67, 0.1);
    --dot-black-border: transparent;
    --move-black-border: #18181b;
    --cal-outside: #9fb3c8;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(16, 42, 67, 0.06);
    --popover-shadow: 0 10px 28px rgba(16, 42, 67, 0.16);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #131b26;
        --surface: #1b2635;
        --surface-subtle: #192331;
        --surface-row: #222f40;
        --surface-hover: #28374b;
        --input-bg: #15202e;
        --border: #34465e;
        --border-subtle: #2e3f55;
        --text: #e9eff6;
        --muted: #94a7bd;
        --topbar-bg: #081c2e;
        --login-bg: linear-gradient(160deg, #071524 0%, #0d2236 60%, #13304a 100%);
        --login-brand: #ffffff;
        --accent: #2c8bc9;
        --accent-hover: #3b9bd8;
        --link: #56b4e9;
        --accent-soft: #173b59;
        --accent-soft-text: #bae6fd;
        --accent-soft-border: #275b85;
        --accent-soft-hover: #1e4b70;
        --focus-ring: rgba(86, 180, 233, 0.28);
        --success-bg: #123826;
        --success-text: #86efac;
        --success-border: #1e5b3d;
        --warn-bg: #2e2412;
        --warn-text: #fcd34d;
        --warn-border: #d97706;
        --warn-badge-bg: #3b2d14;
        --warn-shadow: rgba(0, 0, 0, 0.45);
        --error-bg: #3b171b;
        --error-text: #fca5a5;
        --error-border: #7f1d1d;
        --danger: #f87171;
        --danger-border: #7f2930;
        --team-card-bg: #212e40;
        --team-metrics-bg: #192331;
        --team-item-bg: #28374b;
        --team-black-header: #090a0c;
        --team-white-divider: transparent;
        --dot-black-border: #64748b;
        --move-black-border: #475569;
        --cal-outside: #5c7089;
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
        --popover-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    }
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    margin: 0;
    line-height: 1.25;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.05rem; }

p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.main-content {
    padding-top: 24px;
    padding-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.hidden { display: none !important; }
.inline-form { display: inline; margin: 0; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.stack-md { display: flex; flex-direction: column; gap: 18px; }

/* Topbar */
.topbar {
    background: var(--topbar-bg);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-inner {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}
.brand:hover { text-decoration: none; }

.brand-mark {
    width: 34px;
    height: 34px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-mark-lg {
    width: 56px;
    height: 56px;
    color: var(--login-brand);
    margin: 0 auto 10px;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.94rem;
}
.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar .btn-ghost {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.25);
}
.topbar .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
}

.role-badge {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 8px;
    border-radius: 999px;
}
.role-coach { background: #f59e0b; color: #1c1917; }
.role-player { background: #38bdf8; color: #082f49; }

/* Cards & Headers */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

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

.back-link {
    display: inline-block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--link);
    margin-bottom: 2px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.94rem;
}
.alert-success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.alert-error { background: var(--error-bg); color: var(--error-text); border: 1px solid var(--error-border); }

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 9px;
    font-size: 0.94rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary { background: var(--accent-soft); color: var(--accent-soft-text); border-color: var(--accent-soft-border); }
.btn-secondary:hover { background: var(--accent-soft-hover); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-hover); }

.btn-danger-ghost { background: transparent; color: var(--danger); border-color: var(--danger-border); }
.btn-danger-ghost:hover { background: var(--error-bg); }

.btn-sm { padding: 6px 11px; font-size: 0.85rem; border-radius: 7px; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-block { width: 100%; }

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="search"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--input-bg);
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
    font-variant-numeric: tabular-nums;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.input-compact {
    padding: 7px 10px !important;
    font-size: 0.9rem !important;
}

/* Login */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--login-bg);
}

.login-wrapper { width: 100%; max-width: 400px; }
.login-card { padding: 28px; }
.login-header { text-align: center; margin-bottom: 20px; }
.login-header h1 { font-size: 1.4rem; margin-bottom: 4px; }

.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border: 0;
    padding: 0;
    margin: 0;
}

.role-option {
    position: relative;
    cursor: pointer;
}
.role-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.role-option span {
    display: block;
    text-align: center;
    padding: 10px 8px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--muted);
    background: var(--surface-subtle);
    transition: all 0.15s ease;
}
.role-option input:checked + span {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-soft-text);
}

/* Players page */
.sort-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pill {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--surface);
}
.pill-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.add-player-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.field-rating { max-width: 130px; min-width: 100px; }
.field-action { display: flex; }

.player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-row);
    flex-wrap: wrap;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.player-row.is-dirty {
    border-color: var(--warn-border);
    background: var(--warn-bg);
}

.input-dirty {
    border-color: var(--warn-border) !important;
    background: var(--input-bg);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.bulk-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-subtle);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bulk-save-bar.has-dirty {
    position: sticky;
    bottom: 12px;
    z-index: 10;
    border-color: var(--warn-border);
    background: var(--warn-bg);
    box-shadow: 0 6px 18px var(--warn-shadow);
}

.bulk-save-bar.has-dirty #dirty-summary {
    color: var(--warn-text);
    font-weight: 600;
}

.player-edit-fields {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 220px;
}

.input-player-name {
    flex: 1;
    min-width: 0;
}

.rating-input-wrap {
    display: inline-flex;
    align-items: stretch;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rating-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.rating-input-wrap.rating-wrap-dirty {
    border-color: var(--warn-border);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.input-rating {
    width: 54px !important;
    text-align: center;
    font-weight: 600;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 7px 6px !important;
    background: transparent !important;
}

.input-rating:focus {
    box-shadow: none !important;
    border-color: transparent !important;
}

.rating-suffix {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
    background: var(--surface-hover);
    border-left: 1px solid var(--border);
    user-select: none;
}

.player-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.archived-section { opacity: 0.92; }
.archived-info { display: flex; align-items: center; gap: 10px; }

.rating-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent-soft-text);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Training Builder */
.session-meta-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
}

.date-field {
    position: relative;
}

.date-input-group {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.date-picker-btn {
    flex-shrink: 0;
    padding: 0 11px;
    color: var(--muted);
}
.date-picker-btn:hover {
    color: var(--link);
}

.calendar-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    width: 268px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--popover-shadow);
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cal-title {
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--text);
}

.cal-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cal-nav-btn:hover { background: var(--surface-hover); }

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

.cal-weekday {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
    padding: 4px 0;
}

.cal-day {
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.cal-day:hover { background: var(--accent-soft); color: var(--accent-soft-text); }
.cal-day-outside { color: var(--cal-outside); }
.cal-day-today {
    font-weight: 700;
    color: var(--link);
    box-shadow: inset 0 0 0 1.5px var(--link);
}
.cal-day-selected,
.cal-day-selected:hover {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    box-shadow: none;
}

.cal-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.attendance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.attendance-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attendance-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.attendance-controls input[type="search"] { width: 190px; }

.count-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent-soft-text);
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 8px;
}

.attendance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface-row);
    cursor: pointer;
    user-select: none;
    transition: all 0.12s ease;
    text-align: left;
    font: inherit;
    color: inherit;
}
.attendance-card:hover { border-color: var(--accent); }
.attendance-card.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent);
}
.attendance-card-name {
    font-weight: 600;
    font-size: 0.93rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.generate-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.teams-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.spread-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--success-bg);
    color: var(--success-text);
}
.spread-badge.spread-medium { background: var(--warn-badge-bg); color: var(--warn-text); }
.spread-badge.spread-high { background: var(--error-bg); color: var(--error-text); }

/* 3 Team Columns */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.team-card {
    border-radius: 12px;
    border: 1.5px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--team-card-bg);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.team-card.drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.team-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    font-weight: 700;
}

/* Keep Blancs strictly white even in dark mode so team colors stay consistent */
.team-white .team-card-header {
    background: #ffffff;
    color: #0f172a;
    box-shadow: inset 0 -1px 0 var(--team-white-divider);
}
.team-black .team-card-header {
    background: var(--team-black-header);
    color: #ffffff;
}
.team-red .team-card-header {
    background: #c81e1e;
    color: #ffffff;
}

.team-count {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}
.team-white .team-count {
    background: #e2e8f0;
    color: #0f172a;
}

.team-metrics {
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--team-metrics-bg);
    border-bottom: 1px solid var(--border);
}

.team-player-list {
    list-style: none;
    margin: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 120px;
}
.readonly-list { min-height: auto; }

.team-player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--team-item-bg);
}
.team-player-item.draggable { cursor: grab; }
.team-player-item.draggable:active { cursor: grabbing; }

.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.player-name {
    font-weight: 600;
    font-size: 0.94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.move-controls {
    display: inline-flex;
    gap: 4px;
    flex-shrink: 0;
}

.move-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid var(--border);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.move-btn-white { background: #ffffff; color: #0f172a; border-color: #94a3b8; }
.move-btn-black { background: var(--team-black-header); color: #ffffff; border-color: var(--move-black-border); }
.move-btn-red { background: #c81e1e; color: #ffffff; border-color: #c81e1e; }
.move-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.save-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
}

/* History */
.session-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-row);
    color: var(--text);
    flex-wrap: wrap;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.history-item:hover {
    text-decoration: none;
    border-color: var(--accent);
    background: var(--surface-hover);
}

.history-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-counts {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 4px;
}
.dot-white { background: #fff; border: 1.5px solid #64748b; }
.dot-black { background: var(--team-black-header); border: 1px solid var(--dot-black-border); }
.dot-red { background: #c81e1e; }

.empty-state {
    text-align: center;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

@media (max-width: 860px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }
    .session-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* Prevent iOS Safari auto-zoom on input focus (triggers whenever font-size < 16px) */
@media (max-width: 768px), (pointer: coarse) {
    input[type="text"],
    input[type="number"],
    input[type="password"],
    input[type="date"],
    input[type="search"],
    .input-compact {
        font-size: 16px !important;
    }
    .input-rating {
        width: 58px !important;
    }
}

@media (max-width: 600px) {
    .card { padding: 15px; }
    .attendance-grid { grid-template-columns: 1fr 1fr; }
    .attendance-controls input[type="search"] { width: 100%; }
    .save-bar .btn { width: 100%; }
}
