/* Gemeinsames Aussehen der ECG-Musik-Plattform */
:root {
  color-scheme: light;
  --ink: #34252b; --muted: #75676a; --line: #eadbd1; --paper: #fffdfa; --page: #faf5ef;
  --berry: #a7305a; --berry-dark: #842244; --berry-soft: #f7e8ee;
  --sand: #f5cfaa; --sand-soft: #fdf1e4;
  --pine: #2f6b4f; --pine-dark: #22513b; --pine-soft: #e6f1ea;
  --rust: #a85213; --rust-dark: #7f3d0f; --rust-soft: #fbeadc;
  --sky: #2f6f9a; --sky-dark: #22557a; --sky-soft: #e5eff6;
  --shadow: 0 18px 50px rgba(77, 38, 50, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--ink);
  background: radial-gradient(ellipse at 84% 0%, rgba(245, 207, 170, .38), transparent 34rem),
              radial-gradient(ellipse at 0% 100%, rgba(167, 48, 90, .06), transparent 30rem), var(--page);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.topbar { min-height: 76px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(52, 37, 43, .1); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand img { width: 44px; height: 48px; object-fit: contain; display: block; flex: none; }
.brand-name { display: block; font-weight: 760; font-size: 17px; letter-spacing: -.03em; }
.brand-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.home-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.home-link:hover { border-color: var(--berry); color: var(--berry-dark); }
main { flex: 1; padding: 40px 0 56px; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.06; letter-spacing: -.055em; }
.intro { max-width: 640px; margin: 12px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.panel { border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--berry); color: var(--berry-dark); }
.btn.primary { border-color: var(--berry); color: #fff; background: var(--berry); }
.btn.primary:hover { background: var(--berry-dark); color: #fff; }
.btn.green { border-color: var(--pine); color: #fff; background: var(--pine); }
.btn.green:hover { background: var(--pine-dark); color: #fff; }
.btn.small { min-height: 34px; padding: 6px 12px; border-radius: 10px; font-size: 13px; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--berry-dark); background: var(--berry-soft); }
.btn.danger:hover { border-color: #b3261e; color: #b3261e; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field > label { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 15px; }
.field textarea { min-height: 74px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 3px var(--berry-soft); }
.req { color: var(--berry); }

.sync { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.sync::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #c9bcc0; }
.sync[data-state="live"]::before { background: #3a9a5b; }
.sync[data-state="saving"]::before { background: #e0a030; }
.sync[data-state="error"]::before, .sync[data-state="offline"]::before { background: #d0603a; }
.sync:empty { display: none; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; color: #fff; background: #34252b; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.sheet-bg { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: rgba(52, 37, 43, .45); backdrop-filter: blur(3px); }
.sheet-box { width: min(400px, 100%); padding: 26px; border-radius: 20px; background: var(--paper); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.sheet-box img { width: 44px; height: 48px; object-fit: contain; display: block; margin-bottom: 12px; }
.sheet-box h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.03em; }
.sheet-box p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.sheet-box .err { color: #b3261e; font-weight: 600; }
.sheet-box input { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; }
.sheet-box input:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 3px var(--berry-soft); }
.sheet-actions { display: flex; gap: 8px; margin-top: 14px; }
.sheet-actions .btn { flex: 1; }

footer.site { padding: 20px 0 28px; border-top: 1px solid rgba(52, 37, 43, .1); color: var(--muted); font-size: 12px; text-align: center; }
footer.site button { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 12px; padding: 0 0 0 6px; }
footer.site button:hover, footer.site .foot-admin:hover { color: var(--berry-dark); }
footer.site .foot-admin { color: var(--muted); text-decoration: underline; padding-left: 6px; }
footer.site button::before, footer.site .foot-admin::before { content: "·"; display: inline-block; margin-right: 6px; text-decoration: none; }

@media (max-width: 700px) {
  .shell { width: calc(100% - 28px); }
  .topbar { min-height: 66px; }
  .home-link { padding: 7px 10px; font-size: 12px; }
  .brand-sub { display: none; }
  main { padding: 26px 0 44px; }
}

/* Datumsfeld mit Platzhalter (siehe ECG.dateField) */
.date-ph { position: relative; display: block; min-width: 0; }
.date-ph > input { width: 100%; }
.date-ph.is-empty > input:not(:focus) { color: transparent; }
.date-ph.is-empty > input:not(:focus)::-webkit-datetime-edit { color: transparent; }
.date-ph.is-empty:not(:focus-within)::after { content: attr(data-ph); position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink); font-size: 15px; font-weight: 400; letter-spacing: 0; pointer-events: none; white-space: nowrap; }

/* Admin-Leiste ganz oben (siehe plattform.js) */
.admin-strip { position: sticky; top: 0; z-index: 80; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; padding: 6px 12px; color: #fff; background: #3b2a30; font-size: 13px; font-weight: 650; }
.admin-strip span::before { content: "● "; color: #f59f97; }
.admin-strip button { padding: 4px 14px; border: 1px solid #f1c4c0; border-radius: 999px; color: #9f2a22; background: #fdeceb; font: inherit; font-size: 12.5px; font-weight: 750; cursor: pointer; }
.admin-strip button:hover { background: #fadcd9; }
.admin-strip .strip-link { padding: 4px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #fff; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.admin-strip .strip-link:hover { background: rgba(255,255,255,.12); }
.admin-strip .strip-link[aria-current="page"] { color: #3b2a30; background: #fff; border-color: #fff; }
.admin-login { border: 0; padding: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
body:not(.is-admin) .admin-only { display: none !important; }   /* Admin-Knöpfe nur nach zentraler Anmeldung */
