/* A-Team OS design, rebuilt from Matthias' Base44 app (ateam-core-os): dark navy sidebar with the active app in blue,
   light canvas, bold Inter headings, white rounded cards with a soft shadow, KPI cards with tinted icons, filter chips
   with counts, soft status badges. Portals (advisor, planner, customer) use a dark top bar instead of the sidebar. */
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --navy: #0F172A; --navy-2: #1E293B; --navy-text: #CBD5E1; --navy-muted: #64748B;
  --bg: #F8FAFC; --surface: #FFFFFF; --card: var(--surface); --text: #0F172A; --muted: #64748B; --line: #E2E8F0; --soft: #F1F5F9;
  --blue: #2563EB; --blue-soft: #EFF6FF; --red: #DC2626; --red-soft: #FEF2F2; --accent: var(--red);
  --ok: #16A34A; --ok-soft: #F0FDF4; --warn: #D97706; --warn-soft: #FFFBEB; --violet: #7C3AED; --violet-soft: #F5F3FF;
  --ink: #111111; --primary: var(--blue); --on-primary: #fff;
  --radius: 16px; --sidebar: 288px; --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 32px; font-weight: 800; margin: 0 0 6px; }
h2 { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; flex: none; vertical-align: -4px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Admin shell: dark sidebar */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; background: linear-gradient(to right, var(--navy) var(--sidebar), var(--bg) var(--sidebar)); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--navy); color: var(--navy-text); display: flex; flex-direction: column; }
.sidebar .top { display: flex; align-items: center; gap: 12px; padding: 22px 20px; border-bottom: 1px solid var(--navy-2); }
.sidebar .top img { width: 40px; height: 40px; }
.sidebar .top b { display: block; color: #fff; font-size: 17px; font-weight: 700; }
.sidebar .top small { display: block; color: var(--navy-muted); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.sidebar .bell { margin-left: auto; position: relative; color: var(--navy-text); text-decoration: none; }
.sidebar .bell .badge { position: absolute; top: -6px; right: -8px; }
.nav { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.nav .group { color: var(--navy-muted); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 18px 12px 8px; }
.nav .group:first-child { padding-top: 8px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 12px; color: var(--navy-text); text-decoration: none; font-weight: 500; font-size: 15.5px; }
.nav a svg { width: 22px; height: 22px; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.on { background: var(--blue); color: #fff; }
.nav .count { margin-left: auto; }
.sidebar .me { border-top: 1px solid var(--navy-2); padding: 16px 20px 18px; }
.me-row { display: flex; align-items: center; gap: 12px; }
.avatar-letter { width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.me b { display: block; color: #fff; font-weight: 600; font-size: 14.5px; } .me small { color: var(--navy-muted); font-size: 12.5px; }
.me form button { margin-top: 12px; background: none; border: 0; box-shadow: none; color: var(--navy-muted); padding: 0; font-size: 14px; }
.me form button:hover { color: #fff; background: none; }
.topbar { display: none; }
.content { min-width: 0; }
.banner { padding: 10px 40px; font-size: 14px; background: var(--warn-soft); color: #92400E; border-bottom: 1px solid #FDE68A; }
.banner.alert { background: var(--red); color: #fff; border-color: transparent; } .banner.alert a { color: #fff; }
main { max-width: 1240px; margin: 0 auto; padding: 40px 40px 72px; }

.bottombar { display: none; }
.plus { margin: 0 14px 14px; position: relative; } .plus summary { list-style: none; width: 100%; justify-content: center; } .plus summary::-webkit-details-marker { display: none; }
.plus[open] a { display: block; padding: 10px 14px; color: var(--navy-text); text-decoration: none; border-radius: 10px; } .plus[open] a:hover { background: var(--navy-2); color: #fff; }
@media (max-width: 960px) {
  .bottombar { display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottombar .nav { flex-direction: row; justify-content: space-around; padding: 6px 4px; gap: 0; }
  .bottombar .nav a { flex-direction: column; gap: 2px; padding: 6px 8px; font-size: 11.5px; color: var(--muted); border-radius: 10px; position: relative; }
  .bottombar .nav a.on { background: none; color: var(--blue); }
  .bottombar .nav a .count { position: absolute; top: 0; right: 4px; }
  .bottombar .fab { position: absolute; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(37, 99, 235, .35); }
  .bottombar .fab svg { width: 26px; height: 26px; }
  body:has(.bottombar) main { padding-bottom: 96px; }
  .shell { display: block; background: var(--bg); }
  .sidebar { display: none; }
  .topbar { display: block; position: sticky; top: 0; z-index: 10; background: var(--navy); color: var(--navy-text); }
  .topbar .head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .topbar .head b { color: #fff; } .topbar .head img { width: 30px; height: 30px; vertical-align: middle; margin-right: 8px; }
  .topbar button { background: var(--navy-2); color: #fff; border-color: var(--navy-2); box-shadow: none; padding: 7px 12px; font-size: 13px; }
  .banner { padding: 9px 16px; }
  main { padding: 22px 16px 56px; }
  h1 { font-size: 26px; } .hero h1 { font-size: 32px; }
}

/* Portal shell (advisor, planner, customer): dark top bar */
.portal-bar { background: var(--ink); color: #fff; }
.portal-bar .inner { max-width: 1240px; margin: 0 auto; padding: 14px 40px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.portal-bar .back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; background: #1F1F1F; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
.portal-bar .logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; } .portal-bar .logo img { width: 34px; height: 34px; }
.portal-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.portal-bar .where { color: #9CA3AF; font-size: 14px; }
.portal-bar nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.portal-bar nav a { color: #E5E7EB; text-decoration: none; font-size: 15.5px; font-weight: 500; padding: 4px 0; }
.portal-bar nav a.on, .portal-bar nav a:hover { color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
.portal-bar .who { text-align: right; font-size: 14px; font-weight: 600; line-height: 1.25; } .portal-bar .who small { display: block; color: var(--red); font-weight: 500; }
@media (max-width: 960px) { .portal-bar .inner { padding: 12px 16px; } .portal-bar nav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; } }

/* Page heads */
.eyebrow { color: var(--red); font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.page-head p, .sub { color: var(--muted); font-size: 16px; margin: 4px 0 0; }
.hero h1 { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; }
.section { margin: 36px 0 16px; } .section p { color: var(--muted); margin: 2px 0 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
a.card, a.item { display: block; text-decoration: none; color: inherit; transition: box-shadow .15s; }
a.card:hover, a.item:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 140px; }
form.row > input, form.row > select { flex: 1; width: auto; min-width: 140px; } form.row > button { flex: none; }
.muted { color: var(--muted); font-size: 14px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* KPI cards: uppercase label with a tinted icon (kpi) or a tinted dot above the value (stat) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 18px; margin-bottom: 28px; }
.tiles .card { margin: 0; }
.tiles:has(.kpi) { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.kpi { position: relative; padding: 24px 26px; min-height: 130px; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding-right: 60px; }
.kpi .value, .stat .value { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 2px; line-height: 1.1; }
.kpi .ic { position: absolute; top: 22px; right: 22px; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.kpi .ic svg { width: 24px; height: 24px; }
.stat .dot { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px; }
.stat .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.stat .label { font-weight: 500; color: var(--muted); }
.t-blue { background: var(--blue-soft); color: var(--blue); } .t-red { background: var(--red-soft); color: var(--red); }
.t-green { background: var(--ok-soft); color: var(--ok); } .t-orange { background: var(--warn-soft); color: var(--warn); }
.t-violet { background: var(--violet-soft); color: var(--violet); } .t-grey { background: var(--soft); color: var(--muted); }
.v-blue { color: var(--blue); } .v-orange { color: var(--warn); } .v-red { color: var(--red); } .v-green { color: var(--ok); }
a.kpi:hover .value, a.stat:hover .value { color: var(--blue); }

/* App tiles on the start page */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.app { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.app:hover { box-shadow: 0 14px 34px rgba(15, 23, 42, .14); transform: translateY(-2px); }
.app .head { position: relative; height: 150px; background: #2B2B2B; overflow: hidden; }
.app .head.red { background: linear-gradient(135deg, #D7261E, #B91C1C); }
.app .head::before, .app .head::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.app .head::before { width: 260px; height: 260px; right: -60px; top: -70px; } .app .head::after { width: 200px; height: 200px; right: 10px; bottom: -120px; }
.app .head svg { position: absolute; color: rgba(255, 255, 255, .95); fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.app .head .big { left: 26px; bottom: 22px; width: 46px; height: 46px; stroke-width: 1.6; }
.app .head .arrow { right: 22px; top: 20px; width: 22px; height: 22px; color: rgba(255, 255, 255, .7); transition: transform .2s; }
.app:hover .head .arrow { transform: translateX(4px); }
.app .head .count { position: absolute; left: 26px; top: 20px; }
.app .body { padding: 22px 26px 26px; } .app .body h3 { font-size: 21px; font-weight: 800; margin: 0 0 6px; } .app .body p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Chips, tabs, badges, info boxes */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow); white-space: nowrap; }
.chips a .d { width: 8px; height: 8px; border-radius: 50%; background: #94A3B8; }
.chips a .n { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12.5px; text-align: center; }
.chips a.on { background: var(--ink); color: #fff; border-color: var(--ink); } .chips a.on .n { background: #333; color: #fff; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.tabs a { padding: 9px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; font-weight: 500; text-decoration: none; color: var(--text); }
.tabs a.on, .tabs a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--soft); color: var(--muted); text-decoration: none; white-space: nowrap; }
.pill.red { background: var(--red-soft); color: var(--red); } .pill.green, .pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.orange, .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.violet { background: var(--violet-soft); color: var(--violet); } .pill.grey { background: var(--soft); color: var(--muted); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
.info { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; border-radius: 14px; margin-bottom: 22px; }
.info.blue { background: var(--blue-soft); border: 1px solid #BFDBFE; color: #1E40AF; } .info.orange { background: var(--warn-soft); border: 1px solid #FDE68A; color: #92400E; }
.info.red { background: var(--red-soft); border: 1px solid #FECACA; color: #991B1B; }
.info b { display: block; }
.score { display: inline-grid; place-items: center; min-width: 64px; padding: 8px 10px; border-radius: 14px; font-size: 22px; font-weight: 800; line-height: 1; }
.score small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; margin-top: 4px; }

/* Forms and buttons */
label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
textarea { min-height: 100px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--blue); }
.toggle { display: flex; gap: 10px; align-items: center; font-weight: 400; } .toggle input { width: 17px; height: 17px; }
button, .btn { font: 600 15px var(--font); padding: 11px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow); white-space: nowrap; }
button:hover, .btn:hover { background: var(--soft); }
button.primary, .btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
button.primary:hover, .btn.primary:hover { background: #1D4ED8; }
button.dark, .btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
button.danger, .btn.danger, button.go, .btn.go { background: var(--red); border-color: var(--red); color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }

/* Data */
dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; } dt { color: var(--muted); font-size: 14px; } dd { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; } td input, td select { padding: 8px 10px; }
tr:last-child td { border-bottom: 0; }
.list > * { border-top: 1px solid var(--line); padding: 12px 0; } .list > *:first-child { border-top: 0; padding-top: 0; }
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; }
.rows > * { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; flex-wrap: wrap; }
.rows > *:first-child { border-top: 0; } .rows > a:hover { background: var(--soft); }
.rows .grow { flex: 1; min-width: 180px; }
.empty { text-align: center; color: var(--muted); padding: 60px 16px; } .empty svg { width: 44px; height: 44px; color: #CBD5E1; display: block; margin: 0 auto 12px; }
.finding { color: var(--warn); font-size: 14px; margin: 6px 0; }

/* Calendar */
.cal { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.month .wd { text-align: center; color: var(--muted); font-size: 14px; padding: 6px 0; }
.month a { min-height: 96px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; text-decoration: none; color: var(--text); font-size: 14px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.month a.out { color: #94A3B8; } .month a.today { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); } .month a.sel { background: var(--blue-soft); }
.month a .ev { font-size: 11.5px; padding: 1px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) { .cal { grid-template-columns: 1fr; } .month { gap: 4px; } .month a { min-height: 48px; padding: 6px; } .month a .ev { display: none; } }

/* Chat */
.msg { display: flex; gap: 8px; align-items: flex-end; } .msg.mine { justify-content: flex-end; }
.avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; margin: 5px 0; word-wrap: break-word; font-size: 15px; }
.bubble .text { white-space: pre-wrap; }
.bubble.in { background: var(--soft); border-bottom-left-radius: 4px; }
.bubble.out { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.bubble.out.matthias { background: var(--ink); color: #fff; }
.bubble .muted { color: inherit; opacity: .75; }
.delivery-failed { margin-top: 6px; padding: 4px 8px; border-radius: 8px; background: #fff; color: var(--red); font-size: 12.5px; font-weight: 600; } .bubble img { border-radius: 10px; display: block; margin-top: 6px; }

/* Login */
.login { max-width: 420px; margin: 12vh auto; padding: 0 16px; }

/* Conversations (GHL style): list, chat, contact details */
main.full { max-width: none; padding: 0; }
.convo { display: grid; grid-template-columns: 340px minmax(0, 1fr) 330px; grid-template-rows: minmax(0, 1fr); height: 100%; background: var(--surface); }
/* The chat fills the window below however many banners there are; only its columns scroll, never the page. */
@media (min-width: 1201px) { .content:has(main.full) { height: 100vh; display: flex; flex-direction: column; } main.full { flex: 1; min-height: 0; } }
.convo-list, .convo-side { overflow-y: auto; border-right: 1px solid var(--line); }
.convo-side { border-right: 0; border-left: 1px solid var(--line); padding: 22px; }
.convo-head { padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.convo-head h2 { margin-bottom: 10px; }
.convo-head .tabs a { padding: 5px 12px; font-size: 13.5px; }
.convo-calls { padding: 12px 20px; background: var(--warn-soft); border-bottom: 1px solid #FDE68A; font-size: 14px; }
.convo-calls .row { margin-top: 8px; }
.convo-items a { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.convo-items a:hover { background: var(--soft); } .convo-items a.on { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.convo-items .grow { flex: 1; min-width: 0; display: block; }
.convo-items .snippet { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-chat { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.convo-chat .convo-head { display: block; }
.convo-thread { flex: 1; overflow-y: auto; padding: 22px 28px; }
.convo-draft { margin: 0 20px 12px; padding: 14px 16px; border: 2px dashed #F59E0B; background: var(--warn-soft); border-radius: 14px; }
.convo-draft .card { border: 0; box-shadow: none; padding: 8px 0 0; margin: 0; background: transparent; }
.convo-compose { display: flex; flex-direction: column; gap: 8px; padding: 12px 20px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.channels { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.channels label { margin: 0; display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.channels label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.channels label input { position: absolute; opacity: 0; } .channels label.off { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.channels .suggest { margin-left: auto; padding: 5px 12px; font-size: 13.5px; box-shadow: none; }
.convo-compose.js .email-only { display: none; } .convo-compose.js.is-email .email-only { display: grid; }
.bubble .chan { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .75; margin-bottom: 2px; }
.bubble .meta { font-size: 11.5px; margin-top: 3px; opacity: .75; }
.bubble.ava { background: var(--blue); } .bubble.note { background: #FEF9C3; color: #713F12; border: 1px dashed #EAB308; }
.bubble.failed { box-shadow: 0 0 0 2px var(--red); }
.convo-compose textarea { min-height: 52px; height: 52px; }
.convo-none { justify-content: center; }
.back-list { display: none; padding: 8px 10px; }
@media (max-width: 1200px) {
  .convo { grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: "list chat" "list side"; grid-template-rows: auto; height: auto; min-height: calc(100vh - 42px); }
  .convo-list { grid-area: list; } .convo-chat { grid-area: chat; } .convo-side { grid-area: side; border-left: 0; border-top: 1px solid var(--line); }
  .convo-thread { max-height: 60vh; }
}
@media (max-width: 960px) {
  .convo, .convo.open { display: block; height: auto; }
  .convo.open .convo-list, .convo:not(.open) .convo-none { display: none; }
  .convo-side { border-left: 0; border-top: 1px solid var(--line); }
  .back-list { display: inline-flex; }
  .convo-thread { max-height: none; padding: 16px; }
}

/* Leads board (GHL Opportunities) */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.lane { flex: 0 0 272px; background: var(--soft); border-radius: 14px; padding: 10px; border: 2px solid transparent; }
.lane.over { border-color: var(--blue); background: var(--blue-soft); }
.lane header { display: flex; align-items: center; gap: 8px; padding: 6px 6px 12px; font-size: 14.5px; }
.lane header .d { width: 8px; height: 8px; border-radius: 50%; }
.lane header .n { margin-left: auto; min-width: 24px; padding: 0 8px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; text-align: center; }
.lane-cards { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.deal { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: inherit; box-shadow: var(--shadow); cursor: grab; font-size: 14px; }
.deal:hover { border-color: var(--blue); }
.deal b { font-size: 15px; }

/* Heute */
.page-head .search { min-width: 280px; max-width: 380px; flex: 1; flex-wrap: nowrap; }
.today-group { margin-bottom: 26px; }
.today-group h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.today-group h2 .n { font-size: 13px; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); text-align: center; }
.today-group.sofort h2 .n, .today-group.probleme h2 .n { background: var(--red); color: #fff; }
.today-item { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.today-item .actions button, .today-item .actions .btn { padding: 8px 12px; font-size: 14px; }
.reason-red { color: var(--red); font-size: 14px; font-weight: 500; }
.today-draft { flex-basis: 100%; } .today-draft .card { margin: 0; box-shadow: none; border-style: dashed; border-color: #F59E0B; background: var(--warn-soft); }
.snooze { position: relative; } .snooze summary { list-style: none; cursor: pointer; } .snooze summary::-webkit-details-marker { display: none; }
.snooze[open] form { position: absolute; right: 0; top: 110%; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); padding: 6px; display: flex; flex-direction: column; min-width: 170px; }
.snooze[open] form button { border: 0; box-shadow: none; justify-content: flex-start; }
.warn-line { color: var(--warn); font-size: 13.5px; font-weight: 600; }
.deal.nostep { border-left: 3px solid var(--warn); }
.ic-soft { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.unread { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 6px; vertical-align: 2px; }
.next-step { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.slot-pick { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.slot-pick .slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-top: 8px; }
.slot-pick label { margin: 0; font-weight: 400; display: flex; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
/* Calendar week */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.week section { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-height: 180px; }
.week section.today { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.week h3 { font-size: 14px; margin: 0 0 10px; color: var(--muted); } .week section.today h3 { color: var(--blue); }
.ev-card { display: block; padding: 8px 10px; border-radius: 10px; margin-bottom: 8px; text-decoration: none; font-size: 13px; line-height: 1.35; }
.ev-card.blue { background: var(--blue-soft); color: #1E3A8A; } .ev-card.violet { background: var(--violet-soft); color: #4C1D95; }
.ev-card.orange { background: var(--warn-soft); color: #78350F; } .ev-card.grey { background: var(--soft); color: var(--text); }
@media (max-width: 960px) { .week { grid-template-columns: 1fr; } .week section { min-height: 0; } .week section.empty-day { display: none; } .week section.empty-day.today { display: block; } }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* Uploads and AI output in the customer panel */
.files { display: grid; gap: 8px; margin: 0 0 6px; }
.file { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; min-width: 0; }
.file:hover { border-color: var(--blue); }
.file img, .file-icon { width: 52px; height: 52px; flex: none; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--soft); }
.file span { min-width: 0; } .file b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.file small { color: var(--muted); font-size: 12px; }
.ai-out { border-left: 3px solid var(--blue); padding: 2px 0 2px 12px; margin: 0 0 14px; }
.ai-out p { margin: 4px 0; } .ai-out small { display: block; } .ai-out details summary { cursor: pointer; margin: 6px 0; }

/* Preview sandbox: write as the customer */
.sandbox-say { margin: 0 20px 14px; padding: 12px 14px; border: 1px dashed var(--warn); border-radius: 12px; background: var(--warn-soft); display: grid; gap: 8px; }
.sandbox-say textarea { min-height: 44px; }
.run { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; } .run:last-child { border-bottom: 0; }
