/* =====================================================================
   Haushaltsbuch – App-spezifische Ergänzungen
   Basis: /assets/css/design-system.css (Suite-weites Design-System)
   ===================================================================== */
@import url('design-system.css');

/* ---------------------------------------------------------------------
   Haushaltsbuch-spezifischer Feinschliff. Der Rest (Typografie, Radien,
   Flächen, der Indigo/Info-Blau-Akzentsplit) kommt jetzt direkt aus
   design-system.css und gilt für die ganze Suite – hier nur noch, was
   wirklich Haushaltsbuch-eigene Bauteile sind (Summary-Strip, Kalender)
   plus die Bewegungs-/Glow-Schicht weiter unten, die NUR Haushaltsbuch
   betrifft (Status/TS3/Panel binden diese Datei nicht ein).
   --------------------------------------------------------------------- */
.summary-hero-ring .value { stroke: var(--color-info); }
.summary-hero-ring-center { color: var(--color-info); }
.calendar-cell.is-today {
  border-color: var(--color-info);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.4);
}

.amount-positive,
.amount-negative,
.metric-value,
.summary-hero-text .amount,
.summary-metric .value {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------
   Kompakter Summary-Strip: Hero + Kennzahlen in EINER Zeile/Karte
   --------------------------------------------------------------------- */
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  padding: 0 !important;
  overflow: hidden;
}
.summary-hero {
  flex: 1.3 1 240px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.13), transparent 70%);
  border-right: 1px solid var(--border);
}
.summary-hero-ring { width: 68px; height: 68px; flex-shrink: 0; position: relative; }
.summary-hero-ring svg { transform: rotate(-90deg); }
.summary-hero-ring .track { fill: none; stroke: var(--border-strong); stroke-width: 7; }
.summary-hero-ring .value {
  fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round;
  transition: stroke-dashoffset 900ms var(--ease);
  filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), 0.65));
}
.summary-hero-ring-center {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; font-family: var(--font-display);
}
.summary-hero-text .label { font-size: 0.7rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 0.1rem; }
.summary-hero-text .amount {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; line-height: 1.08; letter-spacing: -0.01em;
  background: linear-gradient(120deg, var(--text-primary) 20%, var(--accent-light) 55%, var(--accent) 80%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: textShine 7s ease-in-out infinite;
}
.summary-hero-text .amount.is-negative {
  background-image: linear-gradient(120deg, var(--color-expense) 20%, #ffb4bf 55%, var(--color-expense) 80%);
}
.summary-hero-text .sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

.summary-metric {
  flex: 1 1 130px;
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
}
.summary-metric:last-child { border-right: none; }
.summary-metric .label {
  font-size: 0.68rem; color: var(--text-secondary); font-weight: 500;
  display: flex; align-items: center; gap: 0.3rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.summary-metric .label svg { width: 12px; height: 12px; }
.summary-metric .value { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; }
.summary-metric .trend { font-size: 0.68rem; }
.summary-metric .trend.up { color: var(--color-income); }
.summary-metric .trend.down { color: var(--color-expense); }

@media (max-width: 860px) {
  .summary-hero, .summary-metric { border-right: none; border-bottom: 1px solid var(--border); }
}

/* Kompaktere Tabellenzeilen für dichtere Listen */
.table-compact td, .table-compact th { padding: 0.5rem 0.7rem; }
.table-compact .tx-icon { width: 26px; height: 26px; margin-right: 0.5rem; }
.table-compact .tx-icon svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------------
   Kompakte Listen (Dashboard: kommende Zahlungen, letzte Buchungen)
   --------------------------------------------------------------------- */
.compact-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
  transition: background var(--dur-fast) var(--ease), padding-left var(--dur-fast) var(--ease);
  border-radius: var(--radius-xs);
}
.compact-row:hover { background: var(--surface-hover); padding-left: 0.4rem; }
.compact-row:last-child { border-bottom: none; }
.compact-row .compact-icon {
  width: 26px; height: 26px; border-radius: var(--radius-xs);
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-rgb), 0.06));
  margin-right: 0.55rem; flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease);
}
.compact-row:hover .compact-icon { transform: scale(1.12) rotate(-4deg); }
.compact-row .compact-icon svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------------
   Kalender
   --------------------------------------------------------------------- */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; }
.calendar-dow {
  font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted);
  text-align: center; padding-bottom: 0.3rem; font-weight: 600;
}
.calendar-cell {
  min-height: 92px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  padding: 0.45rem; font-size: 0.75rem; display: flex; flex-direction: column; gap: 0.3rem;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.calendar-cell:not(.is-empty):hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 8px 20px -12px var(--shadow-color);
}
.calendar-cell.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 0 18px -6px rgba(var(--accent-rgb), 0.5);
}
.calendar-cell.is-empty { background: transparent; border-color: transparent; }
.calendar-daynum { font-weight: 600; color: var(--text-secondary); font-size: 0.72rem; }
.calendar-chip {
  font-size: 0.65rem; padding: 0.12rem 0.4rem; border-radius: 5px;
  background: rgba(245, 166, 35, 0.16); color: #FCD38A; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.calendar-chip.income { background: rgba(52, 211, 153, 0.16); color: #6EE7B7; }

/* =======================================================================
   BEWEGUNGS- & GLOW-SCHICHT – "Bold & verspielt"
   -----------------------------------------------------------------------
   Alles ab hier gilt NUR für Haushaltsbuch (diese Datei wird von Status,
   TS3-Panel und der Kommandozentrale nicht eingebunden – die haben ihr
   eigenes style.css). Leitidee: das ruhige Grundraster von
   design-system.css bleibt, aber obendrauf gibt es spürbar mehr Energie:
   schwebende Gradient-Orbs im Hintergrund, glühende Buttons mit
   Shine-Sweep + Ripple, Karten mit Hover-Lift, hochzählende Zahlen und
   ein Ring, der beim Laden "einfliegt" statt einfach dazustehen.
   Respektiert prefers-reduced-motion über die globale Regel in
   design-system.css (alle Animation-/Transition-Dauern werden dort auf
   nahe 0 gesetzt).
   ======================================================================= */

@keyframes textShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---- Schwebende Hintergrund-Orbs ---- */
.bg-orbs {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(80px);
  opacity: 0.30; will-change: transform;
  animation: orbFloat 26s ease-in-out infinite;
}
.bg-orbs span:nth-child(1) {
  width: 460px; height: 460px; top: -140px; right: -100px;
  background: radial-gradient(circle, var(--accent), transparent 72%);
  animation-duration: 24s;
}
.bg-orbs span:nth-child(2) {
  width: 380px; height: 380px; bottom: -160px; left: -110px;
  background: radial-gradient(circle, var(--color-info), transparent 72%);
  animation-duration: 32s; animation-delay: -6s;
}
.bg-orbs span:nth-child(3) {
  width: 320px; height: 320px; top: 38%; left: 58%;
  background: radial-gradient(circle, var(--color-income), transparent 72%);
  animation-duration: 29s; animation-delay: -14s; opacity: 0.20;
}
[data-theme="light"] .bg-orbs span { opacity: 0.16; }
[data-theme="light"] .bg-orbs span:nth-child(3) { opacity: 0.12; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -35px) scale(1.1); }
  66% { transform: translate(-35px, 30px) scale(0.92); }
}

/* ---- Karten: Lift + Glow beim Hover, Einflug-Animation ---- */
.card {
  position: relative;
  animation: cardIn 620ms var(--ease) both;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 22px 44px -22px rgba(var(--accent-rgb), 0.38), 0 1px 2px -1px var(--shadow-color);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.grid > *:nth-child(1), .summary-strip > *:nth-child(1) { animation-delay: 0.02s; }
.grid > *:nth-child(2), .summary-strip > *:nth-child(2) { animation-delay: 0.07s; }
.grid > *:nth-child(3), .summary-strip > *:nth-child(3) { animation-delay: 0.12s; }
.grid > *:nth-child(4), .summary-strip > *:nth-child(4) { animation-delay: 0.17s; }
.grid > *:nth-child(5), .summary-strip > *:nth-child(5) { animation-delay: 0.22s; }
.grid > *:nth-child(6) { animation-delay: 0.27s; }

.card-title-row h3 { position: relative; display: inline-block; }
.card-title-row h3::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width var(--dur-base) var(--ease);
}
.card:hover .card-title-row h3::after { width: 100%; }

/* ---- Buttons: Gradient, Glow, Shine-Sweep, Ripple ---- */
.btn {
  position: relative; overflow: hidden;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.96); }
/* .ripple/.btn-primary .ripple/@keyframes rippleAnim leben jetzt in
   design-system.css (suite-weit, da motion.js jetzt auch in Status/TS3
   eingebunden wird). */

.btn-primary {
  background: linear-gradient(135deg, var(--accent-light), var(--accent) 55%, var(--accent-dark));
  background-size: 220% 220%;
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 22px -8px rgba(var(--accent-rgb), 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-base) var(--ease), background-position var(--dur-slow) var(--ease);
}
.btn-primary:hover {
  background-position: 100% 0;
  box-shadow: 0 12px 32px -6px rgba(var(--accent-rgb), 0.72), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg); transition: left 700ms ease;
  pointer-events: none;
}
.btn-primary:hover::after { left: 130%; }

.btn-danger { transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-base) var(--ease); }
.btn-danger:hover { box-shadow: 0 8px 20px -10px rgba(240, 85, 74, 0.55); transform: translateY(-1px); }

/* ---- Sidebar: glühender aktiver Eintrag, Icon-Bounce ---- */
.brand-mark { animation: brandGlow 4.5s ease-in-out infinite; }
@keyframes brandGlow {
  0%, 100% { box-shadow: 0 4px 14px -4px rgba(var(--accent-rgb), 0.6); }
  50% { box-shadow: 0 4px 26px -1px rgba(var(--accent-rgb), 0.92); }
}
.nav-item svg { transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.nav-item:hover svg { transform: translateX(2px) scale(1.1); }
.nav-item.active {
  background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.05));
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 4px 18px -8px rgba(var(--accent-rgb), 0.55);
}
.nav-item.active svg { filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.75)); }

/* ---- Metrik-Icons: Gradient statt Flat, Pop bei Hover ---- */
.metric-icon {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.26), rgba(var(--accent-rgb), 0.06));
  transition: transform var(--dur-fast) var(--ease);
}
.metric-icon.is-expense { background: linear-gradient(135deg, rgba(251, 113, 133, 0.28), rgba(251, 113, 133, 0.06)); }
.metric-icon.is-fixed { background: linear-gradient(135deg, rgba(245, 166, 35, 0.28), rgba(245, 166, 35, 0.06)); }
.metric-icon.is-info { background: linear-gradient(135deg, rgba(96, 165, 250, 0.28), rgba(96, 165, 250, 0.06)); }
.metric-card:hover .metric-icon { transform: scale(1.12) rotate(-4deg); }

.tx-icon { transition: transform var(--dur-fast) var(--ease); }
tr.tx-row:hover .tx-icon, .data-table tr:hover .tx-icon { transform: scale(1.12) rotate(-4deg); }

/* ---- Inputs: sanftes Glühen im Fokus ---- */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18), 0 0 18px -6px rgba(var(--accent-rgb), 0.35);
}

/* ---- Modal: leicht überschwingende Pop-Animation ---- */
.modal {
  transition: transform 460ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 320ms var(--ease);
}

/* ---- Toast: Glow-Puls links ---- */
.toast { box-shadow: 0 10px 30px -10px var(--shadow-color), 0 0 0 1px rgba(var(--accent-rgb), 0.08); }

/* ---- Leerzustände: sanft schwebendes Icon ---- */
.empty-state svg { animation: floatSlow 3.6s ease-in-out infinite; }
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---- Login-Seite: eigener Glow-Auftritt ---- */
.auth-card {
  animation: authIn 620ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 30px 70px -30px rgba(var(--accent-rgb), 0.45), 0 1px 2px -1px var(--shadow-color);
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(22px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.auth-logo .brand-mark { animation: brandGlow 4.5s ease-in-out infinite; }

/* ---- Scrollbar-Akzent ---- */
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--border-strong), var(--border-strong));
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.5); }

/* =======================================================================
   Login-Seite – schlichte, garantiert mittige Karte mit fester Breite
   (kein Grid/Split-Layout mehr, das sich strecken kann), dafür mit
   kontrolliertem Schmuck: ein pulsierender Halo hinter der Karte, ein
   Logo mit Bounce-Einflug, ein Farbverlaufs-Titel und ein gestaffeltes
   Einfliegen der Formularelemente. Alles bleibt INNERHALB der festen
   Kartenbreite – nichts davon kann das Layout wieder aufreißen.
   ======================================================================= */
.login-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5);
}

.login-card {
  width: 100%; max-width: 380px; margin: 0 auto; padding: 2.2rem 2rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-xl); position: relative;
  animation: cardBurstIn 420ms cubic-bezier(0.2, 1.4, 0.4, 1) 460ms both;
  box-shadow: 0 24px 56px -24px rgba(var(--accent-rgb), 0.4), 0 1px 2px -1px var(--shadow-color);
}
@keyframes cardBurstIn {
  0% { opacity: 0; transform: scale(0.22) rotate(-6deg); filter: blur(8px); }
  62% { opacity: 1; transform: scale(1.045) rotate(0.6deg); filter: blur(0); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
.login-card::before {
  content: ""; position: absolute; inset: -42px; z-index: -1;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.32), transparent 72%);
  filter: blur(28px);
  opacity: 0;
  animation: haloPulse 5s ease-in-out infinite, haloAppear 500ms var(--ease) 480ms forwards;
  pointer-events: none;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}
@keyframes haloAppear { to { opacity: 0.55; } }

.login-logo { display: flex; justify-content: center; margin-bottom: var(--sp-5); }
.login-brand-mark {
  width: 56px; height: 56px; font-size: 1.25rem;
  animation: brandGlow 4.5s ease-in-out infinite, logoPop 480ms cubic-bezier(0.34, 1.56, 0.64, 1) 460ms both;
}
@keyframes logoPop {
  from { opacity: 0; transform: scale(0.4) rotate(-12deg); }
  to { opacity: 1; transform: none; }
}

.login-title {
  text-align: center; margin-bottom: 0.3rem;
  background: linear-gradient(120deg, var(--text-primary) 30%, var(--accent-light) 55%, var(--text-primary) 85%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: textShine 6s ease-in-out infinite, fadeUp 400ms var(--ease) 560ms both;
}
.login-sub {
  text-align: center; margin-bottom: var(--sp-6); font-size: 0.86rem;
  animation: fadeUp 400ms var(--ease) 620ms both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.login-error {
  background: rgba(240, 85, 74, 0.1); border: 1px solid rgba(240, 85, 74, 0.3); color: #FDA9A2;
  padding: 0.7rem 0.9rem; border-radius: var(--radius-sm); font-size: 0.82rem; margin-bottom: var(--sp-4);
  display: flex; align-items: flex-start; gap: 0.55rem;
  animation: fadeUp 380ms var(--ease) 700ms both;
}
.login-error svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 0.05rem; }

/* Eingabefelder mit Icon links, gestaffelt beim Laden eingeblendet – Verzögerung
   liegt hinter dem Einflug/Explosions-Intro der Karte (siehe .login-fx unten). */
.login-card form .field:nth-of-type(1) { animation: fadeUp 380ms var(--ease) 680ms both; }
.login-card form .field:nth-of-type(2) { animation: fadeUp 380ms var(--ease) 740ms both; }
.login-card form .btn { animation: fadeUp 380ms var(--ease) 800ms both; }

.input-icon-wrap { position: relative; }
.input-icon-wrap svg {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-muted); pointer-events: none;
  transition: color var(--dur-fast) var(--ease);
}
.input-icon-wrap input { padding-left: 2.5rem; }
.input-icon-wrap:focus-within svg { color: var(--accent); }

/* Bunte Suite-Punkte unten (nutzt .auth-suite-note/.marks aus design-system.css) */
.login-card .auth-suite-note { animation: fadeUp 420ms var(--ease) 860ms both; }
.login-card .auth-suite-note .marks span {
  transition: transform var(--dur-fast) var(--ease);
}
.login-card .auth-suite-note:hover .marks span { transform: translateY(-2px); }
.login-card .auth-suite-note .marks span:nth-child(1) { transition-delay: 0ms; }
.login-card .auth-suite-note .marks span:nth-child(2) { transition-delay: 40ms; }
.login-card .auth-suite-note .marks span:nth-child(3) { transition-delay: 80ms; }
.login-card .auth-suite-note .marks span:nth-child(4) { transition-delay: 120ms; }

/* =======================================================================
   Login-Seite – zusätzliche "Krass"-Animationsschicht (nur login.php,
   ersetzt dort .bg-orbs durch .login-bg mit mehr Bewegung). Dazu ein
   rotierender Farbverlaufs-Rand auf der Karte, ein pulsierender
   Absenden-Button, und ein Vollbild-Overlay (.login-checking), das
   erscheint, während der POST läuft/die Zugangsdaten geprüft werden.
   ======================================================================= */
.login-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(var(--accent-rgb), 0.16), transparent 60%),
    radial-gradient(1000px 600px at 100% 110%, rgba(96, 165, 250, 0.14), transparent 60%);
}

.login-orb {
  position: absolute; border-radius: 50%; filter: blur(70px);
  opacity: 0.32; will-change: transform, opacity;
  animation: loginOrbFloat 22s ease-in-out infinite;
}
.login-orb-1 {
  width: 480px; height: 480px; top: -160px; left: -120px;
  background: radial-gradient(circle, var(--accent), transparent 72%);
  animation-duration: 21s;
}
.login-orb-2 {
  width: 420px; height: 420px; bottom: -180px; right: -140px;
  background: radial-gradient(circle, var(--color-info), transparent 72%);
  animation-duration: 27s; animation-delay: -5s;
}
.login-orb-3 {
  width: 300px; height: 300px; top: 55%; left: 78%;
  background: radial-gradient(circle, var(--color-income), transparent 72%);
  animation-duration: 25s; animation-delay: -11s; opacity: 0.22;
}
.login-orb-4 {
  width: 260px; height: 260px; top: 8%; left: 62%;
  background: radial-gradient(circle, var(--color-expense), transparent 72%);
  animation-duration: 19s; animation-delay: -3s; opacity: 0.18;
}
[data-theme="light"] .login-orb { opacity: 0.16; }
[data-theme="light"] .login-orb-3, [data-theme="light"] .login-orb-4 { opacity: 0.12; }

@keyframes loginOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(60px, -45px) scale(1.12) rotate(8deg); }
  50% { transform: translate(-30px, 25px) scale(0.94) rotate(-6deg); }
  75% { transform: translate(-55px, -20px) scale(1.06) rotate(4deg); }
}

.login-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.10) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, black, transparent 72%);
  opacity: 0.5;
  animation: loginGridPan 34s linear infinite;
}
[data-theme="light"] .login-grid { opacity: 0.25; }
@keyframes loginGridPan {
  from { background-position: 0 0, 0 0; }
  to { background-position: 460px 460px, 460px 460px; }
}

.login-scanline {
  position: absolute; left: 0; right: 0; height: 140px; top: -140px;
  background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), 0.16) 45%, rgba(var(--accent-rgb), 0.30) 50%, rgba(var(--accent-rgb), 0.16) 55%, transparent);
  animation: loginScan 7s ease-in-out infinite;
  filter: blur(1px);
}
@keyframes loginScan {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 1; }
  50% { transform: translateY(64vh); opacity: 1; }
  60% { opacity: 0; }
  100% { transform: translateY(64vh); opacity: 0; }
}

.login-particles { position: absolute; inset: 0; }
.login-particles i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--accent-light); box-shadow: 0 0 6px 1px rgba(var(--accent-rgb), 0.8);
  opacity: 0; animation: loginTwinkle 5.5s ease-in-out infinite;
}
.login-particles i:nth-child(1) { top: 12%; left: 18%; animation-delay: 0.1s; }
.login-particles i:nth-child(2) { top: 24%; left: 82%; animation-delay: 1.1s; }
.login-particles i:nth-child(3) { top: 68%; left: 8%; animation-delay: 2.0s; }
.login-particles i:nth-child(4) { top: 80%; left: 70%; animation-delay: 0.6s; }
.login-particles i:nth-child(5) { top: 40%; left: 46%; animation-delay: 2.8s; }
.login-particles i:nth-child(6) { top: 15%; left: 55%; animation-delay: 1.7s; }
.login-particles i:nth-child(7) { top: 88%; left: 30%; animation-delay: 3.4s; }
.login-particles i:nth-child(8) { top: 58%; left: 90%; animation-delay: 0.9s; }
@keyframes loginTwinkle {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.6); }
  50% { opacity: 0.9; transform: translateY(-14px) scale(1.3); }
}

/* Farbverlaufs-Rand auf der Login-Karte: dreht sich EINMAL beim Einflug in
   Position (statt sich für immer zu drehen – das nervte, siehe Nutzer-Feedback
   zur alten Version) und bleibt danach ruhig stehen. */
.login-card { isolation: isolate; }
.login-card::after {
  content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: inherit;
  background: conic-gradient(from 0deg, var(--accent), var(--color-info), var(--color-income), var(--accent-light), var(--accent));
  opacity: 0;
  animation: cardBorderSettle 780ms cubic-bezier(0.16, 1, 0.3, 1) 480ms both;
}
@keyframes cardBorderSettle {
  from { opacity: 0; transform: rotate(-200deg) scale(0.7); }
  60% { opacity: 0.7; }
  to { opacity: 0.6; transform: rotate(0deg) scale(1); }
}

/* Absenden-Button: sanfter Dauerpuls, damit die Karte lebendig bleibt */
.login-card form .btn.btn-primary {
  animation: fadeUp 380ms var(--ease) 800ms both, loginBtnPulse 2.6s ease-in-out infinite 1.7s;
}
@keyframes loginBtnPulse {
  0%, 100% { box-shadow: 0 8px 22px -8px rgba(var(--accent-rgb), 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
  50% { box-shadow: 0 10px 34px -6px rgba(var(--accent-rgb), 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
}
body.is-checking .login-card {
  transform: scale(0.97);
  filter: saturate(1.25);
  transition: transform 420ms var(--ease), filter 420ms var(--ease);
}

/* ---- Checking-Overlay: läuft, solange die Zugangsdaten geprüft werden ---- */
.login-checking {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.7rem;
  opacity: 0; pointer-events: none; transition: opacity 320ms var(--ease);
}
.login-checking.is-active { opacity: 1; pointer-events: auto; }
.login-checking-backdrop {
  position: absolute; inset: 0; background: rgba(4, 6, 12, 0.72); backdrop-filter: blur(8px);
}
[data-theme="light"] .login-checking-backdrop { background: rgba(240, 242, 248, 0.8); }

.checking-core { position: relative; z-index: 1; width: 128px; height: 128px; display: flex; align-items: center; justify-content: center; }

/* -- Variante "rings" (Standard): drei gegenläufig rotierende Ringe -- */
.checking-rings span {
  position: absolute; border-radius: 50%; border: 2px solid transparent;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.checking-rings span:nth-child(1) {
  width: 128px; height: 128px; border-top-color: var(--accent); border-right-color: var(--accent);
  animation: checkSpin 1.1s linear infinite;
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.7));
}
.checking-rings span:nth-child(2) {
  width: 94px; height: 94px; border-bottom-color: var(--color-info); border-left-color: var(--color-info);
  animation: checkSpinReverse 1.5s linear infinite;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.6));
}
.checking-rings span:nth-child(3) {
  width: 62px; height: 62px; border-top-color: var(--color-income); border-left-color: var(--color-income);
  animation: checkSpin 0.85s linear infinite;
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.6));
}
@keyframes checkSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes checkSpinReverse { to { transform: translate(-50%, -50%) rotate(-360deg); } }

.checking-icon {
  position: relative; z-index: 1; width: 34px; height: 34px; color: var(--accent);
  animation: checkPulse 1.3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.75));
}
.checking-icon svg { width: 100%; height: 100%; }
@keyframes checkPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.16); opacity: 1; }
}

.checking-particles { position: absolute; inset: 0; }
.checking-particles i {
  position: absolute; top: 50%; left: 50%; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent-light); box-shadow: 0 0 8px 2px rgba(var(--accent-rgb), 0.8);
  animation: checkParticle 1.8s ease-out infinite;
}
@keyframes checkParticle {
  0% { transform: translate(-50%, -50%) translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}
.checking-particles i:nth-child(1) { --dx: 70px; --dy: 0px; animation-delay: 0s; }
.checking-particles i:nth-child(2) { --dx: 49px; --dy: 49px; animation-delay: 0.15s; }
.checking-particles i:nth-child(3) { --dx: 0px; --dy: 70px; animation-delay: 0.3s; }
.checking-particles i:nth-child(4) { --dx: -49px; --dy: 49px; animation-delay: 0.45s; }
.checking-particles i:nth-child(5) { --dx: -70px; --dy: 0px; animation-delay: 0.6s; }
.checking-particles i:nth-child(6) { --dx: -49px; --dy: -49px; animation-delay: 0.75s; }
.checking-particles i:nth-child(7) { --dx: 0px; --dy: -70px; animation-delay: 0.9s; }
.checking-particles i:nth-child(8) { --dx: 49px; --dy: -49px; animation-delay: 1.05s; }

/* -- Variante "orbit": Elektronen-artige Punkte kreisen auf drei Bahnen um das Schloss -- */
.checking-orbit-guides span {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
}
.checking-orbit-guides span:nth-child(1) { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
.checking-orbit-guides span:nth-child(2) { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
.checking-orbit-guides span:nth-child(3) { width: 128px; height: 128px; margin: -64px 0 0 -64px; }
.orbit-path {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  animation: orbitSpin linear infinite;
}
.orbit-path i {
  position: absolute; top: -3px; left: 50%; margin-left: -3px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-light); box-shadow: 0 0 10px 3px rgba(var(--accent-rgb), 0.8);
}
.orbit-path-1 { width: 60px; height: 60px; margin: -30px 0 0 -30px; animation-duration: 1.6s; }
.orbit-path-2 {
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  animation-duration: 2.4s; animation-direction: reverse;
}
.orbit-path-2 i { background: var(--color-info); box-shadow: 0 0 10px 3px rgba(96, 165, 250, 0.75); }
.orbit-path-3 { width: 128px; height: 128px; margin: -64px 0 0 -64px; animation-duration: 3.2s; }
.orbit-path-3 i { background: var(--color-income); box-shadow: 0 0 10px 3px rgba(52, 211, 153, 0.7); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

/* -- Variante "gyro": drei taumelnde Ringe, wie ein Gyroskop (2D-Ellipsen-Trick) -- */
.checking-gyro { position: absolute; inset: 0; }
.gyro-ring {
  position: absolute; top: 50%; left: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px;
  border-radius: 50%; border: 2px solid transparent;
  animation: gyroTumble 2.4s ease-in-out infinite;
}
.gyro-ring-1 {
  border-top-color: var(--accent); border-bottom-color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.6));
}
.gyro-ring-2 {
  border-left-color: var(--color-info); border-right-color: var(--color-info);
  animation-delay: -0.8s;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.55));
}
.gyro-ring-3 {
  border-top-color: var(--color-income); border-left-color: var(--color-income);
  animation-delay: -1.6s;
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.5));
}
@keyframes gyroTumble {
  0% { transform: rotate(0deg) scaleY(0.25); }
  50% { transform: rotate(180deg) scaleY(1); }
  100% { transform: rotate(360deg) scaleY(0.25); }
}

.checking-text {
  position: relative; z-index: 1;
  font-size: 0.92rem; font-weight: 600; color: var(--text-secondary);
  display: flex; align-items: baseline; gap: 0.15rem;
  animation: fadeUp 380ms var(--ease) 80ms both;
}
.checking-text .dots span { animation: checkDot 1.2s ease-in-out infinite; opacity: 0.25; }
.checking-text .dots span:nth-child(1) { animation-delay: 0s; }
.checking-text .dots span:nth-child(2) { animation-delay: 0.2s; }
.checking-text .dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes checkDot {
  0%, 60%, 100% { opacity: 0.25; }
  30% { opacity: 1; }
}

.login-card form .btn:disabled { opacity: 0.75; cursor: progress; transform: none !important; }

/* =======================================================================
   Login-Intro-Effekt: „etwas fliegt rein, explodiert, daraus entsteht die
   Login-Karte" – ersetzt die alte Dauerdrehung des Kartenrands. Warp wurde
   nach dem Vergleich mehrerer Varianten fest gewählt (siehe login.php).
   Läuft einmal beim Laden ab; danach bleibt nur der ohnehin vorhandene,
   ruhige Glow-Puls der Karte übrig.
   ======================================================================= */
.login-shell { position: relative; }
.login-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.login-fx > * { position: absolute; top: 50%; left: 50%; }

/* -- gemeinsamer Einschlag: Blitz, Schockringe, Funken -- */
.fx-flash {
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--accent-light) 40%, transparent 72%);
  opacity: 0; transform: scale(0.3); filter: blur(1px);
  animation: fxFlash 520ms ease-out 470ms both;
}
@keyframes fxFlash {
  0% { opacity: 0; transform: scale(0.2); }
  18% { opacity: 1; transform: scale(2.6); }
  45% { opacity: 0.55; transform: scale(4.6); }
  100% { opacity: 0; transform: scale(6.4); }
}
.fx-ring {
  width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 2px solid var(--accent-light); opacity: 0; transform: scale(0.4);
  animation: fxRing 620ms ease-out 490ms both;
}
.fx-ring-2 { border-color: var(--color-info); animation-delay: 550ms; }
@keyframes fxRing {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(13); }
}
.fx-sparks i {
  position: absolute; top: 0; left: 0; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent-light); box-shadow: 0 0 8px 2px rgba(var(--accent-rgb), 0.85);
  opacity: 0; animation: fxSpark 640ms ease-out 480ms both;
}
@keyframes fxSpark {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}
.fx-sparks i:nth-child(1) { --dx: 92px; --dy: -8px; }
.fx-sparks i:nth-child(2) { --dx: 68px; --dy: 62px; animation-delay: 505ms; }
.fx-sparks i:nth-child(3) { --dx: 4px; --dy: 92px; animation-delay: 530ms; }
.fx-sparks i:nth-child(4) { --dx: -64px; --dy: 66px; animation-delay: 495ms; }
.fx-sparks i:nth-child(5) { --dx: -92px; --dy: -4px; animation-delay: 520ms; }
.fx-sparks i:nth-child(6) { --dx: -60px; --dy: -70px; animation-delay: 485ms; }
.fx-sparks i:nth-child(7) { --dx: 8px; --dy: -94px; animation-delay: 545ms; }
.fx-sparks i:nth-child(8) { --dx: 66px; --dy: -66px; animation-delay: 500ms; }
.fx-sparks i:nth-child(9) { --dx: 40px; --dy: 30px; animation-delay: 560ms; }
.fx-sparks i:nth-child(10) { --dx: -35px; --dy: 40px; animation-delay: 515ms; }

/* -- Warp: Lichtstreifen ziehen aus allen Richtungen zusammen (fest gewählte
   Einflug-Variante; comet/portal/shatter wurden nach dem Vergleich verworfen) -- */
.fx-warp-streaks i {
  position: absolute; top: 0; left: 0; width: 2px; height: 90px; margin: -45px 0 0 -1px;
  background: linear-gradient(180deg, transparent, var(--accent-light), transparent);
  opacity: 0; transform-origin: center;
  animation: fxWarpIn 480ms cubic-bezier(0.4, 0, 0.6, 1) both;
}
@keyframes fxWarpIn {
  0% { opacity: 0; transform: rotate(var(--ang)) translateY(-46vh) scaleY(1.6); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: rotate(var(--ang)) translateY(0) scaleY(0.4); }
}
.fx-warp-streaks i:nth-child(1) { --ang: 0deg; }
.fx-warp-streaks i:nth-child(2) { --ang: 45deg; animation-delay: 20ms; }
.fx-warp-streaks i:nth-child(3) { --ang: 90deg; animation-delay: 40ms; }
.fx-warp-streaks i:nth-child(4) { --ang: 135deg; animation-delay: 10ms; }
.fx-warp-streaks i:nth-child(5) { --ang: 180deg; animation-delay: 30ms; }
.fx-warp-streaks i:nth-child(6) { --ang: 225deg; animation-delay: 15ms; }
.fx-warp-streaks i:nth-child(7) { --ang: 270deg; animation-delay: 35ms; }
.fx-warp-streaks i:nth-child(8) { --ang: 315deg; animation-delay: 25ms; }

/* =======================================================================
   Vorschau-Leiste (nur mit ?preview=1 sichtbar): Checking-Animation-Varianten
   durchklicken und per "Login simulieren" ohne echten Login-Versuch
   auslösen. Für echte Besucher nie im DOM, da PHP sie nur bei ?preview=1
   ausgibt.
   ======================================================================= */
.login-preview-bar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 1000; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem;
  background: rgba(10, 12, 20, 0.78); border: 1px solid var(--border); backdrop-filter: blur(10px);
  padding: 0.55rem 0.7rem; border-radius: var(--radius-lg); max-width: min(92vw, 620px);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.5);
  animation: fadeUp 380ms var(--ease) 1.1s both;
}
[data-theme="light"] .login-preview-bar { background: rgba(255, 255, 255, 0.9); }
.login-preview-bar a, .login-preview-bar button {
  font: inherit; font-size: 0.76rem; padding: 0.4rem 0.7rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-secondary);
  text-decoration: none; cursor: pointer; transition: all var(--dur-fast) var(--ease);
}
.login-preview-bar a:hover, .login-preview-bar button:hover { color: var(--text-primary); border-color: var(--accent); }
.login-preview-bar a.is-active { color: #fff; background: var(--accent); border-color: var(--accent); }
.login-preview-bar .preview-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 0.2rem; }
.login-preview-bar .simulate-btn { color: var(--accent-light); border-color: rgba(var(--accent-rgb), 0.45); }
.login-preview-bar .preview-label {
  font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0 0.15rem;
}
