﻿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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ==========================================================================
   LASA design tokens — navy + crimson sports-club palette
   (colors/fonts adapted from a baseball club site reference; DevExpress
   Fluent theme underneath is repainted via .btn-primary etc. overrides below)
   ========================================================================== */
:root {
    /* Structural navy (header, headings, footers) */
    --lasa-primary: #17225c;
    --lasa-primary-dark: #0f1740;
    --lasa-primary-darker: #0a0f2c;
    --lasa-primary-light: #e8eaf4;
    --lasa-primary-soft: #ccd1e8;
    /* Crimson accent (CTAs, active states) — matches theme's own btn-danger red */
    --lasa-accent: #d31222;
    --lasa-accent-dark: #a90e1b;
    --lasa-accent-light: #fce8ea;
    --lasa-bg: #f4f5fa;
    --lasa-surface: #ffffff;
    --lasa-border: #e1e3ee;
    --lasa-text: #1b2033;
    --lasa-text-muted: #666c84;
    --lasa-success: #157f3c;
    --lasa-warning: #b7791f;
    --lasa-danger: #d31222;
    --lasa-radius: 10px;
    --lasa-radius-sm: 6px;
    --lasa-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --lasa-shadow-md: 0 6px 20px rgba(23, 34, 92, 0.12);
    --lasa-shadow-lg: 0 20px 50px rgba(10, 15, 44, 0.28);
    --lasa-font-heading: 'Oswald', 'Segoe UI', sans-serif;
    --lasa-font-body: 'Poppins', 'Segoe UI', sans-serif;
    /* DevExpress Fluent's official accent-color override hook (see accents/blue.min.css:
       every --dxds-primary-NN token resolves as var(--dxbl-accent-color-NN, <blue-default>)).
       Defining the full 17-step scale here repaints every *natively*-rendered Fluent
       surface — ComboBox/ListBox popups, calendar selection, focus rings, checkboxes —
       from the theme's default blue to the crimson accent, not just DxButton/.btn-primary
       (which are repainted separately below via their own dxbl-btn-primary/bs vars).
       Scale generated by matching the blue scale's lightness steps onto our accent hue,
       anchored so stop 90 (the "base" primary DevExpress components reference) is exactly
       --lasa-accent. */
    --dxbl-accent-color-10: #fffafb;
    --dxbl-accent-color-20: #fce0e2;
    --dxbl-accent-color-30: #fac5c9;
    --dxbl-accent-color-40: #f8aab1;
    --dxbl-accent-color-50: #f58e96;
    --dxbl-accent-color-60: #f36f7a;
    --dxbl-accent-color-70: #f04e5c;
    --dxbl-accent-color-80: #ec2333;
    --dxbl-accent-color-90: var(--lasa-accent);
    --dxbl-accent-color-100: #c51120;
    --dxbl-accent-color-110: var(--lasa-accent-dark);
    --dxbl-accent-color-120: #940d18;
    --dxbl-accent-color-130: #7f0b14;
    --dxbl-accent-color-140: #690911;
    --dxbl-accent-color-150: #56070e;
    --dxbl-accent-color-160: #42060b;
    --dxbl-accent-color-170: #310408;
}

body {
    background: var(--lasa-bg);
    color: var(--lasa-text);
    font-family: var(--lasa-font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--lasa-primary);
    text-underline-offset: 2px;
}

    a:hover {
        color: var(--lasa-accent);
    }

/* Plain links and buttons only: DevExpress editors and buttons draw their own focus ring. */
a:focus-visible,
button:not(.dxbl-btn):focus-visible {
    outline: 2px solid var(--lasa-accent);
    outline-offset: 2px;
}

h1, h2, h3, h4,
.page-header h1,
.page-card__title,
.app-shell__brand,
.login-card h1 {
    font-family: var(--lasa-font-heading);
}

/* Repaint DevExpress' "primary" buttons (DxButton RenderStyle.Primary, and the grid's
   built-in New/Edit/Save command buttons) from theme blue to the crimson accent.
   DxButton in the Fluent theme renders <button class="dxbl-btn dxbl-btn-primary">,
   not Bootstrap's ".btn-primary" — both are covered here since some contexts still
   render plain Bootstrap markup. */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--lasa-accent);
    --bs-btn-border-color: var(--lasa-accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--lasa-accent-dark);
    --bs-btn-hover-border-color: var(--lasa-accent-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--lasa-accent-dark);
    --bs-btn-active-border-color: var(--lasa-accent-dark);
    --bs-btn-disabled-bg: var(--lasa-accent);
    --bs-btn-disabled-border-color: var(--lasa-accent);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.dxbl-btn-primary {
    --dxbl-btn-primary-bg: var(--lasa-accent);
    --dxbl-btn-primary-hover-bg: var(--lasa-accent-dark);
    --dxbl-btn-primary-active-bg: var(--lasa-accent-dark);
    --dxbl-btn-primary-border-color: var(--lasa-accent);
    --dxbl-btn-primary-hover-border-color: var(--lasa-accent-dark);
    --dxbl-btn-primary-active-border-color: var(--lasa-accent-dark);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   App shell
   ========================================================================== */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-shell__topbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.6rem 1.75rem;
    background: var(--lasa-primary);
    color: #fff;
    box-shadow: var(--lasa-shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-shell__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.3rem;
    color: #fff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-shell__brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #fff;
    padding: 3px;
    object-fit: contain;
    box-shadow: var(--lasa-shadow-sm);
}

.app-shell__season-picker {
    width: 220px;
}

.app-shell__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    flex-wrap: wrap;
}

    .app-shell__nav > a {
        color: rgba(255, 255, 255, 0.78);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.92rem;
        padding: 0.45rem 0.75rem;
        border-radius: var(--lasa-radius-sm);
        transition: background-color 0.15s ease, color 0.15s ease;
    }

        .app-shell__nav > a:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

    .app-shell__nav a.active {
        color: #fff;
        background: var(--lasa-accent);
    }

.nav-group {
    position: relative;
}

.nav-group__label {
    cursor: default;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--lasa-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .nav-group__label::after {
        content: "";
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid currentColor;
        opacity: 0.6;
        margin-left: 0.15rem;
    }

.nav-group:hover .nav-group__label {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-group__menu {
    display: none;
    position: absolute;
    /* top:100% with zero margin — no dead zone between the label and the menu.
       A margin/gap here used to let the pointer leave both elements while moving
       from the label down into the menu, which dropped :hover and closed the
       menu before a click on a subitem could land. The visual "gap" look is
       recreated with padding-top instead, which is still inside this element's
       own hoverable box. */
    top: 100%;
    left: 0;
    padding-top: 0.4rem;
    min-width: 210px;
    z-index: 10;
    flex-direction: column;
}

.nav-group:hover .nav-group__menu {
    display: flex;
}

.nav-group__menu-panel {
    background: var(--lasa-surface);
    border: 1px solid var(--lasa-border);
    border-radius: var(--lasa-radius);
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--lasa-shadow-lg);
}

.nav-group__menu a {
    color: var(--lasa-text);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    border-radius: var(--lasa-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

    .nav-group__menu a:hover,
    .nav-group__menu a.active {
        background: var(--lasa-primary-light);
        color: var(--lasa-primary-darker);
    }

.app-shell__account {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Account menu (user name → My Profile / Logout): same hover dropdown as the nav groups,
   but anchored to the right edge so it doesn't overflow the viewport. */
.nav-group--account .nav-group__label {
    white-space: nowrap;
}

.nav-group--account .nav-group__menu {
    left: auto;
    right: 0;
    min-width: 170px;
}

.nav-group--account form {
    display: contents;
}

.nav-group__item {
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--lasa-text);
    font-family: inherit;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    border-radius: var(--lasa-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

    .nav-group__item:hover {
        background: var(--lasa-primary-light);
        color: var(--lasa-primary-darker);
    }

/* Password strength meter in the My Profile dialog. */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.password-strength__bar {
    flex: 1;
}

.password-strength__label {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 6rem;
    text-align: right;
}

.password-strength__label--weak {
    color: var(--lasa-danger);
}

.password-strength__label--fair {
    color: var(--lasa-warning);
}

.password-strength__label--good {
    color: var(--lasa-primary);
}

.password-strength__label--strong {
    color: var(--lasa-success);
}

.password-strength__mismatch {
    color: var(--lasa-danger);
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.app-shell__body {
    flex: 1;
    padding: 1.75rem;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   Page / card layout
   ========================================================================== */
.page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

    .page-header h1 {
        font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
        line-height: 1.2;
        font-weight: 600;
        color: var(--lasa-primary);
        text-transform: uppercase;
        letter-spacing: 0.03em;
        margin: 0;
        padding-left: 0.85rem;
        border-left: 5px solid var(--lasa-accent);
    }

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.page-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--lasa-surface);
    border: 1px solid var(--lasa-border);
    border-radius: var(--lasa-radius);
    padding: 0.85rem 1.1rem;
    box-shadow: var(--lasa-shadow-sm);
}

/* A labelled control in a toolbar: the label styled like the form captions. */
.toolbar-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-field__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--lasa-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Pushes the toolbar's last item (e.g. an action button) to the right edge. */
.page-toolbar__end {
    margin-left: auto;
}

.page-card {
    background: var(--lasa-surface);
    border: 1px solid var(--lasa-border);
    border-radius: var(--lasa-radius);
    padding: 1.25rem;
    box-shadow: var(--lasa-shadow-sm);
}

.page-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--lasa-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--lasa-accent);
}

/* A heading inside a card, below .page-card__title (e.g. Batting / Pitching on Game Result). */
.page-card__subtitle {
    font-family: var(--lasa-font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lasa-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 1.25rem 0 0.6rem;
}

    .page-card__title + .page-card__subtitle,
    .page-card__summary + .page-card__subtitle {
        margin-top: 0.5rem;
    }

/* Simple message pages (Not Found, Access Denied, Error). */
.page-message {
    max-width: 640px;
}

    .page-message p {
        color: var(--lasa-text-muted);
        margin: 0 0 1rem;
    }

    .page-message p:last-child {
        margin-bottom: 0;
    }

.page-card__summary {
    color: var(--lasa-text-muted);
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 1.25rem;
}

/* Grid items default to min-width:auto, so a wide table or long name would stretch the card past its border. */
.dashboard-grid > .page-card {
    min-width: 0;
    overflow: hidden;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
}

    /* Team logos come in whatever size was uploaded: keep them inside the cell. */
    .standings-table img {
        display: block;
        max-width: 100%;
        max-height: 40px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .standings-table td.standings-table__team-col {
        min-width: 0;
    }

    /* The badge holds an <h3>, which would otherwise bring its own heading margins and size. */
    .standings-table .position h3 {
        margin: 0;
        font-size: inherit;
        line-height: 32px;
    }

    .standings-table thead th {
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.76rem;
        letter-spacing: 0.03em;
        padding: 0.5rem 0.6rem;
        text-align: center;
    }

        .standings-table thead th.standings-table__position-col,
        .standings-table thead th.standings-table__team-col {
            text-align: left;
        }

    .standings-table td {
        padding: 0.5rem 0.6rem;
        text-align: center;
    }

        .standings-table td.standings-table__team-col {
            text-align: left;
        }

.team-row__amount {
    font-weight: 700;
    color: var(--lasa-primary);
    min-width: 32px;
    text-align: center;
    font-size: 1.7em;
}

.waitinglist-notes {
    padding: 0.75rem 1rem;
    color: var(--lasa-text);
    background: var(--lasa-primary-light);
}

.leaders-group-title {
    font-weight: 700;
    color: var(--lasa-primary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.85rem;
    text-align: right;
}


.leader-cell {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
}

.leader-cell__name {
    font-weight: 600;
    font-size: 1.2em;
}

.leader-cell__team {
    font-size: 0.8rem;
    color: var(--lasa-text-muted);
}

.leaders-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.leaders-group {
    display: flex;
    flex-direction: column;
}

.leader-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.1rem;
    border-bottom: 1px solid var(--lasa-border);
}

    .leader-row:last-child {
        border-bottom: none;
    }

.leader-row__amount {
    font-weight: 700;
    color: var(--lasa-primary);
    min-width: 32px;
    text-align: right;
    font-size: 1.7em;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .standings-table thead th,
    .standings-table td {
        padding: 0.4rem 0.3rem;
    }

    .standings-table thead th {
        font-size: 0.68rem;
    }

    .team-row__amount {
        font-size: 1.25em;
    }

    .standings-table img {
        max-height: 32px;
    }

    .standings-table .position {
        margin-right: 4px;
    }
}

.dual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 900px) {
    .dual-grid--2-1 {
        grid-template-columns: 2fr 1fr;
    }
}

/* One section only (e.g. Season Team Players for an Annotator): it takes the whole row. */
.dual-grid--single {
    grid-template-columns: 1fr;
}

.roster-row-inactive {
    background: var(--lasa-bg) !important;
    color: var(--lasa-text-muted);
}

.season-picker {
    /* No display override here: DxComboBox's host element needs its own
       default "flex" display (input + dropdown-arrow button as flex siblings)
       to keep the arrow on the right. Forcing inline-block here previously
       broke that, wrapping the arrow onto its own line below the text. */
    width: 260px;
}

.category-summary {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

    .category-summary span {
        background: var(--lasa-primary-light);
        color: var(--lasa-primary-darker);
        font-weight: 700;
        font-size: 0.85rem;
        padding: 0.35rem 0.8rem;
        border-radius: 999px;
    }

.category-summary__zero {
    background: #fdecec !important;
    color: var(--lasa-primary) !important;
}

.category-summary__full {
    background: #fdecec !important;
    color: var(--lasa-danger) !important;
}

/* ==========================================================================
   Login page
   ========================================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, var(--lasa-primary) 0%, var(--lasa-primary-darker) 70%);
    padding: 1.5rem;
}

.login-card {
    background: var(--lasa-surface);
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 360px;
    box-shadow: var(--lasa-shadow-lg);
    position: relative;
    text-align: center;
}

    .login-card h1 {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--lasa-primary);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin: 0 0 1.5rem;
    }

.login-card__logo {
    width: 160px;
    height: 160px;
    object-fit: contain;
    padding-bottom: 1.5em;
}

.login-card__error {
    color: var(--lasa-danger);
    background: #fdecec;
    border-radius: var(--lasa-radius-sm);
    padding: 0.6rem 0.8rem;
    margin-bottom: 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-field {
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

    .login-field label {
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--lasa-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .login-field input {
        padding: 0.6rem 0.75rem;
        border: 1px solid var(--lasa-border);
        border-radius: var(--lasa-radius-sm);
        font-size: 0.95rem;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

        .login-field input:focus {
            outline: none;
            border-color: var(--lasa-accent);
            box-shadow: 0 0 0 3px var(--lasa-accent-light);
        }

        .login-field input:disabled,
        .login-field input:read-only {
            background: #f3f3f6;
            opacity: 0.7;
        }

/* OTP verification: one box per digit, lettered like the section headers (.page-card__title). */
.otp-digits {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.login-field .otp-digit {
    width: 100%;
    max-width: 3rem;
    min-width: 0;
    aspect-ratio: 1 / 1.15;
    padding: 0;
    text-align: center;
    font-family: var(--lasa-font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--lasa-primary);
}

.login-card button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    background: var(--lasa-accent);
    color: #fff;
    border: none;
    border-radius: var(--lasa-radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.4rem;
    transition: background-color 0.15s ease;
}

    .login-card button[type="submit"]:hover:not(:disabled) {
        background: var(--lasa-accent-dark);
    }

    .login-card button[type="submit"]:disabled {
        background: var(--lasa-accent-dark);
        cursor: default;
        opacity: 0.85;
    }

.login-card__loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    font-weight: 600;
    color: var(--lasa-primary);
}

    .login-card__loading.is-visible {
        display: flex;
    }

/* ==========================================================================
   Loading overlay (ILoadingService / LoadingHost)
   ========================================================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-overlay__panel {
    background: var(--lasa-surface);
    border-radius: 14px;
    padding: 1.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    box-shadow: var(--lasa-shadow-lg);
    min-width: 180px;
}

.loading-spinner {
    width: 34px;
    height: 34px;
    border: 3.5px solid var(--lasa-accent-light);
    border-top-color: var(--lasa-accent);
    border-radius: 50%;
    animation: lasa-spin 0.75s linear infinite;
}

@keyframes lasa-spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay__text {
    font-weight: 700;
    color: var(--lasa-text);
    font-size: 0.9rem;
}

/* ==========================================================================
   Notifications
   ========================================================================== */
.notification-host {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    z-index: 2000;
    width: 340px;
}

.notification-toast {
    position: relative;
    padding: 0.8rem 2.2rem 0.8rem 1rem;
    border-radius: var(--lasa-radius);
    background: var(--lasa-surface);
    color: var(--lasa-text);
    box-shadow: var(--lasa-shadow-lg);
    border-left: 4px solid var(--lasa-primary);
}

.notification-toast--info {
    border-left-color: var(--lasa-primary);
}

.notification-toast--success {
    border-left-color: var(--lasa-success);
}

.notification-toast--warning {
    border-left-color: var(--lasa-warning);
}

.notification-toast--error {
    border-left-color: var(--lasa-danger);
}

.notification-toast__title {
    font-weight: 700;
}

.notification-toast__close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--lasa-text-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

    .notification-toast__close:hover {
        color: var(--lasa-text);
    }

/* ==========================================================================
   DevExpress controls, repainted through their own CSS variables (26.1).
   The old ".dxbs-gridview" rule targeted a class 26.1 no longer renders.
   ========================================================================== */
/* DxGrid: navy-tinted header (dark navy text, so the sort/filter icons keep their contrast), app border colour. */
.dxbl-grid {
    --dxbl-grid-font-family: var(--lasa-font-body);
    --dxbl-grid-border-color: var(--lasa-border);
    --dxbl-grid-border-radius: var(--lasa-radius-sm);
    --dxbl-grid-header-bg: var(--lasa-primary-light);
    --dxbl-grid-header-color: var(--lasa-primary-darker);
    --dxbl-grid-header-font-weight: 600;
    --dxbl-grid-text-cell-padding-y: 0.5rem;
    --dxbl-grid-text-cell-padding-x: 0.6rem;
}

    .dxbl-grid .dxbl-grid-header-row > th {
        font-size: 0.76rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        border-bottom: 2px solid var(--lasa-primary-soft);
    }

    .dxbl-grid .dxbl-grid-table > tbody > tr:hover > td {
        background-color: #f7f8fc;
    }

/* A grid is the page card's content: the card already draws the frame. */
.page-card > .dxbl-grid {
    --dxbl-grid-outer-border-color: transparent;
}

/* DxFormLayout (edit forms, dialogs): small uppercase muted captions, like the login fields. */
.dxbl-fl {
    --dxbl-fl-caption-color: var(--lasa-text-muted);
    --dxbl-fl-caption-font-weight: 600;
}

    .dxbl-fl .dxbl-fl-cpt {
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

/* DxPopup / grid edit popups: headings in the app's heading font, with the crimson rule of .page-card__title. */
.dxbl-modal {
    --dxbl-popup-header-font-family: var(--lasa-font-heading);
    --dxbl-popup-header-color: var(--lasa-primary);
    --dxbl-popup-header-font-weight: 600;
}

    .dxbl-modal .dxbl-modal-header {
        text-transform: uppercase;
        letter-spacing: 0.03em;
        border-bottom: 2px solid var(--lasa-accent);
    }

/*
    Dashboard position
*/

.position {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    margin-right: 12px;
    font-weight: 600;
}

.playoff-position {
    background-color: var(--lasa-primary);
    border-radius: 50%;
    color: white;
}

.first-place {
    background-color: gold;
    color: black;
}

.non-playoff-position {
    /* Normal position number */
}

.leaders-grid .dxbl-grid-header-row {
    display: none;
}

.padding-p-top {
    padding-top: 1.5rem;
}

.dd-body-class,
.dd-body-class .dxbl-list-box-render-container .dxbl-listbox {
    max-height: 600px !important;
}

/* Waiting list: notes detail row */
.waiting-list-grid {
    --dxbl-grid-detail-cell-padding-x: 0.75rem;
    --dxbl-grid-detail-cell-padding-y: 0.125rem;
}

    .waiting-list-grid tr.no-detail-row > td.dxbl-grid-expand-button-cell .dxbl-grid-expand-button {
        visibility: hidden;
        pointer-events: none;
    }

    .waiting-list-grid .dxbl-grid-table > tbody > tr[aria-expanded=true] > td {
        border-bottom-color: transparent;
    }

    .waiting-list-grid .dxbl-grid-table .dxbl-grid-detail-cell {
        padding-top: 0 !important;
        padding-bottom: 0.375rem !important;
    }

.waiting-list-notes {
    margin: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-style: italic;
    white-space: pre-wrap;
    opacity: 0.85;
    text-align: right;
}


/* Teams: logo cell + logo editor */
.team-logo-cell {
    max-height: 40px;
    max-width: 120px;
    object-fit: contain;
}

/* Hall of Fame: photo thumbnail */
.hall-of-fame-photo-cell {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.375rem;
}

.team-logo-editor {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
}

.team-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border: 1px dashed var(--bs-border-color, #ccc);
    border-radius: 0.375rem;
    overflow: hidden;
}

    .team-logo-preview img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.team-logo-preview__empty,
.team-logo-editor__hint {
    font-size: 0.8125rem;
    opacity: 0.65;
}

.team-logo-editor__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 220px;
    flex: 1;
}

.page-error {
    border-left: 4px solid #b32121;
}

/* Adaptive grids (AdaptivePageBase): on phones the hidden columns are listed in the row's detail row. */
.grid-detail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0.35rem 0.25rem 0.5rem;
}

.grid-detail__item {
    min-width: 0;
}

    .grid-detail__item dt {
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--lasa-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .grid-detail__item dd {
        margin: 0;
        overflow-wrap: anywhere;
    }

/* A long value (notes, description, address) takes the whole row. */
.grid-detail__item--wide {
    grid-column: 1 / -1;
}

.grid-detail__empty {
    color: var(--lasa-text-muted);
}

/* A plain HTML table that is wider than a phone scrolls inside its card instead of squeezing its cells. */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Permissions: page × role matrix. */
.permissions-table {
    width: 100%;
    border-collapse: collapse;
}

    .permissions-table th,
    .permissions-table td {
        padding: 0.4rem 0.6rem;
        border-bottom: 1px solid var(--lasa-border);
        text-align: left;
        white-space: nowrap;
    }

.permissions-table__inactive {
    opacity: 0.6;
}

/*Readonly style*/

.dxbl-text-edit .dxbl-text-edit-input[readonly], .dxbl-text-edit > textarea[readonly] {
    pointer-events: none;
    background-color: whitesmoke;
}

/* About Us: HTML size counter under the Description editor (the column is varchar(2000), markup included). */
.html-length {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    opacity: 0.7;
    text-align: right;
}

    .html-length.is-over {
        opacity: 1;
        color: #b32121;
        font-weight: 600;
    }

/* Games / GamesPlayoff command cell (GameCommandCell): Edit and Delete icons, or a lock for a played game. */
.game-command { display: inline-flex; align-items: center; gap: 2px; }
.game-command svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.game-command__button.dxbl-btn { padding: 4px 6px; }
.game-command__button--delete.dxbl-btn { color: #b32121; }
.game-command--locked { padding: 4px 6px; color: #8a8fa3; cursor: help; }

/* ==========================================================================
   Narrow screens: the top bar wraps onto two rows and the body loses some padding.
   ========================================================================== */
.app-shell__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 36px;
    padding: 0 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--lasa-radius-sm);
    cursor: pointer;
}

    .app-shell__toggle span {
        display: block;
        height: 2px;
        background: #fff;
        border-radius: 1px;
    }

@media (max-width: 1280px) {
    .app-shell__topbar {
        flex-wrap: wrap;
        gap: 0.6rem 1rem;
        padding: 0.6rem 1rem;
    }

    .app-shell__toggle {
        display: flex;
        order: 2;
    }

    .app-shell__season-picker {
        order: 1;
        margin-left: auto;
    }

    .app-shell__account {
        order: 2;
    }

    /* Collapsed by default; the hamburger opens it as a full-width stacked list with every group expanded. */
    .app-shell__nav {
        display: none;
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        max-height: calc(100vh - 7rem);
        overflow-y: auto;
    }

        .app-shell__nav.is-open {
            display: flex;
        }

        .app-shell__nav > a {
            padding: 0.6rem 0.75rem;
        }

    .nav-group__label::after {
        display: none;
    }

    .nav-group__label {
        display: block;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
        opacity: 0.7;
        padding-bottom: 0.15rem;
    }

    .nav-group__menu {
        display: flex;
        position: static;
        padding-top: 0;
        min-width: 0;
    }

    .nav-group__menu-panel {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 0 0.5rem;
    }

    .nav-group__menu a {
        color: rgba(255, 255, 255, 0.85);
        padding: 0.55rem 0.75rem;
    }

        .nav-group__menu a:hover,
        .nav-group__menu a.active {
            background: var(--lasa-accent);
            color: #fff;
        }

    /* The account menu stays a dropdown on the right of the bar. */
    .nav-group--account .nav-group__menu {
        display: none;
        position: absolute;
        right: 0;
        left: auto;
        min-width: 170px;
    }

    .nav-group--account:hover .nav-group__menu,
    .nav-group--account.is-open .nav-group__menu {
        display: flex;
    }

    .nav-group--account .nav-group__menu-panel {
        background: var(--lasa-surface);
        border: 1px solid var(--lasa-border);
        box-shadow: var(--lasa-shadow-lg);
        padding: 0.4rem;
    }

    .nav-group--account .nav-group__label {
        text-transform: none;
        font-size: 0.92rem;
        letter-spacing: normal;
        opacity: 1;
        display: inline-flex;
    }

    .page-header__actions {
        width: 100%;
    }

    .page-card {
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .app-shell__body {
        padding: 1rem 0.75rem;
    }

    .app-shell__season-picker {
        width: 170px;
    }

    .page-card {
        padding: 1rem 0.85rem;
    }

    .page-toolbar {
        padding: 0.75rem;
    }

    /* Toolbar controls stack, each label above a full-width control. */
    .page-toolbar > *,
    .toolbar-field {
        width: 100%;
    }

    .toolbar-field {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

        /* Pickers keep their desktop width (.season-picker) otherwise; on a phone they fill the row. */
        .page-toolbar .season-picker,
        .toolbar-field > *,
        .page-toolbar__end .dxbl-btn {
            width: 100%;
        }

    /* The top bar stays on one row: logo only, the season picker takes the free space. */
    .app-shell__topbar {
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

        .app-shell__topbar:has(.app-shell__nav.is-open) {
            flex-wrap: wrap;
        }

    .app-shell__brand-name {
        display: none;
    }

    .app-shell__season-picker {
        flex: 1 1 0;
        min-width: 0;
    }

    .page-toolbar__end {
        margin-left: 0;
    }

    .app-shell__brand {
        font-size: 1.1rem;
    }

    .dual-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .notification-host {
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
    }
}

/* Edit forms: every field is stacked full width, and popups never exceed the viewport. */
.dxbl-modal .dxbl-modal-dialog {
    max-width: calc(100vw - 1rem);
}

.dxbl-fl .dxbl-fl-item,
.dxbl-fl .dxbl-fl-ctrl {
    min-width: 0;
}

@media (max-width: 640px) {
    .dxbl-modal .dxbl-modal-body {
        padding: 0.75rem;
    }
}

/* Narrow screens: fixed-width popups and grids shrink to the viewport; wide grids scroll inside their card. */
@media (max-width: 900px) {
    .dxbl-modal .dxbl-modal-dialog,
    .dxbl-popup {
        max-width: calc(100vw - 1rem);
    }

    .page-card .dxbl-grid {
        max-width: 100%;
    }

    .page-header h1 {
        border-left-width: 4px;
    }

    .page-header .dxbl-btn,
    .page-toolbar .dxbl-btn {
        flex: 1 1 auto;
    }
}
/* The account label is a button (tappable on touch screens); it looks like the other nav labels. */
button.nav-group__label {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

.nav-group--account.is-open .nav-group__label {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-group--account .nav-group__menu {
    max-width: calc(100vw - 1rem);
}

@media (max-width: 640px) {
    /* A long user name is truncated so the bar keeps room for the season picker and hamburger. */
    .nav-group--account .nav-group__label {
        max-width: 30vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
    }

    .nav-group--account .nav-group__menu-panel {
        min-width: 11rem;
    }
}