/* Eishalle Gelsenkirchen DJ App – Farben aus dem Logo */
:root {
  --navy: #0b3a75;
  --navy-2: #0a2f5e;
  --blue: #0b4fb3;
  --ice: #8cbbe3;
  --ice-soft: #e4f0fb;
  --bg: #f2f7fc;
  --card: #ffffff;
  --text: #0d1b2e;
  --muted: #5a6b82;
  --line: #d9e5f2;
  --ok: #17824f;
  --ok-soft: #e2f5ea;
  --warn: #b25e00;
  --warn-soft: #fff1dc;
  --danger: #c0302b;
  --danger-soft: #fde6e4;
  --grey-soft: #eceff3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 58, 117, .06), 0 4px 14px rgba(11, 58, 117, .06);
  --tabs-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #9cc6ee;
    --navy-2: #cfe3f7;
    --blue: #6ea8ea;
    --ice: #4f86bd;
    --ice-soft: #16283f;
    --bg: #0a1220;
    --card: #111c2e;
    --text: #e6eef8;
    --muted: #93a4ba;
    --line: #22324a;
    --ok: #4cc38a;
    --ok-soft: #123224;
    --warn: #f0a34a;
    --warn-soft: #33240f;
    --danger: #f07a73;
    --danger-soft: #3a1917;
    --grey-soft: #1c2638;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.has-tabs { padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 16px); }
a { color: var(--blue); }
h1 { font-size: 1.6rem; margin: .4em 0 .5em; letter-spacing: -.01em; color: var(--navy); }
h2 { font-size: 1.1rem; margin: 0 0 .6em; display: flex; align-items: center; gap: .4em; }
h3 { font-size: .95rem; margin: 1.2em 0 .5em; }
p { margin: .4em 0 .8em; }
code { background: var(--ice-soft); padding: .1em .35em; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.grow { flex: 1; min-width: 0; }
.warn-text { color: var(--warn); }

.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { border-radius: 9px; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: .98rem; }
.brand small { color: var(--muted); font-size: .8rem; }
.me-chip {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: var(--card); font-weight: 700; text-decoration: none;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 12px 16px; }

/* ---------- Untere Navigation ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  border-top: 1px solid var(--line);
}
.tabs a {
  position: relative; flex: 1; max-width: 170px; height: var(--tabs-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: .75rem; font-weight: 600;
}
.tabs a .ic { width: 24px; height: 24px; }
.tabs a.on { color: var(--blue); }
.tabs .dot {
  position: absolute; top: 8px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: .7rem; line-height: 18px; text-align: center;
}

/* ---------- Karten, Formulare, Buttons ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 0 0 14px; box-shadow: var(--shadow);
}
.form label { display: block; margin: 0 0 12px; font-weight: 600; font-size: .92rem; }
.form label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], select, textarea {
  display: block; width: 100%; margin-top: 5px;
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; min-height: 46px;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ice); outline-offset: 1px; border-color: var(--blue); }
input[disabled] { opacity: .6; }
input.mono { font: .8rem ui-monospace, Menlo, monospace; min-height: 38px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 50px; }
.pw-toggle {
  position: absolute; top: 5px; right: 2px; bottom: 0; width: 46px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--muted); cursor: pointer;
}
.pw-toggle .ic { width: 22px; height: 22px; }
.pw-toggle:hover { color: var(--blue); }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 10px 16px; border-radius: 11px;
  font: inherit; font-weight: 650; font-size: .95rem; text-decoration: none; cursor: pointer;
  background: var(--ice-soft); color: var(--navy); border: 1px solid transparent;
}
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--navy); color: var(--card); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .86rem; }
.btn.block { width: 100%; }

.flash {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; margin: 4px 0 14px;
  background: var(--ok-soft); color: var(--ok); font-weight: 550;
}
.flash .ic { margin-top: 2px; }
.flash.err { background: var(--danger-soft); color: var(--danger); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px; font-size: .78rem; font-weight: 650;
  background: var(--ice-soft); color: var(--navy); white-space: nowrap;
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.grey { background: var(--grey-soft); color: var(--muted); }
.badge.info { background: var(--navy); color: var(--card); }
.badge.soft { background: var(--ice-soft); color: var(--muted); }
.badge.swap { background: var(--warn-soft); color: var(--warn); }
.count { font-size: .8rem; background: var(--ice-soft); color: var(--navy); padding: 1px 8px; border-radius: 99px; }

/* ---------- Übersicht ---------- */
.hero {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px; margin: 4px 0 18px; border-radius: 18px; text-decoration: none;
  color: #fff; background: linear-gradient(135deg, #0b3a75 0%, #0b4fb3 60%, #5d9fdc 100%);
  box-shadow: 0 8px 24px rgba(11, 79, 179, .25);
}
.hero.is-open { background: linear-gradient(135deg, #7a4300 0%, #b25e00 60%, #e39a3b 100%); }
.hero-kicker { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.hero-time { font-size: 1.05rem; font-weight: 600; }
.hero-dj { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; font-weight: 500; margin-top: 4px; }
.hero-dj b { font-weight: 800; }

.head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chips { display: flex; gap: 8px; margin: 0 0 6px; overflow-x: auto; }
.chips a {
  padding: 7px 14px; border-radius: 99px; text-decoration: none; font-weight: 600; font-size: .9rem;
  background: var(--card); color: var(--muted); border: 1px solid var(--line);
}
.chips a.on { background: var(--navy); color: var(--card); border-color: var(--navy); }

.month { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 8px; }

.ev {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--ice);
  border-radius: var(--radius); padding: 12px 12px 12px 12px; margin: 0 0 10px;
  color: var(--text); text-decoration: none; box-shadow: var(--shadow);
}
.ev:hover { border-color: var(--ice); }
.ev.is-open { border-left-color: var(--warn); }
.ev.is-mine { border-left-color: var(--ok); background: linear-gradient(90deg, var(--ok-soft), var(--card) 60%); }
.ev.is-cancelled { opacity: .6; border-left-color: var(--line); }
.ev-date {
  width: 54px; flex: none; text-align: center; line-height: 1.05;
  display: flex; flex-direction: column; align-items: center;
}
.ev-wd { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.ev-day { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.ev-mon { font-size: .75rem; color: var(--muted); }
.ev-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ev-time { font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ev-title { font-weight: 700; display: flex; align-items: center; gap: 5px; color: var(--navy); }
.ev-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ev-go { color: var(--muted); }
.dj { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; font-size: 1.05rem; }
.dj.me { color: var(--ok); }
.rel { background: var(--navy); color: var(--card); font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; }

.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty .ic { width: 36px; height: 36px; opacity: .5; }
.empty.small { padding: 6px 0; text-align: left; }

/* ---------- Termin-Details ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; margin: 4px 0 12px; }
.detail-date { font-size: 1.4rem; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-time { color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; font-size: 1.05rem; }
.detail-title { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.detail-dj {
  margin: 14px 0 4px; padding: 14px; border-radius: 12px; background: var(--ice-soft);
  display: flex; flex-direction: column; gap: 2px;
}
.detail-dj .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.detail-dj strong { font-size: 1.5rem; }
.detail.is-cancelled .detail-date { text-decoration: line-through; }
.notes { margin-top: 12px; padding: 12px; border-left: 3px solid var(--ice); background: var(--bg); border-radius: 0 10px 10px 0; }
.quote { font-style: italic; color: var(--muted); margin: 2px 0; }
.swapbox { border-color: var(--warn); }
.admin { border-style: dashed; }
.admin-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-row form { margin: 0; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.inline-form label { font-weight: 600; font-size: .92rem; }
details.edit { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
details summary { cursor: pointer; font-weight: 650; color: var(--blue); }
details.edit[open] summary { margin-bottom: 12px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list form { margin: 0; }
.app-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }

.row-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; margin: 0 0 8px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line);
}
.row-link.warn { border-left: 4px solid var(--warn); }

/* ---------- Admin ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 14px 8px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  text-decoration: none; color: var(--navy); font-weight: 650; font-size: .85rem; box-shadow: var(--shadow);
}
.tile .ic { width: 26px; height: 26px; color: var(--blue); }
.todo a { text-decoration: none; color: var(--text); }

.person summary { display: flex; align-items: center; gap: 12px; list-style: none; color: var(--text); font-weight: 400; }
.person summary::-webkit-details-marker { display: none; }
.person[open] summary { margin-bottom: 12px; }
.person.is-off { opacity: .6; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--ice-soft); color: var(--navy); font-weight: 800;
}
.tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.add summary { display: flex; align-items: center; gap: 6px; }
.add[open] summary { margin-bottom: 14px; }
.copy { display: flex; gap: 8px; align-items: center; }
.copy input { margin: 0; }

.days { margin: 0 0 14px; }
.day { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day label.check { margin: 0; }
.day input[type=time] { width: 108px; margin: 0; min-height: 40px; padding: 7px 8px; }
.day:not(.on) input[type=time] { opacity: .35; }

/* ---------- Profil ---------- */
.cal-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.howto { margin-top: 14px; }
.howto ol { padding-left: 1.2em; margin: 10px 0 0; }
.howto li { margin: 4px 0; }

/* ---------- Anmeldung ---------- */
.auth { max-width: 420px; margin: 0 auto; padding-top: calc(env(safe-area-inset-top) + 24px); }
.auth h1 { text-align: center; margin-top: 12px; }
.auth-logo { display: block; margin: 0 auto; border-radius: 20px; box-shadow: var(--shadow); }

/* ---------- iPhone-Tipp ---------- */
.ios-hint {
  position: fixed; left: 12px; right: 12px; z-index: 30;
  bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 10px);
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 12px 12px 14px; border-radius: 14px;
  background: var(--navy); color: var(--card); font-size: .88rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.ios-hint[hidden] { display: none; }
.ios-hint .x { background: none; border: 0; color: inherit; padding: 2px; cursor: pointer; }

@media (max-width: 420px) {
  .tiles { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .tile { font-size: .78rem; padding: 12px 4px; }
  .day { grid-template-columns: 1fr auto auto auto; gap: 4px; }
  .day input[type=time] { width: 92px; }
  .inline-form { flex-direction: column; align-items: stretch; }
}
