/* =====================================================================
   SK Arbeitsplatz · Variante 3 „Odoo-nah"
   Aufbau wie Odoo (App-Übersicht, Navbar mit App-Menüs, Control-Panel,
   Kanban / Liste / Formular mit Chatter), aber auf wenige Apps zusammengefasst.
   Farben und Schriften wie Variante 1 (Gelb/Schwarz, Poppins/Inter).
   ===================================================================== */
:root {
  --yellow: #fbb321;
  --yellow-deep: #f1b900;
  --yellow-soft: #fff4d6;
  --yellow-text: #9a6400;
  --ink: #0d0d0d;
  --ink-2: #1a1a1a;
  --ink-3: #2a2a2a;
  --text: #1b1b1b;
  --muted: #6b6b6b;
  --line: #e4e4e1;
  --line-2: #efefec;
  --bg: #f6f6f4;
  --card: #ffffff;
  --green: #2e9e5b;
  --green-soft: #e3f4ea;
  --red: #d6453d;
  --red-soft: #fbe6e4;
  --blue: #2874fc;
  --blue-soft: #e5eeff;
  --r: 8px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.05);
  --nav-h: 48px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif; font-size: 13.5px; line-height: 1.45;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: Poppins, sans-serif; margin: 0; font-weight: 600; letter-spacing: -.01em; }
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.grow { flex: 1; }
.link { color: var(--yellow-text); font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ---------- Navbar (wie Odoo, dunkel) ---------- */
.o-nav {
  position: sticky; top: 0; z-index: 30; height: var(--nav-h);
  background: var(--ink); color: #d6d6d6;
  display: flex; align-items: center; padding: 0 8px; gap: 2px;
}
.o-nav .apps-btn {
  width: 40px; height: 36px; border: 0; background: transparent; color: #fff;
  display: grid; place-items: center; border-radius: 6px;
}
.o-nav .apps-btn:hover { background: var(--ink-3); }
.o-nav .app-name { font-family: Poppins; font-weight: 600; color: #fff; font-size: 15px; padding: 0 12px 0 6px; white-space: nowrap; }
.o-nav .menus { display: flex; align-items: stretch; height: 100%; }
.o-nav .menus a {
  display: flex; align-items: center; padding: 0 12px; font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.o-nav .menus a:hover { background: var(--ink-3); color: #fff; }
.o-nav .menus a.active { color: #fff; border-bottom-color: var(--yellow); }
.o-nav .systray { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.tray-btn {
  position: relative; height: 36px; min-width: 36px; padding: 0 9px; border: 0; background: transparent; color: #d6d6d6;
  display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; font-size: 13px;
}
.tray-btn:hover { background: var(--ink-3); color: #fff; }
.tray-btn .cnt {
  position: absolute; top: 3px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--yellow); color: var(--ink); border-radius: 999px; font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.tray-company { font-size: 12.5px; color: #9a9a9a; padding: 0 10px; white-space: nowrap; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--ink);
  display: grid; place-items: center; font-family: Poppins; font-weight: 600; font-size: 11.5px; margin: 0 6px;
}
.nav-burger { display: none; }

/* Dropdowns aus der Navbar (Aktivitäten, mobiles Menü) */
.o-pop {
  position: fixed; top: calc(var(--nav-h) + 4px); right: 8px; z-index: 40; width: 360px; max-width: calc(100vw - 16px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 18px 50px rgba(0,0,0,.18);
  display: none; overflow: hidden;
}
.o-pop.open { display: block; }
.o-pop .pop-head { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; justify-content: space-between; }
.act-row { display: grid; grid-template-columns: 34px 1fr auto auto auto; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.act-row:hover { background: var(--bg); }
.act-row b { font-weight: 600; }
.act-row .n { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.n.late { background: var(--red-soft); color: var(--red); }
.n.today { background: var(--yellow-soft); color: var(--yellow-text); }
.n.plan { background: var(--green-soft); color: var(--green); }

/* ---------- App-Übersicht (Startseite) ---------- */
.home { min-height: calc(100vh - var(--nav-h)); background: radial-gradient(1200px 500px at 50% -10%, #fff 0%, var(--bg) 60%); padding: 48px 24px 64px; }
.home-inner { max-width: 1040px; margin: 0 auto; }
.app-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px 16px; justify-items: center; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 112px; text-align: center; font-weight: 500; }
.app-tile .ico {
  width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center;
  background: var(--ink); color: var(--yellow); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 10px 22px rgba(0,0,0,.10);
  transition: transform .15s; position: relative;
}
.app-tile .ico.y { background: var(--yellow); color: var(--ink); }
.app-tile .ico.w { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.app-tile .ico .cnt { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; border: 2px solid var(--bg); }
.app-tile:hover .ico { transform: translateY(-3px); }

/* ---------- Control-Panel ---------- */
.cp { background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px 16px; align-items: center; }
.cp-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--yellow-text); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span.sep { color: var(--muted); }
.crumbs b { font-family: Poppins; font-weight: 600; }
.cp-gear { width: 30px; height: 30px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.cp-gear:hover { background: var(--bg); color: var(--text); }
.cp-mid { display: flex; justify-content: center; min-width: 0; }
.o-search {
  width: 100%; max-width: 560px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 4px 4px 4px 10px; min-height: 36px;
}
.o-search:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.o-search input { flex: 1; min-width: 120px; border: 0; outline: 0; background: transparent; font-size: 13.5px; }
.facet { display: inline-flex; align-items: stretch; border-radius: 6px; overflow: hidden; font-size: 12px; border: 1px solid var(--line); }
.facet .k { background: var(--ink); color: var(--yellow); padding: 3px 7px; display: grid; place-items: center; }
.facet .v { background: var(--bg); padding: 3px 8px; }
.facet .x { background: var(--bg); border: 0; padding: 0 6px; color: var(--muted); }
.facet .x:hover { color: var(--red); }
.o-search .toggle-dd { border: 0; background: var(--bg); width: 30px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.o-search .toggle-dd:hover { background: var(--yellow-soft); color: var(--ink); }
.cp-right { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.pager { display: flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pager span { padding: 0 6px; }
.pager button { width: 28px; height: 28px; border: 1px solid var(--line); background: var(--card); border-radius: 6px; display: grid; place-items: center; }
.pager button:hover { border-color: var(--ink); }
.views { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.views button { width: 34px; height: 30px; border: 0; background: var(--card); color: var(--muted); display: grid; place-items: center; }
.views button + button { border-left: 1px solid var(--line); }
.views button:hover { color: var(--text); background: var(--bg); }
.views button.active { background: var(--ink); color: var(--yellow); }

/* Such-Dropdown (Filter / Gruppieren / Favoriten) */
.search-wrap { position: relative; width: 100%; max-width: 560px; }
.search-dd {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 25; display: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 18px 50px rgba(0,0,0,.14);
  grid-template-columns: repeat(3, 1fr); padding: 12px 6px;
}
.search-wrap.open .search-dd { display: grid; }
.search-dd > div { padding: 0 10px; }
.search-dd > div + div { border-left: 1px solid var(--line); }
.search-dd h4 { font-family: Inter; font-size: 12px; display: flex; align-items: center; gap: 6px; padding: 4px 6px 8px; }
.search-dd a { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; font-size: 13px; }
.search-dd a:hover { background: var(--bg); }
.search-dd a.on::before { content: "✓"; color: var(--yellow-text); font-weight: 700; }
.search-dd hr { border: 0; border-top: 1px solid var(--line); margin: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 6px 12px; border-radius: var(--r); font-weight: 600; font-size: 13px; white-space: nowrap; line-height: 1.3;
}
.btn:hover { border-color: #cfcfcf; background: var(--bg); }
.btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: var(--yellow-deep); border-color: var(--yellow-deep); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); border-color: var(--ink-3); }
.btn-link { border-color: transparent; background: transparent; color: var(--yellow-text); padding-left: 6px; padding-right: 6px; }
.btn-link:hover { background: var(--yellow-soft); border-color: transparent; }
.btn-sm { padding: 4px 9px; font-size: 12px; }

/* ---------- Badges / Tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.y { background: var(--yellow-soft); color: var(--yellow-text); border-color: #f6dfa6; }
.badge.g { background: var(--green-soft); color: var(--green); border-color: #c6e7d3; }
.badge.r { background: var(--red-soft); color: var(--red); border-color: #f3c9c5; }
.badge.b { background: var(--blue-soft); color: var(--blue); border-color: #cddcfd; }
.badge.k { background: var(--ink); color: var(--yellow); border-color: var(--ink); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.mini { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--yellow); font-size: 9.5px; font-weight: 700; display: inline-grid; place-items: center; font-family: Poppins; }
.mini.y { background: var(--yellow); color: var(--ink); }
.stars { color: #d0d0d0; letter-spacing: -1px; font-size: 13px; }
.stars b { color: var(--yellow); font-weight: 400; }
.act { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; background: #c4c4c4; }
.act.late { background: var(--red); } .act.today { background: var(--yellow); color: var(--ink); } .act.plan { background: var(--green); }

/* ---------- Inhalt ---------- */
.o-content { padding: 16px 20px 40px; }
.o-content.flush { padding: 0; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding: 16px 20px 40px; min-height: calc(100vh - var(--nav-h) - 60px); }
.k-col { flex: 0 0 290px; display: flex; flex-direction: column; gap: 8px; }
.k-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 0; }
.k-head h3 { font-family: Inter; font-size: 14px; font-weight: 600; }
.k-head .sum { margin-left: auto; font-weight: 600; font-size: 12.5px; }
.k-head .add { width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.k-head .add:hover { background: var(--card); color: var(--ink); }
.k-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 0 2px 4px; }
.k-bar i { display: block; }
.k-bar .g { background: var(--green); } .k-bar .y { background: var(--yellow); } .k-bar .r { background: var(--red); }
.k-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px; cursor: pointer; position: relative;
  border-left: 3px solid transparent; transition: box-shadow .15s, border-color .15s;
}
.k-card:hover { box-shadow: var(--shadow); border-color: #d9d9d6; }
.k-card.c-y { border-left-color: var(--yellow); } .k-card.c-r { border-left-color: var(--red); } .k-card.c-g { border-left-color: var(--green); } .k-card.c-b { border-left-color: var(--blue); }
.k-card .t { font-weight: 600; }
.k-card .s { color: var(--muted); font-size: 12.5px; }
.k-card .amt { font-weight: 600; font-size: 13px; }
.k-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.k-foot .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.k-col.folded { flex-basis: 44px; }
.k-col.folded .k-head { writing-mode: vertical-rl; padding-top: 8px; }
.k-quick { border: 1px dashed #cfcfcf; border-radius: var(--r); background: transparent; color: var(--muted); padding: 8px; font-size: 12.5px; }
.k-quick:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Liste ---------- */
.o-list-wrap { background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; }
table.o-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.o-list th { text-align: left; font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); position: sticky; top: 0; }
.o-list th.num, .lines th.num { text-align: right; }
.o-list tr[hidden] { display: none !important; }
.o-list th.sorted::after { content: " ▾"; color: var(--yellow-text); }
.o-list td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.o-list tbody tr { cursor: pointer; }
.o-list tbody tr:hover td { background: #fbfbf9; }
.o-list tr.sel td { background: var(--yellow-soft) !important; }
.o-list .cb { width: 36px; padding-right: 0; }
.o-list input[type=checkbox], .o-check { width: 15px; height: 15px; accent-color: var(--ink); }
.o-list tr.group td { background: var(--bg); font-weight: 600; border-bottom: 1px solid var(--line); }
.o-list tr.group td:first-child::before { content: "▾ "; color: var(--muted); }
.o-list tr.group.closed td:first-child::before { content: "▸ "; }
.o-list tr.danger td { color: var(--red); }
.o-list tr.muted td { color: var(--muted); }
.o-list tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; background: var(--card); }
.o-list .opt { width: 30px; text-align: center; color: var(--muted); }
.select-bar { display: none; align-items: center; gap: 10px; }
body.has-sel .select-bar { display: flex; }
body.has-sel .cp-mid .search-wrap { display: none; }

/* ---------- Formular ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: start; min-height: calc(100vh - var(--nav-h) - 57px); }
.form-main { padding: 0 0 40px; min-width: 0; }
.statusbar { display: flex; align-items: center; gap: 8px; padding: 8px 20px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stages { margin-left: auto; display: flex; }
.stages span {
  position: relative; padding: 6px 14px 6px 20px; background: var(--card); color: var(--muted); font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); border-right: 0; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
  margin-left: -6px;
}
.stages span:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 6px 0 0 6px; margin-left: 0; padding-left: 14px; }
.stages span.done { background: #ececea; color: var(--text); }
.stages span.cur { background: var(--yellow); color: var(--ink); }
.sheet-bg { padding: 16px 20px; }
.sheet { max-width: 1100px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px 32px 28px; position: relative; }
.smart { display: flex; justify-content: flex-end; flex-wrap: wrap; margin: -24px -32px 18px; border-bottom: 1px solid var(--line); }
.smart a { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-left: 1px solid var(--line); min-width: 130px; }
.smart a:hover { background: var(--bg); }
.smart a svg { color: var(--yellow-text); }
.smart a b { display: block; font-size: 13.5px; line-height: 1.1; }
.smart a small { color: var(--muted); font-size: 11.5px; }
.ribbon { position: absolute; top: 18px; right: -6px; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 4px 12px; border-radius: 4px 0 0 4px; }
.sheet .ref { color: var(--muted); font-size: 12.5px; }
.sheet h1 { font-size: 26px; margin: 2px 0 18px; }
.o-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.o-field { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 5px 0; align-items: baseline; }
.o-field label { font-weight: 600; color: var(--text); font-size: 13px; }
.o-field .val { border-bottom: 1px solid transparent; padding: 2px 0; min-width: 0; }
.o-field .val:hover { border-bottom-color: var(--line); }
.o-field input, .o-field select { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 3px 0; outline: 0; }
.o-field input:focus, .o-field select:focus { border-bottom-color: var(--yellow); }
.notebook { margin-top: 22px; }
.nb-tabs { display: flex; border-bottom: 1px solid var(--line); gap: 2px; overflow-x: auto; }
.nb-tabs button { border: 1px solid transparent; border-bottom: 0; background: transparent; padding: 8px 14px; border-radius: 6px 6px 0 0; color: var(--muted); font-weight: 600; margin-bottom: -1px; white-space: nowrap; }
.nb-tabs button.active { background: var(--card); border-color: var(--line); color: var(--text); box-shadow: inset 0 2px 0 var(--yellow); }
.nb-panel { padding-top: 10px; }
.nb-panel[hidden] { display: none; }
table.lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.lines th { text-align: left; font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lines td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.lines tr.section td { background: var(--bg); font-weight: 700; }
.lines tr.note td { font-style: italic; color: var(--muted); }
.lines .add-line td { border: 0; }
.lines .add-line a { color: var(--yellow-text); font-weight: 600; margin-right: 14px; }
.totals { margin-left: auto; width: 320px; max-width: 100%; margin-top: 12px; font-size: 13.5px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-family: Poppins; font-weight: 600; font-size: 17px; }

/* Chatter */
.chatter { border-left: 1px solid var(--line); background: var(--card); min-height: 100%; position: sticky; top: var(--nav-h); max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
.chatter-top { display: flex; gap: 6px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chatter-top .right { margin-left: auto; display: flex; gap: 4px; align-items: center; color: var(--muted); font-size: 12.5px; }
.composer { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.composer textarea { flex: 1; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; resize: vertical; min-height: 38px; outline: 0; }
.composer textarea:focus { border-color: var(--yellow); }
.planned { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.planned h5, .day-sep { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.day-sep { display: flex; align-items: center; gap: 10px; padding: 12px 16px 4px; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.msg { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 16px; font-size: 13px; }
.msg .who { font-weight: 600; }
.msg .when { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.msg .body { margin-top: 2px; }
.msg .bubble { background: var(--bg); border-radius: 4px 12px 12px 12px; padding: 8px 10px; margin-top: 4px; }
.msg .track { color: var(--muted); font-size: 12.5px; }
.msg .track b { color: var(--text); font-weight: 600; }
.activity { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: start; padding: 8px 0; font-size: 13px; }
.activity + .activity { border-top: 1px dashed var(--line); }

/* ---------- Karten / Panels (Dashboard, Einstellungen) ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 15px; }
.panel-head .right { margin-left: auto; }
.panel-body { padding: 14px 16px; }

/* Befehlspalette (wie Odoo Strg+K) */
.palette-wrap { position: fixed; inset: 0; z-index: 50; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 0; background: rgba(0,0,0,.35); }
body.palette-open .palette-wrap { display: flex; }
.palette { width: min(600px, 100%); background: var(--card); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.palette input { width: 100%; border: 0; outline: 0; padding: 16px 18px; font-size: 15px; border-bottom: 1px solid var(--line); }
.palette small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 18px 4px; }
.palette a { display: flex; align-items: center; gap: 10px; padding: 9px 18px; }
.palette a:hover, .palette a.sel { background: var(--yellow-soft); }
.palette a kbd { margin-left: auto; font-size: 11px; color: var(--muted); font-family: Inter; }

/* Seitliches Schnellformular (z. B. „Neu" im Kanban) */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 44; display: none; }
.dialog { position: fixed; z-index: 45; left: 50%; top: 10vh; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); max-height: 80vh; overflow: auto; background: var(--card); border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(0,0,0,.3); display: none; }
.dialog.open, .dialog.open ~ .scrim { display: block; }
body.dialog-open .scrim { display: block; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dialog-head h3 { font-size: 17px; }
.dialog-body { padding: 16px 18px; }
.dialog-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.icon-x { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.icon-x:hover { background: var(--bg); color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .form-layout { grid-template-columns: 1fr; }
  .chatter { border-left: 0; border-top: 1px solid var(--line); position: static; max-height: none; }
}
@media (max-width: 900px) {
  .o-nav .menus { display: none; }
  .nav-burger { display: grid; }
  .tray-company { display: none; }
  .cp { grid-template-columns: 1fr auto; }
  .cp-mid { grid-column: 1 / -1; grid-row: 2; }
  .cp-right { grid-row: 1; grid-column: 2; }
  .cp-right .pager span { display: none; }
  .app-grid { grid-template-columns: repeat(3, 1fr); }
  .o-groups { grid-template-columns: 1fr; }
  .search-dd { grid-template-columns: 1fr; }
  .search-dd > div + div { border-left: 0; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
}
@media (max-width: 600px) {
  .o-nav .app-name { font-size: 14px; padding-left: 2px; }
  .cp { padding: 8px 12px; }
  .crumbs { font-size: 14.5px; }
  .home { padding: 28px 12px 48px; }
  .app-grid { gap: 22px 4px; }
  .app-tile { width: 96px; font-size: 12.5px; }
  .app-tile .ico { width: 64px; height: 64px; border-radius: 17px; }
  .kanban { scroll-snap-type: x mandatory; scroll-padding-left: 12px; padding: 12px; }
  .k-col { flex-basis: calc(100vw - 40px); scroll-snap-align: start; }
  .o-content { padding: 12px; }
  .sheet-bg { padding: 0; }
  .sheet { border-radius: 0; border-left: 0; border-right: 0; padding: 18px 16px; }
  .smart { margin: -18px -16px 14px; }
  .smart a { flex: 1 1 50%; min-width: 0; border-left: 0; border-top: 1px solid var(--line); }
  .o-field { grid-template-columns: 1fr; gap: 2px; }
  .stages span:not(.cur) { display: none; }
  .stages span.cur { clip-path: none; border-radius: 6px; margin: 0; padding: 6px 12px; }
  /* Listen werden zu Karten */
  table.o-list.cards thead, table.o-list.cards .cb, table.o-list.cards .opt { display: none; }
  table.o-list.cards, table.o-list.cards tbody, table.o-list.cards tfoot, table.o-list.cards tr, table.o-list.cards td { display: block; width: 100%; }
  table.o-list.cards tbody tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.o-list.cards td { border: 0; padding: 1px 0; text-align: left; }
  table.o-list.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 500; }
  table.o-list.cards tr.group { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg); }
  table.o-list.cards tr.group td { display: inline; width: auto; padding: 0; background: none; }
  table.o-list.cards tr.group td:empty { display: none; }
  table.o-list.cards tfoot tr { padding: 10px 12px; }
}
