/* Variables and base styles are defined in app.css — loaded first */

/* =====================
   Impersonation Banner
   ===================== */
.impersonate-banner {
    position: sticky;
    top: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: .6rem 1.5rem;
    background: linear-gradient(90deg, #7c3aed, #4c1d95);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
}
.impersonate-return-btn {
    padding: .3rem .85rem;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 6px;
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.impersonate-return-btn:hover { background: rgba(255,255,255,.25); }

/* =====================
   App Shell Layout
   ===================== */

html, body { overflow-x: hidden; max-width: 100%; }

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- Top Nav ---- */
.app-topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    height: 100px;
}

.topnav-inner {
    padding: 0 2rem;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr minmax(0, auto) 1fr;
    align-items: center;
}

.topnav-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    text-decoration: none;
    overflow: hidden;
}

.topnav-logo-svg {
    display: block;
    width: 240px;
    height: auto;
}

/* 380–720px: hide /002 tag, show ball + wordmark */
@media (max-width: 720px) {
    .logo__tag { display: none; }
    .topnav-logo-svg { width: 180px; }
}

/* <380px: show ball icon only (32×32) */
@media (max-width: 380px) {
    .logo__name { display: none; }
    .topnav-logo { width: 32px; height: 32px; }
    .topnav-logo-svg { width: 160px; height: 32px; }
}

.topnav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}

.topnav-link {
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    color: var(--text-sec);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.topnav-link:hover {
    background: var(--green-subtle);
    color: var(--green);
}

.topnav-link.active {
    background: var(--green-subtle);
    color: var(--green);
    font-weight: 600;
}

.topnav-link--new {
    color: var(--green);
    border: 1px solid rgba(217,230,53,0.25);
    margin-left: 0.5rem;
}

.topnav-link--new:hover {
    background: var(--green-subtle);
    color: var(--green-hover);
}

/* ---- Right side ---- */
.topnav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.topnav-signin-btn {
    padding: .38rem .9rem;
    background: var(--text);
    color: var(--zzt-cream);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.topnav-signin-btn:hover { background: var(--green); color: var(--zzt-cream); }

.topnav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    transition: background 0.15s;
    user-select: none;
    position: relative;
}

.topnav-user:hover,
.topnav-user--open { background: var(--green-subtle); }

.topnav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 0;
}

.topnav-avatar--lg {
    width: 38px;
    height: 38px;
    font-size: 1rem;
}

.topnav-username {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.topnav-chevron {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* ---- Topnav dropdown ---- */
.topnav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 210px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.topnav-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.6rem 0.6rem;
}

.topnav-dd-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.topnav-dd-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.topnav-divider {
    height: 1px;
    background: var(--border);
    margin: 0.2rem 0;
}

.topnav-dd-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-body);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
    font-family: inherit;
}

.topnav-dd-item:hover { background: var(--green-subtle); color: var(--green); }
.topnav-dd-danger:hover { background: #FDF0F0; color: var(--red); }

/* ---- Hamburger (mobile only) ---- */
.topnav-hamburger {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem 0.55rem;
    line-height: 1;
}

/* ---- Main content area ---- */
.app-main {
    flex: 1;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: 2.5rem 3rem;
    width: 100%;
    box-sizing: border-box;
}
.app-content:has(> .ev-page) { padding: 0; }

/* =====================
   Global Card
   ===================== */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    color: var(--text);
}

/* =====================
   Page Layout (About / Privacy / How It Works)
   ===================== */

.page-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
    width: 100%;
}

.page-header {
    margin-bottom: 0.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.4rem;
    color: var(--text);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* =====================
   Dashboard
   ===================== */

.dash-page {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.dash-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 0.3rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: .45rem;
}

.page-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.page-header-title-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.page-header-title-wrap h1 {
    margin: 0;
}

.dash-name { color: var(--text); }

.dash-eyebrow {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--text-muted);
    font-family: var(--font-mono, monospace);
    margin-bottom: .35rem;
}

.dash-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 0;
}

.dash-btn-primary {
    background: var(--brand);
    color: var(--text);
    padding: 0.65rem 1.4rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-green);
    white-space: nowrap;
}

.dash-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(217,230,53,0.30);
    color: var(--text);
    background: var(--brand-hover);
}

/* Stats */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.dash-stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.8rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dash-stat-icon { display: flex; align-items: center; justify-content: center; color: var(--text-muted); margin-bottom: .1rem; }

.dash-stat-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--green);
    letter-spacing: -0.03em;
    line-height: 1;
}

.dash-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Section title */
.dash-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: .4rem;
}

/* Quick actions */
.dash-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.dash-action-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dash-action-card:hover {
    border-color: var(--green);
    box-shadow: var(--shadow-green);
    transform: translateY(-2px);
}

.dash-action-icon { display: flex; align-items: center; justify-content: center; color: var(--zzt-ink); margin-bottom: .5rem; }

.dash-action-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 0.2rem;
}

.dash-action-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Empty state */
.dash-empty {
    background: var(--card);
    border: 1.5px dashed var(--border);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.dash-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.dash-empty p { margin: 0; }

/* My Tournaments list */
.dash-btn-secondary {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    border: 1.5px solid var(--green);
    border-radius: 8px;
    color: var(--green);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.dash-btn-secondary:hover { background: var(--green-subtle); }

.dash-tournament-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-tournament-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dash-tournament-row:hover {
    border-color: var(--green);
    box-shadow: var(--shadow-sm);
}

.dash-t-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--green-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 1.4rem;
}
.dash-t-logo img { width: 100%; height: 100%; object-fit: cover; }

.dash-t-info { flex: 1; min-width: 0; }
.dash-t-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-t-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.dash-t-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}
.dash-t-days { font-size: 0.8rem; color: var(--text-muted); }

.dash-t-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.dash-t-badge--open       { background: #d4edda; color: #1a6b32; }
.dash-t-badge--upcoming   { background: #d1ecf1; color: #0c5460; }
.dash-t-badge--inprogress { background: var(--bg)3cd; color: #856404; }
.dash-t-badge--completed  { background: #e2e3e5; color: #495057; }
.dash-t-badge--cancelled  { background: #f8d7da; color: #721c24; }

/* ── Rating History Chart ───────────── */
.rating-chart-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem 1rem;
}
.rating-chart-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}
.rating-chart-tab {
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: .3rem .9rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.rating-chart-tab:hover { color: var(--text); border-color: var(--text-muted); }
.rating-chart-tab--active { border-color: var(--green); color: var(--green); }
.rating-chart-meta {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin-bottom: .75rem;
}
.rating-chart-current {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.rating-chart-delta {
    font-size: .88rem;
    font-weight: 700;
}
.rating-chart-delta--up   { color: #16a34a; }
.rating-chart-delta--down { color: #ef4444; }
.rating-chart-span {
    font-size: .78rem;
    color: var(--text-muted);
    margin-left: auto;
}
.rating-chart-svg {
    width: 100%;
    height: 90px;
    display: block;
    overflow: visible;
}
.rating-chart-axis {
    display: flex;
    justify-content: space-between;
    font-size: .7rem;
    color: var(--text-muted);
    margin-top: .35rem;
    padding: 0 .1rem;
}
.rating-chart-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
    padding: 2rem 0 1rem;
}

@media (max-width: 600px) {
    .dash-tournament-row { padding: 0.85rem 1rem; gap: 0.75rem; }
    .dash-t-logo { width: 38px; height: 38px; font-size: 1.2rem; }
    .dash-t-name { font-size: 0.88rem; }
    .dash-t-badge { font-size: 0.7rem; }
}

/* ── Dashboard 3-card grid ───────────────────────── */
.dash-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
    align-items: stretch;
}

/* Card shell — matches court-card-v2 style from bracket page */
.dc-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    transition: box-shadow .2s;
}

/* HEAD — green header matching court-card-v2-header */
.dc-head {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .75rem 1.25rem;
    background: var(--green);
    border-bottom: 1px solid rgba(0,0,0,.12);
    flex-shrink: 0;
}

.dc-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.45);
    flex-shrink: 0;
}
.dc-dot--pulse {
    background: #fff;
    animation: dc-pulse 1.4s ease-in-out infinite;
}
@keyframes dc-pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.35; transform:scale(1.6); }
}

.dc-title {
    flex: 1;
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dc-badge {
    background: rgba(0,0,0,.18);
    color: #fff;
    border-radius: 20px;
    padding: .1rem .55rem;
    font-size: .72rem;
    font-weight: 700;
    font-family: monospace;
    min-width: 20px;
    text-align: center;
}

/* BODY — scrollable, equal height */
.dc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 420px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.dc-item {
    padding: .65rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.dc-item:last-child { border-bottom: none; }

/* Created items are clickable links */
.dc-item--link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background .12s;
}
.dc-item--link:hover { background: rgba(166,255,0,.05); }

/* Results divider */
.dc-results-divider {
    padding: .35rem 1.25rem;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    background: var(--card-alt, rgba(0,0,0,.06));
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

/* FOOT */
.dc-foot {
    padding: .6rem 1.25rem;
    background: var(--card-alt, rgba(0,0,0,.06));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.dc-foot-note {
    font-size: .68rem;
    color: var(--text-muted);
    letter-spacing: .05em;
    font-family: monospace;
    text-transform: uppercase;
}
.dc-foot-link {
    font-size: .68rem;
    font-weight: 700;
    color: var(--green);
    text-decoration: none;
    letter-spacing: .05em;
    font-family: monospace;
    text-transform: uppercase;
}
.dc-foot-link:hover { text-decoration: underline; }

/* Match strip (Active Tournaments) */
.dc-match-strip { display: flex; align-items: center; gap: .55rem; }

.dc-court-tile {
    width: 34px; height: 34px;
    border-radius: 7px;
    background: #1F3A26;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dc-court-label {
    font-family: monospace;
    font-size: .55rem;
    font-weight: 700;
    color: rgba(217,230,53,.65);
    letter-spacing: .1em;
    line-height: 1;
}
.dc-court-num {
    font-family: monospace;
    font-size: .9rem;
    font-weight: 800;
    color: #D9E635;
    line-height: 1;
}

.dc-match-info { flex: 1; min-width: 0; overflow: hidden; }
.dc-match-teams {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .2rem;
    min-width: 0;
}
/* Each team group takes half the available space and truncates */
.dc-team-group {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.dc-av-stack {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.dc-mini-av {
    width: 32px; height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 800;
    color: #141613;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.dc-mini-av img { width: 100%; height: 100%; object-fit: cover; }

.dc-av-link { display: inline-flex; line-height: 0; flex-shrink: 0; }
.dc-av-link:hover .dc-mini-av { border-color: var(--green); }

.dc-vs { color: var(--text-muted); font-weight: 400; font-size: .72rem; flex-shrink: 0; white-space: nowrap; }
.dc-team-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}
.dc-team-link:hover { color: var(--green); text-decoration: underline; }
.dc-match-ctx {
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: .12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status pills */
.dc-status-pill {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .06em;
    padding: .2rem .45rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: monospace;
}
.dc-pill--live    { background: rgba(239,68,68,.15); color: #ef4444; animation: dc-pulse 1.4s ease-in-out infinite; }
.dc-pill--soon    { background: rgba(166,255,0,.13); color: #3b8a5a; }
.dc-pill--pending { background: var(--border); color: var(--text-muted); }

/* Result icon (W/L badge) */
.dc-result-icon {
    width: 24px; height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: .65rem;
    font-weight: 700;
    flex-shrink: 0;
}
.dc-ri--w { background: rgba(22,163,74,.15); color: #16a34a; }
.dc-ri--l { background: rgba(239,68,68,.15); color: #ef4444; }
.dc-rdelta { font-family: monospace; font-size: .68rem; font-weight: 700; flex-shrink: 0; }

/* Upcoming rows */
.dc-upcoming-row { display: flex; align-items: center; gap: .65rem; }

.dc-crest {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--green-subtle, rgba(166,255,0,.1));
    color: #3b8a5a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .04em;
    flex-shrink: 0;
}
.dc-crest--urgent { background: rgba(239,68,68,.1); color: #ef4444; }

.dc-item-name {
    font-size: .84rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dc-countdown { text-align: right; flex-shrink: 0; min-width: 38px; }
.dc-countdown-num {
    font-family: monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.dc-countdown-lbl {
    font-family: monospace;
    font-size: .46rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-top: .06rem;
}
.dc-countdown--urgent .dc-countdown-num { color: #ef4444; }
.dc-countdown--urgent .dc-countdown-lbl { color: #ef4444; }
.dc-countdown--live .dc-countdown-num { color: var(--green); font-size: 1rem; }
.dc-countdown--live .dc-countdown-lbl { color: var(--green); }
.dc-vol-badge {
    display: inline-block; margin-left: .4rem;
    font-size: .65rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    background: rgba(217,230,53,.15); color: var(--green);
    padding: .1rem .4rem; border-radius: 4px; vertical-align: middle;
}

/* Created card rows */
.dc-created-row { display: flex; align-items: flex-start; gap: .65rem; }

.dc-prog-wrap {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin: .3rem 0 .18rem;
}
.dc-prog-bar { height: 100%; background: var(--green); border-radius: 2px; transition: width .4s ease; }
.dc-prog-label { font-size: .65rem; color: var(--text-muted); }

.dc-spill {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: .2rem .5rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    font-family: monospace;
}
.dc-spill--open       { background: rgba(22,163,74,.12); color: #16a34a; }
.dc-spill--inprogress { background: rgba(166,255,0,.12); color: #3b8a5a; }
.dc-spill--completed  { background: var(--border); color: var(--text-muted); }
.dc-spill--draft      { background: var(--border); color: var(--text-muted); opacity: .7; }
.dc-spill--cancelled  { background: rgba(239,68,68,.12); color: #ef4444; }

/* CTA dashed box */
.dc-cta-box {
    margin: .6rem 1.25rem .75rem;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.dc-cta-eyebrow {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--text-muted);
    font-family: monospace;
    text-transform: uppercase;
}
.dc-cta-action {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--green);
    text-decoration: none;
    font-family: monospace;
    text-transform: uppercase;
}
.dc-cta-action:hover { text-decoration: underline; }

/* Empty state */
.dc-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    text-align: center;
    gap: .4rem;
}
.dc-empty-label { font-size: .82rem; color: var(--text-muted); font-weight: 600; }
.dc-empty-sub   { font-size: .74rem; color: var(--text-muted); }
.dc-empty-cta {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--green);
    text-decoration: none;
    margin-top: .5rem;
    font-family: monospace;
}

/* Responsive */
@media (max-width: 1500px) {
    .dash-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
    .dash-cards-grid { grid-template-columns: 1fr; }
    .dc-body { max-height: none; }
}

@media (max-width: 600px) {
    .dc-mini-av { width: 24px; height: 24px; font-size: .55rem; border-width: 1.5px; }
    .dc-av-stack { gap: 2px; }
    .dc-match-strip { gap: .35rem; }
    .dc-team-group { gap: .15rem; min-width: 0; flex: 1; overflow: hidden; }
    .dc-team-link {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        min-width: 0;
    }
    .dc-vs { margin: 0 .1rem; flex-shrink: 0; }
    .dc-court-tile { width: 32px; height: 32px; flex-shrink: 0; }
    .dc-court-num { font-size: .82rem; }
    .dc-court-label { font-size: .5rem; }
    .dc-status-pill { font-size: .6rem; padding: .2rem .35rem; flex-shrink: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
    .dash-stats   { grid-template-columns: repeat(2, 1fr); }
    .dash-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Mobile nav */
    .app-topnav { height: 60px; }
    .topnav-inner { padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; }
    .topnav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #FFFFFF;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1rem;
        gap: 0.25rem;
        z-index: 99;
    }
    .topnav-links.open { display: flex; }
    .topnav-hamburger { display: block; }
    .topnav-username { display: none; }
    .app-content { padding: 1rem; }
    /* Solid background on mobile — gradient looks like a floating card */
    html, body { background: var(--bg-solid); }
    .app-main { background: var(--bg-solid); }
}

@media (max-width: 640px) {
    .dash-stats   { grid-template-columns: 1fr; }
    .dash-actions { grid-template-columns: 1fr; }
    .dash-title { font-size: 1.4rem; }
    .dash-header { flex-direction: column; align-items: flex-start; }
}

/* (sidebar styles removed — using topnav dropdown now)

/* =====================
   Profile page
   ===================== */

.profile-loading {
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 2rem 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.profile-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.6rem;
    box-shadow: var(--shadow-md);
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.4rem;
}

.profile-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
}

.profile-full-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.profile-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.profile-role-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.role-admin {
    background: #fef3c7;
    color: #92400e;
}

.role-player {
    background: #dcfce7;
    color: var(--green);
}

.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.profile-stat { text-align: center; }

.profile-stat-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--green);
}

.profile-stat-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.15rem;
}

.profile-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1.2rem;
}

.profile-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.profile-toggle-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.profile-toggle-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.profile-success {
    background: var(--brand-subtle);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: var(--green);
    font-size: 0.84rem;
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.8rem;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input { display: none; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--bg)fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Responsive */
@media (max-width: 820px) {
    .profile-grid { grid-template-columns: 1fr; }
}

/* Players search */
.players-search-wrap {
    width: 100%;
    max-width: 480px;
}

.players-search {
    width: 100%;
    padding: 0.75rem 1.1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    background: var(--bg)fff;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s;
}

.players-search:focus {
    border-color: var(--text-body);
    box-shadow: 0 0 0 3px rgba(55,65,81,0.1);
}

/* Ratings tabs */
.ratings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: -0.8rem;
}

.ratings-tab {
    padding: 0.55rem 1.4rem;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ratings-tab:hover,
.ratings-tab.active {
    background: var(--green);
    border-color: var(--green);
    color: #FFFFFF;
    font-weight: 700;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--green);
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.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."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.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;
}
/* =====================
   Landing Page
   ===================== */

/* body:has(.lp-container) — removed; homepage now uses hp-page (scrollable) */

.lp-deco {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.lp-deco:nth-child(1) {
    width: 450px; height: 450px;
    top: -180px; right: -120px;
    background: radial-gradient(circle, rgba(31,58,38,0.07), transparent 70%);
    animation: lpDrift 20s ease-in-out infinite;
}
.lp-deco:nth-child(2) {
    width: 350px; height: 350px;
    bottom: -120px; left: -80px;
    background: radial-gradient(circle, rgba(59,130,246,0.04), transparent 70%);
    animation: lpDrift 25s ease-in-out infinite reverse;
}
@keyframes lpDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -15px) scale(1.03); }
}

.lp-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.lp-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lp-about-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-sec);
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 100px;
    transition: all 0.2s ease;
}
.lp-about-link:hover {
    color: var(--green);
    background: rgba(31,58,38,0.07);
}

.lp-container {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 2.5rem;
    z-index: 1;
    background: var(--bg);
    overflow: auto;
}

@keyframes lpLogoIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lp-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    animation: lpFadeUp 0.8s ease-out 0.2s both;
}

.lp-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text);
    width: 100%;
    max-width: 700px;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    animation: lpFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.lp-subtitle {
    font-size: 1.25rem;
    color: var(--text-sec);
    line-height: 1.7;
    width: 100%;
    max-width: 560px;
    margin-bottom: 2rem;
    animation: lpFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

@keyframes lpFadeUp {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lp-badges {
    display: flex;
    justify-content: center;
    gap: 0.875rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    animation: lpFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.2s both;
}

.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59,138,90,0.12);
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-body);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
}
.lp-badge:hover {
    background: rgba(255,255,255,0.95);
    border-color: rgba(217,230,53,0.30);
    box-shadow: 0 4px 16px rgba(217,230,53,0.12);
    transform: translateY(-2px);
}

.lp-signin-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-sec);
    background: none;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 101;
    white-space: nowrap;
    flex-shrink: 0;
}
.lp-signin-btn:hover {
    color: var(--green);
    background: rgba(31,58,38,0.07);
}

.lp-events-btn {
    display: inline-block;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: .7rem 1.75rem;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: var(--shadow-green);
    transition: opacity .15s, transform .12s;
}
.lp-events-btn:hover { opacity: .88; transform: translateY(-1px); }

.lp-footer {
    position: fixed;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--green-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 2;
    animation: lpFadeUp 0.8s ease-out 0.6s both;
}

/* Login popup modal */
.lp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26,33,48,0.45);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lpFadeIn 0.2s ease;
}
@keyframes lpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lp-modal {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.15);
    position: relative;
    animation: lpModalIn 0.25s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes lpModalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lp-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: color 0.15s;
}
.lp-modal-close:hover { color: var(--text); }

.lp-modal-logo {
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 1.25rem;
}

.lp-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.lp-modal-sub {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .lp-topbar { padding: 0.6rem 1rem; }
    .lp-topbar-right { gap: 0.25rem; }
    .lp-about-link { padding: 0.5rem 0.6rem; font-size: 0.82rem; }
    .lp-signin-btn { padding: 0.5rem 0.75rem; font-size: 0.82rem; }
    .lp-container { padding: 5rem 1.25rem 4rem; }
    .lp-title { font-size: 2.2rem; }
    .lp-subtitle { font-size: 1rem; }
    .lp-badges { gap: 0.5rem; }
    .lp-badge { padding: 0.6rem 1rem; font-size: 0.85rem; }
    .lp-modal {
        padding: 2rem 1.25rem 1.5rem;
        margin: 0.75rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    .lp-modal-logo { width: 160px; }
    .auth-field-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .lp-about-link { display: none; }
    .lp-signin-btn { font-size: 0.8rem; padding: 0.45rem 0.7rem; }
}

/* =====================
   Auth Pages (Login + Register)
   ===================== */

.auth-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: stretch;
    justify-content: center;
    animation: authFadeIn 0.35s ease;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Split panel card ---- */
.auth-panel {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
}

/* ---- Left: brand panel ---- */
.auth-panel-left {
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}

.auth-panel-logo {
    width: 100%;
    max-width: 220px;
    height: auto;
}

.auth-panel-tagline {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0;
}

.auth-panel-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1;
}

.auth-features-heading {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 0.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    padding-left: 0.875rem;
    border-left: 2px solid #D9E635;
}

.auth-feature-title {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.18rem;
}

.auth-feature-desc {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

/* ---- Right: white form panel ---- */
.auth-panel-right {
    background: var(--card);
    padding: 3.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-right-logo {
    display: block;
    width: auto;
    height: 32px;
    margin-bottom: 1.75rem;
    border-radius: 4px;
}

/* ---- Card title / subtitle ---- */
.auth-card-title {
    color: var(--text);
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

.auth-card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.8rem;
}

/* ---- Form fields ---- */
.auth-field {
    margin-bottom: 1rem;
}

.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 0;
}

.auth-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.auth-label-hint {
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0;
}

.auth-input {
    width: 100%;
    background: var(--card-alt) !important;
    border: 1.5px solid #9FAAB8 !important;
    border-radius: 10px !important;
    color: var(--text) !important;
    padding: 0.72rem 1rem !important;
    font-size: 0.93rem !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06) !important;
}

.auth-input::placeholder { color: var(--text-muted) !important; }

.auth-input:focus {
    background: #FFFFFF !important;
    border-color: var(--green) !important;
    box-shadow: 0 0 0 3px rgba(217,230,53,0.12) !important;
}

.auth-validation {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.ct-validation-summary {
    color: #dc2626;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    padding-left: 1.25rem;
}
.ct-validation-summary:empty { display: none; }

.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.84rem;
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.8rem;
}

/* ---- Buttons ---- */
.auth-btn {
    width: 100%;
    background: var(--brand);
    border: none;
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.85rem;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
    text-decoration: none;
    box-shadow: var(--shadow-green);
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217,230,53,0.30);
    background: var(--brand-hover);
    color: #FFFFFF;
}

.auth-btn:active:not(:disabled) { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.auth-btn-outline {
    display: block;
    width: 100%;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.72rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-btn-outline:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-subtle);
}

.auth-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.7s linear infinite;
}
.btn-primary .auth-btn-spinner {
    border-color: rgba(20,22,19,0.25);
    border-top-color: #141613;
}

@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.2rem 0 0.8rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}


/* ---- Responsive ---- */
@media (max-width: 820px) {
    .auth-panel { grid-template-columns: 1fr; }
    .auth-panel-left { display: none; }
    .auth-panel-right { padding: 2.5rem 2rem; }
}

@media (max-width: 480px) {
    .auth-panel-right { padding: 2rem 1.5rem; }
    .auth-field-row { grid-template-columns: 1fr; }
}

/* =====================
   TOURNAMENT PAGES
   ===================== */

/* Shared buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: var(--brand);
    color: var(--text);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: var(--shadow-green);
}
.btn-primary:hover { opacity: 0.92; box-shadow: 0 6px 20px rgba(217,230,53,0.30); color: var(--text); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: #FFFFFF;
    color: var(--text-sec);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
}
.btn-outline:hover { background: var(--green-subtle); border-color: var(--green); color: var(--green); }

.btn-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}
.btn-warning:hover {
    background: rgba(245,158,11,.1) !important;
}

/* Registration share bar */
.reg-share-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: rgba(99,102,241,.07);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 10px;
    padding: .6rem 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.reg-share-label {
    font-size: .8rem;
    font-weight: 600;
    color: #6366f1;
    white-space: nowrap;
}
.reg-share-url {
    font-size: .82rem;
    font-family: monospace;
    color: #94a3b8;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .reg-share-url { display: none; }
    .reg-share-bar { gap: .5rem; padding: .5rem .75rem; }
}

/* Flyer register link */
.flyer-register-link {
    display: inline-block;
    background: #6366f1;
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: .55rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: .5rem;
}
.flyer-register-link:hover {
    background: #4f46e5;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.btn-danger:hover { opacity: 0.88; }
.btn-danger:disabled { opacity: 0.55; cursor: not-allowed; }

/* dash-header action button alignment */
.dash-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }

/* Player avatar in dash header */
.dash-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #141613;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Filter chips */
.tournament-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-chip {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--green); color: var(--green); background: var(--green-subtle); }
.filter-chip.active {
    background: var(--green);
    color: #FFFFFF;
    border-color: var(--green);
    font-weight: 700;
}

/* Tournament grid */
.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

.tournament-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 1.6rem 1.6rem 1.2rem;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    box-shadow: var(--shadow-sm);
}
.tournament-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(217,230,53,0.25);
    transform: translateY(-2px);
}

/* Card top row: logo + badges */
.tc2-top {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
}
.tc2-top .tournament-card-header { flex: 1; }
.tc2-logo {
    width: 64px; height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.tournament-card-header {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tournament-card-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
    letter-spacing: -.01em;
}

.tc2-meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .84rem;
    color: var(--text-muted);
}

.tournament-card-desc {
    font-size: 0.875rem;
    color: var(--text-sec);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stats strip */
.tc2-stats {
    display: flex;
    align-items: center;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .65rem .9rem;
}
.tc2-stat { display: flex; flex-direction: column; align-items: center; flex: 1; gap: .1rem; }
.tc2-stat-num  { font-size: 1.2rem; font-weight: 800; color: var(--text); line-height: 1; }
.tc2-stat-lbl  { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; text-align: center; }
.tc2-stat-zero { color: #dc2626; }
.tc2-stat-sep  { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }

.tournament-card-winner {
    font-size: 0.84rem;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: .4rem .75rem;
    font-weight: 500;
}

.tournament-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.players-full { color: #dc2626; font-weight: 600; }

.registered-badge {
    background: #dcfce7;
    color: #16a34a;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Format badges */
.tournament-format-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.format-singles { background: #dbeafe; color: #1d4ed8; }
.format-doubles { background: #ede9fe; color: #7c3aed; }
.format-mixed   { background: #fef3c7; color: #d97706; }

/* Status badges */
.tournament-status-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.status-draft      { background: #f1f5f9; color: #64748b; }
.status-open       { background: #dcfce7; color: #16a34a; }
.status-inprogress { background: #fef3c7; color: #d97706; }
.status-completed  { background: #e2e8f0; color: #475569; }
.status-cancelled  { background: #fee2e2; color: #dc2626; }

/* Loading state */
.tournaments-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 0;
    color: #64748b;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Create / Edit tournament — two-column layout */
.ct-form-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.25rem;
    align-items: start;
}
.ct-col-main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.ct-col-side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 1rem;
}
/* Payment method picker */
.ct-payment-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .6rem;
}

.ct-payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .75rem .5rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    background: var(--card);
    transition: border-color .15s, background .15s;
    position: relative;
}

.ct-payment-option:hover {
    border-color: var(--accent);
}

.ct-payment-option.selected {
    border-color: var(--accent);
    background: rgba(166,255,0,.07);
}

.ct-payment-icon { font-size: 1.4rem; }
.ct-payment-label { font-size: .78rem; font-weight: 600; color: var(--text); }

.ct-payment-check {
    display: none;
    position: absolute;
    top: .35rem;
    right: .45rem;
    font-size: .7rem;
    color: var(--accent);
    font-weight: 700;
}

.ct-payment-option.selected .ct-payment-check { display: block; }

@media (max-width: 480px) {
    .ct-payment-options { grid-template-columns: repeat(2, 1fr); }
}

.ct-submit-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem 1.6rem;
}
@media (max-width: 900px) {
    .ct-form-layout {
        grid-template-columns: 1fr;
    }
    .ct-col-side {
        position: static;
    }
}

/* Info boxes */
.ct-info-box {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.75rem;
}

.ct-pool-summary {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    background: var(--green-subtle);
    border: 1px solid rgba(59,138,90,.2);
    border-radius: 10px;
    padding: .75rem 1rem;
    font-size: .88rem;
    color: var(--text-body);
    margin-top: .5rem;
}

.ct-info-box-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.ct-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.ct-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-sec);
    line-height: 1.5;
}

.ct-info-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

/* Tier explanation grid */
.ct-tier-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ct-tier-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-sec);
}

/* Bracket preview box */
.ct-bracket-preview {
    background: var(--green-subtle);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-top: 0.75rem;
}

.ct-bracket-preview-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.ct-bracket-preview-tiers {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.ct-bracket-preview-tier {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.ct-preview-label {
    font-weight: 700;
    min-width: 80px;
}

.ct-preview-teams {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
}

.ct-preview-arrow { color: var(--text-muted); }

.ct-preview-rounds {
    font-size: 0.82rem;
    color: var(--green);
    font-weight: 600;
}

.ct-seeding-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    line-height: 1.5;
}

/* Tournament Logo upload */
.ct-logo-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.ct-logo-img {
    height: 80px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card-alt);
    padding: 6px;
}
.auth-input-file {
    display: block;
    color: var(--text);
    font-size: 0.85rem;
    padding: 0.4rem 0;
}
.ct-file-chosen {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Sponsor / Prize rows */
.ct-sponsor-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
}
.ct-sponsor-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.ct-remove-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    line-height: 1;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    margin-top: 2px;
}
.ct-remove-btn:hover {
    color: #ef4444;
    border-color: #ef4444;
}
.btn-sm {
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
}
.btn-outline.btn-danger {
    background: #fff;
    border: 1.5px solid #ef4444;
    color: #ef4444;
}
.btn-outline.btn-danger:hover {
    background: rgba(239,68,68,0.08);
}

@media (max-width: 600px) {
    .ct-info-grid { grid-template-columns: 1fr; }
    .ct-bracket-preview-tier { flex-wrap: wrap; gap: 0.4rem; }
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 1.25rem 0 0.75rem;
}

.auth-textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Tournament detail */
.tournament-detail-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.detail-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Info stats row */
.tournament-info-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tstat {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.tstat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.tstat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

/* Action row at bottom of info card */
.tournament-info-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

/* Two-column body below info card */
.tournament-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 1.25rem;
    align-items: start;
}

/* When tools column is absent, players card spans full width */
.tournament-detail-body > .profile-card:only-child {
    grid-column: 1 / -1;
}

.tournament-detail-tools {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tournament-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.tournament-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    color: var(--text);
}

.tournament-info-label {
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.tournament-desc-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 0.5rem;
}

/* Register section */
.registered-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #16a34a;
    font-weight: 600;
}
.registered-check {
    font-size: 1.1rem;
}
.tournament-full-msg {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Players list in detail */
.profile-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.players-count-badge {
    background: #e2e8f0;
    color: #475569;
    padding: 0.1rem 0.55rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.75rem;
    max-height: 480px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    border-radius: 0 0 8px 8px;
}

.player-list-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}
.player-list-row:last-child { border-bottom: none; }

.player-list-num {
    width: 1.5rem;
    text-align: right;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.player-list-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4b5563, #1f2937);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.player-list-info { flex: 1; }
.player-list-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.player-list-meta { font-size: 0.78rem; color: var(--text-muted); }

.player-list-date {
    font-size: 0.78rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.reg-status-badge {
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}
.reg-status-pending   { background: #fef3c7; color: #92400e; }
.reg-status-confirmed { background: #dcfce7; color: var(--green); }
.reg-status-rejected  { background: #fee2e2; color: #991b1b; }

.btn-reg-confirm {
    padding: .2rem .6rem;
    font-size: .75rem;
    font-weight: 600;
    border: 1.5px solid #16a34a;
    border-radius: 6px;
    color: #16a34a;
    background: var(--brand-subtle);
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.btn-reg-confirm:hover { background: #dcfce7; }

.btn-reg-reject {
    padding: .2rem .6rem;
    font-size: .75rem;
    font-weight: 600;
    border: 1.5px solid #dc2626;
    border-radius: 6px;
    color: #dc2626;
    background: var(--bg)5f5;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.btn-reg-reject:hover { background: #fee2e2; }
.btn-reg-payment {
    display: inline-block;
    padding: .2rem .6rem;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 5px;
    border: 1px solid var(--green);
    color: var(--green);
    background: transparent;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.btn-reg-payment:hover { background: rgba(166,255,0,.1); }

/* Delete confirm card */
.delete-confirm-card {
    border: 1.5px solid #fca5a5;
    background: var(--bg)5f5;
    text-align: center;
}
.delete-confirm-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.delete-confirm-title { font-size: 1rem; font-weight: 700; color: #dc2626; margin-bottom: 0.5rem; }
.delete-confirm-text { font-size: 0.88rem; color: #64748b; margin-bottom: 1rem; }
.delete-confirm-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* dash-empty extras */
.dash-empty-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.dash-empty-text  { font-size: 0.88rem; color: var(--text-muted); }

/* Structure badge on cards */
.tournament-structure-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

/* Structure picker */
.structure-picker {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.structure-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}
.structure-option:hover {
    border-color: var(--border-hover);
    background: var(--card-alt);
}
.structure-option.selected {
    border-color: var(--green);
    background: var(--green-subtle);
}

.structure-option-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 2rem;
    text-align: center;
}

.structure-option-body { flex: 1; }

.structure-option-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.structure-option-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.structure-option-check {
    font-size: 1rem;
    color: #1f2937;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.15s;
}
.structure-option.selected .structure-option-check {
    opacity: 1;
}

/* Responsive tournament */
@media (max-width: 900px) {
    .tournament-detail-body { grid-template-columns: 1fr; }
    .tournament-detail-body > .profile-card:only-child { grid-column: 1; }
}

@media (max-width: 600px) {
    .tournament-grid { grid-template-columns: 1fr; gap: 1rem; }
    .tc2-stats { padding: .5rem .65rem; }
    .tc2-stat-num { font-size: 1rem; }
    .detail-header-actions { width: 100%; }
    .form-actions { flex-direction: column; }
    .form-actions .btn-primary,
    .form-actions .btn-outline { width: 100%; justify-content: center; }
}


/* ══ Nav Login Modal ══ */
.nav-login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.nav-login-modal {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 2rem 1.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    position: relative;
}
.nav-login-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: .25rem .35rem;
    border-radius: 6px;
}
.nav-login-close:hover { background: var(--bg); color: var(--text); }
.nav-login-logo {
    display: block;
    height: 32px;
    margin: 0 auto 1.25rem;
}
.nav-login-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--green);
    margin: 0 0 .25rem;
    text-align: center;
}
.nav-login-sub {
    font-size: .85rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem;
    text-align: center;
}
.nav-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 1rem;
    font-size: .82rem;
}
.nav-login-footer a { color: var(--text-muted); text-decoration: none; }
.nav-login-footer a:hover { color: var(--green); text-decoration: underline; }
.nav-login-sep { color: var(--border); }
@media (max-width: 480px) {
    .nav-login-modal { padding: 1.75rem 1.25rem 1.25rem; }
}
