/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --bg-soft: #eef0f6;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.16), 0 8px 24px rgba(15, 23, 42, 0.08);
  --glow-a: rgba(99, 102, 241, 0.16);
  --glow-b: rgba(236, 72, 153, 0.10);

  --s-offen: #3b82f6;
  --s-einladung: #8b5cf6;
  --s-interview: #f59e0b;
  --s-angebot: #10b981;
  --s-absage: #f43f5e;
  --s-keine: #94a3b8;
  --s-zurueck: #64748b;
  --s-phase: #8b5cf6;

  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
.muted { color: var(--text-2); margin: 0; }
.small { font-size: 12px; }
[hidden] { display: none !important; }

/* ---------- Neutraler Startzustand während der Sitzungsprüfung ---------- */
.app-boot {
  position: fixed;
  z-index: 4;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding-bottom: 36px;
  background: var(--bg);
}
.app-boot-brand { display: flex; align-items: center; gap: 11px; }
.app-boot-brand .brand-icon { width: 44px; height: 44px; }
.app-boot-brand .brand-wordmark { width: auto; height: 23px; }
.app-boot-spinner { width: 24px; height: 24px; border: 2px solid rgba(99,102,241,.18); border-top-color: var(--accent); border-radius: 50%; animation: boot-spin .8s linear infinite; }
.app-boot p { margin: -8px 0 0; color: var(--text-3); font-size: 11px; font-weight: 650; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .app-boot-spinner { animation-duration: 1.8s; } }

/* ---------- Anmeldung ---------- */
.brand-lockup { display: block; width: auto; height: 31px; object-fit: contain; }
.brand-lockup-white { filter: drop-shadow(0 6px 18px rgba(0,0,0,.12)); }
.brand-icon { display: block; width: 40px; height: 40px; flex: none; object-fit: contain; }
.brand-wordmark { display: block; width: auto; height: 21px; object-fit: contain; }

.auth-shell {
  --auth-ink: #191b19;
  --auth-paper: #f8f8f5;
  --auth-line: #dcddd7;
  --auth-violet: #5f5dd0;
  --auth-lime: #a7f06b;
  --auth-spring: cubic-bezier(.32, 1.28, .5, 1);
  position: relative; z-index: 2; isolation: isolate; min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; overflow: hidden; padding: clamp(18px, 4vw, 52px);
  background: #e9e9e5;
  -webkit-tap-highlight-color: transparent;
}
.auth-shell::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.55), transparent 34%, transparent 68%, rgba(255,255,255,.28));
}
.auth-orb { position: absolute; z-index: -1; width: 46vmax; aspect-ratio: 1; border-radius: 50%; pointer-events: none; filter: blur(70px); opacity: .5; }
.auth-orb-one { top: -22vmax; left: -14vmax; background: radial-gradient(circle, rgba(119,117,216,.42), transparent 66%); animation: auth-drift 22s ease-in-out infinite alternate; }
.auth-orb-two { right: -18vmax; bottom: -24vmax; background: radial-gradient(circle, rgba(167,240,107,.34), transparent 66%); animation: auth-drift 26s ease-in-out -8s infinite alternate-reverse; }

.auth-layout {
  width: min(1080px, 100%); min-height: min(650px, calc(100dvh - 36px)); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(400px, .92fr);
  overflow: hidden; border: 1px solid #d2d3cd; border-radius: 28px;
  background: var(--auth-paper);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 2px 4px rgba(26,28,25,.04), 0 34px 90px rgba(26,28,25,.14);
  animation: auth-pop .8s var(--ease) both;
}

/* Showcase */
.auth-showcase {
  position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 46px 48px 40px; color: #fff;
  background: radial-gradient(120% 70% at 85% 72%, rgba(97,95,211,.26), transparent 60%), var(--auth-ink);
}
.auth-showcase::before {
  content: ""; position: absolute; inset: 20px; pointer-events: none;
  border: 1px solid rgba(255,255,255,.07); border-radius: 12px;
}
.auth-wordmark, .auth-mobile-brand { display: flex; align-items: center; gap: 11px; }
.auth-wordmark { position: relative; z-index: 1; animation: auth-in .7s var(--ease) .1s both; }
.auth-copy { position: relative; z-index: 1; margin: auto 0 30px; max-width: 510px; animation: auth-in .8s var(--ease) .18s both; }
.auth-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: rgba(255,255,255,.58); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--auth-lime); animation: auth-pulse 2.6s ease-out infinite; }
.auth-copy h1 { max-width: 490px; font-size: clamp(38px, 4vw, 58px); line-height: 1.02; letter-spacing: -.055em; }
.auth-copy h1 em { color: #b9b8ff; font-style: normal; }
.auth-copy p { max-width: 470px; margin: 20px 0 0; color: rgba(255,255,255,.56); font-size: 15px; line-height: 1.68; }
.auth-product-card {
  position: relative; z-index: 1; padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 24px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
  animation: auth-in .9s var(--ease) .3s both, auth-float 7s ease-in-out 1.2s infinite;
}
.auth-product-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.auth-product-top div { display: grid; gap: 3px; }
.auth-product-top small { color: rgba(255,255,255,.52); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.auth-product-top strong { font-size: 15px; }
.auth-product-top > span { padding: 6px 9px; border-radius: 999px; background: #30372c; color: #baf28c; font-size: 10px; font-weight: 700; }
.auth-task {
  display: grid; grid-template-columns: 36px minmax(0,1fr) 8px; align-items: center; gap: 11px; padding: 10px 11px; margin-top: 7px;
  border: 1px solid rgba(255,255,255,.05); border-radius: 12px; background: rgba(255,255,255,.045);
  animation: auth-in .7s var(--ease) both;
}
.auth-task:nth-of-type(2) { animation-delay: .5s; }
.auth-task:nth-of-type(3) { animation-delay: .62s; }
.auth-company-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 800; }
.auth-company-mark.purple { background: #615fd3; }
.auth-company-mark.blue { background: #2773b8; }
.auth-task div { min-width: 0; display: grid; gap: 3px; }
.auth-task strong { font-size: 12px; }
.auth-task small { overflow: hidden; color: rgba(255,255,255,.57); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.auth-task-state { width: 7px; height: 7px; border-radius: 50%; background: var(--auth-lime); box-shadow: 0 0 10px rgba(167,240,107,.5); }
.auth-progress { margin-top: 14px; }
.auth-progress div { display: flex; justify-content: space-between; margin-bottom: 7px; color: rgba(255,255,255,.65); font-size: 10px; }
.auth-progress b { color: #fff; }
.auth-progress > i { display: block; height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.11); }
.auth-progress > i span { display: block; width: 80%; height: 100%; border-radius: inherit; background: var(--auth-lime); transform-origin: left; animation: auth-fill 1.4s var(--ease) .8s both; }
.auth-proof { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; color: rgba(255,255,255,.62); font-size: 10.5px; font-weight: 600; animation: auth-in .8s var(--ease) .45s both; }
.auth-proof span { display: flex; align-items: center; gap: 6px; }
.auth-proof svg { width: 15px; height: 15px; color: var(--auth-lime); }

/* Formular */
.auth-card {
  display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 4vw, 48px);
  border-left: 1px solid #e0e1dc; background: var(--auth-paper);
}
.auth-card > * { width: 100%; max-width: 400px; align-self: center; animation: auth-in .7s var(--ease) both; }
.auth-card > :nth-child(2) { animation-delay: .08s; }
.auth-card > :nth-child(3) { animation-delay: .14s; }
.auth-card > :nth-child(4) { animation-delay: .2s; }
.auth-card > :nth-child(n+5) { animation-delay: .26s; }
.auth-mobile-brand { display: none; margin-bottom: 28px; color: var(--text); }
.auth-mobile-brand .brand-icon { width: 39px; height: 39px; }
.auth-mobile-brand .brand-wordmark { width: auto; height: 20px; }

/* Segmented Control mit gleitender Auswahl */
.auth-tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 20px;
  border-radius: 14px; background: #ebebe6; box-shadow: inset 0 0 0 1px rgba(26,28,25,.06);
}
.auth-tabs::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px);
  border-radius: 11px; background: #fff;
  box-shadow: 0 1px 2px rgba(26,28,25,.08), 0 4px 12px rgba(26,28,25,.08);
  transition: transform .5s var(--auth-spring);
}
.auth-tabs:has(#signupTab.active)::before { transform: translateX(calc(100% + 4px)); }
.auth-tabs button {
  position: relative; z-index: 1; height: 40px; border: 0; border-radius: 11px; background: transparent;
  color: #8a9099; font-size: 12.5px; font-weight: 700; transition: color .25s var(--ease), transform .2s var(--ease);
}
.auth-tabs button.active { color: var(--auth-ink); }
.auth-tabs button:active { transform: scale(.96); }
@supports not selector(:has(*)) {
  .auth-tabs::before { display: none; }
  .auth-tabs button.active { background: #fff; box-shadow: 0 1px 3px rgba(30,32,29,.1); }
}

.auth-heading { margin-bottom: 18px; }
.auth-welcome { color: var(--auth-violet); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.auth-heading h2 { min-height: 1.15em; margin-top: 8px; color: #111827; font-size: clamp(28px, 3vw, 36px); line-height: 1.12; letter-spacing: -.045em; }
.auth-heading p { min-height: 1.55em; margin: 8px 0 0; color: #64748b; font-size: 13.5px; line-height: 1.55; }
.auth-heading.is-swapping h2 { animation: auth-swap .45s var(--ease) both; }
.auth-heading.is-swapping p { animation: auth-swap .45s var(--ease) .05s both; }

.auth-form { display: grid; gap: 10px; }
.auth-field { display: grid; gap: 7px; color: #334155; font-size: 11.5px; font-weight: 700; }
.auth-input {
  height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 15px;
  border: 1px solid var(--auth-line); border-radius: 14px; background: #fff;
  box-shadow: 0 1px 2px rgba(26,28,25,.03);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.auth-input:hover { border-color: #c9cac3; }
.auth-input:focus-within { border-color: #8583e0; box-shadow: 0 0 0 4px rgba(95,93,208,.12), 0 6px 18px rgba(95,93,208,.08); }
.auth-input > svg { width: 18px; height: 18px; flex: none; color: #a0a8b5; transition: color .25s var(--ease), transform .35s var(--auth-spring); }
.auth-input:focus-within > svg { color: var(--auth-violet); transform: scale(1.08); }
.auth-input input { min-width: 0; height: 100%; flex: 1; border: 0; outline: 0; background: transparent; color: #0f172a; font-size: 14px; font-weight: 500; }
.auth-input input::placeholder { color: #aab3c0; font-weight: 400; }
.password-strength {
  display: grid; gap: 5px; margin: -2px 2px 0; color: #7c8491; font-size: 9.5px; line-height: 1.3;
}
.password-strength[hidden], .auth-field[hidden] { display: none; }
.password-strength-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.password-strength-bars i { height: 3px; border-radius: 99px; background: #dfe1dc; transition: background .2s ease, transform .2s ease; }
.password-strength[data-score="1"] .password-strength-bars i:nth-child(-n+1) { background: #ef6a67; }
.password-strength[data-score="2"] .password-strength-bars i:nth-child(-n+2) { background: #eaa331; }
.password-strength[data-score="3"] .password-strength-bars i:nth-child(-n+3) { background: #76b852; }
.password-strength[data-score="4"] .password-strength-bars i { background: #2ca568; }
.password-strength[data-score="4"] { color: #218557; }
.auth-input.is-valid { border-color: #7bc39b; box-shadow: 0 0 0 3px rgba(44,165,104,.08); }
.auth-input.is-invalid { border-color: #e7a3a1; }
.auth-password-toggle {
  width: 40px; height: 40px; display: grid; place-items: center; flex: none; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: #94a3b8; transition: background .2s, color .2s, transform .2s var(--ease);
}
.auth-password-toggle:hover { background: #f1f2ee; color: #475569; }
.auth-password-toggle:active { transform: scale(.9); }
.auth-password-toggle svg { grid-area: 1/1; width: 18px; height: 18px; transition: opacity .2s, transform .3s var(--auth-spring); }
.auth-password-toggle .eye-closed, .auth-password-toggle.showing .eye-open { opacity: 0; transform: scale(.6) rotate(-12deg); }
.auth-password-toggle.showing .eye-closed { opacity: 1; transform: none; }
.auth-tabs button:focus-visible, .auth-password-toggle:focus-visible, .auth-primary:focus-visible { outline: 3px solid rgba(99,102,241,.28); outline-offset: 2px; }

.auth-consent {
  min-height: 33px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 0 2px;
  color: #475569; font-size: 11.5px; line-height: 1.45; cursor: pointer;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.auth-consent[hidden] { display: none; }
.auth-consent.placeholder { opacity: 0; transform: translateY(-6px); visibility: hidden; pointer-events: none; transition: opacity .2s, transform .2s, visibility 0s .2s; }
.auth-consent input { width: 18px; height: 18px; margin: 0; accent-color: var(--auth-violet); }
.auth-consent a { color: var(--accent); font-weight: 650; text-decoration: none; }
.auth-consent a:hover { text-decoration: underline; }
.auth-turnstile { width: 100%; min-height: 65px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.auth-turnstile:empty::before { content: "Bot-Schutz wird geladen …"; color: #94a3b8; font-size: 10.5px; }

.auth-message { min-height: 17px; margin: -4px 0 -3px; color: var(--s-absage); font-size: 11.5px; line-height: 1.4; }
.auth-message:not(:empty) { animation: auth-swap .3s var(--ease) both; }
.auth-message.ok { color: var(--s-angebot); }

.auth-primary {
  position: relative; height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px; overflow: hidden;
  border: 0; border-radius: 14px; color: #fff; background: var(--auth-ink, #191b19);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 22px rgba(25,27,25,.18);
  font-size: 13.5px; font-weight: 750;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.auth-primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.14) 50%, transparent 65%);
  transform: translateX(-100%); transition: transform .8s var(--ease);
}
.auth-primary:hover { transform: translateY(-1px); background: #2a2d29; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 28px rgba(25,27,25,.22); }
.auth-primary:hover::after { transform: translateX(100%); }
.auth-primary:active { transform: scale(.98); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 10px rgba(25,27,25,.18); }
.auth-primary > span, .auth-primary > svg { transition: opacity .2s, transform .25s var(--ease); }
.auth-primary > svg { width: 17px; }
.auth-primary:hover > svg { transform: translateX(3px); }
.auth-spinner {
  position: absolute; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%;
  opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s var(--auth-spring);
  animation: boot-spin .75s linear infinite;
}
.auth-primary.is-busy { cursor: progress; }
.auth-primary.is-busy > span, .auth-primary.is-busy > svg { opacity: 0; transform: scale(.9); }
.auth-primary.is-busy .auth-spinner { opacity: 1; transform: none; }
.auth-primary:disabled:not(.is-busy), .auth-tabs button:disabled { cursor: wait; opacity: .58; transform: none; }

.auth-terms { min-height: 1.45em; margin: 18px 8px 0; color: #94a3b8; text-align: center; font-size: 10.5px; line-height: 1.45; }
.auth-privacy { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; color: #64748b; font-size: 10.5px; font-weight: 600; }
.auth-privacy span { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.12); }

/* Bestätigung nach erfolgreicher Registrierung */
.auth-confirm-overlay {
  position: fixed; inset: 0; z-index: 3000; background: rgba(18,20,18,.58); opacity: 0;
  backdrop-filter: blur(10px); transition: opacity .22s ease;
}
.auth-confirm-overlay.show { opacity: 1; }
.auth-confirm-dialog {
  position: fixed; top: 50%; left: 50%; z-index: 3001; width: min(420px, calc(100% - 32px));
  padding: 32px; border: 1px solid rgba(255,255,255,.72); border-radius: 24px; background: #fbfbf8;
  box-shadow: 0 28px 90px rgba(16,18,16,.28); text-align: center;
  opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(.98); transition: opacity .22s ease, transform .32s var(--auth-spring, cubic-bezier(.32, 1.28, .5, 1));
}
.auth-confirm-dialog.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.auth-confirm-dialog[hidden], .auth-confirm-overlay[hidden] { display: none; }
.auth-confirm-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 18px; color: #514fc2; background: #e9e8ff; }
.auth-confirm-icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-confirm-kicker { color: #5f5dd0; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-confirm-dialog h2 { margin: 8px 0 10px; color: #171a17; font-size: 28px; letter-spacing: -.04em; }
.auth-confirm-dialog p { margin: 0; color: #657064; font-size: 13px; line-height: 1.6; }
.auth-confirm-dialog p strong { color: #292e29; overflow-wrap: anywhere; }
.auth-confirm-dialog .auth-primary { width: 100%; height: 48px; margin-top: 22px; }
.auth-confirm-dialog small { display: block; margin-top: 13px; color: #929991; font-size: 10px; }

@keyframes auth-pop { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes auth-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes auth-swap { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
@keyframes auth-float { 50% { transform: translateY(-6px); } }
@keyframes auth-fill { from { transform: scaleX(0); } }
@keyframes auth-pulse { 0% { box-shadow: 0 0 0 0 rgba(167,240,107,.5); } 70%, 100% { box-shadow: 0 0 0 8px rgba(167,240,107,0); } }
@keyframes auth-drift { to { transform: translate(6vmax, 4vmax) scale(1.08); } }
@keyframes auth-sheet { from { transform: translateY(40px); opacity: 0; } }

/* Tablet & Mobile: dunkler Markenkopf mit Formular als Bottom Sheet */
@media (max-width: 880px) {
  .auth-shell { display: flex; flex-direction: column; padding: 0; background: var(--auth-ink); overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; }
  .auth-shell::before { display: none; }
  .auth-orb-two { display: none; }
  .auth-orb-one { top: -30vmax; left: auto; right: -20vmax; opacity: .7; }
  .auth-layout {
    width: 100%; min-height: 0; flex: 1 0 auto; display: flex; flex-direction: column; overflow: visible;
    border: 0; border-radius: 0; background: transparent; box-shadow: none; animation: none;
  }
  .auth-showcase { flex: none; padding: max(22px, env(safe-area-inset-top)) 24px 46px; background: transparent; }
  .auth-showcase::before, .auth-product-card, .auth-proof, .auth-copy p { display: none; }
  .auth-wordmark .brand-lockup { height: 26px; }
  .auth-copy { margin: 26px 0 0; }
  .auth-kicker { margin-bottom: 10px; font-size: 10px; }
  .auth-copy h1 { font-size: clamp(28px, 7.6vw, 40px); letter-spacing: -.05em; }
  .auth-card {
    position: relative; flex: 1; justify-content: flex-start; margin-top: -24px;
    padding: 30px clamp(20px, 6vw, 48px) max(24px, env(safe-area-inset-bottom));
    border: 0; border-radius: 28px 28px 0 0;
    box-shadow: 0 -12px 40px rgba(0,0,0,.28);
    animation: auth-sheet .75s var(--auth-spring) .05s both;
  }
  .auth-card::before {
    content: ""; position: absolute; top: 9px; left: 50%; width: 38px; height: 5px; margin-left: -19px;
    border-radius: 99px; background: #d6d7d1;
  }
  .auth-card > * { max-width: 460px; }
  .auth-mobile-brand { display: none; }
  body .auth-shell { padding-bottom: 0; }
}

@media (max-width: 520px) {
  .auth-shell { height: auto; min-height: 100dvh; overflow-y: visible; }
  .auth-showcase { padding: max(16px, env(safe-area-inset-top)) 22px 40px; }
  .auth-copy { margin-top: 20px; }
  .auth-card { padding: 26px 20px 18px; }
  body .auth-shell { padding-bottom: 0; }
  .auth-tabs { margin-bottom: 20px; border-radius: 13px; }
  .auth-tabs::before { border-radius: 10px; }
  .auth-tabs button { height: 38px; font-size: 12px; }
  .auth-heading { margin-bottom: 18px; }
  .auth-welcome { font-size: 10px; }
  .auth-heading h2 { margin-top: 5px; font-size: clamp(25px, 7.4vw, 29px); white-space: nowrap; }
  .auth-heading p { margin-top: 5px; font-size: 12px; }
  .auth-form { gap: 12px; }
  .auth-field { gap: 6px; font-size: 11px; }
  .auth-input { height: 50px; }
  .auth-consent { min-height: 30px; font-size: 11px; }
  .auth-turnstile { min-height: 0; overflow: hidden; }
  .auth-message { min-height: 14px; margin: -2px 0; font-size: 11px; }
  .auth-primary { height: 50px; font-size: 13px; }
  .auth-terms, .auth-privacy { display: none; }
  .auth-shell.signup-mode .auth-showcase { padding-bottom: 32px; }
  .auth-shell.signup-mode .auth-copy { margin-top: 12px; }
  .auth-shell.signup-mode .auth-card { padding-top: 20px; }
  .auth-shell.signup-mode .auth-tabs { margin-bottom: 10px; }
  .auth-shell.signup-mode .auth-heading { margin-bottom: 10px; }
  .auth-shell.signup-mode .auth-welcome, .auth-shell.signup-mode .auth-heading p { display: none; }
  .auth-shell.signup-mode .auth-heading h2 { margin-top: 0; font-size: 23px; }
  .auth-shell.signup-mode .auth-form { gap: 7px; }
  .auth-shell.signup-mode .auth-input { height: 44px; }
  .auth-shell.signup-mode .auth-field { gap: 4px; }
  .auth-shell.signup-mode .auth-consent { min-height: 26px; }
  .auth-shell.signup-mode .auth-primary { height: 46px; }
  .auth-confirm-dialog { padding: 27px 22px; border-radius: 22px; }
  .auth-confirm-dialog h2 { font-size: 25px; }
}

/* Kleine oder niedrige Displays: Formular hat Vorrang */
@media (max-width: 880px) and (max-height: 720px) {
  .auth-copy h1 { display: none; }
  .auth-kicker { margin-bottom: 0; }
  .auth-copy { margin-top: 16px; }
  .auth-showcase { padding-bottom: 38px; }
}
@media (min-width: 881px) and (max-height: 720px) {
  .auth-shell { padding: 10px; }
  .auth-layout { min-height: calc(100dvh - 20px); }
  .auth-card { padding: 18px 36px; }
  .auth-tabs { margin-bottom: 12px; }
  .auth-tabs button { height: 36px; }
  .auth-heading { margin-bottom: 10px; }
  .auth-welcome { display: none; }
  .auth-heading h2 { margin-top: 0; font-size: 28px; }
  .auth-heading p { margin-top: 4px; }
  .auth-form { gap: 7px; }
  .auth-field { gap: 4px; }
  .auth-input { height: 44px; }
  .auth-consent { min-height: 27px; }
  .auth-turnstile { min-height: 0; }
  .auth-primary { height: 46px; }
  .auth-terms, .auth-privacy { display: none; }
  .auth-showcase { padding: 32px 38px 28px; }
  .auth-copy h1 { font-size: 44px; }
  .auth-copy p { margin-top: 12px; }
}
@media (max-width: 340px) {
  .auth-card { padding-inline: 14px; }
  .auth-heading h2 { font-size: 24px; }
}

/* Desktop/Tablet: Login und Registrierung teilen dieselbe kompakte Karte,
   damit Vorschau, Tabs und Überschrift beim Wechsel nicht springen. */
@media (min-width: 881px) {
  .auth-layout {
    height: min(650px, calc(100dvh - 28px));
    min-height: 560px;
  }
  .auth-showcase { padding: 30px 36px 26px; }
  .auth-showcase::before { inset: 16px; }
  .auth-wordmark .brand-lockup { height: 28px; }
  .auth-copy { margin: auto 0 18px; }
  .auth-kicker { margin-bottom: 10px; font-size: 9.5px; }
  .auth-copy h1 { max-width: 440px; font-size: clamp(36px, 3.2vw, 46px); }
  .auth-copy p { max-width: 430px; margin-top: 12px; font-size: 13px; line-height: 1.5; }
  .auth-product-card { padding: 12px; border-radius: 16px; }
  .auth-product-top { margin-bottom: 9px; }
  .auth-task {
    grid-template-columns: 32px minmax(0, 1fr) 8px;
    gap: 9px; margin-top: 5px; padding: 7px 9px;
  }
  .auth-company-mark { width: 32px; height: 32px; border-radius: 9px; }
  .auth-progress { margin-top: 10px; }
  .auth-proof { gap: 14px; margin-top: 12px; }
  /* Formular oben verankern: Login und Registrierung beginnen an derselben Stelle */
  .auth-card { justify-content: flex-start; padding: 26px clamp(28px, 3vw, 42px) 20px; }
  .auth-tabs { margin-bottom: 10px; }
  .auth-tabs button { height: 36px; }
  .auth-heading { margin-bottom: 10px; }
  .auth-welcome { display: none; }
  .auth-heading h2 { margin-top: 0; font-size: 28px; }
  .auth-heading p { min-height: 0; margin-top: 4px; font-size: 12px; }
  .auth-form { gap: 7px; }
  .auth-field { gap: 4px; font-size: 11px; }
  .auth-input { height: 46px; }
  .password-strength { gap: 4px; font-size: 9px; }
  .auth-consent { min-height: 26px; font-size: 10.5px; }
  .auth-turnstile { min-height: 0; }
  .auth-message { min-height: 14px; margin-block: -2px; font-size: 10.5px; }
  .auth-primary { height: 46px; }
  .auth-terms { display: none; }
  .auth-privacy { margin-top: auto; padding-top: 12px; }
}

@media (min-width: 881px) and (max-height: 620px) {
  .auth-layout { height: calc(100dvh - 20px); min-height: 0; }
  .auth-showcase { padding-block: 28px; }
  .auth-copy p,
  .auth-product-card,
  .auth-proof,
  .auth-privacy { display: none; }
}

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

/* ---------- Rechtshinweise (im Seitenfluss, klebt nie) ---------- */
.site-legal-footer {
  position: relative;
  inset: auto;
  width: 100%;
  flex: none;
  min-height: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 14px max(8px, env(safe-area-inset-bottom));
  color: var(--text-3);
  font-size: 10.5px;
}
.site-legal-footer a { color: var(--text-2); font-weight: 700; text-decoration: none; }
.site-legal-footer a:hover, .site-legal-footer a:focus-visible { color: var(--accent); text-decoration: underline; }

@media (max-width: 430px) {
  .site-legal-footer { gap: 6px; padding-inline: 8px; font-size: 9.5px; }
}

/* ---------- Onboarding ---------- */
.onboarding-shell {
  position: relative; z-index: 3; min-height: 100vh; display: grid; place-items: center;
  padding: clamp(18px, 4vw, 52px); background: #e9e9e5;
}
.onboarding-frame {
  width: min(1100px, 100%); min-height: 690px; overflow: hidden; border: 1px solid #d2d3cd;
  border-radius: 24px; background: #f8f8f5; box-shadow: 0 2px 4px rgba(26,28,25,.04), 0 30px 80px rgba(26,28,25,.12);
  animation: rise .55s var(--ease) both;
}
.onboarding-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid #e0e1dc; }
.onboarding-brand { display: flex; align-items: center; gap: 10px; color: #181a18; }
.onboarding-brand .brand-icon { width: 34px; height: 34px; }
.onboarding-brand .brand-wordmark { height: 19px; }
.onboarding-logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #191b19; }
.onboarding-logo svg { width: 23px; height: 23px; }
.onboarding-logo .l-track { fill: currentColor; stroke: none; opacity: .35; }
.onboarding-logo .l-step { fill: currentColor; stroke: none; }
.onboarding-skip { padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #73776f; font-size: 11.5px; font-weight: 650; }
.onboarding-skip:hover { color: #171917; background: #ededE9; }
.onboarding-layout { min-height: 613px; display: grid; grid-template-columns: .82fr 1.18fr; }
.onboarding-aside { position: relative; display: flex; flex-direction: column; padding: 55px 52px 40px; color: #fff; background: #191b19; }
.onboarding-aside::after { content: ""; position: absolute; inset: 19px; pointer-events: none; border: 1px solid rgba(255,255,255,.07); border-radius: 7px; }
.onboarding-eyebrow, .onboarding-count { color: #7775d8; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.onboarding-aside .onboarding-eyebrow { position: relative; z-index: 1; color: #a7f06b; }
.onboarding-aside h1 { position: relative; z-index: 1; max-width: 360px; margin-top: 16px; font-size: clamp(31px, 3vw, 43px); line-height: 1.05; letter-spacing: -.05em; }
.onboarding-aside > p { position: relative; z-index: 1; max-width: 350px; margin: 18px 0 0; color: rgba(255,255,255,.55); font-size: 13px; line-height: 1.65; }
.onboarding-steps { position: relative; z-index: 1; display: grid; gap: 3px; margin: 32px 0 0; padding: 0; list-style: none; }
.onboarding-steps li { display: flex; align-items: center; gap: 12px; min-height: 46px; color: rgba(255,255,255,.35); font-size: 12px; font-weight: 650; transition: color .2s; }
.onboarding-steps i { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; font-size: 10px; font-style: normal; transition: .2s; }
.onboarding-steps li.active { color: #fff; }
.onboarding-steps li.active i { border-color: #a7f06b; color: #17200f; background: #a7f06b; }
.onboarding-steps li.done { color: rgba(255,255,255,.62); }
.onboarding-steps li.done i { border-color: rgba(167,240,107,.4); color: #a7f06b; }
.onboarding-private { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 9px; margin-top: auto; color: rgba(255,255,255,.45); font-size: 10.5px; line-height: 1.5; }
.onboarding-private svg { width: 16px; height: 16px; color: #a7f06b; }
.onboarding-card { display: flex; align-items: center; padding: 48px clamp(42px, 6vw, 76px); background: #f8f8f5; }
.onboarding-card form { width: 100%; max-width: 500px; margin: 0 auto; }
.onboarding-panel { min-height: 390px; animation: onboarding-in .3s var(--ease) both; }
@keyframes onboarding-in { from { opacity: 0; transform: translateX(8px); } }
.onboarding-panel h2 { max-width: 480px; margin-top: 10px; color: #131513; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.05em; }
.onboarding-panel > p { max-width: 460px; margin: 12px 0 31px; color: #72786e; font-size: 13px; line-height: 1.6; }
.onboarding-field { display: grid; gap: 8px; margin-top: 17px; color: #343a34; font-size: 11.5px; font-weight: 700; }
.onboarding-field input { width: 100%; height: 52px; padding: 0 15px; border: 1px solid #d7d9d2; border-radius: 11px; outline: 0; background: #fff; color: #171917; font-size: 13px; transition: border-color .2s, box-shadow .2s; }
.onboarding-field input:focus { border-color: #7775d8; box-shadow: 0 0 0 3px rgba(95,93,208,.1); }
.onboarding-field input::placeholder { color: #a3aaa0; font-weight: 450; }
.onboarding-options { display: grid; gap: 8px; }
.onboarding-options button { width: 100%; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #dcded7; border-radius: 11px; background: #fff; color: #252925; text-align: left; transition: border-color .2s, background .2s, box-shadow .2s; }
.onboarding-options button:hover { border-color: #bfc2ba; }
.onboarding-options button.selected { border-color: #7775d8; background: #f4f3ff; box-shadow: 0 0 0 3px rgba(95,93,208,.08); }
.onboarding-options button > i { width: 17px; height: 17px; border: 1.5px solid #b5bab1; border-radius: 50%; }
.onboarding-options button.selected > i { border: 5px solid #6664d3; }
.onboarding-options button span { display: grid; gap: 2px; }
.onboarding-options strong { font-size: 12px; }
.onboarding-options small { color: #858c81; font-size: 10.5px; }
.language-options { grid-template-columns: 1fr 1fr; }
.language-detection-note { margin: 13px 2px 0 !important; color: #858c81 !important; font-size: 10.5px !important; line-height: 1.45 !important; }
.onboarding-goal { padding: 29px 26px 22px; border: 1px solid #dcddd8; border-radius: 15px; background: #fff; }
.onboarding-goal output { display: flex; align-items: baseline; gap: 10px; margin-bottom: 27px; }
.onboarding-goal output strong { color: #191b19; font-size: 44px; line-height: 1; letter-spacing: -.06em; }
.onboarding-goal output span { color: #747b70; font-size: 11.5px; }
.onboarding-goal input { width: 100%; height: 5px; accent-color: #6664d3; cursor: pointer; }
.onboarding-goal > div { display: flex; justify-content: space-between; margin-top: 8px; color: #a1a79e; font-size: 9.5px; }
.onboarding-presets { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 12px; }
.onboarding-presets button { height: 38px; border: 1px solid #dcddd8; border-radius: 9px; background: #fff; color: #687066; font-size: 11px; font-weight: 700; }
.onboarding-presets button:hover, .onboarding-presets button.active { border-color: #7775d8; color: #5553c5; background: #f4f3ff; }
.onboarding-message { min-height: 18px; margin: 3px 0 0; color: var(--s-absage); font-size: 11px; }
.onboarding-actions { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.onboarding-back, .onboarding-next { height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; font-size: 12px; font-weight: 750; }
.onboarding-back { padding: 0 12px; border: 0; background: transparent; color: #6e756b; }
.onboarding-back:hover { color: #171917; background: #ededE9; }
.onboarding-next { min-width: 130px; margin-left: auto; padding: 0 18px; border: 0; color: #fff; background: #191b19; box-shadow: 0 8px 18px rgba(25,27,25,.14); }
.onboarding-next:hover { transform: translateY(-1px); background: #2e322d; }
.onboarding-next:disabled, .onboarding-skip:disabled { cursor: wait; opacity: .55; transform: none; }
.onboarding-actions svg { width: 16px; height: 16px; }
@media (max-width: 800px) {
  .onboarding-frame { min-height: 0; }
  .onboarding-layout { min-height: 0; display: block; }
  .onboarding-aside { padding: 30px 34px; }
  .onboarding-aside h1 { max-width: 560px; font-size: 31px; }
  .onboarding-aside > p { max-width: 600px; }
  .onboarding-steps { grid-template-columns: repeat(5,1fr); margin-top: 24px; }
  .onboarding-steps li { min-height: 34px; }
  .onboarding-private { display: none; }
  .onboarding-card { padding: 38px 34px; }
}
@media (max-width: 520px) {
  .onboarding-shell { align-items: start; padding: 0; }
  .onboarding-frame { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .onboarding-header { height: 66px; padding: 0 20px; }
  .onboarding-skip { font-size: 10.5px; }
  .onboarding-aside { padding: 25px 22px; }
  .onboarding-aside::after { inset: 10px; }
  .onboarding-aside h1 { margin-top: 10px; font-size: 27px; }
  .onboarding-aside > p { display: none; }
  .onboarding-steps { margin-top: 18px; }
  .onboarding-steps li { justify-content: center; }
  .onboarding-steps li span { display: none; }
  .onboarding-card { padding: 32px 22px 26px; }
  .onboarding-panel { min-height: 410px; }
  .onboarding-panel h2 { font-size: 31px; }
  .onboarding-panel > p { margin-bottom: 24px; }
  .onboarding-options button { padding: 10px 12px; }
}
.sync-state {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg-elev);
  color: var(--text-3); font-size: 11.5px; font-weight: 600;
}
.sync-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--s-angebot); }
.sync-state.syncing i { background: var(--s-interview); animation: pulse 1s infinite; }
.sync-state.error i { background: var(--s-absage); }
.menu-account { padding: 6px 12px 2px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: var(--text-3); font-size: 11px; }
@media (max-width: 640px) { .sync-state span { display: none; } .sync-state { width: 32px; justify-content: center; padding: 0; } }

.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(600px 380px at 12% -8%, var(--glow-a), transparent 70%),
    radial-gradient(520px 340px at 92% 4%, var(--glow-b), transparent 70%);
  animation: glow 18s ease-in-out infinite alternate;
}
@keyframes glow { to { transform: translate3d(0, 24px, 0) scale(1.05); } }

.app {
  position: relative; z-index: 1;
  min-height: 100dvh; max-width: 1080px; margin: 0 auto;
  padding: 28px 16px 80px;
}
@media (min-width: 720px) { .app { padding: 40px 32px 96px; } }

/* ---------- Topbar ---------- */
.topbar {
  position: relative; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 28px;
  animation: rise .6s var(--ease) both;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.logo svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.logo .l-track { animation: fadein .4s .3s both; }
.logo .l-step { transform-box: fill-box; transform-origin: center; animation: step .45s var(--ease) both; }
.logo .s1 { animation-delay: .2s; }
.logo .s2 { animation-delay: .35s; }
.logo .s3 { animation-delay: .5s; }
@keyframes step { from { opacity: 0; transform: scale(.4); } }
.topbar h1 { font-size: 22px; font-weight: 700; }
.subtitle { margin: 0; color: var(--text-2); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.magic-top-btn {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #111827, #4338ca 62%, #7c3aed);
  box-shadow: 0 7px 22px rgba(67, 56, 202, .24);
}
.magic-top-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(67, 56, 202, .34); }
.inbox-top-btn { position: relative; }
.inbox-badge {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center; border: 2px solid var(--bg); border-radius: 99px;
  background: var(--s-absage); color: #fff; font-size: 10px; font-style: normal; font-weight: 800;
  box-shadow: 0 5px 14px rgba(244,63,94,.32);
}

/* ---------- Privacy / screenshot mode ---------- */
.privacy-toggle { padding: 0 12px; }
.privacy-toggle svg { width: 18px; height: 18px; }
.privacy-toggle .privacy-on { display: none; }
.privacy-toggle.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 6px 18px rgba(99, 102, 241, .28);
}
.privacy-toggle.active .privacy-off { display: none; }
.privacy-toggle.active .privacy-on { display: block; }
.privacy-mode #drawerTitle,
.privacy-mode #form input[name="firma"],
.privacy-mode #form input[name="contactName"],
.privacy-mode #form input[name="contactEmail"],
.privacy-mode #form input[name="nextAction"],
.privacy-mode #form input[name="location"],
.privacy-mode #form input[name="salaryText"],
.privacy-mode #form textarea[name="jobDescription"],
.privacy-mode #jobImportUrl,
.privacy-mode .link-item a small,
.privacy-mode .note p,
.privacy-mode #inboundAddress,
.privacy-mode .suggestion-private,
.privacy-mode .stat-value,
.privacy-mode .stat-sub,
.privacy-mode .interview-summary-card strong {
  filter: blur(6px); user-select: none;
}
.privacy-mode .link-item a,
.privacy-mode .note p { pointer-events: none; }
.privacy-mode .avatar { background: linear-gradient(135deg, #818cf8, #a78bfa); }
.privacy-mode .menu-account { letter-spacing: .02em; }
@media (max-width: 760px) {
  .privacy-toggle { width: 40px; padding: 0; }
  .privacy-toggle span { display: none; }
}
@media (max-width: 850px) {
  .magic-top-btn { width: 40px; padding: 0; }
  .magic-top-btn span { display: none; }
}
@media (max-width: 960px) {
  .inbox-top-btn { width: 40px; padding: 0; }
  .inbox-top-btn > span { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.primary:hover { box-shadow: 0 10px 28px rgba(99, 102, 241, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.18); transform: translateY(-1px); }
.btn.ghost { background: var(--bg-soft); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--border-strong); }
.btn.danger-ghost { background: transparent; color: var(--s-absage); }
.btn.danger-ghost:hover { background: rgba(244, 63, 94, 0.1); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; }
@media (max-width: 560px) { #addBtn span { display: none; } #addBtn { width: 40px; padding: 0; } }
@media (max-width: 680px) { .import-top-btn span { display: none; } .import-top-btn { width: 40px; padding: 0; } }
@media (max-width: 420px) { .topbar { gap: 8px; } .brand > div:last-child { display: none; } }

.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-2);
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--bg-soft); }
.icon-btn:active { transform: scale(0.94); }

/* ---------- Menu ---------- */
.menu-wrap { position: relative; z-index: 110; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 1000; min-width: 240px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 6px;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top right; pointer-events: none;
  transition: opacity .18s var(--ease), transform .25s var(--ease);
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 9px;
  background: transparent; font-size: 13.5px;
}
.menu button:hover { background: var(--bg-soft); }
.menu button.danger { color: var(--s-absage); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px;
}
@media (min-width: 720px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat {
  position: relative; overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm);
  animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 80ms);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%;
  background: var(--c); opacity: 0.1; filter: blur(14px);
}
.stat-label { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.stat-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--text-3); }
.stats .stat:first-child { grid-column: span 2; }
@media (min-width: 720px) { .stats .stat:first-child { grid-column: auto; } }

/* ---------- Distribution ---------- */
.distribution { margin-bottom: 24px; animation: rise .6s .35s var(--ease) both; }
.dist-bar {
  display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--bg-soft); gap: 2px;
}
.dist-bar span {
  display: block; height: 100%; background: var(--c); width: 0;
  transition: width 1s var(--ease);
}
.dist-bar span:first-child { border-radius: 99px 0 0 99px; }
.dist-bar span:last-child { border-radius: 0 99px 99px 0; }

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px;
  animation: rise .6s .4s var(--ease) both;
}
.search {
  position: relative; flex: 1 1 260px; display: flex; align-items: center;
}
.search svg { position: absolute; left: 13px; color: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 40px 0 40px; border-radius: 12px;
  background: var(--bg-elev); border: 1px solid var(--border); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  position: absolute; right: 10px; font: 600 11px/1 "Inter", sans-serif; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 7px; background: var(--bg-soft);
}
.filters {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; order: 3; flex-basis: 100%;
  padding: 2px;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-2);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s, border-color .25s, transform .2s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip:active { transform: scale(0.96); }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--text-3)); }
.chip b { font-weight: 600; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.active b { color: inherit; opacity: 0.6; }

.select {
  height: 42px; padding: 0 34px 0 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-elev) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  appearance: none; outline: none; cursor: pointer;
}
.select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.select.sm { height: 36px; border-radius: 10px; font-size: 13px; }
.layout-switch {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elev);
}
.layout-switch button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--text-3);
  background: transparent;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.layout-switch button:hover { color: var(--text); background: var(--bg-soft); }
.layout-switch button.active {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}
.layout-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.layout-switch svg { width: 16px; height: 16px; }

/* ---------- List ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-tools { display: flex; justify-content: flex-end; margin: -6px 0 2px; }
.text-btn {
  border: 0; background: none; color: var(--text-2); font-size: 12.5px; font-weight: 600; padding: 4px 6px; border-radius: 7px;
  transition: color .2s, background-color .2s;
}
.text-btn:hover { color: var(--accent); background: var(--accent-soft); }

/* Month accordion */
.month {
  border-radius: 16px; background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 50ms);
  transition: box-shadow .3s var(--ease), border-color .3s;
}
.month:hover { border-color: var(--border-strong); }
.month.open { box-shadow: var(--shadow-md); }
.month-head-row { display: flex; align-items: center; }
.month-head {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px;
  flex: 1; min-width: 0; width: auto; padding: 16px 12px 16px 18px; border: 0; background: none; text-align: left; border-radius: 16px;
}
.month-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.month-actions { display: flex; align-items: center; gap: 6px; margin-right: 14px; }
.month-action {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--text-3);
  transition: color .2s, border-color .2s, background-color .2s, transform .2s var(--ease);
}
.month-action:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: var(--accent-soft); }
.month-action.share { color: var(--accent); background: var(--accent-soft); }
.month-action:active { transform: scale(.94); }
.month-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.month-action svg { width: 17px; height: 17px; }
.month-cal {
  width: 46px; height: 46px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); line-height: 1;
  transition: background .3s var(--ease), color .3s, transform .3s var(--spring);
}
.month-cal b { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.month-cal small { font-size: 10px; font-weight: 600; opacity: .7; margin-top: 3px; }
.month.open .month-cal { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; transform: scale(1.04); }
.month-info { min-width: 0; }
.month-info h3 { font-size: 16px; font-weight: 600; }
.month-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; font-size: 12px; color: var(--text-2); }
.month-stats span { display: inline-flex; align-items: center; gap: 5px; }
.month-stats i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.month-bar { display: flex; gap: 2px; height: 6px; width: 120px; border-radius: 99px; overflow: hidden; background: var(--bg-soft); margin-top: 8px; }
.month-bar span { background: var(--c); transform-origin: left; animation: grow .8s var(--ease) both; animation-delay: calc(var(--i) * 50ms + 200ms); }
@keyframes grow { from { transform: scaleX(0); } }
.month-count { text-align: right; line-height: 1.1; }
.month-count b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.month-count small { font-size: 11.5px; color: var(--text-3); }
.chev {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--text-3); background: var(--bg-soft);
  transition: transform .4s var(--ease), color .2s, background-color .2s;
}
.month-head:hover .chev { color: var(--text); }
.month.open .chev { transform: rotate(180deg); color: var(--accent); background: var(--accent-soft); }
.month-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.month.open .month-body { grid-template-rows: 1fr; }
.month-inner { overflow: hidden; min-height: 0; }
.month-cards { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.month-cards::before { content: ""; height: 1px; background: var(--border); margin: 0 6px 4px; }
@media (max-width: 560px) {
  .month-head { grid-template-columns: auto 1fr auto; gap: 12px; padding: 14px 8px 14px 14px; }
  .month-head .chev { display: none; }
  .month-actions { margin-right: 10px; gap: 5px; }
  .month-bar { width: 100%; max-width: 160px; }
  .month-cards { padding: 0 8px 8px; }
}

/* Month card gallery */
.list.months-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.months-grid .month {
  min-width: 0;
  overflow: hidden;
  transition: transform .28s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.months-grid .month.open {
  grid-column: 1 / -1;
  animation: month-soft-expand .46s cubic-bezier(.22, 1, .36, 1) both;
}
.months-grid .month:not(.open) .month-head-row {
  position: relative;
  min-height: 184px;
  align-items: stretch;
}
.months-grid .month:not(.open) .month-head {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 13px;
  padding: 18px 18px 62px;
}
.months-grid .month:not(.open) .month-info h3 {
  margin-top: 2px;
  font-size: 17px;
}
.months-grid .month:not(.open) .month-stats {
  gap: 5px 10px;
  margin-top: 7px;
}
.months-grid .month:not(.open) .month-bar {
  width: 100%;
  max-width: none;
  margin-top: 13px;
}
.months-grid .month:not(.open) .month-count {
  position: absolute;
  left: 18px;
  bottom: 17px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  text-align: left;
}
.months-grid .month:not(.open) .month-count b { font-size: 25px; }
.months-grid .month:not(.open) .month-actions {
  position: absolute;
  right: 55px;
  bottom: 14px;
  z-index: 2;
  margin: 0;
}
.months-grid .month:not(.open) .chev {
  position: absolute;
  right: 16px;
  bottom: 16px;
}
.months-grid .month:not(.open):hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(15,23,42,.09);
}
.months-grid .month-body {
  transition: grid-template-rows .52s cubic-bezier(.22, 1.08, .36, 1);
}
@keyframes month-soft-expand {
  0% { transform: translateY(4px) scale(.995); opacity: .94; }
  100% { transform: scale(1); opacity: 1; }
}
@media (max-width: 900px) {
  .list.months-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .list.months-grid { grid-template-columns: 1fr; }
  .months-grid .month:not(.open) .month-head { grid-template-columns: auto minmax(0, 1fr); padding: 16px 16px 60px; }
  .months-grid .month:not(.open) .month-count { left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .months-grid .month.open { animation: none; }
  .months-grid .month-body { transition-duration: .01ms; }
}

.card {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); cursor: pointer; text-align: left; width: 100%;
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 28ms);
}
.month-cards .card { background: var(--bg); box-shadow: none; animation: none; }
.month.open .month-cards .card { animation: rise .45s var(--ease) both; animation-delay: calc(var(--i) * 35ms + 80ms); }
.card {
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--c); opacity: 0; transform: scaleY(0.4); transition: opacity .25s, transform .3s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; transform: none; }
.card:active { transform: scale(0.995); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-main { min-width: 0; }
.card-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.card-title strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-role { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; color: var(--text-3); }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta svg { width: 13px; height: 13px; }
.followup-chip {
  padding: 2px 7px; border-radius: 99px; font-weight: 600;
  color: var(--followup-color); background: color-mix(in srgb, var(--followup-color) 12%, transparent);
}
.followup-chip.overdue { --followup-color: var(--s-absage); }
.followup-chip.upcoming { --followup-color: var(--accent); }
.followup-chip.done { --followup-color: var(--s-angebot); }
.card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.card .age { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
/* Ein Score-Ring für Karte, Drawer-Kopf und Import-Ergebnis */
.fit-ring {
  --ring: 38px; --fit: var(--text-3);
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--ring); height: var(--ring); color: var(--text);
}
.fit-ring[data-band="high"] { --fit: var(--s-angebot); }
.fit-ring[data-band="medium"] { --fit: var(--s-interview); }
.fit-ring[data-band="low"] { --fit: var(--s-absage); }
.fit-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; stroke-width: 3; transform: rotate(-90deg); }
.fit-ring-track { stroke: color-mix(in srgb, var(--text) 9%, transparent); }
.fit-ring-arc { stroke: var(--fit); }
.fit-ring strong {
  position: relative; font-size: calc(var(--ring) * .39); font-weight: 650; line-height: 1;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.fit-ring[data-band="locked"] strong,
.fit-ring[data-band="missing"] strong { color: var(--text-2); font-size: calc(var(--ring) * .27); letter-spacing: .02em; }

.card.has-fit { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.card.has-fit .card-side { min-width: 124px; }
.card-fit { display: inline-flex; align-items: center; gap: 9px; width: 124px; flex: none; }
.card-fit b { color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }

.avatar {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  flex: none; aspect-ratio: 1 / 1;
  font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 70% 60%), hsl(calc(var(--h) + 40) 70% 52%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: background .4s var(--ease);
}
.avatar.lg { width: 48px; height: 48px; border-radius: 13px; font-size: 18px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.pulse i { animation: pulse 2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); }
  70%, 100% { box-shadow: 0 0 0 6px transparent; }
}

@media (max-width: 560px) {
  .card { grid-template-columns: auto 1fr; padding: 13px 14px; }
  .card-side { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
  .card-side .age { margin-left: auto; }
}
@media (max-width: 760px) {
  .card-fit { width: auto; }
  .card-fit b { display: none; }
}
@media (max-width: 560px) {
  .card.has-fit { grid-template-columns: auto minmax(0, 1fr) auto; }
  .card.has-fit .avatar, .card.has-fit .card-main, .card.has-fit .card-fit { grid-row: 1; }
  .card.has-fit .card-fit { grid-column: 3; align-self: start; }
  .card.has-fit .card-side { grid-column: 2 / -1; grid-row: 2; min-width: 0; }
}

/* ---------- Empty ---------- */
.empty {
  text-align: center; padding: 64px 20px; border: 1px dashed var(--border-strong); border-radius: 18px;
  animation: rise .5s var(--ease) both;
}
.empty-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  animation: float 3s ease-in-out infinite;
}
.empty-icon svg { width: 26px; height: 26px; }
.empty h3 { font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }
@keyframes float { 50% { transform: translateY(-5px); } }

/* ---------- Drawer ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 220; background: rgba(8, 10, 16, 0.48);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  opacity: 0; transition: opacity .35s var(--ease);
}
.overlay.show { opacity: 1; }
.drawer {
  position: fixed;
  z-index: 230;
  top: 50%;
  left: 50%;
  width: min(1120px, calc(100vw - 40px));
  height: min(900px, calc(100dvh - 40px));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-strong) 75%, transparent);
  border-radius: 24px;
  background: var(--bg-elev);
  box-shadow: 0 34px 100px rgba(8,10,24,.28), 0 2px 10px rgba(8,10,24,.08);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 18px)) scale(.975);
  visibility: hidden;
  transition: opacity .24s ease, transform .38s cubic-bezier(.22, 1, .36, 1), visibility 0s .38s;
}
.drawer.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  visibility: visible;
  transition: opacity .24s ease, transform .38s cubic-bezier(.22, 1, .36, 1), visibility 0s;
}
.drawer form { display: flex; flex-direction: column; height: 100%; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 76px; padding: 15px 24px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
}
.drawer-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.drawer-title > div:last-child { min-width: 0; }
.drawer-title .avatar { width: 44px; height: 44px; min-width: 44px; border-radius: 13px; }
.drawer-title h2 { font-size: 19px; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-title p { font-size: 12.5px; }
.drawer-head-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.drawer-head-fit { display: flex; align-items: center; gap: 9px; flex: none; }
.drawer-head-fit > span:last-child { color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.drawer-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-auto-flow: row dense;
  grid-template-rows: max-content;
  align-content: start;
  gap: 18px;
  overflow-y: auto;
  padding: 22px 24px 28px;
  overscroll-behavior: contain;
  background: color-mix(in srgb, var(--bg) 58%, var(--bg-elev));
}
.drawer-body > .magic-import,
.drawer-body > .field-grid,
.drawer-body > .followup-block { grid-column: 1 / -1; }
.drawer-body > .magic-import { min-height: 142px; margin-bottom: 0; }
.drawer-body > .followup-block {
  min-height: 59px;
  transition: min-height .55s cubic-bezier(.22, 1, .36, 1);
}
.drawer-body > .followup-block.expanded { min-height: var(--followup-expanded-height, 59px); }
.drawer-body > .field-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.drawer-body > .job-details { grid-column: 1; grid-row: span 2; }
.drawer-body > .block { min-width: 0; margin-top: 0; }
.drawer-body > .block:not(.followup-block) {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-elev) 94%, transparent);
  box-shadow: 0 5px 18px rgba(15,23,42,.035);
}
.drawer.open .drawer-body > * { animation: rise .5s var(--ease) both; }
.drawer.open .drawer-body > *:nth-child(2) { animation-delay: 60ms; }
.drawer.open .drawer-body > *:nth-child(3) { animation-delay: 120ms; }
.drawer.open .drawer-body > *:nth-child(4) { animation-delay: 180ms; }
.drawer.open .drawer-body > *:nth-child(5) { animation-delay: 240ms; }
.drawer-foot {
  display: flex; align-items: center; gap: 8px; min-height: 68px; padding: 12px 24px;
  border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg-elev) 95%, transparent);
}
.drawer-foot .btn { min-width: 108px; }
.drawer-foot .danger-ghost { min-width: 0; }
.spacer { flex: 1; }

@media (max-width: 900px) {
  .drawer { width: min(760px, calc(100vw - 28px)); height: calc(100dvh - 28px); }
  .drawer-body { grid-template-columns: 1fr; padding: 20px; }
  .drawer-body > .magic-import,
  .drawer-body > .field-grid,
  .drawer-body > .job-details,
  .drawer-body > .followup-block,
  .drawer-body > .block { grid-column: 1; grid-row: auto; }
  .drawer-body > .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .drawer {
    top: 0; left: 0; width: 100%; height: 100dvh;
    border: 0; border-radius: 0;
    transform: translateY(2%);
  }
  .drawer.open { transform: none; }
  .drawer-head { min-height: 68px; padding: 12px 16px; }
  .drawer-title .avatar { width: 40px; height: 40px; min-width: 40px; }
  .drawer-title h2 { font-size: 17px; }
  .drawer-head-actions { gap: 8px; }
  .drawer-head-fit > span:last-child { display: none; }
  .drawer-body { gap: 14px; padding: 16px 16px 24px; }
  .drawer-body > .field-grid { grid-template-columns: 1fr; }
  .drawer-foot { min-height: 64px; padding: 10px 16px; }
  .drawer-foot .btn { min-width: 0; }
}

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 480px) { .field-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .field-wide { grid-column: auto; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field input, .add-row input, textarea {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-soft); outline: none; width: 100%; min-width: 0;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field input:focus, .add-row input:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--bg-elev);
}
.job-details textarea { min-height: 118px; height: auto; padding-block: 10px; resize: vertical; }
.field input.invalid { border-color: var(--s-absage); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.block { margin-top: 24px; }
.block-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.block-head h3 { font-size: 13.5px; font-weight: 600; }

/* ---------- Smart Magic Import ---------- */
.magic-import {
  position: relative; overflow: hidden; padding: 16px; margin-bottom: 18px;
  border: 1px solid rgba(99, 102, 241, .2); border-radius: 16px;
  background:
    radial-gradient(220px 100px at 0 0, rgba(167, 139, 250, .18), transparent 72%),
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(238,240,246,.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 28px rgba(79,70,229,.07);
}
.magic-import::after {
  content: ""; position: absolute; width: 110px; height: 110px; right: -54px; top: -58px; border-radius: 50%;
  background: rgba(99, 102, 241, .13); filter: blur(18px); pointer-events: none;
}
.magic-import-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.magic-import-head h3 { font-size: 14px; }
.magic-import-head p { margin: 1px 0 0; color: var(--text-2); font-size: 11.5px; }
.magic-orb {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7); box-shadow: 0 7px 18px rgba(99,102,241,.28);
}
.magic-orb svg { width: 18px; }
.magic-import-row { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; }
.magic-import-row input {
  min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255,255,255,.82); outline: none;
}
.magic-import-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.magic-import-status { min-height: 18px; margin-top: 8px; color: var(--text-2); font-size: 11.5px; }
.magic-import-status.loading {
  display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700;
  animation: magic-status-in .32s var(--ease) both;
}
.magic-import-status.loading::before {
  content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 0 0 rgba(99,102,241,.3);
  animation: magic-think 1.35s ease-out infinite;
}
.magic-import-status.success { color: var(--s-angebot); font-weight: 600; }
.magic-import-status.error { color: var(--s-absage); font-weight: 600; }
.job-fit-card {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  animation: job-fit-reveal .4s var(--ease) both;
}
.job-fit-card .fit-ring { --ring: 52px; }
.job-fit-copy { min-width: 0; flex: 1; }
.job-fit-copy h4 { margin: 0; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.job-fit-copy p { margin: 2px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.45; }
.job-fit-upgrade { margin-top: 10px; }
@keyframes job-fit-reveal { from { opacity: 0; transform: translateY(6px); } }
.magic-import.loading .magic-orb svg { animation: magic-spin 1.3s linear infinite; }
@keyframes magic-spin { to { transform: rotate(360deg); } }
@keyframes magic-status-in { from { opacity: 0; transform: translateY(3px); filter: blur(2px); } }
@keyframes magic-think { 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@media (max-width: 560px) {
  .magic-import-row { grid-template-columns: 1fr auto; }
  .magic-import-row #runMagicImportBtn { grid-column: 1 / -1; }
  .job-fit-card { align-items: flex-start; gap: 12px; }
  .job-fit-card .fit-ring { --ring: 44px; }
}
.followup-block {
  padding: 0; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  border-radius: 14px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 5%, var(--bg-elev)), var(--bg-soft));
}
.followup-toggle {
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 14px 16px;
  text-align: left;
  border: 0;
  background: transparent;
}
.followup-toggle > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.followup-toggle strong { font-size: 13.5px; font-weight: 600; }
.followup-toggle small { font-size: 11px; font-weight: 500; }
.followup-toggle-icon {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--border); border-radius: 9px; color: var(--text-3); background: var(--bg-elev);
  transition: transform .4s var(--spring), color .2s, background .2s;
}
.followup-toggle-icon svg { width: 15px; height: 15px; }
.followup-block.expanded .followup-toggle-icon { transform: rotate(180deg); color: var(--accent); background: var(--accent-soft); }
.followup-content {
  display: block;
  max-height: 0;
  overflow: hidden;
  transition: max-height .55s cubic-bezier(.22, 1, .36, 1);
}
.followup-block.expanded .followup-content { max-height: 1800px; }
.followup-content-inner { min-height: 0; overflow: hidden; padding: 0 16px; }
.followup-block.expanded .followup-content-inner { padding-bottom: 16px; }
.followup-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.followup-state { min-height: 18px; color: var(--text-2); font-size: 12px; }
.followup-state.overdue { color: var(--s-absage); font-weight: 600; }
.followup-state.done { color: var(--s-angebot); font-weight: 600; }
.followup-buttons { display: flex; gap: 6px; flex-shrink: 0; }
.followup-buttons .btn { height: 34px; padding: 0 11px; }
@media (max-width: 520px) {
  .followup-controls { align-items: stretch; flex-direction: column; }
  .followup-buttons .btn { flex: 1; }
}

.email-composer {
  margin-top: 16px; padding: 14px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border)); border-radius: 13px;
  background:
    radial-gradient(180px 90px at 100% 0, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 74%),
    color-mix(in srgb, var(--bg-elev) 90%, var(--accent-soft));
}
.email-composer-head { display: flex; align-items: center; gap: 10px; }
.email-composer-head h4 { margin: 0; font-size: 13.5px; letter-spacing: -.01em; }
.email-composer-head p { margin: 1px 0 0; color: var(--text-3); font-size: 11.5px; }
.email-language-picker {
  display: inline-flex; gap: 2px; margin-left: auto; padding: 3px;
  border: 1px solid var(--border); border-radius: 9px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}
.email-language-picker button {
  min-width: 32px; height: 25px; padding: 0 7px; border: 0; border-radius: 6px;
  color: var(--text-3); background: transparent; font-size: 10.5px; font-weight: 750;
  letter-spacing: .04em; transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.email-language-picker button:hover { color: var(--text); }
.email-language-picker button.active {
  color: var(--accent); background: var(--bg-elev);
  box-shadow: 0 1px 4px rgba(15,23,42,.1);
}
.email-language-picker button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.email-composer-icon {
  width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: 10px;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}
.email-composer-icon svg { width: 16px; height: 16px; }
.email-template-tabs {
  display: flex; gap: 5px; margin: 12px -2px 0; padding: 2px 2px 5px; overflow-x: auto;
  scrollbar-width: thin;
}
.email-template-tab {
  height: 30px; flex: none; padding: 0 9px; border: 1px solid var(--border); border-radius: 9px;
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent); color: var(--text-2);
  font-size: 11.5px; font-weight: 600; white-space: nowrap; transition: .2s ease;
}
.email-template-tab:hover { color: var(--text); border-color: var(--border-strong); }
.email-template-tab.active {
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: var(--accent-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.email-template-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.email-composer-preview { display: grid; gap: 10px; margin-top: 10px; }
.email-composer-preview textarea { min-height: 176px; background: color-mix(in srgb, var(--bg-elev) 88%, transparent); }
.email-composer-preview input { background: color-mix(in srgb, var(--bg-elev) 88%, transparent); }
.email-composer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; }
.email-composer-hint { flex: 1 0 100%; color: var(--text-3); font-size: 11px; }
.email-composer-actions .btn { height: 34px; padding: 0 11px; }
.email-composer-actions .btn svg { width: 15px; height: 15px; }
.email-composer-actions .email-sent-btn { margin-right: auto; }
.email-sent-btn.sent, .email-sent-btn:disabled {
  opacity: 1; color: #0f766e; border-color: color-mix(in srgb, #14b8a6 28%, var(--border));
  background: color-mix(in srgb, #14b8a6 9%, var(--bg-elev));
}
.privacy-mode .email-composer-preview input,
.privacy-mode .email-composer-preview textarea,
.privacy-mode #emailRecipient { filter: blur(5px); user-select: none; }
@media (max-width: 520px) {
  .email-composer { padding: 12px; }
  .email-composer-actions { flex-wrap: wrap; }
  .email-composer-hint { flex-basis: 100%; }
  .email-composer-actions .btn { flex: 1; }
}

.status-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.status-opt {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-2); font-size: 13px; font-weight: 500;
  transition: all .25s var(--ease);
}
.status-opt i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); transition: transform .3s var(--spring); }
.status-opt:hover { color: var(--text); border-color: var(--border-strong); }
.status-opt.active {
  color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent); font-weight: 600;
}
.status-opt.active i { transform: scale(1.3); }

.links { display: flex; flex-direction: column; gap: 6px; }
.link-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--bg-soft);
  animation: pop .4s var(--spring) both;
}
.link-item a { flex: 1; min-width: 0; color: var(--text); text-decoration: none; display: flex; flex-direction: column; }
.link-item a small { color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-item a:hover b { color: var(--accent); }
.link-item b { font-size: 13px; font-weight: 600; transition: color .2s; }
.link-icon {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}
.link-icon svg { width: 15px; height: 15px; }
.mini-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--text-3);
  display: grid; place-items: center; transition: background-color .2s, color .2s;
}
.mini-btn:hover { background: rgba(244, 63, 94, 0.12); color: var(--s-absage); }
.mini-btn svg { width: 14px; height: 14px; }
.add-row { display: flex; gap: 6px; margin-top: 8px; }
.add-row .select { flex: 0 0 auto; }
.add-row input { height: 36px; flex: 1; }
@media (max-width: 480px) { .add-row { flex-wrap: wrap; } .add-row input { flex-basis: 100%; order: -1; } .add-row .select { flex: 1; } }
.empty-mini { color: var(--text-3); font-size: 12.5px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 11px; }

.add-note { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 64px; line-height: 1.5; }
.notes { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.notes::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--border-strong); }
.note {
  position: relative; padding: 0 0 14px 24px;
  animation: pop .45s var(--spring) both;
}
.note::before {
  content: ""; position: absolute; left: 1px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg-elev); border: 2px solid var(--accent);
}
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note time { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.note p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.note .mini-btn { opacity: 0; transition: opacity .2s; }
.note:hover .mini-btn { opacity: 1; }
@media (hover: none) { .note .mini-btn { opacity: 1; } }

/* ---------- Import ---------- */
.import-overlay {
  position: fixed; inset: 0; z-index: 70; background: rgba(8, 10, 16, .48);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.import-overlay.show { opacity: 1; }
.import-dialog {
  position: fixed; z-index: 80; left: 50%; top: 50%; width: min(720px, calc(100vw - 24px)); max-height: min(820px, calc(100vh - 24px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, calc(-50% + 16px)) scale(.97);
  transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s .35s;
}
.import-dialog.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s; }
.import-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--border); }
.import-head h2 { font-size: 18px; }
.import-head p { margin-top: 3px; font-size: 12.5px; }
.import-body { padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.drop-zone {
  width: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 24px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-elev)); color: var(--text-2);
  transition: border-color .2s, background-color .2s, transform .2s var(--ease);
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone.dragging { transform: scale(.995); }
.drop-zone strong { color: var(--text); font-size: 14px; }
.drop-zone > span:last-child { font-size: 12px; color: var(--text-3); }
.drop-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.drop-icon svg { width: 21px; height: 21px; }
.import-result { margin-top: 12px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--bg-soft); }
.import-result.ok { border-color: color-mix(in srgb, var(--s-angebot) 35%, var(--border)); background: color-mix(in srgb, var(--s-angebot) 8%, var(--bg-elev)); }
.import-result.error { border-color: color-mix(in srgb, var(--s-absage) 38%, var(--border)); background: color-mix(in srgb, var(--s-absage) 7%, var(--bg-elev)); }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-head span { flex: none; font-size: 12px; color: var(--text-2); }
.result-summary { margin: 5px 0 0; color: var(--text-2); font-size: 12.5px; }
.result-errors { margin: 9px 0 0; padding: 8px 0 0 20px; border-top: 1px solid var(--border); color: var(--s-absage); font-size: 12px; }
.result-errors li + li { margin-top: 3px; }
.import-spec { margin-top: 22px; }
.spec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.spec-head h3 { font-size: 14px; }
.template-btn { color: var(--accent); white-space: nowrap; }
.spec-table { border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.spec-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) 90px minmax(180px, 1.7fr); align-items: center; gap: 10px; padding: 9px 12px; font-size: 12px; }
.spec-row + .spec-row { border-top: 1px solid var(--border); }
.spec-row:nth-child(even) { background: var(--bg-soft); }
.spec-row b { font-size: 12.5px; font-weight: 600; }
.spec-row span { color: var(--text-3); }
.spec-row.required span { color: var(--accent); font-weight: 600; }
.spec-row small { color: var(--text-2); font-size: 12px; }
.spec-note { margin: 9px 0 0; font-size: 11.5px; color: var(--text-3); }
.import-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg-elev); }
@media (max-width: 580px) {
  .import-dialog { inset: 8px; width: auto; max-height: none; transform: translateY(16px) scale(.98); border-radius: 17px; }
  .import-dialog.open { transform: none; }
  .import-head, .import-body { padding: 16px; }
  .import-head p { max-width: 90%; }
  .spec-head { flex-direction: column; }
  .spec-row { grid-template-columns: 1fr auto; }
  .spec-row small { grid-column: 1 / -1; }
  .drop-zone { min-height: 132px; padding: 18px 12px; }
}

/* ---------- Inbound E-Mail Assistant ---------- */
.inbound-overlay {
  position: fixed; inset: 0; z-index: 120; background: rgba(15,23,42,.58);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.inbound-overlay.show { opacity: 1; }
.inbound-dialog {
  position: fixed; z-index: 121; left: 50%; top: 50%; width: min(780px, calc(100vw - 24px));
  max-height: min(760px, calc(100vh - 24px)); display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(255,255,255,.72); border-radius: 24px;
  background: rgba(255,255,255,.94); box-shadow: 0 30px 100px rgba(15,23,42,.3);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  opacity: 0; visibility: hidden; transform: translate(-50%, -46%) scale(.96);
  transition: opacity .25s var(--ease), transform .35s var(--spring), visibility 0s .35s;
}
.inbound-dialog.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); transition-delay: 0s; }
.inbound-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.inbound-head h2 { font-size: 20px; }
.inbound-head p { margin-top: 3px; font-size: 12.5px; }
.inbound-kicker { display: block; margin-bottom: 3px; color: var(--accent); font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.inbound-body { min-height: 0; overflow: auto; padding: 18px 22px 22px; background: linear-gradient(145deg, rgba(238,242,255,.68), rgba(250,245,255,.46) 55%, rgba(255,247,237,.42)); }
.inbound-setup { padding: 18px; border: 1px solid rgba(255,255,255,.84); border-radius: 18px; background: rgba(255,255,255,.76); box-shadow: var(--shadow-md); }
.inbound-setup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.inbound-status-line { display: flex; align-items: center; gap: 9px; }
.inbound-status-line i { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-3) 14%, transparent); }
.inbound-status-line i.active { background: var(--s-angebot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s-angebot) 15%, transparent); }
.inbound-status-line i.error { background: var(--s-absage); }
.inbound-setup h3, .inbound-suggestions h3 { font-size: 15px; }
.inbound-setup-head p { margin: 3px 0 0 18px; color: var(--text-2); font-size: 12px; }
.inbound-address-row { display: flex; gap: 8px; margin-top: 14px; }
.inbound-address-row input { min-width: 0; flex: 1; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.86); color: var(--text-2); outline: none; }
.inbound-alias-editor { margin-top: 10px; padding: 12px; border: 1px solid rgba(99,102,241,.2); border-radius: 14px; background: rgba(248,250,255,.8); }
.inbound-alias-editor[hidden] { display: none; }
.inbound-alias-editor > label { display: block; margin-bottom: 7px; color: var(--text-2); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.inbound-alias-control { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.92); }
.inbound-alias-control:focus-within { border-color: rgba(99,102,241,.55); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.inbound-alias-control input { min-width: 0; flex: 1; height: 38px; padding: 0 10px; border: 0; outline: 0; background: transparent; }
.inbound-alias-control input[aria-invalid="true"] { color: var(--danger); }
.inbound-alias-control span { padding: 0 11px 0 8px; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.inbound-alias-actions { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.inbound-alias-actions > span { margin-right: auto; color: var(--text-3); font-size: 11px; }
.inbound-privacy-note { display: flex; align-items: flex-start; gap: 8px; margin: 13px 0 0; color: var(--text-2); font-size: 11.5px; }
.inbound-privacy-note svg { width: 16px; height: 16px; color: var(--s-angebot); }
.inbound-live {
  --live-color: #6366d8; --countdown-progress: 360deg;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  margin-top: 14px; padding: 14px 16px; overflow: hidden; position: relative;
  border: 1px solid color-mix(in srgb, var(--live-color) 22%, rgba(255,255,255,.9)); border-radius: 17px;
  background: linear-gradient(115deg, color-mix(in srgb, var(--live-color) 11%, #fff), rgba(255,255,255,.82));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--live-color) 9%, transparent);
  transition: border-color .25s, background .25s, box-shadow .25s;
  animation: inbound-live-in .38s var(--ease) both;
}
.inbound-live[hidden] { display: none; }
.inbound-live::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.58) 50%, transparent 62%);
  transform: translateX(-110%); animation: inbound-scan 3.2s ease-in-out infinite;
}
.inbound-live.received { --live-color: #22a267; }
.inbound-live.checking { --live-color: #775bd6; }
.inbound-live-icon {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px;
  color: var(--live-color); background: color-mix(in srgb, var(--live-color) 13%, #fff);
}
.inbound-live-icon svg { width: 21px; height: 21px; }
.inbound-live-icon i {
  position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%;
  background: var(--live-color); box-shadow: 0 0 0 0 color-mix(in srgb, var(--live-color) 35%, transparent);
  animation: inbound-live-pulse 1.5s ease-out infinite;
}
.inbound-live-copy { min-width: 0; }
.inbound-live-copy > span { color: var(--live-color); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.inbound-live-copy h3 { margin-top: 2px; color: var(--text); font-size: 14px; letter-spacing: -.01em; }
.inbound-live-copy p { margin: 2px 0 0; color: var(--text-2); font-size: 11px; line-height: 1.4; }
.inbound-countdown {
  position: relative; isolation: isolate; width: 52px; height: 52px; display: grid; place-items: center; flex: none;
  border-radius: 50%; color: var(--live-color);
  background: conic-gradient(var(--live-color) var(--countdown-progress), color-mix(in srgb, var(--live-color) 12%, #e8e9e5) 0);
}
.inbound-countdown::before { content: ""; position: absolute; inset: 5px; z-index: -1; border-radius: inherit; background: rgba(255,255,255,.94); }
.inbound-countdown strong { margin: -1px 7px 0 0; font-size: 18px; line-height: 1; }
.inbound-countdown span { position: absolute; right: 12px; bottom: 13px; font-size: 8px; font-weight: 800; }
.inbound-live.received .inbound-countdown strong,
.inbound-live.checking .inbound-countdown strong { margin: 0; font-size: 19px; }
.inbound-live.received .inbound-countdown span,
.inbound-live.checking .inbound-countdown span { display: none; }
@keyframes inbound-live-in { from { opacity: 0; transform: translateY(7px) scale(.99); } }
@keyframes inbound-live-pulse { 75%, 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes inbound-scan { 0%, 52% { transform: translateX(-110%); } 88%, 100% { transform: translateX(110%); } }
.inbound-suggestions { margin-top: 22px; }
.inbound-section-head { margin-bottom: 10px; }
.suggestion-list { display: grid; gap: 10px; }
.suggestion-empty { padding: 26px 18px; border: 1px dashed var(--border-strong); border-radius: 16px; background: rgba(255,255,255,.6); text-align: center; color: var(--text-2); }
.suggestion-empty strong { display: block; margin-bottom: 3px; color: var(--text); }
.suggestion-card { padding: 15px; border: 1px solid rgba(255,255,255,.9); border-radius: 17px; background: rgba(255,255,255,.82); box-shadow: var(--shadow-sm); }
.suggestion-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.suggestion-event { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.suggestion-event i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.suggestion-confidence { padding: 3px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 700; }
.suggestion-card h4 { margin: 6px 0 2px; font-size: 15px; }
.suggestion-role { margin: 0; color: var(--text-2); font-size: 12px; }
.suggestion-summary { margin: 11px 0; padding: 10px 11px; border-radius: 11px; background: var(--bg-soft); color: var(--text-2); font-size: 12.5px; }
.suggestion-changes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.suggestion-changes span { padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.65); color: var(--text-2); font-size: 11px; }
.suggestion-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-width: 0; }
.suggestion-actions select { width: 100%; min-width: 0; max-width: 100%; height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); outline: none; font-size: 12px; }
.suggestion-actions .btn { min-width: 0; white-space: nowrap; }
.suggestion-actions select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inbound-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); background: rgba(255,255,255,.96); }
/* Sobald eine E-Mail erkannt wurde: Setup kompakt – alles auf einen Blick. */
.inbound-dialog.has-suggestions .inbound-body { display: flex; flex-direction: column; gap: 10px; }
.inbound-dialog.has-suggestions .inbound-body > * { flex-shrink: 0; }
.inbound-dialog.has-suggestions .inbound-suggestions { margin-top: 6px; }
.inbound-dialog.has-suggestions .inbound-live { margin-top: 0; }
.inbound-dialog.has-suggestions .inbound-setup { padding: 11px 13px; box-shadow: none; }
.inbound-dialog.has-suggestions .inbound-setup-head p,
.inbound-dialog.has-suggestions .inbound-privacy-note { display: none; }
.inbound-dialog.has-suggestions .inbound-address-row { margin-top: 9px; }
/* Lange KI-Texte und Firmennamen in der Auswahl dürfen die Karte nie breiter als das Fenster machen. */
.inbound-body > * { min-width: 0; }
.suggestion-list { grid-template-columns: minmax(0, 1fr); }
.suggestion-card { min-width: 0; max-width: 100%; }
.suggestion-card h4, .suggestion-role, .suggestion-summary { overflow-wrap: anywhere; }
.suggestion-actions select { text-overflow: ellipsis; }
@media (max-width: 620px) {
  .inbound-dialog { width: 100vw; max-height: 94vh; top: auto; bottom: 0; border-radius: 24px 24px 0 0; transform: translate(-50%, 8%) scale(.98); }
  .inbound-dialog.open { transform: translate(-50%, 0) scale(1); }
  /* Kompaktes Bottom-Sheet: Header schlank, Close-Button oben reicht. */
  .inbound-dialog { max-height: 92dvh; }
  .inbound-head { align-items: center; gap: 12px; padding: 14px 16px 12px; }
  .inbound-head h2 { font-size: 18px; }
  .inbound-head p { display: none; }
  .inbound-kicker { margin-bottom: 1px; font-size: 9.5px; }
  .inbound-body { padding: 12px 12px max(16px, env(safe-area-inset-bottom)); }
  .inbound-foot { display: none; }

  .inbound-setup { padding: 14px; border-radius: 16px; }
  .inbound-setup-head { align-items: center; gap: 10px; }
  .inbound-setup-head > div { min-width: 0; }
  .inbound-setup h3, .inbound-suggestions h3 { font-size: 14px; }
  .inbound-setup-head p { margin-left: 18px; font-size: 11.5px; line-height: 1.4; }
  .inbound-setup-head .btn { flex: 0 0 auto; }

  .inbound-address-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 12px; }
  .inbound-address-row input { grid-column: 1 / -1; height: 44px; font-size: 14px; }
  .inbound-address-row .btn { width: 100%; justify-content: center; }

  .inbound-alias-editor { padding: 10px; }
  .inbound-alias-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .inbound-alias-actions > span { grid-column: 1 / -1; }
  .inbound-alias-actions .btn { width: 100%; justify-content: center; }

  .inbound-privacy-note { margin-top: 11px; font-size: 11px; line-height: 1.4; }
  .inbound-live { gap: 10px; margin-top: 11px; padding: 11px 12px; border-radius: 15px; }
  .inbound-live-icon { width: 39px; height: 39px; border-radius: 12px; }
  .inbound-live-copy h3 { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .inbound-live-copy p { font-size: 10.5px; }
  .inbound-countdown { width: 46px; height: 46px; }
  .inbound-countdown strong { font-size: 16px; }
  .inbound-countdown span { right: 10px; bottom: 11px; }
  .inbound-suggestions { margin-top: 16px; }
  .inbound-section-head { align-items: center; gap: 10px; margin-bottom: 8px; padding-inline: 2px; }
  .inbound-section-head p { font-size: 11px; }

  .suggestion-card { padding: 13px; border-radius: 15px; }
  .suggestion-card h4 { font-size: 14px; }
  .suggestion-summary { margin: 9px 0; padding: 9px 10px; font-size: 12px; }
  .suggestion-changes { margin-bottom: 10px; }
  .suggestion-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .suggestion-actions select { grid-column: 1 / -1; width: 100%; height: 44px; }
  .suggestion-actions .btn { width: 100%; justify-content: center; }
  .suggestion-empty { padding: 20px 14px; }
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; z-index: 10000; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  isolation: isolate;
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: 12px;
  background: var(--text); color: var(--bg); font-weight: 500; font-size: 13.5px; box-shadow: var(--shadow-lg);
  pointer-events: auto; animation: toastIn .45s var(--spring) both;
}
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast svg { width: 16px; height: 16px; color: #34d399; }
.toast button { border: 0; background: transparent; color: var(--accent); font-weight: 600; padding: 0 0 0 6px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.92); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.96); } }

/* ---------- Keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(-4px); } }

/* ---------- Tabs ---------- */
.tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 13px;
  background: var(--bg-soft); border: 1px solid var(--border);
  animation: rise .6s .05s var(--ease) both;
}
.tab {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: 10px;
  background: none; color: var(--text-2); font-size: 13.5px; font-weight: 600;
  transition: background-color .25s var(--ease), color .2s, box-shadow .25s;
}
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.tab.active svg { color: var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Statistiken ---------- */
.insights { display: flex; flex-direction: column; gap: 14px; }
.ins-kpis { margin-bottom: 0; }
@media (min-width: 720px) { .ins-kpis { grid-template-columns: repeat(4, 1fr); } }
.ins-kpis .stat:first-child { grid-column: auto; }
.ins-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 820px) { .ins-grid { grid-template-columns: 1fr 1fr; } .panel.wide { grid-column: 1 / -1; } }

.panel {
  min-width: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow-sm);
  animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 120ms);
}
.panel h3 { font-size: 15px; font-weight: 600; }
.panel-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.panel-foot { margin-top: 8px; }

.highlights ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 820px) { .highlights ul { grid-template-columns: 1fr 1fr; gap: 10px 28px; } }
.highlights li { display: flex; gap: 10px; align-items: baseline; color: var(--text-2); font-size: 13.5px; }
.highlights li i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); transform: translateY(-1px); }
.highlights li b { color: var(--text); font-weight: 600; }

/* Current month snapshot */
.month-snapshot { padding: 20px; }
.snapshot-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.month-delta {
  flex: none; padding: 4px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  color: var(--text-2); background: var(--bg-soft);
}
.month-delta.up { color: var(--s-angebot); background: color-mix(in srgb, var(--s-angebot) 12%, transparent); }
.month-delta.down { color: var(--s-absage); background: color-mix(in srgb, var(--s-absage) 11%, transparent); }
.snapshot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .snapshot-grid { grid-template-columns: repeat(4, 1fr); } }
.snapshot-metric {
  position: relative; overflow: hidden; min-width: 0; padding: 13px 14px; border-radius: 13px;
  border: 1px solid var(--border); background: var(--bg-soft);
}
.snapshot-metric::after { content: ""; position: absolute; right: -18px; top: -20px; width: 60px; height: 60px; border-radius: 50%; background: var(--c); opacity: .1; filter: blur(10px); }
.snapshot-metric span { display: block; color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.snapshot-metric b { display: block; margin-top: 2px; font-size: 24px; line-height: 1.2; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.snapshot-metric small { display: block; margin-top: 2px; color: var(--text-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snapshot-status { margin-top: 14px; }
.snapshot-bar { display: flex; gap: 2px; height: 7px; overflow: hidden; border-radius: 99px; background: var(--bg-soft); }
.snapshot-bar span { background: var(--c); }
.snapshot-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 8px; color: var(--text-2); font-size: 11.5px; }
.snapshot-legend span { display: inline-flex; align-items: center; gap: 5px; }
.snapshot-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
@media (max-width: 520px) {
  .snapshot-head { flex-direction: column; gap: 8px; }
  .month-delta { align-self: flex-start; }
}

/* Funnel */
.funnel { display: grid; gap: 10px; }
.f-row { display: grid; grid-template-columns: 112px 1fr 64px; align-items: center; gap: 12px; padding: 2px 0; }
.f-label { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-track { height: 10px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.f-bar {
  display: block; height: 100%; width: var(--w); min-width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left; animation: grow .9s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 200ms);
}
.f-row:hover .f-label { color: var(--text); }
.f-val { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-variant-numeric: tabular-nums; }
.f-val b { font-size: 14px; font-weight: 700; }
.f-val small { font-size: 11.5px; color: var(--text-3); min-width: 34px; text-align: right; }

/* Column charts */
.cols { display: flex; align-items: stretch; gap: 6px; height: 160px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; cursor: default; }
.col-track {
  position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  border-radius: 6px; transition: background-color .2s;
}
.col:hover .col-track { background: var(--bg-soft); }
.col-bar {
  display: block; width: 100%; max-width: 28px; height: var(--h); min-height: 2px; border-radius: 4px 4px 0 0;
  background: color-mix(in srgb, var(--c) 55%, transparent);
  transform-origin: bottom; animation: rise-y .7s var(--ease) both; animation-delay: calc(var(--i) * 40ms + 200ms);
}
.col.hl .col-bar, .col:hover .col-bar { background: var(--c); }
.col-val { font-size: 11.5px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.col-label { height: 14px; font-size: 11px; color: var(--text-3); text-align: center; white-space: nowrap; overflow: hidden; }
.col.hl .col-label { color: var(--text); font-weight: 600; }
@keyframes rise-y { from { transform: scaleY(0); } }

/* Mini lists */
.mini-list { display: flex; flex-direction: column; gap: 4px; }
.mini-row {
  --c: var(--s-phase);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  width: 100%; padding: 8px; margin: 0 -8px; width: calc(100% + 16px);
  border: 0; border-radius: 11px; background: none; text-align: left;
  transition: background-color .2s;
}
.mini-row:hover { background: var(--bg-soft); }
.mini-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.mini-main { min-width: 0; display: flex; flex-direction: column; }
.mini-main b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-main small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-side { display: inline-flex; align-items: center; font-size: 12px; color: var(--text-2); }
.mini-side .phase-tag { display: inline-flex; align-items: center; }
.age-chip {
  font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 99px; font-variant-numeric: tabular-nums;
  color: var(--s-interview); background: color-mix(in srgb, var(--s-interview) 13%, transparent);
}
.more { padding: 4px 0 0; }

/* Roles table */
.roles { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.roles th {
  text-align: right; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em;
  padding: 0 0 8px 12px; border-bottom: 1px solid var(--border);
}
.roles td { text-align: right; padding: 9px 0 9px 12px; border-bottom: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.roles th:first-child, .roles td:first-child { text-align: left; padding-left: 0; width: 100%; white-space: normal; }
.roles tr:last-child td { border-bottom: 0; }
.role-name { display: block; color: var(--text); font-weight: 500; }
.role-bar { display: block; height: 4px; width: var(--w); margin-top: 5px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 45%, transparent); }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* ---------- Monatskarte Vorschau ---------- */
.share-preview-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.share-preview-overlay.show { opacity: 1; }
.share-preview {
  position: fixed; z-index: 91; left: 50%; top: 50%; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.7); border-radius: 24px;
  background: rgba(255,255,255,.92); box-shadow: 0 28px 90px rgba(15,23,42,.28); backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden; transform: translate(-50%, -46%) scale(.96);
  transition: opacity .25s var(--ease), transform .35s var(--spring), visibility 0s .35s;
}
.share-preview.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); transition-delay: 0s; }
.share-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.share-preview-head h2 { font-size: 18px; }
.share-preview-head p { font-size: 12px; margin-top: 2px; }
.share-preview-body { min-height: 0; overflow: auto; padding: 18px; background: linear-gradient(145deg,#eef2ff,#faf5ff 55%,#fff7ed); }
.share-preview-body img { display: block; width: min(100%, 400px); margin: auto; border-radius: 18px; box-shadow: 0 18px 45px rgba(58,45,108,.22); }
.share-preview-foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); }
@media (max-width: 520px) {
  .share-preview { width: 100vw; max-height: 94vh; top: auto; bottom: 0; border-radius: 24px 24px 0 0; transform: translate(-50%, 8%) scale(.98); }
  .share-preview.open { transform: translate(-50%, 0) scale(1); }
  .share-preview-body { padding: 12px; }
  .share-preview-foot { flex-wrap: wrap; }
  .share-preview-foot .spacer, .share-preview-foot [data-close-share] { display: none; }
  .share-preview-foot .btn { flex: 1; }
}

/* Tooltip */
.tip {
  position: fixed; z-index: 60; pointer-events: none; max-width: 260px;
  padding: 6px 10px; border-radius: 8px; background: var(--text); color: #fff;
  font-size: 12px; font-weight: 500; box-shadow: var(--shadow-md);
}

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }

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

@media (max-width: 560px) {
  .toolbar #sort { flex: 1 1 100%; }
}
@media (hover: none) { .search kbd { display: none; } }

/* ---------- Verlauf (stepper) ---------- */
.stepper { display: grid; grid-template-columns: repeat(var(--steps, 4), 1fr); padding: 4px 0 2px; }
.step {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 0; background: none; padding: 0 2px; text-align: center; min-width: 0;
}
.step::before, .step::after {
  content: ""; position: absolute; top: 15px; right: calc(50% + 18px); width: calc(100% - 36px); height: 2px; border-radius: 2px;
}
.step::before { background: var(--border-strong); }
.step::after {
  background: var(--s-phase); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease); transition-delay: calc(var(--i) * 70ms);
}
.step:first-child::before, .step:first-child::after { display: none; }
.step.done::after { transform: scaleX(1); }
.step-dot {
  position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; color: var(--text-3);
  background: var(--bg-elev); border: 2px solid var(--border-strong);
  transition: background .35s var(--ease), border-color .35s, color .35s, transform .35s var(--spring), box-shadow .35s;
  transition-delay: calc(var(--i) * 70ms);
}
.step-dot svg { width: 15px; height: 15px; stroke-width: 2.6; }
.step:hover .step-dot { border-color: var(--s-phase); color: var(--s-phase); }
.step.done .step-dot { background: var(--s-phase); border-color: var(--s-phase); color: #fff; }
.step.current .step-dot {
  background: var(--end); border-color: var(--end); color: #fff; transform: scale(1.12);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--end) 18%, transparent);
}
.outcome-step .step-dot { background: var(--s-absage); border-color: var(--s-absage); }
.outcome-step.current .step-label { color: var(--s-absage); }
.followup-step .step-dot {
  width: 27px; height: 27px; margin-top: 2.5px;
  background: #14b8a6; border-color: #14b8a6;
  box-shadow: 0 0 0 4px color-mix(in srgb, #14b8a6 12%, transparent);
}
.followup-step .step-dot svg { width: 13px; height: 13px; }
.followup-step .step-label { color: #0f766e !important; }
.step-label { font-size: 12px; font-weight: 600; color: var(--text-3); line-height: 1.25; transition: color .3s; }
.step.done .step-label { color: var(--text-2); }
.step.current .step-label { color: var(--text); }
.step-date { font-size: 11px; color: var(--text-3); min-height: 14px; font-variant-numeric: tabular-nums; }
.inline-date {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px;
  padding: 8px 8px 8px 12px; border-radius: 11px; background: var(--bg-soft); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600; color: var(--text-2); animation: pop .35s var(--spring) both;
}
.inline-date input {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elev); outline: none;
}
.inline-date input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
@media (max-width: 480px) { .step-label { font-size: 11px; } .step-dot { width: 28px; height: 28px; } .step::before, .step::after { top: 13px; } }

/* Verlauf on cards */
.phase-tag { gap: 6px !important; }
.phase-tag.hot { color: var(--s-phase); font-weight: 600; }
.phase-dots { display: inline-flex; gap: 3px; }
.phase-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.phase-dots i.on { background: color-mix(in srgb, var(--s-phase) 55%, transparent); }
.phase-dots i.end { background: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 22%, transparent); }
.month-stats .talks { color: var(--s-phase); font-weight: 600; }


/* ---------- 2026 Dashboard navigation ---------- */
.app-navbar {
  position: relative;
  z-index: 120;
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  padding: 12px 14px;
  margin-bottom: 54px;
  border: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  box-shadow: 0 14px 42px rgba(15, 23, 42, .07), inset 0 1px rgba(255,255,255,.7);
  backdrop-filter: blur(24px) saturate(135%);
  animation: rise .55s var(--ease) both;
}
.nav-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.nav-brand .logo { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 8px 20px rgba(99,102,241,.24); }
.nav-brand .logo svg { width: 22px; height: 22px; }
.nav-brand strong { font-size: 18px; letter-spacing: -.035em; }
.nav-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
}
.nav-tabs .tab {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  color: var(--text-3);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  transition: color .2s, background .2s, box-shadow .2s, transform .2s var(--ease);
}
.nav-tabs .tab:hover { color: var(--text); }
.nav-tabs .tab.active { color: var(--text); background: var(--bg-elev); box-shadow: 0 3px 12px rgba(15,23,42,.08); }
.nav-tabs .tab svg { width: 17px; height: 17px; }
.nav-tabs .tab.active svg { color: var(--accent); }
.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.nav-icon {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-elev);
  color: var(--text-2);
  transition: color .2s, background .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.nav-icon:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.nav-icon svg { width: 18px; height: 18px; }
.magic-top-btn { color: #fff; border-color: transparent; }
.nav-icon.privacy-toggle { padding: 0; }
.nav-icon.privacy-toggle.active { box-shadow: 0 5px 16px rgba(99,102,241,.24); }
.nav-account {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 3px 3px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elev);
  color: var(--text-3);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.nav-account:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.nav-account > svg { width: 17px; height: 17px; }
.nav-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(145deg, #171923, #5651e6);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin: 0 2px 28px;
  animation: rise .55s .06s var(--ease) both;
}
.dashboard-kicker, .settings-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dashboard-heading h1 { font-size: clamp(30px, 4vw, 43px); line-height: 1.05; letter-spacing: -.05em; }
.dashboard-heading p { margin-top: 9px; color: var(--text-2); font-size: 14px; }
.dashboard-add { height: 46px; padding: 0 19px; border-radius: 13px; }

/* ---------- Settings center ---------- */
.settings-overlay {
  position: fixed; inset: 0; z-index: 1800;
  background: rgba(10, 12, 22, .42);
  opacity: 0;
  backdrop-filter: blur(8px);
  transition: opacity .25s var(--ease);
}
.settings-overlay.show { opacity: 1; }
.settings-panel {
  position: fixed;
  z-index: 1810;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(620px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg-elev);
  box-shadow: -24px 20px 80px rgba(10, 12, 25, .22);
  visibility: hidden;
  transform: translateX(calc(100% + 24px));
  transition: transform .42s var(--ease), visibility 0s .42s;
}
.settings-panel.open { visibility: visible; transform: none; transition: transform .42s var(--ease), visibility 0s; }
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 26px 21px;
  border-bottom: 1px solid var(--border);
}
.settings-head h2 { font-size: 25px; letter-spacing: -.035em; }
.settings-head .settings-kicker { margin-bottom: 4px; }
.settings-body { flex: 1; overflow: auto; padding: 22px 26px 34px; overscroll-behavior: contain; }
.settings-section { margin-bottom: 24px; }
.settings-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 2px 11px;
}
.settings-section-title span { font-size: 13px; font-weight: 750; }
.settings-section-title small { color: var(--text-3); font-size: 11px; }
.settings-form, .settings-action-list, .settings-signout, .danger-zone {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-soft);
}
.settings-form { padding: 17px; }
.settings-form .field-wide { display: flex; margin-bottom: 13px; }
.settings-form .field-grid { gap: 12px; }
.settings-form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 15px; margin-top: 17px; }
.settings-form-foot > span { flex: 1; color: var(--text-3); font-size: 11.5px; }
.premium-settings-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding: 18px;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(129, 140, 248, .25);
  border-radius: 17px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 88% 15%, rgba(167,139,250,.36), transparent 32%),
    linear-gradient(125deg, #111827, #29275d 64%, #4338ca);
  box-shadow: 0 14px 34px rgba(38, 33, 103, .2);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.premium-settings-card:hover { transform: translateY(-2px); box-shadow: 0 19px 42px rgba(38,33,103,.28); }
.premium-settings-card > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.premium-settings-card small { color: #c4b5fd; font-size: 9.5px; font-style: normal; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.premium-settings-card strong { font-size: 16px; }
.premium-settings-card em { color: rgba(241,245,249,.68); font-size: 11.5px; font-style: normal; }
.premium-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.1); }
.premium-icon svg { width: 21px; height: 21px; }
.premium-arrow { width: 18px; height: 18px; opacity: .62; }
.billing-overlay { position: fixed; inset: 0; z-index: 2400; background: rgba(10,12,22,.58); backdrop-filter: blur(9px); }
.billing-modal {
  position: fixed; z-index: 2410; top: 50%; left: 50%; width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 28px); overflow: auto; transform: translate(-50%, -50%);
  border: 1px solid var(--border); border-radius: 24px; background: var(--bg-elev);
  box-shadow: 0 30px 100px rgba(10,12,25,.32);
}
.billing-modal.success { overflow: hidden; border-color: color-mix(in srgb, var(--accent) 32%, var(--border)); background: linear-gradient(145deg, var(--bg-elev), color-mix(in srgb, var(--accent-soft) 46%, var(--bg-elev))); }
.billing-modal[hidden], .billing-overlay[hidden] { display: none; }
.billing-modal header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 25px 26px 19px; border-bottom: 1px solid var(--border); }
.billing-modal header span { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.billing-modal header h2 { margin-top: 5px; font-size: 28px; letter-spacing: -.04em; }
.billing-content { padding: 22px 26px 26px; }
.billing-content > p { color: var(--text-2); font-size: 13px; line-height: 1.55; }
.billing-content ul { display: grid; gap: 8px; margin: 17px 0 20px; padding: 0; list-style: none; }
.billing-content li { display: flex; align-items: center; gap: 9px; color: var(--text-1); font-size: 13px; font-weight: 700; }
.billing-content li::before { content: "✓"; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #166534; background: #dcfce7; font-size: 11px; }
.billing-price-picker { display: grid; grid-template-columns: 1fr; }
.billing-price-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 15px 16px; border: 1px solid var(--accent); border-radius: 14px; color: var(--text-1); background: rgba(99,102,241,.06); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.billing-price-picker strong { font-size: 22px; letter-spacing: -.03em; }
.billing-price-picker span { color: var(--text-3); font-size: 11px; }
.billing-price-picker small { margin-top: 5px; color: var(--text-3); font-size: 10px; }
.billing-renewal { margin: 14px 0; }
.billing-terms { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
.billing-terms input { margin-top: 2px; accent-color: var(--accent); }
.billing-terms span { color: var(--text-2); font-size: 11.5px; line-height: 1.45; }
.billing-terms a { color: var(--accent); font-weight: 750; }
.billing-submit { width: 100%; min-height: 46px; }
.billing-submit + .billing-submit { margin-top: 9px; }
.billing-message { display: block; min-height: 17px; margin-top: 11px; color: var(--danger); font-size: 11.5px; text-align: center; }
.billing-message.ok { color: var(--success); }
.billing-provider { display: block; margin-top: 9px; color: var(--text-3); font-size: 10.5px; line-height: 1.45; text-align: center; }
.billing-confetti { position: absolute; z-index: 3; inset: 0; overflow: hidden; pointer-events: none; }
.billing-confetti i { position: absolute; top: -18px; left: var(--left); width: var(--size); height: calc(var(--size) * 1.65); border-radius: 2px; background: var(--color); opacity: 0; animation: billing-confetti-fall var(--duration) var(--delay) cubic-bezier(.2,.7,.25,1) forwards; }
@keyframes billing-confetti-fall {
  0% { opacity: 0; transform: translate3d(0,-24px,0) rotate(0deg); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift),560px,0) rotate(var(--rotation)); }
}
.billing-success-content { position: relative; z-index: 2; padding: 28px 34px 36px; text-align: center; }
.billing-success-icon { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 24px; color: #fff; background: linear-gradient(145deg,#6366f1,#9333ea 60%,#ec4899); box-shadow: 0 18px 42px rgba(99,102,241,.34); animation: billing-success-pop .65s cubic-bezier(.2,.9,.25,1.35) both; }
.billing-success-icon svg { width: 39px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.billing-success-kicker { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.billing-success-content h3 { margin: 7px 0 9px; font-size: 27px; letter-spacing: -.035em; }
.billing-success-content > p { min-height: 42px; margin: 0 auto; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.billing-success-perks { display: grid; gap: 8px; margin: 21px 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 15px; text-align: left; background: color-mix(in srgb, var(--bg-elev) 80%, transparent); }
.billing-success-perks span { color: var(--text-1); font-size: 12.5px; font-weight: 680; }
.billing-success-button { width: 100%; min-height: 48px; }
@keyframes billing-success-pop { from { opacity: 0; transform: scale(.55) rotate(-9deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .billing-confetti { display: none; } .billing-success-icon { animation: none; } }
.ai-consent-overlay {
  position: fixed; inset: 0; z-index: 2500; background: rgba(10,12,22,.58);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
}
.ai-consent-modal {
  position: fixed; z-index: 2510; top: 50%; left: 50%; width: min(590px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px); overflow: auto; transform: translate(-50%, -50%);
  border: 1px solid var(--border); border-radius: 24px; background: var(--bg-elev);
  box-shadow: 0 30px 100px rgba(10,12,25,.32);
}
.ai-consent-modal[hidden], .ai-consent-overlay[hidden] { display: none; }
.ai-consent-modal header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 26px 18px; border-bottom: 1px solid var(--border); }
.ai-consent-modal header span { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.ai-consent-modal header h2 { margin-top: 5px; font-size: 27px; letter-spacing: -.04em; }
.ai-consent-content { padding: 21px 26px 26px; }
.ai-consent-content > p:first-child { margin: 0 0 16px; color: var(--text-2); font-size: 13px; }
.ai-consent-option {
  display: grid; grid-template-columns: auto minmax(0,1fr); align-items: flex-start; gap: 12px;
  margin-top: 10px; padding: 15px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg-soft); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s;
}
.ai-consent-option:has(input:checked) { border-color: rgba(99,102,241,.42); background: color-mix(in srgb, var(--accent-soft) 58%, var(--bg-elev)); box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.ai-consent-option:has(input:disabled) { opacity: .58; cursor: not-allowed; }
.ai-consent-option input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.ai-consent-option span { min-width: 0; }
.ai-consent-option strong { display: block; font-size: 13.5px; }
.ai-consent-option small { display: block; margin-top: 4px; color: var(--text-2); font-size: 11.5px; line-height: 1.5; }
.ai-consent-legal { margin: 14px 2px 0 !important; color: var(--text-3) !important; font-size: 10.5px !important; line-height: 1.5; }
.ai-consent-legal a { color: var(--accent); font-weight: 700; }
.ai-consent-message { display: block; min-height: 18px; margin-top: 8px; color: var(--danger); font-size: 11.5px; }
.ai-consent-actions { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 9px; margin-top: 4px; }
.ai-consent-actions .btn { min-height: 46px; }
@media (max-width: 560px) {
  .ai-consent-modal { width: 100vw; max-height: 94dvh; top: auto; bottom: 0; transform: none; border-radius: 24px 24px 0 0; }
  .ai-consent-modal header { padding: 18px 18px 14px; }
  .ai-consent-modal header h2 { font-size: 23px; }
  .ai-consent-content { padding: 17px 18px max(20px, env(safe-area-inset-bottom)); }
  .ai-consent-option { padding: 13px; }
  .ai-consent-actions { grid-template-columns: 1fr; }
  .ai-consent-actions .btn.primary { grid-row: 1; }
}
.settings-action-list { overflow: hidden; }
.settings-action-list button {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 10px 14px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: background .2s;
}
.settings-action-list button:last-child { border-bottom: 0; }
.settings-action-list button:hover { background: color-mix(in srgb, var(--bg-elev) 75%, transparent); }
.settings-action-list button > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.settings-action-list strong { font-size: 13px; }
.settings-action-list small { color: var(--text-3); font-size: 11px; }
.settings-action-list i { color: var(--text-3); font-style: normal; }
.settings-action-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: var(--accent-soft); }
.settings-action-icon svg { width: 17px; height: 17px; }
.settings-signout {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 15px;
  text-align: left;
}
.settings-session-actions { display: grid; }
.settings-signout > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.settings-signout > span strong { color: var(--text); font-size: 12px; }
.settings-signout > span small { overflow: hidden; color: var(--text-3); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.settings-signout > b { flex: 0 0 auto; color: var(--text-2); font-size: 11px; }
.settings-signout-all { border-top: 1px solid var(--border); }
.danger-zone { padding: 13px; border-color: rgba(244,63,94,.22); background: rgba(244,63,94,.035); }
.danger-zone > .settings-section-title { margin: 0 2px 10px; }
.danger-zone > .settings-section-title span { color: #e11d48; }
.danger-row {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 11px;
  text-align: left;
  border: 0;
  border-top: 1px solid rgba(244,63,94,.12);
  background: transparent;
}
.danger-row > span { display: flex; flex-direction: column; gap: 3px; }
.danger-row strong { font-size: 12.5px; }
.danger-row small { color: var(--text-3); font-size: 10.5px; }
.danger-row b { color: #e11d48; font-size: 11.5px; white-space: nowrap; }
.delete-account-confirm { padding: 13px 11px 5px; border-top: 1px solid rgba(244,63,94,.15); }
.delete-account-confirm p { margin-bottom: 10px; color: var(--text-2); font-size: 11.5px; }
.delete-account-confirm > div { display: flex; gap: 8px; }
.delete-account-confirm input { min-width: 0; flex: 1; height: 40px; padding: 0 12px; border: 1px solid rgba(244,63,94,.3); border-radius: 10px; background: var(--bg-elev); outline: none; }
.delete-account-confirm input:focus { border-color: #e11d48; box-shadow: 0 0 0 3px rgba(244,63,94,.1); }
.delete-account-confirm > span { display: block; min-height: 17px; margin-top: 8px; color: #e11d48; font-size: 11px; }
.btn.danger-solid { color: #fff; background: #e11d48; }
.btn.danger-solid:hover { background: #be123c; }

@media (max-width: 860px) {
  .app-navbar { grid-template-columns: 1fr auto; margin-bottom: 42px; }
  .nav-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .nav-tabs .tab { flex: 1; justify-content: center; }
  .sync-state { margin-left: auto; }
}
@media (max-width: 560px) {
  .app { padding-top: 12px; }
  .app-navbar { gap: 10px; padding: 9px; border-radius: 15px; margin-bottom: 34px; }
  .nav-brand strong { display: none; }
  .nav-brand .logo { width: 36px; height: 36px; }
  .nav-actions { gap: 5px; }
  .nav-icon, .nav-account { width: 36px; height: 36px; }
  .nav-account { padding: 0; display: grid; place-items: center; }
  .nav-avatar { display: none; }
  .nav-account > svg { width: 19px; height: 19px; }
  .sync-state { display: none; }
  .dashboard-heading { align-items: center; margin-bottom: 24px; }
  .dashboard-heading h1 { font-size: 30px; }
  .dashboard-heading p { max-width: 240px; font-size: 12.5px; }
  .dashboard-add { width: 43px; height: 43px; padding: 0; }
  .dashboard-add span { display: none; }
  .settings-panel { inset: 0; width: 100%; border: 0; border-radius: 0; }
  .settings-head { padding: 21px 18px 17px; }
  .settings-body { padding: 18px 16px 30px; }
  .settings-form .field-grid { grid-template-columns: 1fr; }
  .settings-form-foot { align-items: stretch; flex-direction: column; }
  .settings-form-foot .btn { width: 100%; }
}

/* ---------- Refined full-width / scroll-pill navigation ---------- */
.app-navbar {
  position: sticky;
  top: 0;
  grid-template-columns: 1fr auto;
  width: 100vw;
  min-height: 76px;
  margin-left: 50%;
  margin-bottom: 58px;
  padding: 11px max(20px, calc((100vw - 1080px) / 2 + 32px));
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-radius: 0;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  box-shadow: none;
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  animation: none;
  transition: background .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.app-navbar.scrolled {
  top: 12px;
  width: min(1040px, calc(100vw - 24px));
  min-height: 62px;
  margin-left: 50%;
  padding: 9px 11px;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--border-strong) 72%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 72%, transparent);
  box-shadow: 0 16px 46px rgba(15,23,42,.13), inset 0 1px rgba(255,255,255,.72);
  backdrop-filter: blur(28px) saturate(165%);
  animation: navbarPillIn .28s cubic-bezier(.22,.8,.3,1) both;
}
@keyframes navbarPillIn {
  from { opacity: .86; transform: translateX(-50%) translateY(-6px) scale(.985); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.nav-brand {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.nav-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
.nav-actions { gap: 8px; }
.nav-feature {
  position: relative;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 720;
  white-space: nowrap;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, background .2s;
}
.nav-feature svg { width: 18px; height: 18px; }
.nav-feature:hover { transform: translateY(-1px); }
.nav-feature.magic-top-btn {
  min-width: 132px;
  color: #fff;
  border-color: rgba(255,255,255,.12);
  background: linear-gradient(135deg, #171923 0%, #4338ca 62%, #7c3aed 100%);
  box-shadow: 0 8px 22px rgba(67,56,202,.3), inset 0 1px rgba(255,255,255,.16);
}
.nav-feature.magic-top-btn:hover { box-shadow: 0 12px 28px rgba(67,56,202,.4), inset 0 1px rgba(255,255,255,.2); }
.nav-feature.inbox-top-btn {
  min-width: 96px;
  color: #4338ca;
  border-color: rgba(99,102,241,.2);
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(238,242,255,.92));
  box-shadow: 0 6px 18px rgba(67,56,202,.09);
}
.nav-feature.inbox-top-btn:hover {
  border-color: rgba(99,102,241,.34);
  box-shadow: 0 9px 24px rgba(67,56,202,.15);
}
.nav-account {
  width: 42px;
  height: 42px;
  justify-content: center;
  padding: 0;
}
.nav-account > svg { width: 19px; height: 19px; }
.app-navbar.scrolled .nav-brand .logo { width: 36px; height: 36px; }
.app-navbar.scrolled .nav-feature, .app-navbar.scrolled .nav-account, .app-navbar.scrolled .nav-icon { height: 40px; }
.app-navbar.scrolled .nav-feature.magic-top-btn { min-width: 126px; }
.app-navbar.scrolled .nav-feature.inbox-top-btn { min-width: 92px; }

@media (max-width: 700px) {
  .app-navbar {
    grid-template-columns: 1fr auto;
    width: 100vw;
    min-height: 68px;
    margin-left: 50%;
    margin-bottom: 38px;
    padding: 9px 14px;
    border-radius: 0;
  }
  .app-navbar.scrolled {
    width: calc(100vw - 16px);
    margin-left: 50%;
    padding: 7px 9px;
    border-radius: 999px;
  }
  .nav-brand strong { display: none; }
  .nav-actions { gap: 5px; }
  .nav-feature { height: 38px; padding: 0 10px; font-size: 11.5px; }
  .nav-feature.magic-top-btn { min-width: 112px; }
  .nav-feature.inbox-top-btn { min-width: 80px; }
  .nav-icon, .nav-account { width: 38px; height: 38px; }
  .app-navbar.scrolled .nav-feature.magic-top-btn { min-width: 106px; }
  .app-navbar.scrolled .nav-feature.inbox-top-btn { min-width: 76px; }
}
@media (max-width: 430px) {
  .nav-brand .logo { width: 34px; height: 34px; }
  .nav-feature.magic-top-btn { min-width: 42px; width: 42px; padding: 0; }
  .nav-feature.magic-top-btn span { display: none; }
  .nav-feature.inbox-top-btn { min-width: 74px; padding: 0 9px; }
  .app-navbar.scrolled .nav-feature.magic-top-btn { min-width: 40px; width: 40px; }
  .app-navbar.scrolled .nav-feature.inbox-top-btn { min-width: 70px; }
}

/* ---------- Simple navbar → pill ---------- */
.app-navbar {
  position: sticky;
  top: 12px;
  width: 100%;
  min-height: 56px;
  margin-left: 0;
  margin-bottom: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
  animation: none;
  transition: padding .18s ease, border-radius .18s ease, background .18s ease, box-shadow .18s ease;
}
.app-navbar.scrolled {
  top: 12px;
  width: 100%;
  min-height: 56px;
  margin-left: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 78%, transparent);
  box-shadow: 0 12px 36px rgba(15,23,42,.12);
  backdrop-filter: blur(24px) saturate(150%);
  transform: none;
  animation: none;
}
.app-navbar.scrolled .nav-brand .logo { width: 38px; height: 38px; }
.app-navbar.scrolled .nav-feature,
.app-navbar.scrolled .nav-account,
.app-navbar.scrolled .nav-icon { height: 42px; }
.app-navbar.scrolled .nav-feature.magic-top-btn { min-width: 132px; }
.app-navbar.scrolled .nav-feature.inbox-top-btn { min-width: 96px; }

@media (max-width: 700px) {
  .app-navbar {
    width: 100%;
    min-height: 54px;
    margin-left: 0;
    margin-bottom: 36px;
    padding: 0;
    border-radius: 0;
  }
  .app-navbar.scrolled {
    width: 100%;
    margin-left: 0;
    padding: 7px 8px;
    border-radius: 999px;
  }
}

/* ---------- Calm settings ---------- */
.settings-overlay {
  background: rgba(15, 18, 28, .22);
  backdrop-filter: blur(3px);
  transition: opacity .18s ease;
}
.settings-panel {
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  box-shadow: -18px 0 54px rgba(15,23,42,.12);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .18s ease, transform .2s ease, visibility 0s .2s;
}
.settings-panel.open {
  opacity: 1;
  transform: none;
  transition: opacity .18s ease, transform .2s ease, visibility 0s;
}
.settings-head {
  padding: 28px 32px 20px;
  border-bottom: 0;
}
.settings-head .settings-kicker { display: none; }
.settings-head h2 { font-size: 22px; letter-spacing: -.025em; }
.settings-head .icon-btn {
  width: 36px;
  height: 36px;
  border-color: transparent;
  background: var(--bg-soft);
}
.settings-body { padding: 4px 32px 38px; }
.settings-section {
  margin: 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.settings-body > .settings-section:first-child {
  padding-top: 10px;
  border-top: 0;
}
.settings-section-title {
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 16px;
}
.settings-section-title span { font-size: 12.5px; }
.settings-section-title small { font-size: 10.5px; }
.settings-form,
.settings-action-list,
.settings-signout,
.danger-zone {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.settings-form { padding: 0; }
.settings-form .field-wide { margin-bottom: 12px; }
.settings-form .field-grid { gap: 12px; }
.settings-form-foot { margin-top: 16px; }
.settings-form-foot .btn { height: 38px; box-shadow: none; }
.premium-settings-card {
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  margin: 2px 0 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: var(--bg-soft);
  box-shadow: none;
  transition: background .16s ease, border-color .16s ease;
}
.premium-settings-card:hover {
  transform: none;
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--bg-soft) 65%, var(--accent-soft));
  box-shadow: none;
}
.premium-settings-card small { color: var(--accent); font-size: 9px; }
.premium-settings-card strong { font-size: 14px; }
.premium-settings-card em { color: var(--text-3); font-size: 11px; }
.premium-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
}
.premium-icon svg { width: 18px; height: 18px; }
.premium-arrow { color: var(--text-3); opacity: .65; }
.premium-settings-card.is-premium {
  border-color: #d6a817;
  color: #3b2900;
  background: linear-gradient(135deg,#fff9dc 0%,#f8d86b 48%,#e7af22 100%);
  box-shadow: 0 13px 30px rgba(184,132,8,.26), inset 0 1px 0 rgba(255,255,255,.72);
}
.premium-settings-card.is-premium:hover {
  transform: translateY(-1px);
  border-color: #bd8700;
  background: linear-gradient(135deg,#fffbe8 0%,#f9df7d 46%,#e9b52a 100%);
  box-shadow: 0 17px 36px rgba(184,132,8,.32), inset 0 1px 0 rgba(255,255,255,.78);
}
.premium-settings-card.is-premium small { color: #704b00; }
.premium-settings-card.is-premium strong { color: #2e2000; }
.premium-settings-card.is-premium em { color: #624500; font-weight: 650; }
.premium-settings-card.is-premium .premium-icon { color: #fff7cc; background: linear-gradient(145deg,#6f4900,#b97900); box-shadow: 0 8px 18px rgba(94,58,0,.25); }
.premium-settings-card.is-premium .premium-arrow { color: #5e4000; opacity: .9; }
.premium-settings-card.is-premium.is-ending {
  border-color: #d48a36;
  background: linear-gradient(135deg,#fff7e8 0%,#f5c77e 52%,#df9946 100%);
  box-shadow: 0 13px 30px rgba(173,101,24,.22), inset 0 1px 0 rgba(255,255,255,.75);
}
.premium-settings-card.is-premium.is-ending small { color: #8a320f; }
.premium-settings-card.is-premium.is-ending em { color: #6e3a16; }
.premium-settings-card.is-premium.is-ending .premium-icon {
  color: #fff8e9;
  background: linear-gradient(145deg,#873d14,#c8752e);
}
.settings-action-list { overflow: visible; }
.settings-action-list button {
  min-height: 58px;
  padding: 9px 2px;
}
.settings-action-list button:hover { background: transparent; }
.settings-action-list button:hover strong { color: var(--accent); }
.settings-action-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-2);
  background: var(--bg-elev);
}
.settings-action-icon svg { width: 15px; height: 15px; }
.settings-signout {
  min-height: 48px;
  padding: 0 2px;
}
.settings-signout:hover > span strong,
.settings-signout:hover > b { color: var(--accent); }
.danger-zone {
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
}
.danger-zone > .settings-section-title { margin: 0 0 10px; }
.danger-row {
  min-height: 54px;
  padding: 10px 2px;
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}
.delete-account-confirm { padding: 14px 0 0; }
@media (max-width: 560px) {
  .settings-head { padding: 22px 20px 16px; }
  .settings-body { padding: 2px 20px 30px; }
  .settings-panel { border-left: 0; }
}

/* ---------- Jobply AI briefing ---------- */
.distribution { margin-bottom: 14px; }
.ai-brief {
  position: relative;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--border));
  border-radius: 17px;
  background:
    radial-gradient(circle at 2% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 35%),
    color-mix(in srgb, var(--bg-elev) 94%, transparent);
  box-shadow: 0 8px 26px rgba(15,23,42,.055);
}
.ai-brief-head {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.ai-brief-head > div { display: flex; align-items: center; gap: 9px; }
.ai-brief-head strong { font-size: 13px; letter-spacing: -.01em; }
.ai-brief-head small { color: var(--text-3); font-size: 10.5px; }
.ai-carousel-meta { display: flex; align-items: center; gap: 11px !important; }
.ai-carousel-dots { display: flex; align-items: center; gap: 5px; }
.ai-carousel-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text-3) 35%, transparent);
  transition: width .3s ease, background .3s ease, transform .2s ease;
}
.ai-carousel-dots button:hover { transform: scale(1.25); }
.ai-carousel-dots button.active {
  width: 17px;
  background: var(--accent);
}
.ai-mark {
  min-width: 29px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #171923, #6d28d9);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  box-shadow: 0 4px 12px rgba(109,40,217,.18);
}
.ai-carousel-viewport { position: relative; min-height: 93px; overflow: hidden; }
.ai-brief-item {
  position: absolute;
  inset: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(62%);
  transition:
    transform .68s cubic-bezier(.22, 1, .36, 1),
    opacity .42s ease;
  will-change: transform, opacity;
}
.ai-brief-item.active { opacity: 1; pointer-events: auto; transform: translateY(0); }
.ai-brief-item.leaving { opacity: 0; pointer-events: none; transform: translateY(-62%); }
.ai-brief-item.completing { opacity: 0; transform: translateY(-38%) scale(.985); }
.ai-task-check,
.ai-task-check-placeholder { width: 26px; height: 26px; flex: none; }
.ai-task-check {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--accent) 30%, var(--border-strong));
  border-radius: 50%;
  color: transparent;
  background: var(--bg-elev);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s var(--spring);
}
.ai-task-check:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  transform: scale(1.08);
}
.ai-task-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-task-check svg { width: 14px; height: 14px; stroke-width: 2.6; }
.ai-brief-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
}
.ai-brief-icon svg { width: 16px; height: 16px; }
.ai-brief-item.attention .ai-brief-icon { color: #c2410c; background: rgba(251,146,60,.13); }
.ai-brief-item.success .ai-brief-icon { color: #047857; background: rgba(16,185,129,.12); }
.ai-brief-item.goal .ai-brief-icon { color: #6d28d9; background: rgba(139,92,246,.12); }
.ai-brief-item.fact .ai-brief-icon { color: #0369a1; background: rgba(14,165,233,.11); }
.ai-brief-item > div { min-width: 0; }
.ai-brief-item > div strong { display: block; margin-bottom: 4px; font-size: 12.5px; line-height: 1.3; }
.ai-brief-item p { color: var(--text-2); font-size: 11.5px; line-height: 1.45; }
.ai-brief-item > button[data-ai-action] {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.ai-brief-item > button[data-ai-action] span { transition: transform .16s ease; }
.ai-brief-item > button[data-ai-action]:hover span { transform: translateX(2px); }
@media (max-width: 760px) {
  .ai-carousel-viewport { min-height: 118px; }
  .ai-brief-item {
    grid-template-columns: auto auto minmax(0, 1fr);
    align-content: center;
    gap: 7px 11px;
  }
  .ai-brief-item > button[data-ai-action] { grid-column: 3; }
}
@media (max-width: 480px) {
  .ai-brief-head { padding-inline: 14px; }
  .ai-brief-item { padding: 14px; }
  .ai-carousel-meta small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-brief-item { transition: opacity .15s linear; transform: none; }
  .ai-brief-item.leaving { transform: none; }
}

/* ---------- Official Jobply brand assets ---------- */
.nav-brand .brand-icon {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 8px 13px rgba(51,71,255,.2));
  transition: width .18s ease, height .18s ease, filter .75s ease, transform .75s cubic-bezier(.2,.9,.25,1.2);
}
.nav-brand .brand-wordmark { width: auto; height: 20px; transition: filter .75s ease, transform .75s cubic-bezier(.2,.9,.25,1.2); }
.nav-premium-badge {
  display: inline-flex; align-items: center; min-height: 21px; padding: 0 8px; border: 1px solid #d6a817; border-radius: 999px;
  color: #684700; background: linear-gradient(135deg,#fff8d1,#f4ce55); box-shadow: 0 5px 14px rgba(184,132,8,.2);
  font-size: 8.5px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase;
}
.nav-premium-badge[hidden] { display: none; }
.app-navbar.premium-logo-gold .nav-brand .brand-icon,
.app-navbar.premium-logo-gold .nav-brand .brand-wordmark {
  filter: brightness(0) saturate(100%) invert(67%) sepia(85%) saturate(701%) hue-rotate(3deg) brightness(92%) contrast(91%) drop-shadow(0 7px 13px rgba(190,136,8,.32));
  transform: translateY(-1px) scale(1.035);
  animation: premium-logo-reveal .95s cubic-bezier(.2,.8,.25,1) both;
}
.app-navbar.premium-logo-gold .nav-premium-badge { animation: premium-badge-glow 1.4s .15s ease both; }
@keyframes premium-logo-reveal {
  0% { opacity: .75; transform: scale(.92) rotate(-2deg); }
  55% { transform: scale(1.09) rotate(1deg); }
  100% { opacity: 1; transform: translateY(-1px) scale(1.035) rotate(0); }
}
@keyframes premium-badge-glow {
  0%,100% { box-shadow: 0 5px 14px rgba(184,132,8,.2); }
  50% { box-shadow: 0 5px 22px rgba(232,178,34,.58), 0 0 0 4px rgba(248,216,107,.22); }
}
.app-navbar.scrolled .nav-brand .brand-icon { width: 38px; height: 38px; }
@media (max-width: 700px) {
  .nav-brand .brand-wordmark { display: none; }
  .nav-brand,
  .app-navbar.scrolled .nav-brand { position: relative; justify-content: center; gap: 0; }
  .app-navbar .nav-brand .brand-icon,
  .app-navbar.scrolled .nav-brand .brand-icon { width: 30px; height: 30px; }
  .nav-premium-badge { position: absolute; top: 1px; right: 0; min-width: 15px; width: 15px; min-height: 15px; height: 15px; padding: 0; justify-content: center; font-size: 0; box-shadow: 0 3px 9px rgba(184,132,8,.22); }
  .nav-premium-badge::after { content: "★"; font-size: 7px; line-height: 1; }
}
@media (max-width: 430px) {
  .app-navbar .nav-brand .brand-icon,
  .app-navbar.scrolled .nav-brand .brand-icon { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-navbar.premium-logo-gold .nav-brand .brand-icon,
  .app-navbar.premium-logo-gold .nav-brand .brand-wordmark,
  .app-navbar.premium-logo-gold .nav-premium-badge { animation: none; }
}

/* ---------- Primary workspace switch ---------- */
.workspace-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 26px;
  width: 100%;
  margin: -3px 2px 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  animation: rise .5s .1s var(--ease) both;
}
.workspace-switch button {
  position: relative;
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  color: var(--text-3);
  background: transparent;
  font-size: 12.5px;
  font-weight: 680;
  white-space: nowrap;
  transition: color .2s ease, transform .18s var(--ease);
}
.workspace-switch button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color .2s ease, transform .24s var(--ease);
}
.workspace-switch button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transform: scaleX(.45);
  transition: opacity .2s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.workspace-switch button:hover { color: var(--text-2); }
.workspace-switch button:active { transform: translateY(1px); }
.workspace-switch button.active { color: var(--text); }
.workspace-switch button.active svg { color: var(--accent); transform: translateY(-1px); }
.workspace-switch button.active::after { opacity: 1; transform: scaleX(1); }
.workspace-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 5px; }
.app-navbar > .nav-actions { grid-column: 2; }

/* ---------- Interview workspace ---------- */
.interviews-view { display: grid; gap: 18px; animation: rise .4s var(--ease) both; }
.interview-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.interview-summary-card {
  padding: 17px 18px; border: 1px solid var(--border); border-radius: 15px;
  background: var(--bg-elev); box-shadow: var(--shadow-sm);
}
.interview-summary-card span { color: var(--text-3); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.interview-summary-card strong { display: block; margin-top: 7px; font-size: 27px; letter-spacing: -.04em; }
.interview-list { display: grid; gap: 12px; }
.interview-card {
  display: grid; grid-template-columns: 68px minmax(0,1fr) auto; gap: 18px; align-items: start;
  padding: 19px; border: 1px solid var(--border); border-radius: 17px;
  background: var(--bg-elev); box-shadow: var(--shadow-sm);
}
.interview-date { display: grid; place-items: center; min-height: 66px; border-radius: 13px; color: #fff; background: linear-gradient(145deg,#28245f,#7568f4); }
.interview-date b { font-size: 22px; line-height: 1; }
.interview-date span { margin-top: 4px; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.interview-main { min-width: 0; }
.interview-main h3 { font-size: 16px; letter-spacing: -.02em; }
.interview-main > p { margin-top: 3px; color: var(--text-2); font-size: 12px; }
.interview-meta { display: flex; flex-wrap: wrap; gap: 6px 13px; margin-top: 12px; color: var(--text-3); font-size: 10.5px; }
.interview-meta span { display: inline-flex; align-items: center; gap: 5px; }
.interview-actions { display: flex; gap: 7px; }
.prep-panel { grid-column: 2 / -1; padding-top: 17px; border-top: 1px solid var(--border); }
.prep-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prep-box { padding: 14px; border-radius: 13px; background: var(--bg-soft); }
.prep-box h4, .prep-questions h4 { margin-bottom: 7px; font-size: 11.5px; }
.prep-box p, .prep-box li, .prep-question p { color: var(--text-2); font-size: 11.5px; line-height: 1.55; }
.prep-box ul { padding-left: 17px; }
.prep-questions { margin-top: 14px; }
.prep-question { padding: 13px 0; border-top: 1px solid var(--border); }
.prep-question strong { display: block; margin-bottom: 6px; font-size: 12px; }
.prep-evidence { display: inline-block; margin-top: 7px; color: var(--accent); font-size: 9.5px; font-weight: 700; }
.interview-empty { padding: 54px 22px; border: 1px dashed var(--border-strong); border-radius: 18px; text-align: center; background: color-mix(in srgb,var(--bg-elev) 72%,transparent); }
.interview-empty h3 { margin: 13px 0 7px; }
.interview-empty p { max-width: 430px; margin: 0 auto 18px; color: var(--text-2); font-size: 12px; line-height: 1.55; }

.dialog-overlay { position: fixed; inset: 0; z-index: 2400; background: rgba(12,13,23,.48); opacity: 0; backdrop-filter: blur(8px); transition: opacity .22s ease; }
.dialog-overlay.show { opacity: 1; }
.interview-dialog {
  position: fixed; z-index: 2410; top: 50%; left: 50%; width: min(650px,calc(100vw - 28px)); max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 21px;
  background: var(--bg-elev); box-shadow: 0 30px 100px rgba(13,15,30,.3); visibility: hidden; opacity: 0;
  transform: translate(-50%,-47%) scale(.98); transition: opacity .22s ease, transform .32s var(--spring), visibility 0s .32s;
}
.interview-dialog.open { visibility: visible; opacity: 1; transform: translate(-50%,-50%) scale(1); transition: opacity .22s ease, transform .32s var(--spring), visibility 0s; }
.interview-dialog > header { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 16px; border-bottom: 1px solid var(--border); }
.interview-dialog h2 { font-size: 21px; letter-spacing: -.03em; }
.dialog-kicker { display: block; margin-bottom: 4px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.interview-dialog form { overflow-y: auto; padding: 20px 22px 22px; }
.interview-dialog form > .field-wide { display: flex; margin-bottom: 14px; }
.interview-dialog footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.cv-nudge { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 15px; padding: 13px 14px; border: 1px solid color-mix(in srgb,var(--accent) 22%,var(--border)); border-radius: 13px; background: var(--accent-soft); }
.cv-nudge span { display: grid; gap: 3px; }
.cv-nudge strong { font-size: 11.5px; }
.cv-nudge small { color: var(--text-2); font-size: 10.5px; }
.form-message { min-height: 17px; margin-top: 10px; color: var(--s-absage); font-size: 11px; }

.cv-upload-card, .settings-cv-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px;
  padding: 16px; border: 1px dashed #c8cbc4; border-radius: 13px; background: #fff; cursor: pointer;
}
.cv-upload-card:hover { border-color: #7775d8; background: #f7f6ff; }
.cv-upload-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: #5d5bd0; background: #efefff; }
.cv-upload-icon svg { width: 19px; }
.cv-upload-card > span:nth-child(2), .settings-cv-card > span:nth-child(2) { display: grid; gap: 3px; }
.cv-upload-card strong, .settings-cv-card strong { font-size: 12px; }
.cv-upload-card small, .settings-cv-card small { color: var(--text-3); font-size: 10.5px; }
.cv-privacy-note { margin-top: 12px !important; font-size: 10.5px !important; }
.settings-cv-card { margin-top: 12px; border-style: solid; background: var(--bg-soft); cursor: default; }

@media (max-width: 900px) {
  .workspace-switch { gap: 22px; }
}
@media (max-width: 850px) {
  .app-navbar { grid-template-columns: 1fr auto; }
  .app-navbar > .nav-actions { grid-column: 2; }
  .workspace-switch {
    gap: 0;
    margin: -2px 0 24px;
  }
  .workspace-switch button { flex: 1; justify-content: center; min-height: 44px; font-size: 11.5px; }
  .interview-overview { grid-template-columns: repeat(3,1fr); }
  .interview-card { grid-template-columns: 54px minmax(0,1fr); gap: 13px; }
  .interview-date { min-height: 56px; }
  .interview-actions { grid-column: 2; flex-wrap: wrap; }
  .prep-panel { grid-column: 1 / -1; }
  .prep-hero { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .interview-overview { grid-template-columns: 1fr; }
  .interview-summary-card { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
  .interview-summary-card strong { margin: 0; font-size: 22px; }
  .interview-dialog { inset: 0; width: 100%; max-height: 100dvh; border: 0; border-radius: 0; transform: translateY(2%); }
  .interview-dialog.open { transform: none; }
  .interview-dialog .field-grid { grid-template-columns: 1fr; }
  .cv-nudge { align-items: stretch; flex-direction: column; }
  .onboarding-steps { grid-template-columns: repeat(5,1fr); }
}

/* ---------- Mobile system hardening ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}
body {
  min-width: 0;
  overflow-x: clip;
  overscroll-behavior-x: none;
}
button,
a,
input,
select,
textarea,
[role="button"],
[role="tab"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
img,
svg,
canvas { max-width: 100%; }

@supports (padding: max(0px)) {
  .app {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(80px, calc(56px + env(safe-area-inset-bottom)));
  }
}

@media (max-width: 700px) {
  /* iOS zooms focused form controls below 16px. Keep natural pinch zoom available. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select,
  textarea,
  .select,
  .select.sm,
  .auth-input input,
  .onboarding-field input,
  .suggestion-actions select {
    font-size: 16px !important;
  }

  .onboarding-shell { min-height: 100dvh; }
  .onboarding-frame { min-height: 100dvh; }

  .app {
    width: 100%;
    max-width: none;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .app-navbar {
    top: max(10px, env(safe-area-inset-top));
    gap: 8px;
  }
  .app-navbar.scrolled {
    top: max(8px, env(safe-area-inset-top));
    padding: 6px 7px;
  }
  .nav-actions { min-width: 0; gap: 6px; }
  .nav-feature,
  .nav-icon,
  .nav-account,
  .nav-brand,
  .icon-btn { min-width: 44px; min-height: 44px; }
  .nav-feature.magic-top-btn,
  .app-navbar.scrolled .nav-feature.magic-top-btn {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }
  .nav-feature.magic-top-btn span { display: none; }
  .nav-feature.inbox-top-btn,
  .app-navbar.scrolled .nav-feature.inbox-top-btn {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }
  .nav-feature.inbox-top-btn > span { display: none; }
  .app-navbar .nav-feature,
  .app-navbar.scrolled .nav-feature,
  .app-navbar .nav-icon,
  .app-navbar.scrolled .nav-icon,
  .app-navbar .nav-account,
  .app-navbar.scrolled .nav-account {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
  }
  .app-navbar .nav-feature svg,
  .app-navbar .nav-icon svg,
  .app-navbar .nav-account svg { width: 18px; height: 18px; }
  .app-navbar .inbox-badge { top: -2px; right: -2px; }

  .dashboard-heading {
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 22px;
  }
  .dashboard-heading > div { min-width: 0; }
  .dashboard-heading h1 {
    font-size: clamp(28px, 9vw, 36px);
    overflow-wrap: anywhere;
  }
  .dashboard-add { flex: none; min-width: 46px; min-height: 46px; }

  .workspace-switch {
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .workspace-switch::-webkit-scrollbar { display: none; }
  .workspace-switch button {
    flex: 1 0 auto;
    min-width: 104px;
    min-height: 48px;
    font-size: 12px;
  }

  .stats { gap: 9px; }
  .stat { min-width: 0; padding: 14px; }
  .stat-value { font-size: 25px; }
  .distribution { margin-bottom: 12px; }

  .ai-brief-head { align-items: flex-start; gap: 10px; }
  .ai-carousel-viewport { min-height: 130px; }
  .ai-brief-item {
    grid-template-columns: 32px minmax(0,1fr);
    gap: 8px 11px;
    align-content: center;
  }
  .ai-task-check,
  .ai-task-check-placeholder { grid-column: 1; grid-row: 1; width: 40px; height: 40px; }
  .ai-brief-icon { display: none; }
  .ai-brief-item > div { grid-column: 2; }
  .ai-brief-item > button[data-ai-action] {
    grid-column: 2;
    min-height: 40px;
    align-items: center;
  }
  .ai-carousel-dots { gap: 0; }
  .ai-carousel-dots button,
  .ai-carousel-dots button.active {
    position: relative;
    width: 28px;
    height: 28px;
    background: transparent;
  }
  .ai-carousel-dots button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--text-3) 35%, transparent);
    transform: translate(-50%, -50%);
    transition: width .25s ease, background .25s ease;
  }
  .ai-carousel-dots button.active::after { width: 17px; background: var(--accent); }

  .toolbar { align-items: stretch; gap: 9px; }
  .search { flex: 1 1 100%; }
  .search input { height: 48px; padding-right: 14px; }
  .search kbd { display: none; }
  .filters {
    order: 2;
    margin-inline: -16px;
    max-width: calc(100% + 32px);
    padding: 2px 16px 5px;
    scroll-padding-inline: 16px;
  }
  .chip { min-height: 38px; }
  .layout-switch { order: 3; height: 46px; }
  .layout-switch button { width: 38px; height: 38px; }
  .toolbar #sort {
    order: 3;
    flex: 1 1 150px;
    width: auto;
    height: 46px;
  }

  .month-grid { grid-template-columns: 1fr !important; }
  .month { min-width: 0; }
  .month-head-row { position: relative; align-items: stretch; }
  .month-head {
    grid-template-columns: auto minmax(0,1fr);
    gap: 11px;
    min-height: 92px;
    padding: 14px 88px 14px 14px;
  }
  .month-count { grid-column: 2; justify-self: start; text-align: left; }
  .month-bar { grid-column: 2; width: min(150px,100%); }
  .month-actions {
    position: absolute;
    top: 50%;
    right: 11px;
    margin: 0;
    transform: translateY(-50%);
  }
  .month-action { width: 42px; height: 42px; }
  .card { min-width: 0; }
  .card-main,
  .card-title { min-width: 0; }
  .card-title { align-items: flex-start; flex-direction: column; gap: 2px; }
  .card-title strong,
  .card-role { max-width: 100%; }

  .drawer-head,
  .drawer-foot,
  .settings-head,
  .inbound-head,
  .inbound-foot,
  .share-preview-head,
  .share-preview-foot,
  .import-head,
  .import-foot,
  .interview-dialog > header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .drawer-head { padding-top: max(12px, env(safe-area-inset-top)); }
  .drawer-body {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(26px, calc(18px + env(safe-area-inset-bottom)));
  }
  .drawer-foot {
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .drawer-foot .btn { min-height: 44px; }
  .drawer-foot .spacer { display: none; }
  .drawer-foot .danger-ghost { margin-right: auto; }
  .drawer-body > .block:not(.followup-block) { padding: 15px; }
  .magic-import-row {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    align-items: stretch;
  }
  .magic-import-row input { grid-column: 1 / -1; width: 100%; height: 48px; }
  .magic-import-row #runMagicImportBtn { grid-column: auto; }
  .magic-import-row .btn { flex: 1; min-height: 44px; }
  .email-composer { padding: 13px; }
  .email-composer-head { align-items: flex-start; flex-wrap: wrap; }
  .email-language-picker { margin-left: 42px; }
  .email-template-tabs {
    margin-inline: -3px;
    padding: 3px 3px 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .email-template-tabs::-webkit-scrollbar { display: none; }
  .email-template-tab { flex: 0 0 auto; min-height: 38px; }
  .email-composer-actions { align-items: stretch; }
  .email-composer-actions .btn { flex: 1 1 calc(50% - 5px); min-height: 44px; height: auto; }
  .email-composer-actions .email-sent-btn { flex-basis: 100%; margin: 0; }
  .add-row { align-items: stretch; flex-wrap: wrap; }
  .add-row input { flex: 1 1 100%; order: -1; height: 48px; }
  .add-row .select { flex: 1 1 140px; height: 44px; }
  .add-row .btn { min-height: 44px; }

  .settings-panel { height: 100dvh; }
  .settings-head { padding-top: max(18px, env(safe-area-inset-top)); }
  .settings-body {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(34px, calc(24px + env(safe-area-inset-bottom)));
  }
  .settings-action-list button,
  .settings-signout,
  .danger-row { min-height: 64px; }
  .settings-cv-card { grid-template-columns: auto minmax(0,1fr); }
  .settings-cv-card .btn { grid-column: 1 / -1; min-height: 44px; }
  .delete-account-confirm > div { align-items: stretch; flex-direction: column; }
  .delete-account-confirm input,
  .delete-account-confirm .btn { width: 100%; min-height: 46px; }

  .inbound-dialog,
  .share-preview,
  .import-dialog {
    max-height: 100dvh;
    border-radius: 20px 20px 0 0;
  }
  .inbound-body,
  .import-body {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .inbound-address-row .btn,
  .inbound-alias-actions .btn,
  .suggestion-actions .btn { min-height: 44px; }
  .inbound-alias-control { flex-wrap: wrap; overflow: visible; }
  .inbound-alias-control input { flex: 1 1 140px; height: 48px; }
  .inbound-alias-control span {
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .inbound-foot,
  .share-preview-foot,
  .import-foot {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .interview-card { padding: 15px; }
  .interview-actions { grid-column: 1 / -1; }
  .interview-actions .btn { flex: 1; min-height: 44px; }
  .interview-dialog { height: 100dvh; }
  .interview-dialog form {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(24px, calc(16px + env(safe-area-inset-bottom)));
  }
  .interview-dialog footer { position: sticky; bottom: 0; padding-top: 10px; background: var(--bg-elev); }
  .interview-dialog footer .btn { flex: 1; min-height: 44px; }

  .toasts {
    left: 12px;
    right: 12px;
    bottom: max(14px, env(safe-area-inset-bottom));
    transform: none;
  }
  .toast { width: fit-content; max-width: 100%; }
}

@media (max-width: 520px) {
  .onboarding-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f8f8f5;
  }
  .onboarding-frame {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .onboarding-header {
    height: 60px;
    min-height: 60px;
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
    padding-top: env(safe-area-inset-top);
    background: #fff;
  }
  .onboarding-brand .brand-icon { width: 29px; height: 29px; }
  .onboarding-brand .brand-wordmark { height: 17px; }
  .onboarding-skip { min-height: 40px; padding-inline: 8px; }
  .onboarding-layout { flex: 1; display: flex; flex-direction: column; }
  .onboarding-aside {
    flex: 0 0 auto;
    padding: 12px max(20px, env(safe-area-inset-left));
  }
  .onboarding-aside::after,
  .onboarding-aside .onboarding-eyebrow,
  .onboarding-aside h1,
  .onboarding-aside > p { display: none; }
  .onboarding-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0;
  }
  .onboarding-steps li { min-height: 34px; justify-content: center; }
  .onboarding-steps li span { display: none; }
  .onboarding-steps i { width: 30px; height: 30px; }
  .onboarding-card {
    flex: 1;
    align-items: flex-start;
    padding: 22px max(20px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-bottom));
  }
  .onboarding-card form {
    min-height: calc(100dvh - 128px - env(safe-area-inset-top));
    display: flex;
    flex-direction: column;
  }
  .onboarding-panel { min-height: 0; flex: 1; }
  .onboarding-panel h2 { margin-top: 7px; font-size: clamp(27px, 8vw, 31px); }
  .onboarding-panel > p { margin: 9px 0 20px; }
  .onboarding-field { margin-top: 13px; }
  .onboarding-options button,
  .onboarding-presets button { min-height: 44px; }
  .cv-upload-card { grid-template-columns: 40px minmax(0, 1fr); padding: 13px; }
  .cv-upload-card > span:nth-child(2) { min-width: 0; }
  .cv-upload-card strong,
  .cv-upload-card small { overflow-wrap: anywhere; }
  .onboarding-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    flex: 0 0 auto;
    margin: auto -4px 0;
    padding: 12px 4px max(6px, env(safe-area-inset-bottom));
    background: #f8f8f5;
  }
  .onboarding-back,
  .onboarding-next { min-height: 48px; }
  .onboarding-back { min-width: 96px; }
  .onboarding-next { flex: 1; }
  .onboarding-message { flex: 0 0 auto; }
  .onboarding-consent { flex: 0 0 auto; }

  .drawer-foot { flex-wrap: wrap; }
  .drawer-foot .danger-ghost { order: 2; width: 100%; margin: 0; }
  .drawer-foot [data-close],
  .drawer-foot .primary { flex: 1; }
  .share-preview-foot .btn { min-height: 46px; }
}

@media (max-width: 520px) and (max-height: 700px) {
  .onboarding-card { padding-top: 16px; }
  .onboarding-panel h2 { font-size: 26px; }
  .onboarding-panel > p { margin-bottom: 14px; }
  .onboarding-options { gap: 6px; }
  .onboarding-options button { padding-block: 8px; }
}

@media (max-width: 360px) {
  .app { padding-inline: 12px; }
  .nav-actions { gap: 3px; }
  .nav-feature,
  .nav-icon,
  .nav-account { min-width: 42px; width: 42px; }
  .filters {
    margin-inline: -12px;
    max-width: calc(100% + 24px);
    padding-inline: 12px;
  }
  .workspace-switch button { min-width: 96px; gap: 6px; }
  .stat { padding: 12px; }
  .month-head { padding-right: 82px; }
  .month-actions { right: 8px; gap: 4px; }
  .month-action { width: 38px; height: 38px; }
}

/* ---------- iPhone polish: stable drawer + calm month tiles ---------- */
@media (max-width: 700px) {
  .drawer,
  .drawer form,
  .drawer-body,
  .drawer-body > *,
  .drawer-body .field-grid,
  .drawer-body .field,
  .drawer-body .block,
  .drawer-body .magic-import,
  .drawer-body .followup-block,
  .drawer-body .email-composer {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .drawer-body {
    width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
  }
  .drawer-body > .field-grid,
  .drawer-body > .block,
  .drawer-body > .magic-import,
  .drawer-body > .followup-block { width: 100%; }
  .drawer-body input,
  .drawer-body textarea,
  .drawer-body select {
    display: block;
    inline-size: 100%;
    width: 100%;
    min-inline-size: 0;
    min-width: 0;
    max-inline-size: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .drawer-body input[type="date"],
  .drawer-body input[type="datetime-local"],
  .drawer-body input[type="time"],
  .drawer-body input[type="month"] {
    -webkit-appearance: none;
    appearance: none;
    inline-size: 100% !important;
    width: 100% !important;
    -webkit-min-logical-width: 0;
    min-inline-size: 0;
    max-inline-size: 100% !important;
    max-width: 100% !important;
    height: 48px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 48px;
    overflow: hidden;
    text-align: center;
  }
  .drawer-body input[type="date"]::-webkit-date-and-time-value,
  .drawer-body input[type="datetime-local"]::-webkit-date-and-time-value,
  .drawer-body input[type="time"]::-webkit-date-and-time-value,
  .drawer-body input[type="month"]::-webkit-date-and-time-value {
    width: 100%;
    min-width: 0;
    margin: 0;
    line-height: 48px;
    text-align: center;
  }
  .drawer-body input[type="date"]::-webkit-datetime-edit,
  .drawer-body input[type="datetime-local"]::-webkit-datetime-edit,
  .drawer-body input[type="time"]::-webkit-datetime-edit,
  .drawer-body input[type="month"]::-webkit-datetime-edit {
    min-width: 0;
    overflow: hidden;
  }
  .drawer-body .field-grid > *,
  .drawer-body .field-wide,
  .drawer-body .followup-content,
  .drawer-body .followup-content-inner,
  .drawer-body .followup-controls,
  .drawer-body .add-row,
  .drawer-body .email-composer-preview {
    min-width: 0;
    max-width: 100%;
  }
  .drawer-body .followup-content-inner { width: 100%; }
  .drawer-body .field { overflow: hidden; }
  .email-template-tabs {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
    overscroll-behavior-x: contain;
  }

  .drawer-foot {
    flex-wrap: nowrap;
    gap: 8px;
    padding-top: 10px;
    background: color-mix(in srgb, var(--bg-elev) 97%, transparent);
    box-shadow: 0 -10px 28px rgba(15,23,42,.06);
  }
  .drawer-foot #deleteBtn {
    order: 0;
    width: 44px;
    min-width: 44px;
    padding: 0;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--s-absage) 18%, var(--border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--s-absage) 6%, var(--bg-elev));
  }
  .drawer-foot #deleteBtn svg { width: 18px; height: 18px; }
  .drawer-foot #deleteBtn span { display: none; }
  .drawer-foot [data-close],
  .drawer-foot .primary {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .drawer-body > .magic-import {
    height: auto;
    min-height: 204px;
    padding: 16px 16px 20px;
  }
  .magic-import-row {
    grid-template-columns: minmax(0,.9fr) minmax(0,1.2fr);
  }
  .magic-import-row #pasteJobUrlBtn,
  .magic-import-row #runMagicImportBtn {
    width: 100%;
    min-width: 0;
    padding-inline: 9px;
  }
  .magic-import-row #runMagicImportBtn { font-size: 12.5px; }
  .magic-import-status:empty {
    min-height: 0;
    margin-top: 0;
  }

  .drawer-body > .followup-block {
    min-height: 72px;
    border-color: var(--border);
    background: var(--bg-elev);
    box-shadow: 0 4px 16px rgba(15,23,42,.045);
  }
  .followup-toggle {
    min-height: 70px;
    display: grid;
    grid-template-columns: minmax(0,1fr) 42px;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 14px 12px 16px;
  }
  .followup-toggle > span:first-child {
    min-width: 0;
    align-self: center;
    justify-content: center;
    gap: 3px;
  }
  .followup-toggle strong {
    font-size: 14px;
    line-height: 1.25;
  }
  .followup-toggle small {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .followup-toggle-icon {
    width: 42px;
    height: 42px;
    align-self: center;
    justify-self: end;
    border-radius: 12px;
  }

  .list.months-grid { gap: 10px; }
  .months-grid .month:not(.open) .month-head-row { min-height: 168px; }
  .months-grid .month:not(.open) .month-head {
    min-height: 168px;
    padding: 15px 15px 58px;
    gap: 11px;
  }
  .months-grid .month:not(.open) .month-info h3 {
    margin-top: 1px;
    font-size: 16px;
  }
  .months-grid .month:not(.open) .month-stats {
    gap: 4px 10px;
    margin-top: 6px;
    font-size: 11.5px;
  }
  .months-grid .month:not(.open) .month-bar {
    width: 100%;
    max-width: none;
    margin-top: 10px;
  }
  .months-grid .month:not(.open) .month-count {
    top: auto;
    left: 15px;
    bottom: 15px;
  }
  .months-grid .month:not(.open) .month-count b { font-size: 24px; }
  .months-grid .month:not(.open) .month-actions {
    top: auto;
    right: 15px;
    bottom: 13px;
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 3px;
    border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-soft) 86%, var(--bg-elev));
    box-shadow: inset 0 1px rgba(255,255,255,.75);
    transform: none;
  }
  .months-grid .month:not(.open) .month-action {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
  }
  .months-grid .month:not(.open) .month-action.share {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 78%, transparent);
  }
  .months-grid .month:not(.open) .month-action:not(.share) {
    color: var(--text-3);
  }
  .months-grid .month:not(.open) .month-action + .month-action {
    margin-left: 2px;
  }
  .months-grid .month:not(.open) .month-action svg {
    width: 16px;
    height: 16px;
  }
  .months-grid .month:not(.open) .chev { display: none; }
}

@media (max-width: 360px) {
  .drawer-foot { gap: 6px; padding-inline: 10px; }
  .drawer-foot #deleteBtn { width: 42px; min-width: 42px; }
  .months-grid .month:not(.open) .month-head {
    padding-inline: 13px;
  }
  .months-grid .month:not(.open) .month-count { left: 13px; }
  .months-grid .month:not(.open) .month-actions { right: 13px; }
}

/* ---------- Datenschutz & KI ---------- */
.settings-consent-list { display: grid; gap: 8px; }
.settings-consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; align-items: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-soft); cursor: pointer; }
.settings-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.settings-consent > span { display: grid; gap: 3px; }
.settings-consent strong { font-size: 12px; }
.settings-consent small { color: var(--text-3); font-size: 10.5px; line-height: 1.45; }
.settings-consent-message { min-height: 1.2em; color: var(--text-3); font-size: 10.5px; }
.field-help { display: block; margin-top: 4px; color: var(--text-3); font-size: 9.5px; font-weight: 500; }
.status-card-icon { color: #5b55d6; background: linear-gradient(135deg, rgba(91,85,214,.14), rgba(167,240,107,.2)); }
.settings-panel { width: min(640px, 100vw); background: color-mix(in srgb, var(--bg-elev) 96%, #eef0ff); }
.settings-body { scroll-behavior: smooth; }
.settings-jump-nav {
  position: sticky;
  z-index: 5;
  top: -4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0 18px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  box-shadow: 0 10px 30px rgba(15,23,42,.07);
  backdrop-filter: blur(18px) saturate(145%);
}
.settings-jump-nav button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  color: var(--text-2);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  transition: color .18s, background .18s, transform .18s;
}
.settings-jump-nav button:hover { color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.settings-jump-nav svg,
.settings-section-icon svg,
.settings-status-export-card svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-card-section {
  scroll-margin-top: 70px;
  margin: 0 0 14px;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--bg-elev);
  box-shadow: 0 12px 34px rgba(15,23,42,.055);
}
.settings-card-section + .settings-card-section { border-top: 1px solid var(--border); }
.settings-title-with-icon { align-items: center; justify-content: flex-start; margin-bottom: 17px; }
.settings-title-with-icon > span:last-child,
.settings-subcard-head > span:last-child { display: grid; gap: 2px; }
.settings-title-with-icon strong,
.settings-subcard-head strong { color: var(--text); font-size: 13px; }
.settings-title-with-icon small,
.settings-subcard-head small { color: var(--text-3); font-size: 10.5px; font-weight: 500; }
.settings-section-icon {
  width: 36px;
  height: 36px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 11px;
  color: #5b55d6;
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.09));
}
.settings-section-icon.data { color: #0369a1; background: linear-gradient(135deg, rgba(56,189,248,.18), rgba(99,102,241,.1)); }
.settings-section-icon.privacy { color: #15803d; background: linear-gradient(135deg, rgba(34,197,94,.16), rgba(167,240,107,.16)); }
.settings-section-icon.security { color: #7c3aed; background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(236,72,153,.1)); }
.settings-card-section .settings-form { padding: 0; }
.settings-security-card {
  margin-top: 17px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--bg-soft);
}
.settings-subcard-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.settings-security-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: 9px;
}
.settings-security-form .btn { min-height: 42px; }
.settings-inline-message { grid-column: 1 / -1; min-height: 15px; color: var(--text-3); font-size: 10.5px; line-height: 1.4; }
.settings-security-divider { height: 1px; margin: 13px 0; background: var(--border); }
.settings-security-form.password { display: block; }
.settings-security-form.password .field-grid { gap: 9px; }
.settings-security-form.password > .btn { margin-top: 10px; }
.settings-password-feedback { display: grid; gap: 6px; margin-top: 10px; }
.settings-password-feedback small { color: var(--text-3); font-size: 10px; line-height: 1.4; }
.settings-password-meter { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; }
.settings-password-meter i { height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--text-3) 20%, transparent); transition: background .2s; }
.settings-password-meter[data-score="1"] i:nth-child(-n+1) { background: #ef4444; }
.settings-password-meter[data-score="2"] i:nth-child(-n+2) { background: #f59e0b; }
.settings-password-meter[data-score="3"] i:nth-child(-n+3) { background: #84cc16; }
.settings-password-meter[data-score="4"] i:nth-child(-n+4) { background: #22c55e; }
.settings-status-export-card {
  position: relative;
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(99,102,241,.23);
  border-radius: 17px;
  color: #fff;
  text-align: left;
  background: radial-gradient(circle at 88% 12%, rgba(167,240,107,.3), transparent 30%), linear-gradient(135deg,#302d78,#5b55d6 55%,#7657c8);
  box-shadow: 0 16px 34px rgba(69,63,172,.2);
  transition: transform .2s, box-shadow .2s;
}
.settings-status-export-card:hover { transform: translateY(-2px); box-shadow: 0 21px 44px rgba(69,63,172,.28); }
.settings-status-export-card > span:nth-child(2) { display: grid; gap: 3px; }
.settings-status-export-card small { color: #c9ff98; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.settings-status-export-card strong { font-size: 15px; }
.settings-status-export-card em { color: rgba(255,255,255,.68); font-size: 10.5px; font-style: normal; line-height: 1.4; }
.settings-status-export-card b { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border-radius: 99px; color: #25224f; background: #c9ff98; font-size: 10px; }
.settings-status-export-card b svg { width: 14px; height: 14px; }
.status-export-art { width: 47px; height: 47px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.13); }
.status-export-art svg { width: 25px; height: 25px; }
.settings-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.settings-action-grid button { min-height: 72px; padding: 10px; border: 1px solid var(--border); border-radius: 13px; background: var(--bg-soft); }
.settings-action-grid button:last-child { border-bottom: 1px solid var(--border); }
.settings-action-grid button:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--accent-soft); }
.settings-action-grid small { line-height: 1.3; }
.settings-card-section .settings-consent { background: color-mix(in srgb, var(--bg-soft) 72%, var(--bg-elev)); }
.settings-session-section { margin: 4px 0 12px; padding: 18px 4px; }
.stat-export {
  position: absolute;
  z-index: 2;
  top: 11px;
  right: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 9px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--bg-elev));
  font-size: 9.5px;
  font-weight: 800;
  transition: transform .18s, background .18s;
}
.stat-export:hover { transform: translateY(-1px); background: var(--accent-soft); }
.stat-export svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) {
  .settings-panel { width: 100%; }
  .settings-card-section { padding: 15px; border-radius: 16px; }
  .settings-jump-nav { top: -2px; }
  .settings-jump-nav button { min-height: 40px; }
  .settings-security-form { grid-template-columns: 1fr; align-items: stretch; }
  .settings-security-form .btn { width: 100%; }
  .settings-action-grid { grid-template-columns: 1fr; }
  .settings-status-export-card { grid-template-columns: auto minmax(0,1fr); min-height: 122px; padding: 15px; }
  .settings-status-export-card > b { grid-column: 2; width: max-content; }
}
.settings-legal { display: flex; gap: 8px; margin: 6px 2px 0; color: var(--text-3); font-size: 11px; }
.settings-legal a, .delete-account-confirm a { color: var(--accent); font-weight: 650; text-decoration: none; }
.settings-legal a:hover, .delete-account-confirm a:hover { text-decoration: underline; }
.onboarding-consent { margin: 14px 0 0; }

/* Optional analytics consent: shown only while no choice exists. */
.analytics-consent {
  position: fixed;
  z-index: 1400;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(18px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  box-sizing: border-box;
  width: auto;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  color: #fff;
  background: rgba(24,25,25,.97);
  box-shadow: 0 22px 70px rgba(15,16,15,.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: analytics-consent-in .35s cubic-bezier(.22,1,.36,1) both;
}
.analytics-consent[hidden] { display: none; }
.analytics-consent-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #b6f477;
  background: rgba(166,240,107,.12);
}
.analytics-consent-icon svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.analytics-consent-copy { display: grid; min-width: 0; gap: 4px; }
.analytics-consent-copy strong { font-size: 14px; letter-spacing: -.01em; }
.analytics-consent-copy p { margin: 0; color: rgba(255,255,255,.68); font-size: 11.5px; line-height: 1.5; }
.analytics-consent-copy a { width: max-content; color: #b6f477; font-size: 10.5px; font-weight: 700; text-decoration: none; }
.analytics-consent-copy a:hover { text-decoration: underline; }
.analytics-consent-actions { display: flex; gap: 8px; }
.analytics-consent-actions .btn { min-height: 42px; padding: 0 16px; white-space: nowrap; }
.analytics-consent-actions .ghost { border-color: rgba(255,255,255,.2); color: #fff; background: rgba(255,255,255,.04); }
.analytics-consent-actions .primary { color: #171817; background: #b6f477; box-shadow: none; }
@keyframes analytics-consent-in { from { opacity: 0; transform: translateY(18px) scale(.985); } }

@media (max-width: 760px) {
  .analytics-consent {
    right: 12px;
    left: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    width: calc(100vw - 24px);
    max-width: none;
    padding: 14px;
    border-radius: 20px;
  }
  .analytics-consent-icon { width: 38px; height: 38px; border-radius: 12px; }
  .analytics-consent-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .analytics-consent-actions .btn { min-width: 0; width: 100%; padding-inline: 8px; white-space: normal; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent { animation: none; }
}

/* ---------- Premium onboarding interaction ---------- */
body.onboarding-open { overflow: auto; overscroll-behavior: auto; }
.onboarding-progress-track {
  position: relative;
  z-index: 1;
  height: 4px;
  margin-top: 32px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.11);
}
.onboarding-progress-track span {
  display: block;
  width: var(--onboarding-progress, 25%);
  height: 100%;
  border-radius: inherit;
  background: #a7f06b;
  box-shadow: 0 0 18px rgba(167,240,107,.42);
  transition: width .42s cubic-bezier(.22,1,.36,1);
}
.onboarding-shell[data-direction="forward"] .onboarding-panel.active { animation: onboarding-forward-in .38s cubic-bezier(.22,1,.36,1) both; }
.onboarding-shell[data-direction="back"] .onboarding-panel.active { animation: onboarding-back-in .38s cubic-bezier(.22,1,.36,1) both; }
@keyframes onboarding-forward-in { from { opacity: 0; transform: translateX(20px) scale(.985); } }
@keyframes onboarding-back-in { from { opacity: 0; transform: translateX(-20px) scale(.985); } }
.onboarding-field input {
  border-radius: 15px;
  box-shadow: 0 1px 0 rgba(20,22,20,.02), 0 8px 24px rgba(20,22,20,.035);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.onboarding-field input:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(95,93,208,.11), 0 14px 34px rgba(20,22,20,.08);
}
.onboarding-options button {
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(20,22,20,.025);
  transition: border-color .2s, background .2s, box-shadow .2s, transform .16s;
}
.onboarding-options button:active { transform: scale(.985); }
.onboarding-options button.selected {
  box-shadow: 0 0 0 3px rgba(95,93,208,.09), 0 12px 28px rgba(69,66,178,.08);
}
.onboarding-goal {
  border-radius: 22px;
  box-shadow: 0 16px 44px rgba(20,22,20,.055);
}
.onboarding-goal output.value-pop strong { animation: onboarding-value-pop .22s ease-out; }
@keyframes onboarding-value-pop { 50% { transform: scale(1.09); color: #6563d2; } }
.onboarding-goal output strong { display: inline-block; transform-origin: left bottom; }
.onboarding-goal input[type="range"] {
  --goal-progress: 18.37%;
  width: 100%;
  height: 10px;
  margin: 8px 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background: linear-gradient(90deg, #6664d3 0 var(--goal-progress), #e2e3df var(--goal-progress) 100%);
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.onboarding-goal input[type="range"]::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  appearance: none;
  -webkit-appearance: none;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #6664d3;
  box-shadow: 0 3px 12px rgba(54,51,151,.34);
  transition: transform .15s, box-shadow .15s;
}
.onboarding-goal input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #6664d3;
  box-shadow: 0 3px 12px rgba(54,51,151,.34);
}
.onboarding-goal input[type="range"].dragging::-webkit-slider-thumb {
  transform: scale(1.14);
  box-shadow: 0 5px 18px rgba(54,51,151,.45);
}
.onboarding-presets button { border-radius: 12px; transition: .18s ease; }
.onboarding-presets button:active { transform: scale(.95); }
.onboarding-next { transition: transform .18s, background .18s, box-shadow .18s; }
.onboarding-next:active { transform: scale(.98); }

@media (max-width: 700px) {
  body.keyboard-open .onboarding-shell {
    height: 100dvh;
  }
  body.onboarding-open {
    position: static;
    width: 100%;
    height: auto;
  }
  .onboarding-shell {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    padding: 0;
    background: #f7f7f4;
    overscroll-behavior: none;
  }
  .onboarding-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .onboarding-header {
    flex: 0 0 auto;
    height: calc(58px + env(safe-area-inset-top));
    min-height: calc(58px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
    border-bottom-color: rgba(20,22,20,.07);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(18px) saturate(1.25);
  }
  .onboarding-layout { min-height: 0; flex: 1; display: flex; flex-direction: column; }
  .onboarding-aside {
    flex: 0 0 auto;
    padding: 10px 22px 12px;
    background: #181a18;
  }
  .onboarding-aside::after,
  .onboarding-aside .onboarding-eyebrow,
  .onboarding-aside h1,
  .onboarding-aside > p,
  .onboarding-private { display: none; }
  .onboarding-progress-track { height: 3px; margin: 0 0 9px; }
  .onboarding-steps { grid-template-columns: repeat(5,1fr); gap: 8px; margin: 0; }
  .onboarding-steps li { min-height: 30px; justify-content: center; }
  .onboarding-steps li span { display: none; }
  .onboarding-steps i { width: 28px; height: 28px; }
  .onboarding-card {
    min-height: 0;
    flex: 1;
    align-items: stretch;
    overflow: hidden;
    padding: 0 max(18px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    background: #f7f7f4;
  }
  .onboarding-card form {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
  }
  .onboarding-panel {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 22px 2px 20px;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .onboarding-panel::-webkit-scrollbar { display: none; }
  .onboarding-panel h2 { margin-top: 7px; font-size: clamp(28px, 8.5vw, 35px); line-height: 1.02; }
  .onboarding-panel > p { margin: 10px 0 21px; font-size: 13px; line-height: 1.5; }
  .onboarding-field { margin-top: 14px; gap: 7px; }
  .onboarding-field input { height: 56px; padding-inline: 16px; }
  .onboarding-options { gap: 9px; }
  .onboarding-options button { min-height: 58px; padding: 11px 14px; }
  .onboarding-goal { padding: 25px 20px 22px; }
  .onboarding-goal output { margin-bottom: 24px; }
  .onboarding-goal output strong { font-size: 52px; }
  .onboarding-goal input[type="range"] { height: 11px; margin-block: 12px; }
  .onboarding-presets { gap: 7px; }
  .onboarding-presets button { min-height: 44px; }
  .onboarding-message { flex: 0 0 auto; margin: 0 2px; }
  .onboarding-consent { flex: 0 0 auto; margin-top: 8px; }
  .onboarding-actions {
    position: static;
    flex: 0 0 auto;
    min-height: 68px;
    margin: 0;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(20,22,20,.07);
    background: #f7f7f4;
  }
  .onboarding-back,
  .onboarding-next { height: 52px; min-height: 52px; border-radius: 16px; }
  .onboarding-back { min-width: 100px; }
  .onboarding-next { flex: 1; box-shadow: 0 12px 26px rgba(20,22,20,.16); }
  .cv-upload-card { border-radius: 18px; padding: 16px; }
}

@media (max-width: 370px), (max-height: 680px) and (max-width: 700px) {
  .onboarding-aside { padding-block: 7px 8px; }
  .onboarding-progress-track { margin-bottom: 5px; }
  .onboarding-steps li { min-height: 26px; }
  .onboarding-steps i { width: 25px; height: 25px; }
  .onboarding-panel { padding-top: 15px; }
  .onboarding-panel h2 { font-size: 27px; }
  .onboarding-panel > p { margin-bottom: 14px; }
  .onboarding-options { gap: 6px; }
  .onboarding-options button { min-height: 50px; padding-block: 8px; }
  .onboarding-actions { min-height: 60px; }
  .onboarding-back,
  .onboarding-next { height: 48px; min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-progress-track span,
  .onboarding-panel,
  .onboarding-goal output strong { animation: none !important; transition: none !important; }
}

/* ---------- Calm onboarding chrome ---------- */
.onboarding-header {
  height: 62px;
  padding-inline: 24px;
  border-bottom-color: rgba(20,22,20,.06);
}
.onboarding-brand .brand-icon { width: 29px; height: 29px; }
.onboarding-brand .brand-wordmark { height: 17px; }
.onboarding-skip {
  color: #858a82;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .01em;
}
.onboarding-skip:hover,
.onboarding-skip:focus-visible { color: #292c29; background: rgba(20,22,20,.045); }
.onboarding-header-actions { display: flex; align-items: center; gap: 4px; }
.onboarding-header-actions > span { width: 1px; height: 15px; margin-inline: 3px; background: #dedfda; }
.onboarding-signout {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #858a82;
  font-size: 11px;
  font-weight: 650;
}
.onboarding-signout svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.onboarding-signout:hover,
.onboarding-signout:focus-visible { color: #292c29; background: rgba(20,22,20,.045); }
.onboarding-signout:disabled { cursor: wait; opacity: .5; }

@media (max-width: 700px) {
  .onboarding-header {
    height: calc(48px + env(safe-area-inset-top));
    min-height: calc(48px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
    border-bottom: 0;
    background: #f7f7f4;
    backdrop-filter: none;
  }
  .onboarding-brand .brand-icon { width: 25px; height: 25px; }
  .onboarding-brand .brand-wordmark { display: none; }
  .onboarding-skip { min-height: 40px; padding: 0 4px; font-size: 11px; }
  .onboarding-header-actions { gap: 2px; }
  .onboarding-header-actions > span { margin-inline: 2px; }
  .onboarding-signout { min-height: 40px; padding-inline: 4px; }
  .onboarding-aside {
    padding: 3px 22px 9px;
    border-bottom: 1px solid rgba(20,22,20,.055);
    background: #f7f7f4;
  }
  .onboarding-progress-track {
    height: 2px;
    margin: 0 0 9px;
    background: #e2e3df;
  }
  .onboarding-progress-track span { background: #7775d8; box-shadow: none; }
  .onboarding-steps { gap: 12px; }
  .onboarding-steps li { min-height: 25px; color: #a8aca5; }
  .onboarding-steps i {
    width: 23px;
    height: 23px;
    border-color: #dcddd8;
    background: transparent;
    color: #949990;
    font-size: 9px;
  }
  .onboarding-steps li.active { color: #292c29; }
  .onboarding-steps li.active i {
    border-color: #7775d8;
    background: #7775d8;
    color: #fff;
  }
  .onboarding-steps li.done i { border-color: #b9b8e7; color: #6563c7; }
  .onboarding-panel { padding-top: 19px; }
}

@media (max-width: 370px), (max-height: 680px) and (max-width: 700px) {
  .onboarding-aside { padding-block: 2px 7px; }
  .onboarding-steps li { min-height: 23px; }
  .onboarding-steps i { width: 22px; height: 22px; }
  .onboarding-panel { padding-top: 14px; }
}

/* ---------- Dense, modern onboarding controls ---------- */
.onboarding-panel > p { margin-bottom: 22px; }
.onboarding-goal {
  padding: 20px 20px 17px;
  border-color: #dedfd9;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(20,22,20,.045);
}
.onboarding-goal output { align-items: center; margin-bottom: 17px; }
.onboarding-goal output strong {
  min-width: 54px;
  padding: 7px 11px;
  border-radius: 13px;
  background: #eeedff;
  color: #5755c7;
  font-size: 34px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(99,97,206,.08);
}
.onboarding-goal output span { font-size: 11px; font-weight: 650; }
.onboarding-goal input[type="range"] {
  height: 6px;
  margin: 9px 0;
  background: linear-gradient(90deg, #6664d3 0 var(--goal-progress), #e7e8e4 var(--goal-progress) 100%);
}
.onboarding-goal input[type="range"]::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  border: 4px solid #fff;
  background: #6664d3;
  box-shadow: 0 2px 8px rgba(54,51,151,.3), 0 0 0 1px rgba(54,51,151,.08);
}
.onboarding-goal input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 4px solid #fff;
  background: #6664d3;
  box-shadow: 0 2px 8px rgba(54,51,151,.3), 0 0 0 1px rgba(54,51,151,.08);
}
.onboarding-presets { gap: 7px; margin-top: 9px; }
.onboarding-presets button { height: 36px; border-radius: 11px; }

@media (max-width: 700px) {
  .onboarding-card,
  .onboarding-actions { background: #fbfbf9; }
  .onboarding-card { padding-inline: max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-left)); }
  .onboarding-panel { padding: 15px 2px 10px; }
  .onboarding-panel h2 { margin-top: 5px; font-size: clamp(27px, 7.8vw, 32px); line-height: 1.04; }
  .onboarding-panel > p { margin: 7px 0 15px; font-size: 12px; line-height: 1.45; }
  .onboarding-field { margin-top: 10px; gap: 6px; }
  .onboarding-field input { height: 52px; }
  .onboarding-options { gap: 7px; }
  .onboarding-options button { min-height: 52px; padding: 9px 13px; }
  .onboarding-goal { padding: 17px 17px 15px; }
  .onboarding-goal output { margin-bottom: 14px; }
  .onboarding-goal output strong { min-width: 50px; padding: 6px 10px; font-size: 31px; }
  .onboarding-goal input[type="range"] { height: 6px; margin-block: 8px; }
  .onboarding-presets button { min-height: 39px; height: 39px; }
  .onboarding-actions { min-height: 60px; padding-top: 6px; }
  .onboarding-back,
  .onboarding-next { height: 48px; min-height: 48px; border-radius: 14px; }
}

@media (max-width: 370px), (max-height: 680px) and (max-width: 700px) {
  .onboarding-panel { padding-top: 10px; }
  .onboarding-panel > p { margin-bottom: 11px; }
  .onboarding-field { margin-top: 8px; }
  .onboarding-options { gap: 5px; }
  .onboarding-options button { min-height: 47px; padding-block: 7px; }
  .onboarding-goal { padding-block: 14px 12px; }
  .onboarding-goal output { margin-bottom: 10px; }
  .onboarding-presets { margin-top: 6px; }
}

/* ---------- Final mobile auth polish ---------- */
@media (max-width: 520px) {
  .auth-card {
    background:
      radial-gradient(420px 180px at 50% -80px, rgba(112,109,220,.07), transparent 72%),
      #fbfbf9;
  }
  .auth-mobile-brand { transition: max-height .22s ease, margin .22s ease, opacity .18s ease; }
  .auth-tabs { border-color: #e0e1dc; background: #f0f0ed; box-shadow: inset 0 1px 2px rgba(20,22,20,.025); }
  .auth-tabs button { color: #8c9289; }
  .auth-tabs button.active {
    color: #202320;
    box-shadow: 0 1px 3px rgba(20,22,20,.08), 0 6px 16px rgba(20,22,20,.045);
  }
  .auth-input {
    border-color: #dedfd9;
    box-shadow: 0 2px 8px rgba(20,22,20,.025);
  }
  .auth-input:focus-within {
    border-color: #7775d8;
    box-shadow: 0 0 0 3px rgba(95,93,208,.09), 0 8px 22px rgba(20,22,20,.045);
  }
  .auth-consent.placeholder {
    visibility: visible;
    display: flex;
    align-items: center;
    gap: 7px;
    pointer-events: none;
    color: #858c82;
    cursor: default;
  }
  .auth-consent.placeholder input,
  .auth-consent.placeholder span { display: none; }
  .auth-consent.placeholder::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: #39b86a;
    box-shadow: 0 0 0 3px rgba(57,184,106,.1);
  }
  .auth-consent.placeholder::after {
    content: "Sicher & verschlüsselt";
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: .01em;
  }
  .auth-primary {
    background: linear-gradient(180deg, #252825, #171917);
    box-shadow: 0 8px 20px rgba(20,22,20,.16), inset 0 1px rgba(255,255,255,.08);
  }
  .auth-primary:active { transform: scale(.985); box-shadow: 0 4px 12px rgba(20,22,20,.14); }
}

@media (max-width: 520px) and (max-height: 650px) {
  .auth-shell:focus-within { height: 100dvh; }
  .auth-card { padding-top: max(8px, env(safe-area-inset-top)); }
  .auth-mobile-brand { max-height: 0; margin: 0; overflow: hidden; opacity: 0; }
  .auth-tabs { margin-bottom: 9px; }
  .auth-heading { margin-bottom: 9px; }
  .auth-welcome,
  .auth-heading p { display: none; }
  .auth-heading h2 { height: auto; margin: 0; font-size: 23px; }
  .auth-form { gap: 8px; }
  .auth-input { min-height: 45px; height: 45px; }
  .auth-consent { min-height: 23px; }
  .auth-primary { min-height: 44px; height: 44px; }
}

/* ---------- Product tour ---------- */
.product-tour-settings-card {
  position: relative; overflow: hidden;
  width: 100%; min-height: 70px; display: grid; grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center; gap: 13px; margin: 10px 0 18px; padding: 13px 15px; border: 1px solid var(--border);
  border-radius: 17px; color: var(--text); background: var(--bg-elev); text-align: left;
  box-shadow: 0 8px 26px rgba(20,22,20,.04); transition: .2s ease;
}
.product-tour-settings-card:hover { transform: translateY(-1px); border-color: rgba(99,97,206,.35); box-shadow: 0 12px 30px rgba(20,22,20,.07); }
.product-tour-settings-card:hover .product-tour-settings-icon svg { transform: rotate(-35deg); }
.product-tour-settings-card > span:nth-child(2) { display: grid; gap: 3px; }
.product-tour-settings-card strong { font-size: 13px; }
.product-tour-settings-card small { color: var(--text-3); font-size: 10.5px; line-height: 1.4; }
.product-tour-settings-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 16px rgba(99,102,241,.28); }
.product-tour-settings-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--spring); }
.product-tour-settings-card .premium-arrow { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; color: var(--text-3); }

/* Invite */
.product-tour-invite-overlay { position: fixed; z-index: 6000; inset: 0; background: rgba(13,15,24,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: product-tour-fade .3s ease both; }
.product-tour-invite-overlay[hidden], .product-tour-invite[hidden], .product-tour-layer[hidden] { display: none; }
.product-tour-invite {
  position: fixed; z-index: 6010; top: 50%; left: 50%; width: min(460px, calc(100vw - 28px));
  padding: 28px; overflow: hidden; border: 1px solid rgba(255,255,255,.7); border-radius: 26px; color: var(--text);
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(99,102,241,.13), transparent 60%),
    radial-gradient(90% 60% at 100% 0%, rgba(236,72,153,.08), transparent 60%),
    rgba(252,252,253,.98);
  box-shadow: 0 30px 100px rgba(10,12,30,.3); transform: translate(-50%,-50%);
  animation: product-tour-pop .42s var(--ease) both;
}
.product-tour-invite-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.product-tour-invite-icon {
  position: relative; flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 26px rgba(99,102,241,.38);
}
.product-tour-invite-icon::after { content: ""; position: absolute; inset: -5px; border-radius: 21px; border: 2px solid rgba(99,102,241,.28); animation: product-tour-ring 2.2s ease-out infinite; }
.product-tour-invite-icon svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: product-tour-twinkle 2.6s ease-in-out infinite; }
.product-tour-invite-preview { display: flex; gap: 6px; }
.product-tour-invite-preview span {
  width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px;
  color: var(--accent); background: var(--bg-elev); box-shadow: var(--shadow-sm);
  animation: product-tour-rise .5s calc(.12s + var(--i) * 55ms) var(--spring) both;
}
.product-tour-invite-preview svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.product-tour-kicker { color: var(--accent); font-size: 9.5px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.product-tour-kicker span { color: var(--text-3); font-weight: 700; letter-spacing: .08em; }
.product-tour-invite h2 { margin: 8px 0 8px; font-size: 29px; line-height: 1.08; letter-spacing: -.045em; }
.product-tour-invite p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.product-tour-invite-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; margin-top: 24px; }
.product-tour-invite-actions .btn { min-height: 48px; border-radius: 14px; }
.product-tour-invite > small { display: block; margin-top: 13px; color: var(--text-3); font-size: 10.5px; text-align: center; }
.product-tour-sheet-handle { display: none; }

/* Spotlight */
.product-tour-layer { position: fixed; z-index: 6500; inset: 0; pointer-events: none; }
.product-tour-blocker { position: fixed; inset: 0; pointer-events: auto; }
.product-tour-spotlight {
  position: fixed; z-index: 6501; border-radius: 16px; cursor: pointer; pointer-events: auto;
  box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 0 0 6px rgba(99,102,241,.55), 0 0 0 200vmax rgba(11,13,26,.64);
  transition: left .45s var(--ease), top .45s var(--ease), width .45s var(--ease), height .45s var(--ease), border-radius .45s var(--ease);
  animation: product-tour-fade .3s ease both;
}
.product-tour-spotlight::after {
  content: ""; position: absolute; inset: -6px; border-radius: inherit; border: 2px solid rgba(139,92,246,.75); opacity: 0;
}
.product-tour-spotlight.is-pulsing::after { animation: product-tour-spot-ring 1.8s .35s ease-out 2; }
.product-tour-layer.is-centered .product-tour-spotlight { box-shadow: 0 0 0 200vmax rgba(11,13,26,.64); }

/* Bubble */
.product-tour-bubble {
  position: fixed; z-index: 6510; width: min(360px, calc(100vw - 28px)); padding: 16px 16px 14px;
  border: 1px solid rgba(255,255,255,.85); border-radius: 22px; color: var(--text);
  background: radial-gradient(120% 60% at 0% 0%, rgba(99,102,241,.09), transparent 55%), rgba(252,252,253,.99);
  box-shadow: 0 24px 72px rgba(8,10,30,.34), 0 2px 8px rgba(8,10,30,.08);
  pointer-events: auto; touch-action: pan-y;
  transition: top .45s var(--ease), left .45s var(--ease), transform .3s var(--ease);
  animation: product-tour-bubble-in .4s var(--ease) both;
}
.product-tour-arrow {
  position: absolute; width: 14px; height: 14px; background: rgb(252,252,253); border: 1px solid rgba(255,255,255,.85);
  transform: rotate(45deg); transition: left .45s var(--ease), top .45s var(--ease);
}
.product-tour-bubble[data-placement="below"] .product-tour-arrow { top: -7px; left: calc(var(--arrow-x, 50%) - 7px); border-right: 0; border-bottom: 0; }
.product-tour-bubble[data-placement="above"] .product-tour-arrow { bottom: -7px; left: calc(var(--arrow-x, 50%) - 7px); border-left: 0; border-top: 0; }
.product-tour-bubble[data-placement="left"] .product-tour-arrow { right: -7px; top: calc(var(--arrow-y, 50%) - 7px); border-left: 0; border-bottom: 0; }
.product-tour-bubble[data-placement="right"] .product-tour-arrow { left: -7px; top: calc(var(--arrow-y, 50%) - 7px); border-right: 0; border-top: 0; }
.product-tour-bubble[data-placement="center"] .product-tour-arrow { display: none; }

.product-tour-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; margin-bottom: 13px; }
.product-tour-icon {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 20px rgba(99,102,241,.32);
}
.product-tour-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; animation: product-tour-icon-in .5s var(--spring) both; }
.product-tour-step-label { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.product-tour-close {
  width: 34px; height: 34px; display: grid; place-items: center; margin: -4px -4px 0 0; padding: 0; border: 0; border-radius: 11px;
  color: var(--text-3); background: transparent; transition: background .2s ease, color .2s ease;
}
.product-tour-close:hover { color: var(--text); background: var(--bg-soft); }
.product-tour-close svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.product-tour-body { transition: opacity .15s ease, transform .15s ease; }
.product-tour-bubble.is-switching .product-tour-body { opacity: 0; transform: translateX(calc(var(--tour-dir, 1) * -14px)); }
.product-tour-bubble:not(.is-switching) .product-tour-body { animation: product-tour-content-in .32s var(--ease) both; }
.product-tour-bubble h2 { margin: 0 0 6px; font-size: 19px; line-height: 1.18; letter-spacing: -.03em; }
.product-tour-bubble p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.52; }

.product-tour-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.product-tour-dots { display: flex; align-items: center; gap: 2px; margin-left: -6px; }
.product-tour-dots button { position: relative; width: 22px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.product-tour-dots button::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border-radius: 99px; background: var(--border-strong);
  transform: translate(-50%,-50%); transition: width .3s var(--ease), background .3s ease;
}
.product-tour-dots button.is-done::before { background: rgba(99,102,241,.45); }
.product-tour-dots button[aria-current="step"] { width: 30px; }
.product-tour-dots button[aria-current="step"]::before { width: 22px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.product-tour-dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.product-tour-actions { display: flex; align-items: center; gap: 7px; }
.product-tour-actions .btn { min-height: 40px; border-radius: 12px; }
.product-tour-back { width: 40px; padding: 0; justify-content: center; }
.product-tour-back[hidden] { display: none; }
.product-tour-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.product-tour-next { gap: 6px; padding-inline: 14px 11px; }
.product-tour-next svg { transition: transform .2s var(--ease); }
.product-tour-next:hover svg { transform: translateX(2px); }
.product-tour-bubble.is-last .product-tour-next svg { display: none; }
.product-tour-bubble.is-last .product-tour-next { padding-inline: 16px; }
.product-tour-swipe-hint { display: block; margin-top: 10px; color: var(--text-3); font-size: 10.5px; text-align: center; }
.product-tour-swipe-hint[hidden] { display: none; }
.product-tour-bubble.is-nudged { animation: product-tour-nudge .38s ease; }
body.product-tour-open { overflow: hidden !important; }

/* Confetti */
.product-tour-confetti { position: fixed; z-index: 7000; width: 0; height: 0; pointer-events: none; }
.product-tour-confetti i {
  position: absolute; width: 7px; height: 11px; border-radius: 2px; opacity: 0;
  animation: product-tour-confetti 1.15s var(--d) cubic-bezier(.15,.7,.3,1) forwards;
}
.product-tour-confetti i:nth-child(3n) { width: 6px; height: 6px; border-radius: 50%; }

@keyframes product-tour-pop { from { opacity: 0; transform: translate(-50%, calc(-50% + 16px)) scale(.97); } }
@keyframes product-tour-fade { from { opacity: 0; } }
@keyframes product-tour-rise { from { opacity: 0; transform: translateY(8px) scale(.8); } }
@keyframes product-tour-ring { 0% { opacity: .9; transform: scale(.92); } 70%, 100% { opacity: 0; transform: scale(1.18); } }
@keyframes product-tour-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.08) rotate(8deg); } }
@keyframes product-tour-spot-ring { 0% { opacity: .9; inset: -6px; } 100% { opacity: 0; inset: -18px; } }
@keyframes product-tour-bubble-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes product-tour-content-in { from { opacity: 0; transform: translateX(calc(var(--tour-dir, 1) * 14px)); } }
@keyframes product-tour-icon-in { from { opacity: 0; transform: scale(.4) rotate(-30deg); } }
@keyframes product-tour-nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes product-tour-confetti {
  0% { opacity: 1; transform: translate(0,0) rotate(0) scale(.6); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 90px)) rotate(var(--r)) scale(1); }
}

/* Mobile: both invite and tour become bottom sheets */
@media (max-width: 700px) {
  .product-tour-invite {
    top: auto; bottom: 0; left: 0; width: 100%; padding: 12px 20px max(20px, env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0; border-bottom: 0; transform: none;
    animation: product-tour-sheet-up .45s var(--ease) both;
  }
  .product-tour-sheet-handle { display: block; width: 38px; height: 5px; margin: 0 auto 16px; border-radius: 99px; background: var(--border-strong); }
  .product-tour-invite-hero { margin-bottom: 16px; }
  .product-tour-invite-preview span { width: 28px; height: 28px; }
  .product-tour-invite h2 { font-size: 25px; }
  .product-tour-invite-actions { grid-template-columns: 1fr; margin-top: 20px; }
  .product-tour-invite-actions #productTourStartBtn { grid-row: 1; }
  .product-tour-invite-actions .btn { min-height: 50px; font-size: 15px; }

  .product-tour-bubble {
    left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); width: auto;
    padding: 10px 16px 14px; border-radius: 24px;
    transition: transform .3s var(--ease);
  }
  .product-tour-bubble[data-placement="bottom-sheet"] { top: auto; bottom: max(10px, env(safe-area-inset-bottom)); animation-name: product-tour-sheet-up; }
  .product-tour-bubble[data-placement="top-sheet"] { top: max(10px, env(safe-area-inset-top)); bottom: auto; animation-name: product-tour-sheet-down; }
  .product-tour-bubble .product-tour-arrow { display: none; }
  .product-tour-bubble .product-tour-sheet-handle { margin-bottom: 10px; width: 34px; height: 4px; }
  .product-tour-bubble[data-placement="top-sheet"] .product-tour-sheet-handle { display: none; }
  .product-tour-bubble[data-placement="top-sheet"] { padding-top: 14px; }
  .product-tour-head { margin-bottom: 10px; }
  .product-tour-close { width: 40px; height: 40px; margin: -6px -8px 0 0; }
  .product-tour-bubble h2 { font-size: 18px; }
  .product-tour-bubble p { font-size: 13.5px; }
  .product-tour-footer { margin-top: 14px; }
  .product-tour-actions { flex: 1; justify-content: flex-end; }
  .product-tour-actions .btn { min-height: 46px; border-radius: 14px; }
  .product-tour-back { width: 46px; }
  .product-tour-next { flex: 1; max-width: 190px; justify-content: center; font-size: 14.5px; }
  .product-tour-dots { margin-left: -5px; }
  .product-tour-dots button { width: 18px; height: 36px; }
  .product-tour-dots button[aria-current="step"] { width: 26px; }
  .product-tour-dots button[aria-current="step"]::before { width: 18px; }
  .product-tour-dots button::before { width: 6px; height: 6px; }
}
@media (max-width: 360px) {
  .product-tour-next { max-width: none; }
  .product-tour-dots button { width: 14px; }
}
@keyframes product-tour-sheet-up { from { opacity: 0; transform: translateY(40px); } }
@keyframes product-tour-sheet-down { from { opacity: 0; transform: translateY(-40px); } }

@media (prefers-reduced-motion: reduce) {
  .product-tour-invite, .product-tour-invite-overlay, .product-tour-bubble, .product-tour-spotlight, .product-tour-invite-preview span,
  .product-tour-icon svg, .product-tour-invite-icon svg, .product-tour-invite-icon::after, .product-tour-bubble:not(.is-switching) .product-tour-body { animation: none; }
  .product-tour-spotlight.is-pulsing::after, .product-tour-bubble.is-nudged { animation: none; }
  .product-tour-spotlight, .product-tour-bubble, .product-tour-arrow, .product-tour-body, .product-tour-dots button::before { transition: none; }
}

/* ---------- Month switcher ---------- */
.month-switch[hidden] { display: none; }
.month-switch {
  position: relative; margin: -4px 0 16px;
  animation: month-switch-in .32s var(--ease) both;
}
.month-switch::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bg));
}
.month-switch-track {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 3px 36px 3px 2px; -webkit-overflow-scrolling: touch;
}
.month-switch-track::-webkit-scrollbar { display: none; }
.month-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 11px; color: var(--text-2); background: var(--bg-elev);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; scroll-snap-align: start; cursor: pointer;
  transition: background-color .25s var(--ease), color .2s, border-color .2s, box-shadow .25s, transform .2s var(--ease);
}
.month-chip span::first-letter { text-transform: uppercase; }
.month-chip b {
  min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px;
  color: var(--text-3); background: var(--bg-soft); font-size: 11px; font-variant-numeric: tabular-nums;
}
.month-chip:hover { color: var(--text); border-color: var(--border-strong); }
.month-chip:active { transform: scale(.96); }
.month-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.month-chip.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px rgba(99, 102, 241, .28);
}
.month-chip.active b { color: #fff; background: rgba(255, 255, 255, .22); }

/* Tile layout: one focused month at a time */
.list.months-grid.has-focus .month:not(.open) { display: none; }
.list.months-grid.has-focus .month.open { animation: month-focus-in .42s var(--ease) both; }
@keyframes month-focus-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes month-switch-in { from { opacity: 0; transform: translateY(-6px); } }

/* Keep the tile-to-detail layout change as one calm visual movement. */
html.month-view-transition .list.months-grid { view-transition-name: month-layout; }
html.month-view-transition::view-transition-old(root),
html.month-view-transition::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-group(month-layout) {
  animation-duration: .52s;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}
::view-transition-old(month-layout) { animation: month-layout-old .24s ease-out both; }
::view-transition-new(month-layout) { animation: month-layout-new .42s ease-out both; }
@keyframes month-layout-old { to { opacity: .18; } }
@keyframes month-layout-new { from { opacity: .28; } }

/* Applications inside an open month as tiles */
.months-grid .month-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 10px; padding: 0 14px 14px;
}
.months-grid .month-cards::before { grid-column: 1 / -1; margin: 0 2px 2px; }
.months-grid .month-cards .card,
.months-grid .month-cards .card.has-fit {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "avatar side" "main main" "fit fit";
  align-items: start; align-content: start; gap: 12px 10px;
  min-height: 158px; padding: 15px;
  background: var(--bg-elev); box-shadow: var(--shadow-sm);
}
.months-grid .month-cards .card::before {
  left: 15px; right: 15px; top: 0; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px;
  transform: scaleX(.4);
}
.months-grid .month-cards .card:hover::before { transform: none; }
.months-grid .month-cards .avatar { grid-area: avatar; }
.months-grid .month-cards .card-side { grid-area: side; justify-self: end; min-width: 0 !important; gap: 5px; }
.months-grid .month-cards .card-main { grid-area: main; align-self: end; }
.months-grid .month-cards .card-title strong { font-size: 15.5px; }
.months-grid .month-cards .card-meta { margin-top: 8px; }
.months-grid .month-cards .card-fit {
  grid-area: fit; width: auto; padding-top: 11px; border-top: 1px solid var(--border);
}
.months-grid .month-cards .card-fit .fit-ring { --ring: 32px; }

@media (max-width: 620px) {
  .month-switch { margin: -6px -16px 14px; }
  .month-switch-track { padding: 3px 40px 3px 16px; scroll-padding-left: 16px; }
  .month-chip { height: 36px; }
  .months-grid .month-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 8px 8px; }
  .months-grid .month-cards .card,
  .months-grid .month-cards .card.has-fit {
    min-height: 0; padding: 12px; gap: 9px 8px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "avatar" "main" "fit" "side";
  }
  .months-grid .month-cards .card-main { align-self: start; }
  .months-grid .month-cards .card-side { justify-self: start; flex-direction: row; align-items: center; }
  .months-grid .month-cards .card-fit { padding-top: 9px; }
  .months-grid .month-cards .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
  .months-grid .month-cards .card-side .age { display: none; }
  .months-grid .month-cards .card-title strong { font-size: 14px; }
  .months-grid .month-cards .card-role { font-size: 12px; }
  .months-grid .month-cards .card-meta { gap: 3px 8px; font-size: 11px; }
  .months-grid .month-cards .card-fit b { font-size: 11.5px; white-space: normal; }
}
@media (max-width: 370px) {
  .months-grid .month-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .list.months-grid.has-focus .month.open, .month-switch { animation: none; }
}

/* ---------- Onboarding goal slider: grab area covers the whole thumb ----------
   The input used to be only 6px tall while the 24px thumb hung outside it, so
   Safari/iOS ignored most touches on the visible thumb. The input is now as tall
   as the thumb and the 6px bar is drawn as the track. */
.onboarding-goal input[type="range"],
.onboarding-goal input[type="range"]:focus {
  height: 32px;
  margin: 0;
  padding: 0;
  background: transparent;
  touch-action: none;
}
.onboarding-goal input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6664d3 0 var(--goal-progress), #e7e8e4 var(--goal-progress) 100%);
}
.onboarding-goal input[type="range"]::-webkit-slider-thumb { margin-top: -9px; }
.onboarding-goal input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: #e7e8e4; }
.onboarding-goal input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: #6664d3; }
.onboarding-goal input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(102,100,211,.25), 0 2px 8px rgba(54,51,151,.3); }
