/* ═══════════════════════════════════════════════════════════════════════════
   Umsatzziele · Fahrrad XXL Fürth
   Design 1:1 aus der RPM-App übernommen (Poppins, Rot/Maroon, Kacheln, Karten).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --red:        #d90128;
  --red-dark:   #a80020;
  --maroon:     #6e0016;
  --maroon-dark:#4a000f;
  --black:      #1a1a1a;
  --white:      #ffffff;
  --gray-bg:    #f7f3f1;
  --gray-mid:   #e5ded9;
  --gray-txt:   #5c5450;
  --green:      #2e8b3d;
  --green-dark: #216b2c;
  --amber:      #f2c30f;
  --amber-dark: #b98600;
  --blue:       #1565c0;
  --blue-dark:  #0d47a1;
  --font-sans: 'Poppins', system-ui, sans-serif;
  --font-mono: 'Poppins', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--gray-bg);
  color: var(--black);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  background-image:
    radial-gradient(1100px 800px at 100% -10%, rgba(217,1,40,0.05), transparent 55%),
    radial-gradient(900px 700px at -10% 110%, rgba(110,0,22,0.05), transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
.hidden { display: none !important; }

/* ── TOPBAR ──────────────────────────────────────────────────────────────── */
.topbar {
  background: linear-gradient(120deg, var(--maroon-dark), var(--maroon) 70%);
  min-height: 56px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--red);
}
.logo { display: flex; align-items: center; gap: 11px; min-width: 0; }
.logo-icon { width: 30px; height: 30px; background: var(--black); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-icon svg { width: 18px; height: 18px; }
.logo-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.logo-app { font-weight: 800; font-size: 1.15rem; color: var(--white); line-height: 1.05; white-space: nowrap; }
.logo-wordmark { font-weight: 600; font-size: 0.62rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.09em; line-height: 1.1; }
.logo-wordmark span { color: rgba(255,255,255,0.85); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.user-chip { font-size: 0.8rem; font-weight: 700; color: var(--white); background: rgba(255,255,255,0.14); padding: 6px 13px; border-radius: 20px; white-space: nowrap; }
.user-chip b { font-weight: 800; }
.monat-select {
  background: rgba(255,255,255,0.14); color: var(--white); border: none; border-radius: 20px;
  padding: 7px 34px 7px 14px; font-size: 0.8rem; font-weight: 700; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
.monat-select option { color: var(--black); }
.topbar-btn {
  background: none; border: 1.5px solid rgba(255,255,255,0.35); color: var(--white);
  font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 13px; border-radius: 20px;
}
.topbar-btn:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

/* ── LAYOUT ──────────────────────────────────────────────────────────────── */
.app-shell { max-width: 1000px; margin: 0 auto; padding: 28px 20px 70px; }
.screen { display: none; }
.screen.active { display: block; animation: fade-in 0.2s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card { background: var(--white); border: 1px solid var(--gray-mid); border-radius: 10px; padding: 22px; }
.card + .card { margin-top: 18px; }
.section-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gray-txt); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.section-label::before { content: ''; width: 3px; height: 13px; background: var(--red); flex-shrink: 0; }
.section-label .label-right { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }

.page-heading { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; }
.page-sub { color: var(--gray-txt); font-size: 0.95rem; font-weight: 500; margin-bottom: 22px; }

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: none; border-radius: 10px; font-weight: 800; letter-spacing: 0.02em;
  padding: 15px 20px; font-size: 1.02rem; text-transform: uppercase;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:not(:disabled):hover { background: var(--red-dark); }
.btn-success { background: var(--green); color: var(--white); }
.btn-success:not(:disabled):hover { background: var(--green-dark); }
.btn-outline { background: var(--white); color: var(--black); border: 2px solid var(--gray-mid); }
.btn-outline:not(:disabled):hover { border-color: var(--black); }
.btn-danger-outline { background: var(--white); color: var(--red); border: 2px solid var(--red); }
.btn-danger-outline:not(:disabled):hover { background: #fff0f2; }
.btn-text { background: none; color: var(--gray-txt); text-transform: none; font-weight: 500; padding: 10px; }
.btn-sm { padding: 9px 15px; font-size: 0.78rem; border-radius: 8px; }
.btn-icon { width: 1.05em; height: 1.05em; }

/* ── LOGIN (Hero-Split wie RPM) ──────────────────────────────────────────── */
.login-screen.screen.active { display: grid; }
.login-screen { grid-template-columns: minmax(380px, 45%) 1fr; min-height: 100vh; }
.login-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--red) 0%, var(--maroon) 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 44px; color: var(--white);
}
.login-hero-band { position: absolute; background: rgba(0,0,0,0.16); border-radius: 45% 55% 60% 40% / 50% 40% 60% 50%; }
.login-hero-band.b1 { width: 140%; height: 46%; top: -14%; left: -30%; transform: rotate(-20deg); }
.login-hero-band.b2 { width: 130%; height: 40%; bottom: -12%; right: -35%; transform: rotate(-20deg); background: rgba(0,0,0,0.12); }
.login-hero-top, .login-hero-foot { position: relative; z-index: 1; }
.login-hero-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; animation: hero-rise 0.6s ease-out both; }
.login-hero-icon { width: 46px; height: 46px; background: var(--black); border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.login-hero-icon svg { width: 26px; height: 26px; }
.login-hero-wordmark { font-size: 1.05rem; font-weight: 500; }
.login-hero-wordmark b { font-weight: 900; }
.login-hero-location { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,0.7); }
.login-hero-product { font-size: 3.4rem; font-weight: 900; line-height: 0.95; letter-spacing: -0.02em; margin-bottom: 14px; animation: hero-rise 0.6s ease-out 0.1s both; }
.login-hero-tagline { font-size: 1.15rem; font-weight: 600; max-width: 22ch; color: rgba(255,255,255,0.92); animation: hero-rise 0.6s ease-out 0.2s both; }
.login-hero-foot { font-size: 0.78rem; font-weight: 500; color: rgba(255,255,255,0.65); animation: hero-rise 0.6s ease-out 0.3s both; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.login-form-panel {
  position: relative; display: flex; align-items: center; justify-content: center; padding: 40px;
  background-image: radial-gradient(640px 480px at 108% 8%, rgba(217,1,40,0.055), transparent 60%),
                    radial-gradient(520px 420px at -8% 100%, rgba(110,0,22,0.05), transparent 60%);
}
.login-form-card { width: 100%; max-width: 420px; animation: hero-rise 0.5s ease-out 0.15s both; }
.login-form-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.login-form-eyebrow-bar { width: 3px; height: 13px; background: var(--red); flex-shrink: 0; }
.login-form-eyebrow-text { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gray-txt); }
.login-note {
  background: #fffbe8; border: 1px solid var(--amber); border-radius: 8px;
  padding: 12px 14px; font-size: 0.82rem; color: #6b5200; margin-top: 20px; line-height: 1.5;
}
.login-note b { color: var(--black); }

/* ── FORMULARE ───────────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.field input[type="text"], .field input[type="password"], .field input[type="number"], .field select {
  width: 100%; padding: 15px; font-size: 1.1rem; border: 2px solid var(--gray-mid);
  border-radius: 10px; background: var(--white); appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--red); }
.field-pin input { letter-spacing: 0.4em; font-weight: 700; }
.hint { font-size: 0.8rem; color: var(--gray-txt); margin-top: 6px; }
.error-msg { background: #fff0f2; border: 1px solid var(--red); color: var(--red-dark); padding: 12px 14px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 16px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 150px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── TABS ────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--gray-mid); margin-bottom: 24px; overflow-x: auto; }
.tab-btn {
  background: none; border: none; padding: 12px 18px; font-size: 0.95rem; font-weight: 700;
  color: var(--gray-txt); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tab-btn:hover { color: var(--black); }
.tab-btn.active { color: var(--red); border-bottom-color: var(--red); }

/* ── KPI-KACHELN ─────────────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi-grid--3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid--4 { grid-template-columns: repeat(4, 1fr); }
.kpi-tile { position: relative; background: var(--white); border: 1px solid var(--gray-mid); border-radius: 10px; padding: 19px 16px 17px; text-align: center; overflow: hidden; }
.kpi-tile::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gray-mid); }
.kpi-tile.is-ziel::before   { background: var(--blue); }
.kpi-tile.is-plan::before   { background: var(--black); }
.kpi-tile.is-ist::before    { background: var(--green); }
.kpi-tile.is-fehlt::before  { background: var(--amber); }
.kpi-tile.is-quote::before  { background: var(--red); }
.kpi-value { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi-label { font-size: 0.72rem; color: var(--gray-txt); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.kpi-sub { font-size: 0.72rem; color: var(--gray-txt); margin-top: 5px; font-weight: 600; min-height: 1.1em; }
.kpi-tile.is-erfuellt .kpi-value { color: var(--green-dark); }
.kpi-tile.is-erfuellt::before { background: var(--green); }

/* ── FORTSCHRITTSBALKEN mit Plan-Marker ──────────────────────────────────── */
.progress-wrap { margin: 6px 0 4px; padding-top: 22px; }
.progress-track {
  position: relative; height: 34px; background: var(--gray-bg);
  border: 1px solid var(--gray-mid); border-radius: 8px;
}
.progress-fill { position: absolute; top: 0; bottom: 0; left: 0; max-width: 100%; background: linear-gradient(90deg, var(--maroon), var(--red)); border-radius: 7px 0 0 7px; transition: width 0.4s ease; }
.progress-fill.is-erfuellt { background: linear-gradient(90deg, var(--green-dark), var(--green)); }
.progress-value {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: var(--black);
  text-shadow: 0 0 6px rgba(255,255,255,0.9);
}
.progress-value.on-fill { color: var(--white); text-shadow: 0 1px 4px rgba(0,0,0,0.45); }
.progress-marker { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--black); }
.progress-marker::after {
  content: attr(data-label); position: absolute; top: -19px; left: 50%; transform: translateX(-50%);
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--black); background: var(--white); border: 1px solid var(--gray-mid);
  padding: 1px 6px; border-radius: 10px; white-space: nowrap;
}
.progress-scale { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--gray-txt); font-weight: 600; margin-top: 6px; }

.verdict { margin-top: 20px; padding: 14px 16px; border-radius: 10px; font-weight: 700; font-size: 0.98rem; display: flex; align-items: center; gap: 10px; }
.verdict--gut { background: #e9f6eb; border: 1px solid #bfe3c6; color: var(--green-dark); }
.verdict--warn { background: #fffbe8; border: 1px solid #f0dd93; color: #6b5200; }
.verdict--schlecht { background: #fff0f2; border: 1px solid #f3c1cb; color: var(--red-dark); }
.verdict--neutral { background: var(--gray-bg); border: 1px solid var(--gray-mid); color: var(--gray-txt); }
.verdict svg { width: 20px; height: 20px; flex-shrink: 0; }

.fact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.fact {
  flex: 1; min-width: 150px; background: var(--gray-bg); border: 1px solid var(--gray-mid);
  border-radius: 8px; padding: 11px 13px;
}
.fact-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-txt); }
.fact-value { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ── LEGENDE UNTER DEM BALKEN ────────────────────────────────────────────── */
.plan-legende {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 14px;
  font-size: 0.88rem; font-weight: 600; color: var(--gray-txt);
}
.pl-eintrag { display: flex; align-items: baseline; gap: 8px; }
.pl-eintrag b { color: var(--black); font-weight: 800; font-variant-numeric: tabular-nums; }
.pl-eintrag small { font-size: 0.78rem; font-weight: 600; color: var(--gray-txt); }
.pl-strich { width: 15px; height: 0; border-top: 2px dashed var(--black); flex-shrink: 0; align-self: center; }
.pl-balken { width: 15px; height: 9px; border-radius: 3px; background: linear-gradient(90deg, var(--maroon), var(--red)); flex-shrink: 0; align-self: center; }
.pl-balken.is-erfuellt { background: linear-gradient(90deg, var(--green-dark), var(--green)); }

/* Marker-Beschriftung kippt nach links, sobald sie sonst aus dem Balken ragt */
.progress-marker.label-links::after { left: auto; right: 3px; transform: none; }

/* ── MATRIX (anonyme Punktwolke) ─────────────────────────────────────────── */
.matrix-outer { margin-top: 4px; }
.matrix {
  position: relative; height: 190px; background: var(--gray-bg);
  border: 1px solid var(--gray-mid); border-radius: 10px; overflow: hidden;
}
.matrix-zone { position: absolute; top: 0; bottom: 0; }
.matrix-zone--unter { background: rgba(217,1,40,0.05); }
.matrix-zone--ueber { background: rgba(46,139,61,0.07); }
.matrix-grid-line { position: absolute; top: 0; bottom: 22px; width: 0; border-left: 1px solid var(--gray-mid); }
.matrix-grid-label { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 0.65rem; font-weight: 700; color: var(--gray-txt); }
.matrix-ref { position: absolute; top: 0; bottom: 22px; width: 0; border-left: 2px dashed var(--black); }
.matrix-ref--plan { border-color: var(--blue); }
.matrix-ref--soll { border-color: var(--green-dark); }
.matrix-ref::after {
  content: attr(data-label); position: absolute; top: 4px; left: 4px;
  font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--white); border: 1px solid var(--gray-mid); border-radius: 10px; padding: 1px 6px; white-space: nowrap;
}
.matrix-ref--plan::after { color: var(--blue-dark); }
.matrix-ref--soll::after { color: var(--green-dark); }
.matrix-dot {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gray-txt); border: 2px solid var(--white); transform: translate(-50%, 50%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.matrix-dot--ich {
  width: 26px; height: 26px; background: var(--red); border: 3px solid var(--white);
  z-index: 5; box-shadow: 0 2px 8px rgba(217,1,40,0.45);
}
.matrix-dot--ich::after {
  content: 'DU'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem; font-weight: 900; color: var(--white); letter-spacing: 0.04em;
}
.matrix-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 0.78rem; color: var(--gray-txt); font-weight: 600; }
.matrix-legend span { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gray-txt); flex-shrink: 0; }
.legend-dot--ich { background: var(--red); width: 16px; height: 16px; }
.legend-line { width: 16px; height: 0; border-top: 2px dashed var(--blue); flex-shrink: 0; }
.legend-line--soll { border-color: var(--green-dark); }

/* ── TABELLEN ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--gray-mid); border-radius: 10px; }
.data-table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 0.88rem; }
.data-table th, .data-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--gray-mid); white-space: nowrap; }
.data-table th { background: var(--gray-bg); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-txt); font-weight: 700; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.data-table tfoot td { background: var(--gray-bg); font-weight: 800; border-top: 2px solid var(--gray-mid); }
.data-table tr.is-inaktiv td { color: var(--gray-txt); background: #faf8f7; }
.table-input {
  width: 118px; padding: 7px 9px; font-size: 0.88rem; text-align: right; font-variant-numeric: tabular-nums;
  border: 2px solid var(--gray-mid); border-radius: 7px; background: var(--white); font-weight: 700;
}
.table-input:focus { outline: none; border-color: var(--red); }
.row-actions { display: flex; gap: 6px; }
.icon-btn {
  background: none; border: 1px solid transparent; border-radius: 6px; padding: 5px 9px;
  font-size: 0.76rem; font-weight: 700; color: var(--gray-txt); text-transform: uppercase; letter-spacing: 0.04em;
}
.icon-btn:hover { border-color: var(--gray-mid); background: var(--gray-bg); color: var(--black); }
.icon-btn--danger { color: var(--red); }
.icon-btn--danger:hover { border-color: var(--red); background: #fff0f2; }

.badge { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.badge--vollzeit { background: #e3edfb; color: var(--blue-dark); }
.badge--teilzeit { background: #fdf3d8; color: var(--amber-dark); }
.badge--aushilfe { background: #ece7f6; color: #5b3f9e; }
.badge--inaktiv  { background: var(--gray-mid); color: var(--gray-txt); }
.badge--gut { background: #e3f4e6; color: var(--green-dark); }
.badge--warn { background: #fdf3d8; color: var(--amber-dark); }
.badge--schlecht { background: #fbe3e8; color: var(--red-dark); }

.empty-state { text-align: center; color: var(--gray-txt); padding: 34px 12px; font-size: 0.9rem; }
.pin-cell { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.1em; }

/* ── FEIERTAGE / ARBEITSTAGE ─────────────────────────────────────────────── */
.holiday-list { display: flex; flex-direction: column; gap: 7px; }
.holiday-item {
  display: flex; align-items: center; gap: 12px; background: var(--white);
  border: 1px solid var(--gray-mid); border-radius: 8px; padding: 10px 13px; font-size: 0.9rem;
}
.holiday-item.is-sonntag { background: #faf8f7; color: var(--gray-txt); }
.holiday-date { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 108px; }
.holiday-name { flex: 1; font-weight: 600; }
.info-box {
  background: #eef4fc; border: 1px solid #c5d9f2; border-radius: 8px; padding: 13px 15px;
  font-size: 0.86rem; color: var(--blue-dark); line-height: 1.55; margin-bottom: 16px;
}
.info-box b { font-weight: 800; }
.warn-box {
  background: #fffbe8; border: 1px solid var(--amber); border-radius: 8px; padding: 13px 15px;
  font-size: 0.86rem; color: #6b5200; line-height: 1.55; margin-bottom: 16px;
}
.warn-box b { color: var(--black); }

/* ── MODAL & TOAST ───────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.modal-box { background: var(--white); border-radius: 12px; padding: 24px; max-width: 440px; width: 100%; }
.modal-box--danger { border-top: 5px solid var(--red); }
.modal-box h3 { margin-bottom: 14px; font-size: 1.2rem; }
.modal-text { color: var(--gray-txt); margin-bottom: 20px; font-size: 0.92rem; line-height: 1.5; }
.modal-text b { color: var(--black); }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #1a1a1a; color: #fff; padding: 12px 20px; border-radius: 30px;
  font-size: 0.88rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,0.25); z-index: 400; max-width: 90vw; text-align: center;
}

/* ── RESPONSIV ───────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-hero { padding: 36px 28px; min-height: 240px; }
  .login-hero-product { font-size: 2.6rem; }
  .login-hero-mark { margin-bottom: 26px; }
}
/* Auf dem Handy muss die Kopfleiste eine Zeile bleiben — sonst frisst sie den
   halben Bildschirm. Der Name weicht, die Kennung bleibt. */
@media (max-width: 620px) {
  .topbar { padding: 7px 11px; gap: 7px; flex-wrap: nowrap; min-height: 52px; }
  .nur-breit { display: none; }
  .logo-icon { width: 26px; height: 26px; border-radius: 7px; }
  .logo-icon svg { width: 15px; height: 15px; }
  .logo-app { font-size: 0.98rem; }
  .logo-wordmark { display: none; }
  .topbar-right { gap: 6px; flex-wrap: nowrap; }
  .user-chip {
    font-size: 0.71rem; padding: 5px 9px; max-width: 30vw;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .topbar-btn { font-size: 0.64rem; padding: 5px 8px; letter-spacing: 0.02em; }
  .monat-select { font-size: 0.71rem; padding: 5px 26px 5px 9px; background-position: right 9px center; background-size: 12px; }
  /* Breite Tabellen: waagerecht schiebbar, mit sichtbarem Rand als Hinweis */
  .table-wrap { position: relative; -webkit-overflow-scrolling: touch; }
  .table-wrap::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 22px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.92));
    pointer-events: none; border-radius: 0 10px 10px 0;
  }
  .data-table th, .data-table td { padding: 9px 10px; font-size: 0.82rem; }
  .table-input { width: 92px; }
  .form-actions { gap: 8px; }
  .form-actions .btn { flex: 1 1 auto; }
  .seg { width: 100%; justify-content: stretch; }
  .seg-btn { flex: 1; text-align: center; padding: 8px 10px; }
  .modal-box { padding: 18px 16px; }
  .fact { min-width: 130px; }
  .app-shell { padding: 20px 14px 60px; }
  .kpi-grid, .kpi-grid--3 { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 1.4rem; }
  .card { padding: 18px 15px; }
}

/* ── VERKÄUFER-LAYOUT MIT MENÜ LINKS ─────────────────────────────────────
   Die Übersicht bleibt bewusst schmal: drei Zahlen und ein Balken. Alles
   Weitere hängt im Menü, damit das Dashboard nicht zur Zahlenwand wird.  */
.vk-layout { display: grid; grid-template-columns: 232px 1fr; gap: 22px; align-items: start; }
.vk-menu {
  position: sticky; top: 78px; background: var(--white); border: 1px solid var(--gray-mid);
  border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 3px;
}
.vk-menu-head {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gray-txt); padding: 4px 10px 10px;
}
.vk-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; border-radius: 8px; padding: 11px 12px;
  font-size: 0.92rem; font-weight: 700; color: var(--gray-txt); line-height: 1.2;
}
.vk-menu-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.vk-menu-item:hover { background: var(--gray-bg); color: var(--black); }
.vk-menu-item.active { background: var(--red); color: var(--white); }
.vk-view { display: none; }
.vk-view.active { display: block; animation: fade-in 0.2s ease-out; }

/* ── SEGMENT-UMSCHALTER (Monat / Tag / Stunde) ───────────────────────────── */
.seg {
  display: inline-flex; gap: 3px; background: var(--gray-bg); border: 1px solid var(--gray-mid);
  border-radius: 22px; padding: 3px; margin-bottom: 18px; flex-wrap: wrap;
}
.seg-btn {
  background: none; border: none; border-radius: 20px; padding: 8px 17px;
  font-size: 0.84rem; font-weight: 700; color: var(--gray-txt); white-space: nowrap;
}
.seg-btn:hover { color: var(--black); }
.seg-btn.active { background: var(--red); color: var(--white); }
.seg--sm .seg-btn { padding: 6px 13px; font-size: 0.78rem; }

/* ── IMPORT ──────────────────────────────────────────────────────────────── */
.field textarea {
  width: 100%; padding: 13px; font-size: 0.88rem; border: 2px solid var(--gray-mid);
  border-radius: 10px; background: var(--white); resize: vertical; min-height: 110px;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; line-height: 1.5;
}
.field textarea:focus { outline: none; border-color: var(--red); }
.zuordnung-feld { flex: 1; min-width: 165px; }
.zuordnung-feld label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-txt); margin-bottom: 6px; }
.zuordnung-feld select {
  width: 100%; padding: 9px 30px 9px 11px; font-size: 0.86rem; font-weight: 600;
  border: 2px solid var(--gray-mid); border-radius: 8px; background: var(--white);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 15px;
}
.zuordnung-feld select:focus { outline: none; border-color: var(--red); }
.data-table tr.zeile-neu td      { background: #f2f9f3; }
.data-table tr.zeile-aendert td  { background: #eef4fc; }
.data-table tr.zeile-fehler td   { background: #fdf1f3; color: var(--red-dark); }
.data-table tr.zeile-gleich td   { color: var(--gray-txt); }

.haken {
  display: flex; align-items: center; gap: 10px; padding: 14px 15px;
  border: 2px solid var(--gray-mid); border-radius: 10px; background: var(--white);
  font-size: 0.92rem; font-weight: 600; cursor: pointer; user-select: none;
}
.haken input { width: 19px; height: 19px; accent-color: var(--red); cursor: pointer; flex-shrink: 0; }
.haken:hover { border-color: var(--black); }

/* ── BEREICHSFILTER IM IMPORT ────────────────────────────────────────────── */
.bereich-liste { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.bereich-chip {
  display: flex; align-items: center; gap: 8px; background: var(--white);
  border: 2px solid var(--gray-mid); border-radius: 20px; padding: 7px 14px 7px 10px;
  font-size: 0.84rem; font-weight: 600; cursor: pointer; user-select: none;
}
.bereich-chip input { width: 16px; height: 16px; accent-color: var(--red); cursor: pointer; }
.bereich-chip.aus { opacity: 0.55; border-style: dashed; }
.bereich-chip small { color: var(--gray-txt); font-weight: 600; }

/* ── ZIEL-TABELLE (Verkäufer-Detail) ─────────────────────────────────────── */
.data-table td.bezug { font-weight: 700; }
.data-table td.bezug small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--gray-txt); }

@media (max-width: 900px) {
  .vk-layout { grid-template-columns: 1fr; }
  .vk-menu {
    position: static; flex-direction: row; overflow-x: auto; padding: 8px; gap: 4px;
  }
  .vk-menu-head { display: none; }
  .vk-menu-item { width: auto; white-space: nowrap; padding: 9px 13px; font-size: 0.85rem; }
  .vk-menu-item svg { display: none; }
}

/* Abzeichen am Warnungen-Tab: zeigt offene Klärfälle */
.warn-abzeichen {
  display: inline-block;
  min-width: 18px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--red, #d90128);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  vertical-align: 1px;
}

/* Gesamtzeile der Filiale in der Auswertung */
.data-table tfoot tr.zeile-gesamt td { border-top: 2px solid var(--red, #d90128); }
.data-table tfoot tr.zeile-gesamt small { display: block; font-weight: 400; opacity: .7; font-size: 11px; }
