/* Meridian Systems – Meister-Cockpit (chef.html)
   Profi-Desktop-Software-Architektur (Linear / Raycast / Tauri-ready) */

body[data-page="chef"] {
  background-color: var(--bg);
  background-image: none;
}

.cockpit-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100dvh - 51px);
}

/* ---------- Linke App-Sidebar (Desktop-Rail) ---------- */
.cockpit-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line-soft);
}
.rail-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.rail-brand .monogram {
  width: 38px;
  height: 38px;
  font-size: 14px;
  border-radius: var(--r-xs);
}
.rail-brand__id { min-width: 0; }
.rail-brand__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-accent-text);
}
.rail-brand__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  margin-top: 2px;
}
.rail-brand__meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.32;
  white-space: normal;
}

.rail-groups { display: none; }
.rail-foot { display: none; }

@media (min-width: 1024px) {
  .cockpit-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }
  .cockpit-rail {
    position: sticky;
    top: 50px;
    height: calc(100dvh - 50px);
    padding: 18px 14px 16px;
    border-bottom: 0;
    border-right: 1px solid var(--line-soft);
    background: #090b0f;
  }
  .rail-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 18px;
  }
  .rail-group__label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 8px 6px;
  }
  .rail-nav { display: grid; gap: 2px; }
  .rail-item {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: var(--r-xs);
    background: transparent;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.14s var(--ease), color 0.14s var(--ease), border-color 0.14s var(--ease);
  }
  .rail-item:hover { background: rgb(255 255 255 / 4%); color: var(--ink); }
  .rail-item.is-active {
    background: var(--card);
    border-color: var(--line-strong);
    color: var(--ink);
    font-weight: 600;
  }
  .rail-item__left { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
  .rail-item__left svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
  .rail-item.is-active .rail-item__left svg { color: var(--brand-accent-text); }
  .rail-kbd {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    padding: 1px 5px;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-xs);
    background: var(--bg);
  }
  .rail-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    font-size: 11.5px;
    color: var(--muted);
  }
  .rail-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 10px;
    white-space: nowrap;
    color: var(--ink-2);
  }
  .rail-status__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 0 3px var(--emerald-soft);
  }
  .rail-foot .foot__links { padding: 0; gap: 6px 8px; font-size: 11.5px; }
  .rail-foot .powered { margin-top: 2px; width: fit-content; }
}

/* ---------- Rechter Workspace ---------- */
.cockpit-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Kompakte App-Toolbar */
.cockpit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line-soft);
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  max-width: 400px;
  min-width: 0;
}
.search-box svg {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  height: 34px;
  padding: 0 34px 0 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.search-box input::placeholder { color: #646a77; }
.search-box input:focus {
  outline: none;
  background: var(--bg-subtle);
  border-color: var(--brand-accent);
}
.search-box__kbd {
  position: absolute;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  padding: 1px 5px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xs);
  pointer-events: none;
}
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.toolbar-right .btn--sm {
  min-height: 34px;
  height: 34px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: var(--r-xs);
}
.toolbar-right .btn--primary {
  background: var(--brand-accent);
  color: var(--brand-on-accent);
}
.toolbar-right .btn--primary:hover { background: var(--brand-accent-dark); }

/* Live-Banner */
.live-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px 18px;
  background: var(--emerald-soft);
  border-bottom: 1px solid rgb(150 207 164 / 30%);
  color: var(--emerald-text);
}
.live-banner__text { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 13.5px; }
.live-banner__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgb(150 207 164 / 20%);
}

/* Durchgehende KPI-Telemetrieleiste (keine 4 Einzelkästchen) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #090b0f;
  border-bottom: 1px solid var(--line-soft);
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 18px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.kpi:nth-child(2n) { border-right: 0; }
.kpi:nth-last-child(-n+2) { border-bottom: 0; }
.kpi__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.kpi__label::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.kpi--new .kpi__label::before { background: var(--brand-accent); }
.kpi--top .kpi__label::before { background: var(--emerald); }
.kpi--probe .kpi__label::before { background: #60a5fa; }
.kpi__value {
  font-family: var(--font-mono);
  font-size: 25px;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-top: 2px;
}
.kpi__sub { font-size: 11.5px; color: var(--muted); }

/* Status-Filterleiste */
.cockpit-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.status-tabs { display: flex; flex-wrap: wrap; gap: 5px; max-width: 100%; }
.status-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-soft);
  background: var(--bg-subtle);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}
.status-tab:hover { background: var(--card); border-color: var(--line-strong); color: var(--ink); }
.status-tab.is-active {
  background: var(--card);
  border-color: var(--brand-accent);
  color: var(--ink);
}
.status-tab__count {
  padding: 1px 5px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  background: rgb(255 255 255 / 6%);
  color: var(--muted);
}
.status-tab.is-active .status-tab__count {
  background: var(--brand-accent);
  color: var(--brand-on-accent);
}

/* ---------- Offene Swimlanes ohne Kästchen-in-Kästchen ---------- */
.board-wrap {
  flex: 1;
  min-width: 0;
  padding: 0;
}
.board-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100%;
}
.board-col {
  min-width: 0;
  padding: 14px 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.board-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 11px;
}
.board-col__title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.board-col__title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.board-col[data-status="neu"] .board-col__title::before { background: var(--brand-accent); }
.board-col[data-status="kontaktiert"] .board-col__title::before { background: #60a5fa; }
.board-col[data-status="probearbeiten"] .board-col__title::before { background: var(--amber); }
.board-col[data-status="eingestellt"] .board-col__title::before { background: var(--emerald); }

.board-col__count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: var(--bg-subtle);
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}
.board-col__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; min-width: 0; }
.board-empty {
  padding: 20px 14px;
  text-align: center;
  border-radius: var(--r-xs);
  border: 1px dashed var(--line-soft);
  color: var(--muted);
  font-size: 12.5px;
  background: rgb(255 255 255 / 1.5%);
}

.cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 16px 18px;
  min-width: 0;
}

/* ---------- Scharfe Kandidaten-Karten ---------- */
.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 13px 13px 11px 14px;
  background: var(--panel);
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--muted);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), transform 0.16s var(--ease);
}
.app-card--top { border-left-color: var(--emerald); }
.app-card--good { border-left-color: var(--amber); }
.app-card--check { border-left-color: #525866; }

.app-card:hover { background: var(--card); border-color: var(--line-strong); }
.app-card--top:hover { border-left-color: var(--emerald); }
.app-card--good:hover { border-left-color: var(--amber); }

.app-card.is-highlighted {
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px rgb(150 207 164 / 20%);
}
.app-card__top { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.app-card__badges { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; min-width: 0; flex-shrink: 0; }
.app-card__time {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}
.match-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.match-pill__pts { opacity: 0.9; }
.match-pill--top { background: var(--emerald-soft); color: var(--emerald-text); border: 1px solid rgb(150 207 164 / 28%); }
.match-pill--good { background: var(--amber-soft); color: var(--amber-text); border: 1px solid rgb(240 190 122 / 28%); }
.match-pill--check { background: var(--slate-soft); color: var(--slate-text); border: 1px solid var(--line-soft); }

.new-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 2px;
  background: var(--brand-accent);
  color: var(--brand-on-accent);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-card__name {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.app-card__job { font-size: 12.5px; font-weight: 600; color: var(--brand-accent-text); line-height: 1.35; }
.app-card__reason { font-size: 12px; color: var(--muted); line-height: 1.4; }
.app-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.meta-chip {
  padding: 2px 6px;
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--ink-2);
  border: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
}
.app-card__note-flag {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--brand-accent);
  padding: 5px 8px;
  border-radius: var(--r-xs);
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.app-card__foot {
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.app-card__foot-top { display: flex; width: 100%; }
.app-card__foot-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-width: 0; }

.card-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 9px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}
.card-btn:hover { border-color: var(--brand-accent); color: var(--brand-accent-text); background: var(--card-hover); }
.card-btn--advance {
  width: 100%;
  height: 31px;
  font-size: 12px;
  background: rgb(255 255 255 / 4%);
  border-color: var(--line-strong);
  color: var(--ink);
}
.card-btn--advance:hover {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: var(--brand-on-accent);
}
.card-btn--done {
  width: 100%;
  height: 31px;
  font-size: 12px;
  background: var(--emerald-soft);
  border-color: rgb(150 207 164 / 30%);
  color: var(--emerald-text);
}
.card-btn--details { flex: none; padding: 0 10px; }

.card-select {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0 7px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-soft);
  background: var(--bg);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  text-overflow: ellipsis;
}
.card-select:hover { border-color: var(--brand-accent); color: var(--ink); }
.card-select option { background: var(--panel); color: var(--ink); }

/* ---------- Profi-Tabellenansicht ---------- */
.chef-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.chef-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.chef-table th {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: #090b0f;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.chef-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.chef-table tbody tr {
  cursor: pointer;
  transition: background 0.14s var(--ease);
}
.chef-table tbody tr:hover { background: var(--panel); }
.chef-table tbody tr.is-highlighted { background: rgb(150 207 164 / 7%); }
.ct-who { display: flex; flex-direction: column; gap: 2px; min-width: 190px; }
.ct-who__top { display: flex; align-items: center; gap: 7px; }
.ct-who__top strong { font-size: 14px; font-weight: 700; color: var(--ink); }
.ct-who__job { font-size: 12px; color: var(--brand-accent-text); font-weight: 500; }
.ct-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ct-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ct-wa {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 9px;
  border-radius: var(--r-xs);
  background: var(--wa);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
}
.ct-wa:hover { background: var(--wa-dark); }

/* ---------- Slide-Over-Inspektor (Detail-Drawer) ---------- */
.drawer { position: fixed; inset: 0; z-index: 180; display: flex; justify-content: flex-end; }
.drawer__backdrop {
  position: absolute; inset: 0; background: rgb(5 7 10 / 74%);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.drawer__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 470px;
  height: 100%;
  background: var(--drawer-bg);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-strong);
  box-shadow: -24px 0 64px rgb(0 0 0 / 65%);
  animation: drawerIn 0.2s var(--ease) both;
}
@keyframes drawerIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #080a0e;
  color: var(--ink);
}
.drawer__who { display: flex; align-items: flex-start; gap: 12px; min-width: 0; flex: 1; }
.drawer__avatar {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: var(--brand-accent);
  color: var(--brand-on-accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}
.drawer__id { min-width: 0; }
.drawer__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.drawer__name { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; overflow-wrap: anywhere; color: var(--ink); }
.drawer__job { font-size: 13px; font-weight: 500; color: var(--brand-accent-text); margin-top: 3px; }
.drawer__time { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 3px; }

.drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 18px; }
.drawer__match { padding: 12px 14px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line-soft); }
.drawer__match--top { background: rgb(150 207 164 / 7%); border-color: rgb(150 207 164 / 28%); }
.drawer__match--good { background: rgb(240 190 122 / 7%); border-color: rgb(240 190 122 / 28%); }
.drawer__match--check { background: var(--panel); border-color: var(--line-soft); }
.drawer__match-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer__score { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; color: var(--ink); }
.drawer__match-reason { font-size: 13px; color: var(--ink-2); margin-top: 6px; font-weight: 500; }

.drawer__section-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}
.drawer__status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.status-choice {
  appearance: none;
  min-height: 36px;
  padding: 0 11px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}
.status-choice:hover { background: var(--card); border-color: var(--line-hover); color: var(--ink); }
.status-choice.is-active {
  background: var(--card-hover);
  border-color: var(--brand-accent);
  color: var(--ink);
  box-shadow: inset 2.5px 0 0 var(--brand-accent);
}

.drawer__actions { display: grid; gap: 7px; }
.drawer__actions .btn { min-height: 44px; font-size: 14px; }
.drawer__actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.drawer__actions-row .btn { padding: 0 10px; font-size: 13px; white-space: nowrap; }

.drawer__dl { border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 0 13px; background: var(--panel); }
.drawer__row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.drawer__row:last-child { border-bottom: 0; }
.drawer__row dt {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.drawer__row dd { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

.drawer__notes-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.drawer__notes-head .drawer__section-title { margin-bottom: 0; }
.drawer__notes-state { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--emerald-text); }
.drawer__notes-state:not(:empty) { padding: 2px 7px; border-radius: var(--r-xs); background: var(--emerald-soft); border: 1px solid rgb(150 207 164 / 28%); }
.drawer__textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.drawer__textarea::placeholder { color: #646a77; }
.drawer__textarea:focus { outline: none; background: var(--bg-subtle); border-color: var(--brand-accent); }

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--brand-accent);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

.foot--cockpit { max-width: none; padding: 18px 18px 26px; border-top: 1px solid var(--line-soft); }
@media (min-width: 1024px) {
  .foot--cockpit .foot__links,
  .foot--cockpit .powered { display: none; }
}

@media (max-width: 640px) {
  .cockpit-toolbar { padding: 10px 12px; gap: 8px; }
  .toolbar-right {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 6px;
  }
  .toolbar-right .seg { flex: 1 1 auto; }
  .toolbar-right .seg__btn { flex: 1 1 50%; padding: 0 8px; font-size: 12px; }
  .toolbar-right .btn--sm { padding: 0 10px; font-size: 12px; flex: 0 0 auto; }
}

@media (min-width: 720px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi { border-bottom: 0; }
  .kpi:nth-child(2n) { border-right: 1px solid var(--line-soft); }
  .kpi:last-child { border-right: 0; }
  .board-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-col { border-right: 1px solid var(--line-soft); }
  .board-col:nth-child(2n) { border-right: 0; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1120px) {
  .board-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .board-col { border-bottom: 0; border-right: 1px solid var(--line-soft); }
  .board-col:nth-child(2n) { border-right: 1px solid var(--line-soft); }
  .board-col:last-child { border-right: 0; }
  .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
