:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #1e2936;
  background: #f4f7fb;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: #2267b8;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: #174f91;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.customer-picker {
  display: grid;
  gap: 8px;
}

.customer-picker-results {
  display: grid;
  max-height: 240px;
  overflow: auto;
  gap: 6px;
}

.customer-picker-option {
  display: grid;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #dbe3ec;
  background: #ffffff;
  color: #1e2936;
  text-align: left;
}

.customer-picker-option:hover,
.customer-picker-option.is-selected {
  border-color: #2267b8;
  background: #eaf3ff;
}

.customer-picker-option span {
  color: #64758a;
  font-size: 0.85rem;
  font-weight: 700;
}

.customer-picker-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #2267b8;
  border-radius: 8px;
  background: #eaf3ff;
}

.customer-picker-selected div {
  display: grid;
  gap: 2px;
}

.customer-picker-selected span {
  color: #64758a;
  font-size: 0.85rem;
  font-weight: 700;
}

.customer-picker-selected button {
  min-height: 34px;
  padding: 0 10px;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar,
.nav-actions,
.brand,
.section-header,
.booking-row,
.booking-card-header,
.calendar-title {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.brand {
  color: inherit;
  text-decoration: none;
}

.lom-logo {
  display: inline-grid;
  gap: 5px;
  width: max-content;
  color: #111111;
  line-height: 1;
  text-transform: uppercase;
}

.lom-logo-mark {
  display: block;
  border: 3px solid #111111;
  background: #111111;
  color: #ffffff;
  padding: 2px 5px 1px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.lom-logo-studio {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.34rem;
  font-weight: 500;
  letter-spacing: 0;
}

.lom-logo-compact {
  gap: 3px;
}

.lom-logo-compact .lom-logo-mark {
  border-width: 2px;
  padding: 1px 4px 0;
  font-size: 0.96rem;
}

.lom-logo-compact .lom-logo-studio {
  font-size: 0.95rem;
}

.auth-logo {
  margin-bottom: 18px;
}

.nav-actions {
  gap: 8px;
}

.nav-actions a,
.ghost-button {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #1e2936;
  font-weight: 700;
}

.nav-actions a:hover,
.ghost-button:hover {
  border-color: #98a9ba;
  background: #ffffff;
}

.auth-view {
  display: grid;
  min-height: 68vh;
  place-items: center;
}

.auth-panel,
.panel,
.calendar-day {
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.auth-panel {
  width: min(460px, 100%);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #5f7084;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.04;
}

h2 {
  margin-bottom: 14px;
}

h3 {
  margin-bottom: 8px;
}

.muted {
  color: #64758a;
}

.calendar-note {
  max-width: 720px;
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid #d6e5d8;
  border-radius: 8px;
  background: #f3fbf5;
  color: #28523a;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.4;
}

.stack {
  display: grid;
  gap: 12px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: #3a4858;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd9e4;
  border-radius: 8px;
  background: #ffffff;
  color: #1e2936;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

textarea.large-textarea {
  min-height: 168px;
}

form button {
  min-height: 44px;
  padding: 0 16px;
}

.message {
  margin: 12px 0 0;
  color: #b0332f;
  font-weight: 700;
}

.message:empty {
  display: none;
}

.message.is-saving,
.save-status {
  color: #64758a;
  font-size: 0.9rem;
}

.message.is-error {
  color: #b0332f;
}

.section-header {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
}

.calendar-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.calendar-card {
  display: grid;
  gap: 12px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.booking-choice-panel {
  margin-top: 16px;
}

.booking-choice-panel h2 {
  margin-bottom: 6px;
}

.booking-calendar-list {
  margin-top: 14px;
}

.booking-calendar-card {
  align-items: start;
  min-height: 132px;
}

.booking-calendar-card a {
  grid-column: 1 / -1;
}

.calendar-card-image {
  display: grid;
  width: 96px;
  height: 82px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(54, 165, 111, 0.18), rgba(34, 103, 184, 0.16)),
    #edf5f0;
}

.calendar-card-image span {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #1e2936;
  font-size: 1.1rem;
  font-weight: 900;
}

.calendar-card strong {
  font-size: 1.1rem;
}

.calendar-card-description {
  margin: 8px 0 0;
  color: #415168;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.45;
  white-space: pre-line;
}

.calendar-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.calendar-card-meta div {
  min-width: 118px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f8fb;
}

.calendar-card-meta dt {
  color: #64758a;
  font-size: 0.72rem;
  font-weight: 800;
}

.calendar-card-meta dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.calendar-card a {
  width: fit-content;
  padding: 9px 12px;
  border-radius: 8px;
  background: #2267b8;
  color: #ffffff;
  font-weight: 800;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: #2267b8;
  color: #ffffff;
  font-weight: 800;
}

.primary-link:hover {
  background: #174f91;
}

.quick-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.calendar-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.month-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.month-controls button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.month-controls .today-button {
  width: auto;
  padding: 0 12px;
  font-size: 0.95rem;
}

.compact-label {
  gap: 4px;
  min-width: 140px;
  color: #526477;
  font-size: 0.78rem;
}

.compact-label select,
.compact-label input {
  min-height: 42px;
  color: #1e2936;
  font-size: 1rem;
}

.year-control {
  min-width: 92px;
}

.month-window-control {
  min-width: 190px;
}

.weekend-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid #cfd9e4;
  border-radius: 8px;
  background: #ffffff;
  color: #1e2936;
}

.weekend-toggle input {
  width: 18px;
  min-height: 18px;
}

.weekday-grid,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-grid.workweek,
.calendar-grid.workweek {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.weekday-grid {
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #e9eff5;
}

.weekday-grid span {
  padding: 10px 4px;
  color: #526477;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.calendar-grid {
  border-top: 1px solid #dbe3ec;
  border-left: 1px solid #dbe3ec;
}

.calendar-day {
  min-height: 116px;
  padding: 8px;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  cursor: pointer;
}

.calendar-day:hover {
  background: #f0f6ff;
}

.calendar-day.is-muted {
  background: #f8fafc;
  color: #8c9bab;
}

.calendar-day.is-today {
  outline: 2px solid #2267b8;
  outline-offset: -2px;
}

.calendar-day.is-selected {
  outline: 3px solid #36a56f;
  outline-offset: -3px;
  background: #effaf4;
}

.calendar-day.is-disabled {
  cursor: not-allowed;
  color: #a8b4c1;
  background: #f6f8fa;
}

.calendar-day.is-disabled:hover {
  background: #f6f8fa;
}

.day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 7px;
  border-radius: 50%;
  font-weight: 800;
}

.is-today .day-number {
  background: #2267b8;
  color: #ffffff;
}

.event {
  margin-top: 5px;
  padding: 6px 7px;
  border-left: 3px solid #2267b8;
  border-radius: 6px;
  background: #edf5ff;
  color: #17446d;
  font-size: 0.78rem;
  line-height: 1.25;
}

.booking-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 10px;
  color: #526477;
  font-size: 0.9rem;
  font-weight: 800;
}

.booking-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.own-dot {
  background: #36a56f;
}

.reserved-dot {
  background: #8c9bab;
}

.customer-bookings-layout .calendar-day {
  cursor: default;
}

.customer-bookings-layout .calendar-day:hover {
  background: #ffffff;
}

.customer-bookings-layout .calendar-day.is-muted:hover {
  background: #f8fafc;
}

.booking-overview-event {
  display: grid;
  width: 100%;
  gap: 2px;
  border: 0;
  border-left: 3px solid #2267b8;
  text-align: left;
  font-weight: 800;
}

button.booking-overview-event {
  cursor: pointer;
}

.booking-overview-event.is-own {
  border-left-color: #36a56f;
  background: #effaf4;
  color: #14543d;
}

button.booking-overview-event.is-own:hover {
  background: #dff5ea;
}

.booking-overview-event.is-reserved {
  border-left-color: #8c9bab;
  background: #f2f5f8;
  color: #526477;
}

.booking-overview-event.is-selected {
  outline: 2px solid #36a56f;
  outline-offset: 0;
}

.event-time,
.event-room,
.event-technicians {
  font-size: 0.72rem;
  font-weight: 800;
}

.event-technicians {
  display: block;
  opacity: 0.86;
  overflow-wrap: anywhere;
}

.event-title {
  overflow-wrap: anywhere;
}

.mobile-booking-list {
  display: none;
}

.mobile-booking-item,
.mobile-empty-state {
  width: 100%;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.mobile-booking-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  color: #1e2936;
  text-align: left;
}

button.mobile-booking-item {
  cursor: pointer;
}

.mobile-booking-item.is-own {
  border-color: #a7ddc1;
  background: #f3fbf7;
}

button.mobile-booking-item.is-own:hover,
.mobile-booking-item.is-own.is-selected {
  border-color: #36a56f;
  background: #e7f7ef;
}

.mobile-booking-item.is-reserved {
  color: #526477;
}

.mobile-booking-date {
  color: #526477;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: capitalize;
}

.mobile-booking-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mobile-booking-body strong {
  overflow-wrap: anywhere;
}

.mobile-booking-body small {
  color: #64758a;
  font-weight: 700;
}

.mobile-empty-state {
  color: #64758a;
  font-weight: 700;
}

.booking-list,
.user-list {
  display: grid;
  gap: 10px;
}

.wide-list {
  gap: 16px;
}

.technician-bookings-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 18px;
}

.technician-booking-list {
  display: grid;
  gap: 8px;
}

.technician-booking-item {
  min-height: 88px;
}

.technician-booking-item.is-selected {
  border-color: #2267b8;
  background: #edf5ff;
}

.booking-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.booking-card-header {
  justify-content: space-between;
  gap: 12px;
}

.booking-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.work-time-form {
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f9fbfd;
}

.work-time-form h3,
.work-time-form .muted {
  margin-bottom: 0;
}

.work-time-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.work-time-groups span {
  display: block;
  margin-bottom: 6px;
  color: #526477;
  font-size: 0.82rem;
  font-weight: 800;
}

.work-time-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.work-time-actions button {
  min-height: 38px;
  padding: 0 10px;
}

.technician-complete-form {
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f9fbfd;
}

.technician-complete-form.is-complete,
.technician-status-badge.is-complete {
  background: #e7f7ef;
  color: #14543d;
}

.technician-complete-form h3,
.technician-complete-form .muted,
.technician-complete-form.is-complete .message {
  margin-bottom: 0;
}

.technician-complete-form:not(.is-complete) button {
  width: fit-content;
  min-height: 40px;
  padding: 0 14px;
  background: #36a56f;
}

.technician-complete-form:not(.is-complete) button:hover {
  background: #277b53;
}

.technician-contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.technician-contact-card {
  width: fit-content;
}

.technician-contact-card summary {
  list-style: none;
  cursor: pointer;
}

.technician-contact-card summary::-webkit-details-marker {
  display: none;
}

.technician-contact-card summary::after {
  content: "Kontakt";
  margin-left: 8px;
  color: #526477;
  font-size: 0.72rem;
  font-weight: 800;
}

.technician-contact-details {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
  color: #405163;
  font-size: 0.9rem;
  font-weight: 700;
}

.technician-contact-details a {
  color: #2267b8;
}

.billable-time-panel {
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f9fbfd;
}

.billable-time-panel h3,
.billable-time-panel .muted {
  margin-bottom: 0;
}

.billable-time-header,
.time-entry-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.time-entry-list {
  display: grid;
  gap: 8px;
}

.time-entry-row {
  padding: 10px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.time-entry-row small {
  display: block;
  margin-top: 2px;
  color: #64758a;
  font-weight: 700;
}

.time-entry-row p {
  margin: 6px 0 0;
  color: #526477;
}

.time-entry-summary {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 130px;
  text-align: right;
}

.time-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.time-entry-actions button,
.time-entry-edit-form button {
  min-height: 34px;
  padding: 0 10px;
}

.time-entry-edit-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 140px);
  gap: 10px;
  width: 100%;
}

.time-entry-form button {
  width: fit-content;
  min-height: 40px;
  padding: 0 14px;
}

.admin-technician-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.inline-import-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e4ebf2;
}

.inline-import-panel h3 {
  margin-bottom: 0;
}

.danger-button {
  background: #b0332f;
}

.danger-button:hover {
  background: #8e2926;
}

.danger-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.danger-button.is-confirming {
  background: #7f1d1d;
}

.booking-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
}

.booking-meta div {
  padding: 10px;
  border-radius: 8px;
  background: #f5f8fb;
}

.booking-meta dt {
  color: #64758a;
  font-size: 0.78rem;
  font-weight: 800;
}

.booking-meta dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.calendar-access-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f9fbfd;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.attendee-choice {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f9fbfd;
}

.attendee-choice legend {
  padding: 0 4px;
  color: #1e2936;
  font-weight: 800;
}

.attendee-choice .muted {
  margin-bottom: 0;
}

.choice-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.choice-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.choice-row span {
  display: grid;
  gap: 3px;
}

.choice-row small {
  color: #64758a;
  font-weight: 600;
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.attachment-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f9fbfd;
  font-weight: 700;
}

.attachment-link span {
  display: grid;
  gap: 2px;
  color: #64758a;
  font-size: 0.82rem;
}

.attachment-link > span:first-child {
  min-width: 0;
  color: #1e2936;
  overflow-wrap: anywhere;
}

.attachment-link small {
  color: #64758a;
  font-size: 0.76rem;
  font-weight: 600;
}

.delete-attachment-button {
  min-height: 42px;
  padding: 0 12px;
  background: #b0332f;
}

.delete-attachment-button:hover {
  background: #8e2926;
}

.download-attachment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: #2267b8;
  color: #ffffff;
  font-weight: 800;
}

.download-attachment-button:hover {
  background: #174f91;
}

.file-picker {
  position: relative;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  overflow: hidden;
  border-radius: 8px;
  background: #2267b8;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.file-picker:hover {
  background: #174f91;
}

.file-picker input {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
}

.upload-help {
  margin: -4px 0 0;
}

.popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 34, 0.42);
}

.popup-dialog {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 34, 0.22);
}

.popup-dialog p {
  color: #526477;
  font-size: 1.05rem;
  line-height: 1.45;
  white-space: pre-line;
}

.popup-dialog button {
  min-height: 44px;
  padding: 0 18px;
}

.booking-row,
.user-row {
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  align-items: center;
}

.user-row.is-editing {
  grid-template-columns: 1fr;
}

.admin-user-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.admin-user-search {
  margin: 0;
}

.user-edit-form {
  width: 100%;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.user-actions .danger-button {
  min-height: 36px;
  padding: 0 12px;
}

.user-actions .message {
  flex-basis: 100%;
  margin: 0;
  text-align: right;
}

.calendar-access-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e4ebf2;
}

.access-form-title {
  color: #526477;
  font-size: 0.82rem;
  font-weight: 800;
}

.badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e7edf3;
  color: #405163;
  font-size: 0.78rem;
  font-weight: 800;
}

.booking-header-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.status-badge.status-foresporsel {
  background: #fff3db;
  color: #8a4f00;
}

.status-badge.status-booket {
  background: #ffe1df;
  color: #9d2924;
}

.available-dot {
  background: #36a56f;
}

.request-dot {
  background: #f0a137;
}

.booked-dot {
  background: #cf443d;
}

.workflow-new-dot {
  background: #c2410c;
}

.workflow-technician-dot {
  background: #d6a100;
}

.workflow-severa-dot {
  background: #2f9b63;
}

.workflow-request-dot {
  background: #8a5a23;
}

.admin-page-header {
  align-items: flex-end;
}

.admin-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-jump-nav a {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #1e2936;
  font-weight: 800;
}

.admin-jump-nav a:hover {
  border-color: #98a9ba;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-stat {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.admin-stat span {
  color: #64758a;
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-stat strong {
  color: #1e2936;
  font-size: 2rem;
  line-height: 1;
}

.admin-section {
  scroll-margin-top: 18px;
}

.admin-section + .admin-section {
  margin-top: 18px;
}

.admin-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-section-heading h2 {
  margin-bottom: 0;
}

.admin-calendar-shell {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-calendar-title {
  padding: 16px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.admin-calendar-title .booking-calendar-legend {
  margin-bottom: 12px;
}

.admin-room-filter {
  min-width: 220px;
}

.admin-calendar-layout {
  align-items: start;
}

.admin-calendar-day {
  display: grid;
  align-content: start;
  gap: 5px;
  cursor: default;
}

.admin-calendar-day.is-available {
  background: #f1fbf5;
}

.admin-calendar-day.is-available:hover {
  background: #e5f7ed;
}

.admin-day-pick {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.admin-day-pick:hover {
  background: transparent;
}

.available-label {
  color: #277b53;
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-event {
  display: grid;
  width: 100%;
  gap: 2px;
  border: 0;
  border-left: 3px solid currentColor;
  text-align: left;
}

.admin-event.status-foresporsel,
.mobile-booking-item.status-foresporsel {
  background: #fff4df;
  color: #835100;
}

.admin-event.status-foresporsel:hover,
.mobile-booking-item.status-foresporsel:hover,
.mobile-booking-item.status-foresporsel.is-selected {
  background: #ffe8bd;
}

.admin-event.status-booket,
.mobile-booking-item.status-booket {
  background: #ffe8e5;
  color: #9d2924;
}

.admin-event.status-booket:hover,
.mobile-booking-item.status-booket:hover,
.mobile-booking-item.status-booket.is-selected {
  background: #ffd5d0;
}

.admin-event.workflow-request,
.mobile-booking-item.workflow-request,
.workflow-badge.workflow-request {
  background: #f5eadb;
  color: #7a4b18;
}

.admin-event.workflow-request:hover,
.mobile-booking-item.workflow-request:hover,
.mobile-booking-item.workflow-request.is-selected {
  background: #edd8bb;
}

.admin-event.workflow-new,
.mobile-booking-item.workflow-new,
.workflow-badge.workflow-new {
  background: #fee2e2;
  color: #991b1b;
}

.admin-event.workflow-new:hover,
.mobile-booking-item.workflow-new:hover,
.mobile-booking-item.workflow-new.is-selected {
  background: #fecaca;
}

.admin-event.workflow-technician,
.mobile-booking-item.workflow-technician,
.workflow-badge.workflow-technician {
  background: #fef3c7;
  color: #854d0e;
}

.admin-event.workflow-technician:hover,
.mobile-booking-item.workflow-technician:hover,
.mobile-booking-item.workflow-technician.is-selected {
  background: #fde68a;
}

.admin-event.workflow-severa,
.mobile-booking-item.workflow-severa,
.workflow-badge.workflow-severa {
  background: #dcfce7;
  color: #166534;
}

.admin-event.workflow-severa:hover,
.mobile-booking-item.workflow-severa:hover,
.mobile-booking-item.workflow-severa.is-selected {
  background: #bbf7d0;
}

.admin-event.is-selected {
  outline: 2px solid #1e2936;
  outline-offset: 0;
}

.admin-booking-editor h2 {
  margin-bottom: 6px;
  font-size: 1.3rem;
}

.status-action-button {
  background: #36a56f;
}

.status-action-button:hover {
  background: #277b53;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
}

.admin-management-grid,
.admin-settings-grid {
  display: grid;
  align-items: start;
  gap: 18px;
}

.admin-management-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.admin-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-user-panel {
  margin-top: 18px;
}

@media (max-width: 840px) {
  .topbar,
  .section-header,
  .calendar-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-layout,
  .technician-bookings-layout,
  .admin-grid,
  .admin-management-grid,
  .admin-settings-grid,
  .admin-user-panel-header,
  .grid-two,
  .grid-three {
    grid-template-columns: 1fr;
  }

  .admin-page-header {
    align-items: flex-start;
  }

  .admin-jump-nav {
    justify-content: flex-start;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .calendar-day {
    min-height: 88px;
    padding: 5px;
  }

  .event {
    font-size: 0.7rem;
  }

  .user-row {
    grid-template-columns: 1fr;
  }

  .user-actions {
    justify-content: flex-start;
  }

  .user-actions .message {
    text-align: left;
  }

  .booking-meta {
    grid-template-columns: 1fr;
  }

  .booking-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .billable-time-header,
  .time-entry-row {
    flex-direction: column;
  }

  .time-entry-edit-fields {
    grid-template-columns: 1fr;
  }

  .time-entry-summary {
    justify-items: start;
    min-width: 0;
    text-align: left;
  }

  .time-entry-actions {
    justify-content: flex-start;
  }

  .work-time-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .brand {
    max-width: 120px;
  }

  .nav-actions a,
  .ghost-button {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .customer-bookings-title h1 {
    margin-bottom: 6px;
  }

  .customer-bookings-title .muted {
    margin-bottom: 0;
  }

  .quick-book-actions .primary-link {
    width: 100%;
  }

  .booking-calendar-card {
    grid-template-columns: 1fr;
  }

  .booking-calendar-card a {
    width: 100%;
  }

  .calendar-card-image {
    width: 100%;
    height: 96px;
  }

  .customer-bookings-title .month-controls {
    width: 100%;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 96px;
    gap: 8px;
  }

  .customer-bookings-title #previousMonth {
    grid-column: 1;
    grid-row: 1;
  }

  .customer-bookings-title #todayButton {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }

  .customer-bookings-title #nextMonth {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .customer-bookings-title .compact-label {
    grid-column: 1 / 4;
    grid-row: 2;
    min-width: 0;
  }

  .customer-bookings-title .weekend-toggle {
    display: none;
  }

  .booking-overview-desktop {
    display: none;
  }

  .mobile-booking-list {
    display: grid;
    gap: 8px;
  }

  .booking-detail-panel .booking-card {
    padding: 14px;
  }

  .booking-meta {
    gap: 8px;
  }

  .booking-meta div {
    padding: 10px 12px;
  }

  .attachment-row {
    grid-template-columns: 1fr;
  }

  .admin-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .delete-attachment-button,
  .download-attachment-button,
  .file-picker {
    width: 100%;
  }
}
