/* That's it. Marketing CRM: Branding über Tokens (Quelle: Brand Extraktion von thatsit.marketing, 2026-11-05) */
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "League Spartan"; src: url("/fonts/league-spartan-var.woff2") format("woff2"); font-weight: 700 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
:root {
  --brand: #dc9832;          /* tigold */
  --brand-dark: #e8ab4e;     /* Hover Hauptbutton (tigold hell) */
  --brand-ink: #92600f;      /* Gold als Textfarbe auf hellem Grund (AA) */
  --brand-soft: #fbf1df;
  --on-brand: #0e0e0e;       /* Text auf Gold, Weiß hätte nur 2,45:1 */
  --side: #0e0e0e;
  --side-2: #1a1a1a;
  --side-ink: #c8c8c8;
  --side-ink-strong: #ffffff;
  --bg: #fafaf8;
  --card: #ffffff;
  --ink: #0e0e0e;
  --muted: #6e6e6e;
  --line: #e5e5e3;
  --ok: #2f8f5f;
  --warn: #d97706;
  --bad: #c4382c;
  --radius: 4px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "League Spartan", var(--font);
  --font-label: "Barlow Condensed", var(--font);
  --shadow: 0 1px 2px rgba(14, 14, 14, .06), 0 1px 3px rgba(14, 14, 14, .08);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* Layout */
.shell { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; overflow: hidden; }
.brand { padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.logo { display: block; line-height: 0; }
.logo img { height: 30px; width: auto; display: block; }
.ws { font-family: var(--font-label); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .28em; color: var(--brand); margin-top: 8px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 8px 8px; }
.nav::-webkit-scrollbar { width: 6px; } .nav::-webkit-scrollbar-thumb { background: #33363f; border-radius: 3px; }
.nav a.item, .nav .item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--side-ink); cursor: pointer; }
.nav a.item:hover { background: var(--side-2); color: #fff; }
.nav a.item.active { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.nav a.sub { padding-left: 38px; font-size: 13px; }
.nav .badge { margin-left: auto; background: var(--brand); color: var(--on-brand); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.nav .plus { margin-left: auto; width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; color: #8b909b; }
.nav .plus:hover { background: #33363f; color: #fff; }
.nav h6 { margin: 16px 10px 6px; font-size: 11px; letter-spacing: .08em; color: #7d828d; text-transform: uppercase; display: flex; justify-content: space-between; }
.nav .divider { margin: 12px 10px 4px; font-size: 12px; font-weight: 700; color: #aab; letter-spacing: .02em; }
.nav .pin { font-size: 13px; }
.nav .pin .emoji { width: 18px; text-align: center; }
.side-foot { border-top: 1px solid #272a31; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.side-foot .item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--side-ink); }
.side-foot .item:hover { background: var(--side-2); color: #fff; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { height: 52px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 20px; gap: 12px; flex: none; }
.search { position: relative; flex: 0 1 460px; margin: 0 auto; }
.search input { width: 100%; padding: 8px 36px 8px 12px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; outline: none; }
.search input:focus { border-color: var(--brand); background: #fff; }
.search kbd { position: absolute; right: 10px; top: 7px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: #fff; }
.search .results { position: absolute; top: 40px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 50; max-height: 420px; overflow: auto; }
.search .results a { display: flex; flex-direction: column; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.search .results a:hover { background: var(--brand-soft); }
.search .results small { color: var(--muted); }
.content { flex: 1; overflow: auto; padding: 20px; }
.content.flush { padding: 0; }

/* Bausteine */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn { border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 700; box-shadow: 0 6px 18px rgba(220,152,50,.32); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 3px 8px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; background: #fff; outline: none; max-width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { width: 100%; resize: vertical; min-height: 80px; }
label.f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 12px; color: var(--muted); font-weight: 600; }
label.f input, label.f select, label.f textarea { font-weight: 400; color: var(--ink); font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 12px; font-weight: 600; background: #eceef2; color: #444; white-space: nowrap; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; flex: none; }
.logo-ico { width: 24px; height: 24px; border-radius: 5px; background: #eceef2; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #667; overflow: hidden; flex: none; }
.logo-ico img { width: 100%; height: 100%; object-fit: contain; }
.page-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.page-head h1 { font-size: 18px; margin: 0; letter-spacing: -.01em; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); background: var(--card); padding: 0 20px; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; }
.tabs .on { color: var(--ink); border-bottom-color: var(--brand); }
.empty { text-align: center; color: var(--muted); padding: 48px 12px; }
.err { color: var(--bad); }

/* Tabellen */
.tbl-wrap { overflow: auto; background: var(--card); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; position: sticky; top: 0; white-space: nowrap; z-index: 1; user-select: none; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--ink); }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl tbody tr:hover { background: #fafbfc; }
.tbl tbody tr.sel { background: var(--brand-soft); }
.tbl tfoot td { background: #fafbfc; font-weight: 600; position: sticky; bottom: 0; }
.tbl .qa { display: inline-flex; gap: 4px; }
.iconbtn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: #fff; display: inline-grid; place-items: center; color: var(--muted); padding: 0; }
.iconbtn:hover { color: var(--brand); border-color: var(--brand); }
.toolbar { display: flex; gap: 8px; align-items: center; padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bulkbar { background: #0e0e0e; color: #fff; padding: 8px 20px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bulkbar .btn { background: #2a2d35; border-color: #3a3e48; color: #fff; }
.bulkbar .btn:hover { background: #363a45; }
.pager { display: flex; gap: 8px; align-items: center; padding: 8px 20px; background: var(--card); border-top: 1px solid var(--line); color: var(--muted); }

/* Filter */
.filterbox { background: var(--card); border-bottom: 1px solid var(--line); padding: 12px 20px; }
.frule { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.frule .conj { width: 56px; font-size: 12px; color: var(--muted); font-weight: 700; }
.fgroup { border-left: 3px solid var(--line); padding-left: 10px; margin: 6px 0; }

/* Modal & Toast */
.overlay { position: fixed; inset: 0; background: rgba(16, 18, 24, .55); display: grid; place-items: start center; padding: 6vh 16px; z-index: 100; overflow: auto; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 860px; }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.modal .body { padding: 20px; }
.modal footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: #0e0e0e; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.3); max-width: 360px; }
.toast.err { background: var(--bad); color: #fff; }
.menu { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); z-index: 60; min-width: 200px; padding: 4px; max-height: 360px; overflow: auto; }
.menu button, .menu label { display: flex; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 5px; gap: 8px; align-items: center; }
.menu button:hover, .menu label:hover { background: var(--bg); }

/* Lead Detail */
.lead-grid { display: grid; grid-template-columns: 340px 1fr; gap: 16px; padding: 16px 20px; align-items: start; }
.lead-side { display: flex; flex-direction: column; gap: 12px; }
.sect { padding: 14px; }
.sect h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 8px; align-items: center; margin-bottom: 6px; font-size: 13px; }
.kv > span:first-child { color: var(--muted); font-size: 12px; }
.inl { border: 1px solid transparent; background: transparent; padding: 3px 6px; border-radius: 5px; width: 100%; }
.inl:hover { border-color: var(--line); background: #fff; }
.contact { border-top: 1px solid var(--line); padding: 10px 0; }
.contact:first-of-type { border-top: 0; }
.composer .ctabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.composer .ctabs button { border: 0; background: none; padding: 8px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; }
.composer .ctabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.composer .cbody { padding: 12px; }
.tl { display: flex; flex-direction: column; margin-top: 16px; }
.ti { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 10px 0; position: relative; }
.ti .ic { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); z-index: 1; }
.ti:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 42px; bottom: -10px; width: 1px; background: var(--line); }
.ti .box { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ti .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ti.note .box { background: #fffbea; border-color: #f3e3a3; }
.ti.call .ic { color: var(--ok); } .ti.custom .ic { color: var(--brand); }
.ti pre { margin: 0; white-space: pre-wrap; font-family: inherit; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 3px 10px; font-size: 12px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.overdue { color: var(--bad); font-weight: 600; }
audio { height: 32px; width: 100%; margin-top: 6px; }

/* Kanban */
.board { display: flex; gap: 12px; padding: 16px 20px; overflow-x: auto; align-items: flex-start; height: 100%; }
.col { flex: 0 0 290px; background: #eceef2; border-radius: 10px; display: flex; flex-direction: column; max-height: 100%; }
.col.drop { outline: 2px dashed var(--brand); }
.col header { padding: 10px 12px; font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
.col header small { font-weight: 500; color: var(--muted); }
.cards { padding: 0 8px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.ocard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: grab; box-shadow: var(--shadow); }
.ocard:hover { border-color: var(--brand); }
.ocard.dragging { opacity: .4; }

/* Reports */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tile { padding: 14px; position: relative; }
.tile .big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.tile .lbl { color: var(--muted); font-size: 12px; font-weight: 600; }
.tile .delta.up { color: var(--ok); } .tile .delta.down { color: var(--bad); }
.tile svg { display: block; width: 100%; height: 40px; margin-top: 6px; }
.rep-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.bar { background: var(--brand); height: 10px; border-radius: 5px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--side); padding: 16px; }
.login .box { background: #fff; padding: 32px; border-radius: 8px; width: 100%; max-width: 380px; }
.login .logo { margin-bottom: 12px; }
.login .logo img { height: 44px; }

/* Telefon */
.phonebar { position: fixed; left: 264px; bottom: 16px; background: #0e0e0e; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.4); z-index: 150; min-width: 320px; }
.phonebar .btn { background: #2a2d35; border-color: #3a3e48; color: #fff; }
.phonebar .btn.red { background: var(--bad); border-color: var(--bad); }
.phonebar .btn.green { background: var(--ok); border-color: var(--ok); }
.dialer { position: fixed; right: 16px; bottom: 16px; width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.25); z-index: 140; }
.dialer header { background: var(--brand); color: var(--on-brand); padding: 10px 14px; border-radius: 12px 12px 0 0; font-weight: 700; display: flex; justify-content: space-between; }
.dialer .db { padding: 14px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .side { display: none; }
  .lead-grid { grid-template-columns: 1fr; } .rep-grid { grid-template-columns: 1fr; }
}

/* Überschriften und Labels im Markenstil */
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; letter-spacing: -.01em; }
.nav h6 { font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: .2em; }
.btn.primary:hover { transform: translateY(-1px); }
.btn { transition: background .12s cubic-bezier(.2,.8,.2,1), transform .12s cubic-bezier(.2,.8,.2,1); }
