/* Notenzimmer — Design Tokens
   Warm & menschlich · dunkelblau Nacht + cremeweiß + warmes Messing
*/

:root {
  /* Surfaces — warm neutral, fast wie altes Notenpapier */
  --surface-page: #f4efe4;        /* Pergament */
  --surface-card: #fbf7ec;        /* Karte */
  --surface-raised: #ffffff;
  --surface-ink: #1a1f2e;         /* Tinten-Nachtblau */
  --surface-ink-soft: #242a3a;
  --surface-ink-deep: #12161f;

  /* Text */
  --text-primary: #1a1f2e;
  --text-secondary: #4a5263;
  --text-tertiary: #7a8090;
  --text-muted: #a8acb8;
  --text-on-ink: #f5f1e8;
  --text-on-ink-muted: #8b9bb4;

  /* Akzent — warmes Messing/Honig (oklch) */
  --accent: oklch(74% 0.13 70);                /* honig */
  --accent-strong: oklch(64% 0.14 65);
  --accent-soft: oklch(92% 0.05 75);
  --accent-ink: #2d1f0a;

  /* Sekundär-Akzent (für Tags, Status) */
  --moss: oklch(58% 0.08 145);                 /* gedämpftes Moosgrün */
  --moss-soft: oklch(92% 0.04 145);
  --rose: oklch(62% 0.13 25);                  /* warmes Terrakotta für Warnungen */
  --rose-soft: oklch(93% 0.04 25);

  /* Linien */
  --line-soft: rgba(26, 31, 46, 0.08);
  --line: rgba(26, 31, 46, 0.14);
  --line-strong: rgba(26, 31, 46, 0.22);
  --line-on-ink: rgba(245, 241, 232, 0.12);
  --line-on-ink-strong: rgba(245, 241, 232, 0.22);

  /* Schatten — sehr weich, warm */
  --shadow-sm: 0 1px 2px rgba(26, 31, 46, 0.04), 0 1px 1px rgba(26, 31, 46, 0.03);
  --shadow-md: 0 4px 12px rgba(26, 31, 46, 0.06), 0 2px 4px rgba(26, 31, 46, 0.04);
  --shadow-lg: 0 12px 32px rgba(26, 31, 46, 0.10), 0 4px 8px rgba(26, 31, 46, 0.04);
  --shadow-xl: 0 24px 56px rgba(26, 31, 46, 0.16), 0 8px 16px rgba(26, 31, 46, 0.06);

  /* Radien */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-pill: 999px;

  /* Spacing-Skala */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;

  /* Type-Scale */
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-ui: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Anim */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Wortmarke */
.nz-mark {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
}
.nz-mark .nz-mark-glyph {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 999px;
  background: var(--accent);
  position: relative;
  align-self: center;
  transform: translateY(-0.05em);
}
.nz-mark .nz-mark-glyph::after {
  content: "";
  position: absolute;
  left: 0.45em;
  top: -0.1em;
  width: 1.5px;
  height: 0.9em;
  background: var(--accent);
  transform: rotate(8deg);
}

/* Utility */
.nz-mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }
.nz-display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; white-space: nowrap; }
.nz-num-tabular { font-variant-numeric: tabular-nums; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  padding: 13px 18px;
  min-height: 44px;
  border-radius: var(--r-md);
  transition: background 120ms var(--ease), transform 120ms var(--ease), box-shadow 120ms var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(0.5px); }

.btn-primary {
  background: var(--surface-ink);
  color: var(--text-on-ink);
}
.btn-primary:hover { background: var(--surface-ink-soft); }

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-accent:hover { background: var(--accent-strong); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
}
.btn-ghost:hover { background: var(--line-soft); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-outline:hover { background: var(--line-soft); }

.btn-sm { padding: 9px 13px; min-height: 36px; font-size: 14px; border-radius: var(--r-sm); }
.btn-lg { padding: 16px 24px; min-height: 52px; font-size: 16px; border-radius: var(--r-lg); }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.02em; text-transform: uppercase; }
.field-hint { font-size: 12px; color: var(--text-tertiary); }
.input, .textarea, .select {
  width: 100%;
  padding: 13px 14px;
  min-height: 48px;
  background: var(--surface-raised);
  color: var(--text-primary);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  font-size: 16px;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Pills / Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: var(--line-soft);
  color: var(--text-secondary);
  white-space: nowrap;
}
.chip-accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip-moss { background: var(--moss-soft); color: oklch(38% 0.08 145); }
.chip-rose { background: var(--rose-soft); color: oklch(42% 0.13 25); }
.chip-ink { background: var(--surface-ink); color: var(--text-on-ink); }
.chip-lila { background: oklch(94% 0.04 295); color: oklch(38% 0.13 295); }
.chip-warn { background: oklch(93% 0.07 60);  color: oklch(38% 0.13 50); }   /* orange — Absage */
.chip-info { background: oklch(93% 0.05 240); color: oklch(38% 0.13 240); }  /* blau — Krank */

/* Cards */
.card {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
}
.card-raised {
  background: var(--surface-raised);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

/* Scrollbar */
.nz-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.nz-scroll::-webkit-scrollbar-track { background: transparent; }
.nz-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--surface-page); }
.nz-scroll::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* Alert/Notice flash messages */
.flash-alert {
  background: var(--rose-soft);
  color: oklch(35% 0.13 25);
  border: 1px solid oklch(80% 0.08 25);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 15px;
  margin-bottom: 16px;
}
.flash-notice {
  background: var(--moss-soft);
  color: oklch(30% 0.08 145);
  border: 1px solid oklch(80% 0.06 145);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 15px;
  margin-bottom: 16px;
}
