/* ═══ CallHub – Design-Tokens, Themes, Grundstile ═══════════════════════════ */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/Inter-Medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/Inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/Inter-Bold.woff") format("woff"); }

:root {
  --accent: #8b7bff;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-softer: color-mix(in srgb, var(--accent) 9%, transparent);
  --accent-strong: color-mix(in srgb, var(--accent) 82%, white);
  --radius: 14px;
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-lg: calc(var(--radius) * 1.4);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 120ms;
  --t: 200ms;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --success: #3ddc97;
  --danger: #ff5d73;
  --warning: #ffb454;
  --glass: 1;
  --font-scale: 100%;
  --bg-blur: 0px;
  --bg-dim: .55;
}

/* ── Themes (Dark ist Standard) ── */
:root, :root[data-theme="midnight"] {
  --bg: #0b0c10; --surface-1: #101218; --surface-2: #151821; --surface-3: #1b1f2a; --surface-4: #232836;
  --border: rgba(255, 255, 255, .07); --border-strong: rgba(255, 255, 255, .13);
  --text: #eceef5; --text-2: #b4b9c9; --muted: #7e8497; --hover: rgba(255, 255, 255, .05); --active: rgba(255, 255, 255, .09);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45); --scrim: rgba(4, 5, 8, .66);
  color-scheme: dark;
}
:root[data-theme="graphite"] {
  --bg: #0f0f10; --surface-1: #141415; --surface-2: #1a1a1c; --surface-3: #212124; --surface-4: #2a2a2e;
  --border: rgba(255, 255, 255, .07); --border-strong: rgba(255, 255, 255, .14);
  --text: #ededee; --text-2: #b7b7bc; --muted: #84848c; color-scheme: dark;
}
:root[data-theme="aurora"] {
  --bg: #071217; --surface-1: #0b1a21; --surface-2: #10222b; --surface-3: #162b36; --surface-4: #1d3744;
  --border: rgba(160, 230, 255, .08); --border-strong: rgba(160, 230, 255, .16);
  --text: #e8f4f8; --text-2: #a9c4cf; --muted: #6f8d9a; --hover: rgba(160, 230, 255, .06); --active: rgba(160, 230, 255, .11);
  color-scheme: dark;
}
:root[data-theme="dusk"] {
  --bg: #0e0a16; --surface-1: #140f1f; --surface-2: #1a1428; --surface-3: #221a33; --surface-4: #2c2242;
  --border: rgba(220, 190, 255, .08); --border-strong: rgba(220, 190, 255, .16);
  --text: #f0eaf8; --text-2: #bdb2d1; --muted: #8678a0; --hover: rgba(220, 190, 255, .06); --active: rgba(220, 190, 255, .11);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef0f6; --surface-1: #f6f7fb; --surface-2: #ffffff; --surface-3: #f0f2f8; --surface-4: #e5e8f1;
  --border: rgba(20, 24, 40, .09); --border-strong: rgba(20, 24, 40, .18);
  --text: #181b27; --text-2: #4a5066; --muted: #7b8199; --hover: rgba(20, 24, 40, .05); --active: rgba(20, 24, 40, .09);
  --shadow: 0 10px 40px rgba(30, 40, 80, .16); --scrim: rgba(20, 24, 40, .4); color-scheme: light;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--font-scale); -webkit-text-size-adjust: 100%; height: 100%; overflow-x: hidden; }
body {
  margin: 0; height: 100%; font-family: var(--font); font-size: .9375rem; line-height: 1.5; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01"; overflow: hidden; overscroll-behavior: none;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 2rem; text-align: center; }

/* Schmale, elegante Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-4); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: padding-box; border: 3px solid transparent; }

/* ── App-Hintergrund (anpassbar) ── */
.app-bg { position: fixed; inset: 0; z-index: -1; background: var(--bg); overflow: hidden; }
.app-bg::before {
  content: ""; position: absolute; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 35% at 15% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(35% 30% at 90% 90%, color-mix(in srgb, #3b82f6 10%, transparent), transparent 70%);
}
.app-bg.has-custom::before { display: none; }
.app-bg .bg-image { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(var(--bg-blur)); }
.app-bg .bg-dim { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) calc(var(--bg-dim) * 100%), transparent); }

/* ── Animationen ── */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes ring-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ── Boot ── */
#app.boot { display: grid; place-items: center; height: 100%; }
.boot-logo { animation: pulse 1.6s ease-in-out infinite; filter: drop-shadow(0 8px 30px color-mix(in srgb, var(--accent) 50%, transparent)); }
