/* ============================================================
   Mach mal Digital · Portal — Design-System
   Dunkles internes Werkzeug-CI (bewusster Kontrast zur hellen Website).
   Baubrief §6. Farben = CI-Akzente als LED-Dosierung.
   ============================================================ */

/* ---- CI-Fonts, lokal (kein CDN, Baubrief §6 / CLAUDE.md §14) ---- */
@font-face { font-family: "Saira Condensed"; src: url("../fonts/saira-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Saira Condensed"; src: url("../fonts/saira-condensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ground: #08080a;
  --panel: #131316;
  --panel-2: #17181c;
  --hairline: rgba(255, 255, 255, 0.07);
  --text-primary: #f2f1ec;
  --text-secondary: #b9bac2;
  --text-muted: #74757f;
  --cyan: #38c6de;   --cyan-rgb: 56, 198, 222;
  --gold: #e9b200;   --gold-rgb: 233, 178, 0;
  --red: #d8452a;    --red-rgb: 216, 69, 42;
  --up: #34d399;     --up-rgb: 52, 211, 153;
  --font-display: "Saira Condensed", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Montserrat", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); /* eine Kurve fürs ganze Portal, Baubrief §6 */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ground);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }
a { color: var(--cyan); text-decoration: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- App-Shell ---- */
.app-shell { max-width: 1000px; margin: 0 auto; padding: 20px 22px 120px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding-bottom: 18px; margin-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 23px; letter-spacing: 0.01em; margin: 0; }
.wordmark .accent { background: linear-gradient(90deg, var(--cyan), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.05); color: var(--text-secondary);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }
/* Beschriftete Topbar-Knöpfe (Icon + Text) — statt kryptischer Symbole */
.action-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); color: var(--text-secondary);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.action-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }
.action-btn svg { flex: none; }

/* ---- Navigation ---- */
.nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; }
.nav-item {
  font-size: 13.5px; color: var(--text-secondary);
  padding: 8px 16px; border-radius: 999px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-item:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.nav-item.active { color: var(--cyan); background: rgba(var(--cyan-rgb), 0.12); font-weight: 600; }

/* ---- Sektionen / Karten ---- */
section.block { margin-bottom: 28px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 0 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title .st-action { font-size: 12px; font-weight: 600; color: var(--cyan); }

.card {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.card.pad { padding: 20px 22px; }

/* ---- Heute / To-Do ---- */
.reco-line {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; margin-bottom: 12px;
  background: rgba(var(--cyan-rgb), 0.08);
  border: 1px solid rgba(var(--cyan-rgb), 0.25);
  border-radius: 12px; font-size: 13.5px; color: var(--text-primary);
}
.reco-line b { color: var(--cyan); }

.todo-card { padding: 6px 20px; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.todo-item:last-child { border-bottom: none; }
.todo-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--text-muted); flex: none; cursor: pointer; transition: all 0.15s var(--ease); display: flex; align-items: center; justify-content: center; }
.todo-check:hover { border-color: var(--up); }
.todo-check.done { background: var(--up); border-color: var(--up); }
.todo-check.done::after { content: "✓"; color: #04231a; font-size: 13px; font-weight: 800; }
.todo-time { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; width: 62px; flex: none; }
.source-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.todo-text { flex: 1; font-size: 14px; }
.todo-text.done { color: var(--text-muted); text-decoration: line-through; }
.empty-line { padding: 16px 0; color: var(--text-muted); font-size: 13.5px; text-align: center; }

/* ---- KPI / Ziel ---- */
.goal-row { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 18px; }
.kpi-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.goal-card { padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.goal-card .goal-label { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.goal-edit { font-size: 11px; color: var(--cyan); margin-top: 5px; cursor: pointer; }
.streak { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 11px; font-weight: 600; color: var(--gold); background: rgba(var(--gold-rgb), 0.12); padding: 4px 11px; border-radius: 999px; }

.kpi-card { padding: 20px; display: flex; flex-direction: column; justify-content: center; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.badge { flex: none; width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.badge.cyan { background: var(--cyan); color: #04262d; box-shadow: 0 0 16px rgba(var(--cyan-rgb), 0.5); }
.badge.gold { background: var(--gold); color: #332400; box-shadow: 0 0 16px rgba(var(--gold-rgb), 0.45); }
.badge.red { background: var(--red); color: #2c0e06; box-shadow: 0 0 16px rgba(var(--red-rgb), 0.45); }
.trend { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(var(--up-rgb), 0.14); color: var(--up); white-space: nowrap; }
.kpi-card .label { font-size: 13px; color: var(--text-secondary); margin: 0 0 6px; }
.kpi-card .value { font-family: var(--font-display); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.week-bars { display: flex; gap: 5px; align-items: flex-end; height: 34px; flex: none; }
.week-bars i { display: block; width: 9px; border-radius: 3px; background: rgba(var(--cyan-rgb), 0.35); }
.week-bars i.today { background: var(--cyan); box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.6); }
.week-bars i.future { background: rgba(255, 255, 255, 0.07); }

/* ---- Alert / Braucht Aufmerksamkeit ---- */
.alert-card { border-color: rgba(var(--red-rgb), 0.35); padding: 6px 20px; }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.alert-item:last-child { border-bottom: none; }
.alert-ico { flex: none; width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.alert-ico.red { background: rgba(var(--red-rgb), 0.15); color: var(--red); }
.alert-ico.gold { background: rgba(var(--gold-rgb), 0.15); color: var(--gold); }
.alert-ico.cyan { background: rgba(var(--cyan-rgb), 0.15); color: var(--cyan); }
.alert-ico.doc { font-size: 9px; letter-spacing: 0.02em; }
.alert-text { flex: 1; font-size: 13.5px; }
.alert-text small { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 1px; }
.alert-action { flex: none; font-size: 11.5px; font-weight: 600; color: var(--cyan); background: rgba(var(--cyan-rgb), 0.12); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }

/* ---- Charts ---- */
.chart-card { padding: 22px 24px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.chart-head h3 { font-size: 14px; font-weight: 600; margin: 0 0 3px; color: var(--text-primary); }
.chart-sub { font-size: 11.5px; color: var(--text-muted); }
.chart-stats { display: flex; gap: 22px; }
.stat-mini-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.stat-mini-value { font-family: var(--font-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-mini-value.cyan { color: var(--cyan); }
.stat-mini-value.gold { color: var(--gold); }
.months { display: flex; justify-content: space-between; padding: 0 6px; margin-top: 4px; }
.months span { font-size: 11px; color: var(--text-muted); }

/* ---- Stufen-Balken (Kunden) ---- */
.stage-bars { display: flex; flex-direction: column; gap: 16px; }
.stage-bar-row { display: flex; align-items: center; gap: 12px; }
.stage-bar-label { font-size: 12.5px; color: var(--text-secondary); width: 150px; flex: none; }
.stage-bar-track { flex: 1; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.stage-bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s var(--ease); }
.stage-bar-count { font-family: var(--font-display); font-size: 16px; font-weight: 700; width: 26px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.funnel-line { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); display: flex; gap: 24px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.funnel-line b { color: var(--text-primary); font-family: var(--font-display); font-size: 15px; }

/* ---- Postfächer ---- */
.duo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mailbox { padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.mailbox .mb-info { flex: 1; min-width: 0; }
.mailbox .mb-name { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.mailbox .mb-address { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailbox .mb-count { flex: none; font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }

/* ---- Pipeline-Streifen ---- */
.pipe-strip { display: flex; align-items: stretch; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.pipe-step { flex: 1; min-width: 110px; display: flex; align-items: center; gap: 10px; }
.pipe-count { font-family: var(--font-display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pipe-meta { font-size: 12px; color: var(--text-muted); line-height: 1.3; }
.pipe-bar { width: 4px; border-radius: 2px; align-self: stretch; flex: none; }

/* ---- Formularelemente ---- */
.field { width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); border-radius: 10px; padding: 11px 14px; color: var(--text-primary); transition: border-color 0.2s var(--ease); }
.field:focus { outline: none; border-color: rgba(var(--cyan-rgb), 0.6); }
.field::placeholder { color: var(--text-muted); }
textarea.field { resize: vertical; min-height: 72px; line-height: 1.5; }
label.flabel { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 7px; }
.form-group { margin-bottom: 16px; }
.lookup-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 10px; }
.lookup-row .field { flex: 1; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip-btn { font-size: 12.5px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); transition: all 0.15s var(--ease); }
.chip-btn:hover { background: rgba(255, 255, 255, 0.1); }
.chip-btn.active { background: rgba(var(--cyan-rgb), 0.18); color: var(--cyan); font-weight: 600; }
.chip-btn.active.gold { background: rgba(var(--gold-rgb), 0.18); color: var(--gold); }
.chip-btn.active.red { background: rgba(var(--red-rgb), 0.18); color: var(--red); }

.btn-primary { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #04262d; background: var(--cyan); padding: 11px 20px; border-radius: 10px; box-shadow: 0 0 16px rgba(var(--cyan-rgb), 0.4); transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease); }
.btn-primary:hover { box-shadow: 0 0 24px rgba(var(--cyan-rgb), 0.6); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-secondary); background: rgba(255, 255, 255, 0.05); padding: 10px 16px; border-radius: 10px; transition: all 0.15s var(--ease); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }

.autocomplete-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--cyan); background: rgba(var(--cyan-rgb), 0.08); border: 1px dashed rgba(var(--cyan-rgb), 0.4); padding: 10px 13px; border-radius: 10px; margin: -4px 0 14px; cursor: pointer; }
.dupe-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--gold); background: rgba(var(--gold-rgb), 0.09); border: 1px dashed rgba(var(--gold-rgb), 0.4); padding: 10px 13px; border-radius: 10px; margin: -4px 0 14px; }

/* ---- Kontakt-/Anrufliste ---- */
.list-stats { display: flex; gap: 24px; margin-bottom: 16px; align-items: baseline; flex-wrap: wrap; }
.list-stats .stat-mini-value { font-size: 18px; }
.calls-card { padding: 14px 22px; }
.call-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.call-row:last-child { border-bottom: none; }
.call-row .cr-main { min-width: 0; flex: 1; cursor: pointer; }
.call-firma { font-size: 14px; font-weight: 600; }
.call-branche { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.priority-star { color: var(--gold); font-size: 12px; margin-right: 4px; }
.status-chip { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; flex: none; white-space: nowrap; }
.status-chip.gold { background: rgba(var(--gold-rgb), 0.16); color: var(--gold); }
.status-chip.cyan { background: rgba(var(--cyan-rgb), 0.16); color: var(--cyan); }
.status-chip.muted { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }
.status-chip.outline { background: transparent; border: 1px solid var(--hairline); color: var(--text-muted); }
.status-chip.up { background: rgba(var(--up-rgb), 0.14); color: var(--up); }
.status-chip.red { background: rgba(var(--red-rgb), 0.16); color: var(--red); }
.stage-actions { display: flex; gap: 6px; flex: none; }
.call-action { flex: none; font-size: 11px; font-weight: 600; padding: 5px 11px; border-radius: 999px; white-space: nowrap; transition: all 0.15s var(--ease); }
.call-action.cyan { color: var(--cyan); background: rgba(var(--cyan-rgb), 0.12); }
.call-action.cyan:hover { background: rgba(var(--cyan-rgb), 0.22); }
.call-action.gold { color: var(--gold); background: rgba(var(--gold-rgb), 0.14); }
.call-action.gold:hover { background: rgba(var(--gold-rgb), 0.24); }
.call-next { font-size: 12px; color: var(--text-secondary); width: 100%; margin-top: 2px; }
.util-actions { display: flex; gap: 6px; flex: none; }
.util-action { font-size: 11px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--text-secondary); white-space: nowrap; transition: all 0.15s var(--ease); }
.util-action:hover { border-color: rgba(var(--cyan-rgb), 0.5); color: var(--cyan); }

.empty-state { border: 1px dashed var(--hairline); border-radius: 12px; padding: 20px; text-align: center; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.stub-note { border: 1px dashed rgba(var(--cyan-rgb), 0.3); border-radius: 12px; padding: 22px; text-align: center; font-size: 13px; color: var(--text-secondary); line-height: 1.6; background: rgba(var(--cyan-rgb), 0.04); }
.stub-note b { color: var(--cyan); }

/* ---- Kalender (Wochen-Agenda) ---- */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.week-col { background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: 12px; min-height: 90px; }
.week-col-head { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; text-transform: capitalize; }
.week-event { display: flex; align-items: flex-start; gap: 6px; padding: 5px 0; font-size: 12px; line-height: 1.4; }
.week-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; }
.week-dot.cyan { background: var(--cyan); box-shadow: 0 0 6px rgba(var(--cyan-rgb), 0.7); }
.week-dot.gold { background: var(--gold); box-shadow: 0 0 6px rgba(var(--gold-rgb), 0.6); }
.week-event-text b { font-variant-numeric: tabular-nums; color: var(--text-secondary); font-weight: 600; }
.week-empty { font-size: 12px; color: var(--text-muted); }

/* ---- FAB ---- */
.fab { position: fixed; right: 26px; bottom: 26px; display: flex; align-items: center; gap: 8px; background: var(--cyan); color: #04262d; font-size: 13.5px; font-weight: 700; padding: 14px 22px; border-radius: 999px; box-shadow: 0 0 24px rgba(var(--cyan-rgb), 0.55), 0 8px 20px rgba(0, 0, 0, 0.4); z-index: 40; transition: transform 0.15s var(--ease); }
.fab:hover { transform: translateY(-2px); }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 60; overflow-y: auto; }
.modal { background: var(--panel-2); border: 1px solid var(--hairline); border-radius: 18px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); animation: modal-in 0.25s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--hairline); }
.modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--hairline); display: flex; justify-content: flex-end; gap: 10px; }

/* ---- Detail-Ansicht ---- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.detail-head h2 { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin: 0 0 6px; }
.detail-meta { font-size: 13px; color: var(--text-muted); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.detail-field { background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: 13px 16px; }
.detail-field .df-label { font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px; }
.detail-field .df-value { font-size: 14px; }
.timeline { position: relative; padding-left: 22px; }
.timeline-item { position: relative; padding: 0 0 18px 0; }
.timeline-item::before { content: ""; position: absolute; left: -16px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.timeline-item::after { content: ""; position: absolute; left: -12.5px; top: 13px; width: 1px; bottom: -5px; background: var(--hairline); }
.timeline-item:last-child::after { display: none; }
.timeline-date { font-size: 11px; color: var(--text-muted); }
.timeline-text { font-size: 13.5px; margin-top: 2px; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--up); color: #04231a; font-size: 13.5px; font-weight: 700; padding: 12px 22px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); z-index: 80; animation: toast-in 0.3s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---- Login ---- */
.login-stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.login-bg { position: absolute; inset: 0; background-image: url("../assets/logo.png"); background-repeat: no-repeat; background-position: center; background-size: min(78%, 620px); opacity: 0.16; pointer-events: none; }
.login-box { position: relative; z-index: 1; width: 340px; max-width: calc(100% - 40px); background: rgba(14, 14, 17, 0.92); border: 1.5px solid var(--cyan); border-radius: 18px; padding: 32px 30px 28px; box-shadow: 0 0 4px rgba(var(--cyan-rgb), 0.9), 0 0 18px rgba(var(--cyan-rgb), 0.55), 0 0 50px rgba(var(--cyan-rgb), 0.3), inset 0 0 22px rgba(var(--cyan-rgb), 0.08); text-align: center; }
.login-box h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.login-box .login-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 22px; }
.login-box .field { margin-bottom: 12px; text-align: left; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .app-shell { padding: 16px 14px 110px; }
  .goal-row, .duo-grid, .detail-grid, .kpi-3col, .week-grid { grid-template-columns: 1fr; }
  .lookup-row.wrap-mobile { flex-wrap: wrap; }
  .lookup-row.wrap-mobile > :first-child { flex: 1 1 100%; }
  .nav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: none; }
  .pipe-step { min-width: 45%; }
  .fab { right: 16px; bottom: 16px; padding: 13px 18px; }
  .fab .fab-text { display: none; }
  .stage-bar-label { width: 108px; font-size: 11.5px; }
  .chart-stats { gap: 16px; }
  .call-next { margin-top: 6px; }
}
