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;
}
/* ==== Admin dashboard (shared across pages, not scoped) ==== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: #15803d;
}

.dashboard-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.2rem;
}

.dashboard-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.5rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon--blue { background: #dbeafe; color: #1d4ed8; }
.stat-icon--amber { background: #fef3c7; color: #b45309; }
.stat-icon--red { background: #fee2e2; color: #b91c1c; }
.stat-icon--green { background: #dcfce7; color: #15803d; }

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.stat-value--text {
    font-size: 1.1rem;
    line-height: 1.35;
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.stat-label--top {
    margin-top: 0;
    margin-bottom: 0.1rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #9ca3af;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.dashboard-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.5rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-header .section-title {
    margin-bottom: 0;
}

.panel-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: #16a34a;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.panel-link:hover {
    color: #15803d;
}

.panel-empty {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #6b7280;
    font-size: 0.88rem;
    padding: 0.4rem 0.1rem;
}

.panel-empty i {
    color: #16a34a;
    font-size: 1.1rem;
}

.panel-empty--muted i {
    color: #9ca3af;
    font-size: 1.3rem;
}

.panel-empty-note {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.attention-list {
    display: flex;
    flex-direction: column;
}

.attention-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.3rem;
    border-top: 1px solid #f0f1f3;
    text-decoration: none;
    color: inherit;
}

.attention-item:first-child {
    border-top: none;
}

.attention-item:hover .attention-text {
    color: #15803d;
}

.attention-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.attention-icon--warning {
    background: #fef3c7;
    color: #b45309;
}

.attention-icon--info {
    background: #dbeafe;
    color: #1d4ed8;
}

.attention-text {
    flex: 1;
    font-size: 0.88rem;
    color: #374151;
}

.attention-go {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.attention-item:hover .attention-go {
    color: #16a34a;
}

.quick-section {
    margin-bottom: 2rem;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.quick-tile {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    text-decoration: none;
    color: inherit;
}

.quick-tile:hover {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.1);
}

.quick-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.quick-tile-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.quick-tile-desc {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 0.2rem;
    line-height: 1.4;
}

/* ==== Shared Admin CRUD form styles ==== */

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.form-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.form-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.form-check-row {
    display: flex;
    align-items: center;
}

/* Timeline editor (club page «Хронологія»): year + text + move/delete buttons per row. */
.timeline-edit-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-edit-row__year {
    flex: 0 0 110px;
}

.timeline-edit-row__text {
    flex: 1 1 auto;
    min-width: 0;
}

.timeline-edit-row__actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .timeline-edit-row {
        flex-wrap: wrap;
    }

    .timeline-edit-row__year {
        flex: 1 1 90px;
    }

    .timeline-edit-row__text {
        flex: 1 1 100%;
        order: 3;
    }

    .timeline-edit-row__actions {
        margin-left: auto;
    }
}

/* Several positions for one person (management / personnel): a list of check boxes grouped by section. */
.role-multiselect {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.4rem 0.75rem 0.6rem;
    background: #fff;
}

.role-multiselect__group {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0.5rem 0 0.15rem;
}

.role-multiselect__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.role-multiselect__option input {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
}

.role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.role-chip {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.78rem;
    font-weight: 600;
}

.photo-row {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.photo-preview {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    color: #c1c5cc;
    font-size: 2.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.stat-field label {
    display: block;
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.player-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.player-thumb--empty {
    background: #f3f4f6;
    color: #c1c5cc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.badge-captain {
    color: #b45309;
    margin-left: 0.35rem;
    font-size: 0.75rem;
}

.badge-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.badge-status--active {
    background: #dcfce7;
    color: #15803d;
}

.badge-status--inactive {
    background: #f3f4f6;
    color: #9ca3af;
}

/* ==== Players list: toolbar, filters, sortable table, inline edit ==== */

.players-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.players-toolbar .search-box {
    flex: 1;
    max-width: 400px;
}

.search-box {
    position: relative;
    max-width: 320px;
    flex: 1;
}

.search-box i {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.85rem;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.88rem;
    box-sizing: border-box;
}

.search-box input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.filters-anchor {
    position: relative;
    flex-shrink: 0;
}

.filters-backdrop {
    position: fixed;
    inset: 0;
    z-index: 24;
    background: transparent;
}

.filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    color: #374151;
    cursor: pointer;
}

.filters-btn:hover {
    border-color: #16a34a;
    color: #15803d;
}

.filters-count {
    background: #16a34a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
}

.filters-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 290px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
    padding: 1rem;
    z-index: 30;
    box-sizing: border-box;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #374151;
}

.radio-row label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 400;
    cursor: pointer;
}

.filters-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-link-reset {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
}

.btn-link-reset:hover {
    color: #dc2626;
}

.players-table {
    width: 100%;
    border-collapse: collapse;
}

    .players-table th,
    .players-table td {
        text-align: left;
        border-bottom: 1px solid #f0f1f3;
    }

        .players-table th:first-child,
        .players-table td:first-child {
            padding-left: 1.5rem;
        }

        .players-table th:last-child,
        .players-table td:last-child {
            padding-right: 1.5rem;
        }

.players-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    border-radius: 10px 10px 0 0;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: #f9fafb;
}

.players-table th.sortable:hover {
    color: #15803d;
}

.sort-icon {
    font-size: 0.75rem;
    margin-left: 0.15rem;
}

.sort-icon--idle {
    color: #d1d5db;
}

.person-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.person-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.person-avatar--initial {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

.avatar-c1 { background: #2563eb; }
.avatar-c2 { background: #16a34a; }
.avatar-c3 { background: #d97706; }
.avatar-c4 { background: #db2777; }
.avatar-c5 { background: #7c3aed; }
.avatar-c6 { background: #0891b2; }

.person-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.person-number-hint {
    font-size: 0.78rem;
    color: #9ca3af;
}

.position-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.position-badge--gk { background: #dbeafe; color: #1d4ed8; }
.position-badge--def { background: #dcfce7; color: #15803d; }
.position-badge--mid { background: #fef3c7; color: #b45309; }
.position-badge--fwd { background: #fee2e2; color: #b91c1c; }

.shirt-input {
    width: 64px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    font-size: 0.85rem;
    text-align: center;
}

.shirt-input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: #e5e7eb;
    border-radius: 999px;
    transition: background 0.15s ease;
}

.toggle-track::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-track {
    background: #16a34a;
}

.toggle-switch input:checked + .toggle-track::before {
    transform: translateX(18px);
}

/* ==== Self-contained form & button baseline (does not depend on external CDN) ==== */

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
    color: #111827;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    line-height: 1.4;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 14px;
    padding-right: 2.2rem;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

input[type="checkbox"].form-check-input {
    accent-color: #16a34a;
    width: 16px;
    height: 16px;
}

.radio-row input[type="radio"] {
    accent-color: #16a34a;
    width: 15px;
    height: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
}

.btn-primary {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.btn-primary:hover {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

.btn-outline-primary {
    background: #fff;
    color: #16a34a;
    border-color: #16a34a;
}

    .btn-outline-primary:hover {
        background: #16a34a;
        color: #fff;
        border-color: #16a34a;
    }

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
}

.btn-link {
    background: none;
    border: none;
    color: #2563eb;
    padding: 0.3rem 0.4rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.text-danger {
    color: #dc2626 !important;
}

.text-muted {
    color: #9ca3af !important;
}

/* ==== Row action icon buttons (table Edit/Delete etc.) ==== */

.row-actions {
    display: flex;
    gap: 0.4rem;
}

.row-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.row-action:hover {
    border-color: #16a34a;
    color: #15803d;
    background: #f0fdf4;
}

.row-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #fff;
    border-color: #e5e7eb;
    color: #6b7280;
}

.row-action--danger:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

/* ==== Sticky edit-page footer (Save/Delete actions always visible) ==== */

.edit-page-body {
    padding-bottom: 5.5rem;
}

.edit-footer {
    position: fixed;
    bottom: 0;
    left: 260px;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 0.9rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 25;
    box-shadow: 0 -2px 10px rgba(17, 24, 39, 0.06);
}

.edit-footer-spacer {
    flex: 1;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .admin-content {
        padding: 1.25rem 1rem 3rem;
    }

    .edit-footer {
        left: 0;
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .edit-footer-spacer {
        display: none;
    }

    .players-toolbar {
        flex-wrap: wrap;
    }

        .players-toolbar .search-box {
            max-width: none;
            order: 3;
            flex-basis: 100%;
        }

    .stat-grid,
    .quick-grid {
        grid-template-columns: 1fr;
    }
}
/* ==== Media album: bulk upload, photo grid, per-photo settings ==== */

.album-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.75rem 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.album-dropzone:hover,
.album-dropzone:focus-within {
    border-color: #16a34a;
    background: #f0fdf4;
}

.album-dropzone--busy {
    border-style: solid;
    border-color: #16a34a;
    background: #f0fdf4;
}

/* The real file input covers the whole zone (invisible), so a click or a drop anywhere on it works. */
.album-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.album-dropzone-input:disabled {
    cursor: progress;
}

.album-dropzone-icon {
    font-size: 2rem;
    color: #16a34a;
    line-height: 1;
}

.album-dropzone-title {
    font-weight: 600;
    color: #111827;
}

.album-dropzone-hint {
    font-size: 0.82rem;
    color: #6b7280;
}

.album-progress {
    width: min(360px, 90%);
    height: 6px;
    border-radius: 3px;
    background: #dcfce7;
    overflow: hidden;
    margin-top: 0.35rem;
}

.album-progress-bar {
    height: 100%;
    background: #16a34a;
    transition: width 0.2s ease;
}

.album-errors {
    position: relative;
    margin-top: 0.75rem;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.85rem;
}

.album-errors ul {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
    max-height: 160px;
    overflow-y: auto;
}

.album-errors-close {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    font-size: 0.7rem;
}

.album-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
    margin: 1rem 0 0.6rem;
    font-size: 0.88rem;
    color: #374151;
}

.album-toolbar-hint {
    color: #9ca3af;
    font-size: 0.8rem;
    flex: 1;
    min-width: 220px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.album-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    border: 2px solid transparent;
    cursor: grab;
}

.album-tile--selected {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.album-tile--dragging {
    opacity: 0.4;
}

.album-tile--drop {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.album-tile-thumb {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.album-tile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-tile-number {
    position: absolute;
    top: 6px;
    left: 6px;
    min-width: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: rgba(17, 24, 39, 0.7);
    color: #fff;
    font-size: 0.72rem;
    line-height: 22px;
    text-align: center;
    pointer-events: none;
}

.album-tile-cover {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 0 7px;
    border-radius: 11px;
    background: #16a34a;
    color: #fff;
    font-size: 0.7rem;
    line-height: 22px;
    pointer-events: none;
}

.album-tile-caption {
    position: absolute;
    left: 6px;
    bottom: 6px;
    width: 22px;
    height: 22px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    font-size: 0.7rem;
    line-height: 22px;
    text-align: center;
    pointer-events: none;
}

.album-tile-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.12s ease;
}

.album-tile:hover .album-tile-actions,
.album-tile:focus-within .album-tile-actions {
    opacity: 1;
}

/* Touch screens have no hover, so the buttons are always shown there. */
@media (hover: none) {
    .album-tile-actions {
        opacity: 1;
    }
}

.album-tile-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    font-size: 0.8rem;
    cursor: pointer;
}

.album-tile-btn:hover {
    background: #fff;
    color: #15803d;
}

.album-tile-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.album-tile-btn--on {
    color: #ca8a04;
}

.album-tile-btn--danger:hover {
    color: #dc2626;
}

.album-detail {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f9fffb;
}

.album-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.album-detail-nav {
    display: flex;
    gap: 0.35rem;
}

.album-detail-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.album-replace {
    position: relative;
    overflow: hidden;
    margin: 0;
}

.album-replace input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* ==== Contact messages: expandable cards ==== */

.contact-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.contact-card--new {
    border-left: 3px solid #dc2626;
}

.badge-new {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    cursor: pointer;
}

.contact-card-header:hover {
    background: #f9fafb;
}

.contact-card-main {
    flex-shrink: 0;
    min-width: 220px;
}

.contact-card-preview {
    flex: 1;
    color: #6b7280;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-card-body {
    padding: 0 1.1rem 1.1rem;
    border-top: 1px solid #f0f1f3;
}

.contact-card-body p {
    margin-top: 0.9rem;
    color: #374151;
    font-size: 0.9rem;
}

.contact-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ==== Global font (was previously scoped only to .admin-shell) ==== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
}

/* ==== Auth screens (Login, etc.) — full-page, no sidebar ==== */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    background-image: radial-gradient(circle at 50% 0%, rgba(22, 163, 74, 0.06), transparent 60%);
    padding: 1.5rem;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(17, 24, 39, 0.08);
    padding: 2rem 2.25rem 2.25rem;
    box-sizing: border-box;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #16a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.3);
}

.auth-brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #111827;
}

.auth-brand-tagline {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 0.1rem;
}

.auth-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 0 0 1.5rem;
}

.auth-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.auth-remember {
    margin-bottom: 1.25rem;
}

.auth-remember label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.87rem;
    color: #374151;
    cursor: pointer;
}

.auth-remember input[type="checkbox"] {
    accent-color: #16a34a;
    width: 15px;
    height: 15px;
}

.auth-card .btn-primary {
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
}

/* ==== Non-interactive attention-item variant (activity feeds — not clickable) ==== */

.attention-item--static {
    cursor: default;
}

.attention-item--static:hover .attention-text,
.attention-item--static:hover .attention-go {
    color: inherit;
}

/* ==== Action-type filter pills (user activity log) ==== */

.action-filter-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.filter-pill {
    background: #f3f4f6;
    border: 1px solid transparent;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
}

.filter-pill:hover {
    background: #e5e7eb;
}

.filter-pill--active {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

/* ==== Pagination bar ==== */

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid #f0f1f3;
}

.pagination-info {
    font-size: 0.82rem;
    color: #9ca3af;
}

.pagination-buttons {
    display: flex;
    gap: 0.4rem;
}

/* ==== TeamPicker component ==== */

.team-picker {
    position: relative;
}

.team-picker-selected {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.team-picker-selected span {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
}

.team-picker-clear {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.2rem;
}

.team-picker-clear:hover {
    color: #dc2626;
}

.team-picker-search {
    position: relative;
    display: flex;
    align-items: center;
}

.team-picker-search i.bi-search {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    font-size: 0.85rem;
    pointer-events: none;
}

.team-picker-search input {
    padding-left: 2.1rem;
}

.team-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.team-picker-dropdown {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    right: 0;
    z-index: 41;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
    max-height: 260px;
    overflow-y: auto;
    padding: 0.35rem;
}

.team-picker-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #111827;
}

.team-picker-option:hover {
    background: #f0fdf4;
}

.team-picker-empty {
    padding: 0.6rem;
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
}

.team-picker-logo {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.team-picker-logo--empty {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.75rem;
}

/* ==== Group team chips (Groups tab inline management) ==== */

.group-teams-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.group-team-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem 0.35rem 0.4rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #111827;
}

.group-team-chip .team-picker-logo {
    width: 20px;
    height: 20px;
}

/* ==== PlayOff bracket tab — fixed 8-4-2-1 pyramid ==== */

.bracket-pyramid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.bracket-column {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
}

.bracket-column-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    text-align: center;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Every column shares the same total height regardless of how many cells it holds — spacing
   them evenly (space-around) across that fixed height is what creates the pyramid taper:
   8 cells sit close together, 1 cell (the Final) sits centered. No JS layout math needed. */
.bracket-column-cells {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
    min-height: 760px; /* a cell with two legs and a shoot-out is taller than one match, so the height is a minimum */
}

.bracket-match {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
}

.bracket-match-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.15rem 0;
}

.bracket-match-team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bracket-match-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid #f0f1f3;
}

.bracket-match-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.72rem;
    color: #16a34a;
    text-decoration: none;
    cursor: pointer;
}

.bracket-match-link:hover {
    text-decoration: underline;
}

.bracket-match-link--danger {
    color: #dc2626;
}

/* A cell is a tie: one score column per leg (first, second), then the shoot-out and the legs' own links. */
.bracket-tie-scores {
    display: flex;
    gap: 0.7rem;
    flex-shrink: 0;
}

.bracket-tie-scores strong,
.bracket-tie-scores small {
    min-width: 1.1rem;
    text-align: center;
}

.bracket-match-team--head {
    padding-bottom: 0;
    color: #9ca3af;
}

/* The shoot-out is printed small after the score of the match that had one: "0⁽⁵⁾". */
.bracket-tie-pen {
    margin-left: 1px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #6b7280;
}

.bracket-legs {
    margin-top: 0.45rem;
    border-top: 1px solid #f0f1f3;
}

.bracket-leg {
    padding-top: 0.4rem;
}

.bracket-leg-title {
    display: flex;
    flex-direction: column;
    font-size: 0.72rem;
    font-weight: 600;
    color: #374151;
}

.bracket-leg-title .text-muted {
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bracket-leg .bracket-match-actions {
    margin-top: 0.2rem;
    padding-top: 0;
    border-top: none;
}

.bracket-add-leg {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.3rem;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 0.75rem;
    cursor: pointer;
}

.bracket-add-leg:hover {
    border-color: #16a34a;
    color: #16a34a;
    background: #f0fdf4;
}

.bracket-empty-cell {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    color: #9ca3af;
    font-size: 1.1rem;
    cursor: pointer;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bracket-empty-cell:hover {
    border-color: #16a34a;
    color: #16a34a;
    background: #f0fdf4;
}

/* Print: hide admin chrome so only the page content (e.g. the user guide) is printed */
@media print {
    .admin-sidebar,
    .admin-topbar,
    .sidebar-backdrop {
        display: none !important;
    }

    .admin-content {
        padding: 0 !important;
        max-width: none !important;
    }

    .admin-shell {
        background: #fff !important;
    }
}

/* ==== Rich text editor (Quill) — see Components/Shared/RichTextEditor.razor ==== */
.rte .ql-toolbar.ql-snow {
    background: #f9fafb;
    border-color: #d1d5db;
    border-radius: 8px 8px 0 0;
}

.rte .ql-container.ql-snow {
    background: #fff;
    border-color: #d1d5db;
    border-radius: 0 0 8px 8px;
    font-family: inherit;
    font-size: 1rem;
}

.rte .ql-editor {
    min-height: 320px;
    max-height: 70vh;
    padding: 1rem 1.1rem;
    line-height: 1.65;
    color: #111827;
}

.rte .ql-editor.ql-blank::before {
    color: #9ca3af;
    font-style: normal;
    left: 1.1rem;
}

.rte .ql-editor p,
.rte .ql-editor blockquote,
.rte .ql-editor h2,
.rte .ql-editor h3 { margin-bottom: 0.6em; }

/* Sizes as on the public site, so what is typed looks like what is published. */
.rte .ql-editor h2 { font-size: 1.6em; }
.rte .ql-editor h3 { font-size: 1.3em; }
.rte .ql-editor .ql-size-small { font-size: 0.8em; }
.rte .ql-editor .ql-size-large { font-size: 1.4em; }
.rte .ql-editor .ql-size-huge { font-size: 2em; }

/* Ukrainian words are longer than the English ones the pickers were drawn for. */
.rte .ql-snow .ql-picker.ql-header { width: 165px; }
.rte .ql-snow .ql-picker.ql-size { width: 135px; }
.rte .ql-snow .ql-picker-label { white-space: nowrap; }

/* The link pop-up. */
.rte .ql-snow .ql-tooltip { z-index: 10; }
.rte .ql-snow .ql-tooltip::before { content: "Перейти за адресою:"; }
.rte .ql-snow .ql-tooltip[data-mode=link]::before { content: "Адреса посилання:"; }
.rte .ql-snow .ql-tooltip a.ql-action::after { content: "Змінити"; }
.rte .ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: "Зберегти"; }
.rte .ql-snow .ql-tooltip a.ql-remove::before { content: "Прибрати"; }

.rte-hint {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ==== Photo focus editor: pick what stays in view when the site crops a photo ==== */

.focus-editor {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafbfc;
}

.focus-editor-title {
    font-weight: 600;
}

.focus-editor-hint {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0.2rem 0 0.9rem;
}

.focus-editor-body {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

/* The wrapper is exactly as big as the picture, so a percentage of it is a percentage of the photo. */
.focus-editor-source {
    position: relative;
    display: inline-block;
    line-height: 0;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    outline-offset: 2px;
}

.focus-editor-source img {
    display: block;
    max-width: 100%;
    max-height: 320px;
    pointer-events: none;
}

.focus-editor-marker {
    position: absolute;
    left: var(--fx, 50%);
    top: var(--fy, 50%);
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: rgba(220, 38, 38, 0.35);
    box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.focus-editor-frames {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-end;
}

.focus-editor-frame {
    margin: 0;
}

.focus-editor-crop {
    max-width: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: #e5e7eb;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.focus-editor-crop img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--fx, 50%) var(--fy, 50%);
}

.focus-editor-frame figcaption {
    max-width: 240px;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.focus-editor-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.9rem;
    font-size: 0.85rem;
}

/* ==== «Зберегти» row under a block that saves on its own (page photos) ==== */

.slot-save-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.9rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid #e5e7eb;
}

/* ==== Hand-ordered list rows (media videos) ==== */

.video-order-col {
    width: 1%;
    white-space: nowrap;
}

.video-order-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.video-order-number {
    min-width: 1.6rem;
    text-align: right;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.video-grip {
    color: #9ca3af;
    cursor: grab;
}

.video-grip--off {
    opacity: 0.35;
    cursor: default;
}

tr[draggable="true"].row-dragging {
    opacity: 0.4;
}

tr[draggable="true"].row-drop > td {
    box-shadow: inset 0 3px 0 #2563eb;
}

/* ==== Phones and small tablets ==== */

@media (max-width: 900px) {
    /* The closed sidebar sits off-screen; its shadow must not leak onto the page edge. */
    .admin-sidebar:not(.admin-sidebar--open) {
        box-shadow: none;
    }

    .admin-topbar {
        padding: 0.7rem 1rem;
    }

    .topbar-title {
        font-size: 0.95rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .dashboard-title {
        font-size: 1.35rem;
    }

    .form-card {
        padding: 1rem;
    }

    /* The filter panel is never wider than the screen. */
    .filters-panel {
        width: min(290px, calc(100vw - 2rem));
    }

    .team-picker-dropdown {
        max-width: calc(100vw - 2rem);
    }

    /* Sticky save bar: «Зберегти» is the widest button on the first row (next to a small «Видалити»),
       the other two share the second row. */
    .edit-page-body {
        padding-bottom: 8rem;
    }

    .edit-footer {
        gap: 0.5rem;
    }

    .edit-footer .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        flex: 1 1 calc(50% - 0.25rem);
        order: 2;
        white-space: normal;
        line-height: 1.2;
    }

    .edit-footer .btn-primary {
        order: 1;
        flex: 1 1 60%;
    }

    .edit-footer .btn-danger {
        order: 0;
        flex: 0 0 auto;
        font-size: 0;
        padding: 0.5rem 0.8rem;
    }

    .edit-footer .btn-danger i {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .photo-row {
        gap: 0.9rem;
    }

    .photo-row > div:last-child {
        min-width: 0;
        flex: 1;
    }

    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 0.5rem;
    }

    .album-tile-cover {
        font-size: 0;
        width: 22px;
        padding: 0;
        text-align: center;
    }

    .album-tile-cover i {
        font-size: 0.7rem;
    }

    .album-detail {
        padding: 0.75rem;
    }

    .album-dropzone {
        padding: 1.25rem 0.75rem;
    }

    .pagination-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Wide tables that are not lists (instructions, account pages) scroll sideways inside themselves. */
    .help-table,
    .admin-content table.table:not(.players-table) {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }
}

/* List tables become a stack of cards. The labels come from the header cells (see the script in App.razor). */
@media (max-width: 767.98px) {
    .players-table,
    .players-table tbody,
    .players-table tr,
    .players-table td {
        display: block;
        width: 100%;
    }

    .players-table thead {
        display: none;
    }

    .players-table tbody tr {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        margin-bottom: 0.7rem;
        padding: 0.45rem 0.9rem;
    }

    .players-table tbody tr.clickable-row:hover {
        background: #fff;
    }

    .players-table td,
    .players-table td:first-child,
    .players-table td:last-child {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.9rem;
        padding: 0.4rem 0 !important;
        border: 0;
        box-shadow: none;
        text-align: right;
    }

    .players-table td + td {
        border-top: 1px solid #f3f4f6;
    }

    .players-table td::before {
        content: attr(data-label);
        flex: 0 0 34%;
        max-width: 34%;
        text-align: left;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        color: #9ca3af;
    }

    /* Nothing to label: the first cell with the name/photo, and the one-cell «nothing found» row. */
    .players-table td:first-child::before,
    .players-table td:not([data-label])::before,
    .players-table td[data-label=""]::before {
        display: none;
    }

    .players-table td:first-child {
        text-align: left;
        justify-content: flex-start;
    }

    .players-table td > a,
    .players-table td > .person-cell {
        min-width: 0;
    }

    .players-table .video-order-col {
        width: 100%;
        white-space: normal;
    }

    .players-table td[colspan] {
        justify-content: center;
        text-align: center;
    }
}
