:root {
  --green: #2563eb;
  --green-dark: #1d4ed8;
  --green-soft: #eff6ff;
  --red: #e23b3b;
  --red-deep: #c81e1e;
  --ink: #1b2a22;
  --muted: #5d7468;
  --line: #d7e0da;
  --bg: #e8eee9;
  --card: #ffffff;
  --sidebar: #15241c;
  --sidebar-text: #9eb3a6;
  --shadow: 0 1px 3px rgba(16, 36, 24, 0.07), 0 8px 20px rgba(16, 36, 24, 0.05);
  --radius: 10px;
  --tab: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }

.app {
  position: relative;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 20px 50px rgba(0,0,0,.12);
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.top-date { line-height: 1.15; }
.top-day { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.top-sub { margin-top: 2px; color: #4b5563; font-size: 15px; }
.top-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  padding: 4px 0;
}

body.is-login, body.is-desk { background: var(--bg); }
body.is-phone { background: #d7dfd8; }
body.is-phone .app { display: flex; }
.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.login-card {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
}
.brand-pill, .login-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.login-card h1 { margin: 14px 0 6px; font-size: 28px; letter-spacing: -0.03em; }
.login-lead { margin: 0 0 22px; color: var(--muted); line-height: 1.45; }
.login-card label, .user-form label { display: block; font-size: 13px; font-weight: 700; color: #355044; margin-bottom: 12px; }
.login-card input, .user-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 16px;
  background: #f7faf7;
}
.login-card input:focus, .user-form input:focus, .user-form select:focus, .staff-create input:focus, .file-search:focus {
  outline: none;
  border-color: #8fa5d4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.login-error { min-height: 1.2em; color: var(--red-deep); font-size: 14px; margin: 0 0 8px; }
.login-error.bill-ok { color: #1a387a; }
.sync-badge { margin: 0 0 10px; font-size: 12px; color: #6b7280; }
.sync-badge.sync-bad { color: #b91c1c; font-weight: 600; }
.stamp-remind { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; font-size: 13px; font-weight: 600; }
.desk { min-height: 100dvh; display: grid; grid-template-columns: 228px 1fr; }
.desk.nav-collapsed { grid-template-columns: 72px 1fr; }
.side {
  background: var(--sidebar);
  color: #e8f3ec;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
}
.side-brand { display: flex; align-items: center; gap: 8px; }
.side-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2758c2, #12388a);
  color: #070f21;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  flex: none;
}
.company-rename { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.company-rename input { min-height: 38px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 0 10px; font: inherit; font-weight: 700; }
.company-rename .btn { width: auto; min-height: 38px; margin: 0; }
.company-switch select { display: block; width: 100%; margin-top: 4px; min-height: 36px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; font: inherit; font-weight: 700; color: #111; }
.desk.nav-collapsed .company-switch { display: none; }
.side-brand b { display: block; font-size: 16px; letter-spacing: -0.02em; color: #fff; }
.side-brand span { color: var(--sidebar-text); font-size: 12px; }
.nav-toggle {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--sidebar-text);
  display: grid;
  place-items: center;
  flex: none;
}
.nav-toggle:hover, .side-nav button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; }
.side-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 10px;
  font-weight: 650;
  color: var(--sidebar-text);
}
.side-nav button.active { background: rgba(37, 99, 235, 0.18); color: #fff; }
.side-nav .ico { width: 18px; height: 18px; }
.side-user { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.side-user b, .side-user span { display: block; }
.side-user b { color: #fff; }
.side-user span { color: var(--sidebar-text); font-size: 13px; }
.side-user button {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--sidebar-text);
  padding: 8px 0;
  font-weight: 700;
}
.side-user button:hover { color: #fff; }
.side-user .ico { width: 18px; height: 18px; }
.desk.nav-collapsed .side { padding: 14px 8px; }
.desk.nav-collapsed .side-brand-text,
.desk.nav-collapsed .side-nav span,
.desk.nav-collapsed .side-user b,
.desk.nav-collapsed .side-user span,
.desk.nav-collapsed .logout-label { display: none; }
.desk.nav-collapsed .side-mark { display: none; }
.desk.nav-collapsed .side-nav button,
.desk.nav-collapsed .side-user button,
.desk.nav-collapsed .nav-toggle { justify-content: center; padding-left: 0; padding-right: 0; }
.desk-main { padding: 0 0 40px; overflow: auto; }
.desk-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 28px;
  margin-bottom: 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.desk-head .eyebrow { margin: 0 0 2px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.desk-head h1 { margin: 0; font-size: 20px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.desk-head h1 .ico { width: 20px; height: 20px; color: var(--green-dark); }
.desk-main > .desk-stats,
.desk-main > .desk-grid,
.desk-main > .panel,
.desk-main > .cal-note,
.desk-main > .bill-tabs,
.desk-main > .bill-editor,
.desk-main > .bill-settings { margin-left: 28px; margin-right: 28px; }
.desk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 28px 16px; }
.desk-stats article, .panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(215, 224, 218, 0.8);
  padding: 16px 18px;
}
.desk-stats b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.desk-stats span, .job-line span, .job-line small { color: var(--muted); }
.desk-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 12px; }
.panel { margin-bottom: 14px; }
.panel h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #355044; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
th { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-nav b { font-size: 18px; text-transform: capitalize; }
.cal-move, .cal-back {
  border: 0;
  background: #f3f4f6;
  color: #111;
  border-radius: 12px;
  font-weight: 700;
}
.cal-move { width: 40px; height: 40px; font-size: 24px; }
.cal-back { margin-bottom: 8px; padding: 8px 12px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-week { margin-bottom: 8px; color: #6b7280; font-size: 12px; font-weight: 700; text-align: center; }
.cal-cell {
  min-height: 64px;
  border: 0;
  border-radius: 14px;
  background: #f7f8fa;
  color: #111;
  font: inherit;
}
.cal-cell.empty { background: transparent; }
.cal-cell b { font-size: 16px; }
.cal-cell.has { background: #e3e9f6; color: #162f65; }
.cal-cell.today { box-shadow: inset 0 0 0 2px #2563eb; }
.cal-note { margin: 14px 0 0; color: #6b7280; font-size: 14px; }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.g-head b { font-size: 16px; }
.g-head button, .g-chip { border: 0; background: #fff; box-shadow: var(--shadow); }
.g-head button { width: 36px; height: 36px; border-radius: 12px; font-size: 22px; }
.g-chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 10px; }
.g-chip { border-radius: 12px; padding: 6px 0; color: #6b7280; }
.g-chip span, .g-chip b { display: block; }
.g-chip span { font-size: 10px; }
.g-chip b { font-size: 15px; color: #111; }
.g-chip.on { background: #2563eb; color: #fff; }
.g-chip.on b { color: #fff; }
.g-chip.has b { box-shadow: inset 0 -2px 0 #2563eb; }
.g-chip.on.has b { box-shadow: inset 0 -2px 0 #fff; }
.g-scroll, .g-board { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.g-scroll { overflow: auto; max-height: 520px; }
.g-day { position: relative; cursor: pointer; }
.gcal-pop {
  position: fixed;
  z-index: 40;
  width: 340px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(32, 33, 36, 0.28);
  padding: 12px 16px 14px;
}
.gcal-pop-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  color: #5f6368;
}
.gcal-pop input[name="title"] {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #dadce0;
  font-size: 22px;
  font-weight: 500;
  padding: 10px 36px 8px 0;
  outline: none;
  background: transparent;
}
.gcal-pop input[name="title"]:focus { border-bottom-color: #2563eb; }
.gcal-pop-when { margin: 2px 0 14px; color: #5f6368; font-size: 13px; }
.gcal-pop-actions { display: flex; align-items: center; gap: 8px; }
.gcal-pop-actions .btn { width: auto; min-height: 36px; margin: 0 0 0 auto; padding: 0 16px; }
#termin-more, .gcal-pop-delete { border: 0; background: transparent; color: #162f65; font-weight: 700; padding: 0; }
.gcal-pop-delete { color: #b42318; }
.gcal-pop-more { display: grid; gap: 8px; margin-bottom: 12px; }
.gcal-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gcal-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.gcal-person { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dadce0; background: #fff; border-radius: 999px; padding: 5px 10px 5px 8px; font: inherit; font-size: 12px; font-weight: 600; color: #3c4043; cursor: pointer; }
.gcal-person i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #9aa3ad); }
.gcal-person.on { background: #e8f0fe; border-color: #1a73e8; color: #174ea6; }
.gcal-person:hover { background: #f1f3f4; }
.gcal-person.on:hover { background: #d2e3fc; }
.gcal-pop-more label, .gcal-pop-more b { font-size: 12px; font-weight: 700; color: #6b7280; }
.gcal-pop-more input, .gcal-pop-more select {
  display: block;
  width: 100%;
  min-height: 38px;
  margin-top: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 8px;
  font: inherit;
}
.gcal-pop .login-error { text-align: left; margin: 8px 0 0; }
.termin-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto auto; gap: 10px; align-items: end; }
.termin-grid label, .termin-people b { display: block; margin: 0; font-size: 12px; font-weight: 700; color: #6b7280; }
.termin-grid input, .termin-people select {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0 10px;
  background: #fff;
  font: inherit;
  font-weight: 600;
}
.termin-grid .btn { min-height: 42px; width: auto; margin-top: 18px; padding: 0 16px; }
.termin-people { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; min-height: 32px; margin: 8px 0; }
.chip-row button { border: 0; background: #fff; border-radius: 999px; padding: 6px 10px; font-weight: 700; color: #111; }
.termin-card .login-error { text-align: left; margin-top: 8px; }
@media (max-width: 1100px) {
  .termin-grid, .termin-people { grid-template-columns: 1fr; }
}
.g-scroll .g-day { margin-left: 48px; }
.g-scroll .g-hour span { left: -44px; width: 40px; }
.g-line { position: absolute; left: 0; right: 0; border-top: 1px solid #eceff3; height: 0; }
.g-board { display: grid; grid-template-columns: 48px repeat(7, 1fr); overflow: auto; max-height: calc(100vh - 230px); min-height: 480px; }
.g-board .g-day { margin-left: 0; border-left: 1px solid #e3e7ec; }
.g-board .g-day.is-today { background: #f4f6fa; }
.g-colhead { text-align: center; padding: 10px 0 8px; color: #6b7280; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; position: sticky; top: 0; background: #fff; z-index: 40; border-left: 1px solid #eff2f5; border-bottom: 1px solid #e9edf2; }
.g-colhead.on { background: #f1f4fa; color: #14306c; }
.g-colhead b {
  width: 28px;
  height: 28px;
  margin: 4px auto 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.g-colhead.on b { background: #2563eb; color: #fff; }
.g-rail { position: relative; }
.g-hour { position: absolute; left: 0; right: 0; border-top: 1px solid #eceff3; height: 0; }
.g-hour span { position: absolute; top: -8px; left: 4px; font-size: 11px; color: #6b7280; }
.g-hour-btn { height: 52px; border: 0; background: transparent; padding: 0; cursor: pointer; z-index: 1; }
.g-hour-btn:hover span { color: #162f65; font-weight: 700; }
.g-slot {
  position: absolute;
  left: 0;
  right: 0;
  height: 52px;
  border: 0;
  background: transparent;
  padding: 0;
  z-index: 1;
  cursor: pointer;
}
.g-slot:hover { background: rgba(37, 99, 235, 0.08); }
.g-event { z-index: 2; }
.g-event {
  position: absolute; left: 3px; right: 3px;
  border: 0; border-radius: 4px;
  background: #d7e1f5; color: #142853;
  text-align: left; padding: 3px 6px; overflow: hidden;
}
.g-event b, .g-event span { display: block; font-size: 12px; line-height: 1.2; }
.g-event.layered { right: auto; color: #fff; }
.g-event.layered span { color: #fff; }
.cal-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.cal-list h2 { margin: 4px 8px 10px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: #6b7280; }
.cal-toggle { position: relative; display: flex; align-items: center; gap: 10px; margin: 2px 0; padding: 6px 8px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.cal-toggle:hover { background: #f3f4f6; }
.cal-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cal-toggle i { width: 18px; height: 18px; border-radius: 4px; flex: none; background: var(--cal); box-shadow: inset 0 0 0 2px var(--cal); }
.cal-toggle input:not(:checked) + i { background: transparent; }
.cal-all {
  margin: 8px 8px 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #162f65;
  font-weight: 700;
  font-size: 13px;
}
.gcal-bar { display: flex; align-items: center; gap: 6px; margin: 4px 0 14px; }
.gcal-today, .gcal-chev {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  font-weight: 700;
}
.gcal-today:hover, .gcal-chev:hover { border-color: #8fa5d4; color: var(--green-dark); }
.gcal-today { height: 36px; padding: 0 16px; }
.gcal-chev { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; }
.gcal-chev .ico { width: 18px; height: 18px; }
#week-next .ico { transform: scaleX(-1); }
.gcal-label { margin-left: 8px; font-size: 20px; letter-spacing: -0.02em; font-weight: 600; }
#assign-form.user-form { grid-template-columns: 1.1fr 1.3fr 1fr 1fr auto; margin-bottom: 8px; }
#assign-form .btn { min-height: 46px; align-self: end; }
@media (max-width: 1100px) {
  .cal-layout { grid-template-columns: 1fr; }
}
.user-form select, .cal-nav select {
  min-height: 46px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 0 10px; background: #fff; font: inherit;
}
.job-line { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.user-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.user-form .btn { width: auto; min-width: 160px; }
.btn-small { min-height: 38px; width: auto; padding: 0 12px; font-size: 14px; }
.staff-lead { margin: 0 0 16px; color: #6b7280; font-size: 14px; }
.staff-create {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 130px 150px auto;
  gap: 10px;
  align-items: end;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.staff-create label, .staff-field { display: block; margin: 0; font-size: 12px; font-weight: 700; color: #6b7280; }
.staff-create input, .staff-create select, .staff-field select, .staff-lock {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0 10px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  color: #111;
}
.staff-create .btn { min-height: 42px; width: auto; margin-top: 18px; }
.staff-list { margin-top: 4px; }
.staff-row {
  display: grid;
  grid-template-columns: 240px 170px 160px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.staff-row.off .staff-avatar { filter: grayscale(0.6); opacity: 0.75; }
.staff-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.staff-avatar, .staff-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e3e9f6;
  color: #162f65;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(29, 78, 216, 0.12);
}
.staff-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.staff-avatar.has { background: #d7e0da; }
.staff-who b, .staff-who span { display: block; }
.staff-who b { font-size: 16px; }
.staff-who span { color: #6b7280; font-size: 13px; font-weight: 600; }
.staff-actions { display: flex; justify-content: flex-end; gap: 8px; }
.staff-actions .btn { margin-top: 0; }
.staff-note { color: #6b7280; font-size: 13px; font-weight: 700; }
.staff-board .login-error { min-height: 0; margin: 8px 0 0; text-align: left; }
@media (max-width: 1100px) {
  .desk-grid, .user-form, .desk-stats, .staff-create, .staff-row, #assign-form.user-form { grid-template-columns: 1fr; }
  .staff-actions { justify-content: flex-start; }
}

.main { flex: 1; overflow: auto; padding: 14px 14px 12px; }
.main.nav-mode { padding: 0; overflow: hidden; display: flex; flex-direction: column; background: #fff; }

.time-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-soft);
  color: #0d2b6b;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-weight: 650;
}
.time-pill strong { font-variant-numeric: tabular-nums; font-size: 16px; }
.time-pill span { font-size: 13px; font-weight: 600; color: #15357a; }
.time-pill small { display: block; font-weight: 500; color: #3f7d56; font-size: 12px; }
.time-pill.work { background: #e7ecf6; }
.time-pill .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 5px rgba(37, 99, 235,.18);
  flex: none;
}

.pause-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fdecec;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.pause-badge {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: grid; place-items: center; flex: none;
}
.pause-banner b { display: block; font-size: 15px; }
.pause-banner em {
  font-style: normal;
  color: var(--red-deep);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(215, 224, 218, 0.75);
  padding: 14px;
  margin-bottom: 14px;
}
.eyebrow {
  color: #6b7280;
  font-size: 13px;
  margin: 2px 2px 8px;
}
.job-head { display: flex; gap: 12px; align-items: flex-start; }
.job-copy { flex: 1; min-width: 0; }
.job-title { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.02em; }
.job-customer { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: #1f2937; }
.addr { display: flex; gap: 6px; color: #374151; font-size: 14px; line-height: 1.35; align-items: flex-start; }
.photo {
  width: 92px; height: 74px; border-radius: 12px; flex: none;
  background-size: cover; background-position: center;
}
.photo-hedge { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 74'%3E%3Crect width='92' height='74' fill='%23cfe8d4'/%3E%3Crect y='50' width='92' height='24' fill='%237ea35a'/%3E%3Cellipse cx='16' cy='42' rx='16' ry='18' fill='%232f8a45'/%3E%3Cellipse cx='38' cy='36' rx='18' ry='22' fill='%2339a34f'/%3E%3Cellipse cx='62' cy='40' rx='18' ry='19' fill='%232e7d3e'/%3E%3Cellipse cx='82' cy='46' rx='14' ry='14' fill='%2348b15d'/%3E%3C/svg%3E"); }
.photo-lawn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 74'%3E%3Crect width='92' height='74' fill='%23b9ddf2'/%3E%3Crect y='40' width='92' height='34' fill='%236fbf73'/%3E%3Cpolygon points='48,16 78,38 18,38' fill='%23c4554a'/%3E%3Crect x='30' y='38' width='32' height='22' fill='%23f4efe6'/%3E%3Crect x='42' y='48' width='8' height='12' fill='%238b6914'/%3E%3C/svg%3E"); }
.photo-house { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 74'%3E%3Crect width='92' height='74' fill='%23efe6d8'/%3E%3Crect y='46' width='92' height='28' fill='%23d7c4a8'/%3E%3Crect x='12' y='30' width='26' height='20' fill='%23c4a484'/%3E%3Crect x='46' y='36' width='18' height='14' fill='%238b6b4a'/%3E%3Crect x='68' y='22' width='12' height='18' fill='%23a38b71'/%3E%3C/svg%3E"); }
.ico { width: 22px; height: 22px; flex: none; display: block; }
.tabs .ico { width: 24px; height: 24px; }
.meta .ico, .nav-meta .ico { width: 16px; height: 16px; }
.top-back .ico { width: 22px; height: 22px; }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 14px 0 12px;
}
.stat { display: flex; gap: 8px; align-items: center; color: #374151; font-size: 14px; }
.stat b { display: block; font-size: 15px; color: var(--ink); }
.stat small { color: #6b7280; font-size: 12px; }

.btn {
  width: 100%;
  border: 0;
  border-radius: 8px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 0 14px;
}
.btn .ico { width: 20px; height: 20px; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:active { background: #12388a; }
.btn-ghost {
  background: #fff;
  color: #374151;
  border: 1px solid #d7dbe2;
  margin-top: 8px;
}
.btn-red {
  background: #fff5f5;
  color: var(--red-deep);
  border: 1px solid #ffd0d0;
}
.hint {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  margin: 8px 0 0;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row-2 .btn { font-size: 15px; min-height: 50px; }

.section-title { margin: 6px 4px 10px; font-size: 18px; }

.mini {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
}
.num {
  width: 26px; height: 26px; border-radius: 50%;
  background: #eef0f3; color: #4b5563;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; flex: none; margin-top: 2px;
}
.mini h3 { margin: 0 0 2px; font-size: 16px; }
.mini p { margin: 0; color: #4b5563; font-size: 13px; line-height: 1.35; }
.mini .meta { margin-top: 6px; color: #6b7280; font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; }
.mini .meta span, .nav-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card.done, .job-line.done {
  background: #e3e9f6;
  border: 1px solid #b7c5e4;
}
.done-flag {
  display: inline-block;
  margin: 0 0 6px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
}
.done-tag {
  display: inline-block;
  margin-top: 6px;
  background: #fff;
  color: #0f317a;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
}
.file-search { width: 100%; min-height: 48px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 0 14px; font: inherit; margin-bottom: 8px; }
.file-note { grid-column: 1 / -1; }
.file-note textarea { width: 100%; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 12px; font: inherit; resize: vertical; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f3f5fa; }
.view-switch { display: flex; gap: 8px; margin: 0 0 14px; }
.view-switch button { border: 0; background: #f3f4f6; border-radius: 999px; padding: 8px 14px; font-weight: 700; color: #374151; }
.view-switch button.on { background: #2563eb; color: #fff; }
table .linkish { width: auto; margin: 0; padding: 0; color: #162f65; font-weight: 700; text-align: left; }

.nav-job {
  padding: 12px 16px 8px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav-job h2 { margin: 0 0 2px; font-size: 18px; }
.nav-job .sub { color: #4b5563; font-size: 14px; }
.nav-meta {
  display: flex; gap: 16px; margin-top: 8px; color: #374151; font-size: 14px;
}
.nav-meta b { font-weight: 700; }

.map-wrap { position: relative; flex: 1; min-height: 220px; }
#map { height: 100%; width: 100%; background: #c9d3e7; }
.instruction {
  position: absolute;
  z-index: 500;
  left: 12px; right: 64px; top: 12px;
  background: var(--green-dark);
  color: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 8px 18px rgba(8, 24, 60, .25);
}
.instruction .turn {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.14);
  display: grid; place-items: center; flex: none;
}
.instruction b { display: block; font-size: 16px; }
.instruction span { font-size: 14px; opacity: .95; }
.map-tools {
  position: absolute; z-index: 500; right: 10px; top: 70px;
  display: flex; flex-direction: column; gap: 8px;
}
.map-tools button, .locate {
  width: 40px; height: 40px; border-radius: 12px;
  border: 0; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15);
  font-size: 20px; color: #111;
}
.locate { position: absolute; z-index: 500; right: 10px; bottom: 108px; }
.nav-end {
  position: absolute; z-index: 500; left: 12px; right: 12px; bottom: 12px;
}
.user-dot {
  width: 18px; height: 18px; margin-left: -9px; margin-top: -9px;
}
.user-dot i {
  display: block; width: 18px; height: 18px; border-radius: 50%;
  background: #1a73e8; border: 3px solid #fff;
  box-shadow: 0 0 0 8px rgba(26,115,232,.25);
}

.modal[hidden] { display: none; }
.modal {
  position: absolute;
  inset: 0 0 calc(var(--tab) + var(--safe-b)) 0;
  background: rgba(55, 60, 68, .55);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.dialog {
  background: #fff;
  border-radius: 22px;
  padding: 26px 20px 18px;
  width: min(100%, 340px);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.dialog h2 { margin: 12px 0 8px; font-size: 24px; letter-spacing: -0.03em; }
.dialog p { margin: 0 0 18px; color: #4b5563; line-height: 1.4; }
.pause-hero {
  width: 74px; height: 74px; border-radius: 50%;
  margin: 0 auto;
  background: #ff9f1a;
  color: #fff;
  display: grid; place-items: center;
}
.dialog .btn + .btn { margin-top: 10px; }

.tabs {
  height: calc(var(--tab) + var(--safe-b));
  padding: 0 10px var(--safe-b);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e8ece9;
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  align-items: end;
  z-index: 40;
  box-shadow: 0 -8px 24px rgba(16, 36, 24, 0.04);
}
.tab-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 0;
  gap: 2px;
}
.tab-side.right { justify-content: stretch; }
.tabs button {
  border: 0;
  background: transparent;
  color: #8a948c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  flex: 1;
  min-height: 58px;
  min-width: 0;
  padding: 6px 4px 8px;
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.tabs button:active { background: #f1f5f2; }
.tabs button.active { color: var(--green); }
.tabs button.active span:last-child { font-weight: 750; }
.tabs .tab-pause {
  flex: none;
  width: 64px;
  height: 64px;
  margin: -18px auto 10px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32);
  justify-self: center;
  gap: 2px;
  padding: 0;
  min-height: 0;
}
.tabs .tab-pause:active { background: var(--green-dark); transform: scale(0.96); }
.tabs .tab-pause.stop { background: var(--red); box-shadow: 0 10px 22px rgba(226, 59, 59, 0.32); color: #fff; }
.tabs .tab-pause span { font-size: 10px; line-height: 1; font-weight: 750; }
.tabs svg, .tabs .ico { width: 22px; height: 22px; }
.tabs .tab-ico-wrap { position: relative; display: grid; place-items: center; width: 22px; height: 22px; }
.tabs .tab-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.day-row { display: flex; gap: 8px; overflow: auto; padding-bottom: 8px; margin-bottom: 8px; }
.day {
  border: 0;
  background: #fff;
  border-radius: 14px;
  min-width: 64px;
  padding: 8px 6px;
  box-shadow: var(--shadow);
  color: #374151;
}
.day b { display: block; font-size: 16px; }
.day.active { background: var(--green); color: #fff; }
.cal-empty { color: #6b7280; padding: 12px; }

.menu-hero { padding: 6px 4px 12px; }
.menu-hero h2 { margin: 0; font-size: 22px; }
.menu-hero p { margin: 4px 0 0; color: #6b7280; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.total {
  background: #fff; border-radius: 16px; padding: 12px 8px; text-align: center;
  box-shadow: var(--shadow);
}
.total b { display: block; font-variant-numeric: tabular-nums; font-size: 16px; }
.total span { color: #6b7280; font-size: 12px; }
.steps { margin: 0; padding: 0 0 0 18px; color: #374151; }
.steps li { margin: 8px 0; line-height: 1.35; }
.linkish {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: 0;
  color: #6b7280;
  text-decoration: underline;
  padding: 8px;
}
.setting {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.setting p { margin: 4px 0 0; color: #6b7280; font-size: 13px; line-height: 1.35; }
.switch {
  width: 52px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #d5d8de;
  padding: 3px;
  flex: none;
}
.switch i {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.switch.on { background: var(--green); }
.switch.on i { transform: translateX(20px); }

.pin {
  background: var(--red);
  width: 16px; height: 16px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.leaflet-control-attribution { font-size: 10px !important; }
.leaflet-bottom.leaflet-right { margin-bottom: 96px; }

.nav-fab, .nav-scrim { display: none; }

@media (max-width: 899px) {
  .desk,
  .desk.nav-collapsed { grid-template-columns: 1fr; }
  .side {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: min(84vw, 280px);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .desk.nav-open .side {
    transform: none;
    box-shadow: 12px 0 40px rgba(8, 16, 12, 0.35);
  }
  .desk.nav-collapsed .side {
    padding: 16px 12px;
  }
  .desk.nav-collapsed .side-brand-text { display: block; }
  .desk.nav-collapsed .side-nav span { display: inline; }
  .desk.nav-collapsed .side-user b,
  .desk.nav-collapsed .side-user span { display: block; }
  .desk.nav-collapsed .logout-label { display: inline; }
  .desk.nav-collapsed .side-mark { display: grid; }
  .desk.nav-collapsed .side-nav button,
  .desk.nav-collapsed .side-user button,
  .desk.nav-collapsed .nav-toggle { justify-content: flex-start; padding: 10px; }
  .nav-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 30;
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: 10px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--sidebar);
    color: #e8f3ec;
    box-shadow: var(--shadow);
  }
  .nav-fab .ico { width: 22px; height: 22px; }
  .desk.nav-open .nav-fab { visibility: hidden; }
  .nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(12, 20, 16, 0.42);
  }
  .desk.nav-open .nav-scrim { display: block; }
  .desk-head { padding: 12px 16px 12px 60px; }
  .desk-main > .desk-stats,
  .desk-main > .desk-grid,
  .desk-main > .panel,
  .desk-main > .cal-note,
  .desk-main > .bill-tabs,
  .desk-main > .bill-editor,
  .desk-main > .bill-settings { margin-left: 14px; margin-right: 14px; }
  .bill-meta, .bill-split, .bill-pay, .bill-filter { grid-template-columns: 1fr; }
  .bill-items { min-width: 720px; }
  .desk-stats { grid-template-columns: 1fr 1fr; margin-left: 14px; margin-right: 14px; }
  table { display: block; overflow-x: auto; }
  .gcal-pop {
    left: 12px !important;
    right: 12px !important;
    width: auto;
    top: 10vh !important;
  }
}

.bill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 28px 16px;
}
.bill-tabs button {
  border: 0;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.bill-tabs button.on { background: var(--green); color: #fff; }
.bill-actions, .bill-head-actions, .bill-toolbar, .bill-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bill-toolbar { margin: 8px 0 24px; }
.bill-filter { display: grid; grid-template-columns: 1.4fr 160px 1fr; gap: 10px; margin-bottom: 12px; }
.bill-filter select, .bill-meta input, .bill-meta select, .bill-pay input, .bill-pay select, .bill-items input, .bill-items select, .bill-editor textarea, .bill-settings textarea {
  width: 100%;
  min-height: 40px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  font: inherit;
}
.bill-editor textarea, .bill-settings textarea { min-height: 84px; }
.bill-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bill-meta label, .bill-split label, .bill-pay label, .bill-settings label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.bill-address { margin: 12px 0 0; color: var(--muted); }
.bill-table-wrap { overflow: auto; }
.bill-items input, .bill-items select { min-height: 36px; font-weight: 600; }
.bill-line { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bill-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 12px; }
.bill-sum { width: 100%; }
.bill-sum th { width: 60%; }
.bill-sum td { text-align: right; font-variant-numeric: tabular-nums; }
.bill-pay { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 12px; }
.bill-history { margin: 0; padding-left: 18px; color: #355044; }
.bill-history li { margin: 6px 0; }
.bill-mini { color: var(--muted); font-size: 12px; font-weight: 600; }
.bill-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #eef2ef; color: #355044; }
.bill-badge.draft { background: #eef2ef; }
.bill-badge.sent, .bill-badge.open { background: #e7f0ff; color: #1d4ed8; }
.bill-badge.accepted, .bill-badge.paid { background: var(--green-soft); color: var(--green-dark); }
.bill-badge.partial { background: #fff4d6; color: #92400e; }
.bill-badge.overdue, .bill-badge.rejected, .bill-badge.expired { background: #fde8e8; color: var(--red-deep); }
.bill-badge.cancelled { background: #eceff3; color: #6b7280; }
.bill-badge.converted { background: #ede9fe; color: #5b21b6; }
.bill-settings .btn { width: auto; margin-top: 16px; }

.desk-main { padding-bottom: 64px; }
.desk-head {
  min-height: 76px;
  padding: 18px 36px;
  margin-bottom: 28px;
}
.desk-head h1 { font-size: 26px; }
.desk-main > .desk-stats,
.desk-main > .desk-grid,
.desk-main > .panel,
.desk-main > .cal-note,
.desk-main > .bill-tabs,
.desk-main > .bill-editor,
.desk-main > .bill-settings { margin-left: 36px; margin-right: 36px; }
.desk-stats { gap: 16px; margin: 0 36px 22px; }
.desk-stats article, .panel {
  padding: 22px 24px 24px;
  border-radius: 16px;
}
.desk-stats article { padding: 20px 22px; }
.desk-stats span { display: block; margin-top: 4px; }
.desk-grid { gap: 18px; }
.panel { margin-bottom: 20px; }
.panel h2 { margin: 0 0 18px; font-size: 18px; }
.panel h2 + p,
.panel .staff-lead,
.panel .cal-note { margin-bottom: 16px; }
th, td { padding: 14px 12px; }
th:first-child, td:first-child { padding-left: 4px; }
th:last-child, td:last-child { padding-right: 4px; }
.user-form, .staff-create {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 18px;
  margin-bottom: 8px;
}
.staff-create { padding-bottom: 20px; margin-bottom: 12px; }
.user-form label, .staff-create label { margin-bottom: 0; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; font-weight: 400; font-size: 12px; color: #6b7280; }
.inline-check input { margin: 0; }
.user-form .inline-check { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin: -4px 0 10px; font-size: 13px; font-weight: 650; color: #3f4650; }
.user-form .inline-check input { width: 16px; height: 16px; }
#job-questions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 8px 0 4px;
}
#job-questions h3 { grid-column: 1 / -1; margin: 10px 0 0; font-size: 16px; }
.staff-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 18px;
  align-items: flex-end;
  padding: 18px 2px 20px;
}
.staff-who { flex: 1 1 240px; }
.staff-field { flex: 1 1 150px; max-width: 220px; }
.staff-actions { flex: 1 1 240px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.job-line { padding: 14px 0; gap: 4px; }
.file-search { margin-bottom: 14px; }
.cal-layout { gap: 22px; }
.cal-list { padding: 4px 4px 12px; }
.gcal-bar { margin: 8px 0 18px; }
#assign-form.user-form { margin-bottom: 18px; }
.bill-meta, .bill-split, .bill-pay { gap: 14px; }
.bill-pay { margin-top: 18px; }

.app .main { padding: 18px 16px 24px; }
.app .card {
  padding: 18px 16px 16px;
  margin-bottom: 16px;
  border-radius: 18px;
}
.app .card p { line-height: 1.45; }
.app .section-title { margin: 22px 2px 12px; font-size: 17px; }
.app .menu-hero { padding: 4px 2px 18px; }
.app .menu-hero h2 { font-size: 26px; letter-spacing: -0.03em; }
.app .menu-hero p + p { margin-top: 2px; }
.app .totals { gap: 10px; margin-bottom: 8px; }
.app .total { padding: 16px 8px; border-radius: 16px; }
.app .eyebrow { margin: 4px 2px 10px; }
.app .job-title { margin-bottom: 8px; }
.app .stats { margin: 16px 0 14px; gap: 12px; }
.app .steps li { margin: 12px 0; line-height: 1.45; }
.app .hint { margin-top: 12px; line-height: 1.4; }
.app .time-pill, .app .pause-banner { margin-bottom: 16px; padding: 12px 14px; }
.dialog { padding: 28px 22px 20px; }
.dialog .choice, .dialog .btn + .btn { margin-top: 12px; }
.news-kind { gap: 12px; }
.ampel { gap: 10px; margin: 2px 0 18px; }
.ampel button { padding: 10px 16px; }
.bar-row { margin: 12px 0; gap: 12px; }
#flow-modal { padding: 24px; }
#flow-modal .dialog { padding: 28px 24px 22px; }

@media (max-width: 899px) {
  .desk-head { padding: 16px 16px 16px 62px; }
  .desk-main > .desk-stats,
  .desk-main > .desk-grid,
  .desk-main > .panel,
  .desk-main > .cal-note,
  .desk-main > .bill-tabs,
  .desk-main > .bill-editor,
  .desk-main > .bill-settings,
  .desk-stats { margin-left: 16px; margin-right: 16px; }
  .desk-stats article, .panel { padding: 18px 16px; }
  .staff-actions { justify-content: flex-start; margin-left: 0; }
}

.nav-mode .map-wrap { background: #dfe8e2; }
.nav-mode .gmap { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; }
.nav-job .nav-actions { display: flex; gap: 8px; margin-top: 12px; }
.nav-job .nav-actions .btn { width: auto; flex: 1; min-height: 42px; margin-top: 0; }
.maps-out { display: inline-block; margin-top: 10px; color: #162f65; font-weight: 700; font-size: 14px; }
.gmap-box { grid-column: 1 / -1; margin-top: 6px; }
.gmap-preview { width: 100%; height: 300px; border: 0; border-radius: 16px; background: #e8eee9; display: block; }

.job-lead { margin: -6px 0 18px; color: #5c6f63; line-height: 1.45; }
.job-create { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.job-step { background: #f4f8f5; border-radius: 16px; padding: 16px 16px 4px; }
.job-kicker { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #3d6b4f; }
.job-hint { margin: -2px 0 12px; color: #5c6f63; font-size: 13px; line-height: 1.4; }
.job-create label { display: block; font-size: 13px; font-weight: 700; color: #355044; margin-bottom: 12px; }
.job-create input:not([type="radio"]),
.job-create select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d7e3da;
  border-radius: 12px;
  padding: 12px;
  min-height: 46px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}
.job-create input[readonly] { background: #f4f8f5; color: #244232; }
.job-create input:focus, .job-create select:focus {
  outline: none;
  border-color: #8fa5d4;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.kind-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.kind-pills label { position: relative; margin: 0; font-weight: 700; cursor: pointer; }
.kind-pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind-pills span {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d5e0d8;
  color: #244232;
}
.kind-pills input:focus-visible + span { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
.kind-pills input:checked + span { background: #2563eb; border-color: #2563eb; color: #fff; }
.job-address { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 12px; }
.job-create .job-step > select { margin: 0 0 12px; }
.job-create .gmap-preview { height: 220px; margin-bottom: 12px; }
.job-create .gmap-box:not(:has(iframe[src*="google"])) { display: none; }
.job-more { border: 1px solid #e3ebe5; border-radius: 16px; padding: 14px 16px 6px; background: #fff; }
.job-more summary { cursor: pointer; font-weight: 700; color: #244232; margin-bottom: 8px; }
.job-more-grid, #job-questions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
#job-questions { background: #fff; border: 1px solid #e3ebe5; border-radius: 16px; padding: 16px 16px 4px; }
#job-questions:empty { display: none; }
#job-questions h3 { grid-column: 1 / -1; margin: 0 0 12px; font-size: 16px; color: #244232; }
.job-create .btn { width: 100%; max-width: 280px; min-height: 48px; }
.todo-add { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.todo-add input { flex: 1; border: 0; border-bottom: 1px solid #d7e3da; border-radius: 0; padding: 14px 4px; font: inherit; font-size: 18px; background: transparent; }
.todo-add input:focus { outline: none; border-color: #2563eb; }
.todo-add .btn { width: auto; min-width: 140px; }
.todo-row { display: grid; grid-template-columns: 16px 22px minmax(0, 1fr) 36px; gap: 4px 10px; align-items: center; padding: 12px 2px; border-bottom: 1px solid #e7eee9; }
.todo-row.over { background: #f3f5fa; }
.todo-row.dragging { opacity: 0.45; }
.todo-row[draggable="true"] { cursor: grab; }
.todo-check { width: 22px; height: 22px; min-height: 22px; border-radius: 50%; border: 2px solid #2563eb; background: #fff; padding: 0; cursor: pointer; flex: 0 0 auto; }
.todo-row.off .todo-check { background: #2563eb; box-shadow: inset 0 0 0 3px #fff; }
.todo-copy { min-width: 0; }
.todo-title { display: block; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.todo-row.off .todo-title { color: #8aa094; text-decoration: line-through; }
.todo-meta { display: block; margin-top: 2px; color: #6b7c72; font-size: 13px; overflow-wrap: anywhere; }
.todo-move, .todo-x { width: 36px; height: 36px; min-height: 36px; border: 0; border-radius: 8px; background: #f4f8f5; font-weight: 700; cursor: pointer; padding: 0; }
.todo-move:disabled { opacity: 0.35; cursor: default; }
.todo-x { background: transparent; color: #9aa89f; font-size: 20px; }
.todo-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.todo-actions .btn { width: auto; min-height: 32px; padding: 5px 12px; font-size: 12px; }
.todo-actions .todo-owner { flex: 0 1 170px; }
.todo-actions .todo-move { width: 32px; height: 32px; min-height: 32px; font-size: 14px; }
.todo-done-label { margin: 22px 0 6px; color: #6b7c72; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.crew-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.crew-picks label { display: flex; align-items: center; gap: 8px; width: auto; margin: 0; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid #d5e0d8; }
.job-create .crew-picks input, #assign-crew .crew-picks input { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
.crew-times { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr; gap: 12px; }
.crew-line { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e5ebe7; }
.crew-line button { border: 0; background: transparent; color: #9a3412; font-weight: 700; cursor: pointer; }
#assign-crew .job-step { background: transparent; padding: 0; }
@media (max-width: 720px) {
  .crew-times { grid-template-columns: 1fr; }
}
.card-file { cursor: pointer; }
.dialog.file-dialog, .dialog.work-dialog { width: min(100%, 420px); text-align: left; max-height: calc(100% - 8px); overflow: auto; }
.dialog.work-dialog h2, .warn-list { color: #9a3412; }
.warn-list { margin: 0 0 16px; padding-left: 18px; text-align: left; }
.warn-list li { margin: 8px 0; font-weight: 700; }
.file-dialog h3, .job-file h2 { margin: 18px 0 8px; }
.job-file textarea, .hint-add input {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d7e3da;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}
.job-file textarea { min-height: 140px; resize: vertical; }
.hint-list { list-style: none; margin: 0 0 14px; padding: 0; }
.hint-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e5ebe7; }
.hint-row button { border: 0; background: transparent; color: #9a3412; font-weight: 700; cursor: pointer; }
.hint-add { display: flex; gap: 10px; align-items: end; }
.hint-add input { flex: 1; margin-top: 0; }
.hint-add .btn { width: auto; min-width: 160px; }
@media (max-width: 720px) {
  .job-address, .job-more-grid, #job-questions { grid-template-columns: 1fr; }
}
.job-info { white-space: pre-wrap; line-height: 1.55; font-size: 16px; color: #1c2b24; margin: 0 0 8px; }
.customer-open { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; margin: 0 0 12px; padding: 14px; border: 1px solid #d7e3da; border-radius: 14px; background: #f7fbf8; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.customer-open b { font-size: 17px; }
.customer-open span { color: #4b5c53; font-size: 14px; }
.customer-more { color: #2563eb; font-weight: 700; }
.akte-back { border: 0; background: transparent; color: #2563eb; font: inherit; font-weight: 700; padding: 0 0 8px; cursor: pointer; }
.akte-job, .akte-day { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #e7eee9; background: transparent; padding: 12px 0; font: inherit; color: inherit; }
.akte-job { cursor: pointer; }
.akte-job b, .akte-day b { display: block; font-size: 15px; }
.akte-job span, .akte-day span { display: block; margin-top: 3px; color: #6b7c72; font-size: 14px; }
.job-km { display: block; margin-top: 4px; color: #3f5c4c; font-size: 13px; font-weight: 700; }
.skill-block { flex: 1 1 100%; }
.skill-block > span { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #6b7280; }
.skill-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-picks label { display: flex; align-items: center; gap: 8px; width: auto; margin: 0; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid #d5e0d8; font-size: 14px; font-weight: 600; color: #244232; }
.skill-picks input { width: auto; min-height: 0; margin: 0; }
.product-box { margin: 0 0 14px; }
.product-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.product-picks .btn { width: auto; }
.crew-picks label { flex-wrap: wrap; }
.crew-picks small { flex: 1 1 100%; display: block; color: #3f5c4c; font-size: 12px; font-weight: 600; }
.job-row-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.job-row-actions .linkish { width: auto; margin: 0; padding: 0; color: #162f65; font-weight: 700; background: transparent; border: 0; cursor: pointer; font: inherit; }
.desk-head .btn-small { width: auto; margin-top: 12px; }
.job-create { max-width: none; gap: 0; }
.job-sheet { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; max-width: 1040px; }
.job-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.job-create .job-step { background: #fff; border: 1px solid #e6e8ec; border-radius: 14px; padding: 18px 18px 8px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.job-step-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.job-num { width: 28px; height: 28px; border-radius: 50%; background: #eff6ff; color: #1d4ed8; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: 0 0 auto; }
.job-create .job-kicker { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; color: #1c2b24; }
.job-label { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #6b7280; }
.job-create label { font-size: 12px; font-weight: 650; color: #667085; }
.job-create input:not([type="radio"]):not([type="checkbox"]),
.job-create select { border-radius: 8px; border-color: #d0d5dd; min-height: 42px; padding: 10px 12px; font-size: 15px; }
.job-create .kind-pills { background: #f4f6f5; padding: 4px; border-radius: 12px; gap: 4px; }
.job-create .kind-pills span { border: 0; background: transparent; border-radius: 9px; padding: 8px 12px; }
.job-create .kind-pills input:checked + span { background: #fff; color: #1d4ed8; border-color: transparent; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.job-side { position: sticky; top: 16px; }
.job-preview { background: #fff; border: 1px solid #e6e8ec; border-radius: 14px; padding: 18px; box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06); }
.job-preview h3 { margin: 0 0 16px; font-size: 22px; letter-spacing: -0.03em; }
.job-preview dl { margin: 0 0 16px; }
.job-preview dt { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #98a2b3; }
.job-preview dd { margin: 2px 0 12px; font-weight: 650; color: #1c2b24; }
.job-preview .btn { width: 100%; max-width: none; min-height: 46px; }
#assign-crew .job-step { background: transparent; border: 0; box-shadow: none; padding: 0; }
@media (max-width: 980px) {
  .job-sheet { grid-template-columns: 1fr; }
  .job-side { position: static; }
}
.todo-add { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.todo-add input { flex: 1; border: 0; border-bottom: 1px solid #d7e3da; border-radius: 0; padding: 14px 4px; font: inherit; font-size: 18px; background: transparent; }
.todo-add input:focus { outline: none; border-color: #2563eb; }
.todo-add .btn { width: auto; min-width: 140px; }
.todo-row { display: grid; grid-template-columns: 16px 22px minmax(0, 1fr) 36px; gap: 4px 10px; align-items: center; padding: 12px 2px; border-bottom: 1px solid #e7eee9; }
.todo-row.over { background: #f3f5fa; }
.todo-row.dragging { opacity: 0.45; }
.todo-row[draggable="true"] { cursor: grab; }
.todo-check { width: 22px; height: 22px; min-height: 22px; border-radius: 50%; border: 2px solid #2563eb; background: #fff; padding: 0; cursor: pointer; flex: 0 0 auto; }
.todo-row.off .todo-check { background: #2563eb; box-shadow: inset 0 0 0 3px #fff; }
.todo-copy { min-width: 0; }
.todo-title { display: block; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.todo-row.off .todo-title { color: #8aa094; text-decoration: line-through; }
.todo-meta { display: block; margin-top: 2px; color: #6b7c72; font-size: 13px; overflow-wrap: anywhere; }
.todo-move, .todo-x { width: 36px; height: 36px; min-height: 36px; border: 0; border-radius: 8px; background: #f4f8f5; font-weight: 700; cursor: pointer; padding: 0; }
.todo-move:disabled { opacity: 0.35; cursor: default; }
.todo-x { background: transparent; color: #9aa89f; font-size: 20px; }
.todo-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.todo-actions .btn { width: auto; min-height: 32px; padding: 5px 12px; font-size: 12px; }
.todo-actions .todo-owner { flex: 0 1 170px; }
.todo-actions .todo-move { width: 32px; height: 32px; min-height: 32px; font-size: 14px; }
.todo-done-label { margin: 22px 0 6px; color: #6b7c72; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

.job-create textarea { width: 100%; border-radius: 8px; border: 1px solid #d0d5dd; min-height: 110px; padding: 10px 12px; font: inherit; font-size: 15px; resize: vertical; }
.pick-list { margin: 4px 0 12px; border: 1px solid #e6e8ec; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08); overflow: hidden; }
.pick-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f2f4f7; background: #fff; padding: 10px 12px; cursor: pointer; font: inherit; }
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover, .pick-row:focus { background: #f4f6fb; }
.pick-row b { font-size: 14px; color: #1c2b24; }
.pick-row span, .pick-chip span, .pick-chip small { color: #667085; font-size: 12px; font-weight: 500; }
.pick-empty, .pick-muted { margin: 0; padding: 10px 12px; color: #98a2b3; font-size: 13px; }
.pick-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 8px 8px 0; padding: 6px 8px 6px 12px; border-radius: 999px; background: #f4f6f5; border: 1px solid #e6e8ec; font-size: 14px; }
.pick-chip b { font-weight: 700; }
.pick-chip button { border: 0; background: transparent; color: #667085; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; }
.crew-picks.is-offscreen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.job-preview dd { white-space: pre-wrap; }

.hist-card { cursor: pointer; }
.hist-when { margin: 0 0 6px; text-align: left; }
.hist-line { margin: 2px 0; font-size: 14px; text-align: left; }
.hist-what { margin: 8px 0 0; color: #3d4a43; font-size: 14px; text-align: left; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hist-news { margin-top: 8px; }
.hist-news summary { font-weight: 700; cursor: pointer; }
.hist-news .news-kind { margin-top: 12px; }

#team-save:disabled { opacity: 0.45; cursor: default; }

.user-search { width: 100%; margin: 0 0 14px; border: 1px solid #d0d5dd; border-radius: 8px; min-height: 42px; padding: 10px 12px; font: inherit; font-size: 15px; background: #fff; }
.user-card { border: 1px solid #e6e8ec; border-radius: 14px; padding: 14px 16px; margin: 0 0 10px; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.user-card.off { opacity: 0.62; }
.user-main { display: flex; align-items: center; gap: 12px; }
.user-copy { min-width: 0; }
.user-copy b { display: block; font-size: 16px; }
.user-copy span { color: #667085; font-size: 13px; }
.user-tags { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.user-tags span { padding: 4px 8px; border-radius: 999px; background: #f4f6f5; color: #667085; font-size: 12px; font-weight: 700; }
.user-tags .tag-yes { background: #eff6ff; color: #1d4ed8; }
.user-more { margin-top: 12px; }
.user-more summary { cursor: pointer; font-weight: 700; color: #1c2b24; }
.user-edit { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; align-items: end; }
.user-edit .staff-field { max-width: none; flex: 1 1 160px; }
.user-edit input, .user-edit select { width: 100%; border: 1px solid #d0d5dd; border-radius: 8px; min-height: 40px; padding: 8px 10px; font: inherit; background: #fff; }
.user-edit .staff-actions { display: flex; gap: 8px; align-items: center; }
.user-edit .staff-actions .btn, .user-edit .btn-small { width: auto; }
.job-create input[type="file"] { border: 0; min-height: 0; padding: 6px 0; background: transparent; box-shadow: none; }
.job-create .skill-picks label { display: flex; width: auto; margin: 0; }
@media (max-width: 720px) {
  .user-main { align-items: flex-start; }
  .user-tags { margin-left: 0; justify-content: flex-start; }
}

.present-list { margin: 8px 0 16px; }
.present-row { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 2px; border-bottom: 1px solid #e7eee9; font-size: 18px; cursor: pointer; }
.present-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.present-box { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #2563eb; display: grid; place-items: center; flex: 0 0 auto; background: #fff; }
.present-row input:checked + .present-box { background: #2563eb; }
.present-row input:checked + .present-box::after { content: ""; width: 7px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); margin-top: -3px; }
.present-row b { font-weight: 700; }

.q-form { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.q-follow { margin: 0 0 8px 16px; padding-left: 12px; border-left: 2px solid #eff6ff; }
.q-follow[hidden] { display: none; }

.tabs.tabs-clean { grid-template-columns: 1fr 72px 1fr; }
.tabs.tabs-clean button span { line-height: 1.1; text-align: center; white-space: nowrap; }

.customer-import { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e7eee9; }
.customer-import h3 { margin: 0 0 8px; font-size: 16px; }
.customer-import input[type="file"] { display: block; margin: 10px 0; }
.customer-import .btn { width: auto; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 14px; }
.photo-grid h3 { margin: 0 0 8px; font-size: 15px; }
.job-shot { position: relative; margin: 0 0 10px; }
.job-shot img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; display: block; background: #e8eee9; }
.job-shot button { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
@media (max-width: 720px) { .photo-grid { grid-template-columns: 1fr; } }


.konto-list { display: grid; gap: 12px; margin-top: 14px; }
.konto-card {
  display: block; width: 100%; text-align: left; border: 1px solid #d7e0d9;
  background: #f7faf7; border-radius: 16px; padding: 14px 16px; cursor: pointer;
  color: inherit; font: inherit;
}
.konto-card:hover { border-color: #9bb59f; background: #fff; }
.konto-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.konto-top b { font-size: 16px; }
.konto-saldo { font-weight: 700; font-size: 14px; }
.konto-saldo.plus { color: #1f376b; }
.konto-saldo.minus { color: #9f1239; }
.konto-bar { height: 10px; border-radius: 999px; background: #e4ebe5; overflow: hidden; margin-bottom: 12px; }
.konto-bar i { display: block; height: 100%; background: #2f426b; border-radius: inherit; }
.konto-bar.over i { background: #b45309; }
.konto-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.konto-grid span { display: grid; gap: 2px; }
.konto-grid small { color: #5f6f63; font-size: 12px; }
.konto-grid b { font-size: 14px; }
@media (max-width: 720px) {
  .konto-grid { grid-template-columns: 1fr 1fr; }
}


/* Teams, Zuordnung, Qualifikationen */
.skill-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  display: inline-flex; align-items: center; margin: 0; padding: 0; cursor: pointer;
  border-radius: 999px; border: 1px solid #d5e0d8; background: #fff; color: #244232;
  font-size: 13px; font-weight: 700; transition: background .15s, border-color .15s, color .15s;
}
.skill-chip input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.skill-chip span { display: block; padding: 8px 12px; }
.skill-chip.on { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; }
.skill-row { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin: 8px 0 0; }
.skill-row.tight { margin: 6px 0 0; }
.skill-badge {
  display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px;
  background: #eef6f0; color: #2f5d40; font-size: 12px; font-weight: 700;
}
.skill-badge.more { background: #f4f6f5; color: #667085; }
.skill-empty { color: #8aa094; font-size: 12px; font-weight: 600; }

.face, .face-more {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
  background: #d7e0da; color: #244232; font-size: 14px; font-weight: 800; overflow: hidden; flex: 0 0 auto;
}
.face.has { background: #d7e0da; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face-sm { width: 28px; height: 28px; font-size: 12px; }
.face-xs { width: 22px; height: 22px; font-size: 11px; }
.face-more { background: #eef2ef; color: #5f6f63; font-size: 12px; }

.pick-chip.face-chip { padding-left: 6px; }
.pick-chip.face-chip .face { margin-right: 2px; }

.crew-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid #e7eee9; list-style: none;
}
.crew-copy { flex: 1; min-width: 0; }
.crew-copy b { display: block; font-size: 15px; }
.crew-copy > span { display: block; margin-top: 2px; color: #6b7c72; font-size: 13px; }
.crew-drop {
  border: 0; background: transparent; color: #9a3412; font: inherit; font-weight: 700;
  cursor: pointer; padding: 4px 0; flex: 0 0 auto;
}
.crew-empty { list-style: none; color: #6b7c72; padding: 8px 0; }
.hint-list { list-style: none; }

.team-quick { margin: 0 0 14px; }
.team-quick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.team-pill {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border: 1px solid #d5e0d8; background: #fff; border-radius: 14px; padding: 10px 12px;
  cursor: pointer; font: inherit; color: inherit; text-align: left;
}
.team-pill:hover { border-color: #2563eb; background: #f7fbf8; }
.team-pill b { font-size: 14px; }
.team-pill span { color: #6b7c72; font-size: 12px; font-weight: 600; }

.teams-layout {
  display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 18px; align-items: start;
}
.team-form label { display: block; margin: 0 0 12px; font-size: 12px; font-weight: 700; color: #6b7280; }
.team-form input[type="text"], .team-form input[type="search"], .team-form input:not([type]) {
  display: block; width: 100%; margin-top: 6px; border: 1px solid #d7e3da; border-radius: 12px;
  padding: 12px; font: inherit; font-size: 16px; background: #fff; color: #1c2b24; font-weight: 500;
}
.team-picks { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; max-height: 420px; overflow: auto; padding-right: 4px; }
.team-person {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px;
  border: 1px solid #e6e8ec; border-radius: 16px; background: #fff; cursor: pointer; min-width: 0;
}
.team-person input { flex: 0 0 auto; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; }
.team-person .face { flex: 0 0 auto; }
.team-person.on { border-color: #2563eb; background: #f3f5fa; box-shadow: inset 0 0 0 1px #2563eb; }
.team-person-copy { flex: 1; min-width: 0; }
.team-person-copy b { display: block; font-size: 15px; color: #1c2b24; overflow-wrap: anywhere; }
.team-person-copy em { display: inline-block; margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.team-person-copy em.ok { background: #eff6ff; color: #1d4ed8; }
.team-person-copy em.off { background: #f4f6f5; color: #8aa094; }
.team-rule { margin: 0 0 14px; color: #9a3412; font-size: 13px; font-weight: 700; }
.team-rule.team-ok { color: #1d4ed8; }
.team-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 48px; margin: 0 0 14px; padding: 10px 12px; border: 1px dashed #cfe0d5; border-radius: 14px; background: #f8fbf9; }
.team-picked-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 4px; border-radius: 999px; background: #fff; border: 1px solid #d7e3da; font-size: 13px; }
.team-picked-chip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-picked-chip em { font-style: normal; color: #1d4ed8; background: #eff6ff; padding: 2px 6px; border-radius: 999px; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.team-picked-chip button { border: 0; background: transparent; color: #667085; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; flex: 0 0 auto; }
.team-title { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 170px; min-width: 0; }
.team-title > div { min-width: 0; }
.team-rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: #eef4f0; color: #3c5a49; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.team-move-group { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.team-move { width: 30px; height: 30px; border: 1px solid #d7e3da; background: #fff; border-radius: 8px; font-size: 14px; font-weight: 800; color: #3c5a49; cursor: pointer; line-height: 1; padding: 0; }
.team-move:hover:not(:disabled) { border-color: #2563eb; color: #1d4ed8; }
.team-move:disabled { opacity: .35; cursor: default; }
.team-form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.team-form-actions .btn { width: auto; margin-top: 0; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.team-card {
  display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-width: 0; padding: 16px;
  border: 1px solid #e6e8ec; border-radius: 18px; background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.04); overflow-wrap: anywhere;
}
.team-card-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 12px; align-items: flex-start; min-width: 0; }
.team-card h3 { margin: 0 0 4px; font-size: 17px; }
.team-card p { margin: 0; color: #667085; font-size: 13px; }
.team-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: 0 1 auto; min-width: 0; }
.team-actions .btn { width: auto; margin: 0; }
.team-faces { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.team-member-list { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.team-member-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 8px 4px 4px;
  border-radius: 999px; background: #f4f6f5; font-size: 12px; font-weight: 700;
}
.team-member-chip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-member-chip em { font-style: normal; color: #1d4ed8; background: #eff6ff; padding: 2px 6px; border-radius: 999px; font-size: 11px; flex: 0 0 auto; }

.user-card .skill-row { margin-top: 10px; }
.teams-layout > .panel { min-width: 0; }
@media (max-width: 960px) {
  .teams-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .team-picks { max-height: none; overflow: visible; padding-right: 0; }
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .team-card { padding: 14px; }
  .team-actions { width: 100%; justify-content: flex-start; }
}


/* Blockzeiten */
.g-event.g-block {
  background: #d8dde3 !important;
  color: #3f4650 !important;
  border: 1px dashed #9aa3ad;
  box-shadow: none;
  z-index: 1;
}
.g-event.g-block b, .g-event.g-block span { color: #3f4650 !important; }
.g-event.g-block.layered { opacity: 0.92; }
.gcal-block-btn { background: #eef1f4 !important; color: #3f4650 !important; }
.block-pop { border-left: 4px solid #9aa3ad; }
.block-kicker {
  margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: #6b7280;
}
.block-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.block-row {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left;
  border: 1px solid #e6e8ec; background: #fff; border-radius: 12px; padding: 10px;
  cursor: pointer; font: inherit; color: inherit;
}
.block-row:hover { border-color: #9aa3ad; }
.block-swatch { width: 10px; height: 10px; margin-top: 5px; border-radius: 2px; background: #c5ccd4; flex: 0 0 auto; }
.block-row b { display: block; font-size: 13px; }
.block-row small { display: block; margin-top: 2px; color: #667085; font-size: 12px; }
.user-block-box { margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid #e7eee9; }
.user-blocks { list-style: none; margin: 0 0 8px; padding: 0; }
.user-blocks li { padding: 6px 0; border-bottom: 1px solid #eef2ef; }
.user-blocks b { display: block; font-size: 13px; }
.user-blocks span { color: #667085; font-size: 12px; }
#block-board { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e7eee9; }
#block-board h2 { margin: 0 0 6px; font-size: 15px; }


/* Admin Erfassen Home */
.home-head { margin-bottom: 4px; }
.home-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 28px 16px;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 8px 0 12px;
  background: linear-gradient(#f5f7f6 75%, rgba(245,247,246,0));
}
.home-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  border: 1px solid #d7e3da;
  background: #fff;
  border-radius: 16px;
  padding: 14px 14px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-height: 78px;
  -webkit-tap-highlight-color: transparent;
}
.home-tile b { font-size: 15px; font-weight: 800; color: #1c2b24; line-height: 1.2; }
.home-tile span { font-size: 12px; font-weight: 600; color: #6b7c72; line-height: 1.3; }
.home-tile.on {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb inset;
}
.home-tile.on b { color: #1d4ed8; }
.home-tile:active { transform: scale(0.99); }
.home-panel { scroll-margin-top: 64px; }
.home-panel[hidden] { display: none !important; }
.home-panel .job-sheet { grid-template-columns: 1fr; }
.home-panel .job-side { display: none; }
.home-customer-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.home-customer-form label:last-child,
.home-customer-form .file-note { grid-column: 1 / -1; }
.home-times-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.home-times-head h2 { margin: 0; }
.home-times { display: grid; gap: 10px; }
.home-time-card {
  border: 1px solid #e6e8ec; border-radius: 16px; padding: 12px 14px; background: #fff;
}
.home-time-card.live { border-color: #2563eb; background: #f3f5fa; }
.home-time-top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.home-time-top b { display: block; font-size: 15px; }
.home-time-top span { color: #667085; font-size: 13px; font-weight: 600; }
.home-time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.home-time-grid small { display: block; color: #6b7c72; font-size: 11px; font-weight: 700; }
.home-time-grid b { font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .home-tiles {
    grid-template-columns: 1fr;
    margin: 0 14px 12px;
    gap: 8px;
    position: sticky;
    top: 0;
  }
  .home-tile { min-height: 64px; padding: 14px 16px; }
  .home-tile b { font-size: 16px; }
  .home-tile span { font-size: 13px; }
  .home-customer-form { grid-template-columns: 1fr; }
  .home-panel .job-preview { position: static; }
  .desk-main > .home-tiles { margin-left: 14px; margin-right: 14px; }
}


/* Phone Arbeitskonto */
.konto-main { padding-bottom: 24px; }
.konto-hero { margin-bottom: 8px; }
.konto-summary { margin-bottom: 8px; }
.konto-job {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 14px 16px; margin: 0 0 8px; border-radius: 16px; background: #fff;
  border: 1px solid #e6e8ec;
}
.konto-job b { display: block; font-size: 15px; }
.konto-job span { display: block; margin-top: 2px; color: #6b7c72; font-size: 13px; }
.konto-job-times { text-align: right; font-size: 12px; font-weight: 700; color: #3f5c4c; }
.konto-job-times span { display: block; margin-top: 4px; color: #3f5c4c; }
.more-dim {
  position: absolute;
  inset: 0;
  z-index: 55;
  background: rgba(21, 36, 28, 0.28);
}
.more-sheet {
  position: absolute;
  right: 10px;
  bottom: calc(var(--tab) + var(--safe-b) + 10px);
  z-index: 56;
  width: min(260px, calc(100% - 20px));
  padding: 8px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e6e8ec;
  box-shadow: 0 16px 40px rgba(16, 36, 24, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: more-pop 0.16s ease-out;
}
@keyframes more-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.more-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 14px;
  padding: 12px 12px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.more-sheet-item:active { background: #eef6f0; }
.more-sheet-item b { display: block; font-size: 15px; font-weight: 750; }
.more-sheet-item small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: #6b7c72; }
.more-sheet-ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  display: grid;
  place-items: center;
}
.more-sheet-ico .ico, .more-sheet-ico svg { width: 20px; height: 20px; }
.more-sheet-item-soft .more-sheet-ico { background: #f3f5f4; color: #5d7468; }


/* Phone Nachrichten */
.news-main { padding-bottom: 28px; }
.news-hero { padding-bottom: 10px; }
.news-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.news-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  width: 100%; text-align: left; border: 1px solid #d7e3da; background: #fff;
  border-radius: 18px; padding: 16px 16px; font: inherit; color: inherit; cursor: pointer;
  min-height: 72px;
}
.news-tile b { font-size: 16px; }
.news-tile span { color: #6b7c72; font-size: 13px; font-weight: 600; line-height: 1.3; }
.news-tile:active { transform: scale(0.99); }
.news-tile-main {
  background: #eff6ff; border-color: #2563eb; min-height: 92px; padding: 18px 18px;
}
.news-tile-main b { font-size: 19px; color: #1d4ed8; }
.news-tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.news-feed { display: flex; flex-direction: column; gap: 12px; }
.news-card {
  background: #fff; border: 1px solid #e6e8ec; border-radius: 18px; padding: 16px;
}
.news-card.new { border-color: #2563eb; background: #f3f5fa; }
.news-card.empty { color: #6b7c72; }
.news-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.news-card-top b { font-size: 16px; line-height: 1.25; }
.news-card p { margin: 0 0 8px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.news-card small { color: #8aa094; font-size: 12px; font-weight: 600; }
.news-meta, .news-reply { color: #3f5c4c; font-size: 14px !important; }
.news-reply { padding: 10px 12px; border-radius: 12px; background: #eef6f0; }
.news-pill {
  flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; background: #f4f6f5;
  color: #5f6f63; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
}
.news-pill.status-offen { background: #fff4d6; color: #92400e; }
.news-pill.status-bestellt { background: #e0edff; color: #1d4ed8; }
.news-pill.status-angekommen { background: #eff6ff; color: #1d4ed8; }
.news-pill.status-erledigt { background: #eef2ef; color: #667085; }
.news-card-btn { width: 100%; margin-top: 12px; }
.dialog.news-dialog {
  width: min(100%, 440px); max-height: calc(100% - 12px); text-align: left;
  padding: 20px 18px 18px;
}
.news-form h2 { margin: 0 0 6px; font-size: 22px; }
.news-form-lead { margin: 0 0 16px; color: #6b7c72; font-size: 14px; line-height: 1.4; }
.news-form label {
  display: block; margin: 0 0 12px; font-size: 12px; font-weight: 700; color: #6b7280;
}
.news-form input, .news-form textarea {
  display: block; width: 100%; margin-top: 6px; border: 1px solid #d7e3da; border-radius: 14px;
  padding: 14px 14px; font: inherit; font-size: 16px; background: #fff; color: #1c2b24; font-weight: 500;
}
.news-form textarea { min-height: 120px; resize: vertical; }
.news-form .btn { width: 100%; margin-top: 8px; min-height: 48px; }
.news-form .login-error { min-height: 20px; margin: 4px 0 8px; text-align: left; }
@media (max-width: 420px) {
  .news-tile-grid { grid-template-columns: 1fr; }
}


/* ==========================================================
   Layout-Polish: Abstände, Übergänge, ruhigere Flächen
   ========================================================== */
:root {
  --ease: cubic-bezier(.2, .7, .3, 1);
  --t-fast: .15s;
  --ring: 0 0 0 3px rgba(37, 99, 235, .16);
}

html { scroll-behavior: smooth; }

button, .btn, .tabs button, .side-nav button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Fehlende Seitenränder: Zeiten-Umschalter und Teams-Raster */
.desk-main > .view-switch,
.desk-main > .teams-layout,
.desk-main > .ai-layout { margin-left: 36px; margin-right: 36px; }
@media (max-width: 899px) {
  .desk-main > .view-switch,
  .desk-main > .teams-layout,
  .desk-main > .ai-layout { margin-left: 14px; margin-right: 14px; }
}

/* Übergänge */
.btn, .tabs button, .side-nav button, .nav-toggle, .home-tile, .team-pill,
.team-person, .team-move, .bill-tabs button, .view-switch button, .gcal-today,
.gcal-chev, .cal-move, .cal-back, .switch, .day, .g-chip, .cal-cell {
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease,
    color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform .12s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }

@media (hover: hover) {
  .btn-green:hover { background: #153f9a; box-shadow: 0 6px 18px -10px rgba(29, 78, 216, .65); }
  .btn-ghost:hover { border-color: #8fa5d4; color: var(--green-dark); background: #f7fbf8; }
  .btn-red:hover { background: #ffecec; border-color: #f3b6b6; }
  .side-nav button:hover { transform: translateX(2px); }
  .home-tile:hover { border-color: #8fa5d4; box-shadow: 0 10px 24px -18px rgba(16, 36, 24, .5); }
  .team-card:hover { box-shadow: 0 12px 30px -22px rgba(16, 36, 24, .55); }
  .team-person:hover { border-color: #b9c6e3; }
}

/* Eingabefelder ruhiger fokussieren */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, background-color var(--t-fast) ease;
}
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
  border-color: #8fa5d4;
  box-shadow: var(--ring);
}

/* Tabellen */
tbody tr { transition: background-color .12s ease; }
tbody tr:hover td { background: #f7faf8; }

/* Seite wechselt weich */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.desk-main.page-in, .main.screen-in { animation: pageIn .26s var(--ease) both; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal:not([hidden]) { animation: pageIn .16s ease both; }
.modal:not([hidden]) .dialog { animation: modalIn .18s var(--ease) both; }

/* Navigation und Kopfzeile */
.desk-head { border-bottom-color: #e2eae4; box-shadow: 0 12px 26px -24px rgba(16, 36, 24, .55); }
.desk-head .eyebrow { color: var(--muted); }
.side-nav button { min-height: 42px; }
.side-nav button.active { box-shadow: inset 3px 0 0 var(--green); }
.side-user button { transition: color var(--t-fast) ease; }
.tabs button.active { background: rgba(37, 99, 235, .1); }

/* Desktop: feste Sidebar, Inhalt scrollt für sich */
@media (min-width: 900px) {
  .desk { height: 100dvh; }
  .desk-main { min-height: 0; overscroll-behavior: contain; }
  .side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
  .home-tiles { top: 77px; }
}

/* Schmale, dezente Scrollbalken */
.desk-main, .main, .bill-table-wrap, .team-picks, .g-scroll, .g-board, .side {
  scrollbar-width: thin;
  scrollbar-color: #c4d2c8 transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #c7d4ca; border-radius: 999px;
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #aebfb4; background-clip: content-box; }

/* Ultrawide: Inhalt bleibt lesbar zentriert */
@media (min-width: 1800px) {
  .desk-main > .desk-stats,
  .desk-main > .desk-grid,
  .desk-main > .panel,
  .desk-main > .cal-note,
  .desk-main > .bill-tabs,
  .desk-main > .bill-editor,
  .desk-main > .bill-settings,
  .desk-main > .teams-layout,
  .desk-main > .ai-layout,
  .desk-main > .view-switch {
    max-width: 1520px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* KI-Werkstatt */
.ai-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 18px; align-items: start; }

.ai-chat-panel {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  min-width: 0;
}
.ai-chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(#fbfdfb, #f3f8f5);
}
.ai-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ai-status i { width: 9px; height: 9px; border-radius: 50%; background: #c3ccc6; }
.ai-status.on { color: var(--green-dark); }
.ai-status.on i { background: var(--green); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.ai-mode {
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: #eef2ef; color: #5d7468; white-space: nowrap;
}
.ai-mode.on { background: var(--green-soft); color: var(--green-dark); }

.ai-log {
  flex: 1; min-height: 340px; max-height: min(56vh, 640px); overflow-y: auto;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
  background: #fcfdfc; scroll-behavior: smooth;
}
.ai-msg {
  max-width: min(100%, 760px); padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1px solid #e4ebe6; box-shadow: 0 1px 2px rgba(16, 36, 24, .04);
}
.ai-msg.ai-user { align-self: flex-end; background: #e9edf6; border-color: #c9d2e6; }
.ai-msg.ai-bot { align-self: flex-start; }
.ai-who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ai-who b { color: var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.ai-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.55; color: #22332a; }

.ai-tool {
  align-self: flex-start; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  max-width: 100%; padding: 7px 10px; border-radius: 10px;
  background: #f2f7f4; border: 1px dashed #cfe0d6; font-size: 12px; color: #4b6b59;
}
.ai-tool span { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--green-dark); }
.ai-tool code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #33463b; overflow-wrap: anywhere; }
.ai-tool time { margin-left: auto; color: #7b8f83; }
.ai-tool.bad { background: #fff4f4; border-color: #f2cccc; }
.ai-tool.bad span { color: var(--red-deep); }

.ai-empty { margin: auto; max-width: 480px; padding: 26px 20px; text-align: center; color: var(--muted); }
.ai-empty b { display: block; margin-bottom: 10px; color: var(--ink); font-size: 17px; }
.ai-empty ol { display: grid; gap: 6px; margin: 0 0 12px; padding-left: 20px; text-align: left; font-size: 14px; }
.ai-empty p { margin: 0; font-size: 14px; }

.ai-error { margin: 0; padding: 10px 20px; font-size: 14px; color: var(--red-deep); background: #fff4f4; border-top: 1px solid #f3d4d4; }
.ai-busy { padding: 10px 20px; font-size: 13px; font-weight: 700; color: var(--green-dark); background: #f1f4fa; border-top: 1px solid #d5dcec; }
.ai-busy::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px;
  border-radius: 50%; border: 2px solid #bfcae3; border-top-color: var(--green);
  animation: aiSpin .8s linear infinite; vertical-align: -1px;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }

.ai-compose { padding: 14px 16px 16px; border-top: 1px solid var(--line); background: #fff; }
.ai-compose textarea {
  width: 100%; min-height: 72px; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fbfdfb; font: inherit; font-size: 15px; resize: vertical;
}
.ai-compose textarea:disabled { opacity: .7; }
.ai-compose-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.ai-compose-row .btn-green { min-width: 128px; }

.ai-side { min-width: 0; }
.ai-side .panel { margin-bottom: 14px; }
.ai-side .panel h2 { margin-bottom: 14px; }
.ai-conn h2 { margin-bottom: 12px; }
.ai-provider-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.ai-provider-btn {
  display: grid; gap: 1px; text-align: left; padding: 9px 11px; border: 1px solid #e6ebe8;
  border-radius: 12px; background: #fbfdfb; cursor: pointer; font: inherit;
}
.ai-provider-btn b { font-size: 13px; color: var(--ink); }
.ai-provider-btn small { font-size: 11px; color: var(--muted); }
.ai-provider-btn.on { border-color: #8fa5d4; background: #f1f4fa; box-shadow: inset 0 0 0 1px #b9c7e6; }
.ai-provider-btn.on b { color: var(--green-dark); }
.ai-conn-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ai-keyhint { font-size: 12px; font-weight: 600; color: var(--muted); }
.ai-field { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 700; color: #6b7280; }
.ai-connect-form { display: grid; gap: 8px; }
.ai-conn input[type="password"] {
  width: 100%; padding: 11px 12px; border: 1px solid #d7e3da; border-radius: 12px;
  background: #fff; font: inherit; font-size: 15px; font-weight: 500;
}
.ai-conn select {
  width: 100%; margin-bottom: 12px; padding: 11px 12px; border: 1px solid #d7e3da;
  border-radius: 12px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
}
.ai-conn input[type="password"]:focus, .ai-conn select:focus {
  outline: 2px solid rgba(37, 99, 235, .28); outline-offset: 1px; border-color: #8fa5d4;
}
.ai-connect-form .btn { width: 100%; }
.ai-conn-error { margin: 8px 0 0 !important; padding: 9px 11px !important; border: 1px solid #f3d4d4; border-radius: 10px; font-size: 13px; }
.ai-conn .ai-hint { margin: 10px 0 0; }
.ai-rekey { margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef2ef; }
.ai-rekey summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); list-style: none; }
.ai-rekey summary::-webkit-details-marker { display: none; }
.ai-rekey summary::before { content: "▾ "; }
.ai-rekey[open] summary::before { content: "▴ "; }
.ai-rekey form { margin: 10px 0 8px; }
.ai-rekey .btn { width: 100%; }
.ai-rekey #ai-clear-key { color: var(--red-deep); border-color: #f0d3d3; }
.ai-hint { margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
.ai-switch {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 12px;
  border: 1px solid #e6ebe8; border-radius: 12px; background: #fbfdfb; cursor: pointer;
}
.ai-switch input { width: auto; margin-top: 3px; }
.ai-switch span { display: grid; gap: 2px; font-weight: 400; }
.ai-switch b { font-size: 14px; color: var(--ink); }
.ai-switch em { font-style: normal; font-size: 12px; color: var(--muted); }
.ai-config-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.ai-more {
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); box-shadow: var(--shadow);
}
.ai-more summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink); }
.ai-more[open] summary { margin-bottom: 10px; }
.ai-backups { display: grid; gap: 8px; margin-top: 10px; }
.ai-backup {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px; border: 1px solid #e6ebe8; border-radius: 10px; background: #fbfdfb;
}
.ai-backup b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.ai-backup small { display: block; font-size: 11px; color: var(--muted); }
.ai-backup .btn { flex: none; }

@media (max-width: 1099px) {
  .ai-layout { grid-template-columns: 1fr; }
  .ai-layout.ai-need-connect .ai-side { order: -1; }
  .ai-log { min-height: 46vh; max-height: none; }
}
@media (max-width: 899px) {
  .ai-chat-head { padding: 12px 14px; }
  .ai-log { min-height: 44vh; padding: 14px; }
  .ai-compose { padding: 12px; }
  .ai-compose-row { flex-wrap: wrap; }
  .ai-msg p { font-size: 14px; }
}

/* Kalender: Übersicht und Verschieben */
.cal-add { margin: 0 0 12px; }
.cal-add summary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 14px;
  cursor: pointer; list-style: none;
}
.cal-add summary::-webkit-details-marker { display: none; }
.cal-add summary::before { content: "+"; font-size: 17px; line-height: 1; color: var(--green-dark); }
.cal-add[open] summary::before { content: "–"; }
.cal-add summary:hover { border-color: #8fa5d4; color: var(--green-dark); }
.cal-add[open] summary { margin-bottom: 12px; }
.cal-add .login-error { text-align: left; }

.gcal-bar { flex-wrap: wrap; row-gap: 6px; }
.gcal-label { flex: 1; min-width: 160px; }

.g-board .g-day.weekend { background: #fbfbfc; }
.g-board .g-day.weekend.is-today { background: #f2f8f4; }
.g-colhead.weekend span { color: #9aa3ad; }
.g-line-half { border-top-style: dashed; border-top-color: #f3f5f8; }

.g-now {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 2px solid #ea4335; z-index: 5; pointer-events: none;
}
.g-now[hidden] { display: none; }
.g-now i {
  position: absolute; left: -4px; top: -5px;
  width: 8px; height: 8px; border-radius: 50%; background: #ea4335;
}

.g-event {
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  transition: box-shadow .16s ease, opacity .16s ease, transform .08s linear;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch;
}
.g-event b, .g-event span, .g-event small {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g-event b { font-size: 12.5px; line-height: 1.25; }
.g-event span { font-size: 11.5px; line-height: 1.3; }
.g-colhead b { width: 30px; height: 30px; font-size: 16px; }
.g-hour span { font-size: 11.5px; color: #5f6368; }
.g-event small { display: block; font-size: 10px; line-height: 1.2; opacity: .92; margin-top: 1px; }
.g-event:not(.is-compact) b { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.g-event.is-compact { padding: 2px 5px; }
.g-event.is-compact b { font-size: 11px; line-height: 1.2; }
.g-people {
  display: inline-flex; align-items: center; gap: 3px;
  margin: 0 0 2px; line-height: 0; pointer-events: none;
}
.g-people i { width: 8px; height: 8px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .92); }
.g-people .g-who-more { min-width: 13px; height: 13px; line-height: 13px; font-size: 8px; }
.g-people em { font-style: normal; font-size: 10px; font-weight: 600; line-height: 10px; margin-left: 1px; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.g-event.is-compact .g-people { display: none; }
.g-who { display: inline-flex; align-items: center; gap: 2px; margin-right: 4px; vertical-align: middle; }
.g-who i {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9);
}
.g-who i.g-who-more {
  width: auto; min-width: 14px; height: 12px; border-radius: 6px; padding: 0 3px;
  background: rgba(255, 255, 255, .95); color: #1f2937; font-style: normal;
  font-size: 9px; font-weight: 800; line-height: 12px; text-align: center; box-shadow: none;
}
.g-board.can-drag .g-event { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.g-board.can-drag .g-event:hover { box-shadow: 0 4px 12px -2px rgba(15, 23, 42, .24); z-index: 3; }
.g-event.is-dragging {
  cursor: grabbing; opacity: .9; z-index: 30 !important;
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, .38);
  transition: none; pointer-events: none;
}
.g-board.is-moving .g-day { transition: background-color .16s ease; }
.g-day.is-drop, .g-board .g-day.weekend.is-drop { background: rgba(37, 99, 235, .09); }
body.cal-dragging, body.cal-dragging * { cursor: grabbing !important; user-select: none; }

.cal-drag-tip {
  position: fixed; z-index: 400; pointer-events: none;
  padding: 7px 12px; border-radius: 8px;
  background: #111827; color: #fff; font-size: 13px; font-weight: 700;
  white-space: nowrap; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
}
.cal-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 400; padding: 10px 18px; border-radius: 999px;
  background: #142853; color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 14px 30px -12px rgba(15, 23, 42, .5);
}
.cal-toast[hidden] { display: none; }
.cal-toast.bad { background: #b42318; }

/* Kalender: Mitarbeiterleiste unten, Kalender in voller Breite */
.cal-layout { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.cal-layout .g-board { order: 1; }
.cal-layout .cal-list {
  order: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0; padding: 10px 14px;
  border: 1px solid #e6e9ee; border-radius: 14px; background: #fff;
}
.cal-list h2 { margin: 0 10px 0 0; }
.cal-list .cal-toggle {
  margin: 0; padding: 6px 12px; gap: 8px; font-size: 13px;
  border: 1px solid #e3e7ec; border-radius: 999px;
}
.cal-list .cal-toggle:hover { background: #f6f8fa; }
.cal-list .cal-toggle:has(input:checked) { border-color: #b7c5e2; background: #f1f4fa; }
.cal-list .cal-toggle input:checked ~ span { color: #14306c; }
.cal-list .cal-all { margin: 0; padding: 6px 14px; border: 1px solid #e3e7ec; border-radius: 999px; }
.cal-list #workload, .cal-list #block-board { flex: 1 1 100%; margin-top: 4px; }
.cal-list .bar-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 8px;
  margin: 8px 0; align-items: center;
}
.cal-list .bar-row > span { font-size: 12px; font-weight: 600; color: #4b5563; }
.cal-list .bar-row > b { font-size: 12px; text-align: right; white-space: nowrap; }
.cal-list .bar-row > .bar { grid-column: 1 / -1; grid-row: 2; }
.cal-list #workload h3 { margin: 14px 0 4px; font-size: 13px; }
.cal-list .panel { box-shadow: none; border: 1px solid var(--line); }
.g-board .g-event.g-drive { z-index: 1; }
.g-event.g-drive { z-index: 1; }
.g-line-half { border-top-color: #eef1f5; }
@media (max-width: 1100px) {
  .cal-layout { grid-template-columns: 1fr; }
}

/* Rechnung nach Auftragsabschluss */
#flow-modal .dialog.job-invoice-dialog {
  width: min(100%, 1120px);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 26px 26px 20px;
  text-align: left;
  overscroll-behavior: contain;
}
#flow-modal .dialog.job-invoice-dialog.is-done { width: min(100%, 480px); }
#flow-modal .dialog.job-invoice-dialog h2 { margin: 4px 0 4px; font-size: 25px; }
#flow-modal .dialog.job-invoice-dialog p { color: var(--muted); }
.inv-pop { display: grid; gap: 16px; }
.inv-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 18px; align-items: start;
}
.inv-head .eyebrow { margin: 0; grid-column: 1; }
.inv-head h2 { grid-column: 1; }
.inv-head .inv-sub { grid-column: 1; margin: 0; font-size: 14px; }
.inv-number {
  grid-column: 2; grid-row: 1 / span 3; align-self: center;
  padding: 8px 14px; border-radius: 999px;
  background: #eef5f0; border: 1px solid var(--line);
  color: var(--green-dark); font-weight: 800; font-size: 14px; white-space: nowrap;
}
#inv-form { display: grid; gap: 14px; }
.inv-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inv-more .inv-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0; }
.inv-meta label, .inv-contacts label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.inv-meta input, .inv-meta select, .inv-contacts input, .inv-more textarea {
  min-height: 42px; font-size: 14px;
}
.inv-addr { margin: 0; font-size: 14px; color: var(--ink); }
.inv-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.inv-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
.inv-table th {
  padding: 9px 8px; text-align: left; white-space: nowrap;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: #f6f9f7;
}
.inv-table td { padding: 5px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.inv-table th:nth-child(1) { width: 22%; }
.inv-table th:nth-child(3) { width: 72px; }
.inv-table th:nth-child(4) { width: 104px; }
.inv-table th:nth-child(5) { width: 98px; }
.inv-table th:nth-child(6) { width: 76px; }
.inv-table th:nth-child(7) { width: 92px; }
.inv-table th:nth-child(8) { width: 38px; }
.inv-table input, .inv-table select {
  width: 100%; min-height: 38px; padding: 6px 8px; border-radius: 8px;
  font-size: 14px; background: #fff; box-sizing: border-box;
}
.inv-table .inv-num { text-align: right; font-weight: 700; white-space: nowrap; }
.inv-drop {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.inv-drop:hover { background: #fdecec; color: var(--red); border-color: #f5c2c2; }
#inv-add { justify-self: start; width: auto; }
.inv-more { border-top: 1px dashed var(--line); padding-top: 12px; }
.inv-more summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--green-dark); }
.inv-more summary:hover { text-decoration: underline; }
.inv-more textarea { width: 100%; min-height: 64px; resize: vertical; margin-top: 4px; }
.inv-more > label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.inv-hint {
  margin: 0; padding: 10px 12px; border-radius: 10px;
  background: #fff7e6; border: 1px solid #f6d998; color: #8a5b00; font-size: 13px; font-weight: 600;
}
.inv-hint[hidden] { display: none; }
.inv-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 16px; align-items: start; }
.inv-send, .inv-side {
  background: #f7faf8; border: 1px solid var(--line); border-radius: 14px; padding: 16px;
}
.inv-send h3, .inv-side h3 {
  margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.inv-contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.inv-channels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.inv-channels .btn { flex: 1 1 130px; min-height: 44px; font-size: 14px; }
.inv-note { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.inv-sum { width: 100%; border-collapse: collapse; font-size: 14px; }
.inv-sum th { text-align: left; font-weight: 600; color: var(--muted); padding: 3px 12px 3px 0; }
.inv-sum td { text-align: right; font-weight: 700; padding: 3px 0; white-space: nowrap; }
.inv-sum .inv-gross th, .inv-sum .inv-gross td {
  border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px;
  font-size: 17px; color: var(--ink);
}
.inv-status { margin: 0; min-height: 18px; font-size: 13px; font-weight: 700; color: var(--green-dark); }
.inv-status.bad { color: var(--red); }
.inv-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.inv-actions .btn { width: auto; min-height: 44px; }
.inv-pop .btn + .btn { margin-top: 0; }
.inv-pop.is-busy .inv-channels, .inv-pop.is-busy #inv-save { opacity: .55; pointer-events: none; }
.inv-done { text-align: center; justify-items: center; gap: 10px; }
.inv-done h2 { font-size: 24px; }
.inv-done .inv-sub { max-width: 340px; }
.inv-done .inv-actions { justify-content: center; margin-top: 8px; }
.inv-check {
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center; margin: 4px auto 0;
  background: var(--green); color: #fff; font-size: 34px; font-weight: 800;
  box-shadow: 0 12px 26px -10px rgba(37, 99, 235, .8);
  animation: invPop .32s var(--ease) both;
}
@keyframes invPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 860px) {
  #flow-modal { padding: 0 !important; }
  #flow-modal .dialog.job-invoice-dialog {
    width: 100%; max-width: none; max-height: 100dvh; height: 100dvh;
    border-radius: 0; padding: 18px 14px 16px;
  }
  #flow-modal .dialog.job-invoice-dialog.is-done { height: auto; margin: auto; border-radius: 18px; max-width: min(100% - 24px, 460px); }
  .inv-head { grid-template-columns: 1fr; }
  .inv-head .inv-number { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .inv-meta, .inv-more .inv-meta, .inv-contacts { grid-template-columns: 1fr; }
  .inv-bottom { grid-template-columns: 1fr; }
  .inv-channels .btn { flex: 1 1 100%; }
  .inv-actions { flex-direction: column; }
  .inv-actions .btn { width: 100%; }
}
.job-row-actions .link-invoice { color: var(--green-dark); font-weight: 700; }

/* === Terminmodus: offen, Zeitfenster, fester Termin === */
.plan-pills { margin: 0 0 12px; }
.plan-pills label { flex: 1 1 0; min-width: 132px; }
.plan-pills span { display: flex; flex-direction: column; gap: 1px; width: 100%; line-height: 1.25; }
.plan-pills span small { font-size: 11px; font-weight: 600; opacity: .72; }
.plan-pills input:checked + span small { opacity: .9; }
.plan-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 0 0 8px; }
.plan-fields[data-plan="fixed"] { grid-template-columns: 1.2fr 0.8fr 0.8fr; }
.plan-fields[hidden] { display: none; }
.plan-note { margin: 0 0 12px; color: #667085; font-size: 13px; font-weight: 600; }
.plan-amount { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.job-missing { margin-top: 2px !important; color: #9a3412; font-size: 13px; font-weight: 700; }
.job-missing.is-ready { color: var(--green-dark); }
.plan-badge { display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: #fef3c7; color: #8a4b0f; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.job-plan-line { margin: 0 0 8px; font-weight: 700; color: #1c2b24; }
.job-plan-line.is-fixed { color: #8a4b0f; }
.job-plan-form label { margin-bottom: 0; }
.job-plan-form .btn { width: auto; margin-top: 8px; }
.job-plan-form .plan-pills { margin-top: 4px; }
.job-flash { margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: #e8edf8; border: 1px solid #b7c6e6; color: #142853; font-weight: 700; }
.pick-row.pick-new { border-color: #8fa5d4; background: #f4f6fb; }
.pick-row.pick-new b { color: var(--green-dark); }
.is-missing:not([type="checkbox"]):not([type="radio"]) { border-color: #e5484d !important; box-shadow: 0 0 0 3px rgba(229, 72, 77, .14) !important; }
.billing-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; margin: 0 0 14px; }
.billing-facts div { border: 1px solid #e6e8ec; border-radius: 10px; padding: 8px 12px; background: #fafbfc; }
.billing-facts dt { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #667085; }
.billing-facts dd { margin: 2px 0 0; font-weight: 700; color: #1c2b24; overflow-wrap: anywhere; }
.job-billing-form .plan-amount { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.job-billing-form textarea { min-height: 76px; }
.fixed-note { display: block; margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: #fef3c7; border: 1px solid #f5d38b; color: #8a4b0f; font-size: 14px; font-weight: 800; }
.job-line.is-fixed { border-left: 4px solid #f59e0b; }
.job-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 16px 0 0; padding: 14px 18px; border-radius: 14px; background: #fff; border: 1px solid #e6e8ec; box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06); max-width: 1040px; }
.job-submit p { margin: 0; }
.job-submit-title { font-weight: 800; color: #1c2b24; }
.job-submit-actions { display: flex; align-items: center; gap: 10px; }
.job-submit-actions .btn { width: auto; min-width: 180px; }
.home-panel .job-submit { max-width: none; }
.cal-check { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; font-size: 14px; font-weight: 650; color: #3f4650; }
.cal-check input { width: 18px; height: 18px; }
.g-event.is-fixed { box-shadow: inset 3px 0 0 #f59e0b, 0 1px 2px rgba(15, 23, 42, .08); }
.g-event.is-fixed.layered { box-shadow: inset 3px 0 0 rgba(255, 255, 255, .75), 0 1px 2px rgba(15, 23, 42, .08); }
.g-event .g-fixed-tag { position: absolute; top: 3px; right: 4px; padding: 1px 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.42); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-style: normal; }
.g-event:not(.layered) .g-fixed-tag { background: #fef3c7; color: #8a4b0f; }
@media (max-width: 640px) {
  .job-submit { flex-direction: column; align-items: stretch; }
  .job-submit-actions { flex-direction: column-reverse; }
  .job-submit-actions .btn { width: 100%; }
  .plan-fields, .plan-fields[data-plan="fixed"], .plan-amount { grid-template-columns: 1fr; }
  .plan-pills label { flex: 1 1 100%; }
  .plan-pills span { align-items: flex-start; }
}

/* Akte: Zeitpunkt und Mitarbeiter zuordnen */
.job-plan-form input:not([type="checkbox"]):not([type="radio"]),
.job-plan-form select,
.job-plan-form textarea,
#assign-crew input:not([type="checkbox"]):not([type="radio"]),
#assign-crew select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  background: #fff;
}
.job-plan-form label,
#assign-crew label {
  display: block;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 650;
  color: #667085;
}
.job-plan-form .cal-check { display: flex; align-items: center; gap: 8px; }
.job-plan-form .btn,
#assign-crew .btn { width: auto; min-width: 180px; }
#assign-crew .crew-times { grid-template-columns: 1.4fr 0.8fr 0.8fr; gap: 12px; }
#assign-crew .crew-query { margin-bottom: 6px; }
#assign-crew .crew-chips { margin: 4px 0 12px; }
#assign-crew .job-step-head { margin-bottom: 10px; }
@media (max-width: 640px) {
  #assign-crew .crew-times { grid-template-columns: 1fr; }
  .job-plan-form .btn, #assign-crew .btn { width: 100%; }
  .job-billing-form .plan-amount { grid-template-columns: 1fr; }
}

/* === Monatsansicht Kalender + Auftragsplanung === */
.view-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: #eef1f4;
}
.view-switch button {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: #5b6472;
  cursor: pointer;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.view-switch button.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}
.month-top { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.month-top .gcal-chev { flex: none; }
.month-top .gcal-chev.is-next .ico { transform: scaleX(-1); }
.month-top .month-name { font-size: 17px; letter-spacing: -0.01em; }
.month-top .gcal-today { margin-left: auto; padding: 0 14px; height: 34px; }
.month-head,
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month-head span {
  padding-bottom: 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a93a0;
}
.month-grid .mday {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 68px;
  padding: 5px 6px;
  border: 1px solid #e8eaee;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, background-color var(--t-fast) ease;
}
.month-grid .mday:hover { border-color: #c4ccd8; }
.month-grid .mday.other { background: #fafbfc; }
.month-grid .mday.other .mday-num { color: #b8bec7; }
.month-grid .mday.selected { border-color: #2f487d; box-shadow: 0 0 0 2px rgba(47, 72, 125, 0.16); }
.cal-month-panel .month-grid .mday { min-height: 96px; }
.mday-num {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}
.month-grid .mday.today .mday-num { background: var(--ink); color: #fff; }
.mday-items { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mchip {
  padding: 1px 5px;
  border-radius: 5px;
  background: #eaf1fd;
  color: #1d4ed8;
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mchip b { font-weight: 700; }
.mchip.fixed { background: #fbf0d6; color: #8a5b00; }
.mchip.window { background: #eef0f3; color: #55606f; }
.mchip.block { background: #f0f0f2; color: #7b8089; font-style: italic; }
.mchip.more { background: transparent; color: #8a93a0; }
.mday-dots { display: none; gap: 3px; }
.mday-dot { width: 5px; height: 5px; border-radius: 50%; background: #1d4ed8; }
.mday-dot.fixed { background: #c98a00; }
.mday-dot.window { background: #b9bfc8; }
.mday-dot.block { background: #9aa0a8; }
.month-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  font-size: 12px;
  color: #6b7280;
}
.month-legend span { display: inline-flex; align-items: center; gap: 5px; }
.month-legend i { width: 9px; height: 9px; border-radius: 3px; background: #eaf1fd; }
.month-legend i.appt { background: #c7dbfb; }
.month-legend i.fixed { background: #f0d79a; }
.month-legend i.window { background: #dfe3e8; }
.month-legend i.block { background: #d8d9dd; }
.job-month {
  margin-top: 12px;
  padding: 10px 12px 12px;
  border: 1px solid #e8eaee;
  border-radius: 12px;
  background: #fbfcfd;
}
.job-month-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 8px;
}
.job-month-head .job-label { margin: 0; }
.job-month-hint { font-size: 12px; color: #8a93a0; }
@media (max-width: 640px) {
  .month-grid .mday { min-height: 48px; padding: 4px; align-items: center; }
  .cal-month-panel .month-grid .mday { min-height: 56px; }
  .mday-items { display: none; }
  .mday-dots { display: flex; }
  .month-grid .mday .mday-num { width: 22px; height: 22px; font-size: 12px; }
  .month-top .month-name { font-size: 15px; }
  .view-switch { width: 100%; justify-content: center; }
  .view-switch button { flex: 1; }
  .job-month { padding: 8px; }
}
.month-grid .mday.weekend { background: #f7f8fa; }
.month-grid .mday.other.weekend { background: #f4f5f7; }
.month-grid .mday.win { box-shadow: inset 3px 0 0 #dfe3e8; }
.month-grid .mday.win .mday-num { color: #6b7280; }
.month-top .month-name { white-space: nowrap; }
@media (max-width: 400px) {
  .month-top { gap: 6px; }
  .month-top .month-name { font-size: 14px; }
  .month-top .gcal-today { padding: 0 10px; height: 32px; font-size: 13px; }
}

/* === Design 2026: moderner, ruhiger, klarer === */
:root {
  --green: #2563eb;
  --green-dark: #1d4ed8;
  --green-soft: #eff6ff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e8ee;
  --bg: #f4f6f8;
  --sidebar: #0f1b15;
  --sidebar-text: #9fb0a6;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 32px -24px rgba(15, 23, 42, 0.28);
  --radius: 16px;
}
body { color: var(--ink); background: var(--bg); }
.desk { grid-template-columns: 244px 1fr; background: var(--bg); }
.desk.nav-collapsed { grid-template-columns: 76px 1fr; }

/* Sidebar */
.side { padding: 20px 14px 16px; background: var(--sidebar); }
.side-brand { gap: 10px; }
.side-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(140deg, #2f62d0, #123fa0);
  color: #040915; font-size: 16px; font-weight: 800;
  box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.9);
}
.side-brand b { font-size: 17px; }
.side-brand span { font-size: 12px; color: #8fa298; }
.side-nav { gap: 3px; margin-top: 26px; }
.side-nav button {
  min-height: 44px; padding: 0 12px; border-radius: 11px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em;
  color: #a9b9ae; transition: background-color .15s ease, color .15s ease;
}
.side-nav button .ico { width: 20px; height: 20px; opacity: .9; }
.side-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav button.active {
  background: var(--green); color: #fff;
  box-shadow: 0 10px 22px -14px rgba(37, 99, 235, 1);
}
.side-nav button.active .ico { opacity: 1; }
.side-user { padding-top: 14px; }
.side-user b { font-size: 14.5px; }
.side-user button { font-size: 14px; }

/* Kopfzeile */
.desk-head {
  min-height: 68px; padding: 14px 32px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.desk-head .eyebrow { color: #8b97a7; font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.desk-head h1 { font-size: 23px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); }
.desk-head h1 .ico { width: 22px; height: 22px; color: var(--green-dark); }
.desk-head .bill-actions { flex-wrap: nowrap; }
.desk-head .bill-actions .btn { width: auto; min-height: 40px; padding: 0 16px; font-size: 14px; }
.desk-head .btn-small { margin-top: 6px; }
.desk-head > div { min-width: 0; }

/* Flächen */
.panel, .desk-stats article {
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.panel { margin-bottom: 16px; }
.panel h2 { margin: 0 0 14px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.desk-main > .panel, .desk-main > .desk-stats, .desk-main > .desk-grid,
.desk-main > .bill-tabs, .desk-main > .bill-editor, .desk-main > .bill-settings,
.desk-main > .cal-note, .desk-main > .home-tiles { margin-left: 32px; margin-right: 32px; }
.desk-stats article { padding: 16px 18px; }
.desk-stats b { font-size: 24px; font-weight: 700; color: var(--ink); }
.desk-stats span { font-size: 13px; color: var(--muted); }

/* Buttons */
.btn {
  border-radius: 11px; min-height: 44px;
  font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.btn-green { background: var(--green); box-shadow: 0 10px 20px -14px rgba(22, 67, 163, 0.9); }
.btn-green:hover { background: #12388a; }
.btn-green:active { background: #0e307a; transform: scale(.99); }
.btn-ghost { background: #fff; border: 1px solid #dde2e9; color: #334155; box-shadow: none; }
.btn-ghost:hover { background: #f8fafc; border-color: #c9d1db; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.linkish { color: var(--green-dark); font-weight: 650; }

/* Formularfelder */
.user-form input:not([type="checkbox"]):not([type="radio"]),
.user-form select,
.user-form textarea,
.job-create input:not([type="radio"]):not([type="checkbox"]),
.job-create select,
.job-create textarea,
.job-plan-form input,
.job-plan-form select,
.job-plan-form textarea,
#assign-crew input,
#assign-crew select,
.cal-add input,
.cal-add select,
.staff-create input,
.company-rename input,
.file-search {
  border: 1px solid #dfe4ea;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  min-height: 44px;
  padding: 10px 12px;
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.user-form input:focus, .user-form select:focus, .user-form textarea:focus,
.job-create input:focus, .job-create select:focus, .job-create textarea:focus,
.job-plan-form input:focus, .job-plan-form textarea:focus,
#assign-crew input:focus, .cal-add input:focus, .file-search:focus,
.login-card input:focus {
  outline: none;
  border-color: #6f8dcf;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 67, 163, .13);
}
.user-form label, .job-create label, .job-plan-form label, #assign-crew label {
  font-size: 12.5px; font-weight: 650; color: #5b6779;
  letter-spacing: 0; text-transform: none;
}
.job-create .job-step {
  background: #fff; border: 1px solid #e9edf3; border-radius: 14px;
  padding: 20px 20px 10px; box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.job-num {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--green-soft); color: #0e307a; font-size: 12.5px;
}
.job-create .job-kicker { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.job-create .job-hint, .job-hint { color: #7b8797; font-size: 13px; }
.job-create .kind-pills, .kind-pills { background: #f1f4f7; border-radius: 12px; }

/* Reiter */
.bill-tabs { gap: 6px; }
.bill-tabs button, .cal-tabs button, .tabs button {
  border-radius: 999px; font-weight: 650; font-size: 13.5px;
  border: 1px solid transparent; background: #eef1f5; color: #4a5568;
  padding: 9px 16px;
}
.bill-tabs button.on, .bill-tabs button.active {
  background: var(--green); color: #fff;
  box-shadow: 0 8px 18px -12px rgba(22, 67, 163, .9);
}

/* Tabellen */
th {
  color: #8b97a7; font-size: 10.5px; font-weight: 700;
  letter-spacing: .07em; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
td { padding: 14px 12px; border-bottom: 1px solid #f0f3f7; font-size: 14.5px; }
tbody tr:hover td { background: #fafbfd; }
tbody tr:last-child td { border-bottom: 0; }

/* Start-Kacheln */
.home-tiles { background: none; padding: 0; }
.home-tile {
  border: 1px solid #e9edf3; border-radius: 14px; background: #fff;
  padding: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.home-tile:hover { border-color: #cfd8e3; box-shadow: var(--shadow); }
.home-tile b { font-size: 15px; color: var(--ink); letter-spacing: -0.01em; }
.home-tile span { font-size: 12.5px; color: #7b8797; font-weight: 500; }
.home-tile.on { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 1px var(--green) inset; }
.home-tile.on b { color: #0e307a; }

/* Handy: Tabbar unten */
.tabbar { display: none; }
@media (max-width: 899px) {
  .desk, .desk.nav-collapsed { grid-template-columns: 1fr; }
  .desk-head { padding: 12px 16px 12px 62px; min-height: 60px; }
  .desk-head h1 { font-size: 20px; }
  .desk-main > .panel, .desk-main > .desk-stats, .desk-main > .desk-grid,
  .desk-main > .bill-tabs, .desk-main > .bill-editor, .desk-main > .bill-settings,
  .desk-main > .cal-note, .desk-main > .home-tiles { margin-left: 14px; margin-right: 14px; }
  .panel, .desk-stats article { padding: 16px 16px; border-radius: 14px; }
  .desk-main { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 26px -22px rgba(15, 23, 42, .5);
  }
  .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    border: 0; background: transparent; padding: 6px 2px; border-radius: 12px;
    font-size: 10.5px; font-weight: 650; color: #64748b;
    transition: color .15s ease, background-color .15s ease;
  }
  .tabbar button .ico { width: 22px; height: 22px; }
  .tabbar button.on { color: var(--green-dark); background: var(--green-soft); }
  .home-tiles { position: static; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0; margin-bottom: 12px; }
  .home-tile { min-height: 0; padding: 10px 8px; align-items: center; text-align: center; }
  .home-tile b { font-size: 12.5px; line-height: 1.25; }
  .home-tile span { display: none; }
}
@media (max-width: 899px) {
  .nav-fab { display: none; }
  .desk-head { padding: 12px 16px; }
  .cal-layout { display: flex; flex-direction: column; gap: 14px; }
  .cal-layout .g-board { order: 1; }
  .cal-layout .cal-list { order: 2; }
  .gcal-bar { row-gap: 8px; }
  .gcal-label { font-size: 17px; }
  .desk.nav-open .tabbar { visibility: hidden; }
}
@media (max-width: 899px) {
  .cal-layout { overflow-x: auto; }
  .cal-layout > .g-board { min-width: 660px; }
  .cal-layout > .cal-list { min-width: 0; }
}
@media (max-width: 640px) {
  .cust-table th:nth-child(3), .cust-table td:nth-child(3),
  .cust-table th:nth-child(4), .cust-table td:nth-child(4) { display: none; }
  .cust-table td { padding: 14px 8px; }
  .cust-table td:nth-child(1) small { font-size: 11.5px; }
  .file-search { min-height: 46px; font-size: 15px; }
}
@media (max-width: 899px) {
  .desk-head { flex-wrap: wrap; row-gap: 8px; }
  .desk-head .bill-actions { flex-wrap: wrap; width: 100%; }
  .desk-head .bill-actions .btn { flex: 1 1 auto; min-height: 38px; padding: 0 12px; font-size: 13px; }
}
#home-job > h2, #home-customer > h2 { display: none; }
#home-job > .job-hint, #home-customer > .job-hint { margin-top: 0; }
.billing-facts { grid-template-columns: 1fr; gap: 0; margin-bottom: 12px; }
.billing-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid #f0f3f7; border-radius: 0; padding: 10px 2px; background: transparent; }
.billing-facts div:last-child { border-bottom: 0; }
.billing-facts dt { font-size: 12.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #64748b; }
.billing-facts dd { margin: 0; font-size: 14.5px; font-weight: 650; color: var(--ink); text-align: right; }

/* Aufträge: Liste direkt sichtbar, Anlegen eingeklappt */
.panel.create-panel { padding: 10px; }
.create-panel h2, .create-panel > .create-fold > .job-lead { display: none; }
.create-fold > summary {
  list-style: none;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.create-fold > summary::-webkit-details-marker { display: none; }
.create-fold > summary:hover { background: #f7f9fb; }
.create-fold-plus {
  position: relative; flex: none;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--green);
  box-shadow: 0 10px 20px -14px rgba(22, 67, 163, .95);
}
.create-fold-plus::before,
.create-fold-plus::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 2.5px; border-radius: 2px; background: #fff;
  transform: translate(-50%, -50%);
  transition: transform .18s ease, opacity .18s ease;
}
.create-fold-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.create-fold[open] .create-fold-plus::after { transform: translate(-50%, -50%) rotate(0deg); opacity: 0; }
.create-fold-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.create-fold-copy b { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.create-fold-copy span { font-size: 13px; color: #7b8797; }
.create-fold[open] > summary { background: #f2f8f4; margin-bottom: 10px; }
.create-fold #job-error:empty { display: none; }
@media (max-width: 899px) {
  .panel.create-panel { padding: 8px; }
  .create-fold > summary { padding: 12px 12px; gap: 12px; }
  .create-fold-plus { width: 34px; height: 34px; border-radius: 11px; }
  .create-fold-copy b { font-size: 15px; }
  .create-fold-copy span { font-size: 12.5px; }
}
@media (max-width: 640px) {
  .jobs-table thead { display: none; }
  .jobs-table, .jobs-table tbody, .jobs-table tr, .jobs-table td { display: block; width: 100%; }
  .jobs-table tr { padding: 12px 0 10px; border-bottom: 1px solid #f0f3f7; }
  .jobs-table tr:last-child { border-bottom: 0; }
  .jobs-table td { border: 0; padding: 0 2px; font-size: 14px; }
  .jobs-table td:nth-child(2), .jobs-table td:nth-child(3),
  .jobs-table td:nth-child(4), .jobs-table td:nth-child(5) { display: none; }
  .jobs-table .job-km { margin-top: 2px; }
  .jobs-table td:last-child { margin-top: 8px; }
  .jobs-table td:last-child .btn { width: auto; }
  .jobs-table .job-row-actions { margin-top: 6px; }
}

/* === Donner-Feedback: Filter, Suche, Kontakte, Adressvorschläge === */
.job-filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 14px; align-items: center; }
.job-filter-bar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #5d7468; }
.job-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.job-chips-sort { margin-left: auto; }
.job-chip { border: 1px solid #dce5df; background: #fff; color: #41544a; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.job-chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.job-chips-sort .job-chip { font-weight: 500; color: #5d7468; }
.jobs-table tr.is-deleted, .cust-table tr.is-deleted { opacity: .6; }
.jobs-table tr.is-deleted td { text-decoration: line-through; }
.jobs-table tr.is-deleted .job-row-actions, .cust-table tr.is-deleted .job-row-actions { text-decoration: none; }
.link-delete { color: #b91c1c !important; }
.job-delete-note { display: inline-block; margin-top: 4px; font-size: 12px; color: #9f1239; }
.cust-table .job-delete-note { text-decoration: none; }
.job-weekdays { margin-top: 14px; }
.job-more > .job-weekdays:first-child { margin-top: 0; }
.job-hint-inline { font-weight: 400; color: #5d7468; }
.weekday-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.weekday-picks label { position: relative; }
.weekday-picks input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-picks span { display: inline-flex; min-width: 42px; justify-content: center; padding: 8px 10px; border: 1px solid #d7e0da; border-radius: 999px; background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }
.weekday-picks input:checked + span { background: var(--green-dark, #142853); border-color: var(--green-dark, #142853); color: #fff; }
.weekday-picks input:focus-visible + span { outline: 2px solid #162f65; outline-offset: 2px; }
.contact-block { margin: 8px 0 4px; }
.contact-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.contact-row { display: grid; grid-template-columns: 120px 1fr 34px; gap: 6px; align-items: center; }
.contact-row input { width: 100%; }
.contact-drop { width: 34px; height: 34px; border: 1px solid #e5e7eb; border-radius: 9px; background: #fff; color: #b91c1c; font-size: 18px; line-height: 1; cursor: pointer; }
.desk-search { position: relative; margin-top: 8px; max-width: 320px; }
.desk-search input { width: 100%; padding-right: 34px; }
.desk-search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 18px; color: #5d7468; cursor: pointer; }
.addr-suggest { position: absolute; z-index: 30; left: 0; right: 0; margin-top: 4px; background: #fff; border: 1px solid #d7e0da; border-radius: 12px; box-shadow: 0 12px 28px rgba(21, 36, 28, .14); overflow: hidden; }
.addr-suggest button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-bottom: 1px solid #f0f3f7; background: #fff; cursor: pointer; font: inherit; }
.addr-suggest button:last-child { border-bottom: 0; }
.addr-suggest button:hover, .addr-suggest button:focus { background: #f3f7f4; }
.addr-suggest b { display: block; color: #15241c; }
.addr-suggest span { display: block; font-size: 12px; color: #5d7468; }
.job-address label:first-child { position: relative; }

/* Team-Kalenderansicht */
.cal-view-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.cal-view-toggle { border: 1px solid #d7e3da; background: #fff; color: #3c5a49; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 10px; cursor: pointer; }
.cal-view-toggle:hover { border-color: #2563eb; color: #1d4ed8; }
.cal-view-toggle.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.team-cal { background: #fff; border: 1px solid #e6e8ec; border-radius: 14px; overflow: hidden; }
.team-cal-head { display: grid; grid-template-columns: 160px repeat(7, 1fr); border-bottom: 1px solid #e6e8ec; background: #f8fbf9; position: sticky; top: 0; z-index: 3; }
.team-cal-name { padding: 12px 14px; font-size: 13px; font-weight: 700; color: #3c5a49; display: flex; align-items: center; min-width: 0; overflow: hidden; }
.team-cal-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-cal-day { text-align: center; padding: 10px 8px; border-left: 1px solid #e6e8ec; }
.team-cal-day span { display: block; font-size: 11px; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.team-cal-day b { display: block; font-size: 16px; color: #1c2b24; margin-top: 2px; }
.team-cal-day.today { background: #eff6ff; }
.team-cal-day.today b { color: #1d4ed8; }
.team-cal-body { max-height: 600px; overflow: auto; }
.team-cal-row { display: grid; grid-template-columns: 160px repeat(7, 1fr); border-bottom: 1px solid #e6e8ec; min-height: 80px; }
.team-cal-row:last-child { border-bottom: 0; }
.team-cal-cell { position: relative; border-left: 1px solid #e6e8ec; background: #fff; }
.team-cal-grid { position: relative; height: 100%; }
.team-cal-block { position: absolute; left: 3px; right: 3px; border: 0; border-radius: 6px; padding: 5px 7px; font-size: 11px; font-weight: 700; color: #fff; cursor: pointer; overflow: hidden; text-align: left; box-shadow: 0 1px 2px rgba(0,0,0,.08); transition: transform 0.15s, box-shadow 0.15s; display: flex; flex-direction: column; gap: 1px; }
.team-cal-block:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.15); z-index: 2; }
.team-cal-block b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; font-size: 12px; }
.team-cal-block span { display: block; font-size: 10px; font-weight: 600; opacity: 0.9; line-height: 1.2; }
.team-cal-block small { display: block; font-size: 9px; font-weight: 600; opacity: 0.85; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.team-cal-block.termin { background: #5f6368; }
.team-cal-block.is-compact { padding: 2px 5px; justify-content: center; }
.team-cal-block.is-compact b { font-size: 10.5px; }
.team-cal-empty { padding: 40px 20px; text-align: center; color: #6b7280; font-size: 14px; }
@media (max-width: 960px) {
  .team-cal-head, .team-cal-row { grid-template-columns: 120px repeat(7, minmax(80px, 1fr)); }
  .team-cal-name { padding: 10px; font-size: 12px; }
  .team-cal-body { max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .team-cal-head, .team-cal-row { grid-template-columns: 100px repeat(7, minmax(60px, 1fr)); }
  .team-cal-name { padding: 8px 6px; font-size: 11px; }
  .team-cal-day { padding: 8px 4px; }
  .team-cal-day span { font-size: 10px; }
  .team-cal-day b { font-size: 14px; }
  .team-cal-block { padding: 3px 4px; font-size: 10px; }
  .team-cal-block span { font-size: 9px; }
}

/* Zeitfenster-Streifen, Pool und Fahrtblöcke im Wochenkalender */
.cal-planlane { display: grid; gap: 10px; margin: 0 0 12px; padding: 14px 16px; border: 1px solid #e2e8e4; border-radius: 14px; background: #fff; }
.cal-planlane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cal-planlane-head b { display: block; font-size: 14px; color: #15241c; }
.cal-planlane-head span { display: block; margin-top: 2px; font-size: 12px; color: #5d7468; }
.cal-planlane .strip-list { display: grid; gap: 6px; }
.cal-planlane .strip-row { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 10px; align-items: center; }
.cal-planlane .strip-name { border: 0; background: transparent; padding: 2px 0; text-align: left; font: inherit; font-size: 12px; font-weight: 700; color: #22392d; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-planlane .strip-track { position: relative; height: 26px; border-radius: 8px; background: #f1f5f2; overflow: hidden; }
.cal-planlane .strip-bar { position: absolute; top: 3px; bottom: 3px; display: flex; align-items: center; min-width: 38px; padding: 0 10px; border: 0; border-radius: 6px; color: #fff; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; overflow: hidden; white-space: nowrap; box-shadow: 0 1px 2px rgba(16, 40, 28, .18); }
.cal-planlane .strip-bar span { overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.cal-planlane .strip-bar.gruen { background: linear-gradient(180deg, #224ba5, #173880); }
.cal-planlane .strip-bar.gelb { background: linear-gradient(180deg, #e8b21c, #c98a09); color: #3a2b00; }
.cal-planlane .strip-bar.rot { background: linear-gradient(180deg, #e04f4f, #b92b2b); }
.cal-planlane .strip-handle { position: absolute; top: 0; bottom: 0; width: 10px; margin-left: -5px; border-radius: 5px; background: rgba(255, 255, 255, .85); border: 1px solid rgba(0, 0, 0, .28); cursor: ew-resize; box-shadow: 0 0 0 2px rgba(0, 0, 0, .06); }
.cal-planlane .strip-handle.red { background: #fff4f4; border-color: #8f1d1d; }
.cal-planlane .pool-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 2px; }
.cal-planlane .pool-head b { font-size: 13px; color: #15241c; }
.cal-planlane .pool-head span { font-size: 12px; color: #5d7468; }
.cal-planlane .pool-lane { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.cal-planlane .pool-bar { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 12px; border: 0; border-left: 4px solid #173880; border-radius: 9px; background: #f4f8f5; color: #15241c; font: inherit; text-align: left; cursor: pointer; white-space: nowrap; }
.cal-planlane .pool-bar b { font-size: 12px; }
.cal-planlane .pool-bar span { font-size: 11px; color: #5d7468; }
.cal-planlane .pool-bar.gelb { border-left-color: #d99a0b; background: #fdf7e6; }
.cal-planlane .pool-bar.rot { border-left-color: #c53030; background: #fdf1f1; }
.g-event.g-drive { background: repeating-linear-gradient(45deg, #e6edf1, #e6edf1 6px, #dbe5eb 6px, #dbe5eb 12px) !important; color: #354a56 !important; border: 1px dashed #9fb3bf; }
.g-event.g-drive span { opacity: .85; }

/* Mehrere feste Termine im Auftragsformular */
.job-plans { display: grid; gap: 8px; margin-top: 8px; }
.job-plans-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; }
.job-plans-head b { font-size: 13px; color: #15241c; }
.job-plan-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(80px, .8fr) minmax(80px, .8fr) auto 34px; gap: 8px; align-items: end; padding: 8px 10px; border: 1px solid #e2e8e4; border-radius: 10px; background: #fafcfa; }
.job-plan-row label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; color: #5d7468; }
.job-plan-row input[type="date"], .job-plan-row input[type="time"] { min-height: 38px; }
.job-plan-row .checkline { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; font-size: 12px; }
.job-hint { margin: 0; font-size: 12px; color: #5d7468; }
@media (max-width: 720px) {
  .cal-planlane .strip-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .job-plan-row { grid-template-columns: 1fr 1fr 34px; }
  .job-plan-row label:nth-child(1) { grid-column: 1 / -1; }
}

/* Personal: Passwort-Anfragen und Auftragszeile */
.pw-requests { display: grid; gap: 8px; margin-bottom: 10px; }
.pw-request { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid #f0d79b; border-radius: 10px; background: #fdf8ea; font-size: 13px; }
.job-who-line { display: block; margin-top: 2px; font-size: 12px; color: #5d7468; }
#forgot-password, #change-password-phone { margin-top: 12px; }
.user-mail { font-size: 12px; color: #4b6357; word-break: break-all; }
.user-tags .tag-no { background: #fdf8ea; color: #8a6100; }
.email-nudge { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 70; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #162f65; color: #fff; box-shadow: 0 12px 30px rgba(9, 24, 48, .28); font-size: 14px; }
.email-nudge .linkish { color: #cbd9ff; }
.pw-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(9, 24, 48, .48); }
.pw-modal-card { width: min(420px, 100%); display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: #fff; box-shadow: 0 18px 46px rgba(9, 24, 48, .3); }
.pw-modal-card h3 { margin: 0; font-size: 19px; }
.pw-modal-lead { margin: 0; font-size: 13px; color: #5d7468; }
.pw-modal-field { display: grid; gap: 4px; font-size: 13px; font-weight: 650; }
.pw-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.pw-modal-ok { margin: 0; padding: 10px 12px; border-radius: 10px; background: #effaf3; color: #14532d; font-size: 14px; }
.login-card #forgot-form label, .login-card #reset-form label { display: grid; gap: 4px; margin: 10px 0; font-size: 13px; font-weight: 650; }

/* To-dos: Ampel, Delegation, Erinnerung */
.todo-add { flex-wrap: wrap; }
.todo-add .todo-more { flex: 1 1 100%; }
.todo-more summary { cursor: pointer; font-size: 12px; font-weight: 700; color: #5d7468; padding: 2px 0 6px; }
.todo-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 4px 0 8px; }
.todo-more-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: #5d7468; }
.todo-more-grid input, .todo-more-grid select { min-height: 38px; padding: 6px 8px; font-size: 13px; border: 1px solid #d7e3da; border-radius: 8px; background: #fff; flex: none; }
.todo-row { border-left: 4px solid transparent; border-radius: 6px; padding-left: 8px; }
.todo-row.prio-rot { border-left-color: #c53030; background: linear-gradient(90deg, #fdf3f3, transparent 45%); }
.todo-row.prio-gelb { border-left-color: #d99a0b; background: linear-gradient(90deg, #fdf8e8, transparent 45%); }
.todo-row.prio-gruen { border-left-color: #173880; }
.todo-color { width: 16px; height: 16px; flex: 0 0 auto; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5d0; padding: 0; cursor: pointer; }
.todo-color.rot { background: #c53030; }
.todo-color.gelb { background: #e0a10f; }
.todo-color.gruen { background: #173880; }
.todo-owner { max-width: 150px; min-height: 32px; font-size: 12px; border: 1px solid #d7e3da; border-radius: 8px; background: #fff; }
.needs-input { outline: 2px solid #d93025 !important; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(217, 48, 37, .14); border-radius: 6px; }
@media (max-width: 640px) {
  .todo-row { grid-template-columns: 16px 22px minmax(0, 1fr) 32px; gap: 4px 8px; }
  .todo-x { width: 32px; height: 32px; min-height: 32px; }
  .todo-actions { gap: 6px; }
  .todo-actions .todo-owner { flex: 1 1 100%; max-width: 100%; }
  .todo-actions .btn { flex: 1 1 auto; }
}

/* Auftragsabschluss: Nacharbeit, neuer Auftrag, Unterschrift */
.done-modes { display: grid; gap: 6px; margin: 10px 0; }
.done-modes label { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #d7e3da; border-radius: 10px; background: #fafcfa; font-size: 14px; cursor: pointer; }
.done-modes input:checked + span, .done-modes input:checked { accent-color: #173880; }
.done-follow { display: grid; gap: 10px; margin: 10px 0; padding: 12px; border: 1px solid #e2e8e4; border-radius: 12px; background: #f6faf7; }
.done-follow[hidden] { display: none; }
.done-follow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.done-follow label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #5d7468; }
.done-sign-box { display: grid; gap: 6px; margin: 8px 0; }
.done-sign-box[hidden] { display: none; }
#done-sign-pad { width: 100%; height: 150px; border: 1px dashed #b9c8bf; border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.job-signature { margin: 8px 0 12px; padding: 10px; border: 1px solid #e2e8e4; border-radius: 10px; background: #fff; max-width: 420px; }
.job-signature img { display: block; width: 100%; height: auto; }
.job-signature figcaption { margin-top: 4px; font-size: 11px; color: #5d7468; }
@media (max-width: 640px) {
  .done-follow-grid { grid-template-columns: 1fr 1fr; }
}

/* Ablage, Protokoll, globale Suche */
.docs-upload { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.docs-pick { flex: 1 1 260px; min-height: 46px; display: flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px dashed #9db4a7; border-radius: 10px; background: #f6faf7; color: #355044; font-size: 14px; cursor: pointer; position: relative; }
.docs-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.docs-pick:focus-within { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.docs-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; flex: 2 1 420px; }
.docs-meta label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #5d7468; }
.docs-meta input, .docs-meta select { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; color: var(--ink); }
.docs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.docs-count { font-size: 12px; font-weight: 500; color: #6b7f73; margin-left: 8px; }
.docs-filter { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.docs-filter input, .docs-filter select { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }
.docs-list { display: flex; flex-direction: column; gap: 8px; }
.docs-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.docs-badge { flex: 0 0 auto; min-width: 46px; padding: 5px 6px; border-radius: 7px; text-align: center; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; background: #eef4ef; color: #355044; }
.docs-badge.docs-beleg { background: #fff3e2; color: #8a5a12; }
.docs-badge.docs-dokument { background: #e7f0fb; color: #1d4b87; }
.docs-badge.docs-foto { background: #f0ebfb; color: #5b3a9a; }
.docs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.docs-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-main span, .docs-main small { color: #5d7468; font-size: 12px; }
.docs-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: #6b7f73; font-size: 12px; white-space: nowrap; }
.docs-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.home-feed .feed { max-height: 420px; overflow: auto; }
.feed { display: flex; flex-direction: column; }
.feed-row { display: flex; gap: 14px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.feed-row:last-child { border-bottom: 0; }
.feed-row time { flex: 0 0 132px; font-size: 12px; color: #6b7f73; }
.feed-row div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feed-row b { font-size: 14px; font-weight: 600; }
.feed-row span { font-size: 12px; color: #5d7468; }
.search-box input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; background: #fff; }
.search-box input:focus { outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.search-chip { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #355044; font-size: 13px; }
.search-chip.on { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.search-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-filter select, .search-filter input { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }
.search-filter label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #5d7468; }
.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.search-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; }
.search-hit:hover { border-color: #9db4a7; background: #f8fbf9; }
.search-hit b { font-size: 14px; }
.search-hit span { font-size: 12px; color: #5d7468; }
.search-hit small { font-size: 11px; color: #809688; }
.search-kind { font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #0f317a; }
@media (max-width: 720px) {
  .docs-filter { grid-template-columns: 1fr; }
  .docs-row { flex-wrap: wrap; }
  .docs-side { flex-direction: row; gap: 10px; }
  .docs-actions { width: 100%; justify-content: flex-start; }
  .feed-row { flex-direction: column; gap: 2px; }
  .search-results { grid-template-columns: 1fr; }
}

/* Büro-Assistent */
.assistant-wrap { max-width: 780px; }
.assistant-panel { display: flex; flex-direction: column; gap: 12px; }
.assistant-log { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow: auto; padding-right: 4px; }
.assistant-turn { max-width: 86%; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.assistant-turn p { margin: 0; font-size: 14px; line-height: 1.5; }
.assistant-turn time { display: block; margin-top: 4px; font-size: 10px; color: #809688; }
.assistant-turn.me { align-self: flex-end; background: #e9edf7; border-color: #c6d0e7; }
.assistant-turn.ai { align-self: flex-start; }
.assistant-empty { padding: 18px 6px; text-align: center; color: #355044; }
.assistant-empty b { display: block; font-size: 16px; margin-bottom: 6px; }
.assistant-empty p { margin: 0 0 14px; font-size: 13px; color: #5d7468; }
.assistant-ideas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.assistant-idea { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #355044; font-size: 13px; }
.assistant-idea:hover { border-color: var(--green-dark); color: var(--green-dark); }
.assistant-busy { font-size: 13px; color: #5d7468; }
.assistant-form { display: flex; flex-direction: column; gap: 8px; }
.assistant-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; resize: vertical; }
.assistant-form textarea:focus { outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.assistant-form-row { display: flex; justify-content: space-between; gap: 10px; }
.assistant-error { margin: 0; }

/* Handy: Aufgaben-Tab, Admin-Schnellzugriff, größere Touch-Ziele */
.tab-side-left { grid-template-columns: repeat(3, 1fr); }
.home-glance, .home-shortcuts { display: none; }

@media (max-width: 899px) {
  .home-glance { display: flex; gap: 8px; margin: 0 14px 10px; }
  .home-glance span { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #5d6b62; font-size: 12px; font-weight: 650; }
  .home-glance b { font-size: 20px; line-height: 1; color: #16281d; }
  .home-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 14px 16px; }
  .home-shortcuts button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 84px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: #244232; font: inherit; }
  .home-shortcuts button:active { background: var(--green-soft); }
  .home-shortcuts .ico { width: 22px; height: 22px; color: var(--green-dark); }
  .home-shortcuts b { font-size: 12.5px; line-height: 1.2; text-align: center; }
  .home-shortcuts small { font-size: 10.5px; font-weight: 600; color: #7b8a80; }
  .job-create .skill-chip input,
  .job-create .weekday-picks input { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; margin: 0; }
  .desk-main .btn-small { min-height: 38px; padding: 8px 14px; font-size: 13px; }
  .desk-main .todo-row { grid-template-columns: 22px 26px minmax(0, 1fr) 38px; gap: 4px 10px; }
  .desk-main .todo-color { width: 22px; height: 22px; }
  .desk-main .todo-check { width: 26px; height: 26px; min-height: 26px; }
  .desk-main .todo-x { width: 38px; height: 38px; min-height: 38px; }
  .desk-main .todo-actions .btn { min-height: 36px; }
}

@media (max-width: 640px) {
  .app .todo-row { grid-template-columns: 24px 30px minmax(0, 1fr) 38px; }
  .app .todo-color { width: 24px; height: 24px; }
  .app .todo-check { width: 30px; height: 30px; min-height: 30px; }
  .app .todo-x { width: 38px; height: 38px; min-height: 38px; }
  .app .todo-actions .btn { min-height: 38px; padding: 7px 14px; font-size: 13px; }
  .app .todo-actions .todo-owner { min-height: 38px; }
  .tabs-clean .tab-side-left button { padding-left: 2px; padding-right: 2px; }
  .tabs-clean .tab-side-left button span:last-child { font-size: 10px; }
}

/* Mitarbeiter: Aufgabenliste (Handy) */
.my-tasks { display: flex; flex-direction: column; gap: 10px; }
.task-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #f2c94c;
  border-radius: 12px;
  background: #fff;
}
.task-item.prio-rot { border-left-color: #e5484d; }
.task-item.prio-gelb { border-left-color: #f2c94c; }
.task-item.prio-gruen { border-left-color: var(--green); }
.task-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.task-copy b { font-size: 15px; line-height: 1.35; color: #16281d; overflow-wrap: anywhere; }
.task-copy span { font-size: 12px; color: #6b7a70; }
.task-buttons { display: flex; gap: 8px; }
.task-buttons .btn { flex: 1; width: auto; min-height: 46px; margin: 0; padding: 0 12px; font-size: 14px; }

/* Terminmaske: nichts darf überlaufen, alles scrollt im Dialog */
.gcal-pop {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
}
.gcal-pop > * { flex: none; }
.gcal-pop-more { grid-auto-rows: min-content; }
.gcal-pop-more .pick-list { max-height: 190px; overflow: auto; margin: 6px 0 2px; }
.gcal-pop-more .addr-suggest { max-height: 170px; overflow: auto; }
.gcal-pop-actions { position: sticky; bottom: -14px; background: #fff; padding: 8px 0 0; margin: 0 0 -4px; }
.termin-clash { display: none; gap: 4px; padding: 9px 10px; border-radius: 10px; background: #fff5f2; border: 1px solid #ffd7cc; }
.termin-clash.is-clash { display: grid; }
.termin-clash b { font-size: 12px; font-weight: 800; color: #b42318; text-transform: uppercase; letter-spacing: 0.04em; }
.termin-clash span { font-size: 13px; color: #7a2e1f; line-height: 1.35; }
@media (max-width: 640px) {
  .gcal-pop { max-height: 80vh; }
}

/* Urlaub: Farbstufen im Kalender und Antragslisten */
.g-event.g-block.is-pending {
  background: #fff3d6 !important;
  color: #7a5310 !important;
  border: 1px dashed #e0a82e;
}
.g-event.g-block.is-pending b, .g-event.g-block.is-pending span { color: #7a5310 !important; }
.g-event.g-block.is-allday { letter-spacing: 0.01em; }
.leave-rows { display: grid; gap: 8px; margin: 0 0 16px; }
.leave-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; border: 1px solid #e3e8ec; background: #fff;
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.leave-row:hover { border-color: #c7d2da; box-shadow: 0 6px 18px rgba(15, 40, 30, 0.08); transform: translateY(-1px); }
.leave-row span { display: grid; gap: 2px; min-width: 0; }
.leave-row b { font-size: 15px; color: #16281d; }
.leave-row small { font-size: 12.5px; color: #6b7a70; overflow-wrap: anywhere; }
.leave-status {
  flex: none; font-style: normal; font-size: 12px; font-weight: 800;
  padding: 5px 10px; border-radius: 999px; background: #eef1f4; color: #46525c;
}
.leave-status-offen { background: #fff3d6; color: #7a5310; }
.leave-status-genehmigt { background: #e3e9f5; color: #1c356b; }
.leave-status-abgelehnt { background: #fdeceb; color: #a52f25; }
.leave-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.leave-clash { margin: 2px 0 8px; font-size: 13px; color: #b42318; min-height: 16px; }
#leave-board { margin: 0 0 18px; }
@media (max-width: 640px) {
  .leave-dates { grid-template-columns: 1fr; }
}


/* ===== Design 2026-11 – heller, klarer Stil (Vorlage: Kalendereintrag-Screenshot) ===== */
:root {
  --green: #2563eb;
  --green-dark: #1d4ed8;
  --green-soft: #eff6ff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f3f4f6;
  --card: #ffffff;
  --sidebar: #0f172a;
  --sidebar-text: #94a3b8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 10px 28px -18px rgba(17, 24, 39, 0.25);
  --ring: 0 0 0 3px rgba(37, 99, 235, .18);
}
body { color: var(--ink); background: var(--bg); }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.01em; }
.card, .panel, .desk-stats article, .dialog, .user-card, .job-preview, .login-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.btn { border-radius: 10px; font-weight: 600; min-height: 42px; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost { background: #fff; border: 1px solid #d1d5db; color: var(--ink); }
.btn-ghost:hover { background: #f9fafb; border-color: #9ca3af; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background-color: #fff;
  color: var(--ink);
}
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: var(--ring);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }

/* ----- Kalendereintrag als zentriertes Fenster ----- */
.gcal-pop.td-modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: min(940px, calc(100vw - 24px)) !important;
  max-width: none !important;
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  margin: 0 !important;
  color: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .45);
  z-index: 1000;
  overflow: hidden;
}
.td-modal .td-head { display: flex; align-items: center; gap: 14px; padding: 20px 28px 14px; border-bottom: 1px solid var(--line); }
.td-modal .td-head h2 { margin: 0; font-size: 1.45rem; font-weight: 700; flex: 1; }
.td-modal .td-head-icon { color: var(--green); display: inline-flex; }
.td-modal .gcal-pop-x { position: static; width: 38px; height: 38px; border: 0; background: transparent; font-size: 28px; line-height: 1; color: #374151; border-radius: 10px; }
.td-modal .gcal-pop-x:hover { background: #f3f4f6; }
.td-steps { list-style: none; display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 28px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.td-steps li { display: flex; align-items: center; gap: 10px; color: #374151; font-size: 1rem; white-space: nowrap; }
.td-steps li + li::before { content: ""; width: 44px; height: 1px; background: #9ca3af; margin-right: 6px; }
.td-steps span { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #374151; display: inline-grid; place-items: center; font-weight: 600; }
.td-steps li.on span { background: var(--green); border-color: var(--green); color: #fff; }
.td-steps li.on { font-weight: 600; color: var(--ink); }
.td-body { overflow-y: auto; padding: 6px 28px 10px; }
.td-sec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.td-sec:last-child { border-bottom: 0; }
.td-sec h3 { margin: 0 0 14px; font-size: 1.2rem; font-weight: 700; }
.td-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.td-kind { position: relative; cursor: pointer; }
.td-kind input { position: absolute; opacity: 0; pointer-events: none; }
.td-kind > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 120px; padding: 14px 10px; border: 1px solid #e5e7eb; border-radius: 12px; background: #f9fafb; text-align: center; color: #374151; transition: border-color var(--t-fast, .15s), background var(--t-fast, .15s); }
.td-kind > span b { font-weight: 500; font-size: .98rem; line-height: 1.25; }
.td-kind > span small { display: block; font-size: .85rem; font-weight: 400; }
.td-kind:hover > span { border-color: #93c5fd; }
.td-kind input:checked + span { border: 2px solid var(--green); background: var(--green-soft); color: var(--green-dark); }
.td-kind input:checked + span b { font-weight: 700; color: var(--ink); }
.td-kind input:checked + span::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.td-kind input:focus-visible + span { box-shadow: var(--ring); }
.td-radios { display: grid; gap: 4px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; }
.td-radios:has(input:checked) { border-color: var(--green); }
.td-radios label { display: flex; align-items: center; gap: 12px; padding: 5px 0; font-size: 1.02rem; cursor: pointer; }
.td-radios input { width: 20px; height: 20px; margin: 0; }
.td-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-top: 10px; }
.td-grid-time { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.td-wide { grid-row: span 2; }
.td-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; color: var(--ink); }
.td-field small { font-weight: 400; color: var(--muted); }
.td-field input, .td-field select, .td-field textarea { width: 100%; min-height: 46px; padding: 10px 14px; font-weight: 400; font-size: 1rem; }
.td-field textarea { resize: vertical; min-height: 72px; }
.td-sec > .td-field { margin-top: 12px; }
.td-label { display: block; margin: 14px 0 8px; font-size: .95rem; }
.td-modal .gcal-people { display: flex; flex-wrap: wrap; gap: 8px; }
.td-modal .gcal-person { border-radius: 999px; padding: 6px 14px; }
.td-modal .chip-row.termin-customers { margin-bottom: 4px; }
.td-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 28px; border-top: 1px solid var(--line); background: #fff; }
.td-actions .gcal-pop-delete { margin-right: auto; }
.td-actions .btn { min-width: 150px; min-height: 48px; font-size: 1.05rem; }
.td-modal .login-error { margin: 0; padding: 0 28px 12px; }
.td-modal .login-error:empty { display: none; }
@media (max-width: 680px) {
  .gcal-pop.td-modal { width: 100vw !important; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .td-modal .td-head, .td-steps, .td-body, .td-actions { padding-left: 16px; padding-right: 16px; }
  .td-steps li + li::before { width: 18px; }
  .td-grid, .td-grid-time { grid-template-columns: 1fr; }
  .td-kinds { grid-template-columns: repeat(2, 1fr); }
  .td-actions .btn { min-width: 0; flex: 1; }
}

.gcal-pop.td-modal::backdrop { background: rgba(15, 23, 42, .45); }
.gcal-pop.td-modal .td-field input[name="title"] { font-size: 1rem; font-weight: 400; border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 14px; min-height: 46px; box-shadow: none; }
.gcal-pop.td-modal .td-field input[name="title"]:focus { border-color: var(--green); box-shadow: var(--ring); }


/* ===== Plantafel ===== */
.pt-panel { padding: 16px; }
.pt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 14px; }
.pt-seg { display: inline-flex; border: 1px solid #d1d5db; border-radius: 10px; overflow: hidden; background: #fff; }
.pt-seg button { border: 0; border-right: 1px solid #e5e7eb; background: #fff; padding: 9px 16px; font-size: .9rem; font-weight: 600; color: #4b5563; text-transform: uppercase; letter-spacing: .02em; min-height: 40px; }
.pt-seg button:last-child { border-right: 0; }
.pt-seg button:hover { background: #f3f4f6; }
.pt-seg button.on { background: var(--green-soft); color: var(--green-dark); }
.pt-nav button { color: var(--green); font-size: 1.15rem; text-transform: none; min-width: 46px; }
.pt-nav #pt-today { font-size: .9rem; text-transform: uppercase; }
.pt-label { font-size: 1.05rem; color: var(--ink); }
.pt-new { margin-left: auto; text-transform: uppercase; letter-spacing: .03em; padding: 0 20px; }
.pt-scroll { overflow: auto; max-height: calc(100dvh - 230px); border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pt-board { display: grid; grid-template-columns: 210px 1fr; min-width: calc(210px + var(--n) * 40px); }
.pt-corner { position: sticky; left: 0; top: 0; z-index: 4; background: #fff; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; align-items: flex-end; padding: 10px 14px; font-weight: 600; color: var(--muted); font-size: .9rem; }
.pt-head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); }
.pt-month { text-align: center; padding: 6px 0 4px; font-size: .95rem; color: #374151; border-bottom: 1px solid var(--line); }
.pt-kws, .pt-days, .pt-row { display: grid; grid-template-columns: repeat(var(--n), minmax(40px, 1fr)); }
.pt-kw { text-align: center; padding: 5px 0; font-size: .85rem; color: #4b5563; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pt-kw:first-child { border-left: 0; }
.pt-day { display: flex; flex-direction: column; align-items: center; padding: 4px 0 6px; border-left: 1px solid #eef0f3; color: #374151; }
.pt-day small { font-size: .7rem; color: var(--muted); }
.pt-day b { font-size: .95rem; font-weight: 500; }
.pt-day.we { background: #f6f7f9; }
.pt-day.today { background: var(--green-soft); }
.pt-day.today b { color: #dc2626; font-weight: 700; }
.pt-name { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 48px; }
.pt-name i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.pt-name b { display: block; font-size: .95rem; color: var(--ink); line-height: 1.2; }
.pt-name small { display: block; font-size: .8rem; color: var(--muted); }
.pt-row { position: relative; border-bottom: 1px solid var(--line); }
.pt-cell { border-left: 1px solid #eef0f3; cursor: pointer; }
.pt-cell.we { background: #f6f7f9; }
.pt-cell.today { background: rgba(220, 38, 38, .06); }
.pt-cell:hover { background: var(--green-soft); }
.pt-item { position: relative; z-index: 1; margin: 4px 2px; padding: 7px 8px 4px; border: 0; border-radius: 4px; background: color-mix(in srgb, var(--c) 8%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent); text-align: left; font: inherit; font-size: .85rem; color: var(--ink); overflow: hidden; white-space: nowrap; cursor: pointer; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.pt-item::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--c); }
.pt-item span { overflow: hidden; text-overflow: ellipsis; }
.pt-item small { font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pt-item:hover { box-shadow: inset 0 0 0 2px var(--c); }
.pt-assign { cursor: default; }
@media (max-width: 680px) {
  .pt-board { grid-template-columns: 130px 1fr; min-width: calc(130px + var(--n) * 38px); }
  .pt-new { margin-left: 0; }
}

.pt-toolbar #termin-new.pt-new { width: auto !important; flex: 0 0 auto !important; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
.pt-panel > details.cal-add { margin-bottom: 10px; }


/* ===== Plantafel Tag / Woche / Monat ===== */
.pv-panel { padding: 16px; }
.pv-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 10px; }
.pv-seg2 { display: inline-flex; border: 1px solid #d1d5db; border-radius: 10px; overflow: hidden; background: #fff; }
.pv-seg2 button { border: 0; border-right: 1px solid #e5e7eb; background: #fff; padding: 8px 14px; font-size: .9rem; font-weight: 600; color: #4b5563; min-height: 38px; }
.pv-seg2 button:last-child { border-right: 0; }
.pv-seg2 button:hover { background: #f3f4f6; }
.pv-seg2 button.on { background: var(--green-soft); color: var(--green-dark); }
.pv-nav button { color: var(--green); min-width: 42px; font-size: 1.1rem; }
.pv-nav #pv-today { font-size: .9rem; }
.pv-label { font-size: 1.05rem; color: var(--ink); }
.pv-pct { font-size: .9rem; font-weight: 600; }
.pv-toolbar #termin-new.pv-new { width: auto !important; flex: 0 0 auto !important; margin-left: auto; display: inline-flex; align-items: center; padding: 0 18px; }
.pv-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; font-size: .78rem; }
.pv-legend span { border-radius: 5px; padding: 3px 9px; font-weight: 600; }
.pv-legend .pv-lg-drive { background: #B4B2A9; color: #2C2C2A; }
.pv-legend .pv-lg-free { color: #3B6D11; border: 1px dashed #97C459; background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(99,153,34,.15) 5px 10px); }
.pv-scroll { overflow: auto; max-height: calc(100dvh - 250px); }
.ok { } .pv-panel .ok { color: #3B6D11; } .pv-panel .mid { color: #b45309; } .pv-panel .full { color: #dc2626; }
.pv-name { display: flex; flex-direction: column; justify-content: center; padding: 6px 10px 6px 4px; min-width: 0; }
.pv-name b { font-size: .92rem; color: var(--ink); line-height: 1.2; }
.pv-name small { font-size: .74rem; color: var(--muted); line-height: 1.3; }
.pv-name .pv-si { font-weight: 600; }
.pv-name .pv-free { color: #3B6D11; }
.pv-sib { display: block; height: 4px; border-radius: 2px; background: #e5e7eb; margin-top: 2px; overflow: hidden; max-width: 130px; }
.pv-sib i { display: block; height: 100%; background: #639922; }
.pv-sib i.mid { background: #d97706; }
.pv-team { cursor: pointer; }
.pv-team:hover b { color: var(--green); }
.pv-ar { display: inline-block; width: 14px; color: var(--muted); }
.pv-sub { padding-left: 18px; }
.pv-sub b { font-weight: 500; }
/* Tag */
.pv-day { display: grid; grid-template-columns: 170px 1fr; row-gap: 8px; align-items: center; min-width: 760px; }
.pv-hours { position: relative; height: 22px; border-bottom: 1px solid var(--line); }
.pv-hours span { position: absolute; top: 2px; font-size: .78rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 4px; }
.pv-bar { position: relative; height: 50px; border-radius: 25px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; background: repeating-linear-gradient(135deg, #fff 0 6px, rgba(99,153,34,.12) 6px 12px); }
.pv-bar.pv-leave, .pv-cell.pv-leave { display: flex; align-items: center; justify-content: center; color: var(--muted); background: #f3f4f6; cursor: default; font-size: .85rem; }
.pv-seg { position: absolute; top: 0; bottom: 0; border: 0; border-right: 2px solid #fff; background: var(--bg); color: var(--fg); padding: 0 10px; text-align: left; display: flex; flex-direction: column; justify-content: center; overflow: hidden; white-space: nowrap; font: inherit; cursor: pointer; }
.pv-seg b { font-size: .9rem; font-weight: 700; overflow: hidden; }
.pv-seg small { font-size: .72rem; opacity: .9; }
.pv-seg em, .pv-st em { font-style: normal; font-size: .66rem; font-weight: 700; background: rgba(255,255,255,.6); color: #2C2C2A; border-radius: 3px; padding: 0 4px; align-self: flex-start; }
.pv-drive { position: absolute; top: 0; bottom: 0; background: #B4B2A9; }
/* Woche */
.pv-week { display: grid; grid-template-columns: 150px repeat(5, minmax(150px, 1fr)); gap: 6px 5px; align-items: stretch; }
.pv-dh { border: 0; background: #f3f4f6; border-radius: 8px; padding: 6px; display: flex; flex-direction: column; align-items: center; font: inherit; cursor: pointer; }
.pv-dh b { font-size: .88rem; color: var(--ink); }
.pv-dh span { font-size: .78rem; font-weight: 600; }
.pv-dh.today { background: var(--green-soft); }
.pv-dh.today b { color: #dc2626; }
.pv-cell { background: #f9fafb; border: 1px solid var(--line); border-radius: 9px; padding: 4px; display: flex; flex-direction: column; min-height: 60px; cursor: pointer; }
.pv-tcell { border-color: #cbd5e1; background: #fff; }
.pv-st { border: 0; border-radius: 5px; background: var(--bg); color: var(--fg); font: inherit; font-size: .8rem; font-weight: 700; padding: 3px 6px; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 4px; cursor: pointer; min-height: 22px; }
.pv-st span { overflow-wrap: anywhere; }
.pv-dl { display: block; height: 4px; margin: 2px 8px; border-radius: 2px; background: #B4B2A9; }
.pv-fr { margin-top: auto; padding-top: 3px; font-size: .74rem; color: #3B6D11; text-align: center; }
/* Monat */
.pv-mtop { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 10px; }
.pv-people { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-chip { font-size: .78rem; background: #f3f4f6; border-radius: 999px; padding: 3px 10px; color: var(--ink); }
.pv-chip b { font-weight: 600; }
.pv-month { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)) repeat(2, minmax(60px, .5fr)); gap: 4px; }
.pv-mwd { text-align: center; font-size: .8rem; color: var(--muted); padding: 2px 0; }
.pv-mc { border: 1px solid var(--line); border-radius: 9px; padding: 4px; background: #fff; display: flex; flex-direction: column; cursor: pointer; }
.pv-mc.we { background: #f6f7f9; }
.pv-mc.past { opacity: .6; }
.pv-mc.other { opacity: .35; }
.pv-mh { display: flex; justify-content: space-between; align-items: baseline; height: 20px; font-size: .82rem; }
.pv-mh b.today { background: #A32D2D; color: #fff; border-radius: 10px; padding: 0 7px; }
.pv-mh span { font-size: .72rem; font-weight: 600; }
.pv-mbox { height: 155px; display: flex; flex-direction: column; gap: 1px; border-radius: 6px; overflow: hidden; background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(99,153,34,.12) 5px 10px); }
.pv-mc.we .pv-mbox { background: none; }
.pv-me { flex: none; border: 0; border-radius: 4px; background: var(--bg); color: var(--fg); font: inherit; font-size: .76rem; line-height: 14px; font-weight: 700; padding: 1px 5px; text-align: left; overflow: hidden; display: flex; align-items: center; overflow-wrap: anywhere; hyphens: auto; cursor: pointer; }
.pv-me span { display: block; overflow: hidden; }
.pv-mbox .pv-dl { margin: 0 6px; height: 3px; flex: none; }
.pv-mbox .pv-fr { flex: none; }
@media (max-width: 680px) {
  .pv-day { grid-template-columns: 110px 1fr; }
  .pv-week { grid-template-columns: 110px repeat(5, minmax(120px, 1fr)); }
  .pv-toolbar #termin-new.pv-new { margin-left: 0; }
}

.pv-bar.pv-lanes { border-radius: 16px; }
.pv-bar.pv-lanes .pv-seg { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; border-bottom: 2px solid #fff; }
.pv-bar.pv-lanes .pv-seg em { align-self: center; }


/* ===== Wochenansicht: alle 5 Tage passend (auch Handy) ===== */
.pv-week { grid-template-columns: minmax(90px, 150px) repeat(5, minmax(0, 1fr)); min-width: 0; }
.pv-cell .pv-fr { flex: 1; margin-top: 3px; border-radius: 4px; padding: 3px 4px; text-align: left; background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(99,153,34,.16) 5px 10px); }
.pv-st { white-space: nowrap; overflow: hidden; }
.pv-st span { overflow: hidden; overflow-wrap: normal; }
.pv-st em { flex: none; }
@media (max-width: 680px) {
  .pv-panel { padding: 8px; }
  .pv-toolbar { gap: 6px; }
  .pv-seg2 button { padding: 5px 8px; font-size: .74rem; min-height: 30px; }
  .pv-nav button { min-width: 30px; }
  .pv-label { font-size: .85rem; width: 100%; order: 5; }
  .pv-toolbar #termin-new.pv-new { min-height: 30px; font-size: .76rem; padding: 0 10px; margin-left: auto; }
  .pv-legend { gap: 3px; margin-bottom: 8px; }
  .pv-legend span { font-size: .6rem; padding: 1px 5px; }
  .pv-week { grid-template-columns: 62px repeat(5, minmax(0, 1fr)); gap: 4px 3px; }
  .pv-week .pv-name { padding: 2px 0; }
  .pv-week .pv-name b { font-size: .7rem; word-break: break-word; }
  .pv-week .pv-name small { font-size: .58rem; }
  .pv-week .pv-sib { max-width: 100%; }
  .pv-dh { padding: 3px 1px; }
  .pv-dh b { font-size: .68rem; }
  .pv-dh span { font-size: .62rem; }
  .pv-cell { padding: 2px; border-radius: 7px; min-height: 70px; }
  .pv-st { font-size: .62rem; padding: 2px 3px; min-height: 0; border-radius: 3px; }
  .pv-st em { display: none; }
  .pv-dl { height: 3px; margin: 1px 4px; }
  .pv-cell .pv-fr { font-size: .56rem; line-height: 1.2; padding: 2px 3px; }
  .pv-scroll { max-height: none; }
}


/* ===== Fahrtende: weitere Angaben ===== */
.dialog .dx-warn { background: #fef3c7; color: #92400e; border-radius: 10px; padding: 9px 11px; font-size: .88rem; margin: 6px 0 10px; text-align: left; }
.dialog details.dx { margin-top: 10px; text-align: left; }
.dialog details.dx summary { cursor: pointer; color: var(--green); font-size: .9rem; font-weight: 600; padding: 4px 0; }
.dialog .dx-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.dialog .dx-kind { border: 1px solid #d1d5db; background: #fff; border-radius: 9px; padding: 6px 10px; font-size: .82rem; font-weight: 600; color: #374151; min-height: 0; width: auto; }
.dialog .dx-kind.on { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }
.dialog .dx-row { border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px; margin-bottom: 6px; display: grid; gap: 6px; }
.dialog .dx-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dialog .dx-line input { width: 90px; min-height: 36px; padding: 6px 8px; }
.dialog .dx-photo { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--green); cursor: pointer; }
.dialog .dx-photo input { display: none; }
.dialog .dx-ph img { max-width: 120px; max-height: 90px; border-radius: 6px; border: 1px solid #e5e7eb; }
.dialog .dx-jobs { display: grid; gap: 4px; font-size: .85rem; }
.dialog .dx-jobs label { display: flex; align-items: center; gap: 6px; }
.dialog .dx-jobs small { color: var(--muted); }
.dialog .dx-note { width: 100%; min-height: 36px; padding: 6px 8px; }
.dialog .dx-err { color: #dc2626; font-size: .85rem; margin: 4px 0 0; }

/* ===== Fahrtende-Dialog v2 (Gründe, Belege, Team-Vorschau) ===== */
.dx2{margin:10px 0 4px;text-align:left}
.dx2-warn{background:#fef3c7;color:#92400e;border-radius:10px;padding:10px 12px;font-size:14px;line-height:1.4}
.dx2-warn b{font-weight:600}
.dx2-lbl{font-size:15px;font-weight:600;margin:14px 0 8px;text-align:left}
.dx2-lbl small{font-weight:400;color:#64748b}
.dx2-g{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:start}
.dx2-f{border:1px solid #cbd5e1;border-radius:12px;overflow:hidden;background:#fff}
.dx2-f.on{border:2px solid #2563eb}
.dx2-c{display:flex;align-items:center;justify-content:center;width:100%;min-height:54px;padding:4px 8px;border:0;background:transparent;font:inherit;font-size:15px;color:#0f172a;text-align:center;cursor:pointer}
.dx2-f.on .dx2-c{background:#2563eb;color:#fff;font-weight:600}
.dx2-body{padding:7px}
.dx2-ph{display:flex;align-items:center;gap:6px;flex-wrap:wrap;border:1px dashed #2563eb;border-radius:9px;min-height:46px;padding:5px 8px;background:#eff6ff;color:#1d4ed8;justify-content:center}
.dx2-ph.opt{border-color:#94a3b8;background:#f8fafc;color:#475569}
.dx2-thumbs{display:flex;gap:5px}
.dx2-thumbs img{width:36px;height:36px;object-fit:cover;border-radius:6px;border:2px solid #16a34a}
.dx2-add{display:flex;align-items:center;justify-content:center;min-height:40px;padding:0 6px;font-size:14px;cursor:pointer;flex:1}
.dx2-note{width:100%;box-sizing:border-box;margin-top:7px;min-height:44px;border:1px solid #cbd5e1;border-radius:9px;padding:8px 10px;font:inherit;font-size:15px}
.dx2-more summary{cursor:pointer;font-size:14px;color:#475569;margin-top:10px}
.dx2-crew{opacity:.5;pointer-events:none;margin:4px 0 12px;text-align:left}
.dx2-soon{display:inline-block;font-size:11px;font-weight:600;background:#e2e8f0;color:#475569;border-radius:10px;padding:2px 8px;margin-left:4px;vertical-align:middle}
.dx2-p{display:flex;align-items:center;gap:12px;min-height:52px;border:1px solid #cbd5e1;border-radius:12px;padding:0 14px;margin-bottom:6px;font-size:16px;background:#f1f5f9}
.dx2-bx{width:26px;height:26px;border-radius:7px;border:2px solid #94a3b8;flex:none}
.dx2-check h2{text-align:center}
.dx2-q{text-align:center;color:#64748b;font-size:14px;margin:0 0 12px}
.dx2-big{border:2px solid #2563eb;border-radius:14px;overflow:hidden;margin-bottom:10px}
.dx2-bigh{background:#2563eb;color:#fff;font-weight:600;font-size:16px;min-height:46px;display:flex;align-items:center;justify-content:center}
.dx2-bigph{display:flex;align-items:center;justify-content:center;margin:8px;min-height:70px;border:1px dashed #2563eb;border-radius:10px;background:#eff6ff;color:#1d4ed8;font-size:17px;cursor:pointer}
.dx2-done{display:flex;justify-content:space-between;align-items:center;border:1px solid #e2e8f0;border-radius:12px;padding:10px 14px;margin-bottom:10px;font-size:15px}
.dx2-done b{color:#16a34a}
.dx2-r{display:flex;align-items:center;width:100%;min-height:50px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;padding:0 14px;margin-bottom:6px;font:inherit;font-size:16px;text-align:left;cursor:pointer}
.dx2-r.on{background:#2563eb;color:#fff;border-color:#2563eb;font-weight:600}
.dx2-check .btn,.dx2 ~ .btn{min-height:54px}

/* ===== Kompakte mobile Eingabe: Auftrag & Kunde ===== */
.qj .job-step{padding:12px !important}
.qj-l{font-size:14px;font-weight:600;margin:10px 0 6px;color:#0f172a}
.qj-tiles{display:grid;gap:6px;margin-bottom:8px}
.qj-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.qj-cust .qj-3{grid-template-columns:repeat(auto-fit,minmax(78px,1fr))}
.qj-t{min-height:50px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;font:inherit;font-size:15px;color:#0f172a;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px;cursor:pointer;text-align:center}
.qj-t small{font-size:11px;line-height:1.2}
.qj-t.on{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:600}
.qj-more{background:none;border:0;color:#2563eb;font:inherit;font-size:13px;padding:2px 0 6px;cursor:pointer}
.qj .job-step:not(.qj-open) .plan-pills,.qj .job-step:not(.qj-open) .job-month,.qj .job-step:not(.qj-open) .plan-note,.qj .job-step:not(.qj-open) .job-plans{display:none !important}
.qj-drive{font-size:13px;color:#1d4ed8;background:#eff6ff;border-radius:9px;padding:7px 10px;margin:6px 0 0}
.qj-drive:empty{display:none}
.qj-drive.bad{color:#92400e;background:#fef3c7}
.qj-step{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:12px;margin:10px 0}
.qj-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.qj-c{border:1px solid #cbd5e1;border-radius:16px;background:#fff;font:inherit;font-size:14px;padding:7px 12px;cursor:pointer}
.qj-c.on{background:#eff6ff;border-color:#2563eb;color:#1d4ed8;font-weight:600}
.qj-c.warn{background:#fef3c7;border-color:#fcd34d;color:#92400e}
.qj-c.warn.on{background:#f59e0b;border-color:#f59e0b;color:#fff}
.qj-step textarea[name=info]{min-height:90px}
.qj .team-quick button{min-height:50px;font-size:15px}
.qj input,.qj select,.qj textarea,.qj-cust input,.qj-cust select,.qj-cust textarea{font-size:16px !important}
.qj-hide{display:none !important}
.qj-salbox{margin-bottom:6px;grid-column:1/-1}
.qj-cmore{margin:8px 0;grid-column:1/-1}
.qj-cmore summary{cursor:pointer;color:#475569;font-size:14px;padding:6px 0}
.qj-cust{grid-template-columns:1fr !important}

/* ===== Doppelbelegung / Auswahl / Wartend ===== */
.dx-clash{background:#fef3c7;color:#92400e;border-radius:12px;padding:12px;margin:10px 0;display:flex;flex-direction:column;gap:6px;font-size:14px}
.dx-clash b{font-size:15px}
.dx-clash .btn{min-height:48px;margin:0}
.dx-choose-info{background:#eff6ff;color:#1d4ed8;border-radius:12px;padding:12px;font-size:15px;font-weight:600;text-align:center;margin:8px 0}
.dx-choose article.card.mini{border:2px solid #2563eb}
.dx-choose article.card.mini [data-act="start-job"]{background:#2563eb;color:#fff;border-color:#2563eb;min-height:50px;width:100%;font-size:16px}
.dx-w-sub{color:#64748b;margin:-4px 0 6px;text-align:center}
.dx-w-detail,.dx-w-date{width:100%;box-sizing:border-box;min-height:46px;border:1px solid #cbd5e1;border-radius:10px;padding:8px 12px;font:inherit;font-size:16px;margin-bottom:6px}
.dx-w-note{font-size:13px;color:#64748b;margin:6px 0}
.dx-w-panel{margin-bottom:14px}
.dx-w-h{margin:0 0 8px;font-size:16px}
.dx-w-h.bad{color:#b91c1c}
.dx-w-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;margin-bottom:8px;font-size:13px;color:#475569}
.dx-w-row>div:first-child{flex:1;min-width:180px}
.dx-w-row b{display:block;color:#0f172a;font-size:14px}
.dx-w-row.bad{border-color:#fca5a5;background:#fef2f2}
.dx-w-pill{background:#e2e8f0;color:#334155;border-radius:10px;padding:3px 9px;font-size:12px;white-space:nowrap}
.dx-w-pill.due{background:#f59e0b;color:#fff}
.dx-w-act{display:flex;gap:6px;width:100%}
.dx-w-act .btn{flex:1;min-height:42px;margin:0}

/* ===== Umschalter Admin / Unterwegs ===== */
#dxv-switch{position:fixed;top:6px;right:10px;z-index:9000;display:flex;gap:2px;background:#e2e8f0;border-radius:20px;padding:3px;box-shadow:0 2px 8px rgba(15,23,42,.15)}
#dxv-switch button{border:0;background:transparent;font:inherit;font-size:13px;padding:6px 12px;border-radius:16px;color:#334155;cursor:pointer}
#dxv-switch button.on{background:#2563eb;color:#fff;font-weight:600}
@media print{#dxv-switch{display:none}}

/* ===== Ladeleiste nach dem Start ausblenden, Leiste unten bleibt sichtbar ===== */
body.is-phone #booting,body.is-desk #booting{display:none !important}
body.is-login #booting{display:none !important}
.bill-warn{border-left:4px solid #f59e0b;background:#fff8e6}
.bill-warn h2{color:#92400e}
.bill-warn .cal-note{color:#7a4c0a;font-weight:600}
body.is-phone.has-dxv #main{padding-top:52px}

/* DX4 Wartend mit Zeitfenster */
.dx4-card{background:#fff;border:1px solid #e3e7ee;border-left:5px solid #c9ced8;border-radius:10px;padding:12px 14px;margin:10px 0}
.dx4-card.red{border-left-color:#d93a3a}.dx4-card.amber{border-left-color:#e9a227}.dx4-card.green{border-left-color:#5aa02c}
.dx4-t{font-weight:600;font-size:16px}.dx4-p{font-weight:400;color:#667}
.dx4-n{color:#556;font-size:14px;margin-top:3px}
.dx4-chips{margin-top:8px;display:flex;flex-wrap:wrap;gap:6px}
.dx4-chip{font-size:13px;padding:3px 9px;border-radius:7px;background:#eef1f5;color:#445}
.dx4-chip.red{background:#fde8e8;color:#a32424}.dx4-chip.amber{background:#fdf1dc;color:#8a5a08}.dx4-chip.green{background:#e8f4dc;color:#356b13}.dx4-chip.due{background:#2563eb;color:#fff}
.dx4-bar{position:relative;height:10px;border-radius:5px;background:#eef1f5;margin:22px 0 4px}
.dx4-fill{position:absolute;top:0;bottom:0;border-radius:5px}.dx4-fill.red{background:#d93a3a}.dx4-fill.amber{background:#e9a227}.dx4-fill.green{background:#7bbf45}
.dx4-now{position:absolute;top:-5px;width:2px;height:20px;background:#111}
.dx4-now span{position:absolute;top:-16px;left:50%;transform:translateX(-50%);font-size:11px;color:#556;white-space:nowrap}
.dx4-scale{display:flex;justify-content:space-between;font-size:11px;color:#889}
.dx-w-h small{font-weight:400;font-size:12px;color:#778;margin-left:6px}.dx4-poolh{margin-top:18px}

/* DX5 Auftragsfenster */
#dx5 .dx5-bg{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:9999;display:flex;justify-content:center;align-items:flex-start;overflow-y:auto;padding:12px 8px}
#dx5 .dx5-sh{background:#fff;border-radius:14px;width:100%;max-width:520px;padding:16px;box-sizing:border-box}
#dx5 .dx5-top{display:flex;gap:10px;align-items:flex-start;margin-bottom:8px}#dx5 .dx5-top>div{flex:1}
#dx5 .dx5-ti{font-size:18px;font-weight:600}#dx5 .dx5-ad{font-size:14px;color:#667;margin-top:2px}
#dx5 .dx5-x{border:0;background:#eef1f5;border-radius:50%;width:38px;height:38px;font-size:18px}
#dx5 .dx5-sec{border-top:1px solid #e3e7ee;margin-top:12px;padding-top:12px}
#dx5 h4{margin:0 0 8px;font-size:15px}
#dx5 .dx5-row{display:flex;gap:8px}#dx5 .dx5-row>label{flex:1;min-width:0}
#dx5 label{display:block;font-size:12px;color:#667}
#dx5 input[type=date],#dx5 input[type=time],#dx5 input[type=text],#dx5 input[type=number],#dx5 select,#dx5 textarea{display:block;width:100%;box-sizing:border-box;font-size:15px;padding:8px;border:1px solid #cfd5df;border-radius:8px;margin-top:3px;color:#111;background:#fff}
#dx5 .dx5-lb{font-size:12px;color:#667;margin:10px 0 4px}
#dx5 .dx5-pills{display:flex;flex-wrap:wrap;gap:6px}
#dx5 .dx5-pills button,#dx5 .dx5-ck{border:1px solid #cfd5df;background:#fff;border-radius:8px;padding:7px 10px;font-size:14px;color:#223;display:inline-flex;align-items:center;gap:5px}
#dx5 .dx5-ck input{margin:0}
#dx5 .dx5-ap{border:1px solid #e3e7ee;border-radius:10px;padding:10px;margin-bottom:8px}
#dx5 .dx5-who{font-size:13px;color:#445;margin:6px 0}
#dx5 .dx5-del{border:0;background:none;color:#b42323;font-size:13px;padding:0}
#dx5 .dx5-new summary{color:#2563eb;font-size:15px;padding:6px 0;cursor:pointer}
#dx5 .dx5-foot{display:flex;flex-direction:column;gap:8px;margin-top:16px}#dx5 .dx5-foot .btn{width:100%;padding:12px}
#dx5 .dx5-msg{color:#b42323;font-size:13px;text-align:center}
.dx4-card[data-dx4-id]{cursor:pointer}

/* DX6 Auftrag entfernen */
#dx6 .dx6-bg{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px}
#dx6 .dx6-sh{background:#fff;border-radius:14px;width:100%;max-width:420px;padding:18px;box-sizing:border-box}
#dx6 .dx6-t{font-size:18px;font-weight:600}#dx6 .dx6-sub{font-size:14px;color:#556;margin:4px 0 12px}
#dx6 .dx6-r{display:flex;align-items:center;gap:10px;border:1px solid #cfd5df;border-radius:10px;padding:12px;margin-bottom:8px;font-size:15px;color:#111}
#dx6 .dx6-warn{background:#fdf1dc;color:#8a5a08;border-radius:8px;padding:10px;font-size:14px;margin-bottom:10px}
#dx6 .dx6-act{display:flex;gap:8px;margin-top:8px}#dx6 .dx6-act .btn{flex:1;padding:12px}
#dx6 .dx6-red{background:#d93a3a;color:#fff;border:0}#dx6 .dx6-msg{color:#b42323;font-size:13px;text-align:center;margin-top:6px}
.dx6-link{color:#b42323 !important;background:none;border:0;font-size:13px;padding:4px 0}
#dx5 .dx6-link{margin-top:6px;font-size:14px}

/* DX7 Plantafel-Klick */
@keyframes dx7p{0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,0)}50%{box-shadow:0 0 0 4px rgba(37,99,235,.85)}}
.dx7-flash{animation:dx7p .65s ease-in-out 4;position:relative;z-index:5}
#dx5 .dx5-ap.dx5-hit{border:2px solid #2563eb;background:#eef4ff}

/* DX8 Wischen */
@keyframes dx8l{from{transform:translateX(40px);opacity:.3}to{transform:none;opacity:1}}
@keyframes dx8r{from{transform:translateX(-40px);opacity:.3}to{transform:none;opacity:1}}
section.pv-panel.dx8-l{animation:dx8l .28s ease-out}section.pv-panel.dx8-r{animation:dx8r .28s ease-out}

/* DX9 Zurück-Hinweis */
#dx9-toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%) translateY(20px);background:#222;color:#fff;padding:10px 16px;border-radius:20px;font-size:14px;opacity:0;pointer-events:none;transition:all .2s;z-index:10001;white-space:nowrap}
#dx9-toast.on{opacity:.92;transform:translateX(-50%)}

/* DX10 Zähler + To-do-Ablauf */
[data-page],.tabbar [data-tab],.tabbar [data-tab-more]{position:relative}
.dx10-b{position:absolute;top:2px;right:6px;min-width:18px;height:18px;padding:0 5px;box-sizing:border-box;border-radius:9px;background:#e02424;color:#fff;font:600 11px/18px system-ui,sans-serif;font-style:normal;text-align:center;pointer-events:none}
.side [data-page] .dx10-b,.side-nav [data-page] .dx10-b{top:50%;transform:translateY(-50%);right:10px}
.tabbar .dx10-b{top:0;right:calc(50% - 22px)}
#dx10-panel .dx10-hd{font-weight:600;font-size:17px;margin-bottom:8px}#dx10-panel .dx10-hd small{font-weight:400;font-size:12px;color:#778;margin-left:8px}
.dx10-card{border:1px solid #e3e7ee;border-radius:10px;padding:12px 14px;margin:10px 0;background:#fff}
.dx10-tg{display:inline-block;font-size:12px;padding:2px 8px;border-radius:6px;margin-bottom:6px}.dx10-tg.warn{background:#fdf1dc;color:#8a5a08}.dx10-tg.acc{background:#e6f0fd;color:#1d4fa8}.dx10-tg.red{background:#fde8e8;color:#a32424}
.dx10-t{font-weight:600;font-size:15px}.dx10-s{font-size:13px;color:#667;margin-top:3px}
.dx10-q{font-size:14px;font-weight:600;margin:10px 0 8px}
.dx10-r{display:flex;gap:6px;margin-top:6px}.dx10-r button{flex:1;padding:10px 6px;border:1px solid #cfd5df;border-radius:8px;background:#fff;font-size:14px;color:#223}
.dx10-r button.dx10-pri{background:#2563eb;color:#fff;border-color:#2563eb}
.dx10-steps{display:flex;gap:4px;margin:8px 0 2px}.dx10-steps span{flex:1;height:4px;border-radius:2px;background:#e3e7ee}.dx10-steps .d{background:#1d9e75}
.dx10-d{display:block;width:100%;box-sizing:border-box;font-size:15px;padding:8px;border:1px solid #cfd5df;border-radius:8px}

[data-home-go]{position:relative}[data-home-go] .dx10-b{top:6px;right:6px}

/* DX11 Meldungen-Ablauf */
.dx11-box{border-top:1px solid #e3e7ee;margin-top:10px;padding-top:6px}

/* DX12 Unterwegs-Start */
#main.dx12-on{background:#E6F1FB}
.dx12-replaced{background:#185FA5 !important;border:0 !important;border-radius:20px !important;color:#fff}
.dx12-nx .dx12-lb{font-size:11px;color:#B5D4F4;letter-spacing:.04em}
.dx12-nx .dx12-h{font-size:19px;font-weight:600;margin:4px 0;color:#fff}
.dx12-nx .dx12-a{font-size:14px;color:#E6F1FB;margin:0 0 12px}
.dx12-wait{background:rgba(255,255,255,.15);border-radius:14px;padding:12px;text-align:center;font-size:14px;color:#fff}
.dx12-go{display:flex !important;align-items:center;justify-content:center;gap:10px;width:100%;background:#1D9E75 !important;border-color:#1D9E75 !important;color:#fff !important;border-radius:16px !important;padding:16px !important;font-size:18px !important;font-weight:600 !important;box-shadow:0 6px 16px -8px rgba(29,158,117,.8)}
.dx12-ico{font-size:22px}
#dx12{margin-top:6px;padding-bottom:20px}
.dx12-hl{font-size:18px;color:#0C447C;margin:18px 2px 4px}
.dx12-day{margin-top:14px}
.dx12-dh{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.dx12-dn{background:#185FA5;color:#fff;border-radius:12px;width:46px;height:46px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1;flex:none}
.dx12-dn b{font-size:18px}.dx12-dn span{font-size:10px;color:#B5D4F4}
.dx12-dt b{display:block;font-size:16px;color:#0C447C}.dx12-dt span{font-size:13px;color:#185FA5}
.dx12-job{background:#fff;border-radius:14px;padding:10px 12px;border-left:6px solid var(--c);box-sizing:border-box;display:flex;flex-direction:column;cursor:pointer}
.dx12-job.done{opacity:.5}
.dx12-tm{font-size:12px;color:#5F5E5A;display:flex;justify-content:space-between}
.dx12-t{font-size:15px;font-weight:600;color:#042C53;margin-top:2px;line-height:1.3}
.dx12-s{font-size:13px;color:#5F5E5A;margin-top:1px}
.dx12-tg{margin-top:auto;display:flex;gap:6px;flex-wrap:wrap;padding-top:6px}
.dx12-tg span{font-size:12px;color:#185FA5;background:#E6F1FB;border-radius:20px;padding:1px 9px}
.dx12-dr{font-size:13px;color:#185FA5;padding:6px 0 6px 14px;display:flex;align-items:center;gap:8px}
.dx12-dr i{font-style:normal}
.dx12-more{display:block;width:100%;margin-top:16px;background:#fff;border:1px solid #B5D4F4;color:#185FA5;border-radius:14px;padding:12px;font-size:15px}

/* DX13 Mitarbeiteransicht */
#dx13-sheet .dx13-bg{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:10002;display:flex;align-items:flex-end;justify-content:center}
#dx13-sheet .dx13-box{background:#fff;border-radius:20px 20px 0 0;width:100%;max-width:480px;padding:16px;box-sizing:border-box;max-height:80vh;overflow-y:auto}
#dx13-sheet .dx13-hd{font-size:16px;font-weight:600;color:#0C447C;margin-bottom:8px}
#dx13-sheet .dx13-p{display:flex;align-items:center;gap:12px;width:100%;background:none;border:0;border-top:1px solid #e3e7ee;padding:12px 4px;text-align:left}
#dx13-sheet .dx13-av{width:36px;height:36px;border-radius:50%;background:#E6F1FB;color:#185FA5;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;flex:none}
#dx13-sheet .dx13-p b{flex:1;font-size:15px;color:#042C53}#dx13-sheet .dx13-p small{font-size:12px;color:#5F5E5A}
#dx13-sheet .dx13-cancel{width:100%;margin-top:10px;border:1px solid #cfd5df;background:#fff;border-radius:12px;padding:12px;font-size:15px}
#dx13-ban{position:fixed;left:8px;right:8px;top:56px;z-index:9998;background:#FAEEDA;color:#633806;border-radius:12px;padding:8px 10px 8px 12px;font-size:13px;display:flex;align-items:center;gap:8px;box-shadow:0 4px 14px -6px rgba(0,0,0,.25)}
#dx13-ban b{font-weight:600}#dx13-ban button{margin-left:auto;background:#fff;border:0;border-radius:8px;padding:6px 10px;font-size:13px;color:#633806}
body.dx13-ro #main{padding-top:52px}
body.dx13-ro #main button:not(.dx12-more),body.dx13-ro #main [data-act]{opacity:.55}
body.dx13-ro .dx12-go{background:#9FE1CB !important;border-color:#9FE1CB !important;color:#085041 !important;box-shadow:none}

.dx12-tg{margin-top:0 !important}
.dx12-info{margin-top:8px;font-size:13px;color:#444441;line-height:1.45;white-space:pre-line;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;border-top:1px dashed #d3d1c7;padding-top:8px}
#dx13-ban{top:auto !important;bottom:calc(84px + env(safe-area-inset-bottom));}
body.dx13-ro #main{padding-top:0 !important;padding-bottom:150px}

/* DX12b Arbeitsbilder */
.dx12-trow{display:flex;align-items:center;gap:10px;margin-top:4px}
.dx12-img{width:48px;height:48px;border-radius:10px;object-fit:contain;background:#fff;border:1px solid #e3e7ee;flex:none}
.dx12-hrow{display:flex;align-items:center;gap:12px;margin:6px 0 4px}
.dx12-himg{width:64px;height:64px;border-radius:14px;object-fit:contain;background:#fff;flex:none}

/* DX12c Fahrt proportional */
.dx12-dr{box-sizing:border-box;border:1.5px dashed #85B7EB;border-radius:12px;background:rgba(255,255,255,.45);margin:6px 0 6px 14px;display:flex !important;flex-direction:column;justify-content:center;gap:1px;padding:4px 12px !important;min-height:30px;color:#185FA5}
.dx12-dr b{font-size:13px;font-weight:600}.dx12-dr span{font-size:12px}
.dx12-dr.one{flex-direction:row;align-items:center;gap:6px}.dx12-dr.one span:before{content:"· "}

.dx12-van{height:14px;width:auto;vertical-align:-2px;margin-right:6px}

.dx14-off{opacity:.4;pointer-events:none;filter:grayscale(1)}
.dx14-x{display:block;margin:10px auto 0;background:none;border:0;color:#64748b;font-size:15px;padding:8px 12px;cursor:pointer;text-decoration:underline}

.dx12-dr .dx12-tag{font-size:14px;line-height:1.3;margin-bottom:2px}
.dx12-dr .dx12-tag b{font-weight:700}
.dx12-dr:has(.dx12-tag){height:auto!important;min-height:64px}

.dx12-job{display:flex;flex-direction:column}
.dx12-info.dx15{display:block;-webkit-line-clamp:unset;flex:1 1 0;min-height:1.4em;overflow:hidden;white-space:pre-line}
.dx15-open .dx12-info.dx15{flex:none;overflow:visible}
.dx15-more{align-self:center;margin-top:6px;background:#eef4ff;border:1px solid #bcd0f5;color:#1d4ed8;border-radius:999px;padding:3px 14px;font-size:13px;cursor:pointer}

.dx16 h2{margin:0 0 4px}.dx16 h3{margin:14px 0 6px;font-size:16px}
.dx16-sub{color:#64748b;font-size:13px;margin:0 0 6px}
.dx16-yn{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 4px}
.dx16-yn button{padding:14px;border-radius:12px;border:1.5px solid #cbd5e1;background:#fff;font-size:17px;font-weight:600}
.dx16-yn button.on{border:2px solid #2563eb;background:#eff6ff;color:#1e3a8a}
.dx16-task{display:flex;gap:8px;align-items:flex-start;text-align:left;padding:6px 0;font-size:15px}
.dx16-task input{margin-top:3px;width:18px;height:18px;flex:none}
.dx16-hbox{display:inline-flex;align-items:center;gap:8px;border:2px solid #2563eb;border-radius:12px;padding:6px 14px;background:#eff6ff}
.dx16-hbox input{width:70px;border:0;background:transparent;font-size:22px;font-weight:600;text-align:right;color:#1e3a8a;outline:none;box-shadow:none;padding:0}
.dx16-hbox span{font-size:17px;color:#1e3a8a}
.dx16-note textarea{width:100%;min-height:56px;margin-top:12px;border-radius:10px;border:1px solid #cbd5e1;padding:8px;font:inherit}
.dx16 .btn{margin-top:10px}
#modal .dialog:has(.dx16){max-height:90vh;overflow:auto}

.dx16-hbox input{background:transparent!important;border:0!important;box-shadow:none!important;min-height:0}

.dx17 h2{margin:0 0 6px}.dx17 p{margin:0 0 12px}.dx17 .btn{margin-top:8px;width:100%}.dx17-alt{margin-top:12px}.dx17-q{margin:12px 0 4px!important;font-weight:600}.dx17 .dx16-hbox input{width:110px;font-size:20px}

.dx18-bg{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:9998}
.dx18-card{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(440px,94vw);max-height:88vh;overflow:auto;background:#fff;border-radius:16px;padding:16px;z-index:9999;box-shadow:0 10px 40px rgba(0,0,0,.25);font-size:15px}
.dx18-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.dx18-head button{border:0;background:none;font-size:20px;cursor:pointer}
.dx18-sw{display:flex;gap:8px;align-items:flex-start;padding:10px;border:1.5px solid #bcd0f5;border-radius:12px;background:#eff6ff}.dx18-sw span{display:block;color:#64748b;font-size:12px}
.dx18-card h4{margin:16px 0 6px;display:flex;justify-content:space-between;align-items:center}
.dx18-row{display:flex;gap:6px;flex-wrap:wrap}.dx18-row select{flex:1;min-width:140px}
.dx18-list div{padding:6px 0;border-bottom:1px solid #eef2f7;font-size:14px}.dx18-mut{color:#94a3b8}
.dx18-list button,.dx18-card h4 button,.dx18-row button{border:1px solid #cbd5e1;background:#fff;border-radius:8px;padding:3px 10px;cursor:pointer;font-size:13px}
.dx18m h2,.dx18e h2{font-size:19px}.dx18m .dx16-hbox{margin:4px 0 8px 26px}.dx18e .dx16-hbox input,.dx18m .dx16-hbox input{width:110px;font-size:20px}

.dx19-other{display:block;margin:8px auto 0;background:none;border:0;color:#1d4ed8;text-decoration:underline;font-size:14px;cursor:pointer;padding:4px 8px}

.dx20-row{display:flex;align-items:center;gap:8px;margin:6px 0}.dx20 .dx16-hbox input{width:100px;font-size:18px}.dx20 textarea{width:100%;min-height:70px;border-radius:10px;border:1px solid #cbd5e1;padding:8px;font:inherit}.dx20 h3{margin:12px 0 4px;font-size:16px}

.dx22 .btn{width:100%;margin-top:8px}.dx22 h3{margin:14px 0 6px;font-size:15px}.dx22 input[type=search]{width:100%;padding:10px;border-radius:10px;border:2px solid #2563eb;background:#eff6ff;font-size:16px}.dx22-hit{display:block;width:100%;text-align:left;margin-top:6px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font-size:14px;cursor:pointer}.dx22-hit span{color:#64748b;font-size:12px}

.dx22-hit{text-align:left}.dx22-c,.dx22-j{display:block;width:100%;text-align:left;background:none;border:0;padding:0;cursor:pointer;font-size:15px;color:#0f172a}.dx22-j{margin-top:6px;background:#eff6ff;border:1px solid #bcd0f5;border-radius:8px;padding:6px 8px;color:#1e3a8a;font-size:14px}.dx22-hit span,.dx22-j span{color:#64748b;font-size:12px;font-weight:400}.dx22 h3{text-align:center;font-size:17px}

.home-times.dx25{display:flex;flex-direction:column;gap:10px}
.dx25-head{display:flex;justify-content:space-between;align-items:center;font-size:17px}.dx25-head span{font-size:12px;color:#64748b}
.dx25-c{background:#fff;border:1px solid #e2e8f0;border-left:6px solid #cbd5e1;border-radius:12px;padding:10px 12px}
.dx25-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.dx25-top b{font-size:16px}.dx25-top span{border-radius:999px;padding:2px 10px;font-size:12px;background:#e2e8f0;color:#334155;white-space:nowrap}
.dx25-l{font-size:14px;margin-top:4px}.dx25-s{font-size:13px;color:#475569;margin-top:2px}.dx25-m{font-size:12px;color:#64748b;margin-top:4px}.dx25-w{font-size:12px;color:#b45309;margin-top:4px}
.dx25-pause{border-left-color:#3b82f6}.dx25-pause .dx25-top span{background:#dbeafe;color:#1e40af}
.dx25-work{border-left-color:#f59e0b}.dx25-work .dx25-top span{background:#fef3c7;color:#92400e}
.dx25-drive{border-left-color:#64748b}
.dx25-red{border-left-color:#dc2626}.dx25-red .dx25-top span{background:#fee2e2;color:#991b1b}
.dx25-free{opacity:.75}.dx25-load{color:#64748b;padding:8px}

.desk-head .desk-search.dx27-bar{display:flex;align-items:center;gap:8px;width:100%;max-width:640px;margin:12px 0 0;background:#fff;border:2px solid #2563eb;border-radius:14px;padding:8px 12px;box-shadow:0 2px 8px rgba(37,99,235,.12)}
.dx27-bar input{flex:1;border:0!important;outline:none;box-shadow:none!important;background:transparent!important;font-size:16px;padding:4px 0;min-width:0}
.dx27-bar .desk-search-clear{border:0;background:none;color:#94a3b8;font-size:16px;cursor:pointer}.dx27-lupe{font-size:17px}
.dx27{display:flex;flex-direction:column;gap:6px}.dx27-h{margin:10px 0 2px;font-size:17px}.dx27-g{font-size:12px;font-weight:700;color:#64748b;margin:10px 4px 0;letter-spacing:.02em}
.dx27-hit{display:block;width:100%;text-align:left;background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;cursor:pointer;font:inherit;color:#0f172a}
.dx27-hit b{display:block;font-size:15px}.dx27-hit span{display:block;font-size:13px;color:#475569}.dx27-hit em{display:block;font-style:normal;font-size:13px;color:#334155;margin-top:4px}
.dx27 mark{background:#fde68a;border-radius:3px;padding:0 1px}.dx27-none{color:#64748b}
@media (max-width:760px){#desk .desk-head{padding-top:58px}}

.dx28-go{display:block;width:100%;margin-top:12px;background:#22c55e;color:#fff;border:0;border-radius:14px;padding:14px;font-size:17px;font-weight:700;cursor:pointer}.dx28-info{text-align:center;font-size:12px;opacity:.85;margin-top:6px;color:#fff}

/* DX31 */
#tabs button[data-tab="calendar"]{position:relative}
.dx31-dot{position:absolute;top:6px;right:22%;width:10px;height:10px;border-radius:50%;background:#dc2626;box-shadow:0 0 0 2px #fff}
#dx31-ban{background:#fef2f2;border:1px solid #fecaca;border-radius:14px;padding:12px;margin:10px 12px}
#dx31-ban .dx31-row{margin-bottom:8px}#dx31-ban .dx31-row b{color:#b91c1c}
#dx31-ban .dx31-act{text-align:right}#dx31-ban button{border:1px solid #cbd5e1;background:#fff;border-radius:10px;padding:8px 14px;font:inherit}

/* DX32 */
.dx32-sw{margin:10px 0}
.dx32-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-top:8px;padding-bottom:6px}
.dx32-g{display:grid;gap:3px;align-items:center;min-width:max-content}
.dx32-corner{font-size:12px;font-weight:600;position:sticky;left:0;background:#fff;z-index:2}
.dx32-d{text-align:center;font-size:10px;color:#64748b;cursor:pointer;line-height:1.2}.dx32-d b{display:block;font-size:12px;color:#0f172a}
.dx32-d.we{opacity:.5}.dx32-d.now b{color:#dc2626}
.dx32-n{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:sticky;left:0;background:#fff;z-index:1;padding-right:4px}
.dx32-sum{font-weight:700}
.dx32-p{text-align:center;font-size:10px;font-weight:700}.dx32-p.f{color:#16a34a}.dx32-p.m{color:#c2410c}.dx32-p.h{color:#dc2626}
.dx32-t{grid-column:1/-1;text-align:left;border:0;background:none;font:inherit;font-size:12px;font-weight:700;color:#475569;padding:6px 0 2px;position:sticky;left:0;cursor:pointer}
.dx32-x{height:26px;border-radius:5px;cursor:pointer;text-align:center;font-size:11px;font-weight:700;line-height:26px}
.dx32-x.f{background:repeating-linear-gradient(135deg,#dcfce7 0 4px,#f0fdf4 4px 8px);border:1px solid #bbf7d0}
.dx32-x.l{background:#fde68a}.dx32-x.m{background:#fb923c}.dx32-x.h{background:#dc2626}
.dx32-x.k{background:#e2e8f0;cursor:default}.dx32-x.s{background:#fecaca;color:#991b1b}.dx32-x.u{background:#bfdbfe;color:#1e3a8a}
.dx32-x.now{outline:2px solid #2563eb;outline-offset:1px}
.dx32-leg{display:flex;flex-wrap:wrap;gap:10px;font-size:12px;margin-top:10px}.dx32-leg span{display:flex;align-items:center;gap:4px}.dx32-leg i{display:inline-block;width:16px;height:14px;line-height:14px}

/* DX33 */
.dx33{text-align:center}.dx33-i{font-size:34px}.dx33 p{color:#475569;margin:6px 0 14px}.dx33 .btn{display:block;width:100%;margin-top:8px}

/* DX34 */
.dx34-box{background:#f8fafc;border-radius:12px;padding:10px 12px;margin:10px 0 12px;text-align:left}.dx34-box div{display:flex;justify-content:space-between}.dx34-box div+div{color:#475569;margin-top:2px}
.dx34 .dx34-g{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dx34 label{display:block;font-size:13px}.dx34 input,.dx34 textarea{width:100%;box-sizing:border-box;margin-top:4px}
.dx34-l{margin-top:10px}.dx34-hint{background:#fef3c7;color:#92400e;border-radius:10px;padding:8px;font-size:12px;margin-top:10px}.dx34 .btn{display:block;width:100%;margin-top:8px}
#dx34-bar{position:fixed;left:12px;right:12px;bottom:calc(92px + env(safe-area-inset-bottom));z-index:9000;background:#1e293b;color:#fff;border-radius:14px;padding:10px 14px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:14px;box-shadow:0 8px 24px rgba(0,0,0,.25);max-width:460px;margin:0 auto}
#dx34-bar button{background:none;border:0;color:#93c5fd;font:inherit;font-weight:700;padding:4px}

/* DX36 */
.dx36-l{font-weight:700;margin:4px 0 6px;text-align:left}.dx36-p{display:flex;align-items:center;gap:10px;border:1px solid #cbd5e1;border-radius:12px;padding:11px 12px;margin-bottom:6px;font-size:16px;text-align:left}.dx36-p input{width:22px;height:22px}
.dx36-p:has(input:checked){border:2px solid #2563eb;background:#eff6ff}.dx36-h{font-size:12px;color:#64748b;margin:2px 0 10px;text-align:left}.dx36-fix{margin-top:8px}

/* DX37 */
#dx37{background:#fff;border:2px solid #2563eb;border-radius:18px;padding:14px;margin:10px 12px}#dx37 .dx37-h{font-size:17px}#dx37 .dx37-a{color:#475569;margin:4px 0 10px}#dx37 .btn{display:block;width:100%;margin-top:8px}

/* DX39 Besichtigungsmaske */
#dx39{position:fixed;inset:0;z-index:9600;background:#f1f5f9;display:flex;flex-direction:column;font-size:16px}
.dx39-top{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;padding:12px 14px;border-bottom:1px solid #e2e8f0}.dx39-top button{border:0;background:none;font:inherit;color:#2563eb;font-weight:600;padding:6px}.dx39-top b{font-size:16px;text-align:center}
.dx39-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 14px 20px}
.dx39-head{background:#fff;border-radius:16px;padding:14px;margin-bottom:12px}.dx39-head b{display:block;font-size:18px}.dx39-head span{color:#475569}.dx39-head small{display:block;color:#16a34a;margin-top:4px}
.dx39-tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}.dx39-tile{background:#fff;border:3px solid #cbd5e1;border-radius:16px;padding:16px 12px;font:inherit;font-weight:700;text-align:left;min-height:84px}.dx39-tile i{display:block;font-style:normal;color:#64748b;font-size:13px}
.dx39-tile.g{border-color:#16a34a}.dx39-tile.o{border-color:#f59e0b}.dx39-tile.x{border-color:#cbd5e1}
.dx39-leg{display:flex;gap:12px;font-size:12px;margin-top:10px;color:#475569}.dx39-leg span:before{content:"";display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:4px;vertical-align:-2px;border:3px solid}.dx39-leg .g:before{border-color:#16a34a}.dx39-leg .o:before{border-color:#f59e0b}.dx39-leg .x:before{border-color:#cbd5e1}
.dx39-f{background:#fff;border-radius:14px;padding:12px;margin-bottom:10px}.dx39-l{font-weight:600;margin-bottom:8px}.dx39-req{font-style:normal;font-size:11px;background:#fef3c7;color:#92400e;border-radius:6px;padding:1px 6px;margin-left:4px}
.dx39-ch{display:flex;flex-wrap:wrap;gap:6px}.dx39-ch button{border:1px solid #cbd5e1;background:#fff;border-radius:999px;padding:9px 13px;font:inherit;font-size:14px}.dx39-ch button.on{background:#2563eb;color:#fff;border-color:#2563eb}
.dx39-f input,.dx39-f textarea,.dx39-miss input{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:10px;padding:10px;font:inherit;margin-top:6px}
.dx39-roll{background:#fff;border-radius:14px;margin-bottom:10px;padding:4px 12px}.dx39-roll summary{font-weight:700;padding:10px 0;cursor:pointer}.dx39-roll .dx39-f{padding:8px 0;border-top:1px solid #f1f5f9;border-radius:0}
.dx39-hint{font-size:12px;color:#64748b;margin:8px 0}
.dx39-foot{display:flex;gap:8px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e2e8f0}.dx39-foot .btn{flex:1;margin:0}
.dx39-warn{background:#fef3c7;color:#92400e;border-radius:12px;padding:10px;margin-bottom:10px;font-weight:600}.dx39-ok{background:#dcfce7;color:#166534;border-radius:12px;padding:10px;margin-bottom:10px;font-weight:600}
.dx39-miss{background:#fff;border-radius:14px;padding:12px;margin-bottom:8px}.dx39-box{margin-bottom:10px}.dx39-big{width:100%;margin-top:10px}.dx39-big[disabled]{opacity:.5}

/* DX41: Umschalter Admin/Unterwegs ausblenden, solange ein Fenster offen ist (keine Überlappung) */
body:has(#modal:not([hidden])) #dxv-switch,body:has(#dx39) #dxv-switch{display:none!important}

/* DX43 Entsorgung */
#dx43{position:fixed;inset:0;z-index:9600;background:#f1f5f9;display:flex;flex-direction:column;font-size:16px}
body:has(#dx43) #dxv-switch{display:none!important}
.dx43-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.dx43-two .btn{margin:0}
.dx43-hint{font-size:12px;color:#64748b;margin:4px 0}
.dx43-pics{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}.dx43-pic{width:72px;height:72px;border-radius:10px;background-size:cover;background-position:center;position:relative}.dx43-pic button{position:absolute;top:-6px;right:-6px;width:24px;height:24px;border-radius:50%;border:0;background:#0f172a;color:#fff;font-size:12px}
.dx43-add{width:72px;height:72px;border-radius:10px;border:2px dashed #2563eb;display:flex;align-items:center;justify-content:center;font-size:26px;cursor:pointer}.dx43-add input{display:none}
.dx43-row{display:flex;justify-content:space-between;align-items:center;border:1px solid #e2e8f0;border-radius:10px;padding:6px 10px;margin-top:6px}.dx43-row button{width:34px;height:34px;border-radius:50%;border:1px solid #cbd5e1;background:#fff;font-size:18px}.dx43-row b{display:inline-block;min-width:62px;text-align:center}
.dx43-sum{text-align:right;margin-top:8px}
.dx43-list{display:flex;flex-direction:column;gap:6px}.dx43-list button{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid #cbd5e1;background:#fff;border-radius:12px;padding:10px 12px;font:inherit;text-align:left}.dx43-list button small{color:#16a34a;font-size:12px;white-space:nowrap}.dx43-list button.zu small{color:#94a3b8}.dx43-list button.zu{color:#94a3b8}.dx43-list button.on{background:#2563eb;color:#fff;border-color:#2563eb}.dx43-list button.on small{color:#fff}
.dx43-card{background:#fff;border:2px solid #16a34a;border-radius:18px;padding:14px;margin:10px 12px}.dx43-card .btn{display:block;width:100%;margin-top:8px}

/* DX44 */
.dx44{grid-column:1/-1;text-align:left;margin:6px 0}.dx44-l{font-weight:600;font-size:14px;margin:10px 0 4px}.dx44-pre{font-size:12px;background:#dcfce7;color:#166534;border-radius:8px;padding:6px 8px}
.dx44-ch{display:flex;flex-wrap:wrap;gap:6px}.dx44-ch button{border:1px solid #cbd5e1;background:#fff;border-radius:999px;padding:8px 12px;font:inherit;font-size:14px}.dx44-ch button.on{background:#2563eb;color:#fff;border-color:#2563eb}
.dx44 .dx43-row{display:flex;justify-content:space-between;align-items:center;border:1px solid #e2e8f0;border-radius:10px;padding:4px 8px;margin-top:4px;font-size:14px}.dx44 .dx43-row button{width:32px;height:32px;border-radius:50%;border:1px solid #cbd5e1;background:#fff;font-size:17px}.dx44 .dx43-row b{display:inline-block;min-width:58px;text-align:center}
.dx2-f.on:has(.dx44){grid-column:1/-1}

/* DX45: Fenster "Auftrag abschließen" in App-Optik */
#modal .file-dialog label{display:block;font-weight:600;font-size:15px;margin:14px 0 6px;color:#0f172a}
#modal .file-dialog .done-modes label{display:flex;align-items:center;gap:10px;font-weight:500;margin:0 0 8px;border:1px solid #e2e8f0;border-radius:12px;padding:12px 14px;background:#fff}
#modal .file-dialog .done-modes label:has(input:checked){border:2px solid #2563eb;background:#eff6ff}
#modal .file-dialog textarea,#modal .file-dialog input[type=text],#modal .file-dialog input[type=date],#modal .file-dialog input:not([type]),#modal .file-dialog input[inputmode]{display:block;width:100%;box-sizing:border-box;margin-top:6px;border:1px solid #cbd5e1;border-radius:12px;padding:11px 12px;font:inherit;font-weight:400;font-size:15px;background:#fff}
#modal .file-dialog textarea{min-height:70px;resize:vertical}
#modal .file-dialog input[type=file]{display:block;width:100%;box-sizing:border-box;margin-top:6px;border:2px dashed #2563eb;border-radius:12px;padding:12px;font:inherit;font-weight:400;font-size:14px;color:#334155;background:#f8fafc}
#modal .file-dialog input[type=file]::file-selector-button{border:0;background:#2563eb;color:#fff;border-radius:10px;padding:8px 12px;margin-right:10px;font:inherit;font-weight:600}
#modal .file-dialog label:has(input[type=checkbox]){display:flex;align-items:center;gap:10px;font-weight:500;border:1px solid #e2e8f0;border-radius:12px;padding:12px 14px;background:#fff}
#modal .file-dialog input[type=checkbox],#modal .file-dialog input[type=radio]{width:22px;height:22px;flex:none;margin:0}
#modal .file-dialog .done-follow-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}

/* DX46 Auftrag beenden */
#modal .dx46-dlg{max-width:440px}
.dx46 h2{margin:2px 0 2px;font-size:21px}.dx46-k{font-size:12px;color:#64748b;font-weight:700;letter-spacing:.04em}.dx46-mut{color:#64748b;font-size:14px;font-weight:400}
.dx46-top{display:flex;justify-content:space-between;align-items:center}.dx46-top button{border:0;background:none;font-size:18px;color:#64748b}
.dx46-l{font-weight:700;font-size:15px;margin:16px 0 8px}
.dx46-two{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dx46-card{border:1px solid #e2e8f0;background:#fff;border-radius:14px;padding:14px 8px;font:inherit;font-weight:700}.dx46-card i{display:block;font-style:normal;font-size:24px}.dx46-card.g{border:2px solid #16a34a;background:#f0fdf4}.dx46-card.o{border:2px solid #f59e0b;background:#fffbeb}
.dx46-side{border-left:3px solid #f59e0b;margin:8px 0 0 6px;padding-left:12px}
.dx46-task{display:flex;align-items:center;gap:10px;width:100%;border:2px solid #f59e0b;background:#fff;border-radius:12px;padding:10px;margin-bottom:6px;font:inherit;text-align:left}.dx46-task small{margin-left:auto;font-size:12px;color:#b45309}.dx46-task.ok{border:1px solid #bbf7d0;background:#f0fdf4}.dx46-task.ok small{color:#16a34a}
.dx46-cb{width:22px;height:22px;border-radius:6px;border:2px solid #f59e0b;display:flex;align-items:center;justify-content:center;flex:none;font-size:13px}.dx46-task.ok .dx46-cb{background:#16a34a;border-color:#16a34a;color:#fff}
.dx46 textarea,.dx46 input[type=month],.dx46 input[type=date]{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:12px;padding:10px 12px;font:inherit;font-size:15px}
.dx46-eff{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center}.dx46-box{border:1px solid #cbd5e1;border-radius:12px;padding:6px;text-align:center}.dx46-box small{display:block;font-size:12px;color:#64748b}.dx46-box div{display:flex;align-items:center;justify-content:center;gap:10px}.dx46-box button{width:32px;height:32px;border-radius:50%;border:1px solid #cbd5e1;background:#fff;font-size:17px}.dx46-box b{font-size:18px;min-width:30px}
.dx46-res{background:#fffbeb;border-radius:10px;padding:8px 10px;margin-top:8px;font-size:15px}
.dx46-tile{width:96px;height:72px;border-radius:12px;border:1px solid #cbd5e1;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:22px;cursor:pointer;background:#fff}.dx46-tile span{font-size:12px;font-weight:600;margin-top:2px}.dx46-tile input{display:none}
.dx46-follow{border:2px solid #2563eb;border-radius:16px;padding:12px;margin-top:16px;background:#f8fbff}.dx46-follow .dx46-top b{color:#2563eb}
.dx46-two2{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.dx46-two2 label{font-size:13px;color:#64748b}
.dx46-add{width:100%;margin-top:16px;border:2px dashed #2563eb;color:#2563eb;background:#fff;border-radius:14px;padding:14px;font:inherit;font-weight:700}
.dx46-main{width:100%;margin-top:14px;padding:15px;border-radius:14px;font-weight:700}.dx46-or{background:#f59e0b;color:#fff;border:0}
.dx46-link{display:block;width:100%;border:0;background:none;color:#2563eb;font:inherit;font-weight:600;padding:12px;margin-top:4px}
.dx46-pad{width:100%;height:160px;border:2px dashed #cbd5e1;border-radius:14px;margin-top:10px;touch-action:none;background:#fff}

#modal .dx46{text-align:left}#modal .dx46 .dx46-card,#modal .dx46 .dx46-add,#modal .dx46 .dx46-link,#modal .dx46 .dx46-main,#modal .dx46 .dx46-box{text-align:center}

/* DX47 */
.dx47-r{border:1px solid #e2e8f0!important;font-weight:600}.dx47-r.on{border:2px solid #2563eb!important;background:#eff6ff}
.dx47-hint{background:#fef3c7;color:#92400e;border-radius:10px;padding:8px;font-size:12px;margin-top:10px}.dx47-blue{background:#2563eb;color:#fff;border:0}.dx47-no{border:1px solid #cbd5e1;margin-top:8px}
.dx47-set{margin:14px 0;text-align:left}.dx47-l{font-weight:700;margin-bottom:8px}.dx47-hint2{font-size:12px;color:#64748b;margin-top:6px}.dx46-card.b{border:2px solid #2563eb;background:#eff6ff}

/* DX50 */
.dx50{border:2px solid #16a34a;border-radius:16px;padding:12px;margin-top:16px;background:#f7fef9}
.dx50-cat{border:1px solid #e2e8f0;border-radius:12px;margin-top:6px;background:#fff;overflow:hidden}.dx50-cat.on{border:2px solid #16a34a}
.dx50-head{display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;padding:10px;font:inherit;font-weight:600;text-align:left}.dx50-cat.on .dx50-head{background:#f0fdf4}.dx50-head small{margin-left:auto;font-size:11px;color:#16a34a;font-weight:600}
.dx50-cat .dx46-cb{border-color:#cbd5e1}.dx50-cat.on .dx46-cb{background:#16a34a;border-color:#16a34a;color:#fff}
.dx50-body{padding:6px 10px 12px;font-size:14px}.dx50-sl{color:#475569;font-size:13px;margin:10px 0 4px}
.dx50-row{display:flex;justify-content:space-between;align-items:center}.dx50-row button{width:32px;height:32px;border-radius:50%;border:1px solid #cbd5e1;background:#fff;font-size:17px}.dx50-row b{display:inline-block;min-width:58px;text-align:center}
.dx50 .dx39-ch button{padding:7px 10px;font-size:13px}.dx50 .dx39-ch button.zu{color:#94a3b8;border-color:#e2e8f0}
.dx50-in{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:10px;padding:9px 10px;font:inherit;font-size:14px;margin-top:6px}
.dx50-date{display:inline-flex;align-items:center;gap:4px;border:1px solid #cbd5e1;border-radius:999px;padding:3px 8px;font-size:13px}.dx50-date input{border:0;font:inherit;font-size:12px;width:110px}
.dx50-hint{font-size:12px;color:#92400e;background:#fef3c7;border-radius:8px;padding:6px 8px;margin-top:6px}
.dx50-add{width:52px;height:52px;border-radius:10px;border:2px dashed #16a34a;display:flex;align-items:center;justify-content:center;font-size:20px;cursor:pointer}.dx50-add input{display:none}
.dx50-board{background:#fef3c7;color:#92400e;border-radius:10px;padding:8px 10px;margin:8px 0;font-size:14px;text-align:left}
