:root {
  --bg: #3f4347;
  --panel: #2c3946;
  --text: #f7fbfd;
  --muted: #c7d4dd;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #064b66;
  --brand-dark: #03384c;
  --soft: #24313d;
  --workspace: #464949;
  --success: #16835f;
  --warning: #c77a05;
  --danger: #c33d3d;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.login-screen {
  display: none;
}

.login-mode {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: var(--workspace);
}

.login-mode .topbar,
.login-mode .app-shell {
  display: none;
}

.login-mode .login-screen {
  display: grid;
  width: min(440px, calc(100vw - 32px));
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 26px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.login-card h1 {
  color: var(--text);
  font-size: 28px;
}

.login-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.remember-login {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d8e8ef;
  font-size: 14px;
  font-weight: 800;
}

.remember-login input {
  width: 18px;
  height: 18px;
  accent-color: #11b9d4;
}

.forgot-password-button {
  justify-self: center;
  border: 0;
  color: #9de8ff;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.forgot-password-button:hover {
  color: #fff;
  text-decoration: underline;
}

.password-reset-card {
  width: min(520px, calc(100vw - 36px));
}

.password-reset-form {
  display: grid;
  gap: 14px;
}

.password-reset-form p {
  margin: 0 0 4px;
  color: #d9e7ef;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  color: #fff;
  background: var(--brand);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 5;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.role-switch,
.user-area,
.planning-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.role-button,
.nav-item,
.primary-action,
.secondary-action,
.danger-action {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.role-button {
  padding: 8px 12px;
  color: #d9eef7;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.role-button.active,
.primary-action {
  color: #fff;
  background: #0a789e;
}

.primary-action {
  padding: 11px 16px;
  font-weight: 700;
}

.primary-action:hover {
  background: var(--brand-dark);
}

.secondary-action {
  padding: 9px 12px;
  color: var(--brand);
  background: var(--soft);
  font-weight: 700;
}

.topbar-logout {
  padding: 7px 10px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 800;
}

.danger-action {
  padding: 9px 12px;
  color: #fff;
  background: var(--danger);
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: calc(100vh - 55px);
}

.dashboard-mode {
  background: var(--workspace);
}

.dashboard-mode .app-shell {
  grid-template-columns: 1fr;
}

.dashboard-mode .sidebar {
  display: none;
}

.dashboard-mode .content {
  min-height: calc(100vh - 55px);
  background: var(--workspace);
}

.sidebar {
  padding: 22px 14px;
  background: #172235;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  padding: 12px 14px;
  text-align: left;
  color: #cbd5e1;
  background: transparent;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.offline-sync-button {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  padding: 14px 12px;
  color: #10202b;
  background: linear-gradient(135deg, #facc15, #f97316);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  font-weight: 900;
  cursor: pointer;
}

.offline-sync-button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.content {
  padding: 28px;
  background: var(--workspace);
}

.view.active {
  background: var(--workspace);
}

.topbar-icon,
.language-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.language-flag {
  min-width: 28px;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(#111 0 33%, #d71f1f 33% 66%, #ffd84d 66%);
  color: transparent;
}

.language-flag.muted {
  background: #26384a;
  color: #b5c6d1;
}

.workspace-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, 112px);
  gap: 28px 44px;
  align-items: start;
  max-width: 1780px;
  padding: 34px 26px 30px;
}

.module-tile {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 112px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.module-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 4px solid #e9f8ff;
  border-radius: 50%;
  color: #fff;
  background: #064b66;
  box-shadow: 0 3px 0 #023244, 0 8px 18px rgba(0, 0, 0, 0.28);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.module-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 112px;
  padding: 3px 8px;
  border: 2px solid #e9f8ff;
  border-radius: 999px;
  color: #064b66;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  transform: rotate(13deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}

.module-count {
  position: absolute;
  top: -7px;
  right: 7px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #cf2f2f;
  font-size: 13px;
  font-weight: 900;
}

.module-tile:hover .module-icon,
.module-tile:focus-visible .module-icon {
  background: #0a789e;
  box-shadow: 0 3px 0 #023244, 0 12px 22px rgba(0, 0, 0, 0.35);
  transform: translateY(-4px);
}

.module-tile:focus-visible {
  outline: 3px solid #bfeaff;
  outline-offset: 6px;
  border-radius: 14px;
}

.module-detail {
  display: none;
  max-width: 860px;
  margin: 16px 0 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  color: #f8fbfd;
  background: rgba(23, 34, 53, 0.74);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}

.dashboard-mode .content {
  padding: 0;
}

.dashboard-mode .workspace-board {
  min-height: calc(100vh - 54px);
}

.module-detail.show {
  display: grid;
  gap: 14px;
}

.module-detail .eyebrow {
  color: #8fd8f6;
}

.module-detail .meta,
.module-detail td,
.module-detail .panel-title span {
  color: #d3e2ea;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-grid div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.detail-grid strong,
.detail-grid span {
  display: block;
}

.detail-grid span {
  margin-top: 4px;
  color: #d3e2ea;
  font-size: 13px;
}

.help-float {
  position: fixed;
  left: 22px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #54bd56;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-heading,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stats-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

#settings .settings-users-panel {
  grid-column: span 3;
}

#settings .settings-users-panel .table-wrap {
  max-height: min(68vh, 760px);
  overflow: auto;
}

#settings .settings-users-panel table {
  min-width: 820px;
}

.rights-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.rights-box h4 {
  margin: 0;
  color: var(--text);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 8px 12px;
}

.checkbox-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text);
  font-weight: 700;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions button {
  min-height: 30px;
  padding: 0 10px;
}

.stat-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stat-card {
  padding: 18px;
}

.stat-card span,
.panel-title span,
.meta,
td {
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}

.two-column {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.panel {
  padding: 18px;
}

.order-list,
.driver-list,
.tour-lanes,
.planner-board {
  display: grid;
  gap: 12px;
}

.work-coverage {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(10, 26, 34, 0.35);
}

.work-coverage h4 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
}

.work-coverage-summary {
  margin-bottom: 10px;
  color: rgba(226, 242, 250, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.work-coverage-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.work-coverage-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.work-coverage-item.good {
  border-color: rgba(34, 197, 94, 0.65);
}

.work-coverage-item.warning {
  border-color: rgba(245, 158, 11, 0.75);
}

.work-coverage-item.missing {
  border-color: rgba(239, 68, 68, 0.75);
}

.work-coverage-item.extra {
  border-color: rgba(56, 189, 248, 0.7);
}

.work-coverage-badge {
  color: #fff;
  font-weight: 900;
}

.work-coverage-days {
  grid-column: 1 / -1;
  color: rgba(226, 242, 250, 0.72);
  font-size: 12px;
}

.order-card,
.driver-card,
.planner-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-card header,
.driver-card header,
.planner-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.warning {
  color: var(--warning);
  background: #fff4dc;
}

.badge.success {
  color: var(--success);
  background: #e7f7f1;
}

.badge.danger {
  color: var(--danger);
  background: #ffe9e9;
}

.meta {
  margin: 0;
  line-height: 1.45;
}

.order-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.full-width {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--text);
  font-size: 13px;
}

.planner-board {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  align-items: start;
}

#planning {
  margin: -28px;
  min-height: calc(100vh - 55px);
  color: #f2f6f8;
  background: var(--workspace);
}

.tour-screen-header {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 54px;
  padding: 0 16px;
  background: var(--brand);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.tour-screen-header h2 {
  flex: 1;
  font-size: 22px;
}

.back-button,
.icon-action {
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
}

.icon-action {
  font-size: 18px;
}

.tour-header-actions {
  display: flex;
  gap: 10px;
}

.tour-subview {
  display: none;
  padding: 22px;
}

.tour-subview.active {
  display: block;
}

#tour-form-view {
  display: none;
}

#tour-form-view.active {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid !important;
  place-items: center;
  padding: 54px 5vw 34px;
  background: rgba(0, 0, 0, 0.58);
}

.tour-form-modal-panel {
  width: min(1720px, 100%);
  max-height: calc(100vh - 88px);
  overflow: auto;
  background: #4b5051;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.tour-form-modal-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
  color: #fff;
  background: #004967;
}

.tour-form-modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.tour-form-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tour-proof-button {
  min-width: 42px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
  background: #006e89;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.tour-proof-button:hover {
  background: #079bbd;
}

.tour-video-button {
  background: #0b7fc2;
}

#day-details-view.modal-active {
  position: fixed;
  inset: 70px 90px 70px;
  z-index: 65;
  display: block;
  overflow: auto;
  padding: 0 22px 22px;
  color: #fff;
  background: #4a4d4d;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 22px 48px rgba(0, 0, 0, 0.45);
}

#day-details-view.modal-active::before {
  content: none;
}

.day-detail-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  margin: 0 -22px 18px;
  padding: 0 16px;
  background: var(--brand);
}

.day-detail-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.day-detail-modal-head button {
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.tour-search {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  margin-bottom: 14px;
  padding: 0 16px;
  border-radius: 3px;
  background: var(--brand);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.tour-search input {
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
}

.tour-search input::placeholder {
  color: #d7e7ef;
}

.market-list {
  display: grid;
}

.market-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  border: 0;
  border-bottom: 1px solid #c3c9cc;
  color: #e8ecee;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.market-row.selected,
.market-row:hover {
  background: #626c70;
}

.market-row strong,
.market-row small {
  display: block;
}

.market-row small {
  margin-top: 6px;
  color: #aeb8bd;
}

.market-image {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  color: #b7c0c4;
  font-size: 46px;
}

.market-image small {
  margin-top: -10px;
  font-size: 14px;
}

.market-image.blocked {
  color: #f11818;
  background: #fff;
}

.selected-market {
  display: grid;
  gap: 24px;
  width: 100%;
  margin: 10px 0 12px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #27cc5a;
  color: #fff;
  text-align: left;
  background: #636767;
  cursor: pointer;
}

.selected-market span {
  font-weight: 800;
}

.selected-market strong {
  margin-left: 8px;
}

.tour-planner-layout {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 18px;
  align-items: start;
}

.tour-calendar-panel {
  display: grid;
  gap: 18px;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.mini-calendar strong,
.mini-calendar button,
.mini-calendar .calendar-empty {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: #607382;
  font-weight: 800;
}

.mini-calendar strong {
  display: grid;
  place-items: center;
  min-height: 20px;
  background: var(--brand);
}

.mini-calendar button {
  position: relative;
  cursor: pointer;
}

.mini-calendar button.active {
  color: #05242f;
  background: #58c8d0;
}

.mini-calendar button.locked {
  color: #a98686;
  background: #762727;
}

.mini-calendar button.has-orders span {
  background: #21d35a;
}

.mini-calendar .calendar-empty {
  opacity: 0.25;
}

.mini-calendar button span {
  position: absolute;
  right: 4px;
  top: 2px;
  width: 5px;
  height: 24px;
  border: 1px solid #fff;
  background: linear-gradient(#111 0 33%, #d71f1f 33% 66%, #ffd84d 66%);
}

.month-nav {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.small-square,
.wide-action,
.express-action {
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 900;
}

.small-square {
  height: 38px;
  color: #fff;
  background: #607382;
  font-size: 26px;
}

.wide-action {
  min-height: 38px;
  color: #fff;
  background: #5a6d7e;
}

.express-action {
  min-height: 38px;
  color: #101010;
  background: #f1d20a;
}

.week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  align-items: start;
  border: 1px solid #82909b;
  overflow-x: auto;
}

.week-board.with-time-axis {
  grid-template-columns: 56px repeat(7, minmax(170px, 1fr));
}

.time-axis {
  display: grid;
  border-right: 1px solid #82909b;
  color: #fff;
  background: #465154;
}

.time-axis-head {
  min-height: 20px;
  background: #607382;
}

.time-axis-label {
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: #4b5254;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 900;
}

.time-axis-foot {
  min-height: 24px;
  background: #344d65;
}

.week-day {
  min-width: 170px;
  border-right: 1px solid #82909b;
  background: #465154;
}

.week-day h3 {
  display: grid;
  place-items: center;
  min-height: 20px;
  margin: 0;
  color: #fff;
  background: #607382;
  font-size: 13px;
}

.time-block {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 108px;
}

.time-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.slot-lines {
  display: grid;
  grid-template-rows: repeat(6, 18px);
  position: relative;
}

.full-day-lines {
  grid-template-rows: repeat(24, 18px);
}

.time-block.full-day {
  grid-template-columns: 1fr;
  min-height: 432px;
}

.slot-line {
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: #4f5557;
}

.tour-slot {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  z-index: 1;
}

.tour-slot-label {
  display: block;
  padding: 0 22px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-slot-status {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 11px;
  height: 11px;
  transform: translateY(-50%);
}

.tour-slot.blocked {
  background: linear-gradient(90deg, #970909, #696969, #970909);
}

.tour-slot.standby {
  color: #111;
  background: linear-gradient(90deg, #e1d306, #8f8700, #e1d306);
}

.tour-slot.standard {
  background: linear-gradient(90deg, #25d0c9, #064b66, #25d0c9);
}

.tour-slot.standard-plus {
  background: linear-gradient(90deg, #25d0c9, #064b66 50%, #16b823);
}

.tour-slot.comfort {
  background: linear-gradient(90deg, #7f8d91, #064b66, #7f8d91);
}

.tour-slot.premium {
  background: linear-gradient(90deg, #989600, #064b66, #989600);
}

.tour-slot.install {
  background: #0869b8;
}

.tour-slot.help {
  background: linear-gradient(90deg, #15bc12, #064b66, #15bc12);
}

.tour-slot.transfer {
  background: linear-gradient(90deg, #7d0fc1, #064b66, #7d0fc1);
}

.tour-slot.extra-km {
  background: linear-gradient(90deg, #118be6, #064b66, #118be6);
}

.day-detail-link {
  width: 100%;
  min-height: 24px;
  border: 0;
  color: #fff;
  background: #344d65;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.day-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 16px;
  font-weight: 800;
}

.day-team-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin: -6px 0 14px;
  padding: 10px 14px;
  color: #fff;
  background: #3f474b;
  font-weight: 800;
}

.day-detail-table {
  display: grid;
  border: 1px solid #aeb6ba;
  background: #484d4e;
  overflow-x: auto;
}

.day-detail-head {
  display: grid;
  grid-template-columns: 84px 170px 240px minmax(320px, 1fr) 150px 120px 58px 54px;
  align-items: center;
  min-height: 30px;
  color: #fff;
  background: #354d60;
  font-size: 12px;
  font-weight: 900;
  min-width: 1100px;
}

.day-detail-head span {
  padding: 0 10px;
}

.day-detail-slot {
  display: grid;
  grid-template-columns: 84px minmax(1016px, 1fr);
  min-width: 1100px;
  border-top: 1px solid #aeb6ba;
}

.day-detail-time {
  display: grid;
  place-items: center;
  border-right: 1px solid #aeb6ba;
  color: #fff;
  background: #4d5354;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.day-detail-slot-lines {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 120px;
}

.day-detail-empty-line {
  grid-column: 1;
  min-height: 20px;
  border-bottom: 1px solid rgba(222, 229, 232, 0.55);
  background: linear-gradient(90deg, #575c5d 0%, #6a6f70 18%, #4f5455 50%, #6a6f70 82%, #575c5d 100%);
}

.day-detail-empty-line:nth-child(6n) {
  border-bottom-style: dashed;
  border-bottom-color: rgba(222, 229, 232, 0.35);
}

.day-detail-entry {
  position: relative;
  z-index: 1;
  grid-column: 1;
  display: grid;
  grid-template-columns: 170px 240px minmax(320px, 1fr) 150px 120px 58px 54px;
  align-items: center;
  width: 100%;
  min-width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(222, 229, 232, 0.66);
  color: #fff;
  background: linear-gradient(90deg, #575c5d 0%, #6a6f70 18%, #4f5455 50%, #6a6f70 82%, #575c5d 100%);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.day-detail-entry.premium {
  background: linear-gradient(90deg, #8f8b00 0%, #626b45 33%, #4f5455 50%, #626b45 67%, #8f8b00 100%);
}

.day-detail-entry.comfort {
  background: linear-gradient(90deg, #69777b 0%, #4f5455 50%, #69777b 100%);
}

.day-detail-entry.standard,
.day-detail-entry.standard-plus {
  background: linear-gradient(90deg, #13a8aa 0%, #07516a 45%, #13a8aa 100%);
}

.day-detail-entry.install {
  background: linear-gradient(90deg, #0e68aa 0%, #07516a 50%, #0e68aa 100%);
}

.day-detail-entry.help {
  background: linear-gradient(90deg, #17a517 0%, #07516a 50%, #17a517 100%);
}

.day-detail-entry.transfer {
  background: linear-gradient(90deg, #7d0fc1 0%, #07516a 50%, #7d0fc1 100%);
}

.day-detail-entry.extra-km {
  background: linear-gradient(90deg, #118be6 0%, #07516a 50%, #118be6 100%);
}

.day-detail-extra-km {
  color: #fff;
  text-transform: none;
}

.day-detail-extra-km span:first-child {
  font-weight: 1000;
}

.day-detail-entry span {
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-detail-entry .receipt-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.day-detail-entry .receipt-cell b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-link {
  color: #85e7ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.order-phone-list {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.day-detail-mobile-list {
  display: none;
}

.status-dot {
  justify-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d7dde0, #8d979d 60%, #596166);
}

.status-dot.delivered {
  background: radial-gradient(circle at 35% 30%, #9dff84, #00bd18 60%, #057d11);
}

.status-dot.limited {
  background: radial-gradient(circle at 35% 30%, #ffd58a, #ff8a00 60%, #b85b00);
}

.status-dot.failed {
  background: radial-gradient(circle at 35% 30%, #ff9d9d, #df1f1f 60%, #8d0808);
}

.complaint-card {
  max-width: 720px;
}

.complaint-question {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.complaint-question h3 {
  margin: 0;
  font-size: 24px;
}

.complaint-actions,
.complaint-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.complaint-type-grid button,
.complaint-actions button,
.complaint-admin-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #07516a;
  font-weight: 900;
  cursor: pointer;
}

.complaint-type-grid button {
  min-height: 90px;
  font-size: 18px;
}

.complaint-upload {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 900;
}

.complaint-upload input,
.complaint-note {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  background: #20313f;
  padding: 12px;
}

.complaint-preview-grid,
.complaint-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.complaint-preview,
.complaint-images a {
  width: 118px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background: #111b23;
}

.complaint-preview img,
.complaint-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.complaints-list {
  display: grid;
  gap: 14px;
}

.complaint-item {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 6px solid #aeb6ba;
  border-radius: 8px;
  background: rgba(18, 31, 41, 0.72);
  padding: 14px;
}

.complaint-item.status-processing {
  border-left-color: #ffd400;
}

.complaint-item.status-done {
  border-left-color: #20d447;
}

.complaint-item-main,
.complaint-meta-grid,
.complaint-admin-actions {
  display: grid;
  gap: 10px;
}

.complaint-item-main {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.complaint-item-main strong {
  display: block;
  font-size: 18px;
}

.complaint-item-main span,
.complaint-meta-grid {
  color: #d7e3e8;
}

.complaint-status {
  border-radius: 999px;
  background: rgba(7, 81, 106, 0.86);
  padding: 7px 12px;
  font-weight: 900;
}

.complaint-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.complaint-note-text {
  margin: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 12px;
}

.complaint-admin-actions {
  grid-template-columns: repeat(3, minmax(0, 220px));
}

.complaint-admin-actions .complaint-delete-button {
  background: var(--danger);
}

.upload-icon {
  justify-self: center;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0 !important;
  border-radius: 3px;
  color: #fff;
  background: #344d65;
  font-size: 15px;
  font-weight: 900;
}

.upload-icon.has-proof {
  color: #00180b;
  background: linear-gradient(135deg, #7cff9d, #05ba45);
}

.proof-icons {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0 !important;
}

.video-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  color: #fff;
  background: #1678c2;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.payment-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 26px;
  height: 20px;
  margin-right: 6px;
  padding: 0;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.payment-icon.cash {
  background: #1aa346;
}

.payment-icon.ec {
  background: #1d66d7;
}

.payment-icon.none {
  color: #b8c2c8;
  background: #39454c;
}

.tour-edit-form {
  display: grid;
  gap: 14px;
}

.tour-form-modal-panel .tour-edit-form {
  padding: 18px;
}

.tour-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 18px 34px;
  align-items: end;
}

.tour-edit-form label {
  position: relative;
  color: #f2f6f8;
}

.tour-edit-form input[name="date"] {
  cursor: pointer;
}

.date-state {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 90;
  display: none;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 14px;
  color: #111;
  background: #f4f4f4;
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42);
}

.date-state.show {
  display: block;
}

.date-state.show::before {
  content: "";
  position: fixed;
  inset: -100vh -100vw;
  z-index: -1;
  background: rgba(0, 0, 0, 0.34);
}

.tour-date-calendar-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #111;
  text-align: center;
}

.tour-date-calendar-head button {
  min-height: 30px;
  border: 0;
  color: #fff;
  background: #004967;
  cursor: pointer;
}

.tour-date-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.tour-date-calendar-grid span {
  color: #444;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.tour-date-calendar-grid i {
  min-height: 32px;
}

.tour-date-calendar-grid button {
  min-height: 32px;
  border: 1px solid #d2d2d2;
  color: #111;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.tour-date-calendar-grid button.blocked {
  color: #d10000;
  background: #f0d0d0;
  cursor: not-allowed;
  opacity: 0.88;
}

.tour-date-calendar-grid button.open:hover {
  outline: 2px solid #004967;
}

.tour-date-calendar-grid button.active {
  color: #fff;
  background: #07814c;
}

.date-state small.blocked {
  color: #ff8c8c;
}

.date-state small.open {
  color: #74ff9b;
}

.tour-edit-form input,
.tour-edit-form select,
.tour-edit-form textarea {
  border: 0;
  color: #fff;
  background: #243241;
}

.package-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.package-button {
  min-height: 36px;
  border: 0;
  border-radius: 3px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  opacity: 0.78;
}

.package-button.active {
  opacity: 1;
  outline: 2px solid #fff;
}

.package-button.standard {
  background: linear-gradient(90deg, #25d0c9, #064b66, #25d0c9);
}

.package-button.standard-plus {
  background: linear-gradient(90deg, #25d0c9, #064b66 50%, #16b823);
}

.package-button.comfort {
  background: linear-gradient(90deg, #7f8d91, #064b66, #7f8d91);
}

.package-button.premium {
  background: linear-gradient(90deg, #989600, #064b66, #989600);
}

.package-button.install {
  background: #0869b8;
}

.package-button.help {
  background: linear-gradient(90deg, #15bc12, #064b66, #15bc12);
}

.package-button.transfer {
  background: linear-gradient(90deg, #7d0fc1, #064b66, #7d0fc1);
}

.package-detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 16px;
  align-items: start;
}

.package-detail-panel {
  min-height: 170px;
  background: #2b3847;
}

.package-detail-panel h3 {
  margin: 0;
  padding: 14px 16px;
  background: #243241;
  font-size: 14px;
}

.package-empty {
  display: grid;
  place-items: center;
  min-height: 170px;
  color: #fff;
  background: #111820;
  font-size: 24px;
  font-weight: 800;
}

.main-device-row {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  background: #243241;
  font-weight: 900;
}

.main-device-row input {
  min-height: 42px;
  padding: 0 10px;
}

.package-preview {
  display: grid;
  gap: 2px;
  padding: 0 10px 10px;
  border-radius: 5px;
  color: #fff;
  background: var(--brand);
}

.package-preview > strong {
  text-align: center;
}

.package-preview > button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 50%;
  color: var(--brand);
  background: #fff;
  font-size: 10px;
  font-weight: 900;
}

.preview-lines {
  display: grid;
  border: 1px solid #c9e4ef;
}

.preview-lines span {
  border-bottom: 1px solid #c9e4ef;
  background: #064b66;
}

.preview-lines span.standard {
  background: linear-gradient(90deg, #25d0c9, #064b66, #25d0c9);
}

.preview-lines span.standard-plus {
  background: linear-gradient(90deg, #25d0c9, #064b66 50%, #16b823);
}

.preview-lines span.comfort {
  background: linear-gradient(90deg, #7f8d91, #064b66, #7f8d91);
}

.preview-lines span.premium {
  background: linear-gradient(90deg, #989600, #064b66, #989600);
}

.preview-lines span.install {
  background: #0869b8;
}

.preview-lines span.help {
  background: linear-gradient(90deg, #15bc12, #064b66, #15bc12);
}

.preview-lines span.transfer {
  background: linear-gradient(90deg, #7d0fc1, #064b66, #7d0fc1);
}

.preview-lines span.extra-km {
  color: #fff;
  background: #2e55c8;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.preview-checks {
  display: grid;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.preview-checks span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.preview-checks b {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.preview-checks b.checked::after {
  content: "✓";
  position: relative;
  top: -7px;
  left: 1px;
  color: #fff;
  font-size: 18px;
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 20px 54px;
  padding: 22px;
}

.pdf-grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4d96ff;
}

.pdf-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  border-radius: 4px;
  color: #fff;
  background: #f05246;
  font-size: 12px;
  font-weight: 900;
}

.warning-text {
  margin: 0;
  padding: 14px 16px 150px;
  color: red;
  font-weight: 700;
}

.tour-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  padding: 18px;
  background: #2b3847;
}

.tour-options label {
  color: #f2f6f8;
}

.package-check-layout {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  min-height: 230px;
  gap: 0;
  padding: 0;
}

.option-column {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px 18px 28px;
}

.option-column strong {
  margin-bottom: 2px;
}

.package-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
  font-weight: 900;
}

.package-check input,
.package-yesno input,
.standard-plus-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #4b75b0;
}

.package-yesno {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
  color: #f2f6f8;
  font-weight: 900;
}

.yesno-pair {
  display: inline-flex;
  gap: 4px;
}

.defect-input {
  min-height: 46px;
  margin-top: 2px;
  padding: 0 10px;
  color: #fff;
  background: #243241;
  opacity: 0.75;
}

.defect-input:disabled {
  color: #88949c;
  background: #202a35;
  opacity: 0.45;
}

.door-change-label {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.standard-plus-toggle {
  align-self: end;
  justify-self: end;
  display: grid;
  gap: 8px;
  min-width: 130px;
  margin-top: 34px;
  padding: 12px 10px;
  color: #fff;
  background: #3eaa43;
  font-weight: 900;
}

.delivery-extra-options {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  background: #2b3847;
  color: #fff;
}

.delivery-extra-options > strong {
  font-size: 15px;
}

.delivery-extra-options > div {
  display: grid;
  gap: 10px 18px;
}

.delivery-extra-options .final-data-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.delivery-extra-options .final-data-compact {
  grid-template-columns: 1fr 1.05fr 1.25fr;
  align-items: start;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid #d0d0d0;
}

.final-left,
.final-middle,
.final-right {
  display: grid;
  gap: 12px;
}

.final-middle input,
.final-middle select {
  min-height: 44px;
  padding: 0 10px;
  color: #fff;
  background: #243241;
}

.final-middle input:disabled {
  color: #87939a;
  background: #202a35;
}

.final-right label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.delivery-extra-options fieldset {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #58636b;
  background: #243241;
}

.delivery-extra-options legend {
  padding: 0 6px;
  color: #dce8ee;
  font-weight: 900;
}

.delivery-extra-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}

.delivery-extra-options .payment-row {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.delivery-extra-options .payment-row label {
  display: grid;
  align-items: start;
}

.tour-note-box {
  display: grid;
  gap: 10px;
  padding: 10px 16px 16px;
  border-top: 1px solid #d0d0d0;
  color: #fff;
  background: #4a4d4d;
}

.saved-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.saved-note-chip {
  position: relative;
  display: inline-block;
  max-width: min(650px, 100%);
  padding: 7px 14px;
  border: 1px dashed #e0a9d2;
  border-radius: 10px;
  color: #fff;
  background: #8b3d74;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  font-weight: 900;
}

.saved-note-chip:hover::after {
  content: attr(data-meta);
  position: absolute;
  left: 24px;
  top: 100%;
  z-index: 4;
  width: max-content;
  max-width: 300px;
  margin-top: 4px;
  padding: 9px 12px;
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.9);
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
}

.note-input-row {
  display: grid;
  grid-template-columns: 1fr 410px;
  gap: 12px;
  align-items: stretch;
}

.note-input-row textarea {
  min-height: 44px;
  padding: 12px;
  resize: vertical;
  color: #fff;
  border: 1px dashed #aeb6ba;
  background: #243241;
}

.note-input-row button {
  min-height: 42px;
}

.delivery-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.delivery-confirm-modal.show {
  display: flex;
}

.tool-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.58);
}

.tool-modal.show {
  display: flex;
}

.tool-modal-card {
  width: min(900px, calc(100vw - 80px));
  max-height: calc(100vh - 100px);
  overflow: hidden;
  color: #fff;
  background: #4a4d4d;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

.tool-modal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
  background: var(--brand);
}

.tool-modal-card header button {
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 30px;
  font-weight: 900;
  cursor: pointer;
}

.tool-modal-body {
  max-height: 620px;
  overflow: auto;
  padding: 16px;
}

.shop-prebook-card {
  width: min(440px, calc(100vw - 70px));
}

.shop-prebook-body {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.loading-ring {
  width: 46px;
  height: 46px;
  border: 5px solid rgba(255, 255, 255, 0.18);
  border-top-color: #25d7ff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.employee-order-card {
  width: min(1180px, calc(100vw - 70px));
}

.employee-order-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px 18px;
  margin-bottom: 16px;
  padding: 14px;
  background: #313c42;
  font-weight: 800;
}

.employee-order-restpayment {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(255, 214, 64, 0.65);
  border-radius: 8px;
  background: rgba(255, 214, 64, 0.16);
  color: #ffe082;
  font-weight: 950;
}

.employee-proof-form {
  display: grid;
  gap: 14px;
}

.employee-proof-form fieldset {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 12px;
}

.employee-proof-form legend {
  padding: 0 8px;
  font-weight: 900;
}

.employee-proof-form label {
  display: grid;
  gap: 6px;
}

.employee-proof-form textarea,
.employee-proof-form input {
  color: #fff;
  background: #243241;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.proof-thumb {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 6px;
  color: #fff;
  background: #162532;
  cursor: pointer;
}

.proof-thumb:hover {
  border-color: #25d7ff;
}

.proof-thumb img {
  width: 100%;
  height: 110px;
  border-radius: 4px;
  object-fit: cover;
  background: #0e171f;
}

.proof-thumb span {
  font-size: 12px;
  font-weight: 800;
  color: #d8f7ff;
}

.proof-preview-box {
  display: grid;
  gap: 6px;
}

.proof-delete-button {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: #990b0b;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.proof-delete-button:hover {
  background: #c11212;
}

.proof-video-preview {
  width: min(420px, 100%);
  max-height: 220px;
  border-radius: 6px;
  background: #0e171f;
}

.employee-proof-form label.uploading {
  position: relative;
  opacity: 0.7;
  outline: 2px solid #25d7ff;
  outline-offset: 3px;
}

.employee-proof-form label.uploading::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #25d7ff;
  border-radius: 50%;
  animation: upload-spin 0.8s linear infinite;
}

.employee-proof-form.proof-uploading {
  pointer-events: none;
}

@keyframes upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.signature-proof-field {
  display: grid;
  gap: 10px;
}

.signature-thumb {
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 8px;
  background: #ffffff;
  cursor: pointer;
}

.signature-thumb img {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: contain;
}

.signature-text {
  display: inline-block;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 6px;
  color: #0d1d29;
  background: #fff;
  font-weight: 900;
}

.signature-modal {
  align-items: stretch;
  justify-content: stretch;
  padding: 18px;
}

.signature-card {
  width: 100%;
  max-height: none;
}

.signature-body {
  display: grid;
  grid-template-rows: 1fr auto;
  height: calc(100vh - 92px);
  gap: 12px;
  padding: 14px;
  background: #2f3638;
}

.signature-pad-wrap {
  min-height: 320px;
  border: 4px solid #0f6c80;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  touch-action: none;
}

#signature-pad {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.signature-actions {
  display: grid;
  grid-template-columns: minmax(160px, 260px) minmax(220px, 1fr);
  gap: 12px;
  justify-content: end;
}

.proof-gallery-card {
  width: min(1180px, calc(100vw - 50px));
}

.proof-gallery-card header {
  gap: 12px;
}

.proof-gallery-card header strong {
  flex: 1;
}

.proof-gallery-download {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 6px;
  color: #fff;
  background: #0b87ad;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.proof-gallery-download:hover {
  background: #12a7d1;
}

.proof-gallery-download[hidden] {
  display: none;
}

.proof-gallery-body {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #111b22;
}

.proof-gallery-body img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 6px;
  background: #05090d;
}

.proof-gallery-body img[hidden] {
  display: none;
}

.proof-gallery-empty {
  display: grid;
  min-height: min(420px, 62vh);
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: #d8f7ff;
  background: #0c1820;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.proof-gallery-empty[hidden] {
  display: none;
}

.proof-gallery-nav {
  width: 56px;
  min-height: 120px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #00506a;
  font-size: 44px;
  font-weight: 900;
  cursor: pointer;
}

.proof-gallery-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.employee-proof-notes {
  display: grid;
  gap: 6px;
}

.employee-proof-notes span {
  padding: 8px 10px;
  border-radius: 4px;
  background: #5d3152;
}

.employee-proof-notes small {
  display: block;
  color: #d8c4d3;
}

.market-picker-row {
  display: grid;
  width: 100%;
  gap: 6px;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid #9ca5aa;
  color: #fff;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.market-picker-row:hover {
  background: #5f696d;
}

.google-key-card {
  width: min(720px, calc(100vw - 48px));
}

.google-key-field {
  display: grid;
  gap: 8px;
  color: #fff;
  font-weight: 800;
}

.google-key-field input {
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid #99a5ab;
  border-radius: 5px;
  padding: 0 12px;
  color: #fff;
  background: #243341;
  font-size: 16px;
}

.google-key-status {
  margin: 12px 0;
  color: #cdd8de;
  font-weight: 800;
}

.google-key-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
}

.google-key-actions button {
  min-height: 42px;
  border: 0;
  color: #fff;
  background: #00506a;
  font-weight: 900;
}

.google-key-actions button:first-child {
  background: #8d0b0b;
}

.map-card {
  width: min(1720px, calc(100vw - 70px));
}

.map-modal-body {
  display: grid;
  grid-template-columns: 330px 1fr;
  min-height: min(610px, calc(100vh - 170px));
}

.map-stop-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  max-height: min(610px, calc(100vh - 170px));
  padding: 14px;
  background: #30383d;
}

.map-stop-list > strong {
  font-size: 16px;
}

.map-stop {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 4px;
  background: #4f575b;
}

.map-stop b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: #116ed0;
}

.map-stop.market b {
  background: #0b8f44;
}

.map-stop small {
  display: block;
  margin-top: 3px;
  color: #d1dade;
  font-size: 12px;
  line-height: 1.25;
}

.map-preview {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: min(610px, calc(100vh - 170px));
  background: #dcebdc;
}

.map-preview-stage {
  position: relative;
  overflow: auto;
  min-height: 520px;
  cursor: grab;
  background:
    linear-gradient(30deg, transparent 0 47%, rgba(70, 120, 170, 0.35) 48% 51%, transparent 52%),
    linear-gradient(145deg, transparent 0 52%, rgba(70, 120, 170, 0.28) 53% 56%, transparent 57%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    #cfead4;
  background-size: 100% 100%, 100% 100%, 74px 74px, 74px 74px;
}

.map-preview-stage.map-loading {
  display: grid;
  place-items: center;
  color: #15333a;
  font-size: 18px;
  font-weight: 900;
}

.google-map-stage {
  min-height: 520px;
  background: #cfead4;
}

.google-day-map {
  width: 100%;
  min-height: 520px;
  height: min(610px, calc(100vh - 230px));
}

.map-live-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0.9;
}

.map-preview-stage::before {
  content: "Tourkarte";
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: rgba(30, 55, 60, 0.5);
  font-size: 28px;
  font-weight: 900;
}

.map-preview-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 900px;
  height: 100%;
  min-height: 520px;
  transform-origin: center center;
  pointer-events: none;
}

.map-preview-pin {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 4px;
  transform: translate(-50%, -50%);
}

.map-zoom-controls {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  gap: 6px;
}

.map-zoom-controls button {
  min-width: 46px;
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: #00506a;
  font-weight: 900;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

.map-preview-pin b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #116ed0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.map-preview-pin.market b {
  background: #0b8f44;
}

.map-preview-pin small {
  max-width: 150px;
  padding: 3px 6px;
  border-radius: 3px;
  color: #122;
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.map-preview-footer {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  color: #e6eef2;
  background: #263238;
}

.map-preview-footer a {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 4px;
  color: #fff;
  background: #00506a;
  font-weight: 900;
  text-decoration: none;
}

.delivery-confirm-card {
  width: min(520px, calc(100vw - 40px));
  padding: 24px;
  color: #fff;
  background: #4a4d4d;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

.delivery-confirm-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.delivery-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
  margin-top: 20px;
}

.delivery-confirm-actions button {
  border: 0;
  min-height: 42px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

#delivery-confirm-no {
  background: #9c0909;
}

.route-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 10px 14px;
  color: #d9eef8;
  background: #20313d;
  border-left: 4px solid #118be6;
  font-weight: 800;
}

.route-info a,
.route-info button {
  color: #77c8ff;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.route-info a.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.price-matrix {
  display: grid;
  gap: 18px;
}

.price-core-section,
.price-matrix-section {
  display: grid;
  gap: 10px;
}

.price-matrix-header {
  color: #fff;
  font-weight: 900;
}

.price-core-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
}

.price-core-grid label {
  display: grid;
  gap: 6px;
  color: #fff;
  font-weight: 800;
}

.price-core-grid input {
  min-height: 32px;
}

.price-matrix-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) repeat(3, minmax(110px, 0.55fr));
  gap: 8px 12px;
  align-items: center;
}

.price-matrix-grid > span {
  color: #fff;
  font-weight: 900;
  text-align: center;
}

.price-matrix-row {
  display: contents;
}

.price-matrix-row > span {
  color: #fff;
  font-weight: 800;
  text-align: right;
}

.price-matrix-row input,
.price-core-grid input {
  min-height: 32px;
  border: 0;
  border-bottom: 1px solid #4bf082;
  padding: 0 10px;
  color: #fff;
  background: #273542;
}

.extra-device-area {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(640px, 1.4fr);
  gap: 8px 12px;
  padding: 8px 14px 14px;
  background: #243241;
}

.extra-device-line {
  display: grid;
  gap: 5px;
  color: #9da9b3;
  font-weight: 800;
}

.extra-device-line input[type="text"],
.extra-device-line input:not([type]) {
  min-height: 34px;
  padding: 0 10px;
  color: #fff;
  background: #243241;
}

.extra-package-line {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 4px 8px;
}

.extra-package-line .package-button {
  min-height: 36px;
}

.extra-package-detail {
  grid-column: 1 / -1;
}

.extra-package-detail:empty {
  display: none;
}

.mini-package-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px 14px;
  margin-top: 6px;
  padding: 12px;
  background: #2b3847;
  border: 1px solid #46535d;
}

.tour-form-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  align-items: center;
}

.block-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 70px 90px;
  background: rgba(0, 0, 0, 0.58);
}

.block-modal.show {
  display: flex;
}

.block-booking {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 12px;
  width: min(1720px, calc(100vw - 180px));
  min-height: min(710px, calc(100vh - 140px));
  background: var(--workspace);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  overflow: auto;
}

.block-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
  color: #fff;
  background: var(--brand);
}

.block-modal-header h2 {
  font-size: 21px;
}

.modal-close {
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 32px;
  font-weight: 800;
  cursor: pointer;
}

.block-mode-row,
.block-range-row {
  display: grid;
  gap: 10px;
  padding: 0 28px;
}

.block-mode-row {
  grid-template-columns: 1fr 1fr;
}

.block-range-row {
  grid-template-columns: repeat(3, 1fr);
}

.block-range-row[hidden],
.block-form[hidden] {
  display: none !important;
}

.block-mode-button,
.block-range-button {
  min-height: 38px;
  border: 0;
  border-radius: 3px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.28);
}

.block-mode-button {
  min-height: 218px;
  font-size: 17px;
}

.block-range-button {
  min-height: 218px;
  font-size: 17px;
}

.block-mode-button.block {
  color: #fff;
  background: #a40000;
}

.block-mode-button.standby {
  color: #111;
  background: #e1d306;
}

.block-mode-button:not(.active),
.block-range-button:not(.active) {
  opacity: 0.48;
}

.block-range-button {
  color: #fff;
  background: var(--brand);
}

.block-form {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.5fr);
  gap: 26px;
  align-items: start;
  padding: 18px 38px;
}

.block-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 34px;
  align-items: end;
}

.block-fields label {
  color: #f2f6f8;
}

.block-fields input,
.block-fields select {
  border: 0;
  border-bottom: 2px solid #28df72;
  border-radius: 0;
  color: #fff;
  background: #4a4d4d;
  min-height: 42px;
}

.block-fields select option {
  color: #111;
  background: #fff;
}

.block-actions {
  display: grid;
  gap: 10px;
  margin-top: 82px;
}

.block-submit,
.block-delete {
  margin-top: 82px;
  min-height: 38px;
}

.block-actions .block-submit,
.block-actions .block-delete {
  margin-top: 0;
}

.sperre-dialog {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.sperre-dialog.show {
  display: flex;
}

.sperre-dialog-card {
  width: 190px;
  min-height: 178px;
  padding: 18px 16px 12px;
  color: #222;
  background: #f7f7f7;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.sperre-dialog-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.sperre-dialog-card p {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.25;
}

.sperre-dialog-card button {
  display: block;
  width: 100%;
  border: 0;
  padding: 7px 0;
  color: #1a77bf;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  cursor: pointer;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.calendar-layout.employee-workplan {
  grid-template-columns: 1fr;
}

#workplan {
  background: #f7f7f7;
  color: #111;
}

.work-window-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
  color: #444;
  background: #f5f5f5;
  border-bottom: 1px solid #d2d2d2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.work-window-header h2 {
  margin: 0;
  font-size: 22px;
}

.plain-back {
  border: 0;
  color: #333;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.work-window-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 1fr) 160px;
  gap: 26px;
  align-items: end;
  padding: 36px 40px 16px;
  color: #999;
  background: #fff;
}

.work-window-toolbar select {
  border: 0;
  border-bottom: 1px solid #ddd;
  min-height: 42px;
  color: #111;
  background: transparent;
  font-size: 16px;
}

.work-calendar,
.vacation-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 10px;
}

.work-calendar {
  display: block;
  overflow: auto;
}

.workplan-board {
  display: grid;
  min-width: 1280px;
  border: 0;
  background: #fff;
}

.workplan-head,
.workplan-market,
.workplan-cell {
  min-height: 44px;
  border-right: 1px solid #52616a;
  border-bottom: 1px solid #52616a;
}

.workplan-head {
  display: grid;
  place-items: center;
  color: #111;
  background: #fff;
  font-weight: 900;
}

.workplan-head small {
  display: block;
  color: #111;
  font-size: 11px;
}

.workplan-market {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #111;
  background: #9dacc3;
  font-weight: 800;
  position: sticky;
  left: 0;
  z-index: 1;
}

.workplan-cell {
  display: grid;
  place-items: center;
  padding: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.workplan-cell span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workplan-cell.open {
  color: #343a3f;
  background: #d8d8d8;
  border: 1px solid #ffffff;
}

.workplan-cell.blocked {
  color: #9a2222;
  background: #f3cccc;
  border: 2px dashed #ff3333;
}

.workplan-cell.assigned {
  background: #9dacc3;
  cursor: pointer;
}

.workplan-cell.own {
  background: #12a526;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px 14px;
  color: var(--text);
}

.team-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 12px;
}

.team-role-grid label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 800;
}

.shop-list {
  display: grid;
  gap: 10px;
}

.shop-list-screen {
  min-height: calc(100vh - 54px);
  color: #fff;
  background: #4a4d4d;
}

.shop-list-header {
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}

.shop-list-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.shop-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 18px;
  color: #dbe8ef;
  background: #245d8b;
  font-size: 14px;
  font-weight: 800;
}

.shop-add-button {
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.shop-list-content {
  padding: 18px 14px 40px;
}

.shop-market-list {
  margin-top: 10px;
}

.shop-market-row {
  width: 100%;
}

.empty-list-hint {
  margin: 26px 8px;
  color: #cdd5d9;
  font-weight: 800;
}

#shops > .section-heading,
.shop-old-list {
  display: none;
}

.shop-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 54px 34px 34px;
  background: rgba(0, 0, 0, 0.42);
}

.shop-editor-modal.show {
  display: flex;
}

.shop-editor {
  width: min(1840px, calc(100vw - 56px));
  max-height: calc(100vh - 78px);
  overflow: auto;
  color: #fff;
  background: #4a4d4d;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
}

.shop-editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 20px;
  background: var(--brand);
}

.shop-book-button {
  margin-left: auto;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
}

.shop-editor-header h3 {
  margin: 0;
  font-size: 22px;
}

.shop-add-form {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 24px 26px 28px;
}

.shop-flags {
  display: flex;
  gap: 90px;
  font-weight: 900;
}

.shop-flags label {
  display: flex;
  gap: 6px;
  align-items: center;
}

.shop-logo {
  position: absolute;
  top: 22px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.35);
  font-size: 34px;
  font-weight: 900;
  transform: translateX(-50%) rotate(-12deg);
}

.shop-logo small {
  display: block;
  font-size: 16px;
  transform: rotate(12deg);
}

.shop-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 22px 32px;
  margin-top: 96px;
}

.shop-field-grid label,
.shop-plz-grid label {
  display: grid;
  gap: 10px;
  font-weight: 900;
}

.shop-field-grid input,
.shop-plz-grid textarea {
  border: 0;
  border-bottom: 1px solid #d8d8d8;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 10px;
  color: #fff;
  background: #243241;
  font-size: 16px;
}

.shop-plz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 34px;
}

.shop-plz-grid textarea {
  min-height: 150px;
  padding: 14px;
  resize: vertical;
}

.shop-green-section {
  display: grid;
  gap: 0;
  border-top: 1px solid #d8d8d8;
}

.shop-green-section > strong {
  display: block;
  padding: 5px 7px;
  color: #fff;
  background: #4ca300;
  font-weight: 900;
}

.shop-green-section:nth-of-type(2) {
  grid-template-columns: 1fr 1fr;
}

.shop-green-section:nth-of-type(2) .shop-lock-row {
  grid-column: 1 / -1;
}

.shop-module-row,
.shop-lock-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 5px 4px 10px;
  font-weight: 900;
}

.shop-module-row {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.shop-lock-row {
  grid-template-columns: repeat(6, minmax(72px, 0.5fr)) minmax(240px, 1.2fr) repeat(4, minmax(100px, 0.8fr));
}

.shop-module-row label,
.shop-lock-row label {
  display: flex;
  justify-content: center;
  gap: 5px;
  align-items: center;
}

.prebook-label {
  justify-content: center;
  min-height: 28px;
  color: #fff;
  background: #8d1f18;
  border: 1px dashed #fff;
  border-radius: 4px;
}

.time-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.time-settings-modal.show {
  display: flex;
}

.time-settings-card {
  width: min(600px, calc(100vw - 36px));
  min-height: 600px;
  color: #fff;
  background: #4d5050;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.time-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
  background: #4285f4;
}

.time-settings-header h3 {
  margin: 0;
  font-size: 22px;
}

.time-settings-header button {
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 34px;
  cursor: pointer;
}

.time-settings-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 16px;
  font-weight: 900;
}

.time-settings-options label {
  display: grid;
  gap: 8px;
}

.time-settings-options select,
.time-settings-grid input {
  border: 0;
  min-height: 34px;
  padding: 0 8px;
  color: #fff;
  background: #3f4242;
  font-weight: 800;
}

.time-settings-grid {
  display: grid;
  grid-template-columns: 60px 1fr 1fr 1.4fr;
  gap: 16px;
  align-items: center;
  padding: 0 18px 20px;
  font-weight: 900;
}

.time-settings-save {
  width: 100%;
  border: 0;
  min-height: 38px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
  cursor: pointer;
}

.shop-save {
  border: 0;
  min-height: 26px;
  color: #aeb8bf;
  background: var(--brand);
  font-weight: 900;
  cursor: pointer;
}

.shop-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.shop-row span {
  color: var(--muted);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
}

.field-label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 800;
}

#prices {
  min-height: calc(100vh - 55px);
  padding: 18px;
  background: #43474b;
  color: #ffffff;
}

#prices .view.active,
#prices .prices-layout,
#prices .panel,
#prices .price-matrix,
#prices .price-board,
#prices .price-board-column,
#prices .price-group {
  background: #43474b;
}

#prices .section-heading h2,
#prices .panel h3,
#prices .field-label,
#prices .price-hint,
#prices .price-group-title,
#prices .price-grid-head,
#prices .price-row > span {
  color: #ffffff;
}

.prices-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  background: transparent;
}

#prices .panel {
  padding: 18px;
  border-color: rgba(255, 255, 255, 0.16);
  background: #3b4652;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.price-market-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 320px);
  gap: 14px;
  margin-bottom: 14px;
  align-items: end;
}

.price-market-toolbar .secondary-action {
  min-height: 42px;
}

.price-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.price-tab {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #dceaf2;
  background: #2c3946;
  font-weight: 800;
  cursor: pointer;
}

.price-tab.active {
  color: #ffffff;
  background: #0f5f7f;
  border-color: rgba(124, 245, 161, 0.65);
  box-shadow: inset 0 0 0 1px rgba(124, 245, 161, 0.2);
}

.price-panels {
  position: relative;
}

.price-section {
  display: none;
}

.price-section.active {
  display: block;
}

.price-hint {
  margin: 0;
  color: #edf5fa;
  font-size: 13px;
}

#prices .field-label {
  margin-bottom: 0;
}

#prices select,
#prices input,
#prices textarea {
  color: #ffffff;
  background: #22303b;
  border-color: rgba(255, 255, 255, 0.3);
}

#prices select:focus,
#prices input:focus,
#prices textarea:focus {
  border-color: #7cf5a1;
  box-shadow: 0 0 0 3px rgba(124, 245, 161, 0.18);
}

#prices .primary-action {
  margin-top: 10px;
}

#prices .price-form {
  display: grid;
  gap: 16px;
}

#prices .price-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

#prices .price-grid label {
  color: #eef8fc;
  font-weight: 800;
}

#prices .price-grid input {
  min-height: 40px;
}

#prices .price-matrix {
  display: grid;
  gap: 16px;
  background: transparent;
}

#prices .price-topbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
}

#prices .price-topbar > div {
  padding: 9px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  background: #7a8389;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

#prices .price-topbar > div:last-child {
  border-right: 0;
}

#prices .price-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 34px;
  align-items: start;
  background: transparent;
}

#prices .price-board-column {
  display: grid;
  gap: 18px;
  background: transparent;
}

#prices .price-group {
  display: grid;
  gap: 6px;
  background: transparent;
}

#prices .price-group-title {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

#prices .price-group-title.emphasis {
  font-size: 22px;
}

#prices .price-grid-head,
#prices .price-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) 90px 90px 82px;
  gap: 10px;
  align-items: center;
}

#prices .price-grid-head {
  margin-left: 0;
  padding-left: 198px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

#prices .price-grid-head span {
  text-align: center;
}

#prices .price-row {
  padding: 0;
}

#prices .price-row > span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
  line-height: 1.15;
}

#prices .price-row.emphasis > span {
  font-size: 18px;
  font-weight: 900;
}

#prices .price-row.indent > span {
  padding-left: 12px;
  font-size: 14px;
  font-weight: 600;
}

#prices .price-row input {
  min-height: 30px;
  border-radius: 2px;
  border: 0;
  border-bottom: 1px solid rgba(124, 245, 161, 0.95);
  color: #ffffff;
  background: #2a3642;
}

#prices .price-row input:focus {
  outline: none;
  box-shadow: none;
}

#prices .price-board-right .price-group + .price-group {
  margin-top: 26px;
}

#prices .price-market-toolbar {
  margin-bottom: 16px;
}

#price-standard-modal .price-standard-card {
  width: min(1240px, calc(100vw - 40px));
}

#price-standard-modal .tool-modal-body {
  max-height: calc(100vh - 140px);
}

.invoice-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.invoice-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.invoice-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}

.invoice-filters-panel {
  display: grid;
  gap: 14px;
}

.invoice-archive-toolbar {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.invoice-filters-panel .invoice-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.invoice-filters-panel .invoice-controls label {
  display: grid;
  gap: 6px;
}

.invoice-archive-panel,
.invoice-table-panel {
  min-height: 100%;
}

.invoice-pdf-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.invoice-pdf-card {
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: start;
  padding: 0;
  border: 0;
  background: transparent;
}

.invoice-pdf-card > button:first-child {
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: start;
  width: 100%;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: #fff;
  background: #394753;
  cursor: pointer;
}

.invoice-pdf-card .invoice-pdf-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.invoice-pdf-card strong {
  font-size: 14px;
  text-align: center;
}

.invoice-pdf-card small {
  color: #d8e6ef;
  font-size: 11px;
  text-align: center;
}

.invoice-pdf-delete {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  background: #a83232;
  color: #fff;
  cursor: pointer;
}

.invoice-balance-card {
  width: min(960px, calc(100vw - 40px));
}

.logs-panel {
  display: grid;
  gap: 16px;
}

.logs-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
  gap: 14px;
  align-items: end;
}

.logs-toolbar label {
  display: grid;
  gap: 6px;
  color: #fff;
  font-weight: 800;
}

.logs-toolbar input,
.logs-toolbar select {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 0 12px;
  color: #fff;
  background: #23313d;
}

.logs-table th,
.logs-table td {
  white-space: normal;
  vertical-align: top;
}

.logs-table td {
  color: #eaf4fb;
}

.log-action {
  display: inline-block;
  min-width: 86px;
  border-radius: 999px;
  padding: 4px 8px;
  text-align: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.log-action.eingetragen {
  background: #1e8f45;
}

.log-action.bearbeitet {
  background: #1d72b8;
}

.log-action.geloescht {
  background: #a83232;
}

.messages-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(360px, 1fr);
  gap: 18px;
  align-items: start;
}

.message-form,
.messages-toolbar {
  display: grid;
  gap: 12px;
}

.message-form label,
.messages-toolbar label {
  display: grid;
  gap: 6px;
  color: #fff;
  font-weight: 800;
}

.message-form input,
.message-form select,
.message-form textarea,
.messages-toolbar input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 11px 12px;
  color: #fff;
  background: #23313d;
}

.message-form textarea {
  min-height: 150px;
  resize: vertical;
}

.messages-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.message-card {
  display: grid;
  gap: 10px;
  border-left: 5px solid #1d72b8;
  border-radius: 6px;
  padding: 12px;
  color: #edf7ff;
  background: #23313d;
}

.message-card.sent {
  border-left-color: #7f8b95;
}

.message-card.received {
  border-left-color: #18a862;
}

.message-card.unread {
  border-left-color: #cf2f2f;
  box-shadow: 0 0 0 2px rgba(207, 47, 47, 0.35);
}

.message-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.message-card-head div {
  display: grid;
  gap: 3px;
}

.message-card-head span,
.message-email-status {
  color: #b9c8d4;
  font-size: 13px;
}

.message-card-head button {
  border: 0;
  border-radius: 5px;
  padding: 8px 12px;
  color: #fff;
  background: #00506b;
  font-weight: 900;
  cursor: pointer;
}

.message-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.message-card-actions button,
.message-reply-context button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  background: #00506b;
  font-weight: 900;
  cursor: pointer;
}

.message-card-actions .message-delete {
  background: #8b1e1e;
}

.message-reply-note,
.message-reply-context {
  border-left: 4px solid #19d3ff;
  border-radius: 8px;
  padding: 10px 12px;
  color: #edf7ff;
  background: rgba(25, 211, 255, 0.12);
}

.message-reply-note span,
.message-reply-context span {
  display: block;
  margin-top: 3px;
  color: #b9c8d4;
  font-size: 13px;
}

.message-reply-note p {
  margin: 6px 0 0;
  color: #c8d8e2;
}

.message-reply-context {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.message-reply-context[hidden] {
  display: none;
}

.message-card p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

@media (max-width: 780px) {
  .logs-toolbar {
    grid-template-columns: 1fr;
  }

  .messages-layout {
    grid-template-columns: 1fr;
  }
}

/* Modern layout layer - old layout backup: styles.old-layout-backup.css */
:root {
  --bg: #07131b;
  --panel: rgba(18, 31, 43, 0.82);
  --text: #f4fbff;
  --muted: #aec1cf;
  --line: rgba(255, 255, 255, 0.14);
  --brand: #075d78;
  --brand-dark: #05384a;
  --soft: rgba(35, 52, 65, 0.88);
  --workspace: #0b151c;
  --success: #22b573;
  --warning: #e2a317;
  --danger: #d94a4a;
  --accent: #22d3ee;
  --accent-2: #8fd7ff;
  --glass: rgba(12, 24, 33, 0.72);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

html {
  background: #061017;
}

body {
  background:
    radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.16), transparent 34%),
    radial-gradient(circle at 78% 0%, rgba(143, 215, 255, 0.12), transparent 30%),
    linear-gradient(135deg, #07131b 0%, #0b171f 48%, #101b21 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 14, 20, 0.84) 0%, rgba(5, 14, 20, 0.66) 38%, rgba(5, 14, 20, 0.38) 74%),
    url("assets/delivery-hero.png") center / cover no-repeat;
  opacity: 0.72;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 84%);
}

.topbar {
  min-height: 68px;
  padding: 14px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(3, 31, 44, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.topbar h1 {
  font-size: 24px;
  letter-spacing: 0.2px;
}

.user-pill,
.language-flag,
.topbar-icon {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.app-shell {
  grid-template-columns: 248px 1fr;
  min-height: calc(100vh - 68px);
}

.sidebar {
  padding: 18px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 18, 27, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 18px 0 45px rgba(0, 0, 0, 0.2);
}

.sidebar nav {
  gap: 10px;
}

.nav-item {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #d9edf7;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 800;
  letter-spacing: 0.1px;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(34, 211, 238, 0.42);
  color: #fff;
  background: linear-gradient(135deg, rgba(10, 120, 158, 0.82), rgba(13, 79, 105, 0.82));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  transform: translateX(3px);
}

.content,
.view.active,
.dashboard-mode .content {
  background: transparent;
}

.content {
  padding: 28px;
}

.dashboard-mode .app-shell {
  grid-template-columns: 1fr;
}

.dashboard-mode .content {
  padding: 0;
}

.dashboard-mode .workspace-board {
  min-height: calc(100vh - 68px);
  padding: 44px 34px 40px;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 22px;
  align-content: start;
}

.workspace-board {
  max-width: none;
}

.module-tile {
  width: 136px;
  min-height: 146px;
  justify-self: start;
  padding: 14px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(13, 34, 47, 0.78), rgba(9, 23, 33, 0.64));
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.module-tile:hover,
.module-tile:focus-visible {
  border-color: rgba(34, 211, 238, 0.66);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(34, 211, 238, 0.18) inset;
  transform: translateY(-5px);
}

.module-icon {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.24), transparent 30%),
    linear-gradient(135deg, #0ea5c6, #04465d);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
  font-size: 25px;
}

.module-label {
  min-height: auto;
  max-width: 120px;
  border: 0;
  border-radius: 0;
  color: #f5fbff;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  transform: none;
  box-shadow: none;
}

.module-count {
  top: 8px;
  right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.36);
}

.module-detail,
.panel,
.section-card,
.price-matrix-panel,
.shop-editor-view,
.modal-card,
.sperre-dialog-card,
.time-settings-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.panel {
  overflow: hidden;
}

.section-heading {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(8, 23, 32, 0.72);
  backdrop-filter: blur(16px);
}

.section-heading h2,
h2,
h3 {
  color: #fff;
}

.eyebrow {
  color: var(--accent-2);
  letter-spacing: 0.12em;
}

input,
select,
textarea {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: #fff;
  background: rgba(21, 37, 50, 0.9);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(34, 211, 238, 0.82);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.primary-action,
.secondary-action,
.danger-action,
.shop-book-button,
.time-settings-save,
.price-save-button,
.invoice-action,
.message-card-head button {
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.primary-action,
.shop-book-button,
.time-settings-save,
.price-save-button,
.invoice-action {
  background: linear-gradient(135deg, #0891b2, #075d78);
}

.secondary-action {
  color: #dff8ff;
  background: rgba(255, 255, 255, 0.1);
}

.table-wrap,
.logs-panel,
.messages-inbox-panel,
.message-compose-panel {
  border-radius: 18px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: rgba(7, 93, 120, 0.78);
}

td {
  background-color: rgba(255, 255, 255, 0.035);
}

.login-mode {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(5, 14, 20, 0.86), rgba(5, 14, 20, 0.28)),
    url("assets/delivery-hero.png") center / cover no-repeat !important;
}

.login-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 14, 20, 0.9), rgba(5, 14, 20, 0.34)),
    url("assets/delivery-hero.png") center / cover no-repeat;
}

.login-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  color: #fff;
  background: rgba(8, 22, 31, 0.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.login-card::before {
  content: "";
  display: block;
  min-height: 170px;
  margin: -10px -10px 2px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(5, 16, 24, 0.1), rgba(5, 16, 24, 0.62)),
    url("assets/delivery-hero.png") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.login-card h1 {
  color: #fff;
}

.login-help {
  color: #b8c9d4;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 68px;
    z-index: 4;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    white-space: nowrap;
  }

  .offline-sync-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 190px;
    margin-top: 0;
    white-space: nowrap;
  }

  .content {
    padding: 18px;
  }

  #settings .settings-users-panel {
    grid-column: auto;
  }

  .dashboard-mode .workspace-board {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    padding: 24px 18px;
  }

  .module-tile {
    width: 100%;
  }
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 112px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.calendar-day.muted {
  background: #eef2f6;
}

.calendar-day strong,
.calendar-day span,
.calendar-day small {
  display: block;
}

.calendar-day small {
  color: var(--muted);
  line-height: 1.35;
}

.calendar-day small.genehmigt {
  color: var(--success);
  font-weight: 700;
}

.calendar-day small.abgelehnt {
  color: var(--danger);
  font-weight: 700;
}

.calendar-day small.offen {
  color: var(--warning);
  font-weight: 700;
}

.vacation-balance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.vacation-balance-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #102735;
  color: #f6fbff;
}

.vacation-balance-card strong {
  font-size: 28px;
  line-height: 1;
}

.vacation-balance-card span {
  color: #b9cbd8;
  font-size: 13px;
  font-weight: 700;
}

.compact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
  padding: 0;
  border: 0;
}

.message-preview {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  color: #24445a;
  background: #edf7ff;
  font-size: 13px;
  line-height: 1.45;
}

.lane {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lane h3 {
  margin-bottom: 0;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 320px;
  padding: 13px 15px;
  border-radius: 8px;
  color: #fff;
  background: #172235;
  opacity: 0;
  transform: translateY(12px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.vehicle-list {
  display: grid;
  gap: 12px;
}

.vehicle-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(14, 28, 39, 0.78);
}

.vehicle-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.vehicle-card > div:first-child span {
  color: var(--muted);
}

.vehicle-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px 14px;
  color: var(--muted);
}

.vehicle-actions {
  display: flex;
  gap: 10px;
}

.vehicle-actions button {
  border: 0;
  padding: 9px 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
}

.vehicle-actions button:last-child {
  background: var(--danger);
}

@media (max-width: 980px) {
  .app-shell,
  .two-column,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 77px;
    z-index: 4;
    padding: 10px;
    overflow-x: auto;
  }

  .sidebar nav {
    display: flex;
    min-width: max-content;
  }

  .stats-grid,
  .settings-grid,
  .order-form,
  .planner-board,
  .work-calendar,
  .vacation-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar,
  .section-heading,
  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .content {
    padding: 16px;
  }

  .stats-grid,
  .settings-grid,
  .order-form,
  .planner-board,
  .work-calendar,
  .vacation-calendar,
    .compact-form {
    grid-template-columns: 1fr;
  }
}

body,
.content,
.view.active,
.panel,
.stat-card,
.order-card,
.driver-card,
.planner-card,
.order-form,
.rights-box,
.calendar-day,
.shop-row,
.table-wrap,
table,
th,
td,
.login-card,
.price-market-toolbar,
.price-matrix,
.price-board,
.price-board-column,
.price-group,
.toast {
  background-color: #2c3946 !important;
  color: #f7fbfd !important;
}

input,
select,
textarea {
  background-color: #22303b !important;
  color: #f7fbfd !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
}

label,
.meta,
.panel-title span,
.stat-card span,
.price-hint,
.price-grid-head,
.price-row > span {
  color: #edf5fa !important;
}

th {
  background-color: #46515a !important;
  color: #ffffff !important;
}

.vacation-month-control {
  display: inline-grid;
  grid-template-columns: 38px minmax(150px, auto) 38px;
  align-items: center;
  gap: 10px;
}

.vacation-month-control span {
  color: #f7fbfd;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 24px 18px 14px;
    gap: 14px;
  }

  .topbar h1 {
    font-size: 30px;
    line-height: 1.15;
  }

  .user-area {
    width: 100%;
    gap: 8px;
  }

  .user-pill,
  .topbar-logout {
    min-height: 44px;
    font-size: 18px;
  }

  .topbar-icon,
  .language-flag {
    min-width: 42px;
    height: 34px;
    font-size: 15px;
  }

  .sidebar {
    top: 0;
    max-width: 100vw;
    padding: 10px 14px;
  }

  .sidebar nav {
    display: flex;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 52px;
    padding: 0 18px;
    font-size: 20px;
    scroll-snap-align: start;
  }

  .content {
    width: 100%;
    max-width: 100vw;
    padding: 14px;
    overflow-x: hidden;
  }

  .section-heading {
    padding: 16px;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .panel {
    width: 100%;
    padding: 14px;
    overflow: hidden;
  }

  #planning {
    width: auto;
    max-width: 100vw;
    margin: -14px;
    overflow-x: hidden;
  }

  #day-map-modal .map-card {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 18px);
  }

  #day-map-modal .tool-modal-card header {
    min-height: 58px;
    padding: 0 14px;
  }

  #day-map-modal .tool-modal-card header strong {
    font-size: 24px;
  }

  .map-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(230px, 42dvh) minmax(300px, 1fr);
    min-height: calc(100dvh - 88px);
    max-height: calc(100dvh - 88px);
    overflow: auto;
  }

  .map-stop-list {
    max-height: 42dvh;
    padding: 12px;
    border-bottom: 4px solid rgba(0, 0, 0, 0.22);
  }

  .map-stop-list > strong {
    position: sticky;
    top: -12px;
    z-index: 2;
    margin: -12px -12px 2px;
    padding: 14px 12px 10px;
    background: #30383d;
    font-size: 22px;
  }

  .map-stop {
    grid-template-columns: 42px 1fr;
    min-height: 74px;
    padding: 12px;
  }

  .map-stop b {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .map-stop span {
    font-size: 20px;
    line-height: 1.15;
  }

  .map-stop small {
    font-size: 14px;
  }

  .map-preview,
  .google-map-stage,
  .map-preview-stage {
    min-height: 320px;
  }

  .google-day-map {
    min-height: 320px;
    height: 48dvh;
  }

  .map-preview-canvas {
    min-width: 620px;
    min-height: 320px;
  }

  .map-preview-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    grid-template-columns: 1fr;
    padding: 10px 12px;
  }

  .map-preview-footer a {
    min-height: 50px;
    font-size: 20px;
  }

  .map-preview-footer span {
    font-size: 13px;
    line-height: 1.25;
  }

  .map-zoom-controls {
    top: 10px;
    right: 10px;
  }

  .tour-screen-header {
    min-height: 62px;
    padding: 0 14px;
  }

  .tour-screen-header h2 {
    font-size: 28px;
  }

  .tour-subview {
    padding: 14px;
  }

  .selected-market {
    gap: 12px;
    padding: 18px 20px;
    font-size: 18px;
  }

  .tour-planner-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tour-calendar-panel {
    width: 100%;
    order: 1;
  }

  .mini-calendar strong,
  .mini-calendar button,
  .mini-calendar .calendar-empty {
    min-height: 42px;
    font-size: 20px;
  }

  .week-board {
    order: 2;
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(7, minmax(168px, 1fr));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .week-board.with-time-axis {
    grid-template-columns: 54px repeat(7, minmax(168px, 1fr));
  }

  .week-day {
    min-width: 168px;
  }

  .week-day h3,
  .day-detail-link {
    min-height: 34px;
    font-size: 14px;
  }

  .tour-slot {
    min-height: 18px;
    font-size: 11px;
  }

  .wide-action,
  .express-action {
    min-height: 56px;
    font-size: 22px;
  }

  #tour-form-view.active {
    padding: 12px;
    place-items: stretch;
  }

  .tour-form-modal-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .tour-form-grid,
  .package-detail-layout,
  .final-data-compact,
  .shop-field-grid,
  .shop-plz-grid,
  .invoice-layout,
  .messages-layout,
  .logs-toolbar,
  .vehicle-meta {
    grid-template-columns: 1fr !important;
  }

  .package-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .package-preview {
    position: static;
    width: 100%;
  }

  .settings-grid,
  .calendar-layout,
  .compact-form,
  .order-form {
    grid-template-columns: 1fr !important;
  }

  .rights-box,
  .user-management,
  #user-form,
  #profile-form {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .checkbox-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .checkbox-grid label {
    min-width: 0;
    align-items: flex-start;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .checkbox-grid input[type="checkbox"] {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
  }

  #prices .prices-layout,
  #prices .panel,
  #prices .price-form,
  #prices .price-grid,
  #prices .price-matrix,
  #prices .price-panels,
  #prices .price-section.active,
  #prices .price-board,
  #prices .price-board-column,
  #prices .price-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #prices .panel {
    overflow-x: hidden;
  }

  .price-market-toolbar {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  #prices .price-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #prices .price-tab {
    min-height: 58px;
    padding: 8px;
    font-size: 18px;
    white-space: normal;
  }

  #prices .price-topbar {
    display: none;
  }

  #prices .price-board {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  #prices .price-grid-head,
  #prices .price-row {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(64px, 82px));
    gap: 6px;
  }

  #prices .price-grid-head {
    padding-left: 0;
    font-size: 10px;
  }

  #prices .price-row > span {
    min-width: 0;
    font-size: 13px;
    text-align: left;
    overflow-wrap: anywhere;
  }

  #prices .price-row.emphasis > span {
    font-size: 16px;
  }

  #prices .price-row input {
    min-width: 0;
    padding: 8px 7px;
  }

  #price-standard-modal .price-standard-card,
  .tool-modal-card {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .vacation-month-control {
    width: 100%;
    grid-template-columns: 44px 1fr 44px;
  }

  .vacation-balance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-day {
    min-height: 82px;
    padding: 8px;
  }

  #workplan {
    margin: -14px;
    background: transparent !important;
    color: #f7fbfd;
  }

  .work-window-header {
    min-height: 54px;
    padding: 0 12px;
    color: #fff;
    background: rgba(3, 31, 44, 0.92);
  }

  .work-window-header h2 {
    font-size: 24px;
  }

  .work-window-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    color: #dceaf2;
    background: rgba(12, 24, 33, 0.82);
  }

  .work-window-toolbar select {
    min-height: 42px;
    color: #fff;
    background: #22303b;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
  }

  #workplan .calendar-layout {
    gap: 12px;
    padding: 12px;
  }

  #workplan .panel-title {
    gap: 6px;
    margin-bottom: 10px;
  }

  #workplan .panel-title h3 {
    font-size: 18px;
  }

  #workplan .panel-title span {
    font-size: 12px;
  }

  .work-calendar {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .workplan-board {
    min-width: 650px;
    grid-template-columns: 128px repeat(7, 74px) !important;
  }

  .workplan-head,
  .workplan-market,
  .workplan-cell {
    min-height: 36px;
  }

  .workplan-head {
    padding: 4px 2px;
    font-size: 13px;
    line-height: 1.05;
  }

  .workplan-head small {
    font-size: 9px;
  }

  .workplan-market {
    padding: 5px 7px;
    font-size: 11px;
    line-height: 1.15;
    overflow: hidden;
  }

  .workplan-cell {
    padding: 3px;
    font-size: 9px;
    line-height: 1.15;
  }

  .workplan-cell span {
    max-width: 68px;
  }

  #work-tools-panel .order-form {
    gap: 10px;
    padding: 0;
  }

  .team-role-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  #day-details-view.modal-active {
    inset: 0 !important;
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    padding: 0 12px 18px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .day-detail-modal-head {
    min-height: 64px;
    margin: 0 -12px 14px;
    padding: 0 12px;
    gap: 10px;
  }

  .day-detail-modal-head h2 {
    max-width: calc(100vw - 154px);
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
  }

  .day-detail-tools {
    gap: 6px;
  }

  .day-detail-modal-head button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .day-summary {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  .day-summary span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #3f474b;
    font-size: 15px;
  }

  .day-team-summary {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
  }

  .day-detail-table {
    display: block;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .day-detail-head,
  .day-detail-slot {
    display: none;
  }

  .day-detail-mobile-list {
    display: grid;
    gap: 14px;
  }

  .day-detail-mobile-group {
    display: grid;
    gap: 9px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(20, 35, 43, 0.9);
  }

  .day-detail-mobile-group h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #07516a;
    color: #fff;
    font-size: 18px;
    line-height: 1.1;
  }

  .day-detail-mobile-group h3 small {
    flex: 0 0 auto;
    color: #d7edf4;
    font-size: 12px;
    font-weight: 900;
  }

  .day-detail-mobile-group > p {
    margin: 0;
    padding: 14px;
    border-radius: 8px;
    color: #dce8ee;
    background: #3f474b;
    font-weight: 800;
  }

  .day-detail-mobile-card {
    display: grid;
    gap: 6px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    background: linear-gradient(90deg, #575c5d 0%, #6a6f70 18%, #4f5455 50%, #6a6f70 82%, #575c5d 100%);
    text-align: left;
    font-size: 15px;
    font-weight: 800;
  }

  .day-detail-mobile-card.premium {
    background: linear-gradient(90deg, #8f8b00 0%, #626b45 45%, #4f5455 100%);
  }

  .day-detail-mobile-card.comfort {
    background: linear-gradient(90deg, #69777b 0%, #4f5455 100%);
  }

  .day-detail-mobile-card.standard,
  .day-detail-mobile-card.standard-plus {
    background: linear-gradient(90deg, #13a8aa 0%, #07516a 100%);
  }

  .day-detail-mobile-card.install {
    background: linear-gradient(90deg, #0e68aa 0%, #07516a 100%);
  }

  .day-detail-mobile-card.help {
    background: linear-gradient(90deg, #17a517 0%, #07516a 100%);
  }

  .day-detail-mobile-card.transfer {
    background: linear-gradient(90deg, #7d0fc1 0%, #07516a 100%);
  }

  .mobile-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-card-top .status-dot {
    flex: 0 0 auto;
  }

  .mobile-card-proof,
  .mobile-extra-km {
    color: #d7edf4;
    font-size: 13px;
  }

  .signature-modal {
    padding: 0;
  }

  .signature-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
  }

  .signature-card header {
    min-height: 50px;
  }

  .signature-body {
    height: calc(100vh - 50px);
    padding: 10px;
  }

  .signature-pad-wrap {
    min-height: 60vh;
  }

  .signature-actions {
    grid-template-columns: 1fr;
  }
}
