/* CRM (Raum „team“). Hausfarben Maverick Holmes aus dem Skin-Katalog („Limette“): Aubergine mit Limettengrün.
   Duplo zuerst: eine Sache ist eine Zeile, große bunte Knöpfe, nichts erschlägt. Feste Breiten, damit beim Umschalten
   nichts springt. Admin und Entwicklung sind sichtbar andere Räume (eigene Kopfzeile, eigene Farbe). */
[data-skin="limette"] {
  color-scheme: light;
  --bg: #f6f3f8; --surface: #ffffff; --surface-2: #faf7fc; --line: #e2d9e8;
  --fg: #22162b; --muted: #6d6177; --accent: #5b2a6e; --accent-fg: #ffffff;
  --lime: #8cc21a; --lime-fg: #1b2a00; --aubergine: #2a1433; --aubergine-2: #3d1f4a;
  --go: #2f7d32; --warn: #a86400; --soft: #efe6f4; --track: #e8e0ee; --bad: #b3261e;
  --gelb: #ffd84d; --gelb-fg: #3a2c00; --rot: #e5484d; --petrol: #0f5e6b; --orange: #e8742c;
  --f-display: "Bricolage Grotesque", Georgia, serif;
  --f-body: "IBM Plex Sans", system-ui, sans-serif;
  --r: 14px; --r-lg: 22px;
}
body { background: var(--bg); }
main { max-width: 1040px; }
.kopf { background: var(--aubergine); border-bottom: 0; }
.kopf .marke { color: var(--lime); }
.kopf .marke span { color: #e6d9ee; }
.kopf .leise { color: #fff; border-color: #6b4a7a; }

/* Reiter: feste Breite je Reiter, aktiver Reiter limettengrün */
.reiter { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px; background: var(--aubergine-2); }
.reiter a { flex: 0 0 auto; min-width: 104px; text-align: center; padding: 12px 10px; color: #e6d9ee; text-decoration: none; font-weight: 600; border-bottom: 4px solid transparent; }
.reiter a[aria-current="page"] { color: #fff; border-bottom-color: var(--lime); }
.reiter a.admin-reiter { margin-left: auto; color: #9fe3ef; }

/* Begrüßung und drei bunte Kacheln */
.hallo { font: 800 clamp(30px, 5vw, 44px)/1.1 var(--f-display); margin: 18px 0 4px; }
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.kachel { border-radius: var(--r-lg); padding: 18px; color: #fff; text-decoration: none; display: flex; flex-direction: column; gap: 6px; min-height: 150px; border: 0; text-align: left; font: inherit; cursor: pointer; }
.kachel b { font: 800 46px/1 var(--f-display); }
.kachel span { font-weight: 600; font-size: 18px; }
.kachel small { opacity: .85; font-size: 14px; }
.kachel.lila { background: var(--accent); }
.kachel.limette { background: var(--lime); color: var(--lime-fg); }
.kachel.gelb { background: var(--gelb); color: var(--gelb-fg); }
.woche { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 15px; margin: 4px 0 18px; }
.woche span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }

/* Zeilen: eine Sache, eine Zeile (Vorbild Google Tasks) */
.zeilen { list-style: none; margin: 0; padding: 0; }
.zeile { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 6px; border-top: 1px solid var(--line); cursor: pointer; }
.zeile:first-child { border-top: 0; }
.zeile:hover, .zeile:focus-visible { background: var(--soft); border-radius: var(--r); outline: none; }
.zeile .titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .neben { grid-column: 2 / 3; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .rechts { grid-row: 1 / 3; grid-column: 3; text-align: right; font-size: 14px; color: var(--muted); white-space: nowrap; }
.zeile .vorn { grid-row: 1 / 3; }
.zeile input[type=checkbox] { width: 22px; height: 22px; }
.leer { color: var(--muted); padding: 10px 0; }

/* Schilder (Chips) mit fester Breite */
.chip { display: inline-block; min-width: 76px; text-align: center; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700; background: var(--track); color: var(--fg); }
.chip.p1 { background: var(--rot); color: #fff; }
.chip.p2 { background: var(--track); }
.chip.p3 { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.chip.neu { background: var(--gelb); color: var(--gelb-fg); }
.chip.offen { background: var(--accent); color: #fff; }
.chip.wartet { background: var(--soft); color: var(--accent); }
.chip.erledigt { background: #e3f1e4; color: var(--go); }
.chip.prospect { background: var(--soft); color: var(--accent); }
.chip.lead { background: var(--lime); color: var(--lime-fg); }
.chip.kunde { background: var(--go); color: #fff; }
.chip.verloren, .chip.gesperrt { background: #eee; color: #777; }
.chip.alt { background: var(--rot); color: #fff; }

/* Große Ergebnis-Knöpfe beim Anruf: feste Breite, bunt */
.ergebnisse { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.ergebnisse button { min-height: 58px; font-size: 16px; border-radius: var(--r); border: 2px solid transparent; }
.e-nicht_erreicht { background: var(--track); color: var(--fg); }
.e-gespraech { background: var(--soft); color: var(--accent); }
.e-spaeter { background: var(--gelb); color: var(--gelb-fg); }
.e-interesse { background: var(--lime); color: var(--lime-fg); }
.e-termin { background: var(--go); color: #fff; }
.e-kein_interesse { background: #f1e3e3; color: #7a2b2b; }
.e-sperre { background: #fff; color: var(--bad); border-color: var(--bad) !important; }
.ergebnisse button[aria-pressed="true"] { outline: 4px solid var(--aubergine); outline-offset: 2px; }

.kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kopfzeile h1 { margin-right: auto; }
.felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
textarea { display: block; width: 100%; min-height: 120px; margin-top: 4px; padding: 11px 12px; font: inherit; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); resize: vertical; }
select, input[type=datetime-local], input[type=search], input[type=file] { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.schnell { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.schnell button { min-width: 120px; padding: 6px 10px; font-size: 14px; background: var(--soft); color: var(--accent); border: 1px solid var(--line); }
.filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.filter button { min-width: 110px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); }
.filter button[aria-pressed="true"] { background: var(--aubergine); color: #fff; border-color: var(--aubergine); }
.zahl { font-variant-numeric: tabular-nums; }
.telefon { font: 700 22px var(--f-display); color: var(--accent); text-decoration: none; }

/* Nachrichten im Ticket: Eingang links, unsere Antworten rechts, Notizen gelb */
.verlauf-mail { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.mail { max-width: 86%; border-radius: var(--r-lg); padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); }
.mail.raus { align-self: flex-end; background: var(--soft); }
.mail.notiz { align-self: center; background: #fff7cc; border-color: #f0e08a; max-width: 100%; }
.mail.entwurf { align-self: flex-end; background: #fff; border: 2px dashed var(--accent); }
.mail .wer { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.mail pre { white-space: pre-wrap; word-break: break-word; font: inherit; margin: 0; }
.anhaenge { margin-top: 8px; font-size: 14px; }
.anhaenge a { color: var(--accent); }

/* Admin: ein anderer Raum (Petrol), Entwicklung: Werkstatt (schwarz, Schreibmaschinenschrift) */
body.raum-admin .kopf { background: var(--petrol); }
body.raum-admin .kopf .marke span::after { content: " · Admin"; color: #9fe3ef; }
body.raum-admin main .karte { border-color: #9fd3db; }
body.raum-admin h1 { color: var(--petrol); }
body.raum-entwicklung { background: #0d0d10; color: #d6f5c4; }
body.raum-entwicklung .kopf { background: #000; }
body.raum-entwicklung .kopf .marke span::after { content: " · Entwicklung"; color: var(--lime); }
body.raum-entwicklung main .karte { background: #16161b; border-color: #2c2c33; color: #d6f5c4; }
body.raum-entwicklung h1, body.raum-entwicklung h2 { color: var(--lime); }
body.raum-entwicklung code, body.raum-entwicklung pre { font: 14px/1.5 ui-monospace, Consolas, monospace; color: #d6f5c4; white-space: pre-wrap; }
.hinweis { background: #fff7cc; border: 1px solid #f0e08a; border-radius: var(--r); padding: 12px 14px; font-size: 15px; }
.erfolg { background: #e3f1e4; border: 1px solid #b7dcb9; border-radius: var(--r); padding: 12px 14px; }
.link-kasten { display: block; word-break: break-all; background: var(--surface-2); border: 1px dashed var(--accent); border-radius: var(--r); padding: 10px; font-size: 14px; }

@media (max-width: 720px) {
  .kacheln { grid-template-columns: 1fr; }
  .kachel { min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
  .kachel b { font-size: 34px; min-width: 56px; }
  .mail { max-width: 100%; }
  .reiter a { min-width: 92px; }
  .zeile .titel, .zeile .neben { white-space: normal; }
  .zeile .rechts { grid-row: auto; grid-column: 2; text-align: left; }
}
