/* FinanzHub — Monatsbericht-Modal + Finanz-Score */

/* ─── Monatsbericht ─── */
#mb-root { position: fixed; inset: 0; z-index: 480; pointer-events: none; }
#mb-root > * { pointer-events: auto; }
body.mb-open { overflow: hidden; }

.mb-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: mb-fade-in .22s ease-out;
}
@keyframes mb-fade-in { from { opacity: 0; } to { opacity: 1; } }

.mb-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #111;
  border-radius: 24px 24px 0 0;
  padding: 24px 22px max(28px, env(safe-area-inset-bottom, 0px) + 20px);
  max-height: 92vh;
  overflow-y: auto;
  animation: mb-slide-up .35s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.6);
}
@keyframes mb-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@media (min-width: 640px) {
  .mb-sheet {
    left: 50%; right: auto;
    bottom: 50%;
    transform: translate(-50%, 50%);
    max-width: 480px;
    border-radius: 22px;
  }
  @keyframes mb-slide-up {
    from { transform: translate(-50%, 60%); opacity: 0; }
    to   { transform: translate(-50%, 50%); opacity: 1; }
  }
}

.mb-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}
.mb-head-text { display: flex; flex-direction: column; gap: 4px; }
.mb-sub {
  font: 600 11px/1 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.5);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.mb-title {
  font: 800 22px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.95);
  margin: 0;
  letter-spacing: -0.01em;
}
.mb-emoji { margin-right: 4px; }
.mb-close {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(250,250,247,.7);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font: 600 20px/1 Manrope, Inter, sans-serif;
  font-family: inherit;
}

.mb-big {
  text-align: center;
  padding: 16px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 16px;
}
.mb-big-lbl {
  font: 500 12px/1 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.55);
  margin-bottom: 4px;
}
.mb-big-val {
  font: 800 42px/1.05 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.95);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.mb-budget-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font: 600 12.5px/1 Manrope, Inter, sans-serif;
}
.mb-budget-pill.is-pos {
  color: #1D9E75;
  background: rgba(29,158,117,.10);
  border: 1px solid rgba(29,158,117,.32);
}
.mb-budget-pill.is-neg {
  color: #F87171;
  background: rgba(248,113,113,.10);
  border: 1px solid rgba(248,113,113,.32);
}

.mb-compare {
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding: 12px 14px;
  font: 500 13px/1.4 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.78);
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.mb-compare-icon { flex-shrink: 0; font-size: 16px; }

.mb-section { margin-bottom: 20px; }
.mb-section-title {
  font: 600 11px/1 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.5);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.mb-cat-list { display: flex; flex-direction: column; gap: 10px; }
.mb-cat-row {
  display: grid;
  grid-template-columns: 22px 1fr minmax(60px, 1.2fr) auto;
  gap: 10px;
  align-items: center;
}
.mb-cat-rank {
  width: 22px; height: 22px;
  background: rgba(255,255,255,.06);
  color: rgba(250,250,247,.55);
  border-radius: 50%;
  font: 700 11px/22px Manrope, Inter, sans-serif;
  text-align: center;
}
.mb-cat-name {
  font: 500 14px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.92);
}
.mb-cat-bar {
  height: 5px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.mb-cat-bar-fill { height: 100%; border-radius: 99px; }
.mb-cat-val {
  font: 600 13px/1 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.85);
  min-width: 60px;
  text-align: right;
}

.mb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.mb-stat {
  background: rgba(255,255,255,.02);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.mb-stat-val {
  font: 700 18px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.95);
}
.mb-stat-val.is-pos { color: #1D9E75; }
.mb-stat-lbl {
  font: 500 11px/1 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.5);
  margin-top: 2px;
}
.mb-done {
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  background: var(--lime, #b6f84c);
  color: #0a0a0a;
  border: 0;
  font: 700 15px/1 Manrope, Inter, sans-serif;
  cursor: pointer;
  font-family: inherit;
  transition: transform .12s;
}
.mb-done:hover { transform: translateY(-1px); }

/* ─── Finanz-Score ─── */

.fsc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
}
.fsc-card:hover {
  border-color: rgba(255,255,255,.16);
  transform: translateY(-1px);
}
.fsc-ring { flex-shrink: 0; }
.fsc-svg { width: 74px; height: 74px; display: block; }
.fsc-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fsc-label {
  font: 600 11px/1 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.55);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.fsc-sublabel {
  font: 700 17px/1.2 Manrope, Inter, sans-serif;
}
.fsc-hint {
  font: 500 11px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.4);
}
.fsc-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 36px;
  flex-shrink: 0;
}
.fsc-bar {
  width: 6px;
  border-radius: 3px;
  min-height: 4px;
  transition: height .5s ease;
}

/* Modal */
#fsc-modal-root { position: fixed; inset: 0; z-index: 490; pointer-events: none; }
#fsc-modal-root > * { pointer-events: auto; }
body.fsc-open { overflow: hidden; }
.fsc-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.fsc-modal {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #111;
  border-radius: 24px 24px 0 0;
  padding: 24px 22px max(28px, env(safe-area-inset-bottom, 0px) + 20px);
  max-height: 92vh;
  overflow-y: auto;
  animation: mb-slide-up .35s cubic-bezier(.22,.61,.36,1);
}
@media (min-width: 640px) {
  .fsc-modal {
    left: 50%; right: auto;
    bottom: 50%;
    transform: translate(-50%, 50%);
    max-width: 480px;
    border-radius: 22px;
  }
}
.fsc-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.fsc-modal-head h2 {
  font: 700 17px/1 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.95);
  margin: 0;
}
.fsc-modal-close {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(250,250,247,.7);
  width: 32px; height: 32px;
  border-radius: 50%;
  font: 600 20px/1 Manrope, Inter, sans-serif;
  font-family: inherit;
  cursor: pointer;
}
.fsc-big {
  text-align: center;
  padding: 16px 0 22px;
}
.fsc-big-num {
  font: 900 56px/1 Manrope, Inter, sans-serif;
  letter-spacing: -0.03em;
}
.fsc-big-lbl {
  font: 600 15px/1.2 Manrope, Inter, sans-serif;
  margin-top: 6px;
  opacity: .85;
}
.fsc-factor-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.fsc-factor {
  background: rgba(255,255,255,.02);
  border-radius: 12px;
  padding: 12px 14px;
}
.fsc-factor-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.fsc-factor-name {
  font: 600 13.5px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.92);
}
.fsc-factor-pts {
  font: 700 13px/1 Manrope, Inter, sans-serif;
}
.fsc-factor-bar {
  height: 5px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.fsc-factor-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width .6s ease;
}
.fsc-factor-tip {
  font: 500 12px/1.4 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.55);
  margin: 0;
}
.fsc-modal-done {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(250,250,247,.85);
  font: 700 14px/1 Manrope, Inter, sans-serif;
  cursor: pointer;
  font-family: inherit;
}
