:root {
  --green: #0f593a;
  --ink: #17251d;
  --muted: #6d7b72;
  --paper: #f3f6f4;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --line: #dfe7e1;
  --line-strong: #cbd8cf;
  --mint: #e9f3eb;
  --danger: #a43e2b;
  --shadow-sm: 0 1px 2px rgba(16, 40, 25, .04), 0 6px 18px rgba(16, 40, 25, .045);
  --shadow-md: 0 16px 44px rgba(16, 40, 25, .09);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--paper); font-size: 14px; -webkit-font-smoothing: antialiased; }
.portal-page { background: radial-gradient(circle at 8% 18%, rgba(15, 89, 58, .07), transparent 29rem), radial-gradient(circle at 92% 82%, rgba(15, 89, 58, .05), transparent 25rem), var(--paper); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.topbar { position: relative; z-index: 30; display: flex; min-height: 72px; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 5vw, 72px); border-bottom: 1px solid rgba(203, 216, 207, .8); background: rgba(255, 255, 255, .94); box-shadow: 0 1px 0 rgba(23, 37, 29, .02); backdrop-filter: blur(14px); }
.topbar.compact { position: sticky; top: 0; min-height: 64px; padding: 0 clamp(18px, 3vw, 44px); }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 10px; background: linear-gradient(145deg, var(--green), #0a432b); box-shadow: 0 7px 18px rgba(15, 89, 58, .18); color: #fff; font-weight: 850; letter-spacing: -.07em; }
.brand strong { display: block; overflow: hidden; color: var(--green); font-size: .8rem; letter-spacing: .14em; text-overflow: ellipsis; white-space: nowrap; }
.brand small { display: block; overflow: hidden; max-width: 340px; margin-top: 2px; color: var(--muted); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.season, .user-menu { color: var(--muted); font-size: .78rem; font-weight: 650; }
.user-menu { display: flex; align-items: center; gap: 12px; }
.user-menu > span:not(.master-label) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu a { padding: 7px 10px; border-radius: 7px; color: var(--green); font-weight: 750; transition: background .15s ease; }
.user-menu a:hover { background: var(--mint); }

.login-layout, .install-layout { display: grid; width: min(1060px, 100%); min-height: calc(100vh - 132px); margin: auto; align-items: center; padding: 44px 28px; gap: clamp(42px, 8vw, 100px); grid-template-columns: 1.08fr .92fr; }
.install-layout { grid-template-columns: 1fr 1fr; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: .65rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.intro h1 { margin: 0; font-size: clamp(2.65rem, 5vw, 4.25rem); line-height: .99; letter-spacing: -.058em; }
.dashboard h1, .club-page h1 { margin: 0; font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 1.08; letter-spacing: -.042em; }
.lead { max-width: 540px; margin: 19px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.feature-list, .setup-list { display: grid; gap: 11px; margin: 29px 0 0; padding: 0; color: #45574b; font-size: .86rem; list-style: none; }
.feature-list li, .setup-list li { display: flex; align-items: center; }
.feature-list span, .setup-list span { display: inline-grid; width: 20px; height: 20px; flex: 0 0 20px; margin-right: 9px; place-items: center; border-radius: 50%; background: var(--mint); color: var(--green); font-size: .7rem; font-weight: 850; }
.setup-list span { margin: 0 10px 0 0; }
.setup-list code { margin-left: 3px; padding: 2px 5px; border-radius: 4px; background: #eaf0eb; }

.card, .panel { border: 1px solid rgba(203, 216, 207, .86); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.login-card { position: relative; overflow: hidden; padding: 28px; box-shadow: var(--shadow-md); }
.login-card::before { position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--green), color-mix(in srgb, var(--green) 35%, white)); content: ""; }
.icon { display: grid; width: 36px; height: 36px; margin-bottom: 19px; place-items: center; border-radius: 9px; background: var(--mint); color: var(--green); font-size: 1.15rem; font-weight: 850; }
.login-card h2, .panel h2 { margin: 0; font-size: 1.28rem; letter-spacing: -.03em; }
.muted { color: var(--muted); line-height: 1.5; }
form { margin-top: 18px; }
label { display: block; margin: 12px 0 5px; color: #34483b; font-size: .74rem; font-weight: 750; }
input, select, textarea { width: 100%; height: 39px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: .83rem; outline: 0; transition: border-color .14s ease, box-shadow .14s ease, background .14s ease; }
input::placeholder, textarea::placeholder { color: #a0aba3; }
input:hover, select:hover, textarea:hover { border-color: #adbeB2; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 13%, transparent); }
input[type="color"] { padding: 4px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; padding: 0; accent-color: var(--green); }
.primary-button, .secondary-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border-radius: var(--radius-sm); font-size: .78rem; font-weight: 780; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease; }
.primary-button { width: 100%; margin-top: 20px; border: 1px solid transparent; background: var(--green); box-shadow: 0 5px 14px rgba(15, 89, 58, .15); color: #fff; }
.primary-button:hover { box-shadow: 0 8px 20px rgba(15, 89, 58, .2); transform: translateY(-1px); }
.primary-button:active, .secondary-button:active { transform: translateY(0); }
.secondary-button { border: 1px solid var(--line-strong); background: #fff; color: var(--green); }
.secondary-button:hover { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); background: var(--mint); }
.form-error { margin: 13px 0 0; padding: 10px 12px; border: 1px solid #efc9c0; border-radius: 8px; background: #fff4f1; color: var(--danger); font-size: .79rem; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px clamp(22px, 5vw, 72px); border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .72rem; }
.app-shell { display: grid; min-height: calc(100vh - 64px); grid-template-columns: 218px 1fr; }
.sidebar { padding: 22px 14px; border-right: 1px solid var(--line); background: #fff; }
.sidebar p { margin: 0 10px 8px; color: #87958b; font-size: .62rem; font-weight: 850; letter-spacing: .13em; }
.sidebar a { display: block; margin: 2px 0; padding: 8px 10px; border-radius: 8px; color: #516359; font-size: .8rem; font-weight: 670; }
.sidebar a.active, .sidebar a:hover { background: var(--mint); color: var(--green); }
.dashboard, .club-page { width: min(1380px, 100%); padding: 30px clamp(22px, 3.7vw, 52px) 48px; }
.club-page { min-height: calc(100vh - 64px); margin: auto; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.stats article { position: relative; overflow: hidden; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-sm); }
.stats article::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--green); content: ""; opacity: .75; }
.stats span { display: block; color: var(--muted); font-size: .7rem; font-weight: 650; }
.stats strong { display: block; margin-top: 5px; font-size: 1.55rem; letter-spacing: -.045em; }
.panel { overflow: hidden; margin-top: 18px; border-radius: var(--radius-md); }
.panel-title { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff, #fcfdfc); }
.panel-title h2 { font-size: .98rem; }
.panel-title p { margin: 4px 0 0; color: var(--muted); font-size: .73rem; }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 570px; border-collapse: collapse; text-align: left; }
thead { background: var(--surface-soft); }
th { padding: 10px 16px; color: #7b8980; font-size: .62rem; font-weight: 820; letter-spacing: .085em; text-transform: uppercase; white-space: nowrap; }
td { padding: 11px 16px; border-top: 1px solid #e9efeb; color: #506057; font-size: .78rem; }
tbody tr { transition: background .13s ease; }
tbody tr:hover { background: #fafcfb; }
.badge { display: inline-flex; min-height: 23px; align-items: center; padding: 3px 8px; border-radius: 999px; background: #fff2dd; color: #8d600c; font-size: .66rem; font-weight: 780; white-space: nowrap; }
.empty { padding: 28px 16px; color: var(--muted); text-align: center; }
.club-page .panel { padding: 20px; }

@media (max-width: 760px) {
  .topbar { min-height: 64px; padding: 0 18px; }
  .season, .user-menu > span:not(.master-label) { display: none; }
  .brand small { max-width: 185px; }
  .login-layout, .install-layout { min-height: auto; padding: 38px 20px; gap: 32px; grid-template-columns: 1fr; }
  .intro h1 { font-size: clamp(2.35rem, 12vw, 3.4rem); }
  .login-card { padding: 23px; }
  footer { padding: 16px 20px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: flex; overflow: auto; gap: 5px; padding: 9px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar p { display: none; }
  .sidebar a { white-space: nowrap; }
  .dashboard, .club-page { padding: 24px 17px 38px; }
  .stats { grid-template-columns: 1fr; }
  .panel-title { align-items: flex-start; flex-direction: column; }
}
