.ld-desk-body {
  margin: 0;
}

.ld-staff-dashboard {
  --ld-bg: #f5f6f8;
  --ld-panel: #ffffff;
  --ld-ink: #14213d;
  --ld-muted: #667085;
  --ld-line: #d7dae1;
  --ld-primary: #f5b301;
  --ld-primary-strong: #b78600;
  --ld-primary-soft: #fff6d8;
  --ld-accent: var(--ld-primary);
  --ld-info: #4267b2;
  --ld-info-soft: #eef3ff;
  --ld-success: #2e7d5b;
  --ld-success-soft: #eef8f3;
  --ld-danger: #b42318;
  --ld-danger-soft: #fff1ef;
  --ld-warning: #b7791f;
  --ld-warning-soft: #fff7e8;
  --ld-neutral-soft: #f7f7f8;
  --ld-priority: var(--ld-info);
  --ld-radius: 8px;
  min-height: 100dvh;
  color: var(--ld-ink);
  background: var(--ld-bg);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

.ld-staff-dashboard * {
  box-sizing: border-box;
}

.ld-login {
  display: grid;
  min-height: 100dvh;
  align-content: center;
  gap: 20px;
  max-width: 380px;
  margin: 0 auto;
  padding: 24px;
}

.ld-login__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ld-mark {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  background: #fff;
}

.ld-mark--small {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.ld-login h1,
.ld-shift h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.ld-login p,
.ld-shift p {
  margin: 4px 0 0;
  color: var(--ld-muted);
}

.ld-login__form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--ld-line);
  border-radius: var(--ld-radius);
  background: var(--ld-panel);
}

.ld-login__form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.ld-login__form input,
.ld-venue {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--ld-line);
  border-radius: var(--ld-radius);
  padding: 0 12px;
  color: var(--ld-ink);
  background: #fff;
  font: inherit;
}

.ld-login__form button,
.ld-icon-button,
.ld-tabs button,
.ld-card-action {
  min-height: 40px;
  border: 1px solid var(--ld-line);
  border-radius: var(--ld-radius);
  padding: 0 12px;
  color: var(--ld-ink);
  background: #fff;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.ld-icon-button {
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
}

.ld-card-action {
  display: inline-grid;
  grid-template-rows: 22px auto;
  min-width: 72px;
  min-height: 58px;
  align-items: center;
  justify-items: center;
  gap: 3px;
  padding: 7px 8px 6px;
  line-height: 1;
  text-align: center;
}

.ld-card-action__label {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

.ld-icon-button svg,
.ld-card-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.ld-card-action svg {
  width: 21px;
  height: 21px;
}

.ld-icon-button:hover,
.ld-card-action:hover,
.ld-card-action.is-current {
  border-color: var(--ld-primary);
  color: var(--ld-ink);
  background: var(--ld-primary-soft);
}

.ld-icon-button:disabled,
.ld-card-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ld-login__form button {
  color: var(--ld-ink);
  border-color: var(--ld-primary);
  background: var(--ld-primary);
}

.ld-app {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 100dvh;
}

.ld-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ld-line);
  background: var(--ld-panel);
}

.ld-header__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.ld-header strong,
.ld-header span {
  display: block;
}

.ld-header span {
  color: var(--ld-muted);
  font-size: 12px;
}

.ld-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ld-venue {
  max-width: 190px;
}

.ld-tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--ld-line);
  background: #edf0f4;
}

.ld-tabs button {
  position: relative;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ld-tabs button.is-active {
  color: var(--ld-ink);
  border-color: var(--ld-primary);
  background: var(--ld-primary);
}

.ld-tabs button.has-work {
  border-color: rgba(245, 179, 1, 0.62);
  background: var(--ld-primary-soft);
  animation: ld-tab-work-pulse 2.2s ease-in-out infinite;
}

.ld-tabs button.has-urgent {
  border-color: rgba(180, 35, 24, 0.54);
  color: var(--ld-danger);
  background: var(--ld-danger-soft);
  animation-name: ld-tab-urgent-pulse;
}

.ld-tabs button.is-active.has-work {
  color: var(--ld-ink);
  background: var(--ld-primary);
}

.ld-tabs button.is-active.has-urgent {
  color: #fff;
  border-color: var(--ld-danger);
  background: var(--ld-danger);
}

.ld-tab__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ld-tab__badge {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  padding: 0 7px;
  color: #fff;
  background: var(--ld-ink);
  font-size: 12px;
  font-weight: 900;
}

@keyframes ld-tab-work-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 179, 1, 0);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(245, 179, 1, 0.22);
  }
}

@keyframes ld-tab-urgent-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(180, 35, 24, 0);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.24);
  }
}

.ld-error {
  margin: 8px;
  padding: 10px 12px;
  border: 1px solid #f0c2c2;
  border-radius: var(--ld-radius);
  color: #821b1b;
  background: #fff1f1;
}

.ld-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 8px;
  min-height: 0;
  padding: 8px;
  overflow-x: auto;
}

.ld-column {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 180px;
  min-height: 0;
  border: 1px solid var(--ld-line);
  border-radius: var(--ld-radius);
  background: #fdfdfd;
}

.ld-column__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid var(--ld-line);
  font-weight: 800;
}

.ld-column__head b {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--ld-muted);
  background: #eef1f5;
  font-size: 12px;
}

.ld-column__body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
}

.ld-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--ld-line);
  border-left: 5px solid var(--ld-priority);
  border-radius: var(--ld-radius);
  background: var(--ld-panel);
  box-shadow: 0 1px 2px rgba(18, 28, 45, 0.08);
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.ld-card:focus-visible {
  outline: 3px solid rgba(245, 179, 1, 0.42);
  outline-offset: 2px;
}

.ld-card.is-dragging {
  cursor: grabbing;
  opacity: 0.92;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 14px 28px rgba(18, 28, 45, 0.24);
}

.ld-card.is-moving {
  opacity: 0.6;
}

.ld-card--p0,
.ld-card.is-overdue {
  --ld-priority: var(--ld-danger);
  border-left-color: var(--ld-danger);
  background: linear-gradient(90deg, var(--ld-danger-soft), #fff 34%);
}

.ld-card--p1 {
  --ld-priority: var(--ld-warning);
  border-left-color: var(--ld-warning);
  background: linear-gradient(90deg, var(--ld-warning-soft), #fff 34%);
}

.ld-card--p2 {
  --ld-priority: var(--ld-info);
  border-left-color: var(--ld-info);
  background: linear-gradient(90deg, var(--ld-info-soft), #fff 34%);
}

.ld-card__top,
.ld-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ld-card__top span {
  color: var(--ld-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ld-priority-pill {
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--ld-priority);
  font-size: 12px;
  font-weight: 900;
}

.ld-priority-pill--p0 {
  --ld-priority: var(--ld-danger);
}

.ld-priority-pill--p1 {
  --ld-priority: var(--ld-warning);
}

.ld-priority-pill--p2 {
  --ld-priority: var(--ld-info);
}

.ld-priority-pill--p3,
.ld-priority-pill--normal {
  --ld-priority: #667085;
}

.ld-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.ld-card__meta {
  color: var(--ld-muted);
  font-size: 12px;
}

.ld-card__facts {
  display: grid;
  gap: 5px;
  padding-top: 2px;
}

.ld-card__facts div {
  display: grid;
  grid-template-columns: minmax(48px, 0.55fr) minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  font-size: 12px;
}

.ld-card__facts span {
  color: var(--ld-muted);
}

.ld-card__facts strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ld-ink);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ld-card__next {
  margin: 0;
  color: var(--ld-muted);
  font-size: 12px;
  line-height: 1.25;
}

.ld-card__next span {
  margin-right: 4px;
  color: var(--ld-primary-strong);
  font-weight: 900;
}

.ld-empty {
  display: grid;
  min-height: 56px;
  place-items: center;
  border: 1px dashed var(--ld-line);
  border-radius: var(--ld-radius);
  color: var(--ld-muted);
  background: #fff;
}

.ld-column.is-drop-target {
  border-color: var(--ld-primary);
  background: var(--ld-primary-soft);
}

.ld-column.is-drop-target .ld-column__head {
  color: var(--ld-primary-strong);
}

.ld-is-dragging {
  cursor: grabbing;
}

.ld-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(15, 23, 42, 0.42);
}

.ld-modal {
  display: grid;
  gap: 12px;
  width: min(560px, 100%);
  max-height: min(720px, calc(100dvh - 28px));
  overflow: auto;
  border: 1px solid var(--ld-line);
  border-radius: var(--ld-radius);
  background: var(--ld-panel);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.ld-modal__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 14px 0;
}

.ld-modal__head span {
  display: block;
  color: var(--ld-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ld-modal__head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.18;
}

.ld-modal__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px;
}

.ld-modal__badges b {
  border: 1px solid var(--ld-line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #f7f9fb;
  font-size: 12px;
}

.ld-modal__badges .ld-priority-pill {
  border-color: var(--ld-priority);
  color: #fff;
  background: var(--ld-priority);
}

.ld-badge--danger {
  border-color: var(--ld-danger) !important;
  color: var(--ld-danger);
  background: var(--ld-danger-soft) !important;
}

.ld-modal__section {
  display: grid;
  gap: 8px;
  margin: 0 14px;
  padding: 10px;
  border: 1px solid var(--ld-line);
  border-radius: var(--ld-radius);
  background: #fbfcfd;
}

.ld-modal__section h3 {
  margin: 0;
  color: var(--ld-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ld-modal__section p {
  margin: 0;
  color: var(--ld-muted);
  font-size: 13px;
  line-height: 1.35;
}

.ld-detail-list {
  display: grid;
  gap: 7px;
}

.ld-detail-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.5fr);
  gap: 10px;
  align-items: baseline;
}

.ld-detail-row span {
  color: var(--ld-muted);
  font-size: 12px;
}

.ld-detail-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.ld-next-step {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(245, 179, 1, 0.42);
  border-radius: var(--ld-radius);
  background: var(--ld-primary-soft);
}

.ld-next-step span {
  color: var(--ld-primary-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ld-next-step strong {
  font-size: 14px;
}

.ld-technical {
  margin: 0 14px;
  border: 1px solid var(--ld-line);
  border-radius: var(--ld-radius);
  background: #fbfcfd;
}

.ld-technical summary {
  min-height: 42px;
  padding: 11px 12px;
  color: var(--ld-muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.ld-technical .ld-detail-list {
  padding: 0 12px 12px;
}

.ld-modal__actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--ld-line);
  background: var(--ld-panel);
}

.ld-card-action--chat {
  margin-right: auto;
  color: var(--ld-info);
  border-color: #c7d2fe;
  background: var(--ld-info-soft);
}

.ld-shift {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px;
  padding: 16px;
  border: 1px solid var(--ld-line);
  border-radius: var(--ld-radius);
  background: var(--ld-panel);
}

.ld-qr {
  display: grid;
  width: 112px;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid var(--ld-ink);
  border-radius: var(--ld-radius);
  font-weight: 900;
}

@media (max-width: 760px) {
  .ld-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ld-header__actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .ld-venue {
    max-width: none;
  }

  .ld-board {
    grid-template-columns: repeat(4, 82vw);
  }

  .ld-card h3 {
    font-size: 14px;
  }
}

@media (max-width: 430px) {
  .ld-tabs {
    grid-template-columns: repeat(5, minmax(56px, 1fr));
    overflow-x: auto;
  }

  .ld-header__actions {
    grid-template-columns: 1fr 1fr;
  }

  .ld-venue {
    grid-column: 1 / -1;
  }

  .ld-modal-backdrop {
    align-items: end;
    padding: 8px;
  }

  .ld-modal {
    max-height: calc(100dvh - 16px);
  }

  .ld-modal__actions {
    justify-content: stretch;
  }

  .ld-card-action {
    flex: 1 1 64px;
    min-width: 64px;
  }

  .ld-card-action--chat {
    margin-right: 0;
  }

  .ld-detail-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ld-tabs button.has-work,
  .ld-tabs button.has-urgent {
    animation: none;
  }
}
