:root {
  --bg: #050806; --surface: #10140f; --surface-2: #171c16; --line: rgba(229, 223, 201, .11);
  --cream: #e5dfc9; --sage: #a3b899; --ink: #f1eee3; --ink-2: #b7b8a9; --ink-3: #8b8f82;
  --ok: #7fc08a; --warn: #e0a458; --err: #e5796f; --info: #8fb2dd;
  --serif: 'Cinzel', Georgia, serif; --sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --r: 16px; --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--sans); min-height: 100dvh; }
body.is-booting { overflow: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: .03em; }
p { margin: 0; }
.muted { color: var(--ink-2); }
svg.lucide { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 6px; }

.bg-layer { position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(60vmax 45vmax at 85% -10%, rgba(163, 184, 153, .16), transparent 70%),
  radial-gradient(50vmax 40vmax at -5% 105%, rgba(229, 223, 201, .08), transparent 70%),
  url('background.svg') center / cover no-repeat, var(--bg); }

/* Layout */
.app { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.sidebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(5, 8, 6, .86); border-bottom: 1px solid var(--line); }
.topbar .brand-logo { height: 24px; display: block; }
.main { padding: 16px 16px 96px; min-width: 0; max-width: 1400px; width: 100%; margin: 0 auto; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; overflow-x: auto; background: rgba(10, 14, 11, .94); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); scrollbar-width: none; }
.bottom-nav a { flex: 1 0 74px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.bottom-nav a.active { color: var(--cream); }
.bottom-nav span { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 960px) {
  .app { grid-template-columns: 248px minmax(0, 1fr); }
  .topbar, .bottom-nav { display: none; }
  .main { padding: 28px 36px 48px; }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 26px 16px 16px; background: rgba(16, 20, 15, .62); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-right: 1px solid var(--line); }
  .sidebar .brand { display: block; padding: 0 10px; }
  .sidebar .brand-logo { width: 130px; display: block; }
  .tagline { padding: 10px 10px 18px; font-size: 12px; color: var(--ink-3); }
  .nav { display: grid; gap: 3px; }
  .nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; transition: background-color .2s, color .2s; }
  .nav a:hover { background: rgba(229, 223, 201, .06); color: var(--ink); }
  .nav a.active { background: rgba(163, 184, 153, .15); color: var(--cream); }
  .sidebar-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 12px 10px 0; border-top: 1px solid var(--line); }
  .who { display: grid; font-weight: 600; font-size: 13.5px; }
  .who small { color: var(--ink-3); font-weight: 400; }
}

.view-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.view-head h1 { font-size: clamp(21px, 3vw, 29px); color: var(--cream); }
.view-head-right { display: flex; align-items: center; gap: 8px; }
.stand { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.view { display: grid; gap: 16px; animation: fade .32s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.banners { display: grid; gap: 8px; margin-bottom: 14px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; border: 1px solid; }
.banner-warn { color: #f2cf9d; border-color: rgba(224, 164, 88, .35); background: rgba(224, 164, 88, .09); }
.banner-err { color: #f3b5ae; border-color: rgba(229, 121, 111, .4); background: rgba(229, 121, 111, .1); }
.banner-info { color: #c3d6ee; border-color: rgba(143, 178, 221, .32); background: rgba(143, 178, 221, .08); }

/* Bausteine */
.card { background: rgba(16, 20, 15, .84); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card h3 { font-size: 14.5px; color: var(--cream); margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
.grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
@media (min-width: 720px) { .grid-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: block; transition: transform .22s var(--ease), border-color .22s; }
a.kpi:hover { transform: translateY(-2px); border-color: rgba(163, 184, 153, .4); }
.kpi span { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.kpi strong { display: block; font: 600 34px/1.15 var(--serif); margin-top: 6px; color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 11px; border: 1px solid var(--line); background: rgba(229, 223, 201, .07); color: var(--ink); font: 600 13.5px var(--sans); cursor: pointer; transition: transform .16s var(--ease), background-color .2s, border-color .2s; }
.btn:hover { background: rgba(229, 223, 201, .13); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--cream); color: #12150f; border-color: var(--cream); }
.btn-primary:hover { background: #f4efdc; }
.btn-danger { color: #f3b5ae; border-color: rgba(229, 121, 111, .4); }
.btn-wide { width: 100%; margin-top: 8px; }
.btn-sm { min-height: 34px; padding: 5px 11px; font-size: 12.5px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; transition: color .2s, background-color .2s; }
.icon-btn:hover { color: var(--ink); background: rgba(229, 223, 201, .08); }
body.is-offline .needs-server { opacity: .4; pointer-events: none; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: rgba(229, 223, 201, .1); color: var(--ink-2); }
.st-erledigt, .st-bestätigt, .st-gemerkt, .st-done, .st-fertig { background: rgba(127, 192, 138, .16); color: #a8dcb1; }
.st-in-bearbeitung, .st-angefragt, .st-alternativ, .st-neu { background: rgba(224, 164, 88, .16); color: #f0c78f; }
.st-abgelehnt { background: rgba(229, 121, 111, .16); color: #f3b5ae; }
.st-gepitcht { background: rgba(143, 178, 221, .16); color: #bcd2ec; }
.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 34px 18px; color: var(--ink-2); border: 1px dashed var(--line); border-radius: var(--r); }
.empty svg.lucide { width: 26px; height: 26px; color: var(--ink-3); }
.empty strong { color: var(--ink); }
.is-disabled { opacity: .45; }
.hint { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* Formulare */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 10px 0 5px; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(5, 8, 6, .72); color: var(--ink); font: 400 16px/1.3 var(--sans); color-scheme: dark; }
textarea { min-height: 80px; resize: vertical; }
.filters { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .filters { grid-template-columns: 2fr 1fr 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-height: 40px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 600 12.5px var(--sans); cursor: pointer; transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--cream); color: #12150f; border-color: var(--cream); }

/* Charts */
.chart-box { position: relative; height: 210px; }
.donut-wrap { display: grid; gap: 16px; align-items: center; }
@media (min-width: 480px) { .donut-wrap { grid-template-columns: 190px minmax(0, 1fr); } }
.donut-box { position: relative; height: 190px; }
.donut-total { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-total strong { font: 600 28px/1 var(--serif); }
.donut-total small { color: var(--ink-3); font-size: 11.5px; }
.legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--c); }
.legend b { margin-left: auto; color: var(--ink); font-weight: 600; }

/* Tabelle */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid rgba(229, 223, 201, .06); }
tbody tr:hover { background: rgba(229, 223, 201, .035); }
td.title { font-weight: 600; color: var(--ink); }
@media (max-width: 719px) {
  table, tbody, tr, td { display: block; } thead { display: none; }
  tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  td { display: flex; justify-content: space-between; gap: 14px; padding: 3px 2px; border: 0; text-align: right; }
  td::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; text-align: left; }
}

/* Liste */
.item { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid rgba(229, 223, 201, .07); }
.item:last-child { border-bottom: 0; }
.item-main { min-width: 0; }
.item-main strong { display: block; overflow-wrap: anywhere; }
.item-main small { color: var(--ink-3); }
.booking-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.num { font: 600 12px var(--sans); color: var(--sage); letter-spacing: .04em; }
.avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(163, 184, 153, .15); color: var(--cream); font: 600 15px var(--serif); }

/* Scout-Player */
.scout-layout { display: grid; gap: 18px; justify-items: center; }
@media (min-width: 900px) { .scout-layout { grid-template-columns: 350px minmax(0, 1fr); align-items: start; justify-items: stretch; } }
.player { width: min(100%, 340px); padding: 18px 18px 24px; border-radius: 34px; background: linear-gradient(160deg, #e9e4d2, #bdb8a4 62%, #a09c8a); box-shadow: 0 22px 46px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .7); }
.screen { min-height: 278px; padding: 14px; border-radius: 12px; background: #0b100c; border: 3px solid #2a2d26; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.screen-bar { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }
.screen h2 { font-size: 20px; color: var(--cream); overflow-wrap: anywhere; }
.screen-meta { display: flex; gap: 12px; align-items: center; }
.ring { --p: 0; width: 62px; height: 62px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--sage) calc(var(--p) * 1%), rgba(229, 223, 201, .12) 0); }
.ring span { width: 50px; height: 50px; border-radius: 50%; background: #0b100c; display: grid; place-items: center; font: 700 17px var(--serif); }
.screen p { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.screen a { margin-top: auto; display: inline-flex; gap: 6px; align-items: center; color: var(--sage); font-size: 12.5px; font-weight: 600; }
.wheel { position: relative; width: 186px; height: 186px; margin: 20px auto 0; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #f7f3e6, #d8d3c0); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1), 0 2px 5px rgba(0, 0, 0, .18); }
.wheel button { position: absolute; display: grid; place-items: center; width: 56px; height: 56px; border: 0; background: transparent; color: #33362e; cursor: pointer; border-radius: 50%; transition: transform .14s var(--ease); }
.wheel button:active { transform: scale(.9); }
.wheel button:disabled { opacity: .3; cursor: not-allowed; }
.wheel .w-top { top: 4px; left: 65px; } .wheel .w-bottom { bottom: 4px; left: 65px; } .wheel .w-left { left: 4px; top: 65px; } .wheel .w-right { right: 4px; top: 65px; }
.wheel .w-center { width: 66px; height: 66px; left: 60px; top: 60px; background: #a9a592; color: #fff; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .2); }
.wheel-labels { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 11px; font-weight: 600; color: #3b3e35; }
.wheel-labels span { display: inline-flex; gap: 4px; align-items: center; }
.wheel-labels svg.lucide { width: 13px; height: 13px; }

/* Kalender */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--ink-3); padding: 2px 0; }
.cal-day { aspect-ratio: 1 / .86; min-width: 0; padding: 5px; border-radius: 9px; border: 1px solid transparent; background: rgba(229, 223, 201, .035); color: var(--ink-2); font: 500 12.5px var(--sans); text-align: left; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; transition: border-color .2s; }
.cal-day:hover { border-color: var(--line); }
.cal-day.other { opacity: .3; }
.cal-day.today { color: var(--cream); border-color: rgba(163, 184, 153, .55); }
.cal-day.sel { background: rgba(163, 184, 153, .18); }
.dots { display: flex; gap: 3px; flex-wrap: wrap; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.evt { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(229, 223, 201, .07); }
.evt:last-child { border: 0; }
.evt-bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--c); flex: none; }

/* Modal, Toast */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(2, 4, 3, .66); animation: fade .2s var(--ease); overflow-y: auto; }
.modal { width: min(100%, 480px); background: rgba(21, 26, 20, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(229, 223, 201, .18); border-radius: 18px; padding: 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal-head h2 { font-size: 18px; color: var(--cream); }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.secret { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 6px; padding: 10px 12px; background: rgba(5, 8, 6, .75); border: 1px solid var(--line); border-radius: 10px; font: 600 15px ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.pitch-text { white-space: pre-wrap; font-size: 14px; max-height: 44vh; overflow-y: auto; }
.toasts { position: fixed; z-index: 80; right: 16px; left: 16px; bottom: 82px; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
@media (min-width: 960px) { .toasts { left: auto; bottom: 22px; width: 380px; } }
.toast { display: flex; gap: 10px; align-items: center; max-width: 100%; padding: 11px 14px; border-radius: 12px; background: #1b211a; border: 1px solid var(--line); font-size: 13.5px; pointer-events: auto; animation: fade .25s var(--ease); transition: opacity .3s; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.toast.out { opacity: 0; }
.toast-ok svg { color: var(--ok); } .toast-err svg { color: var(--err); } .toast-info svg { color: var(--info); }

/* Login */
.gate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.login { width: min(100%, 380px); padding: 30px 26px; border-radius: 20px; background: rgba(16, 20, 15, .74); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); text-align: center; }
.login label, .login input { text-align: left; }
.login-logo { width: 170px; margin: 0 auto 10px; display: block; }
.login h1 { font-size: 20px; margin-bottom: 8px; color: var(--cream); }

/* Intro */
.intro { position: fixed; inset: 0; z-index: 100; overflow: hidden; perspective: 900px; }
.grille { position: absolute; top: 0; bottom: 0; width: 50.2%; will-change: transform; background: url('grille-slat.svg') left top / 52px 100% repeat-x, #0a0c09; }
.grille::before, .grille::after { content: ''; position: absolute; left: 0; right: 0; height: 26px; background: linear-gradient(180deg, #f7f2df, #9d9988 42%, #4c4c43 62%, #d9d3bd); box-shadow: 0 0 16px rgba(0, 0, 0, .6); }
.grille::before { top: 0; } .grille::after { bottom: 0; }
.grille-l { left: 0; box-shadow: inset -60px 0 70px -40px rgba(0, 0, 0, .55); }
.grille-r { right: 0; box-shadow: inset 60px 0 70px -40px rgba(0, 0, 0, .55); }
.intro-logo { position: absolute; left: 50%; top: 50%; width: min(52vw, 400px); filter: blur(0) drop-shadow(0 7px 14px rgba(0, 0, 0, .75)); will-change: transform; }
.intro-skip { position: absolute; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); padding: 9px 16px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(5, 8, 6, .7); color: var(--ink); font: 600 13px var(--sans); cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
