@import url('account-menu.css');
@import url('dialog-controls.css');
:root { color-scheme: dark; --panel: #161b22; --border: #30363d; --muted: #a4afbc; }
* { box-sizing: border-box; }
body { margin: 0; background: #0d1117; color: #e6edf3; font: 16px/1.5 'Segoe UI', system-ui, sans-serif; }
a { color: #79b8ff; }
button, input, select, textarea { font: inherit; }
button, .action-link { border: 1px solid #485364; background: #21262d; color: #e6edf3; border-radius: 6px; padding: .55rem .8rem; cursor: pointer; text-decoration: none; min-height: 42px; }
button:hover, .action-link:hover { background: #303b49; }
button:disabled { cursor: wait; opacity: .6; }
.primary { background: #238636; }
.danger { color: #ffaaaa; }
input, select, textarea { width: 100%; padding: .6rem; border: 1px solid #485364; border-radius: 6px; background: #0d1117; color: #e6edf3; }
textarea { min-height: 100px; resize: vertical; }
label { display: block; margin-bottom: .35rem; }
input[type="checkbox"] { width: auto; }
input:invalid:not(:placeholder-shown) { border-color: #a46d6d; }
:focus-visible { outline: 3px solid #79b8ff; outline-offset: 2px; }
.module-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.2rem; border-bottom: 1px solid var(--border); background: var(--panel); }
.module-header a { text-decoration: none; }
.module-header strong { font-size: 1.15rem; }
main { max-width: 1200px; margin: 1.5rem auto; padding: 0 1rem 3rem; }
h1 { font-size: 1.65rem; margin: .4rem 0 1rem; }
#page-title .record-icon { vertical-align: middle; margin-left: .35rem; }
h2 { font-size: 1.25rem; }
.muted { color: var(--muted); }
.list-status { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.list-progress:not([hidden]) { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; }
.progress-spinner { width: 1rem; height: 1rem; border: 2px solid var(--border); border-top-color: #79b8ff; border-radius: 50%; animation: management-progress .8s linear infinite; }
@keyframes management-progress { to { transform: rotate(360deg); } }
dialog.scheduler-working { overflow: hidden; }
.scheduler-busy:not([hidden]) { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 2rem; background: #161b22ed; cursor: wait; }
.scheduler-busy .progress-spinner { flex-shrink: 0; width: 1.5rem; height: 1.5rem; }
@media (prefers-reduced-motion: reduce) { .progress-spinner { animation: none; } }
.notice { border: 1px solid #79662f; background: #302b1a; padding: .8rem; border-radius: 6px; margin-bottom: 1rem; }
.error { background: #371e25; border-color: #bd6262; }
.success { background: #19351e; border-color: #4b985e; }
.cards, .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.card { padding: 1.25rem; border: 1px solid var(--border); background: var(--panel); border-radius: 8px; }
.card h2 { margin-top: 0; }
.report-summary, .report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.report-stat { border-top: 3px solid #79b8ff; }
.report-stat h3, .report-category h3 { margin: 0; }
.report-value { font-size: 2rem; font-weight: 700; margin: .4rem 0 0; }
.report-active { color: #7ee787; }
.report-historical { border-top-color: #a4afbc; }
.report-counts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .9rem; margin-top: .5rem; }
.report-category meter { width: 100%; height: 1rem; accent-color: #3fb950; }
.accounts-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.accounts-heading h2 { margin: .5rem 0; }
.tabs, .toolbar, .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; align-items: center; }
.toolbar > .filter-row-break { flex-basis: 100%; height: 0; }
.tabs a { text-decoration: none; padding: .5rem .75rem; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { border-color: #79b8ff; color: #fff; }
.paging, .page-numbers { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; max-width: 100%; }
.paging a { padding: .5rem .8rem; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; min-height: 42px; }
.paging [aria-current="page"], #paging [aria-current="page"] { background: #244263; border-color: #79b8ff; color: #fff; }
.toolbar input:not([type="checkbox"]) { flex: 1; min-width: 160px; }
.toolbar label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; max-width: 100%; }
.toolbar select { width: auto; max-width: 100%; }
.toolbar label select { min-width: 0; flex: 1; }
.records { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; margin: 1rem 0; }
.calendar-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; padding: .75rem; }
#schedule-calendar { min-width: 680px; --fc-page-bg-color: #161b22; --fc-neutral-bg-color: #21262d; --fc-border-color: #30363d; --fc-today-bg-color: #24426355; --fc-event-bg-color: #245a91; --fc-event-border-color: #79b8ff; --fc-event-text-color: #fff; }
#schedule-calendar .fc-toolbar { flex-wrap: wrap; gap: .5rem; }
#schedule-calendar .fc-toolbar-title { font-size: 1.2rem; }
#schedule-calendar .fc-event { cursor: pointer; }
#schedule-calendar .fc-daygrid-event { white-space: normal; }
.record { border: 1px solid var(--border); border-radius: 6px; padding: 1rem; background: var(--panel); }
.competition-group { min-width: 0; display: grid; gap: .75rem; }
.competition-group > h2, .competition-group > h3, .competition-group > h4 { margin: .5rem 0 0; overflow-wrap: anywhere; }
.competition-group > .competition-group { border-left: 2px solid var(--border); padding-left: .75rem; }
.record-title { font-weight: 600; overflow-wrap: anywhere; }
dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .25rem .75rem; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.timestamps { color: var(--muted); font-size: .8rem; margin: .5rem 0; }
.event-id { color: var(--muted); font-size: .8rem; font-weight: normal; white-space: nowrap; }
.record .actions { margin-bottom: 0; }
.record-footer { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .25rem; margin-top: .5rem; align-self: end; }
.record-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; min-height: 42px; padding: .6rem; border: 0; border-radius: 6px; background: transparent; color: #b6d7ff; text-decoration: none; }
.record-icon:hover { background: #303b49; color: #d5e8ff; }
.record-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.league-record { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.location-record { grid-template-columns: minmax(0, 1fr); }
.location-record .people-table td { min-width: 0; }
.league-seasons { min-width: 0; }
.league-seasons h3 { margin-top: 0; }
.club-fields-heading { display: flex; align-items: center; gap: .35rem; }
.club-team-group { border: 1px solid var(--border); border-radius: 6px; margin-bottom: .5rem; }
.club-team-group > summary { padding: .65rem .75rem; cursor: pointer; font-weight: 600; }
.event-table-link { padding: .2rem; min-height: 0; border: 0; background: transparent; }
.roster-table input:not([type="checkbox"]) { min-width: 7rem; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.people-table { width: 100%; border-collapse: collapse; background: var(--panel); text-align: left; }
.people-table caption { text-align: left; font-weight: 600; padding-bottom: .5rem; }
.people-table th, .people-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.people-table thead { background: #21262d; }
.people-table tbody th { font-weight: 500; }
.people-table td { overflow-wrap: anywhere; min-width: 110px; }
.people-table .actions { margin: 0; flex-wrap: nowrap; width: max-content; gap: .25rem; }
.people-table .record-icon { flex-shrink: 0; }
.standings-table th, .standings-table td { white-space: nowrap; }
.standings-ranking-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; cursor: pointer; }
.standings-ranking-toggle input { appearance: none; flex-shrink: 0; width: 2.75rem; height: 1.5rem; padding: 0; margin: 0; border-radius: 1rem; background: #485364; cursor: pointer; }
.standings-ranking-toggle input::before { content: ''; display: block; width: 1rem; height: 1rem; margin: .1875rem; border-radius: 50%; background: #fff; }
.standings-ranking-toggle input:checked { background: #238636; }
.standings-ranking-toggle input:checked::before { transform: translateX(1.25rem); }
.standings-table td { min-width: 0; overflow-wrap: normal; }
.standings-table th:nth-child(2), .standings-table td:nth-child(2) { min-width: 14rem; }
dialog { width: min(760px, calc(100% - 1rem)); max-height: 90dvh; padding: 1.25rem; background: #161b22; color: #e6edf3; border: 1px solid #485364; border-radius: 8px; }
dialog::backdrop { background: #000a; }
.form-field { margin-bottom: 1rem; }
.monthday-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.monthday-field legend { padding: 0; margin-bottom: .35rem; }
.monthday-choices { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .5rem; }
.full { grid-column: 1 / -1; }
.repeat-settings { min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 1rem; }
.auth-main { max-width: 600px; }
.badge { display: inline-block; padding: .1rem .45rem; border-radius: 4px; background: #303b49; margin-left: .5rem; }
[hidden] { display: none !important; }
@media (max-width: 600px) { .module-header { padding: .6rem; } .module-header strong { font-size: 1rem; } main { margin-top: 1rem; } }
@media (max-width: 800px) { .league-record { grid-template-columns: minmax(0, 1fr); } }
.person-portrait { display: block; width: 140px; height: 180px; object-fit: contain; border: 1px solid #485364; border-radius: 6px; margin-bottom: 1rem; }
.roster-portrait { width: 44px; height: 56px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: .5rem; }
