:root {
  color-scheme: light;
  --text: #253c35;
  --muted: #53695f;
  --green: #16624d;
  --line: #dce5de;
  --paper: #f7f8f5;
  --pale: #e1eee5;
  --blue: #e8f0f8;
  font:
    14px/1.48 Inter,
    "Segoe UI",
    system-ui,
    sans-serif;
  color: var(--text);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button,
input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 7px 11px;
}
button:hover:not(:disabled),
.navlink:hover,
.row:hover {
  background: #edf4ef;
}
:focus-visible {
  outline: 3px solid #309bc5;
  outline-offset: 2px;
}
.skip {
  position: fixed;
  top: -150px;
  left: 8px;
  z-index: 20;
  background: white;
  padding: 8px;
}
.skip:focus {
  top: 2px;
}
[hidden] {
  display: none !important;
}
.top {
  height: 44px;
  background: #07594f;
  color: white;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img {
  width: 37px;
  height: 35px;
  object-fit: contain;
}
.brand b {
  border-left: 1px solid #81a99d;
  padding-left: 10px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 1.5px;
}
#indicators {
  display: flex;
  gap: 5px;
}
.indicator {
  font-size: 11.5px;
  line-height: 16px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: #ffffff16;
  color: #e3f8ea;
  padding: 2px 6px;
  white-space: nowrap;
}
.indicator::before,
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #79daa0;
}
.indicator[data-level="Hinweis"] {
  background: #ffdfa0;
  color: #624206;
}
.indicator[data-level="Fehler"] {
  background: #ffc9cd;
  color: #801f2e;
}
.indicator[data-level="Hinweis"]::before {
  background: #b17911;
}
.indicator[data-level="Fehler"]::before {
  background: #b42a3c;
}
.indicator:hover:not(:disabled) {
  filter: brightness(0.93);
}
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  min-width: 0;
  margin-left: auto;
  background: #ffffff18;
  border: 1px solid #ffffff50;
  border-radius: 6px;
  width: min(34vw, 420px);
  height: 29px;
}
.search input {
  padding: 0;
  width: 100%;
  min-width: 0;
  color: white;
  background: transparent;
  border: 0;
}
.search input::placeholder {
  color: #d9ebe5;
}
.icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.profile,
.top .iconbtn {
  background: transparent;
  color: white;
  border: 1px solid #ffffff50;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
}
.mobile,
.top .mobile {
  display: none;
}
.frame {
  display: grid;
  grid-template-columns: 198px minmax(0, 1fr);
  min-height: calc(100vh - 44px);
}
#nav {
  background: #eef3ed;
  border-right: 1px solid var(--line);
  padding: 30px 12px;
  position: sticky;
  top: 44px;
  height: calc(100dvh - 44px);
}
.navlink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #425a4f;
  margin: 3px 0;
  font-weight: 510;
}
.navlink[aria-current] {
  background: #d7e8dc;
  color: #14563f;
  font-weight: 660;
}
main {
  max-width: 1480px;
  width: 100%;
  padding: clamp(18px, 3vw, 46px);
  margin: 0 auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.18;
  font-weight: 660;
  letter-spacing: -1.3px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 15px;
}
.muted,
small,
time {
  color: var(--muted);
}
small,
time {
  font-size: 12px;
}
.heading,
.panel-head,
.dialoghead,
.actions,
.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.heading {
  justify-content: space-between;
  margin: 0 0 24px;
}
.heading p {
  margin-top: 5px;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
  font-weight: 600;
}
.primary:hover:not(:disabled) {
  background: #104c3c;
}
.action,
.primary,
.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.panel,
.metric {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  min-width: 0;
}
.panel {
  margin: 0 0 16px;
  padding: 18px 20px;
}
.panel-head {
  justify-content: space-between;
  padding-bottom: 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.metric {
  grid-column: span 2;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}
.metric.wide {
  grid-column: span 3;
}
.metric.full {
  grid-column: span 6;
}
.metric-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.metric strong {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -1.2px;
  font-weight: 650;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 2px;
  background: none;
  border: 0;
  border-top: 1px solid #e8eee8;
  border-radius: 0;
}
.row-main {
  min-width: 0;
  flex: 1;
}
.row strong,
.row small {
  display: block;
  overflow-wrap: anywhere;
}
.row strong {
  font-size: 16px;
}
.row small {
  margin-top: 3px;
}
.initial {
  height: 35px;
  width: 35px;
  background: #e6eee6;
  color: #41644e;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
}
.pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 5px;
  border-radius: 15px;
  background: #ecf3ed;
  color: #365a40;
  font-size: 11px;
  padding: 3px 8px;
}
.pill::before {
  background: #609976;
}
.chev {
  color: #789084;
}
.empty {
  padding: 14px 0;
  color: var(--muted);
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 13px;
  margin-bottom: 14px;
}
.ref {
  display: flex;
  align-items: center;
  gap: 7px;
  font:
    12px ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
.iconbtn {
  padding: 3px 6px;
  min-width: 27px;
}
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: 12px 0 16px;
  max-width: 100%;
  overflow-x: auto;
}
.tabs button {
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs [aria-selected="true"] {
  border-bottom-color: var(--green);
  color: var(--green);
  font-weight: 650;
}
.msg {
  padding: 14px 16px;
  margin: 9px 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  overflow-wrap: anywhere;
}
.msg p,
.wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg small {
  font-weight: 650;
  display: block;
  margin-bottom: 4px;
}
.msg.external {
  background: var(--blue);
}
.msg.ai {
  background: var(--pale);
}
.msg.system {
  background: transparent;
  border: 0;
  font-size: 12px;
  padding: 3px 10px;
  color: var(--muted);
  text-align: center;
}
.compose {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 14px;
}
.compose textarea,
.field textarea,
.field select,
.field input {
  width: 100%;
}
.compose textarea {
  display: block;
  margin: 8px 0;
  min-height: 62px;
  resize: vertical;
}
.field {
  display: grid;
  gap: 5px;
  margin: 12px 0;
}
.field > span,
.compose label {
  font-weight: 600;
}
.switch {
  display: flex;
  align-items: center;
  gap: 8px;
}
.switch input {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}
.panel-head + .muted {
  margin: 3px 0 8px;
}
.warntext {
  color: #79500b;
}
.dialoghead {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  width: min(560px, calc(100% - 24px));
  padding: 20px;
  box-shadow: 0 10px 60px #102e2226;
  max-height: 85dvh;
}
dialog::backdrop {
  background: #0b241e50;
}
.line {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.line small {
  overflow-wrap: anywhere;
}
.results {
  position: fixed;
  right: 16px;
  top: 49px;
  z-index: 7;
  background: white;
  box-shadow: 0 6px 24px #102e2226;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  width: min(470px, calc(100vw - 24px));
  max-height: 70vh;
  overflow: auto;
}
#notice {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  border-radius: 6px;
  padding: 8px 14px;
  z-index: 10;
}
.widget-edit {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.widget-edit label:first-child {
  flex: 1;
}
.widget-edit input {
  accent-color: var(--green);
}
.error {
  color: #9e2635;
}
.group {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 14px;
}
.group > div {
  min-width: 0;
}
.detail-item {
  margin: 10px 0;
}
.detail-item small {
  display: block;
}
@media (max-width: 850px) {
  .frame {
    grid-template-columns: 165px minmax(0, 1fr);
  }
  main {
    padding: 20px;
  }
  .group {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .top {
    gap: 7px;
    padding: 0 8px;
  }
  .top .mobile#nav-toggle {
    display: grid;
  }
  .frame {
    display: block;
  }
  #nav {
    position: fixed;
    left: 0;
    top: 44px;
    z-index: 4;
    width: 205px;
    box-shadow: 8px 10px 30px #152e231c;
    display: none;
  }
  #nav.open {
    display: block;
  }
  .grid {
    gap: 8px;
  }
  .metric {
    padding: 10px;
  }
  .metric-name {
    display: block;
  }
  .metric-name .icon {
    display: none;
  }
  .panel {
    padding: 14px;
  }
  .row {
    gap: 8px;
  }
  .row .initial {
    display: none;
  }
}
@media (max-width: 540px) {
  #indicators {
    display: none;
  }
  .top #status-menu {
    display: inline-flex;
  }
  .search {
    flex: 1;
  }
  .brand {
    gap: 5px;
  }
  .brand img {
    width: 31px;
  }
  .brand b {
    padding-left: 6px;
    font-size: 15px;
  }
  main {
    padding: 17px 12px;
  }
  .heading {
    gap: 12px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    grid-column: span 1;
  }
  .metric.wide,
  .metric.full {
    grid-column: span 2;
  }
  .row .priority {
    display: none;
  }
  .ref {
    font-size: 10px;
  }
}
.note,
.dialogactions {
  margin: 12px 0;
}
.widgetlist {
  grid-column: span 3;
  margin: 0;
}
.widgetlist.wide {
  grid-column: span 4;
}
.widgetlist.full {
  grid-column: 1/-1;
}
@media (max-width: 540px) {
  .widgetlist,
  .widgetlist.wide {
    grid-column: 1/-1;
  }
}
button.primary {
  color: white;
}
.brand img {
  background: #e8f5ed;
  border-radius: 50%;
  padding: 1px;
}
.top .indicator:hover:not(:disabled) {
  background: #216f5e;
  color: white;
}
.top .indicator[data-level="Hinweis"]:hover:not(:disabled) {
  background: #ffdfa0;
  color: #624206;
}
.top .indicator[data-level="Fehler"]:hover:not(:disabled) {
  background: #ffc9cd;
  color: #801f2e;
}
.device-link {
  color: var(--green);
  text-decoration: underline;
  font-size: 12px;
}
.certificate {
  margin: 0.8rem 0 0;
}
.certificate dt {
  color: var(--muted);
  font-size: 12px;
}
.certificate dd {
  margin: 0 0 0.45rem;
  overflow-wrap: anywhere;
  font:
    12px/1.5 ui-monospace,
    monospace;
}
.m365-guide {
  line-height: 1.5;
}
.m365-guide p,
.m365-guide li {
  max-width: 82ch;
  margin: 0.6rem 0;
}
.m365-guide details {
  border-top: 1px solid var(--line);
}
.m365-guide summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 600;
  padding: 0.65rem 0;
}
.m365-guide details[open] {
  padding-bottom: 0.65rem;
}
.m365-guide ol {
  padding-left: 1.5rem;
}
.setup-command {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem;
}
.setup-command pre {
  overflow: auto;
  font-size: 0.8rem;
  margin: 0.65rem 0 0;
}

.mail-account {
  display: grid;
  justify-items: start;
  gap: 12px;
}
.mail-account .primary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 6px;
}

#nav { overflow-y: auto; }
.nav-admin {
  border-top: 1px solid #d6e1d8;
  margin-top: 17px;
  padding-top: 12px;
}
.nav-admin summary {
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 650;
  color: #425a4f;
}
.nav-admin .navlink { padding: 9px 8px; gap: 7px; font-size: 13px; overflow-wrap: anywhere; }
.access-search,
.access-pages {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.access-search label { flex: 0 1 32rem; }
.access-search label span {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}
.access-search input { width: 100%; }
.access-pages {
  margin: 20px 0 8px;
  scroll-margin-top: 52px;
  justify-content: space-between;
  align-items: center;
}
.access-pages .actions span { color: var(--muted); }
.access-list {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
.access-list thead th {
  color: var(--muted);
  font-size: 12px;
  background: #f3f6f1;
}
.access-list td, .access-list th {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}
.access-list tbody th { width: 55%; }
.access-list th strong, .decision-customer strong {
  display: block;
  overflow-wrap: anywhere;
}
.access-list small, .decision-customer small { font-weight: 400; }
.access-list tr > :last-child { text-align: right; }
.access-state {
  color: var(--muted);
  font-weight: 550;
}
.access-state[data-enabled="true"] { color: var(--green); }
.decision-customer { margin-bottom: 12px; }
@media (max-width: 650px) {
  .access-list thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .access-list, .access-list tbody { display: block; }
  .access-list tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border-top: 1px solid var(--line);
    padding: 10px 0;
    column-gap: 8px;
  }
  .access-list tbody th, .access-list td { padding: 0; border: 0; width: auto; }
  .access-list tr > :last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}

.admin-zone { background: #f8f6ef; }
.admin-zone #nav { background: #f4efe4; border-color: #e4dccb; }
.admin-zone .navlink[aria-current] { background: #e9dfc9; color: #59491e; }
.admin-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 12px;
  border-left: 3px solid #ac8b44;
  border-radius: 4px;
  background: #f1e9d8;
  color: #574827;
}
.admin-band .action {
  background: transparent;
  border-color: #cac0a9;
  padding: 3px 8px;
  font-size: 13px;
}

#clarification-banner {
  background: #fff3d4;
  border-bottom: 1px solid #e8d8a9;
  color: #594319;
}
#clarification-banner a {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 16px;
  min-height: 36px;
  padding: 6px 12px;
}
#clarification-banner a span { text-decoration: underline; }
.clarification-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.clarification-filter .field { margin: 0; }
.clarification-mode { color: var(--muted); font-size: 12px; }
.case-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.case-layout > div { min-width: 0; }
.case-layout .panel { margin-bottom: 16px; }
.case-layout select { max-width: 100%; }
.case-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0; }
.case-history { padding-left: 18px; }
.case-history li { margin-bottom: 10px; }
.case-history-note { background: var(--blue); padding: 9px 14px; margin-bottom: 16px; }
@media (max-width: 780px) {
  .case-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
}


.worker-card { margin-top: 12px; }
.worker-card .panel-head { justify-content: space-between; }
.worker-card .panel-head strong { color: var(--muted); font-size: 13px; }
.worker-card details { margin-top: 10px; }
.worker-card summary { cursor: pointer; color: var(--green); font-weight: 600; }

.worker-config-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: start;
  gap: 16px;
}
.worker-config-layout > *, .worker-config-budgets, .worker-config-budgets .field { min-width: 0; }
.worker-config-layout .panel { margin-bottom: 16px; }
.worker-config-switch { margin-top: 12px; }
.worker-config-budgets { border: 0; border-top: 1px solid var(--line); margin: 20px 0 14px; padding: 8px 0 0; }
.worker-config-budgets legend { font-weight: 650; padding: 0 8px 0 0; }
.worker-config-budgets p { color: var(--muted); }
.worker-config-budgets > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.worker-config-workers { list-style: none; margin: 0; padding: 0; }
.worker-config-workers li + li { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.worker-config-worker { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.worker-config-worker > span { color: var(--muted); }
@media (max-width: 850px) {
  .worker-config-layout { grid-template-columns: minmax(0,1fr); gap: 0; }
}
@media (max-width: 440px) {
  .worker-config-budgets > div { grid-template-columns: minmax(0,1fr); gap: 0; }
}
