:root {
    --ink: #15251d;
    --forest: #123b29;
    --forest-2: #1d5039;
    --lime: #caff5a;
    --lime-2: #ddff94;
    --cream: #f4f4ee;
    --paper: #fff;
    --line: #dfe5df;
    --muted: #6f7b74;
    --sand: #f3e4c6;
    --danger: #b84432;
    --warning: #a86817;
    --shadow: 0 12px 35px rgba(24, 55, 39, .08);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "DM Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .brand { font-family: "Manrope", system-ui, sans-serif; }
h2 { letter-spacing: -.035em; }
svg { width: 22px; height: 22px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 245px; display: flex; flex-direction: column; padding: 24px 18px 20px; color: #fff; background: var(--forest); }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 38px; color: #fff; text-decoration: none; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-size: 20px; letter-spacing: -.03em; }
.brand small { margin-top: 4px; color: #a9c2b3; font: 700 9px "DM Sans"; letter-spacing: .17em; text-transform: uppercase; }
.brand-mark { position: relative; display: grid; width: 40px; height: 40px; place-items: center; overflow: hidden; border: 2px solid var(--lime); border-radius: 50%; color: var(--lime); font-weight: 800; }
.brand-mark::before, .brand-mark::after, .brand-mark i::before, .brand-mark i::after { position: absolute; content: ""; background: var(--lime); }
.brand-mark::before { width: 2px; height: 100%; }
.brand-mark::after { width: 100%; height: 2px; }
.brand-mark i::before { width: 14px; height: 14px; top: -8px; left: 11px; border: 2px solid var(--lime); border-radius: 50%; background: transparent; }
.brand-mark i::after { width: 14px; height: 14px; bottom: -8px; left: 11px; border: 2px solid var(--lime); border-radius: 50%; background: transparent; }
.brand-mark.large { width: 49px; height: 49px; }
.sidebar nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 13px; border-radius: 11px; color: #b6cbbf; font-weight: 600; text-decoration: none; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: var(--forest); background: var(--lime); box-shadow: 0 8px 18px rgba(202,255,90,.15); }
.nav-icon { display: grid; place-items: center; }
.nav-icon svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:first-child .nav-icon svg { fill: currentColor; stroke: none; }
.nav-label { margin: 28px 13px 7px; color: #779584; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.sidebar-user { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; margin-top: auto; padding: 17px 4px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.sidebar-user b { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user small { color: #8caa99; font-size: 10px; }
.avatar { display: inline-grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 50%; color: #143925; background: var(--lime); font-style: normal; font-weight: 800; }
.small-avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; }
.icon-button { padding: 5px; border: 0; color: #9bb5a6; background: transparent; cursor: pointer; }
.icon-button.bordered { width: 35px; height: 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.main-content { min-height: 100vh; margin-left: 245px; padding: 0 40px 60px; }
.topbar { display: flex; min-height: 104px; align-items: center; justify-content: space-between; }
.topbar h1 { margin: 1px 0 0; font-size: 27px; letter-spacing: -.04em; }
.eyebrow { margin: 0 0 3px; color: #6d7e73; font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.eyebrow.light { color: #a7c0b1; }
.topbar-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #70c73e; box-shadow: 0 0 0 4px rgba(112,199,62,.12); }
.menu-button { display: none; border: 0; color: var(--forest); background: none; font-size: 22px; }

.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 16px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #173521; background: var(--lime); box-shadow: 0 7px 18px rgba(118,169,23,.16); }
.button.secondary { border-color: var(--line); color: var(--forest); background: #fff; }
.button.light { color: var(--forest); background: #fff; }
.button.ghost { color: var(--forest); background: #eef2ee; }
.button.danger-button { color: var(--danger); background: #fff1ee; }
.button.wide { width: 100%; }
.text-button { padding: 6px 0; border: 0; color: var(--forest-2); background: none; font-weight: 700; cursor: pointer; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; }
.pill { display: inline-flex; width: max-content; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 99px; font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .1em; }
.pill.lime { color: #1e3b26; background: var(--lime); }
.pill.dark { color: #fff; background: var(--forest); }
.pill.warning { color: #7f4c08; background: #ffdf9f; }
.pill.danger { color: #972f20; background: #ffd8d0; }
.pill.muted-pill { color: #65736b; background: #e4e9e5; }
.pill.light-pill { color: var(--forest); background: rgba(255,255,255,.82); }
.muted { color: var(--muted); }

.flash { position: relative; z-index: 4; margin: 0 0 18px; padding: 13px 45px 13px 16px; border: 1px solid #c8e8ba; border-radius: 10px; color: #28691e; background: #edffe7; box-shadow: var(--shadow); }
.flash.error { border-color: #f0c3bb; color: #8f3326; background: #fff1ee; }
.flash button { position: absolute; top: 6px; right: 9px; border: 0; color: currentColor; background: transparent; font-size: 20px; cursor: pointer; }

.hero-card { position: relative; min-height: 224px; display: flex; overflow: hidden; align-items: flex-end; justify-content: space-between; padding: 38px 45px; border-radius: 24px; color: #fff; background: linear-gradient(110deg, #123b29, #1d543a); box-shadow: 0 18px 42px rgba(15,53,36,.14); }
.hero-card > div:first-child { position: relative; z-index: 2; max-width: 640px; }
.hero-card h2 { max-width: 640px; margin: 13px 0 10px; font-size: clamp(25px, 3vw, 38px); line-height: 1.14; }
.hero-card p { margin-bottom: 0; color: #b9ccbf; }
.hero-card .button { position: relative; z-index: 2; white-space: nowrap; }
.hero-ball { position: absolute; width: 220px; height: 220px; top: -80px; right: 16%; border-radius: 50%; opacity: .12; background: var(--lime); }
.hero-ball::before, .hero-ball::after { position: absolute; content: ""; width: 210px; height: 120px; border: 4px solid var(--forest); border-color: transparent transparent var(--forest) transparent; border-radius: 50%; transform: rotate(35deg); }
.hero-ball::after { transform: rotate(215deg); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 19px 0; }
.stat-card { min-width: 0; display: flex; align-items: center; gap: 16px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.stat-icon { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border-radius: 13px; color: var(--forest); font-size: 20px; }
.stat-icon.green { color: #fff; background: var(--forest); }
.stat-icon.lime { background: var(--lime); }
.stat-icon.sand { background: var(--sand); }
.stat-card > div { min-width: 0; }
.stat-card small { display: block; color: #829087; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.stat-card strong { display: block; overflow: hidden; margin: 3px 0 1px; font: 800 18px "Manrope"; white-space: nowrap; text-overflow: ellipsis; }
.stat-card strong i { color: #9aa49e; font-style: normal; font-weight: 600; }
.stat-card p { overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.content-grid { display: grid; gap: 19px; }
.dashboard-grid { grid-template-columns: minmax(0, 2fr) minmax(260px, .85fr); }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 2px 0 rgba(20,53,36,.01); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.panel-heading.outside { margin-top: 28px; }
.panel-heading h2 { margin: 0; font-size: 20px; }
.panel-heading a { color: var(--forest-2); font-size: 12px; font-weight: 700; text-decoration: none; }
.quick-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.quick-day { position: relative; min-height: 122px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); text-decoration: none; }
.quick-day > span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.quick-day b { font: 800 26px "Manrope"; }
.quick-day small { color: var(--muted); font-size: 10px; }
.quick-day i { position: absolute; width: 22px; height: 22px; display: grid; right: 7px; bottom: 7px; place-items: center; border-radius: 50%; color: #829087; background: #edf0ed; font-style: normal; font-size: 10px; }
.quick-day.yes { border-color: #acd444; background: #f6ffe3; }
.quick-day.yes i { color: var(--forest); background: var(--lime); }
.quick-day.maybe { border-color: #e9c875; background: #fffaf0; }
.quick-day.maybe i { color: #855615; background: #ffdf9f; }
.league-panel { position: relative; overflow: hidden; }
.league-badge { display: inline-grid; width: 43px; height: 43px; place-items: center; border-radius: 12px; color: var(--forest); background: var(--lime); font-style: normal; font-weight: 800; }
.league-badge.small { width: 29px; height: 29px; border-radius: 8px; font-size: 10px; }
.court-mini { position: relative; height: 110px; overflow: hidden; margin: 7px 0 17px; border-radius: 13px; color: var(--lime); background: var(--forest); }
.court-mini::before, .court-mini::after { position: absolute; content: ""; background: rgba(202,255,90,.35); }
.court-mini::before { width: 1px; inset: 0 auto 0 50%; }
.court-mini::after { height: 1px; inset: 50% 0 auto; }
.court-mini span { position: absolute; z-index: 2; top: 12px; left: 19px; font: 800 39px "Manrope"; }
.court-mini em { position: absolute; z-index: 2; left: 20px; bottom: 11px; font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .12em; }

.page-actions, .section-intro { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 24px; }
.section-intro h2 { margin: 11px 0 5px; font-size: clamp(23px, 3vw, 31px); }
.section-intro p { margin: 0; color: var(--muted); }
.week-tabs { display: flex; overflow-x: auto; gap: 7px; padding-bottom: 2px; }
.week-tabs a { min-width: 68px; display: flex; flex-direction: column; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; font-weight: 700; text-decoration: none; }
.week-tabs a small { font-size: 9px; }
.week-tabs a.active { border-color: var(--forest); color: #fff; background: var(--forest); }
.poll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; }
.poll-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-top: 4px solid transparent; border-radius: 17px; background: #fff; box-shadow: 0 6px 20px rgba(20,53,36,.035); }
.poll-card.yes { border-top-color: var(--lime); }
.poll-card.maybe { border-top-color: #efc65f; }
.poll-date { padding: 20px 20px 7px; }
.poll-date span { display: block; color: var(--forest-2); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.poll-date b { font: 800 43px "Manrope"; line-height: 1.05; }
.poll-date small { display: block; color: var(--muted); }
.vote-count { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; padding: 8px 20px 15px; }
.vote-count strong { grid-row: span 2; font: 800 24px "Manrope"; }
.vote-count > span { align-self: end; font-size: 11px; font-weight: 700; }
.vote-count small { align-self: start; color: var(--muted); font-size: 9px; }
.league-dot { display: inline-block; width: 6px; height: 6px; margin: 0 3px 0 6px; border-radius: 50%; background: var(--forest); }
.league-dot.l2 { background: #a8d837; }
.vote-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 14px 15px; }
.vote-buttons.four { grid-template-columns: repeat(2, 1fr); }
.vote-buttons.five form:nth-child(4) { grid-column: 1 / 2; }
.vote-buttons form { min-width: 0; }
.vote-button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 3px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; font-size: 9px; font-weight: 700; cursor: pointer; }
.vote-button i { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #edf0ed; font-style: normal; font-size: 12px; }
.vote-button.selected { border-color: var(--forest); color: var(--forest); background: #f7ffe8; }
.vote-button.selected i { background: var(--lime); }
.vote-button:disabled { opacity: .6; cursor: not-allowed; }
.poll-card.saving .vote-buttons { opacity: .72; }
.vote-feedback { min-height: 16px; margin: -9px 18px 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.vote-feedback.success { color: #32713e; }
.vote-feedback.error { color: #a83c2d; }
.server-config-status { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf8; }
.server-config-status > b { margin-right: 10px; }
.server-config-status p { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.people-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px; border-top: 1px solid #edf0ed; }
.people-list.large { padding: 0; border: 0; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-radius: 99px; color: #35463c; background: #eef2ef; font-size: 10px; font-weight: 600; }
.person-chip > i { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--forest); font-style: normal; font-size: 8px; }
.person-chip small { color: #839087; font-size: 8px; }
.person-chip.maybe { background: #fff4d9; }
.person-chip.maybe > i { color: #694511; background: #efca73; }
.person-chip.cancelled { opacity: .55; text-decoration: line-through; }
.booking-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 10px 18px; color: #23462c; background: #efffd1; font-size: 9px; text-decoration: none; }
.booking-strip span { font-weight: 800; }
.booking-strip b { font-size: 8px; }
.poll-card > .text-button { margin: auto 17px 12px; align-self: flex-start; }

.booking-list { display: grid; gap: 17px; }
.booking-card { overflow: hidden; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.booking-card.highlight { border-color: #9fc443; box-shadow: 0 0 0 3px rgba(202,255,90,.25); }
.booking-card.cancelled { opacity: .65; }
.booking-head { display: grid; grid-template-columns: 68px 1fr auto; align-items: center; gap: 19px; }
.booking-date { width: 68px; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 13px; color: #fff; background: var(--forest); }
.booking-date b { font: 800 29px "Manrope"; line-height: 1; }
.booking-date span { margin-top: 3px; color: var(--lime); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.booking-head h2 { margin: 6px 0 2px; font-size: 20px; }
.booking-head p { margin: 0; color: var(--muted); font-size: 12px; }
.tag-row { display: flex; align-items: center; gap: 10px; }
.court-total { min-width: 70px; text-align: center; }
.court-total strong { display: block; font: 800 29px "Manrope"; }
.court-total span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.league-capacity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin: 22px 0; }
.capacity-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1px 10px; padding: 14px 16px; border: 1px solid #e4e9e5; border-radius: 12px; background: #fafbf9; }
.capacity-card.short { border-color: #f0c67e; background: #fffaf0; }
.capacity-card > div:first-child { display: flex; align-items: center; gap: 9px; }
.capacity-card > div:first-child b { font-size: 12px; }
.capacity-card > strong { font: 800 20px "Manrope"; }
.capacity-card > strong i { color: #9aa49e; font-size: 13px; font-style: normal; }
.capacity-card > small { grid-column: 1 / -1; margin-top: 6px; color: var(--muted); font-size: 9px; }
.capacity-bar { grid-column: 1 / -1; height: 4px; overflow: hidden; margin-top: 8px; border-radius: 99px; background: #e2e8e3; }
.capacity-bar i { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.capacity-card.short .capacity-bar i { background: #e8a83e; }
.alert-box { display: flex; align-items: center; gap: 15px; margin: -4px 0 20px; padding: 11px 14px; border-radius: 9px; color: #7b5015; background: #fff2d8; font-size: 11px; }
.alert-box span { color: #916f3e; }
.participants-section { padding-top: 17px; border-top: 1px solid #edf0ed; }
.participants-section h3 { display: flex; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.participants-section h3 span { color: var(--muted); font: 500 11px "DM Sans"; }
.booking-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.tournament-hero { position: relative; min-height: 210px; display: flex; overflow: hidden; align-items: center; justify-content: space-between; padding: 32px 40px; border-radius: 22px; color: #fff; background: var(--forest); }
.tournament-hero > div:first-child { position: relative; z-index: 2; }
.tournament-hero h2 { margin: 11px 0 6px; font-size: 35px; line-height: 1.1; }
.tournament-hero p { max-width: 580px; margin: 0; color: #b7cbbf; }
.tournament-hero .button { position: relative; z-index: 2; }
.trophy-shape { position: absolute; right: 23%; color: rgba(202,255,90,.12); font-size: 170px; transform: rotate(-10deg); }
.tournament-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }
.tournament-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-decoration: none; transition: transform .18s, box-shadow .18s; }
.tournament-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tournament-card-top { min-height: 105px; display: flex; align-items: flex-start; justify-content: space-between; padding: 17px; background: #dce8df; }
.tournament-card-top.americano { background: linear-gradient(135deg, #caff5a, #ecffc4); }
.tournament-card-top.fixed { background: linear-gradient(135deg, #f2ddba, #fff3de); }
.tournament-card-top > b { display: flex; flex-direction: column; align-items: center; font: 800 34px "Manrope"; line-height: 1; }
.tournament-card-top > b small { margin-top: 5px; font: 800 9px "DM Sans"; letter-spacing: .1em; }
.tournament-card-body { padding: 18px; }
.tournament-card-body h3 { margin: 0 0 3px; font-size: 17px; }
.tournament-card-body p { margin: 0 0 15px; color: var(--muted); font-size: 11px; }
.tournament-card-body > div { display: flex; flex-wrap: wrap; gap: 11px; color: #607067; font-size: 9px; font-weight: 700; }
.tournament-detail-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; margin-bottom: 23px; }
.tournament-detail-head > .back-link { grid-column: 1 / -1; margin: 0; }
.tournament-detail-head h2 { margin: 9px 0 3px; font-size: 31px; }
.tournament-detail-head p { margin: 0; color: var(--muted); }
.tournament-layout { grid-template-columns: minmax(0, 1.55fr) minmax(315px, .8fr); align-items: start; }
.tournament-side { display: grid; gap: 16px; }
.round-list { display: grid; gap: 13px; }
.round-card { padding: 0; overflow: hidden; }
.round-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 17px; color: #fff; background: var(--forest); }
.round-heading span { color: var(--lime); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.round-heading small { color: #a9c1b2; font-size: 9px; }
.match-row { display: grid; grid-template-columns: 65px minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid #edf0ed; }
.match-row:last-child { border-bottom: 0; }
.court-label { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.team { min-width: 0; }
.team b { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
.team-b { text-align: right; }
.score-form { display: flex; align-items: center; gap: 4px; }
.score-form input { width: 38px; height: 34px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; text-align: center; }
.score-form button { width: 29px; height: 29px; margin-left: 3px; border: 0; border-radius: 50%; color: var(--forest); background: var(--lime); cursor: pointer; }
.score-display { min-width: 53px; text-align: center; font-weight: 800; }
.standing-head, .standing-row { display: grid; grid-template-columns: 22px minmax(0,1fr) 24px 35px 25px; align-items: center; gap: 5px; }
.standing-head { padding: 0 5px 7px; color: #8c9891; font-size: 8px; text-transform: uppercase; }
.standing-row { padding: 9px 5px; border-top: 1px solid #edf0ed; font-size: 10px; }
.standing-row > span:first-child { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #eef2ef; font-size: 8px; }
.standing-row:first-of-type > span:first-child { color: var(--forest); background: var(--lime); }
.standing-row b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.standing-row strong { text-align: center; }
.team-assignment { display: grid; gap: 7px; }
.team-assignment label { display: grid; grid-template-columns: 30px 1fr 52px; align-items: center; gap: 8px; }
.team-assignment input { width: 52px; height: 34px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; text-align: center; }

.table-panel { padding: 0; overflow: hidden; }
.member-table { display: grid; grid-template-columns: minmax(200px,1.3fr) .55fr .4fr 1fr .6fr 40px; align-items: center; gap: 14px; min-height: 72px; padding: 10px 20px; border-top: 1px solid #edf0ed; }
.member-table.table-head { min-height: 42px; border: 0; color: #849188; background: #f8faf8; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.member-table.inactive { opacity: .55; }
.member-table > span { min-width: 0; font-size: 11px; }
.member-identity { display: flex; align-items: center; gap: 11px; }
.member-identity > span { min-width: 0; display: flex; flex-direction: column; }
.member-identity b, .member-identity small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.member-identity small { color: var(--muted); font-size: 9px; }
.role-badge { display: inline-flex; padding: 5px 8px; border-radius: 99px; color: #456052; background: #edf2ee; font-style: normal; font-size: 9px; font-weight: 800; }
.role-badge.admin { color: #264d31; background: #e5ffc0; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #a3aaa6; }
.status-dot.active { background: #72c747; box-shadow: 0 0 0 3px rgba(114,199,71,.13); }
.status-dot.error { background: #d56e5c; }

.settings-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(290px,.7fr); align-items: start; gap: 18px; }
.settings-main { gap: 16px !important; }
.settings-section { display: grid; gap: 16px; }
.settings-heading { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid #edf0ed; }
.settings-heading h2 { margin: 0; font-size: 18px; }
.settings-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.sticky-panel { position: sticky; top: 20px; }
.notification-log { display: grid; margin-bottom: 16px; }
.notification-log > div { display: flex; gap: 7px; padding: 9px 0; border-top: 1px solid #edf0ed; }
.notification-log > div > span { min-width: 0; display: flex; flex-direction: column; }
.notification-log b { overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.notification-log small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 8px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.stack-form { display: flex; flex-direction: column; gap: 15px; }
.stack-form label, .settings-section > label { display: flex; flex-direction: column; gap: 6px; color: #43544a; font-size: 11px; font-weight: 700; }
.stack-form label small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #d6ddd7; outline: 0; border-radius: 9px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #83a53f; box-shadow: 0 0 0 3px rgba(202,255,90,.24); }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-row.triple { grid-template-columns: 1.5fr .55fr .8fr; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 7px; color: #43544a; font-size: 11px; font-weight: 700; }
.form-help { margin: -4px 0 0; color: var(--muted); font-size: 10px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.check-pill { cursor: pointer; }
.check-pill input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check-pill span { display: grid; width: 42px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 10px; font-weight: 700; }
.check-pill input:checked + span { border-color: var(--forest); color: #fff; background: var(--forest); }
.toggle { display: flex !important; flex-direction: row !important; align-items: center; gap: 9px !important; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle > span { position: relative; width: 39px; height: 22px; border-radius: 99px; background: #ccd4ce; transition: .2s; }
.toggle > span::after { position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; content: ""; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: .2s; }
.toggle input:checked + span { background: var(--forest); }
.toggle input:checked + span::after { transform: translateX(17px); background: var(--lime); }
.type-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.type-choice label { cursor: pointer; }
.type-choice input { position: absolute; opacity: 0; }
.type-choice label > span { min-height: 75px; display: flex; flex-direction: column; justify-content: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.type-choice input:checked + span { border-color: var(--forest); background: #f3ffe0; box-shadow: inset 0 0 0 1px var(--forest); }
.type-choice b { color: var(--ink); }
.type-choice small { color: var(--muted); font-weight: 400; }
.member-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; max-height: 250px; overflow-y: auto; }
.member-checks label { display: grid; grid-template-columns: 19px 30px 1fr auto; align-items: center; gap: 7px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.member-checks label:has(input:checked) { border-color: #9bbd4e; background: #f7ffe8; }
.member-checks input { width: 16px; min-height: 16px; accent-color: var(--forest); }
.member-checks b { overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.member-checks small { color: var(--muted); font-size: 9px; }
.settings-actions { display: flex; justify-content: flex-end; }
.danger-zone { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0d0cb; text-align: center; }
.text-danger { border: 0; color: var(--danger); background: none; font-weight: 700; cursor: pointer; }

.modal { width: min(520px, calc(100vw - 30px)); max-height: calc(100vh - 35px); overflow-y: auto; padding: 25px; border: 0; border-radius: 17px; color: var(--ink); background: #fff; box-shadow: 0 25px 70px rgba(10,31,20,.25); }
.modal.wide-modal { width: min(680px, calc(100vw - 30px)); }
.modal::backdrop { background: rgba(11,34,22,.6); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 10px; }
.dialog-heading h2 { margin: 0; font-size: 22px; }
.dialog-heading > button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: #edf1ee; font-size: 20px; cursor: pointer; }
.empty-state { display: flex; min-height: 260px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state > span { margin-bottom: 5px; color: #9fb0a6; font-size: 38px; }
.empty-state h2, .empty-state h3 { margin-bottom: 5px; }
.empty-state p { max-width: 430px; color: var(--muted); }

.auth-body { min-height: 100vh; background: #fff; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; }
.auth-visual { position: relative; display: flex; overflow: hidden; flex-direction: column; padding: 45px 6vw; color: #fff; background: var(--forest); }
.auth-brand { position: relative; z-index: 3; display: flex; align-items: center; gap: 13px; font: 800 23px "Manrope"; }
.auth-copy { position: relative; z-index: 3; margin-top: auto; margin-bottom: 8vh; }
.auth-copy h1 { margin: 13px 0 17px; font-size: clamp(38px, 5vw, 66px); line-height: 1.02; letter-spacing: -.06em; }
.auth-copy h1 em { color: var(--lime); font-style: normal; }
.auth-copy > p:last-child { max-width: 440px; color: #adc3b5; font-size: 16px; }
.court-lines { position: absolute; width: 500px; height: 650px; top: 5%; right: -130px; opacity: .1; border: 3px solid var(--lime); transform: perspective(800px) rotateY(-20deg) rotateZ(12deg); }
.court-lines::before, .court-lines::after { position: absolute; content: ""; background: var(--lime); }
.court-lines::before { width: 2px; inset: 0 auto 0 50%; }
.court-lines::after { height: 2px; inset: 50% 0 auto; }
.auth-panel { display: grid; padding: 45px; place-items: center; }
.auth-card { width: min(410px, 100%); }
.auth-card > h2 { margin: 8px 0 5px; font-size: 31px; }
.auth-card > .muted { margin-bottom: 30px; }
.auth-note { margin: 25px 0 0; color: #89948e; font-size: 10px; text-align: center; }
.mobile-auth-brand { display: none; }

@media (max-width: 1080px) {
    .main-content { padding-inline: 25px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding-block: 15px; }
    .dashboard-grid, .tournament-layout, .settings-layout { grid-template-columns: 1fr; }
    .quick-days { grid-template-columns: repeat(5, minmax(70px, 1fr)); overflow-x: auto; }
    .sticky-panel { position: static; }
}

@media (max-width: 820px) {
    .sidebar { width: 245px; transform: translateX(-105%); transition: transform .2s; box-shadow: 15px 0 40px rgba(0,0,0,.18); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 0 18px 45px; }
    .topbar { min-height: 86px; justify-content: flex-start; gap: 14px; }
    .topbar-meta { margin-left: auto; }
    .menu-button { display: block; padding: 5px; }
    .hero-card { min-height: 250px; align-items: flex-start; flex-direction: column; padding: 28px; }
    .hero-card .button { margin-top: 22px; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100vh; padding: 28px; background: linear-gradient(155deg, #edf3ed, #fff 40%); }
    .mobile-auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 55px; color: var(--forest); font: 800 21px "Manrope"; }
    .member-table { grid-template-columns: minmax(180px, 1fr) .5fr .35fr 40px; }
    .member-table > span:nth-child(4), .member-table > span:nth-child(5) { display: none; }
}

@media (max-width: 600px) {
    .topbar .eyebrow, .topbar-meta { display: none; }
    .topbar h1 { font-size: 22px; }
    .hero-card { margin-inline: -4px; }
    .hero-card h2 { font-size: 28px; }
    .stats-grid { gap: 9px; }
    .section-intro, .page-actions { align-items: flex-start; flex-direction: column; }
    .page-actions .button, .section-intro > .button { width: 100%; }
    .poll-grid { grid-template-columns: 1fr; }
    .poll-card { display: grid; grid-template-columns: 100px 1fr; }
    .poll-date { grid-row: span 2; }
    .vote-count { padding-top: 20px; }
    .vote-buttons { align-self: end; }
    .vote-feedback, .people-list, .booking-strip, .poll-card > .text-button { grid-column: 1 / -1; }
    .booking-head { grid-template-columns: 57px 1fr; }
    .booking-date { width: 57px; height: 64px; }
    .court-total { display: none; }
    .league-capacity-grid, .form-row, .form-row.triple, .type-choice { grid-template-columns: 1fr; }
    .alert-box { align-items: flex-start; flex-direction: column; gap: 2px; }
    .tournament-hero { align-items: flex-start; flex-direction: column; padding: 27px; }
    .tournament-hero .button { margin-top: 20px; }
    .tournament-detail-head { grid-template-columns: 1fr; }
    .match-row { grid-template-columns: 45px 1fr auto; }
    .match-row .court-label { grid-row: span 2; }
    .team-b { grid-column: 2; text-align: left; }
    .score-form, .score-display { grid-column: 3; grid-row: 1 / span 2; }
    .member-table { grid-template-columns: minmax(155px, 1fr) .5fr 36px; padding-inline: 12px; }
    .member-table > span:nth-child(3) { display: none; }
    .member-checks { grid-template-columns: 1fr; }
    .modal { padding: 20px; }
}
