/* ============================================================
   Bechtle Lizenzmanagement — Foundations, Login, App-Shell
   Offizielle Markenfarben (bechtle-colors_share.ase):
   Progressive #23a96a · Future #2ffb95 · Experience #075033
   Straight Blue #346cef · Raspberry #d9486c · Light Orange #ff9c5c
   ============================================================ */

@font-face {
  font-family: "BechtlePro";
  src: url("/fonts/BechtleProVar.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BechtlePro";
  src: url("/fonts/BechtleProVar-Italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f3f7f5;
  --bg-glow: radial-gradient(1200px 500px at 85% -10%, rgba(47, 251, 149, .10), transparent 60%),
             radial-gradient(900px 420px at -10% 0%, rgba(35, 169, 106, .08), transparent 55%);
  --surface: #ffffff;
  --surface-2: #ebf2ee;
  --ink: #0d1f16;
  --ink-soft: #48594f;
  --ink-faint: #7d8e84;
  --line: #dfe7e2;
  --accent: #23a96a;
  --accent-hover: #1b8354;
  --accent-soft: #e0f6ea;
  --future: #2ffb95;
  --future-soft: #c9fee0;
  --exp: #075033;
  --exp-deep: #04321f;
  --ok: #1b8354;
  --ok-soft: #e0f6ea;
  --warn: #c06722;
  --warn-soft: #ffefe3;
  --crit: #c23a5e;
  --crit-soft: #fbe6ec;
  --info: #346cef;
  --info-soft: #e9effd;
  --shadow-sm: 0 1px 2px rgba(7, 80, 51, .06), 0 2px 8px rgba(7, 80, 51, .05);
  --shadow-md: 0 2px 6px rgba(7, 80, 51, .07), 0 12px 28px -12px rgba(7, 80, 51, .18);
  --radius: 14px;
  --side-ink: #dff3e8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a130e;
    --bg-glow: radial-gradient(1200px 500px at 85% -10%, rgba(47, 251, 149, .07), transparent 60%);
    --surface: #101d15; --surface-2: #17281d; --ink: #e7f2ec; --ink-soft: #a3b6ab;
    --ink-faint: #697b70; --line: #22382b;
    --accent: #34d68b; --accent-hover: #57e2a2; --accent-soft: #0e3b26;
    --future: #2ffb95; --future-soft: #0d3f2a; --exp: #7ffdc0; --exp-deep: #04321f;
    --ok: #43cf8c; --ok-soft: #0e3423; --warn: #ffa763; --warn-soft: #3b2412;
    --crit: #f27d9b; --crit-soft: #3c1420; --info: #7ea4f7; --info-soft: #182c52;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .35), 0 14px 30px -12px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg-glow), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "BechtlePro", "Aptos", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--future); color: var(--exp-deep); }

/* ============================================================
   Login — Split-Screen mit Brandguide-Farbblöcken
   ============================================================ */
.login-overlay { position: fixed; inset: 0; display: flex; z-index: 50; background: var(--exp-deep); }

.login-brand {
  flex: 1.15; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #075033 0%, #04321f 70%);
  color: #fff; padding: clamp(28px, 5vw, 64px);
  display: flex; flex-direction: column;
}
.aurora { position: absolute; inset: -20%; pointer-events: none; filter: blur(60px); opacity: .55; }
.aurora::before, .aurora::after {
  content: ""; position: absolute; border-radius: 50%;
}
.aurora::before {
  width: 55%; height: 55%; left: 8%; top: 12%;
  background: radial-gradient(circle, rgba(47, 251, 149, .65), transparent 65%);
  animation: drift1 16s ease-in-out infinite alternate;
}
.aurora::after {
  width: 60%; height: 60%; right: -5%; bottom: -8%;
  background: radial-gradient(circle, rgba(35, 169, 106, .7), transparent 65%);
  animation: drift2 20s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(14%, 20%) scale(1.15); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-12%, -16%) scale(.95); } }

/* feines Korn über dem Verlauf */
.login-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.login-brand-logo { width: clamp(150px, 16vw, 210px); position: relative; z-index: 1; }
.login-headline {
  position: relative; z-index: 1; margin-top: auto;
  font-weight: 320; letter-spacing: -.02em;
  font-size: clamp(38px, 5.2vw, 72px); line-height: 1.04;
}
.login-headline span { display: block; opacity: 0; animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards; }
.login-headline span:nth-child(2) { animation-delay: .12s; }
.login-headline span:nth-child(3) { animation-delay: .24s; }
.hl-future { color: var(--future); font-weight: 550; }

.cb-kicker {
  position: relative; z-index: 1; margin-top: clamp(22px, 4vh, 44px);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  color: rgba(255, 255, 255, .65);
  opacity: 0; animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: .24s;
}
.color-blocks { position: relative; z-index: 1; display: flex; gap: 10px; margin-top: 12px; height: clamp(72px, 12vh, 112px); }
.cb { border-radius: 12px; flex: 1; display: flex; align-items: flex-end; padding: 12px 14px; opacity: 0; animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards; }
.cb small { font-size: clamp(13px, 1.3vw, 16px); letter-spacing: .1em; text-transform: uppercase; font-weight: 650; }
.cb-progressive { background: #23a96a; animation-delay: .3s; }
.cb-future { background: #2ffb95; color: #075033; flex: 1.4; animation-delay: .42s; }
.cb-experience { background: #075033; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); animation-delay: .54s; }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.login-side {
  flex: 1; display: grid; place-items: center;
  background: var(--surface); padding: 32px;
}
.login-box { width: min(380px, 100%); display: flex; flex-direction: column; }
.login-box > * { opacity: 0; animation: rise .6s cubic-bezier(.2, .7, .2, 1) forwards; }
.login-box > *:nth-child(2) { animation-delay: .07s; }
.login-box > *:nth-child(3) { animation-delay: .14s; }
.login-box > *:nth-child(4) { animation-delay: .21s; }
.login-box > *:nth-child(5) { animation-delay: .28s; }
.login-box > *:nth-child(6) { animation-delay: .35s; }
.login-box > *:nth-child(7) { animation-delay: .42s; }
.login-box > *:nth-child(8) { animation-delay: .49s; }
.login-logo { width: 150px; margin-bottom: 10px; }
.login-cc { margin: 0 0 34px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.login-box h1 { margin: 0 0 4px; font-size: 27px; font-weight: 600; letter-spacing: -.015em; }
.login-sub { margin: 0 0 26px; color: var(--ink-soft); }

.float-field { position: relative; display: block; margin-bottom: 14px; }
.float-field input {
  width: 100%; padding: 22px 14px 8px; font: inherit; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.float-field span {
  position: absolute; left: 14px; top: 15px; pointer-events: none;
  color: var(--ink-faint); font-size: 14.5px;
  transition: all .16s ease;
}
.float-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.float-field input:focus + span, .float-field input:not(:placeholder-shown) + span {
  top: 6px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; color: var(--accent);
}
.login-cta { margin-top: 8px; padding: 13px 18px; font-size: 15px; border-radius: 12px; display: flex; justify-content: center; gap: 10px; }
.cta-arrow { display: inline-block; transition: transform .18s; }
.login-cta:hover .cta-arrow { transform: translateX(4px); }
.login-error { background: var(--crit-soft); color: var(--crit); padding: 9px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 6px; }
.mfa-hinweis { font-size: 12.5px; color: var(--text-dim); margin: 2px 0 10px; }
.login-hint { margin-top: 22px; font-size: 11.5px; color: var(--ink-faint); }

@media (max-width: 860px) {
  .login-overlay { flex-direction: column; overflow: auto; }
  .login-brand { min-height: 280px; flex: none; }
  .login-headline { font-size: 34px; }
  .login-side { padding: 24px; }
}

/* ============================================================
   App-Shell — Sidebar in Experience Green
   ============================================================ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 3px;
  padding: 22px 14px 16px;
  background: linear-gradient(175deg, #075033, #04321f 80%);
  color: var(--side-ink);
}
.side-logo { padding: 2px 10px 22px; }
.side-logo img { width: 128px; display: block; }
.side-logo small { display: block; margin-top: 7px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(223, 243, 232, .55); font-weight: 600; }

.nav-btn {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left; border: 0; cursor: pointer;
  background: none; color: rgba(223, 243, 232, .78);
  font: inherit; font-weight: 500; font-size: 13.5px;
  padding: 10px 12px; border-radius: 10px;
  transition: background .15s, color .15s, transform .12s;
}
.nav-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-btn:hover { background: rgba(47, 251, 149, .09); color: #fff; }
.nav-btn:active { transform: scale(.98); }
.nav-btn.active { background: rgba(47, 251, 149, .14); color: var(--future); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(47, 251, 149, .25); }
.nav-btn:focus-visible { outline: 2px solid var(--future); outline-offset: 1px; }

.sidebar .spacer { flex: 1; }
.sidebar .meta { display: flex; flex-direction: column; gap: 10px; padding: 12px 6px 0; border-top: 1px solid rgba(223, 243, 232, .14); }
.user-chip { display: flex; align-items: center; gap: 10px; cursor: pointer; border-radius: 10px; padding: 4px 6px; margin: -4px -6px; transition: background .15s; }
.user-chip:hover { background: rgba(255, 255, 255, .09); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #23a96a, #2ffb95);
  color: var(--exp-deep); font-weight: 700; font-size: 13px;
}
.user-lines { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-lines strong { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-lines small { font-size: 11px; color: rgba(223, 243, 232, .6); }
.btn.ghost { background: none; border: 1px solid rgba(223, 243, 232, .25); color: rgba(223, 243, 232, .85); }
.btn.ghost:hover { border-color: var(--future); color: var(--future); }

.main { flex: 1; padding: 30px 34px 56px; min-width: 0; }

/* gestaffeltes Einblenden der Inhalte */
.view-anim > * { opacity: 0; animation: rise .5s cubic-bezier(.2, .7, .2, 1) forwards; }
.view-anim > *:nth-child(2) { animation-delay: .05s; }
.view-anim > *:nth-child(3) { animation-delay: .1s; }
.view-anim > *:nth-child(4) { animation-delay: .15s; }
.view-anim > *:nth-child(5) { animation-delay: .2s; }
.view-anim > *:nth-child(6) { animation-delay: .25s; }
.view-anim > *:nth-child(n+7) { animation-delay: .3s; }

h1 { font-size: 26px; margin: 0 0 4px; font-weight: 620; letter-spacing: -.018em; }
.sub { color: var(--ink-soft); margin: 0 0 24px; font-size: 14.5px; }
h2 {
  display: flex; align-items: center; gap: 10px;
  font-weight: 650; margin: 30px 0 12px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .09em; font-size: 11px;
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; }
  .side-logo { padding: 4px 10px; }
  .side-logo img { width: 96px; }
  .side-logo small { display: none; }
  .nav-btn { width: auto; }
  .sidebar .spacer, .sidebar .meta { display: none; }
  .main { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora::before, .aurora::after { animation: none; }
  .login-headline span, .cb, .login-box > *, .view-anim > * { animation-duration: .01s; animation-delay: 0s; }
}
