:root {
    --bc-light-bg: #f5f7fb;
    --bc-light-surface: #ffffff;
    --bc-light-surface-soft: #eef3fb;
    --bc-light-border: #c3cfdf;
    --bc-light-text: #142235;
    --bc-light-muted: #25384f;
    --bc-light-accent: #1e5fb8;
    --bc-light-accent-strong: #0f4d9b;
    --bc-light-focus: #b34700;
}

body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    color: var(--bc-light-text);
    background-color: var(--bc-light-bg);
    background-image: linear-gradient(160deg, #fbfdff 0%, #f0f5fc 52%, #e8eef7 100%);
    min-height: 100vh;
    line-height: 1.6;
}

a,
a:visited {
    color: var(--bc-light-accent);
}

a:hover,
a:focus {
    color: var(--bc-light-accent-strong);
}

.bc-header {
    background: linear-gradient(140deg, #183f76, #2a5ea2);
    border-bottom: 2px solid rgba(20, 34, 53, 0.16);
}

.bc-owner-label,
.bc-season {
    color: rgba(255, 255, 255, 0.9) !important;
}

.bc-team-title {
    color: #f5f9ff !important;
}

.bc-header .text-white {
    color: #f5f9ff !important;
}

.bc-header .text-white-50 {
    color: #d9e6ff !important;
}

main {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(20, 34, 53, 0.12);
}

.card {
    background-color: var(--bc-light-surface);
    border: 1px solid var(--bc-light-border);
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(20, 34, 53, 0.08);
}

.card-header {
    background-color: #e6edf8;
    border-bottom: 1px solid var(--bc-light-border);
    color: #24384f !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

main h1,
main h2,
main h3,
main .h1,
main .h2,
main .h3,
main .display-4 {
    color: #162b43 !important;
}

main .card-header,
main .card-header.text-white-50,
main .card-header.small,
main .card-header.text-uppercase {
    color: #1b324a !important;
    background-color: #e6edf8 !important;
}

.card-body,
label,
.label,
.table,
.table thead th,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--bc-light-text);
}

.text-white,
.text-white-50 {
    color: var(--bc-light-text) !important;
}

main .text-white {
    color: #172b42 !important;
}

.text-white-50 {
    opacity: 1 !important;
    color: #25384f !important;
}

main .text-white-50,
main .lead.text-white-50,
main .card-title.text-white-50 {
    color: #24384f !important;
}

.form-label,
.form-label.text-uppercase,
.form-label.small,
.field-label,
.Field-Label,
.small,
small,
.text-muted,
.form-text {
    color: #22364c !important;
    opacity: 1 !important;
}

.card-title,
.section-heading,
.standings-header .season-label,
.standings-header .week-label,
.login-last-stats,
.login-notice {
    color: #1f3147 !important;
}

.bc-landing-title {
    color: #162b43 !important;
}

.bc-landing-subtitle {
    color: #24384f !important;
}

label,
.label,
th,
thead,
tfoot,
.card-header {
    color: #1f3147 !important;
}

/* Keep table-dark grid headers/cells readable in light mode pages (e.g., Weekly Results matrix). */
main .table.table-dark,
main .table.table-dark thead,
main .table.table-dark tfoot,
main .table.table-dark th,
main .table.table-dark td,
main .table-dark th,
main .table-dark td {
    color: #eef4ff !important;
}

main .table.table-dark td.bc-matrix-losses-row,
main .table.table-dark th.bc-matrix-losses-row,
main .table-dark td.bc-matrix-losses-row,
main .table-dark th.bc-matrix-losses-row {
    background-color: #dbe4f2 !important;
    color: #142235 !important;
}

input::placeholder,
textarea::placeholder {
    color: #3a4d66;
    opacity: 1;
}

.btn-outline-light,
.MenuButton {
    color: var(--bc-light-text);
    border-color: #5679ad;
    background-color: #f9fbff;
}

.btn-outline-light:hover,
.btn-outline-light:focus,
.MenuButton:hover,
.MenuButton:focus {
    color: #ffffff;
    background-color: var(--bc-light-accent);
    border-color: var(--bc-light-accent);
    box-shadow: 0 8px 16px rgba(30, 95, 184, 0.22);
}

.bc-alert {
    background-color: #ecf4ff;
    color: var(--bc-light-text);
    border: 1px solid #b2c7e3;
}

.bc-alert.alert-danger {
    background-color: #fdeeee;
    color: #7c1f1f;
    border: 1px solid #e6b4b4;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea,
.form-control,
.form-select,
.bc-input,
.bg-dark {
    background-color: var(--bc-light-surface) !important;
    border: 1px solid var(--bc-light-border) !important;
    color: var(--bc-light-text) !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus,
.bc-input:focus {
    outline: none;
    border-color: var(--bc-light-accent) !important;
    box-shadow: 0 0 0 3px rgba(30, 95, 184, 0.2) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--bc-light-muted);
}

.form-check-input {
    border-color: #5a7296;
    background-color: #ffffff;
}

.form-check-input:checked {
    background-color: #0f4d9b;
    border-color: #0f4d9b;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(179, 71, 0, 0.25);
}

.border-light,
.border-light-subtle,
.border-top.border-light {
    border-color: var(--bc-light-border) !important;
}

.table-warning,
.bg-warning {
    background-color: #ffe8ad !important;
    color: #3c2b00 !important;
}

.DataGrid {
    background: var(--bc-light-surface);
    color: var(--bc-light-text);
    border: 1px solid var(--bc-light-border);
}

.DataGrid tr:nth-child(odd) td {
    background-color: #ffffff;
}

.DataGrid tr:nth-child(even) td {
    background-color: var(--bc-light-surface-soft);
}

.DataGrid table,
.DataGrid tr,
.DataGrid td {
    border-color: #d0dceb;
}

.DataGridHeader,
.DataGridHeader th {
    background: #d8e6fa !important;
    color: #15325a !important;
}

.AltDataGridHeader {
    background: #f9e4b2 !important;
    color: #3c2b00 !important;
}

footer.bc-footer {
    background: #eff3f8;
    border-top: 1px solid var(--bc-light-border);
    color: var(--bc-light-muted);
}

/* Lineup page: ASP Label controls render as spans, so target page-specific classes directly. */
main .lineup-label,
main .lineup-column__title,
main .lineup-column__subtitle,
main .PageTitle {
    color: #1f3147 !important;
}

main .lineup-toolbar__link,
main .lineup-toolbar__link:link,
main .lineup-toolbar__link:visited {
    color: #1e5fb8 !important;
}

main .lineup-toolbar__link:hover,
main .lineup-toolbar__link:focus {
    color: #0f4d9b !important;
}

main .lineup-draft #Label44,
main .lineup-draft #Label45 {
    color: #1f3147 !important;
    font-weight: 700;
}

main .lineup-draft .DataGrid a,
main .lineup-draft .DataGrid a:link,
main .lineup-draft .DataGrid a:visited,
main .lineup-draft .lineup-freeagents a,
main .lineup-draft .lineup-freeagents a:link,
main .lineup-draft .lineup-freeagents a:visited {
    color: #1f3147 !important;
}

main .lineup-draft .DataGrid a:hover,
main .lineup-draft .DataGrid a:focus,
main .lineup-draft .lineup-freeagents a:hover,
main .lineup-draft .lineup-freeagents a:focus {
    color: #0f4d9b !important;
}
