:root {
    --app-bg: #f4f1eb;
    --app-bg-accent: #ebe5db;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-soft: #f8f5ef;
    --text-main: #1f2732;
    --text-muted: #68717d;
    --border-soft: rgba(72, 86, 102, 0.16);
    --border-strong: rgba(41, 54, 67, 0.18);
    --shadow-soft: 0 10px 30px rgba(28, 37, 44, 0.08);
    --shadow-medium: 0 20px 44px rgba(28, 37, 44, 0.12);
    --brand: #256257;
    --brand-dark: #1e4f46;
    --brand-soft: #e7f1ee;
    --accent: #b57d3c;
    --danger-soft: #f8e8e4;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --font-body: "Manrope", sans-serif;
    --font-display: "Fraunces", serif;
}

html {
    scroll-behavior: smooth;
}

body.app-body {
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(181, 125, 60, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(37, 98, 87, 0.12), transparent 32%),
        linear-gradient(180deg, #fbfaf7 0%, var(--app-bg) 100%);
    font-family: var(--font-body);
    line-height: 1.6;
}

a {
    color: var(--brand-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
}

a:hover {
    color: var(--brand);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #18222d;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(2.1rem, 5vw, 3rem);
}

h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.85rem, 4vw, 2.55rem);
}

h3 {
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.app-main {
    padding-bottom: 2.5rem;
}

.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.app-navbar {
    margin: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(17, 29, 38, 0.94), rgba(33, 52, 63, 0.94)) !important;
    box-shadow: 0 18px 40px rgba(14, 21, 28, 0.2);
}

.app-navbar .container-fluid {
    padding: 0.65rem 1rem;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.navbar-nav .nav-link {
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 600;
    padding: 0.55rem 0.9rem;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus-visible {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none !important;
}

.app-flash-stack {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.alert {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.1rem;
}

.alert-info,
.alert-secondary {
    background: #f3f6f8;
    border-color: rgba(96, 110, 122, 0.18);
    color: #243543;
}

.alert-success {
    background: #e8f5ef;
    border-color: rgba(37, 98, 87, 0.18);
    color: #18483f;
}

.alert-warning {
    background: #fff3dc;
    border-color: rgba(181, 125, 60, 0.2);
    color: #6f4b21;
}

.alert-danger {
    background: #fdf0ed;
    border-color: rgba(158, 70, 49, 0.18);
    color: #7a3323;
}

.card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.card-header {
    border-bottom: 1px solid var(--border-soft);
    background: rgba(248, 245, 239, 0.92);
    font-weight: 700;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.35rem;
}

.btn {
    --bs-btn-font-weight: 700;
    --bs-btn-border-radius: 13px;
    --bs-btn-padding-x: 1rem;
    --bs-btn-padding-y: 0.68rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(28, 37, 44, 0.14);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(37, 98, 87, 0.14) !important;
}

.btn-primary,
.btn-success {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-dark);
    --bs-btn-border-color: rgba(37, 98, 87, 0.22);
    --bs-btn-hover-bg: var(--brand-soft);
    --bs-btn-hover-border-color: rgba(37, 98, 87, 0.28);
    --bs-btn-hover-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-soft);
    --bs-btn-active-border-color: rgba(37, 98, 87, 0.28);
    --bs-btn-active-color: var(--brand-dark);
}

.btn-outline-secondary {
    --bs-btn-color: #465564;
    --bs-btn-border-color: rgba(70, 85, 100, 0.18);
    --bs-btn-hover-bg: #eef2f5;
    --bs-btn-hover-border-color: rgba(70, 85, 100, 0.24);
    --bs-btn-hover-color: #253443;
}

.btn-outline-warning {
    --bs-btn-color: #8c6125;
    --bs-btn-border-color: rgba(181, 125, 60, 0.25);
    --bs-btn-hover-bg: #fff1de;
    --bs-btn-hover-border-color: rgba(181, 125, 60, 0.34);
    --bs-btn-hover-color: #724d1e;
}

.btn-outline-danger {
    --bs-btn-color: #8b4133;
    --bs-btn-border-color: rgba(139, 65, 51, 0.2);
    --bs-btn-hover-bg: var(--danger-soft);
    --bs-btn-hover-border-color: rgba(139, 65, 51, 0.28);
    --bs-btn-hover-color: #722d22;
}

.btn-outline-success {
    --bs-btn-color: var(--brand-dark);
    --bs-btn-border-color: rgba(37, 98, 87, 0.2);
    --bs-btn-hover-bg: var(--brand-soft);
    --bs-btn-hover-border-color: rgba(37, 98, 87, 0.28);
    --bs-btn-hover-color: var(--brand-dark);
}

.btn-sm {
    --bs-btn-padding-y: 0.48rem;
    --bs-btn-padding-x: 0.78rem;
    --bs-btn-font-size: 0.88rem;
}

.btn-group {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-group > .btn,
.btn-group > .btn:not(:first-child),
.btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-radius: 13px !important;
    margin-left: 0 !important;
}

.btn.is-loading {
    position: relative;
    pointer-events: none;
    padding-right: 2.9rem;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 0.95rem;
    height: 0.95rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: button-spin 0.7s linear infinite;
}

.btn.is-loading:disabled {
    opacity: 1;
}

@keyframes button-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

.form-label {
    margin-bottom: 0.45rem;
    color: #31404f;
    font-size: 0.93rem;
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 48px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-main);
    padding: 0.72rem 0.9rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.form-control-sm,
.form-select-sm {
    min-height: 40px;
    border-radius: 10px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.form-control::placeholder {
    color: #8a93a0;
}

.form-control-color {
    width: 68px;
    min-height: 48px;
    padding: 0.35rem;
}

.form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    border-color: rgba(52, 66, 80, 0.28);
}

.form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

form[method="get"] {
    margin-bottom: 1.5rem !important;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.1rem;
}

form[method="get"] .row,
form[method="get"].d-flex {
    gap: 0.75rem;
}

.table-responsive {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
    overflow: auto;
}

.table {
    margin-bottom: 0;
    color: var(--text-main);
}

.table thead.table-dark th,
.table tfoot.table-dark td {
    background: linear-gradient(180deg, #24333c, #1b2831) !important;
    border: none;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.79rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 1rem 1rem;
    text-transform: uppercase;
}

.table tbody td,
.table tbody th,
.table tfoot td {
    border-color: rgba(96, 110, 122, 0.12);
    padding: 0.95rem 1rem;
    vertical-align: middle;
}

.table-hover > tbody > tr:hover > * {
    background-color: #f7fbf9;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(248, 250, 251, 0.72);
}

.badge {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.5em 0.72em;
}

.badge.bg-info {
    background: #d8eef3 !important;
    color: #255563;
}

.badge.bg-secondary {
    background: #e9edf1 !important;
    color: #415262;
}

.badge.bg-success {
    background: #ddf1e9 !important;
    color: #235444;
}

.badge.bg-warning {
    background: #fff0ce !important;
    color: #7b571a !important;
}

.badge.bg-dark {
    background: #24333c !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.squad-badge,
.squad-badge-sm,
.squad-badge-lg {
    display: inline-block;
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(26, 35, 44, 0.1),
        0 4px 12px rgba(26, 35, 44, 0.12);
    vertical-align: middle;
}

.squad-badge {
    width: 20px;
    height: 20px;
}

.squad-badge-sm {
    width: 14px;
    height: 14px;
}

.squad-badge-lg {
    width: 40px;
    height: 40px;
}

.squad-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.squad-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.podium-place {
    padding: 1.5rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.podium-1 {
    background: linear-gradient(135deg, #fff8dc, #f8e6b7);
    border-color: rgba(181, 125, 60, 0.25);
}

.podium-2 {
    background: linear-gradient(135deg, #fbfbfb, #edf0f3);
}

.podium-3 {
    background: linear-gradient(135deg, #fff1df, #f4d3b0);
    border-color: rgba(181, 125, 60, 0.2);
}

.podium-rank {
    font-size: 2rem;
    font-weight: 800;
}

.podium-name {
    margin-top: 0.5rem;
    font-size: 1.08rem;
    font-weight: 700;
}

.podium-squad,
.podium-points {
    margin-top: 0.25rem;
    color: var(--text-muted);
}

.stopwatch-display {
    font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-page .app-main {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.auth-layout {
    min-height: calc(100vh - 4rem);
    align-items: center;
}

.auth-title {
    margin-bottom: 0.6rem;
}

@media (max-width: 991.98px) {
    .app-navbar {
        margin: 0.6rem;
        border-radius: 18px;
    }

    .app-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .d-flex.justify-content-between.align-items-center.mb-3,
    .d-flex.flex-wrap.justify-content-between.align-items-center.gap-2.mb-3 {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.9rem;
    }

    .d-flex.justify-content-between.align-items-center.mb-3 > div:last-child,
    .d-flex.flex-wrap.justify-content-between.align-items-center.gap-2.mb-3 > * {
        width: 100%;
    }

    .btn-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .btn-group > .btn {
        width: 100%;
    }

    form[method="get"] .row > [class*="col-"] {
        width: 100%;
    }

    form[method="get"] .ms-auto {
        margin-left: 0 !important;
        width: 100%;
    }

    form[method="get"] .ms-auto .btn,
    form[method="get"] .ms-auto a {
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    h2 {
        margin-bottom: 0.8rem;
    }

    .card-body,
    .card-header,
    form[method="get"] {
        padding: 1rem;
    }

    .table {
        min-width: 620px;
        font-size: 0.95rem;
    }

    .table thead.table-dark th,
    .table tfoot.table-dark td,
    .table tbody td,
    .table tbody th {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .app-navbar .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .btn-group {
        grid-template-columns: 1fr;
    }

    form[method="get"].d-flex > div,
    form[method="get"] .d-flex.gap-2 {
        width: 100%;
    }

    form[method="get"] .d-flex.gap-2 {
        flex-direction: column;
    }

    form[method="get"] .d-flex.gap-2 .btn,
    form[method="get"] .d-flex.gap-2 a,
    .d-flex.justify-content-between.align-items-center.mb-3 > div:last-child .btn,
    .d-flex.flex-wrap.justify-content-between.align-items-center.gap-2.mb-3 > a.btn {
        width: 100%;
    }

    .table {
        min-width: 560px;
    }
}

.leader-list {
    display: grid;
    gap: 0.7rem;
}

.squad-settings-card {
    overflow: hidden;
}

.squad-settings-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.squad-settings-card-header h5 {
    margin-bottom: 0.15rem;
    font-size: 1.28rem;
}

.squad-color-input {
    width: 100%;
    max-width: 100%;
}

.squad-leaders-section {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-soft);
}

.leader-row {
    display: grid;
    gap: 0.45rem;
}

.leader-role-label {
    margin-bottom: 0;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
}

.inline-title-editor {
    display: inline-grid;
    gap: 0.15rem;
}

.inline-title-display {
    position: relative;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    text-align: left;
    cursor: text;
    appearance: none;
    transition: box-shadow 0.15s ease;
}

.inline-title-display,
.inline-title-display * {
    cursor: text;
}

.inline-title-display::after {
    content: "";
    position: absolute;
    inset: -0.2rem -0.45rem;
    border: 1px solid transparent;
    border-radius: 14px;
    pointer-events: none;
    transition: border-color 0.15s ease;
}

.inline-title-display:hover,
.inline-title-display:focus-visible,
.inline-title-editor[data-editing="true"] .inline-title-display {
    background: none;
}

.inline-title-display:hover::after,
.inline-title-display:focus-visible::after,
.inline-title-editor[data-editing="true"] .inline-title-display::after {
    border-color: rgba(41, 54, 67, 0.18);
}

.inline-title-display:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(37, 98, 87, 0.14);
}

.inline-title-display h2 {
    line-height: 1.15;
}

.inline-title-input {
    min-width: min(100%, 520px);
    max-width: 100%;
    padding: 0.2rem 0.55rem;
    border: 1px solid rgba(37, 98, 87, 0.25);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #18222d;
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 4vw, 2.55rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    cursor: text;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.inline-title-input:focus {
    border-color: rgba(37, 98, 87, 0.25);
    background: rgba(255, 255, 255, 0.9);
}

.inline-title-status {
    min-height: 1.15rem;
    padding-left: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.inline-type-editor {
    display: grid;
    gap: 0;
    padding-left: 0.35rem;
    margin-top: -0.1rem;
}

.inline-type-select {
    width: fit-content;
    min-width: 210px;
    min-height: 36px;
    border: 1px solid rgba(72, 86, 102, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.32rem 2.1rem 0.32rem 0.75rem;
    cursor: pointer;
}

.team-game-results-zone {
    border-radius: 16px;
    transition: box-shadow 0.18s ease, background-color 0.18s ease;
}

.team-game-results-zone.team-game-results-zone-active {
    background: #eef6f3;
    box-shadow: 0 0 0 2px rgba(46, 111, 99, 0.18);
}

.team-game-sortable tbody tr[draggable="true"] {
    cursor: grab;
}

.team-game-sortable tbody tr[draggable="true"] td {
    user-select: none;
}

.team-game-squad-name-cell {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.team-game-placement-cell {
    vertical-align: middle;
}

.team-game-placement-cell .form-control {
    min-width: 0;
}

.team-game-squad-badge-wrap {
    display: inline-flex;
    justify-content: center;
    width: 1.4rem;
    flex: 0 0 1.4rem;
}

.competition-time-editor {
    display: grid;
    gap: 0.25rem;
}

.competition-timer-panel,
.competition-timer-paused {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(72, 86, 102, 0.14);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(28, 37, 44, 0.08);
}

.competition-timer-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.competition-timer-disclosure {
    display: inline-block;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.competition-timer-disclosure[open] {
    display: block;
    width: 100%;
}

.competition-timer-disclosure summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.15rem 0;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--text-muted);
    user-select: none;
}

.competition-timer-disclosure summary::-webkit-details-marker {
    display: none;
}

.competition-timer-disclosure summary::after {
    content: "▾";
    margin-left: 0.05rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.competition-timer-disclosure[open] summary::after {
    content: "▴";
}

.competition-timer-disclosure-body {
    padding-top: 0.65rem;
    width: 100%;
}

.competition-bulk-start-disclosure {
    position: relative;
}

.competition-bulk-start-disclosure summary {
    list-style: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    user-select: none;
}

.competition-bulk-start-disclosure summary::-webkit-details-marker {
    display: none;
}

.competition-bulk-start-disclosure summary::after {
    content: "▾";
    margin-left: 0.35rem;
    font-size: 0.75rem;
}

.competition-bulk-start-disclosure[open] summary::after {
    content: "▴";
}

.competition-bulk-start-popover {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 5;
    padding: 0.55rem;
    border: 1px solid rgba(72, 86, 102, 0.14);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(28, 37, 44, 0.12);
}

.competition-timer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}

.competition-timer-card {
    display: grid;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 2px solid #dee2e6;
    background: #ffffff;
}

.competition-timer-card[data-timer-card-state="running"] {
    border-color: #198754;
    background: #d1e7dd;
}

.competition-timer-card[data-timer-card-state="paused"] {
    border-color: #ffc107;
    background: #fff3cd;
}

.competition-timer-card-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.competition-timer-card-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.18);
    flex: 0 0 12px;
}

.competition-timer-card-name {
    font-weight: 700;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.competition-timer-card-time {
    font-family: monospace;
    font-size: 1.15rem;
    font-weight: 700;
}

.competition-timer-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.competition-time-editor-main {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.competition-time-editor-main .form-control {
    width: 110px;
    min-width: 0;
    flex: 0 0 110px;
}

.competition-time-editor-main .btn {
    white-space: nowrap;
    flex: 0 0 auto;
}

.competition-timer-status[data-timer-state="running"] {
    color: #198754 !important;
    font-weight: 600;
}

.competition-timer-status[data-timer-state="paused"] {
    color: #b58105 !important;
    font-weight: 600;
}

.team-game-sortable tbody tr.team-game-dragging {
    opacity: 0.55;
}

.team-game-sortable tbody tr.team-game-drop-before > * {
    box-shadow: inset 0 4px 0 #2e6f63;
}

.team-game-sortable tbody tr.team-game-drop-after > * {
    box-shadow: inset 0 -4px 0 #2e6f63;
}

.team-game-sortable tbody tr.team-game-drop-tie > * {
    background-color: #eef6f3;
}

.team-game-tail-drop-zone {
    display: none;
    margin: 0.75rem 0 0;
    border: 2px dashed rgba(46, 111, 99, 0.32);
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.8rem 1rem;
    text-align: center;
}

.team-game-tail-drop-zone.team-game-tail-drop-zone-active {
    display: block;
}

.team-game-empty-drop-zone {
    border: 1px dashed rgba(72, 86, 102, 0.2);
    border-radius: 16px;
    color: var(--text-muted);
    padding: 1.25rem;
    text-align: center;
}

.team-game-empty-drop-zone.team-game-empty-drop-zone-active,
.team-game-empty-drop-zone.team-game-empty-drop-zone-highlight {
    border-color: rgba(46, 111, 99, 0.45);
    background: #eef6f3;
}

.team-game-nonparticipant-zone {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 1.15rem 1.2rem;
}

.team-game-nonparticipant-zone.team-game-nonparticipant-zone-active {
    border-color: rgba(46, 111, 99, 0.38);
    background: #eef6f3;
}

.team-game-nonparticipant-table {
    margin-bottom: 0;
}

.team-game-nonparticipant-table tbody tr.team-game-nonparticipant-item {
    cursor: grab;
    user-select: none;
}

.team-game-nonparticipant-table tbody tr.team-game-nonparticipant-item td {
    vertical-align: middle;
}

.team-game-nonparticipant-action-cell {
    width: 1%;
    white-space: nowrap;
}

.team-game-nonparticipant-table tbody tr.team-game-nonparticipant-item.team-game-dragging {
    opacity: 0.55;
}

.inline-type-status {
    min-height: 1.15rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.inline-title-status[data-state="success"] {
    color: #1c6a4d !important;
}

.inline-title-status[data-state="error"] {
    color: #8b4133 !important;
}

.inline-type-status[data-state="success"] {
    color: #1c6a4d !important;
}

.inline-type-status[data-state="error"] {
    color: #8b4133 !important;
}

.squad-members-card {
    overflow: hidden;
}

.squad-members-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 96px;
}

.squad-members-title {
    min-width: 0;
    font-size: 1.05rem;
}

.squad-members-meta {
    display: grid;
    align-content: center;
    justify-items: end;
    gap: 0.2rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    text-align: right;
    min-height: 48px;
}

.squad-members-meta strong {
    color: var(--text-main);
    font-weight: 700;
}

.squad-members-meta-line {
    display: block;
}

.squad-members-meta-placeholder {
    visibility: hidden;
}

.squad-members-table tbody tr:first-child td {
    border-top: 0;
}

.squad-members-last-name {
    font-weight: 700;
}

.squad-members-category {
    color: var(--text-muted);
    white-space: nowrap;
}

.squad-members-tent {
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .squad-settings-card-header {
        align-items: flex-start;
    }

    .squad-settings-card-header .squad-badge {
        margin-top: 0.35rem;
    }

    .squad-members-card-header {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
    }

    .squad-members-meta {
        justify-items: start;
        text-align: left;
        min-height: 0;
    }
}
