/* Able-Pro contrast skin (S10-3). Component patterns: repo Able-Pro-kit.
   Tokens from docs/THEME.md + docs/UI-SPEC-S10.md — slim custom CSS, no vendor bundle. */
:root,
[data-theme="light"] {
  color-scheme: light;
  --hz-primary: #4680ff;
  --hz-primary-hover: #1e4fd4;
  --hz-primary-subtle: #b6ceff;
  --hz-body-bg: #f4f6fa;
  --hz-surface: #ffffff;
  --hz-heading: #0b1220;
  --hz-body-text: #101820;
  --hz-muted: #334155;
  --hz-border: #8ea0b8;
  --hz-sidebar-border: #64748b;
  --hz-active-bg: #c9dbff;
  --hz-success: #15803d;
  --hz-warning: #c2410c;
  --hz-danger: #b91c1c;
  --hz-info: #0e7490;
  --hz-priority-high: #b91c1c;
  --hz-priority-medium: #c2410c;
  --hz-priority-low: #334155;
  --hz-list-line: #e4e9f0;
  --hz-row-hover: #eef2f8;
  --hz-unread-bg: #eef4ff;
  --hz-canvas: #f4f6fa;
  --hz-input-bg: #f4f6fa;
  --hz-topbar-bg: rgba(255, 255, 255, 0.9);
  --hz-radius: 8px;
  --hz-radius-sm: 6px;
  --hz-radius-lg: 10px;
  --hz-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  --hz-sidebar-w: 260px;
  --hz-topbar-h: 60px;
  --hz-font: "Inter", system-ui, sans-serif;
  --hz-avatar-1: #4680ff;
  --hz-avatar-2: #2ca87f;
  --hz-avatar-3: #e58a00;
  --hz-avatar-4: #3ec9d6;
  --hz-avatar-5: #6610f2;
  --hz-avatar-6: #04a9f5;
  --hz-avatar-7: #f4c22b;
  --hz-avatar-8: #dc2626;
  --hz-avatar-9: #5b6b79;
  --hz-avatar-10: #1d2630;

  --primary: var(--hz-primary);
  --primary-2: var(--hz-primary-hover);
  --surface: var(--hz-body-bg);
  --surface-2: var(--hz-active-bg);
  --paper: var(--hz-surface);
  --danger: var(--hz-danger);
  --warn: var(--hz-warning);
  --ok: var(--hz-success);
  --ink: var(--hz-body-text);
  --muted: var(--hz-muted);
  --line: var(--hz-border);
  --shadow: var(--hz-shadow);
  --tap: 44px;
  --hz-placeholder: #5b6b79;
  --hz-ctl-h: 52px;
  --hz-sticky-shadow: rgba(15, 23, 42, 0.28);
  --radius: var(--hz-radius);
  --nav-h: 64px;
  --font: var(--hz-font);
}

[data-theme="dark"] {
  color-scheme: dark;
  --hz-primary: #7aa4ff;
  --hz-primary-hover: #9bbcff;
  --hz-primary-subtle: #243656;
  --hz-body-bg: #0e141d;
  --hz-surface: #161d2a;
  --hz-heading: #f4f7fb;
  --hz-body-text: #e8eef6;
  --hz-muted: #b4c0d0;
  --hz-border: #4a5c74;
  --hz-sidebar-border: #5b6e86;
  --hz-active-bg: #243656;
  --hz-success: #22c55e;
  --hz-warning: #fb923c;
  --hz-danger: #f87171;
  --hz-info: #22d3ee;
  --hz-priority-high: #f87171;
  --hz-priority-medium: #fb923c;
  --hz-priority-low: #b4c0d0;
  --hz-list-line: #2a3548;
  --hz-row-hover: #1c2534;
  --hz-unread-bg: #1a2740;
  --hz-canvas: #101722;
  --hz-input-bg: #0e141d;
  --hz-topbar-bg: rgba(22, 29, 42, 0.92);
  --hz-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --hz-placeholder: #8b9bb0;
  --hz-sticky-shadow: rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
@media (max-width: 767px) {
  html, body {
    overscroll-behavior-y: contain;
  }
}
html, body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
}
body {
  font-family: var(--font);
  font-size: 16px;
  background: var(--hz-body-bg);
  color: var(--hz-body-text);
  line-height: 1.45;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
/* iOS Safari zooms the page when a focused control is under 16px. */
input, select, textarea {
  font-size: max(16px, 1rem);
  max-width: 100%;
  min-width: 0;
}
img, svg, video { max-width: 100%; }
a { color: var(--hz-primary); }
a, button, input, select, textarea, label { touch-action: manipulation; }

#app {
  min-height: 100%;
  min-height: 100svh;
  max-width: 100%;
  overflow-x: hidden;
}

.ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: block;
}

.banner {
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}
.banner.error {
  background: #fee2e2;
  border-color: #f87171;
  color: var(--hz-danger);
}
.banner.ok {
  background: #dcfce7;
  border-color: #4ade80;
  color: var(--hz-success);
}
.banner.warn {
  background: #ffedd5;
  border-color: #fb923c;
  color: var(--hz-heading);
}
.banner.net {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #e6f8fa;
  border-color: #b7ebf0;
  color: var(--hz-heading);
}
.banner .retry {
  margin-left: 8px;
  background: transparent;
  border: 0;
  color: inherit;
  text-decoration: underline;
  min-height: var(--tap);
}

.hz-app {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--hz-body-bg);
}
.hz-body {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  align-items: flex-start;
}
.hz-body > main,
.hz-body > .page {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--hz-topbar-h);
  padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  padding-top: max(8px, env(safe-area-inset-top));
  background: var(--hz-topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hz-border);
  color: var(--hz-heading);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.topbar-logo {
  display: block;
  width: min(120px, 32vw);
  height: 24px;
  background-color: var(--hz-heading);
  -webkit-mask: url("/icons/logo.svg") center / contain no-repeat;
  mask: url("/icons/logo.svg") center / contain no-repeat;
  flex: 0 1 auto;
  min-width: 84px;
}
.topbar .who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 36vw;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.topbar .who strong,
.topbar .who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar .who strong { font-size: 0.875rem; }
.topbar .who span { font-size: 0.72rem; color: var(--hz-muted); }
.topbar .burger {
  display: inline-flex;
  flex: 0 0 auto;
  flex-shrink: 0;
}
.topbar .btn {
  flex: 0 0 auto;
  flex-shrink: 0;
  white-space: nowrap;
}
.perm-grid {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.perm-grid .check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.88rem;
}
.role-card { text-align: left; }

.sidebar {
  display: none;
}
.side-nav {
  display: grid;
  gap: 2px;
  padding: 12px 8px 16px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: var(--hz-radius);
  color: var(--hz-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}
.nav-item:hover { background: var(--hz-active-bg); color: var(--hz-heading); }
.nav-item.on {
  background: var(--hz-active-bg);
  color: var(--hz-primary-hover);
  box-shadow: inset 3px 0 0 var(--hz-primary);
}
.nav-item.nav-sub {
  margin-left: 28px;
  min-height: calc(var(--tap) - 6px);
  font-size: 0.82rem;
}
@media (min-width: 768px) {
  :root { --hz-ctl-h: var(--tap); }
}

/* S30 contacts: filter + Safari date + swipe table */
.page.contacts-page { max-width: min(1240px, 100%); }
.contacts-page .back { margin: 0 0 12px; }
.contacts-page .back-link {
  color: var(--hz-heading);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 8px 0 12px;
  align-items: end;
}
.contact-filters > * { min-width: 0; }
.contact-filters .f-search,
.contact-filters .f-toggle,
.contact-filters .f-summary,
.contact-filters .f-site,
.contact-filters .f-campaign,
.contact-filters .f-actions { grid-column: 1 / -1; }
.contact-filters label.field {
  margin: 0;
  white-space: normal;
  display: block;
  min-width: 0;
}
.contact-filters .f-from,
.contact-filters .f-to,
.contact-filters .f-actions {
  min-width: 0;
}
.contacts-page .lbl {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 16px;
  margin: 0 0 6px;
  color: var(--hz-muted);
}
.contacts-page .ctl {
  position: relative;
  display: block;
  min-width: 0;
}
.contacts-page .ctl input,
.contacts-page .ctl select {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: var(--hz-ctl-h);
  min-height: var(--hz-ctl-h);
  margin: 0;
  padding: 0 14px;
  line-height: normal;
  font: inherit;
  font-size: 16px;
  color: var(--hz-body-text);
  background: var(--hz-input-bg);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
}
.contacts-page .ctl input::placeholder { color: var(--hz-placeholder); opacity: 1; }
.contacts-page .ctl input:focus,
.contacts-page .ctl select:focus {
  outline: 2px solid var(--hz-primary);
  outline-offset: 1px;
  border-color: var(--hz-primary);
}
.contacts-page .ctl.has-icon-left input { padding-left: 44px; }
.contacts-page .ctl select {
  padding-right: 40px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contacts-page .ctl .ic-left,
.contacts-page .ctl .ic-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--hz-muted);
  pointer-events: none;
}
.contacts-page .ctl .ic-left { left: 14px; }
.contacts-page .ctl .ic-right { right: 14px; }
.contacts-page .ctl input[type="date"] {
  position: relative;
  display: flex;
  align-items: center;
  text-align: left;
  padding-right: 42px;
}
.contacts-page .ctl input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
  min-height: 0;
  line-height: normal;
}
.contacts-page .ctl input[type="date"]::-webkit-datetime-edit {
  padding: 0;
  line-height: normal;
}
.contacts-page .ctl input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.contacts-page .ctl input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.contacts-page .ctl.date[data-empty="true"] input { color: transparent; }
.contacts-page .ctl.date[data-empty="true"] input::-webkit-datetime-edit { color: transparent; }
.contacts-page .ctl.date[data-empty="true"]::before {
  content: attr(data-placeholder);
  position: absolute;
  left: 15px;
  top: 0;
  height: var(--hz-ctl-h);
  display: flex;
  align-items: center;
  font-size: 16px;
  color: var(--hz-placeholder);
  pointer-events: none;
  z-index: 1;
}
.contacts-page .ctl.date[data-empty="true"]:focus-within::before { content: none; }
.contacts-page .ctl.date[data-empty="true"]:focus-within input,
.contacts-page .ctl.date[data-empty="true"]:focus-within input::-webkit-datetime-edit {
  color: var(--hz-body-text);
}
.f-toggle { display: flex; gap: 8px; align-items: center; }
.btn.btn-filter-toggle {
  flex: 1;
  display: inline-flex;
  justify-content: space-between;
  min-height: var(--hz-ctl-h);
  background: var(--hz-surface);
  color: var(--hz-heading);
  border: 1px solid var(--hz-border);
  box-shadow: none;
  padding: 0 14px;
}
.btn.btn-filter-toggle:hover:not(:disabled) {
  background: var(--hz-row-hover);
  color: var(--hz-heading);
}
.btn-filter-toggle .toggle-label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.btn-filter-toggle .count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: var(--hz-primary-hover);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 750;
}
.btn-filter-toggle .chev { transition: transform 0.15s; }
.btn-filter-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.contacts-page .btn-text {
  min-height: 44px;
  padding: 0 10px;
  background: none;
  border: 0;
  color: var(--hz-primary-hover);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 0.95rem;
}
.f-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.f-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--hz-active-bg);
  color: var(--hz-heading);
  font-size: 0.8rem;
  font-weight: 650;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.f-panel { display: contents; }
.f-panel[hidden] { display: none; }
.f-actions { display: grid; gap: 4px; }
.f-actions .btn { width: 100%; min-height: var(--hz-ctl-h); }
@media (min-width: 768px) {
  .f-toggle, .f-summary { display: none !important; }
  .f-panel, .f-panel[hidden] { display: contents; }
  .contact-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-filters .f-search { grid-column: span 2; }
  .contact-filters .f-site, .contact-filters .f-campaign { grid-column: auto; }
  .contact-filters .f-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  .contact-filters .f-actions .btn { width: auto; }
}
@media (min-width: 1100px) {
  .contact-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contact-filters .f-search { grid-column: span 2; }
  .contact-filters .f-actions {
    grid-column: span 2;
    justify-content: flex-start;
    align-self: end;
  }
}
@media (min-width: 1440px) {
  .contact-filters {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 170px 170px auto;
  }
  .contact-filters .f-search, .contact-filters .f-actions { grid-column: auto; }
}

.swipe-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--hz-muted);
  transition: opacity 0.2s;
}
.swipe-hint svg { width: 18px; height: 18px; color: var(--hz-primary-hover); }
.swipe-hint.is-gone { opacity: 0; pointer-events: none; }
.swipe-hint[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .swipe-hint { transition: none; } }
.contact-table-frame { position: relative; }
.contact-table-frame::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 36px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  background: linear-gradient(to right, transparent, var(--hz-surface) 85%);
  border-radius: 0 var(--hz-radius-lg) var(--hz-radius-lg) 0;
  z-index: 4;
}
.contact-table-frame.can-scroll-right::after { opacity: 1; }
.contact-table-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-height: max(320px, calc(100dvh - var(--hz-topbar-h) - var(--nav-h) - env(safe-area-inset-bottom) - 64px));
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
  box-shadow: var(--hz-shadow);
}
.contact-table-scroll:focus {
  outline: 2px solid var(--hz-primary);
  outline-offset: -2px;
}
.contact-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 0.875rem;
}
.contact-table col.c-name { width: 140px; }
.contact-table col.c-date { width: 152px; }
.contact-table col.c-mail { width: 200px; }
.contact-table col.c-site { width: 124px; }
.contact-table col.c-camp { width: 140px; }
.contact-table col.c-status { width: 112px; }
.contact-table col.c-act { width: 104px; }
.contact-table th,
.contact-table td {
  height: 47px;
  padding: 0 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--hz-list-line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
  background: var(--hz-surface);
  color: var(--hz-body-text);
}
.contact-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 40px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--hz-border);
}
.contact-table th:first-child,
.contact-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 1px solid var(--hz-list-line);
}
.contact-table th:first-child { z-index: 3; }
.contact-table-frame.is-scrolled-x th:first-child,
.contact-table-frame.is-scrolled-x td:first-child {
  box-shadow: 6px 0 8px -6px var(--hz-sticky-shadow);
}
.contact-table td.c-date { font-variant-numeric: tabular-nums; }
.contact-table td.c-name { font-weight: 650; color: var(--hz-heading); padding: 0; }
.cell-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 47px;
  padding: 0 8px 0 12px;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.cell-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.cell-btn svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--hz-muted); }
.cell-btn:focus-visible {
  outline: 2px solid var(--hz-primary);
  outline-offset: -2px;
}
.contact-table td.c-mail .cell-btn { padding: 0 12px; font-weight: 400; }
.contact-table td.c-mail { padding: 0; }
.contact-table .badge
  { font-size: 0.7rem; }
.contact-table td.c-act { overflow: visible; text-align: right; padding: 0 8px; }
.contact-table th.c-act,
.contact-table td.c-act,
.contact-table col.c-act { display: none; }
.contact-table .icon-btn,
.detail-sheet .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: var(--hz-radius);
  background: none;
  color: var(--hz-muted);
  cursor: pointer;
}
.contact-table .icon-btn:hover,
.detail-sheet .icon-btn:hover { background: var(--hz-row-hover); color: var(--hz-heading); }
.contact-table .icon-btn.danger { color: var(--hz-danger); }
.contact-table .icon-btn svg,
.detail-sheet .icon-btn svg { width: 20px; height: 20px; }
.contact-table .icon-btn:focus-visible,
.detail-sheet .icon-btn:focus-visible {
  outline: 2px solid var(--hz-primary);
  outline-offset: 1px;
}
.contact-table tbody tr:hover td { background: var(--hz-row-hover); }
.contact-table tbody tr:last-child td { border-bottom: 0; }
.contact-table.is-busy tbody { opacity: 0.55; }
.contacts-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}
@media (max-width: 767px) {
  .contact-table-frame { margin-inline: calc(-1 * max(20px, env(safe-area-inset-left))); }
  .contact-table-scroll {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
  .contact-table-frame::after { border-radius: 0; }
  .contacts-foot .btn { width: 100%; }
}
@media (min-width: 768px) {
  .contact-table th.c-act,
  .contact-table td.c-act { display: table-cell; }
  .contact-table col.c-act { display: table-column; }
  .contact-table {
    table-layout: fixed;
    width: 100%;
    min-width: 760px;
    font-size: 0.9rem;
  }
  .contact-table col.c-name { width: 17%; }
  .contact-table col.c-date { width: 15.5%; }
  .contact-table col.c-mail { width: auto; }
  .contact-table col.c-site { width: 12%; }
  .contact-table col.c-camp { width: 13%; }
  .contact-table col.c-status { width: 12.5%; }
  .contact-table col.c-act { width: 104px; }
  .contact-table td { height: 51px; }
  .contact-table td.c-name { padding: 0 12px; }
  .contact-table td.c-mail { padding: 0 12px; }
  .cell-btn { height: 51px; }
  .contact-table td.c-name .cell-btn svg { display: none; }
}
.detail-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.45);
}
.detail-sheet .panel {
  width: 100%;
  background: var(--hz-surface);
  border-radius: 16px 16px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--hz-shadow);
}
.detail-sheet .grip {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--hz-border);
  margin: 0 auto 10px;
}
.detail-sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.detail-sheet h2 { margin: 0; font-size: 1.15rem; color: var(--hz-heading); }
.detail-sheet dl {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 14px 0 18px;
  font-size: 0.95rem;
}
.detail-sheet dt { color: var(--hz-muted); font-weight: 650; font-size: 0.82rem; padding-top: 2px; }
.detail-sheet dd { margin: 0; color: var(--hz-body-text); overflow-wrap: anywhere; }
.detail-sheet .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.outline-danger {
  background: transparent;
  color: var(--hz-danger);
  border: 2px solid var(--hz-danger);
  box-shadow: none;
}
.btn.outline-danger:hover:not(:disabled) {
  background: var(--hz-row-hover);
  color: var(--hz-danger);
}
@media (min-width: 768px) {
  .detail-sheet {
    align-items: center;
    justify-content: center;
  }
  .detail-sheet .panel {
    width: min(480px, calc(100% - 32px));
    border-radius: var(--hz-radius-lg);
    padding: 20px;
    margin: 16px;
  }
  .detail-sheet .grip { display: none; }
}
.contact-table .skel {
  display: block;
  height: 12px;
  margin: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--hz-list-line), var(--hz-row-hover), var(--hz-list-line));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
.contact-table td.c-name .skel { width: 72%; }
.contact-table td.c-date .skel { width: 58%; }
.contact-table td.c-mail .skel { width: 84%; }
.contact-table td.c-site .skel { width: 46%; }
.contact-table td.c-camp .skel { width: 52%; }
.contact-table td.c-status .skel { width: 38%; }
.table-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 32px 20px;
  text-align: center;
  color: var(--hz-body-text);
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
}
.table-state svg { width: 28px; height: 28px; color: var(--hz-danger); }
.table-state .btn { margin-top: 8px; }
.contact-export .chip-row .field { flex: 1; min-width: 0; }
.contact-export h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}
.contact-export .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.contact-export-check {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: var(--tap);
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--hz-body-text);
  cursor: pointer;
}
.contact-export-check input {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-height: 18px;
  min-width: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: var(--hz-primary);
}
.contact-export .is-hidden { display: none; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: flex-start;
}
.drawer {
  width: min(280px, 86vw);
  height: 100%;
  max-height: 100svh;
  background: var(--hz-surface);
  border-right: 2px solid var(--hz-sidebar-border);
  overflow: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--hz-topbar-h);
  padding: 8px 8px 8px 16px;
  padding-top: max(8px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--hz-sidebar-border);
}

.page {
  padding: 20px max(20px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  max-width: min(960px, 100%);
  min-width: 0;
  margin: 0 auto;
  overflow-wrap: break-word;
  container-type: inline-size;
  container-name: page;
}
.hz-app.has-bottom-nav .page {
  padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
}
.page.task-detail,
.page.doc-detail {
  max-width: min(1240px, 100%);
  padding-top: 12px;
}
.page.task-detail {
  container-name: task-detail;
}
.page.doc-detail {
  container-name: doc-detail;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.page-head h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--hz-heading);
}
.page > h1 {
  margin: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--hz-heading);
}
.breadcrumb {
  margin: 0 0 8px;
  color: var(--hz-muted);
  font-size: 0.78rem;
}

.login-wrap {
  min-height: 100%;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
  max-width: 100%;
  overflow-x: hidden;
  background: var(--hz-body-bg);
}
.login-card {
  width: min(100%, 420px);
  max-width: 100%;
  min-width: 0;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
  padding: 28px 22px 24px;
  box-shadow: var(--hz-shadow);
}
.brand-logo {
  display: block;
  width: min(100%, 228px);
  height: auto;
  color: var(--hz-heading);
  margin: 0 0 20px;
}
.login-card h1 {
  margin: 0 0 20px;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--hz-heading);
}
.login-card p.lede { margin: 0 0 20px; color: var(--hz-muted); }
.pw-row { position: relative; display: block; }
.pw-row input { padding-right: 48px; }
.pw-row .pw-toggle {
  position: absolute;
  right: 4px;
  bottom: 2px;
  color: var(--hz-muted);
}
.pwa-install {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px;
  background: var(--hz-active-bg);
  border-radius: var(--hz-radius);
  text-align: left;
}
.pwa-install img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}
.pwa-install .pwa-copy { min-width: 0; flex: 1; }
.pwa-install strong { display: block; font-size: 0.92rem; }
.pwa-install span { display: block; font-size: 0.78rem; color: var(--hz-muted); }
.pwa-install .btn { flex-shrink: 0; }

label.field { display: block; margin-bottom: 14px; font-size: 0.78rem; font-weight: 650; color: var(--hz-muted); }
label.field input, label.field select, label.field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 6px;
  min-height: var(--tap);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  background: var(--hz-input-bg);
  padding: 10px 12px;
  font-size: max(16px, 1rem);
  color: var(--hz-body-text);
}
label.field input:focus, label.field select:focus, label.field textarea:focus,
.ctl-select:focus, .ctl select:focus, .handoff-row select:focus, .handoff-row input:focus {
  outline: 2px solid var(--hz-primary);
  outline-offset: 1px;
  border-color: var(--hz-primary);
}
label.field textarea { min-height: 96px; resize: vertical; }

.page.contacts-page .ctl input,
.page.contacts-page .ctl select {
  margin: 0;
  height: var(--hz-ctl-h);
  min-height: var(--hz-ctl-h);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 16px;
  border: 0;
  border-radius: var(--hz-radius);
  background: var(--hz-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(30, 79, 212, 0.35);
}
.btn:hover:not(:disabled) { background: var(--hz-primary-hover); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--hz-primary-hover);
  border: 2px solid var(--hz-primary);
  box-shadow: none;
}
.btn.ghost:hover:not(:disabled) { background: var(--hz-active-bg); }
.btn.warn { background: var(--hz-warning); color: #fff; }
.btn.danger { background: var(--hz-danger); color: #fff; }
.btn.ok { background: var(--hz-success); color: #fff; }
.btn.block { width: 100%; text-decoration: none; }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 0.9rem; }
.muted-link {
  display: block;
  margin-top: 14px;
  text-align: center;
  color: var(--hz-muted);
  font-weight: 650;
  background: none;
  border: 0;
}
button.muted-link {
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
}
.hint { color: var(--hz-muted); font-size: 0.9rem; margin: 0 0 12px; }
.ok-note { color: var(--hz-success); font-weight: 700; }
.staff-list { display: grid; gap: 0; margin-top: 16px; }
.stack-form { display: grid; gap: 12px; margin-top: 12px; min-width: 0; }
.stack-form .btn { margin-top: 4px; }
label.field.check {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row;
}
label.field.check input { width: auto; min-height: 20px; }

.spin {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ptr-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  transform: translateY(calc(var(--ptr-pull, 0px) - 8px));
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  color: var(--hz-heading);
  font-size: 0.82rem;
  font-weight: 650;
}
.ptr-indicator[hidden] { display: none; }
.ptr-indicator .ptr-spin {
  width: 16px;
  height: 16px;
  border: 2px solid var(--hz-primary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@media (min-width: 768px) {
  .ptr-indicator { display: none !important; }
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(29, 38, 48, 0.46);
  backdrop-filter: blur(2px);
  padding: 24px;
}
.busy-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: min(280px, 86vw);
  max-width: 360px;
  background: var(--hz-surface);
  border-radius: var(--hz-radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(29, 38, 48, 0.22);
}
.busy-spin {
  width: 36px;
  height: 36px;
  border-width: 3px;
  border-color: var(--hz-primary);
  border-right-color: transparent;
}
.busy-card strong {
  color: var(--hz-heading);
  font-size: 1.05rem;
}
.busy-card span:last-child {
  color: var(--hz-muted);
  font-size: 0.9rem;
}

.tiles,
.hz-list,
.staff-list,
.sites-list,
.shop-product-list,
.stack.hz-list {
  display: grid;
  gap: 0;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  overflow: hidden;
  box-shadow: none;
}
.tile,
.hz-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hz-list-line);
  border-radius: 0;
  padding: 14px 16px;
  min-height: 64px;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
}
.tile:has(.hz-row-media),
.hz-row:has(.hz-row-media) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.tiles .tile,
.hz-list > .hz-row,
.hz-list > .card,
.hz-list > a.card,
.staff-list > .card,
.sites-list > .card,
.stack.hz-list > .card,
.shop-product-list > .card,
.list.hz-list > .card {
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  border-bottom: 1px solid var(--hz-list-line);
  background: transparent;
}
.tiles .tile:last-child,
.hz-list > :last-child,
.staff-list > :last-child,
.sites-list > :last-child,
.stack.hz-list > .card:last-child,
.shop-product-list > :last-child,
.list.hz-list > .card:last-child {
  border-bottom: 0;
}
.tile:hover,
.hz-row:hover,
.hz-list > .card:hover,
.staff-list > .card:hover,
.sites-list > .card:hover,
.stack.hz-list > .card:hover,
.shop-product-list > .card:hover,
.list.hz-list > .card:hover { background: var(--hz-row-hover); }
.tile h2,
.hz-row-title {
  display: block;
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hz-heading);
  line-height: 1.3;
}
.tile p,
.hz-row-meta {
  display: block;
  margin: 0;
  color: var(--hz-muted);
  font-size: 0.82rem;
}
.hz-row-media {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hz-canvas);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--hz-muted);
  font-weight: 800;
}
.hz-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
article.hz-row { cursor: default; }
.hz-row-body { min-width: 0; }
.hz-row-aside {
  color: var(--hz-heading);
  font-weight: 750;
  font-size: 0.92rem;
  text-align: right;
  min-width: 0;
  max-width: 48%;
}

.hello { margin: 8px 0 20px; }
.hello h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hz-heading);
  overflow-wrap: break-word;
}
.hello p { margin: 0; color: var(--hz-muted); }

.toolbar {
  margin-bottom: 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.toolbar.card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: 16px;
}
.toolbar .page-head { margin-bottom: 12px; }
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 0;
}
.filters select {
  width: 100%;
  min-width: 0;
  font-size: max(16px, 1rem);
}
.filters .site { grid-column: 1 / -1; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.chip {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--hz-border);
  background: var(--hz-surface);
  padding: 0 12px;
  font-weight: 650;
  color: var(--hz-muted);
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.chip.on {
  background: var(--hz-primary-subtle);
  color: var(--hz-primary-hover);
  border-color: var(--hz-primary);
}

.card {
  background: var(--hz-surface);
  border-radius: var(--hz-radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid var(--hz-border);
  overflow-wrap: break-word;
  box-shadow: none;
}
.form-card,
.login-card,
.dialog,
.sheet,
.busy-card {
  box-shadow: var(--hz-shadow);
}
button.card { cursor: pointer; }
button.card:hover,
table.board tbody tr:hover { background: var(--hz-active-bg); }
.card h3 {
  margin: 6px 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hz-heading);
}
.task-card { border-left: 5px solid var(--hz-priority-low); }
.task-card.prio-high { border-left-color: var(--hz-priority-high); }
.task-card.prio-medium { border-left-color: var(--hz-priority-medium); }
.task-card.prio-low { border-left-color: var(--hz-priority-low); }
.meta { color: var(--hz-muted); font-size: 0.88rem; }
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--hz-active-bg);
  color: var(--hz-heading);
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.badge.high { background: #fee2e2; color: var(--hz-priority-high); }
.badge.medium { background: #ffedd5; color: var(--hz-priority-medium); }
.badge.low { background: #e2e8f0; color: var(--hz-priority-low); }
.badge.open, .badge.assigned { background: #dbeafe; color: var(--hz-primary-hover); }
.badge.in_progress { background: var(--hz-primary-subtle); color: var(--hz-primary-hover); }
.badge.need_info { background: #ffedd5; color: var(--hz-warning); }
.badge.done { background: #dcfce7; color: var(--hz-success); }
.badge.rejected, .badge.denied { background: #fee2e2; color: var(--hz-danger); }
.badge.pending { background: var(--hz-active-bg); color: var(--hz-heading); }
.badge.ok { background: #dcfce7; color: var(--hz-success); }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.card-actions select {
  min-height: 40px;
  min-width: 0;
  max-width: 100%;
  border-radius: var(--hz-radius);
  border: 1px solid var(--hz-border);
  background: var(--hz-surface);
  font-size: max(16px, 1rem);
}

.empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--hz-muted);
}

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  display: none;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  width: 100%;
  max-width: 100%;
  background: var(--hz-surface);
  border-top: 1px solid var(--hz-border);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.hz-app.has-bottom-nav .bottom-nav { display: grid; }
.bottom-nav a, .bottom-nav button {
  min-height: var(--nav-h);
  background: transparent;
  border: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--hz-muted);
  text-decoration: none;
}
.bottom-nav .on { color: var(--hz-primary); }
.bottom-nav .plus {
  font-size: 1.6rem;
  line-height: 1;
}

.section { margin: 20px 0; }
.section h2 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-muted);
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog .actions { justify-content: flex-end; }

.media-list { display: block; }
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.media-tile {
  position: relative;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  overflow: hidden;
  min-width: 0;
}
.tile-preview {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.tile-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  background: var(--hz-active-bg);
  overflow: hidden;
}
.tile-visual img,
.tile-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile-glyph {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--hz-primary);
}
.tile-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(29, 38, 48, 0.72);
  color: #fff;
  font-size: 0.9rem;
}
.tile-kind {
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--hz-surface);
  color: var(--hz-primary);
  border: 1px solid var(--hz-border);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}
.tile-del {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  min-width: var(--tap);
  min-height: var(--tap);
  border: 0;
  border-radius: var(--hz-radius);
  background: var(--hz-surface);
  color: var(--hz-heading);
  cursor: pointer;
}
.tile-meta {
  padding: 8px 10px 10px;
  min-width: 0;
}
.tile-meta strong {
  display: block;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-meta span {
  color: var(--hz-muted);
  font-size: 0.75rem;
}
.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100svh;
  overflow: hidden;
  background: rgba(19, 25, 32, 0.94);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.preview-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  padding-top: max(8px, env(safe-area-inset-top));
}
.preview-bar p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.preview-close {
  color: #fff;
  font-size: 1.8rem;
}
.preview-stage {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
}
.preview-stage img,
.preview-stage video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.preview-stage iframe {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  border: 0;
  background: #111;
}
.preview-stage.has-pdf {
  display: block;
  padding: 0;
  height: 100%;
}
.preview-pdf {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.preview-audio {
  display: grid;
  gap: 16px;
  place-items: center;
  width: min(420px, 100%);
}
.preview-audio audio { width: 100%; }
.preview-audio .tile-glyph { font-size: 3rem; color: #fff; }
@media (min-width: 1100px) {
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 12;
  background: var(--hz-heading);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--hz-shadow);
}
.hz-app.has-bottom-nav .toast {
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
}
body[data-contacts-page] .toast,
.toast.toast-contacts {
  bottom: auto;
  top: calc(12px + env(safe-area-inset-top));
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: 999px;
  background: var(--hz-primary-subtle);
  border: 0;
  color: var(--hz-primary);
  font-weight: 650;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.pill .x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}
.avatar-stack { display: flex; gap: 4px; margin-top: 8px; }
.avatar-chip {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hz-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.avatar-chip.more { background: var(--hz-active-bg); color: var(--hz-heading); }
.detail-head { margin-bottom: 12px; }
.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.task-detail h1,
.doc-detail h1 {
  margin: 2px 0 10px;
  font-size: 1.28rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--hz-heading);
}
.task-load-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 32px 20px;
}
.task-load-card strong {
  font-size: 1.15rem;
  color: var(--hz-heading);
}
.task-load-card > span:last-child {
  color: var(--hz-muted);
  max-width: 22rem;
}
.task-load-skel .skel { height: 88px; }
.task-skel-hero { height: 112px; }
.task-skel-story { height: 140px; }
.task-skel-files { height: 180px; }
.task-hero {
  position: relative;
  overflow: hidden;
  border-left-width: 6px;
  margin-bottom: 12px;
  padding-bottom: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hz-primary) 16%, var(--hz-surface)) 0 72px, var(--hz-surface) 72px);
}
.task-hero::before {
  content: "";
  display: block;
  height: 8px;
  margin: -16px -16px 14px;
  background: var(--hz-primary);
}
.task-hero.status-open::before { background: #64748b; }
.task-hero.status-assigned::before { background: var(--hz-primary-hover); }
.task-hero.status-in_progress::before { background: var(--hz-primary); }
.task-hero.status-need_info::before { background: var(--hz-warning); }
.task-hero.status-done::before { background: var(--hz-success); }
.task-hero.status-rejected::before { background: var(--hz-danger); }
.task-hero.prio-high { border-left-color: var(--hz-priority-high); }
.task-hero.prio-medium { border-left-color: var(--hz-priority-medium); }
.task-hero.prio-low { border-left-color: var(--hz-priority-low); }
.task-hero h1 {
  margin: 4px 0 0;
  font-size: 1.62rem;
  line-height: 1.15;
  color: var(--hz-heading);
}
.task-hero-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
.task-hero .back { margin-bottom: 0; }
.detail-core {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.detail-story {
  border-left: 5px solid var(--hz-primary);
}
.detail-story h2,
.detail-files h2 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  color: var(--hz-heading);
}
.detail-desc {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--hz-heading);
  white-space: pre-wrap;
}
.detail-desc.is-empty {
  color: var(--hz-muted);
  font-size: 0.95rem;
}
.detail-files {
  border-left: 5px solid #6610f2;
}
.task-detail .media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.task-detail .tile-visual {
  aspect-ratio: 4 / 3;
}
.task-detail .detail-secondary {
  background: color-mix(in srgb, var(--hz-surface) 88%, var(--hz-body-bg));
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  padding: 10px 12px;
}
.task-meta-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--tap);
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.task-meta-toggle-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.task-meta-toggle-copy strong {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-muted);
}
.task-meta-summary {
  color: var(--hz-heading);
  font-size: 0.92rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-meta-chevron {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--hz-primary);
  color: #fff;
  flex: 0 0 auto;
  transition: transform 0.16s ease;
}
.detail-secondary.is-open .task-meta-chevron {
  transform: rotate(180deg);
}
.task-secondary-body {
  display: none;
  padding-top: 8px;
}
.detail-secondary.is-open .task-secondary-body {
  display: block;
}
.task-meta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 0 0 4px;
}
.task-meta-item {
  min-width: 0;
}
.task-meta-item dt {
  margin: 0 0 2px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-muted);
}
.task-meta-item dd {
  margin: 0;
  font-size: 0.86rem;
  color: var(--hz-heading);
  font-weight: 650;
}
.task-meta-item dd em {
  display: block;
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--hz-muted);
}
.task-meta-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.task-meta-who strong { font-size: 0.86rem; }
.task-meta-time {
  display: inline;
  margin-left: 4px;
  font-weight: 800;
  color: var(--hz-primary-hover);
  white-space: nowrap;
}
.task-meta-default {
  color: var(--hz-muted);
  font-weight: 500;
}
.task-meta-list .badge {
  font-size: 0.68rem;
  padding: 3px 7px;
}
@media (max-width: 767px) {
  .task-meta-list { grid-template-columns: 1fr; }
}
@media (min-width: 768px) {
  .task-meta-toggle {
    pointer-events: none;
    min-height: auto;
    margin-bottom: 8px;
  }
  .task-meta-summary,
  .task-meta-chevron { display: none; }
  .task-secondary-body,
  .detail-secondary.is-open .task-secondary-body,
  .detail-secondary .task-secondary-body {
    display: block;
  }
  .task-detail .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.task-steer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hz-border);
}
.task-steer h2 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-muted);
}
.task-steer .detail-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.task-steer .ctl { min-width: 0; }
.task-steer .ctl-select,
.task-steer .ctl select,
.task-steer .ctl > strong {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.task-media-wait {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-detail .detail-col {
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  padding: 14px;
  box-shadow: var(--hz-shadow);
}
.task-detail .detail-col.detail-story,
.task-detail .detail-col.detail-files {
  padding: 16px;
}
.task-detail .detail-col.detail-secondary {
  background: color-mix(in srgb, var(--hz-surface) 88%, var(--hz-body-bg));
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  padding: 10px 12px;
}
.task-detail .handoff-compact {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--hz-primary-subtle);
  background: color-mix(in srgb, var(--hz-primary) 12%, var(--hz-surface));
  border-radius: var(--hz-radius);
}
.task-detail .handoff-compact h2 {
  color: var(--hz-primary-hover);
}
.detail-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: end;
  margin: 0 0 4px;
}
.doc-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 8px;
  color: var(--hz-muted);
  font-size: 0.9rem;
}
.doc-kicker-site {
  font-weight: 600;
  color: var(--hz-heading);
}
.doc-kicker .badge { font-weight: 700; }
.doc-kicker-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 14px;
  color: var(--hz-muted);
  font-size: 0.82rem;
}
.doc-approval-chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hz-muted);
}
.doc-extract {
  display: grid;
  gap: 2px;
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--hz-heading);
}
.doc-extract span {
  color: var(--hz-muted);
  font-weight: 600;
}
.doc-approval-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.doc-approval-inline > span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--hz-muted);
}
.doc-approval-inline .ctl-select,
.doc-approval-inline select {
  min-width: 7.5rem;
}
.ctl {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.ctl > span:first-child {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-muted);
}
.ctl-select,
.ctl select {
  min-height: var(--tap);
  min-width: 9.5rem;
  max-width: 100%;
  border-radius: var(--hz-radius);
  border: 1px solid var(--hz-border);
  background: var(--hz-input-bg);
  padding: 0 10px;
  font-weight: 700;
  color: var(--hz-body-text);
}
.detail-grid,
.doc-grid { display: grid; gap: 14px; }
.doc-meta-form { display: grid; gap: 12px; }
.doc-table-wrap { overflow: auto; }
.doc-lines {
  display: grid;
  gap: 12px;
  container-type: inline-size;
  container-name: doc-lines;
}
.doc-lines-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.doc-lines-head h2 { margin: 0; }
.line-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow);
}
.line-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: separate;
  border-spacing: 0;
}
.line-table th,
.line-table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--hz-border);
  font-size: 0.9rem;
  vertical-align: middle;
}
.line-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-muted);
  white-space: nowrap;
  background: var(--hz-surface);
}
.line-table tbody tr:last-child td { border-bottom: 0; }
.line-table tbody tr:hover td { background: var(--hz-active-bg); }
.line-table tbody tr[data-open-line] { cursor: pointer; }
.line-table tr.exception td {
  background: color-mix(in srgb, var(--hz-danger) 12%, var(--hz-surface));
  box-shadow: inset 4px 0 0 var(--hz-danger);
}
.line-table tr.exception:hover td {
  background: color-mix(in srgb, var(--hz-danger) 14%, var(--hz-active-bg));
}
.line-table td:nth-child(1),
.line-table td:nth-child(2),
.line-table td:nth-child(3) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.line-table td:nth-child(4) { word-break: break-word; }
.line-table .badge { white-space: nowrap; }
.line-actions-cell { white-space: nowrap; width: 1%; }
.line-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sheet-backdrop.modal-center {
  align-items: center;
  justify-items: center;
}
.line-edit-dialog {
  max-width: 560px;
  max-height: min(92dvh, 760px);
  overflow: auto;
  box-shadow: var(--hz-shadow);
  border: 1px solid var(--hz-border);
}
.line-edit-dialog h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  color: var(--hz-heading);
}
.line-edit-dialog form { display: grid; gap: 4px; }
.line-edit-dialog .actions { margin-top: 8px; }
.line-edit-dialog textarea {
  min-height: 88px;
}
@media (max-width: 479px) {
  .line-table-wrap {
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }
  .line-table { min-width: 0; }
  .line-table thead { display: none; }
  .line-table,
  .line-table tbody {
    display: grid;
    gap: 12px;
    width: 100%;
  }
  .line-table tr {
    display: grid;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--hz-border);
    border-radius: var(--hz-radius-lg);
    background: var(--hz-surface);
    box-shadow: var(--hz-shadow);
  }
  .line-table tbody tr:last-child { border-bottom: 1px solid var(--hz-border); }
  .line-table td {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 8px;
    border: 0;
    padding: 5px 0;
    box-shadow: none !important;
    background: transparent !important;
  }
  .line-table td[data-label]::before {
    content: attr(data-label);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hz-muted);
    font-weight: 700;
  }
  .line-table td.line-actions-cell {
    display: block;
    padding-top: 10px;
  }
  .line-table tr.exception {
    border-color: color-mix(in srgb, var(--hz-danger) 45%, var(--hz-border));
    box-shadow: var(--hz-shadow), inset 4px 0 0 var(--hz-danger);
  }
  .line-row-actions { justify-content: stretch; }
  .line-row-actions .btn { flex: 1; }
}
.doc-preview {
  display: grid;
  gap: 10px;
}
.doc-preview-seg {
  display: flex;
  gap: 0;
  padding: 4px;
  border: 1px solid var(--hz-border);
  border-radius: 999px;
  background: var(--hz-active-bg);
}
.doc-preview-seg button {
  flex: 1;
  min-height: 40px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  font-weight: 700;
  color: var(--hz-muted);
}
.doc-preview-seg button.on {
  background: var(--hz-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 79, 212, 0.28);
}
.doc-preview-seg button:disabled { opacity: 0.45; }
.doc-preview-frame {
  min-height: 280px;
  background: #1d2630;
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: var(--hz-shadow);
}
.doc-preview-frame img,
.doc-preview-frame object {
  width: 100%;
  height: min(72vh, 760px);
  max-width: 100%;
  object-fit: contain;
  background: #1d2630;
}
.badge.uploaded { background: var(--hz-active-bg); color: var(--hz-muted); }
.badge.processing { background: #fff4e0; color: var(--hz-warning); }
.badge.ready { background: #e4f6ef; color: var(--hz-success); }
.badge.failed { background: #fde8e8; color: var(--hz-danger); }
.line-qty {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.doc-status-banner {
  padding: 12px 14px;
  border-radius: var(--hz-radius-lg);
  margin: 0 0 14px;
  background: color-mix(in srgb, var(--hz-warning) 16%, var(--hz-surface));
  color: var(--hz-heading);
  font-weight: 650;
  border: 1px solid var(--hz-warning);
}
.doc-status-banner.failed {
  background: color-mix(in srgb, var(--hz-danger) 16%, var(--hz-surface));
  border-color: var(--hz-danger);
}
.doc-hero {
  margin-bottom: 14px;
  border-left: 6px solid var(--hz-primary);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hz-primary) 16%, var(--hz-surface)) 0 72px, var(--hz-surface) 72px);
}
.doc-hero.status-ready { border-left-color: var(--hz-success); }
.doc-hero.status-processing,
.doc-hero.status-uploaded { border-left-color: var(--hz-warning); }
.doc-hero.status-failed { border-left-color: var(--hz-danger); }
.doc-hero h1 {
  margin: 8px 0 10px;
  font-size: 1.48rem;
  color: var(--hz-heading);
}
.doc-detail .detail-col h2:not(:first-child),
.doc-files h2,
.doc-data-col .doc-lines-head { margin-top: 18px; }
.detail-col h2,
.doc-files h2 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-muted);
}
.doc-files {
  margin-top: 16px;
}
.doc-preview-col,
.doc-data-col,
.doc-files,
.doc-lines-panel {
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
  padding: 16px;
  box-shadow: var(--hz-shadow);
  min-width: 0;
}
.doc-lines-panel { margin-top: 14px; }
.doc-lines-panel .doc-lines-head { margin-top: 0; }
.meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
}
.meta-grid dt {
  color: var(--hz-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 2px;
}
.meta-grid dd { margin: 0; font-size: 0.9rem; }
.detail-desc { margin: 0; }
.actions.compact { gap: 6px; margin-bottom: 8px; }
.handoff-compact {
  margin-top: 12px;
  container-type: inline-size;
  container-name: task-handoff;
}
.handoff-row {
  display: grid;
  gap: 8px;
}
.handoff-row .btn { width: 100%; }
.handoff-row select,
.handoff-row input {
  min-height: var(--tap);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  background: var(--hz-input-bg);
  padding: 0 10px;
  font-size: max(16px, 1rem);
  color: var(--hz-body-text);
}
.task-detail .composer {
  position: sticky;
  bottom: 0;
  margin-top: 8px;
}
.task-detail .composer textarea { min-height: 72px; }
.overflow-menu { position: relative; }
.icon-btn {
  min-width: var(--tap);
  min-height: var(--tap);
  border: 0;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  color: inherit;
  display: inline-grid;
  place-items: center;
  border-radius: var(--hz-radius);
}
.icon-btn:hover { background: var(--hz-active-bg); }
.menu-pop {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  box-shadow: var(--hz-shadow);
  min-width: 160px;
  display: grid;
  z-index: 7;
}
.menu-pop button {
  min-height: var(--tap);
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0 14px;
}
.menu-pop button:hover { background: var(--hz-active-bg); }
.danger-text { color: var(--hz-danger); font-weight: 700; }
.chip-row.inline { display: inline-flex; }
.media-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--hz-active-bg);
  border-radius: var(--hz-radius);
  padding: 8px 10px;
}
.media-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
}
.file-icon { font-size: 1.4rem; }
.comment.reply {
  margin-left: 16px;
  border-left: 3px solid var(--hz-border);
}
.linkish {
  background: none;
  border: 0;
  color: var(--hz-primary);
  font-weight: 700;
  min-height: var(--tap);
  padding: 0;
  cursor: pointer;
}
.composer {
  position: sticky;
  bottom: 0;
  background: var(--hz-surface);
  padding: 10px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 4;
}
.hz-app.has-bottom-nav .composer,
.hz-app.has-bottom-nav .task-detail .composer {
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
.mention-suggest {
  max-height: 40vh;
  overflow: auto;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  box-shadow: var(--hz-shadow);
  margin-bottom: 8px;
}
.mention-suggest button,
.suggest-list button {
  display: block;
  width: 100%;
  text-align: left;
  min-height: var(--tap);
  border: 0;
  background: transparent;
  padding: 0 12px;
}
.mention-suggest button:hover,
.suggest-list button:hover { background: var(--hz-active-bg); }
.suggest-list {
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  box-shadow: var(--hz-shadow);
  max-height: 40vh;
  overflow: auto;
  margin-bottom: 10px;
}
.form-card { padding: 16px; }
.task-form-grid { display: grid; gap: 8px; }
.create-media {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--hz-primary, #4680ff);
  border-radius: var(--hz-radius, 12px);
  background: color-mix(in srgb, var(--hz-primary, #4680ff) 12%, var(--hz-surface));
}
.create-media-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dept-assign {
  border: 1px solid var(--hz-border, #d0d5dd);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.dept-assign legend { font-weight: 700; }
.dept-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dept-row select { flex: 1 1 140px; min-width: 0; }
.sticky-form-actions {
  position: sticky;
  bottom: 0;
  background: var(--hz-surface);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  .sticky-form-actions { position: static; padding: 8px 0 0; }
}
@container page (min-width: 900px) {
  .task-form-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .task-form-grid .btn.block,
  .task-form-grid .sticky-form-actions { grid-column: 1 / -1; }
}
.media-item img, .media-item video {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #ccc;
}
.comment {
  background: var(--hz-active-bg);
  border-radius: var(--hz-radius-lg);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.comment .when { font-size: 0.78rem; color: var(--hz-muted); }
.mention { color: var(--hz-primary); font-weight: 700; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 70;
  display: grid;
  align-items: end;
}
.sheet {
  background: var(--hz-surface);
  border-radius: var(--hz-radius-lg) var(--hz-radius-lg) 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 92dvh;
  overflow: auto;
}
.dialog {
  background: var(--hz-surface);
  border-radius: var(--hz-radius-lg);
  padding: 20px;
  margin: auto 16px;
  max-width: 420px;
  width: calc(100% - 32px);
}
.skel {
  height: 72px;
  border-radius: var(--hz-radius);
  background: linear-gradient(90deg, var(--hz-active-bg), var(--hz-surface), var(--hz-active-bg));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  margin-bottom: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.table-wrap { display: none; overflow: auto; }
table.board {
  width: 100%;
  border-collapse: collapse;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  overflow: hidden;
}
table.board th, table.board td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hz-border);
  font-size: 0.875rem;
}
table.board th {
  color: var(--hz-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.board tr { cursor: pointer; }

.back {
  background: transparent;
  border: 0;
  min-height: var(--tap);
  padding: 0;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--hz-primary);
  cursor: pointer;
}

.fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 7;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--hz-primary);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  box-shadow: var(--hz-shadow);
  cursor: pointer;
}
.hz-app.has-bottom-nav .fab {
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
}

.sites-list { display: grid; gap: 0; }
.site-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }

@media (min-width: 768px) {
  body { font-size: 0.875rem; }
  .cards { display: none; }
  .table-wrap { display: block; }
  .sheet-backdrop { align-items: center; }
  .sheet {
    border-radius: var(--hz-radius-lg);
    margin: 0 auto;
    width: min(520px, 100%);
    max-height: 80dvh;
  }
  .topbar {
    gap: 12px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .topbar .burger { display: none; }
  .topbar .brand { gap: 10px; flex: 0 0 auto; }
  .topbar-logo {
    width: 148px;
    height: 28px;
    flex-shrink: 0;
  }
  .topbar .who { max-width: 220px; }
  .sidebar {
    display: flex;
    flex-direction: column;
    width: var(--hz-sidebar-w);
    flex: 0 0 var(--hz-sidebar-w);
    position: sticky;
    top: var(--hz-topbar-h);
    align-self: flex-start;
    min-height: calc(100svh - var(--hz-topbar-h));
    background: var(--hz-surface);
    border-right: 2px solid var(--hz-sidebar-border);
  }
  .fab { display: none; }
  .task-steer .detail-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
  }
  .task-steer .ctl-select,
  .task-steer .ctl select {
    min-width: 9.5rem;
    width: auto;
  }
  .task-detail .composer { position: sticky; bottom: 0; }
}
@media (min-width: 1100px) {
  .filters { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
  .filters .site { grid-column: auto; }
}

@container doc-detail (min-width: 960px) {
  .doc-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 18px;
    align-items: start;
  }
  .doc-meta-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }
  .doc-meta-form .btn { grid-column: 1 / -1; }
  .doc-grid .doc-preview-col,
  .doc-grid .doc-data-col {
    max-height: calc(100svh - var(--hz-topbar-h) - 120px);
    overflow: auto;
  }
}

/* Task detail: stack on tablet / crushed panes; comments become a column only when wide. */
@container task-detail (min-width: 840px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
    gap: 16px;
    align-items: start;
  }
  .detail-talk {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 8px;
    max-height: calc(100svh - var(--hz-topbar-h) - 80px);
    overflow: auto;
  }
}
@container task-detail (min-width: 1080px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
    gap: 18px;
  }
}
@container task-handoff (min-width: 560px) {
  .handoff-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
  }
  .handoff-row .btn { width: auto; }
}

/* S11 Able-Pro UX: login-v2, avatar, shell, kanban */
.auth-main {
  min-height: 100svh;
  background: var(--hz-body-bg);
}
.auth-wrapper.v2 {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
.auth-sidecontent {
  height: 160px;
  max-height: 160px;
  overflow: hidden;
  background: var(--hz-heading);
}
.img-auth-side {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.auth-form {
  display: grid;
  place-items: start center;
  padding: 20px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
  flex: 1 1 auto;
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: 0 0 auto;
}
.topbar-pop { position: relative; }
.avatar-chip-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hz-avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--hz-avatar-bg, var(--hz-avatar-1));
  color: #fff;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  position: relative;
  flex: 0 0 auto;
}
.hz-avatar > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: inherit;
  line-height: 1;
  text-align: center;
}
.hz-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hz-avatar-chip { width: 36px; height: 36px; font-size: 0.72rem; }
.hz-avatar-side { width: 44px; height: 44px; font-size: 0.78rem; }
.hz-avatar-profile { width: 72px; height: 72px; font-size: 1.1rem; }
.hz-avatar-mini { width: 28px; height: 28px; font-size: 0.65rem; }
.hz-avatar-chat { width: 48px; height: 48px; font-size: 0.85rem; }
.avatar-spin {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
}
.avatar-spin::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: hz-spin 0.7s linear infinite;
}
@keyframes hz-spin { to { transform: rotate(360deg); } }
.pc-user-card {
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--hz-sidebar-border);
}
.user-card-main {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 4px 4px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.user-card-main:disabled { cursor: default; }
.user-card-text {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
}
.user-card-text strong {
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-card-text span {
  font-size: 0.75rem;
  color: var(--hz-muted);
}
.user-card-chevron {
  color: var(--hz-muted);
  transition: transform 0.15s ease;
}
.user-card-chevron.open { transform: rotate(180deg); }
.user-card-menu { display: none; padding: 4px 0 8px; }
.user-card-menu.open { display: grid; gap: 2px; }
.user-card-menu a,
.user-card-menu button {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--hz-radius);
  background: transparent;
  color: var(--hz-heading);
  text-decoration: none;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.user-card-menu a:hover,
.user-card-menu button:hover { background: var(--hz-active-bg); }
.user-menu,
.bell-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 16;
  width: min(320px, calc(100vw - 24px));
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  box-shadow: var(--hz-shadow);
  padding: 10px;
}
.user-menu[hidden],
.bell-panel[hidden] {
  display: none;
}
.user-menu-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 4px 10px;
  border-bottom: 1px solid var(--hz-border);
  margin-bottom: 6px;
}
.user-menu-row strong { display: block; }
.user-menu-row > div span { display: block; font-size: 0.78rem; color: var(--hz-muted); }
.user-menu a,
.user-menu button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 600;
  color: var(--hz-heading);
  text-decoration: none;
  cursor: pointer;
}
.bell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.bell-empty { margin: 8px 0 4px; font-weight: 650; }
.bell-hint { margin: 0; color: var(--hz-muted); font-size: 0.82rem; }
.profile-avatar {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.avatar-upload-btn {
  position: relative;
  width: 72px;
  height: 72px;
  min-height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.camera-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hz-primary);
  color: #fff;
  display: grid;
  place-items: center;
}
.camera-badge .ico { width: 14px; height: 14px; }
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
}
.swatch.on { box-shadow: 0 0 0 2px var(--hz-primary); }
.profile-grid { display: grid; gap: 16px; }
.kanban-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 4px 0 12px;
}
.kanban-stage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 10px 6px 12px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--hz-surface);
  color: var(--hz-heading);
  font-weight: 650;
  font-size: 0.85rem;
  line-height: 1.2;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  cursor: pointer;
}
.kanban-stage-label,
.kanban-stage-count {
  display: inline-block;
  white-space: nowrap;
}
.kanban-stage-count {
  min-width: 1.5em;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 800;
  text-align: center;
  background: rgba(15, 23, 42, 0.1);
}
.kanban-stage.stage-open,
.kanban-stage.stage-assigned {
  background: #dbeafe;
  color: var(--hz-primary-hover);
  border-color: #60a5fa;
}
.kanban-stage.stage-in_progress {
  background: var(--hz-primary-subtle);
  color: var(--hz-primary-hover);
  border-color: var(--hz-primary);
}
.kanban-stage.stage-need_info {
  background: #ffedd5;
  color: var(--hz-warning);
  border-color: #fb923c;
}
.kanban-stage.stage-done {
  background: #dcfce7;
  color: var(--hz-success);
  border-color: #4ade80;
}
.kanban-stage.stage-rejected {
  background: #fee2e2;
  color: var(--hz-danger);
  border-color: #f87171;
}
.kanban-stage.on {
  box-shadow: 0 0 0 2px var(--hz-heading);
  font-weight: 800;
}
.kanban-board { display: none; }
.kanban-mobile { display: block; }
.kanban-col header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.kanban-col h2 {
  margin: 0;
  font-size: 0.95rem;
}
.kanban-col header span { color: var(--hz-muted); font-weight: 700; }
.kanban-cards { display: grid; gap: 8px; }
.kanban-card { text-align: left; cursor: pointer; }
.kanban-card.is-moving { opacity: 0.6; }
.kanban-who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  color: var(--hz-muted);
  font-size: 0.82rem;
}
.kanban-skel { display: none; }
.empty.mini { padding: 16px; font-size: 0.85rem; }
.sheet-list { display: grid; gap: 4px; margin: 8px 0 16px; }
.sheet-item {
  min-height: 44px;
  border: 0;
  background: var(--hz-active-bg);
  border-radius: var(--hz-radius);
  text-align: left;
  padding: 0 12px;
  font-weight: 650;
  cursor: pointer;
}
@media (max-width: 767px) {
  .bell-panel {
    position: fixed;
    top: calc(var(--hz-topbar-h) + env(safe-area-inset-top));
    left: 0;
    right: 0;
    width: auto;
    max-height: 70vh;
    overflow: auto;
    border-radius: 0 0 var(--hz-radius-lg) var(--hz-radius-lg);
  }
}
@media (min-width: 768px) {
  .auth-wrapper.v2 { flex-direction: row; min-height: 100svh; }
  .auth-sidecontent {
    flex: 1 1 50%;
    height: auto;
    max-height: none;
    min-height: 100svh;
  }
  .auth-form {
    flex: 1 1 50%;
    place-items: center;
    padding: 40px 32px;
  }
}
@media (min-width: 1100px) {
  .kanban-chips,
  .kanban-mobile { display: none; }
  .kanban-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
    align-items: stretch;
  }
  .kanban-col {
    flex: 0 0 280px;
    min-width: 280px;
    background: var(--hz-active-bg);
    border: 1px solid var(--hz-border);
    border-radius: var(--hz-radius);
    padding: 12px;
    box-shadow: var(--hz-shadow);
  }
  .kanban-skel {
    display: flex;
    gap: 12px;
  }
  .kanban-skel .skel {
    flex: 0 0 280px;
    min-height: 220px;
  }
  .profile-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 960px;
    margin: 0 auto;
  }
}

.capture-launch {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}
.capture-launch .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}
.page.doc-capture {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--hz-topbar-h) - env(safe-area-inset-top));
  max-width: min(720px, 100%);
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.capture-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 12px;
}
@media (min-width: 1100px) {
  .capture-meta { grid-template-columns: 1fr 1fr; }
}
.capture-preview {
  flex: 1 1 auto;
  min-height: 240px;
  display: grid;
  place-items: center;
  background: var(--hz-body-bg);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  overflow: hidden;
}
.capture-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 52vh;
}
.capture-dock {
  margin-top: 12px;
  padding-top: 8px;
}
.capture-film {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
  min-height: 72px;
}
.capture-thumb {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
}
.capture-thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--hz-border);
  background: var(--hz-surface);
}
.capture-thumb span {
  display: block;
  font-size: 0.7rem;
  color: var(--hz-muted);
  text-align: center;
  margin-top: 2px;
}
.capture-thumb-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 99px;
  background: var(--hz-heading);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.capture-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.capture-ico,
.capture-go {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  border: 1px solid var(--hz-border);
  background: var(--hz-surface);
  color: var(--hz-heading);
  cursor: pointer;
}
.capture-go {
  margin-left: auto;
  border-color: var(--hz-primary);
  background: var(--hz-primary);
  color: #fff;
}
.capture-go:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Catalog article form — Able-Pro stacked fields, mobile-first */
.catalog-form {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow-wrap: break-word;
}
.catalog-form-head .hint { margin-bottom: 0; }
.catalog-form .form-section {
  display: grid;
  gap: 12px;
  margin: 0;
  min-width: 0;
  padding: 14px 12px 16px;
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  background: color-mix(in srgb, var(--hz-active-bg) 28%, var(--hz-surface));
}
.catalog-form .form-section legend,
.catalog-form .field-legend {
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-primary-hover);
}
.catalog-form .field { margin-bottom: 0; }
.catalog-form .field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--hz-muted);
}
.site-picker { display: grid; gap: 10px; min-width: 0; }
.site-picker[hidden] { display: none; }
.site-picker-region {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hz-heading);
}
.site-picker-grid {
  display: grid;
  gap: 8px;
}
.site-picker-grid .field.check {
  min-height: var(--tap);
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  background: var(--hz-surface);
  font-size: 1rem;
  font-weight: 650;
  color: var(--hz-heading);
}
.catalog-form .form-section > .field.check {
  min-height: var(--tap);
  font-size: 1rem;
  font-weight: 650;
  color: var(--hz-heading);
}
.catalog-form .sticky-form-actions { margin-top: 4px; }
.catalog-form-error {
  margin: 0;
  border-radius: var(--hz-radius);
  border: 1px solid #f87171;
}
@media (min-width: 1100px) {
  .site-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.shop-assign-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 28px;
}
.shop-assign-list h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--hz-heading);
}
.shop-assign-kind {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.shop-assign-add {
  margin: 0;
}
.shop-assign-staff {
  display: grid;
  gap: 12px;
}

/* Shop-like orders / catalog / warehouse — one field per row on mobile */
.shop-page .page-head {
  display: grid;
  justify-items: start;
  gap: 4px;
}
.shop-page .page-head h1 { margin-top: 4px; }
a.back {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.shop-toolbar {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.shop-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.shop-form h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--hz-heading);
}
.shop-form .field { margin-bottom: 0; }
.shop-product-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  text-decoration: none;
  color: inherit;
}
.shop-thumb,
.shop-hero-empty,
.shop-thumb-fallback {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: var(--hz-radius);
  background: var(--hz-active-bg);
  color: var(--hz-heading);
  font-weight: 800;
  font-size: 1.4rem;
  overflow: hidden;
}
.shop-thumb img,
.shop-hero img,
.shop-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-product-copy h3 { margin-top: 6px; }
.shop-excerpt,
.shop-desc {
  margin: 8px 0 0;
  color: var(--hz-body-text);
  line-height: 1.45;
}
.shop-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-hero {
  padding: 0;
  overflow: hidden;
  background: var(--hz-surface);
}
.shop-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  background: var(--hz-surface);
  border-top: 1px solid var(--hz-border);
}
.shop-hero-actions .field-hint {
  flex: 1 1 100%;
  margin: 0;
  color: var(--hz-muted);
}
.shop-photo-pick {
  position: relative;
  cursor: pointer;
}
.shop-photo-pick input[hidden] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.shop-variant-photo-ctl {
  max-width: none;
}
.shop-hero img,
.shop-hero-empty {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 320px;
}
.shop-hero-empty {
  width: 100%;
  height: 180px;
  font-size: 2.4rem;
}
.shop-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.shop-photo {
  margin: 0;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  overflow: hidden;
}
.shop-photo img { aspect-ratio: 1; }
.shop-photo .linkish,
.shop-file .linkish {
  display: block;
  width: 100%;
  padding: 8px;
  text-align: center;
}
.shop-files { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.shop-file {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.shop-variant-list { display: grid; gap: 10px; margin: 12px 0; }
.shop-variant-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.shop-variant-head:has(h3):not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.shop-variant-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}
.shop-price { font-weight: 750; color: var(--hz-heading); }
@media (min-width: 1100px) {
  .shop-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-product-card { grid-template-columns: 120px minmax(0, 1fr); }
  .shop-thumb { width: 120px; height: 120px; }
  .shop-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.shop-filters {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.shop-filter-label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--hz-muted);
}
.shop-filter-kind .chip-row { margin: 0; }
.shop-order-list { gap: 12px; }
.shop-order-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--hz-border);
  box-shadow: var(--hz-shadow);
}
.shop-order-head h3 {
  margin: 8px 0 0;
  color: var(--hz-heading);
}
.shop-qty-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.shop-qty-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0 0;
  border-top: 1px solid var(--hz-border);
}
.shop-qty-media {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hz-active-bg);
  display: grid;
  place-items: center;
  color: var(--hz-heading);
  font-weight: 800;
}
.shop-qty-media img,
.shop-qty-media .shop-thumb-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-qty-media .shop-thumb-fallback {
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
@media (max-width: 379px) {
  .shop-qty-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .shop-qty-row .shop-qty {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
.shop-qty-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.shop-qty-copy strong {
  color: var(--hz-heading);
}
.shop-stock {
  display: grid;
  gap: 4px;
  margin: 4px 0 2px;
}
.shop-stock-qty {
  font-weight: 800;
  color: var(--hz-heading);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.shop-stock-qty.is-empty {
  color: var(--hz-warning);
}
.shop-stock-break,
.shop-qty-copy .shop-stock-qty {
  display: block;
  font-size: 0.92rem;
}
.shop-stock-break {
  color: var(--hz-muted);
}
.shop-stock-ctl {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  align-items: start;
}
.shop-stock-ctl select,
.shop-stock-reason input {
  background: var(--hz-input-bg);
  color: var(--hz-heading);
  border: 1px solid var(--hz-border);
}
.shop-stock-reason {
  margin: 0;
}
.shop-stock-reason input {
  min-height: 40px;
}
.shop-wh-article {
  margin: 16px 0 0;
}
.shop-wh-article h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--hz-heading);
}
@media (min-width: 768px) {
  .shop-stock-ctl {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
  .shop-stock-reason {
    grid-column: 1 / -1;
  }
}
.shop-qty {
  display: inline-grid;
  grid-template-columns: 44px minmax(56px, 72px) 44px;
  align-items: center;
  border: 2px solid var(--hz-heading);
  border-radius: 10px;
  overflow: hidden;
  background: var(--hz-surface);
}
.shop-qty button {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--hz-active-bg);
  color: var(--hz-heading);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.shop-qty button:hover { background: var(--hz-primary-subtle); }
.shop-qty input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--hz-heading);
  background: var(--hz-surface);
  -moz-appearance: textfield;
}
.shop-qty input::-webkit-outer-spin-button,
.shop-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.shop-cart-bar {
  position: sticky;
  bottom: 12px;
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 2px solid var(--hz-heading);
  box-shadow: var(--hz-shadow);
  background: var(--hz-surface);
  z-index: 3;
}
.shop-cart-summary {
  margin: 0;
  font-weight: 800;
  color: var(--hz-heading);
}
@media (min-width: 1100px) {
  .shop-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-filters .field:nth-child(3) { grid-column: 1 / -1; }
}

/* Slice 15 Nachrichten — Able Application/Chat rebuilt with contrast tokens.
   Kit Chat-Sidebar stays Out; this is the Application Chat pattern. */
.hz-app:has(.hz-messages-page) {
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
}
.hz-body:has(.hz-messages-page) {
  align-items: stretch;
  min-height: 0;
  height: calc(100svh - var(--hz-topbar-h));
  max-height: calc(100svh - var(--hz-topbar-h));
  overflow: hidden;
}
.hz-body:has(.hz-messages-page) .sidebar {
  align-self: stretch;
  min-height: 0;
  overflow: auto;
}
.hz-body:has(.hz-messages-page) > main,
.hz-body:has(.hz-messages-page) > .page {
  min-height: 0;
  height: 100%;
}
.page.hz-messages-page {
  max-width: none;
  width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 12px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.hz-app-chat {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  box-shadow: var(--hz-shadow);
  border-radius: 16px;
  overflow: hidden;
}
.hz-chat-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--hz-surface);
  border-right: 1px solid var(--hz-border);
}
.hz-chat-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 8px;
}
.hz-chat-kicker {
  margin: 0 0 2px;
  color: var(--hz-primary-hover);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hz-chat-list-head h1 {
  margin: 0;
  font-size: 1.45rem;
  color: var(--hz-heading);
}
.hz-chat-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--hz-primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(70, 128, 255, 0.38);
}
.hz-chat-new:hover { background: var(--hz-primary-hover); }
.hz-chat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 16px 10px;
  padding: 0 14px;
  min-height: 46px;
  border: 1px solid var(--hz-border);
  border-radius: 999px;
  background: var(--hz-canvas);
  color: var(--hz-muted);
}
.hz-chat-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--hz-body-text);
  outline: none;
}
.hz-chat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 10px;
}
.hz-chat-filter {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--hz-border);
  border-radius: 999px;
  background: var(--hz-surface);
  color: var(--hz-muted);
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}
.hz-chat-filter.on {
  background: var(--hz-primary);
  border-color: var(--hz-primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(70, 128, 255, 0.28);
}
.hz-inbox-list {
  display: grid;
  align-content: start;
  overflow: auto;
  padding-bottom: 12px;
}
.hz-inbox-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hz-list-line);
  color: var(--hz-body-text);
  padding: 14px 16px;
  text-decoration: none;
  min-height: 84px;
  position: relative;
}
.hz-inbox-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--hz-primary);
}
.hz-inbox-row.task::before { background: var(--hz-warning); }
.hz-inbox-row.unknown { border-bottom-style: dashed; }
.hz-inbox-row.unknown::before { background: var(--hz-muted); }
.hz-inbox-row.unread { background: var(--hz-unread-bg); }
.hz-inbox-row.unread .hz-inbox-copy strong { font-weight: 800; }
.hz-inbox-row.on {
  background: var(--hz-active-bg);
}
.hz-inbox-row:hover { background: var(--hz-row-hover); }
.hz-inbox-copy { min-width: 0; }
.hz-inbox-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.hz-inbox-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hz-heading);
  font-size: 0.98rem;
  line-height: 1.25;
}
.hz-inbox-topline time {
  flex: 0 0 auto;
  color: var(--hz-muted);
  font-size: 0.72rem;
  font-weight: 750;
}
.hz-inbox-copy p {
  margin: 4px 0 0;
  color: var(--hz-muted);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hz-inbox-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.hz-kind-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.hz-kind-chip.dm { background: #c9dbff; color: #1e4fd4; }
.hz-kind-chip.task { background: #ffedd5; color: #c2410c; }
.hz-kind-chip.unknown { background: #e2e8f0; color: #334155; }
.hz-badge-ack {
  display: inline-block;
  background: var(--hz-danger);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}
.hz-unread {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--hz-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(70, 128, 255, 0.35);
}
.hz-chat-avatar {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.hz-chat-avatar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hz-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(70, 128, 255, 0.25);
}
.hz-chat-avatar.task::after { background: var(--hz-warning); }
.hz-chat-avatar.unknown::after { background: var(--hz-muted); }
.hz-chat-avatar-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #4680ff, #6610f2);
  color: #fff;
  box-shadow: 0 8px 18px rgba(70, 128, 255, 0.35);
}
.hz-chat-avatar-mark::after { display: none; }
.hz-bell-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--hz-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.icon-btn { position: relative; }
.hz-chat-stage,
.hz-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: var(--hz-canvas);
}
.hz-chat-head {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--hz-surface);
  border-bottom: 3px solid var(--hz-primary);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.hz-chat.hz-chat-stage:has(.hz-kind-chip.task) .hz-chat-head {
  border-bottom-color: var(--hz-warning);
}
.hz-chat-head h1 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--hz-heading);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.hz-chat-head-copy { min-width: 0; flex: 1 1 12rem; }
.hz-chat-head-copy p {
  margin: 4px 0 0;
  color: var(--hz-muted);
  font-size: 0.8rem;
  font-weight: 650;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.hz-chat-task-link { flex: 0 0 auto; }
.hz-chat-back {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--hz-active-bg);
  color: var(--hz-primary-hover);
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.hz-chat-back .ico { transform: rotate(180deg); }
.hz-chat-canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.hz-chat-thread {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--hz-canvas);
  overscroll-behavior: contain;
}
.hz-chat-thread::before {
  content: "";
  flex: 1 1 auto;
  min-height: 0;
}
.hz-jump-latest {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--hz-primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(30, 79, 212, 0.4);
  cursor: pointer;
}
.hz-jump-latest[hidden] { display: none !important; }
.hz-jump-latest .ico { transform: rotate(90deg); }
.hz-chat-day {
  display: grid;
  place-items: center;
  margin: 4px 0;
}
.hz-chat-day span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  color: var(--hz-muted);
  font-size: 0.72rem;
  font-weight: 800;
}
.hz-chat-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}
.hz-chat-line.me { justify-content: flex-end; }
.hz-chat-bubble {
  max-width: min(82%, 560px);
  min-width: min(48%, 160px);
  background: var(--hz-surface);
  border: 1px solid #9db6e8;
  color: var(--hz-body-text);
  border-radius: 18px 18px 18px 6px;
  padding: 12px 14px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}
.hz-chat-line.me .hz-chat-bubble {
  background: var(--hz-primary);
  color: #fff;
  border-color: var(--hz-primary-hover);
  border-radius: 18px 18px 6px 18px;
  box-shadow: 0 12px 22px rgba(30, 79, 212, 0.38);
}
.hz-chat-bubble { position: relative; }
.hz-chat-bubble p { margin: 0; overflow-wrap: anywhere; }
.hz-chat-link {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hz-chat-line.me .hz-chat-link { color: #fff; }
.hz-chat-quote {
  display: grid;
  gap: 2px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-left: 4px solid #e58a00;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.82rem;
}
.hz-chat-line:not(.me) .hz-chat-quote {
  background: #efe7ff;
  border-left-color: #6610f2;
}
.hz-chat-quote strong { display: block; }
.hz-chat-quote span { opacity: 0.88; }
.hz-chat-deleted { font-style: italic; opacity: 0.8; }
.hz-chat-edited { margin-left: 6px; font-weight: 650; opacity: 0.8; }
.hz-chat-fwd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.85;
}
.hz-msg-more {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.12);
  color: inherit;
  cursor: pointer;
}
.hz-chat-line.me .hz-msg-more { background: rgba(255, 255, 255, 0.18); }
.hz-msg-check {
  width: 28px;
  height: 28px;
  border: 2px solid #8ea0b8;
  border-radius: 999px;
  background: var(--hz-surface);
  color: transparent;
  align-self: center;
  cursor: pointer;
}
.hz-msg-check.on {
  background: var(--hz-primary);
  border-color: var(--hz-primary);
  color: #fff;
}
.hz-chat-line.selected .hz-chat-bubble { outline: 2px solid var(--hz-warning); }
.hz-chat-context {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.hz-chat-context .hz-chat-quote { flex: 1; margin: 0; }
.hz-chat-selectbar p { margin: 0 0 8px; }
.hz-select-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hz-emoji-btn { background: #2ca87f; }
.hz-emoji-btn.on { outline: 3px solid #9be7c8; }
.hz-emoji-pop {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--hz-border);
  border-radius: 16px;
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow);
}
.hz-emoji-pop button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--hz-canvas);
  font-size: 1.15rem;
  cursor: pointer;
}
.hz-emoji-pop button:hover { background: var(--hz-row-hover); }
.hz-msg-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
}
.hz-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 18, 32, 0.45);
}
.hz-msg-sheet-card {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 24px));
  margin: 0 auto max(12px, env(safe-area-inset-bottom));
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--hz-border);
  border-radius: 20px 20px 16px 16px;
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow);
}
.hz-msg-sheet-card header {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px 10px;
}
.hz-msg-sheet-card button[data-act],
.hz-forward-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--hz-canvas);
  color: var(--hz-heading);
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}
.hz-msg-sheet-card button[data-act]:hover,
.hz-forward-list button:hover { background: var(--hz-row-hover); }
.hz-forward-list {
  max-height: 42vh;
  overflow: auto;
  display: grid;
  gap: 4px;
}
.hz-chat-bubble audio,
.hz-chat-bubble img {
  max-width: 100%;
  display: block;
  margin-top: 6px;
  border-radius: 10px;
}
.hz-chat-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}
.hz-chat-line:not(.me) .hz-chat-file {
  background: #efe7ff;
  color: #6610f2;
}
.hz-chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 4px;
  opacity: 0.82;
}
.hz-chat-composer {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  background: var(--hz-surface);
  border-top: 1px solid var(--hz-border);
}
.hz-chat-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.hz-chat-composer textarea {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  max-height: 168px;
  padding: 14px 16px;
  border: 1px solid var(--hz-border);
  border-radius: 20px;
  background: var(--hz-canvas);
  font-size: max(16px, 1rem);
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
}
.hz-chat-composer.is-edit textarea,
.hz-chat-composer textarea.is-edit {
  min-height: calc(1.35em * 4 + 28px);
  max-height: calc(1.35em * 4 + 28px);
  border-radius: 16px;
}
.hz-chat-tools {
  display: none;
  flex: 0 0 auto;
  gap: 8px;
  padding: 0 2px 10px;
}
.hz-chat-tools.open {
  display: flex;
}
.hz-tool {
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}
.hz-tool-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hz-tool-plus {
  background: var(--hz-heading);
  flex: 0 0 auto;
  transition: transform 0.15s ease, background 0.15s ease;
}
.hz-tool-plus.on {
  background: var(--hz-primary);
  transform: rotate(45deg);
}
.hz-tool-rec { background: #e58a00; }
.hz-tool-rec.on { outline: 3px solid #ffd79a; animation: hz-rec-pulse 1s ease-in-out infinite; }
.hz-tool-photo { background: #04a9f5; }
.hz-tool-file { background: #6610f2; }
@keyframes hz-rec-pulse {
  50% { box-shadow: 0 0 0 6px rgba(229, 138, 0, 0.28); }
}
.hz-send {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--hz-primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(70, 128, 255, 0.4);
  cursor: pointer;
}
.hz-send:disabled { opacity: 0.65; cursor: not-allowed; }
.hz-chat-blank {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
}
.hz-chat-thread .hz-chat-blank {
  min-height: 240px;
}
.hz-chat-blank-card {
  width: min(420px, 100%);
  text-align: center;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  box-shadow: var(--hz-shadow);
  border-radius: 20px;
  padding: 32px 24px;
}
.hz-chat-blank-card .hz-blank-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #4680ff 0%, #04a9f5 52%, #6610f2 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(70, 128, 255, 0.38);
}
.hz-chat-blank-card h2 {
  margin: 0 0 8px;
  color: var(--hz-heading);
}
.hz-chat-blank-card p { margin: 0 0 16px; color: var(--hz-muted); }
.hz-chat-quiet {
  margin: auto;
  padding: 24px 12px;
  text-align: center;
  color: var(--hz-muted);
  font-size: 0.92rem;
}
.hz-peer-list { display: grid; gap: 0; padding: 0 0 20px; overflow: auto; }
.hz-peer-list button {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  min-height: 72px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--hz-list-line);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.hz-peer-list button:hover { background: var(--hz-row-hover); }
.hz-peer-list strong { display: block; color: var(--hz-heading); }
.bell-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  color: var(--hz-heading);
  text-decoration: none;
}
.bell-row:hover { background: var(--hz-active-bg); }
.pref-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pref-chips button.on {
  background: var(--hz-primary);
  color: #fff;
}
@media (max-width: 1099px) {
  .hz-app-chat.is-thread .hz-chat-list,
  .hz-app-chat.is-new .hz-chat-list { display: none; }
  .hz-app-chat.is-list .hz-chat-stage { display: none; }
  .page.hz-messages-page { padding: 0; }
  .hz-app-chat { border: 0; border-radius: 0; box-shadow: none; min-height: 0; height: 100%; }
  .hz-emoji-btn,
  .hz-emoji-pop,
  button[data-act="msg-emoji"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
@media (min-width: 1100px) {
  .hz-app-chat {
    grid-template-columns: minmax(320px, 360px) 1fr;
    min-height: 0;
    height: 100%;
  }
  .hz-chat-back { display: none; }
}

/* Digitec-clear lists + dark surfaces (S16-1) */
.hz-app-chat {
  box-shadow: none;
  border-radius: 12px;
}
.shop-filters.card,
.shop-order-card,
.shop-list-card,
.shop-product-card,
.kanban-card {
  box-shadow: none;
}
.kanban-cards {
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  overflow: hidden;
}
.kanban-card {
  margin: 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--hz-list-line);
  background: transparent;
  padding: 12px 14px;
}
.kanban-card:last-child { border-bottom: 0; }
.kanban-col {
  background: transparent;
}
.kanban-col header {
  background: transparent;
}
.shop-filters.card {
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: 12px;
}
.more-block {
  margin: 12px 0;
}
.more-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--tap);
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.more-toggle-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.more-toggle-copy strong {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-muted);
}
.more-summary {
  color: var(--hz-heading);
  font-size: 0.88rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.more-chevron {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--hz-primary);
  color: #fff;
  flex: 0 0 auto;
  transition: transform 0.16s ease;
}
.more-block.is-open .more-chevron { transform: rotate(180deg); }
.more-body { display: none; padding-top: 8px; }
.more-block.is-open .more-body { display: block; }
.task-steer-visible {
  margin: 8px 0 12px;
}
.task-steer-visible .detail-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
@media (min-width: 768px) {
  .more-toggle {
    pointer-events: none;
    min-height: auto;
    margin-bottom: 6px;
  }
  .more-summary,
  .more-chevron { display: none; }
  .more-body,
  .more-block.is-open .more-body,
  .more-block .more-body { display: block; }
}
[data-theme="dark"] .more-chevron { color: #0b1220; }
.role-list { display: grid; gap: 10px; }
.role-block,
.alloc-block {
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  box-shadow: none;
  padding: 4px 12px 12px;
}
.role-block .hz-row,
.alloc-block .hz-row {
  border: 0;
  min-height: 48px;
  padding: 10px 4px;
  cursor: default;
}
.role-block .perm-grid { margin: 8px 0 12px; }
.role-apply {
  margin: 8px 0 4px;
  padding: 12px;
  border: 2px solid var(--hz-primary, #4680ff);
  border-radius: var(--hz-radius);
  background: var(--hz-surface);
}
.role-apply h2 {
  font-size: 1rem;
  margin: 0 0 6px;
}
.role-apply .chip-row { margin: 8px 0; }
.role-apply-list { display: grid; gap: 4px; margin: 8px 0; }
.role-apply-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.alloc-list { display: grid; gap: 10px; }
.alloc-block .settle-form { padding: 0 4px; }
.shop-variant-list.hz-list .hz-row { cursor: default; }
.shop-order-list.hz-list {
  gap: 0;
}
.shop-order-list.hz-list .shop-order-card {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--hz-list-line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.shop-order-list.hz-list .shop-order-card:last-child { border-bottom: 0; }
.hz-list > .muted { padding: 16px; }
.theme-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-chips .chip.on {
  background: var(--hz-primary);
  color: #fff;
  border-color: var(--hz-primary);
}
.task-hero,
.doc-hero {
  box-shadow: none;
}
.login-card {
  box-shadow: var(--hz-shadow);
}
.topbar-logo {
  background-color: var(--hz-heading);
}
[data-theme="dark"] .hz-kind-chip.dm { background: #243656; color: #9bbcff; }
[data-theme="dark"] .hz-kind-chip.task { background: #3b2614; color: #fdba74; }
[data-theme="dark"] .hz-kind-chip.unknown { background: #243041; color: #cbd5e1; }
[data-theme="dark"] .badge.high { background: #3f1d1d; color: #fecaca; }
[data-theme="dark"] .badge.medium { background: #3b2614; color: #fdba74; }
[data-theme="dark"] .badge.low { background: #243041; color: #cbd5e1; }
[data-theme="dark"] .badge.open,
[data-theme="dark"] .badge.assigned { background: #1e3a5f; color: #bfdbfe; }
[data-theme="dark"] .badge.in_progress { background: #243656; color: #9bbcff; }
[data-theme="dark"] .badge.need_info { background: #3b2614; color: #fdba74; }
[data-theme="dark"] .badge.done { background: #163226; color: #86efac; }
[data-theme="dark"] .badge.rejected,
[data-theme="dark"] .badge.denied { background: #3f1d1d; color: #fecaca; }
[data-theme="dark"] .badge.pending { background: #243041; color: #e2e8f0; }
[data-theme="dark"] .badge.ok { background: #163226; color: #86efac; }
[data-theme="dark"] .banner.error { background: #3f1d1d; border-color: #f87171; }
[data-theme="dark"] .banner.ok { background: #163226; border-color: #4ade80; }
[data-theme="dark"] .banner.warn { background: #3b2614; border-color: #fb923c; }
[data-theme="dark"] .banner.net { background: #16343a; border-color: #22d3ee; color: var(--hz-heading); }
[data-theme="dark"] .hz-chat-line:not(.me) .hz-chat-file { background: #2a2150; color: #c4b5fd; }
[data-theme="dark"] .hz-chat-avatar-mark {
  background: linear-gradient(135deg, #7aa4ff, #8b5cf6);
}
[data-theme="dark"] .auth-sidecontent { background: #0b1220; }
[data-theme="dark"] .hz-chat-new { color: #0b1220; }
[data-theme="dark"] .btn { color: #0b1220; }
[data-theme="dark"] .btn.ghost { color: var(--hz-primary); }
[data-theme="dark"] .btn.warn,
[data-theme="dark"] .btn.danger,
[data-theme="dark"] .btn.ok { color: #fff; }
[data-theme="dark"] .btn.btn-filter-toggle { color: var(--hz-heading); }
[data-theme="dark"] .btn.outline-danger { color: var(--hz-danger); }
[data-theme="dark"] .pref-chips button.on,
[data-theme="dark"] .theme-chips .chip.on { color: #0b1220; }
[data-theme="dark"] .hz-unread { color: #0b1220; }
[data-theme="dark"] .chip.on {
  background: var(--hz-primary-subtle);
  color: var(--hz-primary);
}
[data-theme="dark"] .badge.uploaded { background: #243041; color: #cbd5e1; }
[data-theme="dark"] .badge.processing { background: #3b2614; color: #fdba74; }
[data-theme="dark"] .badge.ready { background: #163226; color: #86efac; }
[data-theme="dark"] .badge.failed { background: #3f1d1d; color: #fecaca; }
[data-theme="dark"] .kanban-stage.stage-open,
[data-theme="dark"] .kanban-stage.stage-assigned { background: #1e3a5f; color: #bfdbfe; border-color: #60a5fa; }
[data-theme="dark"] .kanban-stage.stage-in_progress { background: #243656; color: #9bbcff; border-color: #7aa4ff; }
[data-theme="dark"] .kanban-stage.stage-need_info { background: #3b2614; color: #fdba74; border-color: #fb923c; }
[data-theme="dark"] .kanban-stage.stage-done { background: #163226; color: #86efac; border-color: #4ade80; }
[data-theme="dark"] .kanban-stage.stage-rejected { background: #3f1d1d; color: #fecaca; border-color: #f87171; }
[data-theme="dark"] .hz-chat-line:not(.me) .hz-chat-quote { background: #2a2150; color: #e9d5ff; }
.voucher-remaining {
  font-size: 1.2rem;
  color: var(--hz-heading);
  margin: 8px 0 0;
}
.voucher-receipt {
  margin-top: 16px;
  padding: 16px;
  border: 2px solid var(--hz-success);
  background: var(--hz-surface);
}
.voucher-receipt h2 {
  margin: 0 0 8px;
  color: var(--hz-heading);
}
.voucher-scanner {
  margin-top: 12px;
  padding: 8px;
  border: 2px solid var(--hz-primary);
  border-radius: 12px;
  background: #0b1020;
}
.voucher-scanner video {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 55vh;
  object-fit: cover;
  background: #000;
  border-radius: 8px;
}
.voucher-scanner .hint {
  color: #fff;
  margin: 8px 4px;
}
.btn-row {
  display: grid;
  gap: 8px;
}
@media (min-width: 640px) {
  .btn-row { grid-template-columns: 1fr 1fr; }
}
.badge.active { background: #dbeafe; color: #1e4fd4; }
.badge.partially_redeemed { background: #ffedd5; color: #c2410c; }
.badge.redeemed { background: #dcfce7; color: #15803d; }
.badge.expired, .badge.cancelled { background: #fee2e2; color: #b91c1c; }
[data-theme="dark"] .badge.active { background: #1e3a5f; color: #bfdbfe; }
[data-theme="dark"] .badge.partially_redeemed { background: #3b2614; color: #fdba74; }
[data-theme="dark"] .badge.redeemed { background: #163226; color: #86efac; }
[data-theme="dark"] .badge.expired,
[data-theme="dark"] .badge.cancelled { background: #3f1d1d; color: #fecaca; }
[data-theme="dark"] .banner.error { color: #fecaca; }
[data-theme="dark"] .banner.ok { color: #86efac; }

/* ===== S32 – Übersetzungen: Spec-CSS (zusätzlich zu S30-Komponenten) ===== */
:root,[data-theme="light"]{ --hz-st-ok-bg:#dcfce7; --hz-st-ok:#15803d; --hz-st-draft-bg:#ffedd5; --hz-st-draft:#9a3412; --hz-live-note:#475569;
  --hz-diff-add-bg:#dcfce7; --hz-diff-add:#14532d; --hz-diff-del-bg:#fee2e2; --hz-diff-del:#7f1d1d; --hz-token-bg:#e0e7ff; --hz-token:#1e3a8a; }
[data-theme="dark"]{ --hz-st-ok-bg:#163226; --hz-st-ok:#86efac; --hz-st-draft-bg:#3b2614; --hz-st-draft:#fdba74; --hz-live-note:#b4c0d0;
  --hz-diff-add-bg:#163226; --hz-diff-add:#bbf7d0; --hz-diff-del-bg:#3f1d1d; --hz-diff-del:#fecaca; --hz-token-bg:#243656; --hz-token:#c7d2fe; }
.page.tr-page{ max-width:min(1240px,100%); }
.page-head .sub{ margin:2px 0 0; color:var(--hz-muted); font-size:.9rem; }
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--hz-border); margin:0 0 14px; }
.tabs a{ display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px; font-weight:700; color:var(--hz-muted); text-decoration:none; border-bottom:3px solid transparent; margin-bottom:-1px; }
.tabs a[aria-current="page"]{ color:var(--hz-primary-hover); border-bottom-color:var(--hz-primary); }
.tabs svg{ width:18px; height:18px; }
/* Fortschritt */
.progress-row{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:0 0 14px; }
.prog{ display:grid; gap:6px; padding:10px 12px; border:1px solid var(--hz-border); border-radius:var(--hz-radius-lg); background:var(--hz-surface); text-align:left; font:inherit; color:inherit; cursor:pointer; min-height:44px; }
.prog .top{ display:flex; justify-content:space-between; align-items:baseline; gap:6px; }
.prog b{ font-size:.95rem; color:var(--hz-heading); }
.prog .n{ font-size:.8rem; color:var(--hz-muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
.prog .bar{ height:6px; border-radius:3px; background:var(--hz-list-line); overflow:hidden; }
.prog .bar i{ display:block; height:100%; background:var(--hz-success); }
.prog.on{ border-color:var(--hz-primary); box-shadow:inset 0 0 0 1px var(--hz-primary); }
@media (max-width:767px){ .progress-row{ gap:6px; } .prog{ padding:8px; min-height:52px; } .prog .top{ flex-direction:column; gap:0; } .prog b{ font-size:.9rem; } .prog .n{ font-size:.72rem; } .prog .n .w{ display:none; } }
/* Segmented */
.seg{ display:inline-grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:2px; padding:3px; border-radius:10px; background:var(--hz-list-line); width:100%; }
.seg button{ min-height:40px; border:0; border-radius:8px; background:transparent; font:inherit; font-weight:700; color:var(--hz-muted); cursor:pointer; padding:0 10px; }
.seg button[aria-pressed="true"]{ background:var(--hz-surface); color:var(--hz-heading); box-shadow:0 1px 3px rgba(15,23,42,.18); }
.seg-wrap{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:0 0 12px; }
.seg-wrap .seg{ width:auto; }
@media (max-width:767px){ .seg-wrap .seg{ width:100%; } }
/* Status-Chip */
.st{ display:inline-flex; align-items:center; gap:4px; min-height:24px; padding:0 8px; border-radius:999px; font-size:.72rem; font-weight:750; white-space:nowrap; }
.st svg{ width:13px; height:13px; }
.st.ok{ background:var(--hz-st-ok-bg); color:var(--hz-st-ok); }
.st.draft{ background:var(--hz-st-draft-bg); color:var(--hz-st-draft); }
.live{ display:block; margin-top:4px; font-size:.74rem; line-height:1.4; color:var(--hz-live-note); }
.live svg{ width:13px; height:13px; }
.tag{ display:inline-flex; align-items:center; min-height:20px; padding:0 6px; border-radius:6px; background:var(--hz-active-bg); color:var(--hz-heading); font-size:.68rem; font-weight:700; }
/* Raster Desktop (alle Sprachen) */
.tr-table{ border-collapse:separate; border-spacing:0; width:100%; table-layout:fixed; min-width:960px; font-size:.86rem; }
.tr-table col.k{ width:190px; } .tr-table col.l{ width:auto; }
.tr-table th,.tr-table td{ text-align:left; vertical-align:top; padding:10px 12px; border-bottom:1px solid var(--hz-list-line); background:var(--hz-surface); }
.tr-table th{ position:sticky; top:0; z-index:2; font-size:.72rem; letter-spacing:.04em; text-transform:uppercase; color:var(--hz-muted); border-bottom:1px solid var(--hz-border); padding-top:9px; padding-bottom:9px; }
.tr-table th .thn{ display:block; text-transform:none; letter-spacing:0; font-weight:600; font-size:.72rem; }
.tr-table th:first-child,.tr-table td:first-child{ position:sticky; left:0; z-index:1; border-right:1px solid var(--hz-list-line); }
.tr-table th:first-child{ z-index:3; }
.tr-table tr.grp td{ background:var(--hz-body-bg); font-weight:800; font-size:.74rem; letter-spacing:.05em; text-transform:uppercase; color:var(--hz-muted); padding:8px 12px; position:static; }
.tr-table tr.grp td:first-child{ position:sticky; left:0; }
.kcell .k{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.78rem; color:var(--hz-heading); font-weight:650; overflow-wrap:anywhere; }
.kcell .tags{ display:flex; gap:4px; flex-wrap:wrap; margin-top:4px; }
.cellbtn{ display:block; width:100%; min-height:44px; padding:0; border:0; background:none; text-align:left; font:inherit; color:inherit; cursor:pointer; border-radius:6px; }
.cellbtn:focus-visible{ outline:2px solid var(--hz-primary); outline-offset:2px; }
.cellbtn .tx{ display:block; max-height:calc(1.35em * 3); overflow:hidden; color:var(--hz-body-text); line-height:1.35; margin-bottom:6px; }
.cellbtn .tx.empty{ color:var(--hz-placeholder); font-style:italic; }
.tok{ display:inline; white-space:nowrap; padding:0 3px; border-radius:4px; background:var(--hz-token-bg); color:var(--hz-token); font-family:ui-monospace,Menlo,monospace; font-size:.92em; }
.tr-table tbody tr:hover td:not(.grp){ background:var(--hz-row-hover); }
td.sel{ box-shadow:inset 0 0 0 2px var(--hz-primary); }
/* Einzelsprache-Tabelle */
.tr-table.single{ min-width:0; }
.tr-table.single col.k{ width:170px; } .tr-table.single col.src{ width:28%; } .tr-table.single col.st{ width:130px; } .tr-table.single col.act{ width:128px; }
.src .tx{ color:var(--hz-muted); }
/* Karten mobil */
.tr-list{ display:grid; gap:0; margin-inline:calc(-1 * max(20px, env(safe-area-inset-left))); border-top:1px solid var(--hz-border); background:var(--hz-surface); }
.tr-grp{ padding:10px 20px 6px; font-weight:800; font-size:.72rem; letter-spacing:.05em; text-transform:uppercase; color:var(--hz-muted); background:var(--hz-body-bg); border-bottom:1px solid var(--hz-list-line); }
.tr-item{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; width:100%; padding:12px 20px; border:0; border-bottom:1px solid var(--hz-list-line); background:var(--hz-surface); text-align:left; font:inherit; color:inherit; min-height:72px; cursor:pointer; }
.tr-item .k{ font-family:ui-monospace,Menlo,monospace; font-size:.74rem; color:var(--hz-muted); font-weight:650; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tr-item .tx{ grid-column:1 / -1; display:block; font-size:.95rem; color:var(--hz-body-text); line-height:1.35; }
.tr-list:not(.is-review) .tr-item .tx{ max-height:calc(1.35em * 2); overflow:hidden; }
.tr-item .de{ grid-column:1 / -1; display:block; font-size:.8rem; color:var(--hz-muted); line-height:1.35; max-height:calc(1.35em * 1); overflow:hidden; }
.tr-item .de b{ font-weight:700; }
.tr-item .meta-row{ grid-column:1 / -1; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tr-item .live{ grid-column:1 / -1; margin:0; max-height:calc(1.4em * 3); overflow:hidden; }
/* Bulk-Leiste */
.bulkbar{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:10px 12px; margin:0 0 12px; border:1px solid var(--hz-border); border-radius:var(--hz-radius-lg); background:var(--hz-surface); }
.bulkbar p{ margin:0; font-size:.88rem; color:var(--hz-body-text); }
.bulkbar .btn{ min-height:44px; }
@media (max-width:767px){ .bulkbar .btn{ width:100%; } }
.btn.ok-solid,
.bulkbar .btn.ok-solid,
.tr-page .btn.ok-solid {
  background: #15803d;
  color: #fff;
  box-shadow: none;
}
.btn.ok-solid:hover:not(:disabled),
.bulkbar .btn.ok-solid:hover:not(:disabled),
.tr-page .btn.ok-solid:hover:not(:disabled) {
  background: #166534;
  color: #fff;
}
.notice{ display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border-radius:var(--hz-radius); background:var(--hz-active-bg); color:var(--hz-heading); font-size:.86rem; margin:0 0 12px; }
.notice svg{ width:18px; height:18px; flex:0 0 18px; margin-top:1px; }
/* Drawer / Sheet */
.tr-drawer-bd{ position:fixed; inset:0; z-index:50; background:rgba(15,23,42,.45); display:flex; justify-content:flex-end; }
.tr-drawer{ width:min(520px,100%); height:100%; background:var(--hz-surface); display:flex; flex-direction:column; box-shadow:var(--hz-shadow); }
.tr-drawer header{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:16px 20px 10px; border-bottom:1px solid var(--hz-list-line); }
.tr-drawer header h2{ margin:0; font-size:1.05rem; color:var(--hz-heading); font-family:ui-monospace,Menlo,monospace; overflow-wrap:anywhere; }
.tr-drawer header .sub{ margin:4px 0 0; font-size:.8rem; color:var(--hz-muted); display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.tr-drawer .body{ flex:1; overflow:auto; padding:14px 20px; display:grid; gap:14px; align-content:start; }
.tr-drawer footer{ display:flex; gap:10px; justify-content:flex-end; padding:12px 20px calc(12px + env(safe-area-inset-bottom)); border-top:1px solid var(--hz-list-line); background:var(--hz-surface); }
.tr-drawer footer .btn{ min-height:48px; }
@media (max-width:767px){
  .tr-drawer-bd{ align-items:flex-end; }
  .tr-drawer{ width:100%; height:calc(100% - 44px); border-radius:16px 16px 0 0; }
  .tr-drawer footer .btn{ flex:1; }
}
.blk h3{ margin:0 0 6px; font-size:.78rem; letter-spacing:.04em; text-transform:uppercase; color:var(--hz-muted); display:flex; justify-content:space-between; align-items:center; gap:8px; }
.blk h3 .r{ text-transform:none; letter-spacing:0; font-weight:600; }
.srcbox{ padding:10px 12px; border-radius:var(--hz-radius); background:var(--hz-body-bg); border:1px solid var(--hz-list-line); color:var(--hz-body-text); line-height:1.45; font-size:.95rem; }
.ta{ display:block; width:100%; min-height:132px; resize:vertical; padding:12px; border:1px solid var(--hz-border); border-radius:var(--hz-radius); background:var(--hz-input-bg); color:var(--hz-body-text); font:inherit; font-size:16px; line-height:1.45; }
.ta:focus{ outline:2px solid var(--hz-primary); outline-offset:1px; border-color:var(--hz-primary); }
.ta.err{ border-color:var(--hz-danger); outline-color:var(--hz-danger); }
.count{ font-size:.8rem; color:var(--hz-muted); font-variant-numeric:tabular-nums; }
.count.warn{ color:var(--hz-warning); font-weight:700; }
.tokens{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.tokbtn{ display:inline-flex; align-items:center; gap:4px; min-height:32px; padding:0 10px; border-radius:999px; border:1px solid var(--hz-border); background:var(--hz-surface); font:600 .8rem ui-monospace,Menlo,monospace; color:var(--hz-heading); cursor:pointer; }
.tokbtn svg{ width:14px; height:14px; }
.tokbtn.ok{ border-color:#15803d; color:#15803d; } .tokbtn.miss{ border-color:var(--hz-danger); color:var(--hz-danger); background:#fef2f2; }
[data-theme="dark"] .tokbtn.miss{ background:#3f1d1d; }
.ferr{ display:flex; gap:6px; align-items:flex-start; color:var(--hz-danger); font-size:.85rem; font-weight:650; }
.ferr svg{ width:16px; height:16px; flex:0 0 16px; margin-top:1px; }
.diff{ padding:10px 12px; border-radius:var(--hz-radius); border:1px solid var(--hz-list-line); line-height:1.6; font-size:.92rem; }
.diff ins,.tr-item .tx ins{ text-decoration:none; background:var(--hz-diff-add-bg); color:var(--hz-diff-add); border-radius:3px; padding:0 2px; }
.diff del,.tr-item .tx del{ background:var(--hz-diff-del-bg); color:var(--hz-diff-del); border-radius:3px; padding:0 2px; text-decoration:line-through; }
.audit{ display:grid; grid-template-columns:auto 1fr; gap:4px 12px; font-size:.82rem; color:var(--hz-muted); margin:0; }
.audit dt{ font-weight:700; } .audit dd{ margin:0; color:var(--hz-body-text); }
.callout{ padding:10px 12px; border-radius:var(--hz-radius); background:var(--hz-st-draft-bg); color:var(--hz-st-draft); font-size:.85rem; font-weight:600; }
.callout.info{ background:var(--hz-active-bg); color:var(--hz-heading); }
/* Mail-Vorschau */
.mailprev{ display:grid; gap:12px; }
.mailmeta{ display:grid; grid-template-columns:auto 1fr; gap:6px 12px; padding:12px 14px; border:1px solid var(--hz-border); border-radius:var(--hz-radius-lg); background:var(--hz-surface); font-size:.9rem; }
.mailmeta dt{ color:var(--hz-muted); font-weight:700; } .mailmeta dd{ margin:0; color:var(--hz-heading); font-weight:600; }
.mailframe{ border:1px solid var(--hz-border); border-radius:var(--hz-radius-lg); background:#f3efe8; overflow:hidden; }
.mailframe .cap{ display:flex; justify-content:space-between; padding:8px 12px; font-size:.75rem; color:#475569; background:#e9e4da; border-bottom:1px solid #d6cfc2; }
.mail-scale{ overflow:hidden; width:100%; position:relative; line-height:0; min-height:0; }
.mail-iframe{ position:absolute; top:0; left:0; display:block; width:600px; height:1100px; border:0; background:#f0ece6; transform-origin:top left; }
.mailtext{ white-space:pre-wrap; font:13px/1.5 ui-monospace,Menlo,monospace; padding:14px; background:var(--hz-surface); border:1px solid var(--hz-border); border-radius:var(--hz-radius-lg); color:var(--hz-body-text); margin:0; }
.ctrl-row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
/* Dialog */
.dlg-bd{ position:fixed; inset:0; z-index:60; background:rgba(15,23,42,.5); display:grid; place-items:center; padding:20px; }
.dlg{ width:min(480px,100%); background:var(--hz-surface); border-radius:14px; padding:20px; box-shadow:var(--hz-shadow); }
.dlg h2{ margin:0 0 8px; font-size:1.15rem; color:var(--hz-heading); }
.dlg p{ margin:0 0 10px; color:var(--hz-body-text); line-height:1.45; font-size:.95rem; }
.dlg ul{ margin:0 0 12px; padding-left:18px; color:var(--hz-body-text); font-size:.92rem; line-height:1.5; }
.dlg .acts{ display:flex; gap:10px; justify-content:flex-end; margin-top:14px; }
.dlg .acts .btn{ min-height:48px; }
@media (max-width:767px){ .dlg-bd{ align-items:end; padding:0; } .dlg{ width:100%; border-radius:16px 16px 0 0; padding-bottom:calc(20px + 34px); } .dlg .acts{ display:grid; grid-template-columns:1fr 1fr; } }
.role-pill{ display:inline-flex; align-items:center; gap:6px; min-height:28px; padding:0 10px; border-radius:999px; background:#ede9fe; color:#5b21b6; font-weight:750; font-size:.78rem; }
[data-theme="dark"] .role-pill{ background:#2e1065; color:#ddd6fe; }
.staff-table td,.staff-table th{ height:52px; }
.state-card{ display:grid; justify-items:center; gap:8px; padding:40px 20px; text-align:center; border:1px solid var(--hz-border); border-radius:var(--hz-radius-lg); background:var(--hz-surface); }
.state-card svg{ width:32px; height:32px; color:var(--hz-muted); }
.state-card.err svg{ color:var(--hz-danger); }
@media (max-width:767px){ .tr-drawer footer .btn.ghost{ flex:0 0 auto; } }
.ctrl-row.desk .seg{ width:auto; grid-auto-columns:auto; } .ctrl-row.desk .seg button{ padding:0 16px; }
/* S32: Desktop-Tabelle vs. Mobile-Liste, nie beide sichtbar */
.desk-only { display: revert; }
.mobile-only { display: revert; }
@media (max-width: 767px) {
  .desk-only { display: none !important; }
  .mail-iframe { height: 1500px; }
}
@media (min-width: 768px) {
  .mobile-only { display: none !important; }
}
.contact-table-frame { position: relative; }
.contact-table-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
  background: var(--hz-surface);
  max-height: calc(100svh - 220px);
}
.tr-page .contact-filters.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}
.tr-filter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.tr-filter-extras { display: none; gap: 10px; }
.tr-filter-extras.is-open { display: grid; }
.tr-filter-chips { margin: 0; }
.tr-item-wrap {
  border-bottom: 1px solid var(--hz-list-line);
  background: var(--hz-surface);
}
.tr-item-wrap .tr-item { border-bottom: 0; }
.tr-item-wrap .meta-row { padding: 0 20px 12px; }
.dlg .acts .btn { min-width: 132px; }
.hz-app.has-bottom-nav .tr-page {
  padding-bottom: calc(var(--nav-h) + 56px + env(safe-area-inset-bottom, 0px));
}
.hz-app.has-bottom-nav .tr-list {
  padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px));
}
.hz-app.has-bottom-nav .tr-item-wrap,
.hz-app.has-bottom-nav .tr-item-wrap .meta-row,
.hz-app.has-bottom-nav [data-tr-review] {
  scroll-margin-bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 768px) {
  .tr-page .contact-filters.filters {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto;
  }
  .tr-filter-head,
  .tr-filter-extras,
  .tr-filter-extras.is-open { display: contents; }
  .tr-filter-chips { display: none; }
}

/* ===== S34 – Kontakte: Tags, Werbe-Status, Mehrfachauswahl (ergänzt app.css, Stand main 2481ca04) ===== */
:root, [data-theme="light"] {
  --hz-tag-bg: #eef2f8; --hz-tag-fg: #0b1220; --hz-tag-border: #8ea0b8;
  --hz-mk-in-bg: #dcfce7; --hz-mk-in: #166534;
  --hz-mk-out-bg: #fee2e2; --hz-mk-out: #991b1b;
  --hz-row-selected: #e3ecff;
  --hz-bulk-bg: #0b1220; --hz-bulk-fg: #ffffff; --hz-bulk-btn-bg: #c9dbff; --hz-bulk-btn-fg: #0b1220;
  --hz-sel-w: 44px;
  --hz-seg-on-bg: #1e4fd4; --hz-seg-on-fg: #ffffff;
}
[data-theme="dark"] {
  --hz-tag-bg: #243041; --hz-tag-fg: #e8eef6; --hz-tag-border: #4a5c74;
  --hz-mk-in-bg: #163226; --hz-mk-in: #86efac;
  --hz-mk-out-bg: #3f1d1d; --hz-mk-out: #fecaca;
  --hz-row-selected: #1e2a40;
  --hz-bulk-bg: #f4f7fb; --hz-bulk-fg: #0b1220; --hz-bulk-btn-bg: #1e4fd4; --hz-bulk-btn-fg: #ffffff;
  --hz-seg-on-bg: #9bbcff; --hz-seg-on-fg: #0b1220;
}
@media (min-width: 768px) { :root { --hz-sel-w: 48px; } }

/* --- Kopf --- */
.contacts-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.contacts-head-actions .btn { min-height: var(--tap); }

/* --- Filter: neue Felder --- */
.contact-filters .f-marketing, .contact-filters .f-tags, .contact-filters .f-tagmode { grid-column: 1 / -1; }
.tag-select { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: var(--hz-ctl-h);
  padding: 0 12px 0 14px; border: 1px solid var(--hz-border); border-radius: var(--hz-radius); background: var(--hz-input-bg);
  color: var(--hz-body-text); font: inherit; font-size: 16px; text-align: left; cursor: pointer; min-width: 0; }
.tag-select .val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-select .val.is-empty { color: var(--hz-placeholder); }
.tag-select svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--hz-muted); }
.tag-select:focus-visible, .seg input:focus-visible + span { outline: 2px solid var(--hz-primary-hover); outline-offset: 2px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--hz-border); border-radius: var(--hz-radius); overflow: hidden; margin: 0; padding: 0; min-width: 0; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg label { position: relative; display: block; margin: 0; cursor: pointer; min-width: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: flex; align-items: center; justify-content: center; height: var(--tap); padding: 0 8px; font-size: .9rem; font-weight: 650;
  color: var(--hz-heading); background: var(--hz-surface); text-align: center; line-height: 1.15; }
.seg label + label span { border-left: 1px solid var(--hz-border); }
.seg input:checked + span { background: var(--hz-seg-on-bg); color: var(--hz-seg-on-fg); }
.f-tagmode .lbl { display: block; font-size: .78rem; font-weight: 650; line-height: 16px; margin: 0 0 6px; color: var(--hz-muted); }
@media (min-width: 768px) {
  .contact-filters .f-marketing, .contact-filters .f-tags { grid-column: auto; }
  .contact-filters .f-tagmode { grid-column: span 2; }
}
@media (min-width: 1100px) { .contact-filters .f-tagmode { grid-column: span 2; } }

/* --- Tabelle: neue Spalten --- */
.contact-table col.c-sel { width: var(--hz-sel-w); }
.contact-table col.c-tags { width: 176px; } .contact-table col.c-mkt { width: 148px; }
.contact-table.has-select th:first-child, .contact-table.has-select td:first-child { border-right: 0; padding: 0; text-align: center; }
.contact-table.has-select th.c-name, .contact-table.has-select td.c-name { position: sticky; left: var(--hz-sel-w); z-index: 1; border-right: 1px solid var(--hz-list-line); }
.contact-table.has-select th.c-name { z-index: 3; }
.contact-table-frame.is-scrolled-x .contact-table.has-select th:first-child,
.contact-table-frame.is-scrolled-x .contact-table.has-select td:first-child { box-shadow: none; }
.contact-table-frame.is-scrolled-x .contact-table.has-select th.c-name,
.contact-table-frame.is-scrolled-x .contact-table.has-select td.c-name { box-shadow: 6px 0 8px -6px var(--hz-sticky-shadow); }
.sel-box { display: flex; align-items: center; justify-content: center; width: 100%; height: 47px; margin: 0; cursor: pointer; }
.contact-table th .sel-box { height: 40px; }
.sel-box input { width: 20px; height: 20px; margin: 0; accent-color: var(--hz-primary-hover); cursor: pointer; }
.sel-box input:focus-visible { outline: 2px solid var(--hz-primary-hover); outline-offset: 2px; }
.contact-table tbody tr.is-selected td { background: var(--hz-row-selected); }
.contact-table td.c-tags { overflow: hidden; }
.tag-chips { display: flex; gap: 4px; align-items: center; min-width: 0; flex-wrap: nowrap; }
.tag-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--hz-tag-border);
  background: var(--hz-tag-bg); color: var(--hz-tag-fg); font-size: .75rem; font-weight: 650; line-height: 1;
  min-width: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.tag-chip > span { overflow: hidden; text-overflow: ellipsis; }
.tag-chip.more { flex: 0 0 auto; background: transparent; color: var(--hz-muted); }
.tag-none { color: var(--hz-muted); }
.mk { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.mk svg { width: 14px; height: 14px; flex: 0 0 14px; }
.mk.in { background: var(--hz-mk-in-bg); color: var(--hz-mk-in); }
.mk.out { background: var(--hz-mk-out-bg); color: var(--hz-mk-out); }
.mk.none { padding: 0; color: var(--hz-muted); font-weight: 600; }
.contact-table col.c-hk { width: 140px; } .contact-table col.c-date { width: 108px; }
.contact-table td.c-date { line-height: 1.2; }
.contact-table td.c-date .d-2 { display: block; color: var(--hz-muted); font-size: .78rem; margin-top: 2px; }
.contact-table th.c-hk { white-space: normal; line-height: 1.15; }
.contact-table td.c-hk { line-height: 1.2; }
.hk-1, .hk-2 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-2 { color: var(--hz-muted); font-size: .78rem; margin-top: 2px; }
@media (min-width: 768px) {
  .contact-table { min-width: 1064px; }
  .contact-table col.c-sel { width: var(--hz-sel-w); }
  .contact-table col.c-name { width: 128px; } .contact-table col.c-tags { width: 168px; } .contact-table col.c-mkt { width: 136px; }
  .contact-table col.c-date { width: 104px; } .contact-table col.c-mail { width: auto; }
  .contact-table col.c-hk { width: 124px; } .contact-table col.c-status { width: 100px; } .contact-table col.c-act { width: 96px; }
  .contact-table td.c-date { padding: 0 8px 0 12px; }
  .contact-table td.c-act { padding: 0 4px; }
}

/* --- Bulk-Leiste --- */
.bulk-bar { position: fixed; z-index: 35; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "count close" "acts acts"; gap: 8px 8px; align-items: center;
  padding: 10px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  background: var(--hz-bulk-bg); color: var(--hz-bulk-fg); box-shadow: 0 -8px 24px rgba(15,23,42,.25); }
.bulk-bar .count { grid-area: count; font-weight: 750; font-size: 1rem; }
.bulk-bar .limit { display: block; font-size: .8rem; font-weight: 600; opacity: .9; }
.bulk-bar .acts { grid-area: acts; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bulk-bar .close { grid-area: close; }
.bulk-bar .btn { min-height: var(--tap); box-shadow: none; padding: 0 12px; }
.bulk-bar .btn.add { background: var(--hz-bulk-btn-bg); color: var(--hz-bulk-btn-fg); }
.bulk-bar .btn.rm { background: transparent; color: var(--hz-bulk-fg); border: 2px solid currentColor; }
.bulk-bar .btn:focus-visible, .bulk-bar .icon-btn:focus-visible { outline: 2px solid var(--hz-bulk-fg); outline-offset: 2px; }
.bulk-bar .icon-btn { color: var(--hz-bulk-fg); }
.bulk-bar .icon-btn:hover { background: rgba(255,255,255,.12); color: var(--hz-bulk-fg); }
.bulk-bar .btn-text.clear { display: none; color: var(--hz-bulk-fg); }
.has-bulk .page { padding-bottom: calc(var(--nav-h) + 132px + env(safe-area-inset-bottom)); }
.page.contacts-page.has-bulk { padding-bottom: calc(var(--nav-h) + 132px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
  /* fixed statt sticky: #app/body haben overflow-x:hidden, sticky würde nie greifen */
  .bulk-bar { left: calc(var(--hz-sidebar-w) + 20px); right: max(20px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom));
    max-width: 1200px; border-radius: var(--hz-radius-lg); grid-template-columns: auto auto auto 1fr; grid-template-areas: "count acts clear ."; padding: 10px 16px; }
  .bulk-bar .acts { display: flex; }
  .bulk-bar .close { display: none; }
  .bulk-bar .btn-text.clear { display: inline-flex; align-items: center; color: var(--hz-bulk-fg); }
  .has-bulk .page { padding-bottom: 104px; }
  .page.contacts-page.has-bulk { padding-bottom: 104px; }
}

/* --- Sheet/Dialog: Tag-Picker, Tags verwalten --- */
.tsheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; background: rgba(15,23,42,.45); }
.tsheet .panel { width: 100%; max-height: calc(100dvh - 48px); display: flex; flex-direction: column; background: var(--hz-surface);
  border-radius: 16px 16px 0 0; box-shadow: var(--hz-shadow); }
.tsheet .grip { width: 36px; height: 5px; border-radius: 3px; background: var(--hz-border); margin: 8px auto 2px; flex: 0 0 auto; }
.tsheet header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 12px 8px 20px; }
.tsheet h2 { margin: 0; font-size: 1.15rem; color: var(--hz-heading); }
.tsheet .sub { margin: -4px 20px 8px; color: var(--hz-muted); font-size: .9rem; }
.tsheet .body { flex: 1 1 auto; overflow: auto; padding: 0 20px 12px; overscroll-behavior: contain; }
.tsheet .foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hz-list-line); }
.tsheet .foot .btn { min-height: var(--hz-ctl-h); }
.t-search { position: sticky; top: 0; z-index: 1; background: var(--hz-surface); padding: 2px 0 8px; }
.t-search .ctl input, .t-new .ctl input, .t-row .ctl input { -webkit-appearance: none; appearance: none; display: block; box-sizing: border-box; width: 100%; height: var(--hz-ctl-h);
  padding: 0 14px; font: inherit; font-size: 16px; color: var(--hz-body-text); background: var(--hz-input-bg); border: 1px solid var(--hz-border); border-radius: var(--hz-radius); }
.t-search .ctl { position: relative; display: block; }
.t-search .ctl.has-icon-left input { padding-left: 44px; }
.t-search .ic-left { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--hz-muted); pointer-events: none; }
.t-list { list-style: none; margin: 0; padding: 0; }
.t-list li { border-bottom: 1px solid var(--hz-list-line); }
.t-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 4px; cursor: pointer; }
.t-opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--hz-primary-hover); flex: 0 0 20px; }
.t-opt .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--hz-heading); font-weight: 600; }
.t-opt .n { color: var(--hz-muted); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-create { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 4px; border: 0; background: none; font: inherit;
  color: var(--hz-primary-hover); font-weight: 700; cursor: pointer; text-align: left; }
.t-create svg { width: 20px; height: 20px; }
.t-meta { color: var(--hz-muted); font-size: .85rem; margin: 8px 0 0; }
.t-err { display: block; color: var(--hz-danger); font-size: .85rem; font-weight: 650; margin-top: 6px; }
.t-new { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; margin: 0 0 4px; }
.t-new .lbl { display: block; font-size: .78rem; font-weight: 650; line-height: 16px; margin: 0 0 6px; color: var(--hz-muted); }
.t-new .btn { min-height: var(--hz-ctl-h); }
.t-new .hint { grid-column: 1 / -1; }
.t-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px; min-height: 52px; }
.t-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; color: var(--hz-heading); }
.t-row .n { display: block; color: var(--hz-muted); font-size: .82rem; font-weight: 500; }
.t-row .acts { display: flex; }
.t-row.is-edit { grid-template-columns: minmax(0,1fr) auto auto; padding: 6px 0; }
.t-row .icon-btn.ok { color: var(--hz-primary-hover); }
input[aria-invalid="true"] { border-color: var(--hz-danger) !important; box-shadow: 0 0 0 1px var(--hz-danger); }
@media (min-width: 768px) {
  .tsheet { align-items: center; justify-content: center; }
  .tsheet .panel { width: min(560px, calc(100% - 48px)); max-height: min(720px, calc(100dvh - 96px)); border-radius: var(--hz-radius-lg); }
  .tsheet .grip { display: none; }
  .tsheet header { padding: 16px 12px 8px 24px; }
  .tsheet .sub { margin: -4px 24px 8px; } .tsheet .body { padding: 0 24px 12px; }
  .tsheet .foot { display: flex; justify-content: flex-end; padding: 12px 24px 16px; }
}

/* --- Detail-Sheet: Ergänzungen --- */
.detail-sheet dd .tag-chips { flex-wrap: wrap; }
.detail-sheet dd .tag-chip { max-width: 100%; }
.dd-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dd-meta { display: block; color: var(--hz-muted); font-size: .85rem; margin-top: 2px; }
.detail-sheet .btn-text { min-height: 44px; padding: 0 4px; }
.btn-text.danger { color: var(--hz-danger); }
.detail-sheet .optout { margin: -6px 0 12px; }
/* Bearbeiten-Dialog: gesperrte Checkbox */
.field.is-locked { color: var(--hz-muted); }
.lock-note { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 0 28px; font-size: .85rem; color: var(--hz-muted); }
.lock-note svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
/* Export */
.contact-export .applied { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0 28px; }
.contact-export .cols-note { margin: 0; color: var(--hz-muted); font-size: .85rem; }
/* Korrekturen nach Mock-Review */
.btn-text { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; background: none; border: 0; color: var(--hz-primary-hover); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .95rem; }
.btn-text svg { width: 18px; height: 18px; }
.detail-sheet dd .btn-text { display: flex; padding: 0; margin-top: 4px; }
.tag-chips .tag-chip:first-child { flex: 0 0 auto; }
.tag-chips .tag-chip:nth-child(2):not(.more) { flex: 0 1 auto; min-width: 48px; }
.contact-table col.c-tags { width: 200px; }
.bulk-bar .count { color: var(--hz-bulk-fg); }
@media (max-width: 767px) { .bulk-bar .acts .btn svg { display: none; } .bulk-bar .btn { font-size: .95rem; } }
.contact-filters .f-tagmode { display: block; }
.contact-table.has-select td.c-sel, .contact-table.has-select th.c-sel { max-width: none; overflow: visible; }
.contact-export .is-dim { opacity: .55; pointer-events: none; }
.dialog-banner { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--hz-radius); background: var(--hz-mk-out-bg); color: var(--hz-mk-out); font-weight: 650; }
.tsheet .banner { margin: 0 0 8px; }

