/* ============================================================================
   MatchFix Padel — Stylesheet
   Theme: "Playtomic-inspired" — electric blue primary, lime accent,
          clean white surfaces, generous rounded corners, modern sans-serif.
   ============================================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================================================
   1. TOKENS
   ============================================================================ */
:root {
    /* Brand colors */
    --brand:          #1f3bff;    /* electric Playtomic-style blue */
    --brand-dark:     #0e1f99;    /* hover/pressed states */
    --brand-deeper:   #081461;    /* dark navy for headings */
    --brand-soft:     #e7ecff;    /* tint for hover/bg accents */
    --brand-softer:   #f4f6ff;    /* very pale tint */

    --accent:         #d9f34a;    /* lime/yellow highlight */
    --accent-dark:    #c3dd2f;
    --accent-soft:    #f4fbd4;

    /* Neutrals */
    --ink:            #0b1220;    /* near-black body text */
    --ink-soft:       #3b4557;    /* secondary text */
    --muted:          #6b7685;    /* tertiary */
    --line:           #e3e7ef;    /* dividers */
    --line-soft:      #eef1f6;    /* very faint */

    --bg:             #ffffff;    /* page background (clean white) */
    --surface:        #ffffff;    /* cards */
    --surface-2:      #f6f8fc;    /* subtle alt surface */
    --surface-3:      #eef2f8;    /* slightly deeper alt */

    /* Semantic */
    --success:        #16a34a;
    --success-soft:   #dcfce7;
    --warning:        #d97706;
    --warning-soft:   #fef3c7;
    --danger:         #dc2626;
    --danger-soft:    #fee2e2;
    --info:           #2563eb;
    --info-soft:      #dbeafe;

    /* Typography */
    --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Radii */
    --radius-sm:      8px;
    --radius:         14px;
    --radius-lg:      22px;
    --radius-xl:      28px;
    --radius-pill:    999px;

    /* Shadows (soft, layered) */
    --shadow-xs:      0 1px 2px rgba(11, 18, 32, 0.04);
    --shadow-sm:      0 2px 6px rgba(11, 18, 32, 0.05);
    --shadow:         0 6px 20px rgba(11, 18, 32, 0.07);
    --shadow-lg:      0 16px 40px rgba(11, 18, 32, 0.10);
    --shadow-brand:   0 10px 30px rgba(31, 59, 255, 0.25);

    /* Layout */
    --container-max:  1200px;
    --container-pad:  24px;
}

/* ============================================================================
   2. RESET & BASE
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--brand-deeper);
    margin: 0 0 12px;
}
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; letter-spacing: -0.025em; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p { margin: 0 0 12px; }

a {
    color: var(--brand);
    text-decoration: none;
    transition: color .15s;
}
a:hover { color: var(--brand-dark); text-decoration: underline; }

small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
    background: var(--surface-3);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ============================================================================
   3. LAYOUT
   ============================================================================ */
.site-wrap {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 32px var(--container-pad);
}

/* Legacy wrapper alias — existing views use .container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 32px var(--container-pad);
}

/* Legacy: header used to use .header-inner */
.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 14px var(--container-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(10px);
}

.site-header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 14px var(--container-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-brand {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 20px;
    color: var(--brand-deeper);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}
.site-brand:hover { text-decoration: none; color: var(--brand); }
.site-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 9px;
    background: var(--brand);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: var(--shadow-brand);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.site-nav a {
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    transition: all .15s;
}
.site-nav a:hover {
    color: var(--brand);
    background: var(--brand-soft);
    text-decoration: none;
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-footer {
    margin-top: 80px;
    padding: 32px var(--container-pad);
    background: var(--surface-2);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}
.site-footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}
@media (max-width: 700px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
.site-footer-brand p { margin: 8px 0 0; }
.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }

/* Hide on mobile */
@media (max-width: 700px) {
    .u-mobile-hide { display: none !important; }
    .site-nav a { padding: 6px 10px; font-size: 13px; }
}

/* ============================================================================
   4. BUTTONS
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--surface);
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s ease;
    white-space: nowrap;
}
.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
    box-shadow: var(--shadow-brand);
}

.btn-accent {
    background: var(--accent);
    color: var(--brand-deeper);
    border-color: var(--accent);
    font-weight: 700;
}
.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--brand-deeper);
}

.btn-outline {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}
.btn-outline:hover {
    background: var(--surface-2);
    border-color: var(--ink-soft);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ink-soft);
}
.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}
.btn-lg {
    padding: 16px 28px;
    font-size: 16px;
}
.btn-block { display: flex; width: 100%; }

.inline { display: inline-block; }

/* ============================================================================
   5. FORMS
   ============================================================================ */
.field {
    margin-bottom: 18px;
}
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], input[type="tel"],
input[type="search"], input[type="date"], input[type="datetime-local"],
input[type="time"], select, textarea {
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
select { cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%236b7685' d='M6 9L1 4h10z'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }

.field-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}
.field-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    font-weight: 500;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 600px) {
    .field-row { grid-template-columns: 1fr; }
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.toggle input { display: none; }
.toggle-control {
    width: 44px;
    height: 26px;
    background: var(--surface-3);
    border-radius: var(--radius-pill);
    position: relative;
    transition: background .18s;
    flex-shrink: 0;
}
.toggle-control::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform .18s;
    box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-control {
    background: var(--brand);
}
.toggle input:checked + .toggle-control::after {
    transform: translateX(18px);
}

.stack-sm { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }

/* ============================================================================
   6. PANELS & CARDS
   ============================================================================ */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}
.panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 16px;
}

.callout {
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--brand-softer);
    border: 1px solid var(--brand-soft);
    color: var(--brand-deeper);
    font-size: 14px;
}

.callout-pending {
    background: var(--warning-soft);
    border: 1px solid #fde68a;
    color: #78350f;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.callout-pending strong { font-size: 15px; }
.callout-pending a { color: inherit; text-decoration: underline; font-weight: 600; }

.callout-disputes {
    background: var(--danger-soft);
    border: 1px solid #fecaca;
    color: #7f1d1d;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
}
.callout-disputes a { color: inherit; text-decoration: underline; font-weight: 600; }

/* ============================================================================
   7. PAGE HEADER
   ============================================================================ */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.page-header h1 { margin: 0; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================================
   8. METRICS / STAT GRID
   ============================================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: border-color .15s, transform .15s;
}
.metric:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}
.metric-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.metric-value {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-deeper);
    letter-spacing: -0.025em;
}

.metric-alert {
    background: var(--danger-soft);
    border-color: #fecaca;
}
.metric-alert .metric-value { color: var(--danger); }

/* ============================================================================
   9. TAGS / BADGES
   ============================================================================ */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--surface-3);
    color: var(--ink-soft);
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tag-tournament { background: #e8eaff; color: #3b3fd5; }
.tag-league     { background: #ffeac2; color: #8c5800; }
.tag-americano  { background: #d0f7e4; color: #066443; }
.tag-mexicano   { background: #ffe4d6; color: #9c3a00; }
.tag-social     { background: #f0e4ff; color: #5b21b6; }

.tag-role-user  { background: var(--brand-soft); color: var(--brand); }
.tag-role-club  { background: var(--accent-soft); color: #5b6a00; }
.tag-role-admin { background: var(--danger-soft); color: var(--danger); }

/* Status pills */
.status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.status-active,
.status-live,
.status-completed                 { background: var(--success-soft); color: #14532d; }
.status-scheduled,
.status-draft,
.status-in_progress,
.status-pending_confirmation      { background: var(--info-soft);    color: #1e40af; }
.status-disputed                  { background: var(--danger-soft);  color: var(--danger); }
.status-suspended,
.status-cancelled                 { background: var(--surface-3);    color: var(--muted); }

.verified-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 900;
    margin-left: 4px;
}

/* ============================================================================
   10. FLASH MESSAGES
   ============================================================================ */
.flash {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}
.flash-success { background: var(--success-soft); color: #14532d; border-color: #bbf7d0; }
.flash-error   { background: var(--danger-soft);  color: #7f1d1d; border-color: #fecaca; }
.flash-info    { background: var(--info-soft);    color: #1e40af; border-color: #bfdbfe; }
.flash-warning { background: var(--warning-soft); color: #78350f; border-color: #fde68a; }

/* ============================================================================
   11. HOME / LANDING
   ============================================================================ */
.hero {
    padding: 60px 0;
    text-align: center;
    position: relative;
}
.hero-eyebrow {
    display: inline-block;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 20px;
}
.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: var(--brand-deeper);
    margin: 0 0 20px;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}
.hero-title .accent {
    color: var(--brand);
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent) 100%);
    background-repeat: no-repeat;
    background-size: 100% 30%;
    background-position: 0 92%;
    padding: 0 6px;
    border-radius: 4px;
}
.hero-sub {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--ink-soft);
    max-width: 60ch;
    margin: 0 auto 32px;
    line-height: 1.5;
}
.hero-cta {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.feature-section {
    padding: 60px 0;
}
.feature-section-title {
    text-align: center;
    margin-bottom: 48px;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 12px;
    font-size: 22px;
    margin-bottom: 16px;
}
.feature-bullets { padding-left: 20px; margin: 0; }
.feature-bullets li { margin-bottom: 6px; color: var(--ink-soft); }
.feature-bullets li strong { color: var(--ink); }

/* ============================================================================
   12. AUTH PAGES
   ============================================================================ */
.auth-wrapper {
    max-width: 440px;
    margin: 40px auto;
    padding: 0 var(--container-pad);
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
}
.auth-title {
    font-size: 26px;
    margin: 0 0 8px;
    text-align: center;
}
.auth-sub {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 24px;
}
.auth-alt {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 20px;
}

.role-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 500px) {
    .role-choice { grid-template-columns: 1fr; }
}
.role-card {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    transition: all .15s;
}
.role-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: var(--shadow);
}
.role-card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}
.role-card h3 { margin: 0 0 6px; }

/* ============================================================================
   13. PROFILE PAGE  —  Playtomic-inspired hero + format grid
   ============================================================================ */
.profile { max-width: 980px; margin: 0 auto; }

/* Hero: cover photo with avatar overlapping the bottom edge */
.profile-hero {
    margin-bottom: 32px;
}
.profile-cover {
    height: 200px;
    border-radius: var(--radius-xl);
    background-size: cover;
    background-position: center;
    background-color: var(--brand);
    background-image: linear-gradient(135deg, var(--brand) 0%, var(--brand-deeper) 100%);
    position: relative;
}
@media (max-width: 600px) { .profile-cover { height: 150px; } }

.profile-identity {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: flex-start;
    margin-top: -60px;
    padding: 0 8px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--surface);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.profile-identity-text {
    padding-top: 68px;
    min-width: 0;
}
.profile-name {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 2px;
    line-height: 1.1;
    color: var(--brand-deeper);
}
.profile-handle {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 8px;
}
.profile-meta {
    font-size: 13px;
    color: var(--ink-soft);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.profile-meta a { color: var(--brand); }

.profile-actions {
    padding-top: 68px;
}

.profile-counts {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--surface-2);
    border-radius: var(--radius);
    font-size: 14px;
    flex-wrap: wrap;
}
.profile-counts strong {
    color: var(--brand-deeper);
    font-weight: 700;
    font-size: 16px;
}
.count-link { color: var(--ink-soft); }
.count-link:hover { color: var(--brand); text-decoration: none; }

@media (max-width: 700px) {
    .profile-identity {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .profile-avatar {
        margin: -60px auto 0;
        width: 104px; height: 104px;
    }
    .profile-identity-text { padding-top: 0; }
    .profile-meta { justify-content: center; }
    .profile-actions { padding-top: 8px; }
    .profile-counts { justify-content: center; }
}

.profile-bio {
    background: var(--surface-2);
    border-left: 3px solid var(--brand);
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.6;
}
.profile-bio p { margin: 0; }

.profile-stats-hero { margin-bottom: 24px; }

/* ----- By-format redesign: clean modern cards ----- */
.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}
.format-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    overflow: hidden;
    transition: all .15s;
}
.format-card:hover {
    border-color: var(--format-accent, var(--brand));
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.format-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--format-accent, var(--brand));
}

.format-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.format-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--format-soft, var(--brand-soft));
    color: var(--format-accent, var(--brand));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.format-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.format-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.format-stat {
    border-top: 1px solid var(--line-soft);
    padding-top: 10px;
}
.format-stat-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-deeper);
    letter-spacing: -0.02em;
}
.format-stat-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-top: 4px;
}

/* Per-format color accents */
.format-card.format-tournament { --format-accent: #3b3fd5; --format-soft: #e8eaff; }
.format-card.format-americano  { --format-accent: #066443; --format-soft: #d0f7e4; }
.format-card.format-mexicano   { --format-accent: #9c3a00; --format-soft: #ffe4d6; }
.format-card.format-social     { --format-accent: #5b21b6; --format-soft: #f0e4ff; }
.format-card.format-league     { --format-accent: #8c5800; --format-soft: #ffeac2; }

/* Format card with a single stat (social / league have no "won") */
.format-stats.format-stats-single {
    grid-template-columns: 1fr;
}

/* ----- Two-col list layout ----- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; } }

.person-list { list-style: none; margin: 0; padding: 0; }
.person-list li { margin-bottom: 10px; }
.person-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--ink);
    transition: background .15s;
}
.person-list a:hover { background: var(--surface-2); text-decoration: none; }
.person-list img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.person-list strong { display: block; font-size: 14px; }
.person-list small { font-size: 12px; }

.person-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.avatar-xs {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.person-cell-text { display: flex; flex-direction: column; }

.avatar-preview {
    text-align: center;
    margin-bottom: 14px;
}
.avatar-preview img {
    width: 120px; height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    border: 4px solid var(--surface);
    box-shadow: var(--shadow-sm);
}

.photo-preview {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-3);
    margin-bottom: 14px;
}

.info-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    font-size: 13px;
}
.info-list dt {
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    margin-top: 2px;
}
.info-list dd { margin: 0; color: var(--ink); }

/* ============================================================================
   14. TABLES
   ============================================================================ */
.table-scroll {
    overflow-x: auto;
    border-radius: var(--radius);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}
.data-table thead th {
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--line);
}
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }

.rank-cell { font-weight: 800; color: var(--brand); font-family: var(--font-display); }
.pts-cell {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    color: var(--brand-deeper);
    text-align: center;
}

.standings-table tbody tr:first-child { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.standings-table tbody tr:first-child .rank-cell::before { content: '🏆 '; }

.is-me-row, .is-mine-row {
    background: var(--brand-softer) !important;
    font-weight: 600;
}

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================================================
   15. SEARCH / SEARCH TABS
   ============================================================================ */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.search-bar input[type="text"],
.search-bar input[type="search"] { flex: 1 1 200px; }
.search-bar select { flex: 0 1 auto; min-width: 140px; }

.search-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-2);
    border-radius: var(--radius-pill);
    margin-bottom: 20px;
    overflow-x: auto;
    width: fit-content;
    max-width: 100%;
}
.search-tab {
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
    transition: all .15s;
}
.search-tab:hover { color: var(--brand); text-decoration: none; }
.search-tab.active {
    background: var(--surface);
    color: var(--brand);
    box-shadow: var(--shadow-xs);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.result-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all .15s;
}
.result-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.result-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}
.result-link:hover { text-decoration: none; color: var(--ink); }
.result-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.result-body { display: flex; flex-direction: column; min-width: 0; }
.result-body strong { font-size: 15px; color: var(--ink); }
.result-body small { font-size: 12px; color: var(--muted); }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface-2);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
}
.empty-state p { margin: 4px 0; }
.empty-state strong { color: var(--ink); font-size: 16px; }

/* ============================================================================
   16. EDIT LAYOUT (2-column with aside)
   ============================================================================ */
.edit-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}
@media (max-width: 900px) {
    .edit-grid { grid-template-columns: 1fr; }
}
.edit-aside { display: flex; flex-direction: column; gap: 16px; }
.edit-main {}

/* ============================================================================
   17. EVENT / MATCH CARDS
   ============================================================================ */
.event-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--ink);
    text-decoration: none;
    transition: all .15s;
}
.event-tile:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.event-tile-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.event-tile-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
    color: var(--ink);
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}
.match-card {
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all .15s;
}
.match-card:hover { border-color: var(--brand); }
.match-card.is-done { border-color: var(--success); }

.match-court {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    flex-wrap: wrap;
    gap: 6px;
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}
.match-team {
    padding: 10px 12px;
    background: var(--surface-2);
    border-radius: var(--radius);
    font-size: 13px;
    min-width: 0;
}
.match-team.winner {
    background: var(--accent-soft);
    color: var(--brand-deeper);
    font-weight: 700;
    border: 1px solid var(--accent);
}
.match-team.is-mine { border: 1.5px solid var(--brand); font-weight: 600; }
.match-team-name { display: block; overflow: hidden; text-overflow: ellipsis; }
.match-vs {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.match-summary {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-deeper);
    text-align: center;
    padding: 4px 0;
    letter-spacing: -0.01em;
}

.action-banner {
    margin-top: auto;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    background: var(--warning-soft);
    color: #78350f;
    border: 1px solid #fde68a;
}
.action-banner.muted-banner { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.action-banner.disputed-banner { background: var(--danger-soft); color: #7f1d1d; border-color: #fecaca; }
.action-banner.accent-banner { background: var(--brand-softer); color: var(--brand); border-color: var(--brand-soft); }

.club-match-alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
}
.alert-pending { background: var(--warning-soft); color: #78350f; border: 1px solid #fde68a; }
.alert-disputed { background: var(--danger-soft); color: #7f1d1d; border: 1px solid #fecaca; }
.dispute-reason-inline { margin-top: 6px; font-size: 12px; font-weight: 400; color: #9a1a16; }

.round-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 6px;
}
.round-head h3 { margin: 0; }

.fixture-list { list-style: none; margin: 0; padding: 0; }
.fixture-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
}
.fixture-row:last-child { border-bottom: none; }
.fixture-row.is-mine {
    background: var(--brand-softer);
    border-radius: var(--radius);
    border-bottom-color: transparent;
}
.fixture-row .court {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.fixture-row .fixture-teams { display: flex; flex-direction: column; gap: 2px; }
.fixture-row .fixture-teams .winner { font-weight: 700; color: var(--brand); }
.fixture-row .fixture-score {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    color: var(--brand-deeper);
}

/* Big score header on match detail */
.match-header-big {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin: -4px 0 18px;
}
.match-side {
    padding: 20px;
    background: var(--surface-2);
    border: 2px solid var(--line);
    border-radius: var(--radius-lg);
    text-align: center;
}
.match-side.winner {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.match-side.is-mine { border-color: var(--brand); }
.match-side-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 6px;
}
.match-side-name {
    font-weight: 700;
    font-size: 17px;
    color: var(--ink);
}
.match-score-big {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 26px;
    color: var(--brand-deeper);
    white-space: nowrap;
    text-align: center;
    padding: 0 6px;
    letter-spacing: -0.03em;
}
.match-score-big .muted {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .match-header-big { grid-template-columns: 1fr; gap: 8px; }
    .match-score-big { font-size: 20px; padding: 4px 0; }
}

.match-status-bar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}
.dispute-box {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--danger-soft);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius);
    font-size: 14px;
}
.dispute-box strong { color: var(--danger); }
.dispute-box p { margin: 6px 0; }

.highlight-panel {
    border-color: #fde68a;
    background: #fffbeb;
}

.action-pair { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* Score entry forms */
.score-form-sets .set-row {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.set-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.set-dash { color: var(--muted); font-weight: 700; }
.score-form-totals .totals-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: end;
}
.score-form-totals .side-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    text-align: center;
}

/* ============================================================================
   18. NOTIFICATIONS
   ============================================================================ */
.nav-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 16px;
    text-decoration: none;
    transition: all .15s;
}
.nav-bell:hover { background: var(--brand-soft); color: var(--brand); }
.bell-icon { line-height: 1; }
.unread-badge {
    position: absolute;
    top: -2px; right: -2px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--surface);
}
.inline-badge {
    position: static;
    border: none;
    vertical-align: 4px;
    margin-left: 6px;
    font-size: 12px;
}

.notification-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.notification-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .15s;
}
.notification-item.is-unread { background: var(--brand-softer); border-color: var(--brand-soft); }
.notification-form { margin: 0; }
.notification-button {
    width: 100%;
    background: transparent;
    border: none;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    text-align: left;
}
.notification-button:hover { background: var(--surface-2); }
.notif-icon {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.notif-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-body strong { font-size: 14px; line-height: 1.3; }
.notif-body small { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.notif-body time { margin-top: 4px; font-size: 12px; color: var(--muted); }
.unread-dot {
    width: 8px; height: 8px;
    background: var(--brand);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 12px;
}

/* Verify banner */
.verify-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--warning-soft);
    border: 1px solid #fde68a;
    color: #78350f;
    border-radius: var(--radius);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.verify-banner-text { display: flex; flex-direction: column; gap: 2px; }
.verify-banner strong { color: var(--ink); }

/* ============================================================================
   19. PUBLIC EVENT PAGE
   ============================================================================ */
.public-event { margin-top: -32px; }
.pe-hero {
    padding: 32px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deeper) 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.pe-hero h1, .pe-hero .pe-title { color: #fff; }
.pe-hero-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.pe-club {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.pe-club:hover { color: var(--accent); text-decoration: none; }
.pe-club-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.pe-club-name { display: inline-flex; align-items: center; }

.pe-title {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 900;
    letter-spacing: -0.025em;
    margin: 0 0 8px;
    color: #fff;
}
.pe-meta { margin: 0 0 20px; color: rgba(255,255,255,.85); font-size: 14px; }

.pe-progress { position: relative; }
.pe-progress-bar {
    height: 10px;
    background: rgba(255,255,255,0.20);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: 8px;
}
.pe-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width .4s ease-out;
}
.pe-progress-text { font-size: 13px; color: rgba(255,255,255,.9); }
.pe-enter-btn { margin-top: 14px; }

.pe-share {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 24px;
}
.pe-share input[type="text"] {
    flex: 1 1 260px;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--ink-soft);
}
.pe-share-whatsapp { border-color: #25d366; color: #128c4c; }
.pe-share-whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
.pe-share-x { border-color: var(--ink); color: var(--ink); }
.pe-share-x:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.pe-footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

.share-panel { background: var(--brand-softer) !important; border-color: var(--brand-soft) !important; }
.share-url-row { display: flex; gap: 6px; }
.share-url-row input[type="text"] {
    flex: 1; min-width: 0;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    padding: 8px 10px;
}

/* ============================================================================
   20. ADS
   ============================================================================ */
.ad-slot { margin: 0 0 24px; text-align: center; }
.ad-slot-link {
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all .15s;
}
.ad-slot-link:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.ad-slot-link img { max-width: 100%; height: auto; display: block; }
.ad-slot-label {
    margin-top: 6px;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}
.ad-slot-label .ad-slot-sponsor { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ad-placement-sidebar { max-width: 300px; margin: 0 auto 24px; }

/* ============================================================================
   21. AUDIT LOG STYLES
   ============================================================================ */
.audit-action {
    font-size: 11px;
    padding: 3px 8px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--ink);
    font-weight: 600;
}
.audit-details {
    margin: 6px 0 0;
    padding: 8px 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: var(--ink-soft);
    white-space: pre-wrap;
    word-break: break-word;
}
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-list li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.audit-list li:last-child { border-bottom: none; }

/* ============================================================================
   23. LEGACY COMPATIBILITY  — styles for class names used across existing views
        that weren't explicitly rethemed above. Kept minimal and on-brand.
   ============================================================================ */

/* Auth variants */
.auth-card-wide { max-width: 720px; margin: 0 auto; padding: 36px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* Role selection (register) */
.role-option { display: flex; flex-direction: column; gap: 4px; padding: 24px;
    background: var(--surface); border: 2px solid var(--line);
    border-radius: var(--radius-lg); color: var(--ink); text-align: left;
    text-decoration: none; transition: all .15s; }
.role-option:hover { border-color: var(--brand); transform: translateY(-2px);
    text-decoration: none; box-shadow: var(--shadow); }
.role-icon { font-size: 28px; margin-bottom: 6px; }
.role-go { margin-top: 12px; color: var(--brand); font-weight: 700; font-size: 13px; }

/* Landing blocks */
.features, .feature { padding: 40px 0; }
.how { padding: 40px 0; }
.how-cta { margin-top: 28px; text-align: center; }
.hero-actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 24px; position: relative; }
.step-num { font-family: var(--font-display); font-size: 36px; font-weight: 900;
    color: var(--brand); line-height: 1; letter-spacing: -0.03em; }

/* Section heads */
.section-head { display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.section-title { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0; }
.panel-header-flex { display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* Stat cards (legacy) */
.stat-card { background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 20px; }
.stat-num { font-family: var(--font-display); font-size: 32px; font-weight: 800;
    color: var(--brand-deeper); line-height: 1; letter-spacing: -0.02em; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }

/* Follow button variants */
.follow-form { display: inline; }
.follow-btn { min-width: 120px; }
.follow-btn.is-following { background: var(--surface-2); color: var(--ink-soft); border-color: var(--line); }
.follow-btn.is-following:hover { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

/* Event-related */
.event-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.event-tabs, .event-tabs-inline, .sub-tabs, .sub-tabs-inline, .pe-tabs {
    display: flex; gap: 4px; padding: 4px; background: var(--surface-2);
    border-radius: var(--radius-pill); margin-bottom: 20px;
    width: fit-content; max-width: 100%; overflow-x: auto;
}
.event-tabs a, .sub-tabs a, .pe-tabs a {
    padding: 7px 16px; border-radius: var(--radius-pill); font-size: 13px;
    font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.event-tabs a:hover, .sub-tabs a:hover, .pe-tabs a:hover { color: var(--brand); text-decoration: none; }
.event-tabs a.active, .sub-tabs a.active, .pe-tabs a.active {
    background: var(--surface); color: var(--brand); box-shadow: var(--shadow-xs); text-decoration: none;
}
.event-type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.event-type-card { background: var(--surface); border: 2px solid var(--line);
    border-radius: var(--radius); padding: 16px; text-align: center; cursor: pointer;
    display: flex; flex-direction: column; gap: 4px; transition: all .15s; }
.event-type-card:has(input:checked), .event-type-card.is-checked {
    border-color: var(--brand); background: var(--brand-softer); }
.event-type-card input { display: none; }
.event-type-card strong { color: var(--brand-deeper); font-size: 15px; }
.event-type-card small { color: var(--muted); font-size: 12px; }

/* Match score display (legacy) */
.match-score-display { font-family: var(--font-display); font-weight: 800;
    font-size: 18px; color: var(--brand-deeper); }
.match-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Score form */
.score-form { margin: 16px 0; }

/* Round panels */
.round-panel { background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }

/* Enrolled rows */
.enrolled-row { display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.enrolled-row:last-child { border-bottom: none; }

/* Team bodies in event pages */
.team-body { display: flex; align-items: center; gap: 10px; }

/* Flash close/stack */
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.flash-close { background: transparent; border: none; cursor: pointer; color: inherit;
    font-size: 18px; line-height: 1; padding: 0 0 0 10px; opacity: 0.6; }
.flash-close:hover { opacity: 1; }

/* Errors */
.error-page { text-align: center; padding: 60px 20px; }
.error-code { font-family: var(--font-display); font-size: 72px; font-weight: 900;
    color: var(--brand); letter-spacing: -0.04em; line-height: 1; margin-bottom: 10px; }

/* Contact list / chip lists */
.contact-list { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.club-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.club-chip-list a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--radius-pill); font-size: 13px; color: var(--ink);
}
.club-chip-list a:hover { background: var(--brand-soft); border-color: var(--brand);
    color: var(--brand); text-decoration: none; }

/* Progress bars */
.progress-bar { height: 8px; background: var(--surface-3); border-radius: var(--radius-pill); overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); transition: width .3s ease; }

/* Profile page extras */
.profile-avatar-club { width: 80px; height: 80px; border-radius: var(--radius);
    object-fit: cover; border: 1px solid var(--line); }
.profile-joined { font-size: 13px; color: var(--muted); }

/* Admin nav */
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px;
    background: var(--surface-2); border-radius: var(--radius);
    margin-bottom: 20px; }
.admin-nav a { padding: 8px 14px; border-radius: calc(var(--radius) - 4px);
    font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.admin-nav a:hover { background: var(--surface); color: var(--brand); text-decoration: none; }
.admin-nav a.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-xs); }

/* Stack utility */
.stack { display: flex; flex-direction: column; gap: 12px; }

/* Engine actions — club event form */
.engine-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.engine-bar { padding: 14px 16px; background: var(--surface-2); border-radius: var(--radius);
    margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center;
    gap: 10px; flex-wrap: wrap; }

/* Result section */
.result-section { margin-top: 20px; }

/* Cover photo preview */
.cover-preview {
    height: 120px; background-size: cover; background-position: center;
    border-radius: var(--radius); background-color: var(--brand);
    background-image: linear-gradient(135deg, var(--brand) 0%, var(--brand-deeper) 100%);
}

/* Person list — single person variant */
.person-list-single { list-style: none; margin: 0; padding: 0; }

/* Counts suffix */
.count { font-weight: 700; color: var(--brand-deeper); }

/* Team lists */
.team-list { list-style: none; margin: 0; padding: 0; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid var(--line-soft); }
.team-row:last-child { border-bottom: none; }

/* Toggle field layout */
.toggle-field { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.toggle-text { display: flex; flex-direction: column; }
.toggle-text strong { font-size: 14px; }
.toggle-text small { font-size: 12px; color: var(--muted); }

/* Two-col flex */
.two-col-flex { display: flex; gap: 20px; flex-wrap: wrap; }
.two-col-flex > * { flex: 1 1 300px; }
