/* Tennis Manager — Design System */
/* Schriften lokal statt Google Fonts (DSGVO) */
@import url('../fonts/fonts.css');

:root {
  --bg:           #0a1020;
  --bg2:          #0f1730;
  --surface:      #121c38;
  --card:         #172447;
  --card2:        #1c2c52;
  --border:       rgba(255,255,255,0.07);
  --border-strong:rgba(255,255,255,0.14);
  --text:         #e8ecf3;
  --text-dim:     #8a96ad;
  --text-mute:    #566480;
  --lime:         #c8ff3e;
  --lime-dim:     #a7d92e;
  --warn:         #ff7a3c;
  --bad:          #ff4d6d;
  --good:         #3edc9f;
  --hard:         #2a78c8;
  --clay:         #c25a35;
  --grass:        #2d8a4e;
  --font-ui:      'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --font-cond:    'Saira Condensed', 'Space Grotesk', sans-serif;
  --radius:       14px;
  --radius-sm:    8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: var(--font-ui); font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }

button { cursor: pointer; font-family: var(--font-ui); }
button:focus { outline: none; }

input, select, textarea {
  font-family: var(--font-ui); font-size: 14px;
  background: var(--bg2); color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px 14px;
  width: 100%; transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--lime);
}
select option { background: var(--card); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* ── Layout ── */
.page-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 24px 32px;
}
.page-wrap--narrow { max-width: 480px; }
.page-wrap--mid    { max-width: 780px; }

/* ── Card ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.card--accent-lime { box-shadow: inset 3px 0 0 var(--lime); }
.card--hover { transition: border-color 0.15s; }
.card--hover:hover { border-color: var(--border-strong); }

/* ── Section label ── */
.section-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--text-dim); text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn--primary  { background: var(--lime); color: #000; }
.btn--outline  { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn--danger   { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
.btn--ghost    { background: transparent; color: var(--lime); border: 1px dashed rgba(200,255,62,0.4); }
.btn--full     { width: 100%; }

/* ── Pill / Tag ── */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px;
  font-family: var(--font-mono); font-size: 10px;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(255,255,255,0.05); color: var(--text-dim);
  white-space: nowrap;
}
.pill--lime  { background: rgba(200,255,62,0.1);  color: var(--lime); }
.pill--warn  { background: rgba(255,122,60,0.1);  color: var(--warn); }
.pill--bad   { background: rgba(255,77,109,0.1);  color: var(--bad);  }
.pill--good  { background: rgba(62,220,159,0.1);  color: var(--good); }
.pill--blue  { background: rgba(42,120,200,0.15); color: #7ec8ff;     }

/* ── Surface chip ── */
.surface-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 9px;
  font-weight: 700; letter-spacing: 0.06em;
}
.surface-chip--hard  { background: rgba(42,120,200,0.18); color: var(--hard); }
.surface-chip--clay  { background: rgba(194,90,53,0.18);  color: var(--clay); }
.surface-chip--grass { background: rgba(45,138,78,0.18);  color: var(--grass);}
.surface-chip .dot   { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ── KPI Block ── */
.kpi-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--text-dim); text-transform: uppercase; margin-bottom: 6px;
}
.kpi-value {
  font-family: var(--font-cond); font-size: 30px; font-weight: 700; line-height: 1;
}
.kpi-sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ── Stat Bar ── */
.stat-bar { margin-bottom: 10px; }
.stat-bar__header {
  display: flex; justify-content: space-between;
  font-size: 12px; margin-bottom: 5px;
}
.stat-bar__label { color: var(--text); font-weight: 500; }
.stat-bar__val   { font-family: var(--font-mono); font-weight: 600; }
.stat-bar__track {
  height: 6px; background: rgba(255,255,255,0.06);
  border-radius: 99px; overflow: hidden;
}
.stat-bar__fill  { height: 100%; border-radius: 99px; }

/* ── Avatar ── */
.avatar {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.02em;
  color: #fff; flex-shrink: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ── Form ── */
.form-group  { margin-bottom: 18px; }
.form-label  { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; letter-spacing: 0.04em; }
.form-error  { font-size: 12px; color: var(--bad); margin-top: 8px; }
.form-hint   { font-size: 11px; color: var(--text-mute); margin-top: 6px; }

/* ── Alert ── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 18px; }
.alert--error   { background: rgba(255,77,109,0.12);  border: 1px solid rgba(255,77,109,0.25); color: var(--bad); }
.alert--success { background: rgba(62,220,159,0.12);  border: 1px solid rgba(62,220,159,0.25); color: var(--good); }
.alert--info    { background: rgba(200,255,62,0.08);  border: 1px solid rgba(200,255,62,0.2);  color: var(--lime); }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10,16,32,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
}
.topbar__logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--lime); font-weight: 700; letter-spacing: 0.18em;
}
.topbar__logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 8px var(--lime);
}
.topbar__spacer { flex: 1; }
.topbar__player {
  display: flex; align-items: center; gap: 10px;
}

/* ── Sidebar ── */
.sidebar {
  width: 240px; background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100vh;
  position: sticky; top: 0; overflow-y: auto; flex-shrink: 0;
}
.sidebar__section-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--text-mute);
  letter-spacing: 0.16em; padding: 6px 12px; text-transform: uppercase;
}
.sidebar__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); border: none;
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  width: 100%; text-align: left; cursor: pointer;
  border-left: 2px solid transparent; margin-bottom: 1px; transition: all 0.12s;
  text-decoration: none;
}
.sidebar__item:hover { background: rgba(255,255,255,0.04); text-decoration: none; }
.sidebar__item.active {
  background: rgba(200,255,62,0.08); color: var(--lime);
  border-left-color: var(--lime); font-weight: 600;
}

/* ── App layout (Sidebar + Content) ── */
.app-layout { display: flex; min-height: 100vh; }
.app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-main    { flex: 1; overflow-y: auto; }
.app-inner   { padding: 24px 32px; max-width: 1100px; margin: 0 auto; }

/* ── Page header ── */
.page-header { margin-bottom: 22px; }
.page-header__eyebrow {
  font-family: var(--font-mono); font-size: 11px; color: var(--lime);
  letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 4px;
}
.page-header__title {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--text);
}

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* ── Donut ── */
.donut-wrap { position: relative; display: inline-block; }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: var(--font-cond); color: var(--text);
}
.donut-val  { font-size: 20px; font-weight: 700; line-height: 1; }
.donut-lbl  { font-family: var(--font-mono); font-size: 8px; color: var(--text-dim); letter-spacing: 0.1em; margin-top: 2px; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar    { display: none; }
  .app-inner  { padding: 16px 14px 80px; }
  .grid-4     { grid-template-columns: repeat(2, 1fr); }
  .grid-3     { grid-template-columns: repeat(2, 1fr); }
}
