/*
 * myERP design system — Design-Richtlinien v2.0 (Juli 2026).
 * Two brands, three surfaces: Admin and Kundenportal share one warm-light palette
 * (the admin stays dense and keeps its dark green sidebar as brand anchor),
 * Webshop "Kernholz" keeps its own paper & wood world.
 * Status semantics are identical across all surfaces: green = OK/bezahlt,
 * amber = wartet/Warnung, red = überfällig/Alarm.
 * Every text/surface pairing is held to WCAG AA by DesignContrastTest — palette
 * tweaks that regress readability fail the build, so change tokens, run the test.
 */

/* ---------- Fonts (self-hosted; Google-Fonts CDN would leak client IPs) ---------- */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/figtree-latin-400-800.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plexmono-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/plexmono-latin-600.woff2") format("woff2");
}
/* Kernholz (Webshop) only — never used in admin or portal. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-latin-400-700.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  --font-ui: "Figtree", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-serif: "Newsreader", Georgia, serif;
  --radius-control: 8px; /* Bedienelemente & Pills: 7–9px */
  --radius-card: 14px; /* Karten: 13–14px */
}

/* Admin and portal share one light palette; only the shell chrome differs
   (admin: dark grouped sidebar for 27 nav items, portal: green top bar for 6). */
body.theme-admin {
  --bg: #f1eee6;
  --card: #ffffff;
  --row-alt: #f6f3ec;
  --border: #d8d1c0;
  --text: #1c2620;
  --text-2: #5c6b61;
  --primary: #26543c;
  --primary-hover: #2e6549;
  --ok: #25754e;
  --warn: #93611a;
  --alarm: #b3411f;
  --link: #1f5138;
  --input-bg: #ffffff;
  --input-border: #a7b0a6;
  --btn-bg: #ffffff;
  --btn-border: #839087;
  --btn-hover-bg: #edeae0;
  --focus: #26543c;
  --sidebar: #1e3328;
  --sidebar-border: #3a5245;
  --sidebar-text: #dce7df;
  --sidebar-text-2: #93a89a;
  --sidebar-hover: #2a4234;
  --sidebar-active: #35714e;
}

body.theme-portal {
  --bg: #f1eee6;
  --card: #ffffff;
  --row-alt: #f6f3ec;
  --border: #d8d1c0;
  --text: #1c2620;
  --text-2: #5c6b61;
  --primary: #26543c;
  --primary-hover: #2e6549;
  --ok: #25754e;
  --warn: #93611a;
  --alarm: #b3411f;
  --nav-active: #35714e;
  --link: #1f5138;
  --input-bg: #ffffff;
  --input-border: #a7b0a6;
  --btn-bg: #ffffff;
  --btn-border: #839087;
  --btn-hover-bg: #edeae0;
  --focus: #26543c;
}

/* Kernholz (Webshop) — own brand: paper & wood, terracotta CTA. */
body.theme-shop {
  --bg: #f3ece0;
  --card: #fbf7ef;
  --row-alt: #f4ecdd;
  --border: #e9dcc8;
  --text: #2a211a;
  --text-2: #6e6455;
  --primary: #24402f;
  --primary-hover: #2e5340;
  --ok: #25754e;
  --warn: #8a5c12;
  --alarm: #b03f1d;
  --cta: #ab431f;
  --stock-low: #7d5410;
  --link: #24402f;
  --input-bg: #fbf7ef;
  --input-border: #a49b8a;
  --btn-bg: #fbf7ef;
  --btn-border: #8b8577;
  --btn-hover-bg: #f1e9da;
  --focus: #24402f;
}

/* ---------- Base ---------- */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
}

body.theme-admin {
  font-size: 13.5px; /* Admin dicht, Portal luftig */
}

h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
}

h2 {
  font-size: 15px; /* Kartentitel */
  font-weight: 600;
  margin: 24px 0 8px;
}

a {
  color: var(--link);
}

.mono,
.amount {
  font-family: var(--font-mono);
}

.text-secondary {
  color: var(--text-2);
}

/* ---------- Admin shell: dark grouped sidebar ---------- */

body.theme-admin {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* The sidebar is the one dark surface left in the admin — it carries its own
   text tokens; never let it inherit the light-content --text/--text-2. */
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  padding: 16px 12px;
}

.sidebar .brand {
  display: block;
  font-weight: 800;
  font-size: 15px;
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 6px 10px 2px;
}

.sidebar .brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--sidebar-text-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar .nav-group-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sidebar-text-2);
  margin: 18px 10px 4px;
}

/* UC-ADM-33: draggable sidebar sections. The label is the grab handle; the block dims while dragged. */
.sidebar .nav-group-label {
  cursor: grab;
}

.sidebar .nav-group--dragging {
  opacity: 0.5;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-control);
  color: var(--sidebar-text);
  text-decoration: none;
}

.sidebar li a:hover {
  background: var(--sidebar-hover);
}

.sidebar li a[aria-current="page"] {
  background: var(--sidebar-active);
  color: #ffffff;
}

main.content {
  padding: 28px 32px;
  max-width: 1100px;
}

/* The admin is a working surface on a big screen (reference: 1920px window) —
   use the width; tables and section cards stretch with it. */
body.theme-admin main.content {
  max-width: 1600px;
}

/* ---------- Portal shell: brand bar on warm paper ---------- */

.topnav {
  background: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 24px;
}

.topnav .brand {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  margin-right: 20px;
}

.topnav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.topnav li a {
  display: block;
  color: rgb(255 255 255 / 82%);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: var(--radius-control);
}

.topnav li a:hover {
  color: #ffffff;
  background: rgb(255 255 255 / 8%);
}

.topnav li a[aria-current="page"] {
  color: #ffffff;
  background: var(--nav-active);
}

body.theme-portal main.content {
  padding: 32px 24px;
  max-width: 960px;
  margin: 0 auto;
}

/* ---------- Public/auth pages (login, reset, invitation) ---------- */

.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  width: 100%;
  max-width: 360px;
}

.auth-card input {
  display: block;
  width: 100%;
}

.auth-card button {
  display: block;
  width: 100%;
  margin-top: 16px;
}

/* Auth pages are the one place the admin grid must not apply. */
body.theme-admin.page-auth {
  display: block;
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin: 0 0 16px;
}

/* Karten trennen sich über Rahmenlinien, nie über Schatten. */
.card,
.auth-card {
  box-shadow: none;
}

/* Section cards: the h2 is the card's title, the card's last block ends flush. */
.card > h2:first-child {
  margin-top: 0;
}

.card > table:last-child,
.card > form:last-child {
  margin-bottom: 0;
}

/* ---------- Tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
}

th {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

/* Zebra: every second row gets a slightly tinted ground so wide rows read as one line. */
tbody tr:nth-child(even) td {
  background: var(--row-alt);
}

td.amount,
th.amount {
  text-align: right;
  white-space: nowrap;
}

td.ref {
  font-family: var(--font-mono);
  white-space: nowrap; /* Belegnummern werden nie umgebrochen oder gekürzt */
}

/* ---------- Status pills (Semantik ident über alle UIs) ---------- */

.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill--ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 38%, transparent);
}

.pill--warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 38%, transparent);
}

.pill--alarm {
  color: var(--alarm);
  background: color-mix(in srgb, var(--alarm) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--alarm) 38%, transparent);
}

.pill--neutral {
  color: var(--text-2);
  background: color-mix(in srgb, var(--text-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-2) 32%, transparent);
}

/* ---------- Buttons ---------- */

/* Four tiers: standard (visible on every surface), primary (one per form),
   destructive (Löschen/Stornieren), ghost (quiet row actions in tables). */
button,
.btn {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.btn:hover {
  border-color: var(--text-2);
  background: var(--btn-hover-bg);
}

.btn--primary,
button.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn--primary:hover,
button.btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn--destructive,
button.btn--destructive {
  background: var(--alarm);
  border-color: var(--alarm);
  color: #ffffff;
}

.btn--destructive:hover,
button.btn--destructive:hover {
  background: var(--alarm);
  border-color: var(--alarm);
}

.btn--ghost,
button.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--link);
}

.btn--ghost:hover,
button.btn--ghost:hover {
  background: color-mix(in srgb, var(--link) 10%, transparent);
  border-color: transparent;
}

button:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus, var(--primary));
  outline-offset: 2px;
}

/* ---------- Busy indicator (UC-ADM-86, admin shell only) ----------
   HTMX adds the `htmx-request` class to whichever element issued the request: the <form> itself
   when hx-post/hx-get sits on the form (the admin shell's default — one submit button per
   form-grid), or the button directly when it carries hx-post with no form ancestor (quiet row
   actions). Either shape gets the same feedback with no per-page opt-in: the button dims like the
   existing :disabled look and grows a small spinner, both driven purely by that class — nothing
   here needs page-level markup. Scoped to the admin shell; portal/shop keep their own look. */
body.theme-admin form.htmx-request button,
body.theme-admin button.htmx-request {
  position: relative;
  padding-right: 30px;
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

body.theme-admin form.htmx-request button::after,
body.theme-admin button.htmx-request::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 13px;
  height: 13px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spinner 0.6s linear infinite;
}

@keyframes btn-spinner {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-admin form.htmx-request button::after,
  body.theme-admin button.htmx-request::after {
    animation: none;
  }
}

/* ---------- Forms ---------- */

label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin: 10px 0 3px;
}

input,
select,
textarea {
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-control);
  padding: 7px 10px;
  max-width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--focus, var(--primary));
  outline-offset: 0;
}

form button {
  margin-top: 12px;
}

/* Aligned form layout for a logical group of fields: labels stack, every input/select/textarea
   shares one width in a constrained column, and the submit sits on its own line below — never a
   loose box hugging its content or a button floating beside the last field. The default for any
   grouped admin form. */
.form-grid {
  max-width: 420px;
}

.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid select,
.form-grid textarea {
  width: 100%;
}

.form-grid button {
  display: block;
}

.form-error {
  color: var(--alarm);
  font-size: 13px;
}

/* Negative reselling markup: the client price undercuts the vendor cost (UC-ADM-34). */
.amount--negative {
  color: var(--alarm);
}

.form-info {
  color: var(--ok);
  font-size: 13px;
}

/* ---------- KPI cards ---------- */

.kpi {
  display: inline-block;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin: 0 10px 12px 0;
  vertical-align: top;
}

.kpi .kpi-label {
  font-size: 12.5px;
  color: var(--text-2);
}

.kpi .kpi-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  margin: 2px 0;
}

.kpi .kpi-context {
  font-size: 12.5px;
}

.kpi .kpi-context.ok {
  color: var(--ok);
}

.kpi .kpi-context.warn {
  color: var(--warn);
}

.kpi .kpi-context.alarm {
  color: var(--alarm);
}

/* ---------- Progress (Paketstunden, Lager) ---------- */

.progress {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-2) 18%, transparent);
  overflow: hidden;
  margin: 6px 0;
}

.progress .progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ok);
}

.progress.progress--warn .progress-fill {
  background: var(--warn); /* Restanteil in Gold/Bernstein unter Warnschwelle */
}

/* ---------- EPC-QR block (QR immer auf weißem Feld) ---------- */

.qr-block {
  display: flex;
  gap: 16px;
  align-items: center;
}

.qr-block img {
  background: #ffffff;
  padding: 6px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border); /* the QR field is white — invisible on white cards without it */
}

.qr-block .qr-details {
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- Kernholz storefront shell (Webshop only) ---------- */

.brand-serif {
  font-family: var(--font-serif);
}

.shop-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 32px;
}

.shop-header .shop-brand {
  color: var(--text);
  text-decoration: none;
  line-height: 1.1;
}

.shop-header .shop-brand .brand-serif {
  display: block;
  font-size: 22px;
  font-weight: 600;
}

.shop-header .shop-brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shop-header nav {
  margin-left: auto;
}

.shop-header nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.shop-header nav li a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-control);
}

.shop-header nav li a:hover {
  background: var(--bg);
}

.shop-header nav li a[aria-current="page"] {
  background: var(--primary);
  color: #ffffff;
}

body.theme-shop main.content {
  padding: 32px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.shop-banner {
  background: color-mix(in srgb, var(--warn) 22%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  padding: 10px 32px;
}

.shop-banner p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.shop-footer {
  border-top: 1px solid var(--border);
  padding: 20px 32px 32px;
}

.shop-footer nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
}

.shop-footer nav li a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 12.5px;
}

/* Product imagery placeholder until real photos exist (Design-Richtlinien §4): hatched
   4:3 field with a mono label, no decorative icon. */
.product-photo-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-image: repeating-linear-gradient(
    45deg,
    color-mix(in srgb, var(--text-2) 14%, transparent),
    color-mix(in srgb, var(--text-2) 14%, transparent) 2px,
    transparent 2px,
    transparent 10px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-placeholder-notice {
  color: var(--alarm);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--alarm) 45%, transparent);
  background: color-mix(in srgb, var(--alarm) 10%, transparent);
  border-radius: var(--radius-control);
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* ---------- Kernholz catalog grid + product cards (UC-SHOP-01) ---------- */

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

/* Product photos are 4:3 with a 10px radius (Design-Richtlinien §4). */
.product-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.catalog-name {
  font-size: 17px;
  font-weight: 600;
}

.catalog-price {
  font-size: 14px;
}

/* ---------- Product detail ---------- */

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 32px;
  align-items: start;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-detail-price {
  font-size: 20px;
  margin: 0 0 4px;
}

.vat-note {
  color: var(--text-2);
  font-size: 12.5px;
  margin: 0 0 12px;
}

.product-description {
  margin: 16px 0;
  white-space: pre-line;
}

.btn--cta {
  background: var(--cta);
  border-color: var(--cta);
  color: #ffffff;
}

.add-to-cart {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.qty-input {
  width: 64px;
}

.cart-add-msg {
  margin-top: 8px;
  font-size: 13px;
}

/* ---------- Cart ---------- */

.cart-table {
  width: 100%;
  margin-bottom: 24px;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty-value {
  min-width: 20px;
  text-align: center;
}

.cart-totals {
  max-width: 360px;
  margin-left: auto;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.cart-total-row--sum {
  font-weight: 700;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 8px;
}

.checkout-pending {
  margin-top: 16px;
}

/* DE|EN language switcher (WP8): a small inline group of two POST forms, one per language. */
.lang-switch {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.sidebar .lang-switch {
  margin: 18px 10px 0;
}

.lang-switch .lang-option {
  margin: 0;
}

.lang-switch button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.lang-switch button:hover {
  background: var(--btn-hover-bg);
}

.lang-switch .is-active button[aria-current="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  cursor: default;
}

/* On the two dark chrome surfaces the switcher must not use the light-content
   tokens: admin sidebar and portal top bar carry their own text colors. */
.sidebar .lang-switch button {
  border-color: var(--sidebar-border);
  color: var(--sidebar-text-2);
}

.sidebar .lang-switch button:hover {
  background: var(--sidebar-hover);
}

.sidebar .lang-switch .is-active button[aria-current="true"] {
  background: var(--sidebar-active);
  border-color: var(--sidebar-active);
  color: #ffffff;
}

.topnav .lang-switch button {
  border-color: rgb(255 255 255 / 40%);
  color: rgb(255 255 255 / 82%);
}

.topnav .lang-switch button:hover {
  background: rgb(255 255 255 / 8%);
}

.topnav .lang-switch .is-active button[aria-current="true"] {
  background: var(--nav-active);
  border-color: var(--nav-active);
  color: #ffffff;
}

/* Command palette (UC-ADM-68): a centered overlay dialog the Ctrl/Cmd-K script fills at runtime. */
.command-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: rgb(0 0 0 / 38%);
}

.command-palette-overlay[hidden] {
  display: none;
}

.command-palette-panel {
  width: min(640px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 18px 48px rgb(0 0 0 / 28%);
}

.command-palette-input {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 16px 18px;
  font-size: 1.05rem;
  background: var(--input-bg);
  color: var(--text);
}

.command-palette-input:focus {
  outline: none;
}

.command-palette-results {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
}

.command-palette-result {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-control);
  cursor: pointer;
}

.command-palette-result[aria-selected="true"] {
  background: var(--row-alt);
}

.command-palette-group {
  flex: 0 0 auto;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.command-palette-title {
  flex: 1 1 auto;
  color: var(--text);
}

.command-palette-subtitle {
  flex: 0 1 auto;
  color: var(--text-2);
  font-size: 0.88rem;
}

.command-palette-empty {
  list-style: none;
  padding: 14px 12px;
  color: var(--text-2);
}

/* Muted secondary text — the empty-state lines on the "Heute" agenda (UC-ADM-69). */
.muted {
  color: var(--text-2);
}
