:root {
  --mobile-header: 78px;
  --mobile-bottom: 64px;
  --aureo-green: #0b3d24;
  --aureo-green-soft: #dceee4;
  --aureo-bg: #f5f8f2;
  --aureo-card: rgba(255, 255, 255, 0.72);
  --aureo-border: rgba(255, 255, 255, 0.55);
  --aureo-shadow: 0 18px 45px rgba(15, 44, 31, 0.12);
}

.mobile-reorder-card-controls {
  display: none;
}

/* Today cards: direct crew assignment, whole-card navigation and touch reorder mode. */
@media (max-width: 768px) {
  .mobile-job-card[data-job-url] {
    cursor: pointer;
    transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  }

  .mobile-job-card[data-job-url]:focus-visible {
    outline: 3px solid rgba(27, 126, 72, 0.3);
    outline-offset: 3px;
  }

  .mobile-job-card-top {
    flex-wrap: wrap;
  }

  .mobile-quick-crew-top {
    position: relative;
    z-index: 3;
    flex: 0 1 min(54%, 290px);
    min-width: 190px;
    margin: 0;
  }

  .mobile-quick-crew.mobile-quick-crew-top {
    margin: 0;
  }

  .mobile-quick-crew-select-shell {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #dfbd58;
    border-radius: 16px;
    color: #5f4300;
    background: #ffefb8;
    box-shadow: 0 9px 20px rgba(135, 93, 0, 0.13);
  }

  .mobile-quick-crew-select-shell > i {
    pointer-events: none;
  }

  .mobile-quick-crew-select-shell > .bi-chevron-down {
    font-size: 0.82rem;
  }

  .mobile-quick-crew-select {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0;
    border: 0;
    outline: 0;
    color: #5f4300;
    background: transparent;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 950;
    appearance: none;
    -webkit-appearance: none;
  }

  .mobile-quick-crew-select:disabled {
    opacity: 0.62;
  }

  .mobile-quick-crew-top > small {
    display: block;
    min-height: 0;
    margin-top: 5px;
    color: #6e5616;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: right;
  }

  .mobile-quick-crew-top > small:empty {
    display: none;
  }

  .mobile-quick-crew-top > small.is-error {
    color: #a42318;
  }

  .mobile-job-card .mobile-card-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-reorder-toolbar {
    position: sticky;
    top: calc(var(--mobile-header, 56px) + env(safe-area-inset-top) + 8px);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 11px 10px 14px;
    border: 1px solid #b8d9c3;
    border-radius: 16px;
    background: rgba(239, 250, 242, 0.96);
    box-shadow: 0 12px 28px rgba(14, 68, 37, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .mobile-reorder-toolbar[hidden] {
    display: none !important;
  }

  .mobile-reorder-toolbar > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #174e31;
  }

  .mobile-reorder-toolbar > div > i {
    font-size: 1.2rem;
  }

  .mobile-reorder-toolbar span,
  .mobile-reorder-toolbar b,
  .mobile-reorder-toolbar small {
    display: block;
  }

  .mobile-reorder-toolbar b {
    font-size: 0.86rem;
    font-weight: 950;
  }

  .mobile-reorder-toolbar small {
    overflow: hidden;
    max-width: min(54vw, 360px);
    color: #577063;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-reorder-toolbar small.is-success {
    color: #0f7542;
  }

  .mobile-reorder-toolbar small.is-error {
    color: #a42318;
  }

  .mobile-reorder-card-controls {
    display: none;
  }

  .mobile-job-list.is-reordering .mobile-job-card {
    animation: aureo-today-card-jiggle 190ms ease-in-out infinite alternate;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .mobile-job-list.is-reordering .mobile-job-card:nth-child(even) {
    animation-delay: -95ms;
    animation-direction: alternate-reverse;
  }

  .mobile-job-list.is-reordering .mobile-job-card.is-dragging {
    z-index: 12;
    animation: none;
    cursor: grabbing;
    transform: scale(1.025);
    box-shadow: 0 24px 48px rgba(14, 68, 37, 0.24);
  }

  .mobile-job-list.is-reordering .mobile-card-actions,
  .mobile-job-list.is-reordering .mobile-quick-crew {
    pointer-events: none;
    opacity: 0.38;
  }

  .mobile-job-list.is-reordering .mobile-reorder-card-controls {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border: 1px solid #c8ddd0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%);
    box-shadow: 0 8px 20px rgba(16, 60, 35, 0.13);
  }

  .mobile-reorder-card-controls button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #155f39;
    background: #e9f6ed;
  }

  .mobile-reorder-card-controls > i {
    color: #6a7c70;
  }

  .mobile-job-card.is-assigned-away {
    opacity: 0;
    transform: scale(0.97);
  }

  @keyframes aureo-today-card-jiggle {
    from { transform: rotate(-0.35deg) translateX(-1px); }
    to { transform: rotate(0.35deg) translateX(1px); }
  }
}

@media (max-width: 430px) {
  .mobile-quick-crew-top {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-job-list.is-reordering .mobile-job-card {
    animation: none;
    outline: 2px dashed #4d9b69;
    outline-offset: 2px;
  }

  .mobile-job-card[data-job-url] {
    transition: none;
  }
}

.mobile-app-header,
.mobile-bottom-nav,
.mobile-sheet-backdrop,
.mobile-more-sheet,
.mobile-context-sheet,
.mobile-job-detail {
  display: none;
}

.mobile-camera-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.mobile-photo-preview {
  display: none;
}

.clients-mobile-shell {
  display: none;
}

.pwa-install-guide {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
}

.pwa-install-guide[hidden] {
  display: none;
}

.pwa-install-guide-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(10, 29, 18, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pwa-install-guide-card {
  position: relative;
  width: min(420px, 100%);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  color: #102018;
  box-shadow: 0 28px 80px rgba(6, 24, 14, 0.3);
}

.pwa-install-guide-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 18px;
  background: #e3f3e8;
  color: #0f6f3f;
  font-size: 1.5rem;
}

.pwa-install-guide-card h3 {
  margin: 0 0 8px;
}

.pwa-install-guide-card p {
  margin: 0 0 14px;
  color: #52675b;
}

.pwa-install-guide-card ol {
  margin: 0 0 20px;
  padding-left: 1.25rem;
  color: #274236;
}

.pwa-install-guide-card li + li {
  margin-top: 8px;
}

.pwa-install-guide-card .btn {
  width: 100%;
}

body.pwa-install-guide-open {
  overflow: hidden;
}

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

  body {
    background:
      radial-gradient(circle at 16% 8%, rgba(220, 238, 228, 0.72), transparent 32%),
      radial-gradient(circle at 86% 18%, rgba(244, 211, 110, 0.22), transparent 28%),
      var(--aureo-bg);
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  body.mobile-sheet-open {
    overflow: hidden;
  }

  button,
  .mobile-action,
  .nav-item,
  .mobile-action-button,
  .mobile-chip-button,
  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-height: 48px;
    min-width: 48px;
    border-radius: 14px;
    font-size: 16px;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .mobile-app-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1040;
    height: calc(var(--mobile-header) + env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
    background: #eaf6ed;
    border-bottom: 2px solid #cbe4d3;
    box-shadow: 0 14px 34px rgba(15, 68, 38, 0.12);
  }

  .mobile-brand {
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #173422;
    font-size: 1.12rem;
    font-weight: 950;
    letter-spacing: 0.035em;
    line-height: 1.08;
    text-transform: uppercase;
  }

  .mobile-brand:hover,
  .mobile-brand:focus-visible {
    color: #0f6f3f;
  }

  .mobile-brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(3, 24, 13, 0.2);
    flex: 0 0 auto;
  }

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

  .mobile-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 0 0 auto;
  }

  .mobile-icon-button {
    width: 56px;
    height: 56px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #cbe4d3;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.76);
    color: #14532d;
    box-shadow: 0 10px 22px rgba(15, 68, 38, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .mobile-icon-button:hover,
  .mobile-icon-button:focus-visible {
    background: #fff;
    color: #0f6f3f;
    border-color: #a9d5b7;
  }

  .mobile-icon-button i {
    font-size: 1.35rem;
    line-height: 1;
  }

  .topbar {
    display: none !important;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    width: 100%;
    margin-left: 0;
    padding: calc(var(--mobile-header) + env(safe-area-inset-top) + 14px) 12px calc(var(--mobile-bottom) + 48px + env(safe-area-inset-bottom));
  }

  .flash-wrap {
    margin-bottom: 12px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 1040;
    min-height: var(--mobile-bottom);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 6px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 -12px 35px rgba(15, 44, 31, 0.1);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    transition: transform 220ms ease, opacity 180ms ease;
    will-change: transform;
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: #5b6f62;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
  }

  .mobile-bottom-nav i {
    font-size: 1.04rem;
  }

  .mobile-bottom-nav .active {
    color: #0f6f3f;
    background: rgba(220, 238, 228, 0.68);
    box-shadow: inset 0 0 0 1px rgba(15, 111, 63, 0.07);
  }

  .mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1045;
    background: rgba(6, 15, 10, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .mobile-sheet-backdrop.show {
    display: block;
  }

  .mobile-bottom-sheet {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 1050;
    max-height: min(82vh, 720px);
    overflow-y: auto;
    display: block;
    padding: 10px 14px 16px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--aureo-border);
    box-shadow: 0 24px 70px rgba(6, 15, 10, 0.22);
    transform: translateY(calc(100% + 24px));
    transition: transform 220ms ease, opacity 220ms ease;
    opacity: 0;
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    outline: 0;
  }

  .mobile-bottom-sheet.open {
    transform: translateY(0);
    opacity: 1;
  }

  .mobile-more-handle {
    width: 48px;
    height: 5px;
    border-radius: 999px;
    margin: 0 auto 12px;
    background: #d7e5dc;
  }

  .mobile-more-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
  }

  .mobile-more-head b,
  .mobile-more-head span {
    display: block;
  }

  .mobile-more-head span {
    color: #607267;
    font-size: 0.9rem;
  }

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

  .mobile-brand-profile {
    position: relative;
    isolation: isolate;
    min-height: 86px;
    border-radius: 22px;
    overflow: hidden;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #0d4426, #17683c);
    box-shadow: 0 16px 38px rgba(15, 44, 31, 0.16);
  }

  .mobile-brand-profile.has-brand-banner {
    background-image: var(--brand-card-bg);
    background-size: cover;
    background-position: center;
  }

  .mobile-brand-profile-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(5, 28, 15, .72), rgba(5, 28, 15, .28));
  }

  .mobile-brand-avatar {
    width: 54px;
    height: 54px;
    border: 2px solid rgba(255,255,255,.72);
    font-size: 1.2rem;
  }

  .mobile-brand-profile-copy b,
  .mobile-brand-profile-copy small {
    display: block;
    color: #fff;
    line-height: 1.12;
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
  }

  .mobile-brand-profile-copy small {
    color: rgba(255,255,255,.86);
    margin-top: 2px;
  }

  .mobile-more-grid a,
  .mobile-more-grid button.mobile-more-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 68px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.62);
    color: #102018;
    font-weight: 850;
    box-shadow: 0 12px 30px rgba(15, 44, 31, 0.07);
    text-align: left;
  }

  .mobile-more-grid i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(220, 238, 228, 0.82);
    color: #0f6f3f;
    flex: 0 0 auto;
  }

  .mobile-more-grid b,
  .mobile-more-grid small,
  .mobile-action-list b,
  .mobile-action-list small {
    display: block;
  }

  .mobile-more-grid small,
  .mobile-action-list small {
    margin-top: 2px;
    color: #607267;
    font-size: 0.76rem;
    line-height: 1.2;
  }

  .mobile-more-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e1ece4;
  }

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

  .mobile-action-list a,
  .mobile-action-list button {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.64);
    color: #102018;
    text-align: left;
    font-weight: 850;
    box-shadow: 0 12px 30px rgba(15, 44, 31, 0.07);
  }

  .mobile-action-list i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #0f6f3f;
    background: rgba(220, 238, 228, 0.82);
    flex: 0 0 auto;
  }

  .mobile-action-list .danger i {
    color: #9f1d1d;
    background: rgba(255, 229, 229, 0.9);
  }

  .mobile-offline-banner {
    position: fixed;
    inset: calc(var(--mobile-header) + env(safe-area-inset-top) + 8px) 12px auto;
    z-index: 1060;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff4d6;
    border: 1px solid #f1c96a;
    color: #6a4a00;
    font-weight: 850;
    box-shadow: 0 14px 30px rgba(15, 44, 31, 0.12);
  }

  .mobile-today-shell,
  .mobile-gallery-shell {
    display: grid;
    gap: 14px;
  }

  .mobile-today-hero,
  .mobile-job-hero,
  .mobile-section-card,
  .mobile-empty {
    border: 1px solid var(--aureo-border);
    border-radius: 22px;
    background: var(--aureo-card);
    box-shadow: var(--aureo-shadow);
    backdrop-filter: blur(18px) saturate(155%);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
  }

  .mobile-today-hero {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 18px;
    color: #fff;
    background: linear-gradient(135deg, #102018, #197043);
  }

  .mobile-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #14532d;
    background: #e6f6e5;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .mobile-today-hero .mobile-eyebrow {
    min-height: 30px;
    padding-inline: 12px;
    color: #ddf5de;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.84rem;
    letter-spacing: 0.06em;
  }

  .mobile-greeting-block {
    display: grid;
    gap: 2px;
    margin: 13px 0 8px;
  }

  .mobile-today-hero .mobile-greeting-title {
    margin: 0;
    font-family: "Avenir Next", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
    font-size: clamp(1.85rem, 8.5vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 0.98;
  }

  .mobile-today-hero .mobile-greeting-name {
    margin: 3px 0 0;
    color: rgba(255, 255, 255, 0.94);
    font-family: "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
    font-size: clamp(1.25rem, 6.2vw, 1.52rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.08;
  }

  .mobile-today-hero .mobile-today-job-count {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
  }

  .mobile-day-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
  }

  .mobile-day-counts span,
  .mobile-clock-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border-radius: 999px;
    padding: 0 10px;
    color: #e7f8ec;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 850;
    font-size: 0.82rem;
  }

  .mobile-clock-pill {
    align-self: stretch;
    flex: 0 0 78px;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 78px;
    height: auto;
    min-height: 112px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 23px;
    color: #102018;
    background: #f4d36e;
    box-shadow: 0 14px 28px rgba(4, 28, 15, 0.18);
    line-height: 1;
  }

  .mobile-clock-pill i {
    font-size: 1.3rem;
  }

  .mobile-clock-pill.is-clocked-in {
    color: #fff;
    background: #21a65b;
  }

  .mobile-crew-filter {
    display: flex;
    gap: 8px;
    min-width: 0;
    padding: 9px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    border: 1px solid rgba(207, 226, 212, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(15, 44, 31, 0.09);
    -webkit-overflow-scrolling: touch;
  }

  .mobile-crew-filter::-webkit-scrollbar {
    display: none;
  }

  .mobile-crew-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 15px;
    scroll-snap-align: start;
    border: 1px solid #d6e6da;
    border-radius: 14px;
    color: #365443;
    background: #f7faf7;
    font-size: 0.84rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-crew-filter-pill.is-active {
    border-color: #155f39;
    color: #fff;
    background: #155f39;
    box-shadow: 0 8px 18px rgba(21, 95, 57, 0.22);
  }

  .mobile-crew-filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #49a86f;
  }

  .mobile-crew-filter-pill.is-active .mobile-crew-filter-dot {
    background: #b8f0ca;
  }

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

  .mobile-job-card {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border-radius: 22px;
    background: var(--aureo-card);
    border: 1px solid var(--aureo-border);
    box-shadow: var(--aureo-shadow);
    backdrop-filter: blur(18px) saturate(155%);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
  }

  .mobile-job-card:before,
  .mobile-job-hero:before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #9fb5a8;
  }

  .status-left-scheduled:before,
  .status-left-new:before,
  .status-left-confirmed:before,
  .status-left-pending_assignment:before {
    background: #2f69c7;
  }

  .status-left-on_the_way:before,
  .status-left-on_route:before {
    background: #d08a00;
  }

  .status-left-arrived:before {
    background: #0284c7;
  }

  .status-left-in_progress:before,
  .status-left-completed:before,
  .status-left-paid:before {
    background: #16834c;
  }

  .status-left-needs_review:before,
  .status-left-paused:before,
  .status-left-pending_payment:before {
    background: #b45309;
  }

  .status-left-cancelled:before {
    background: #b42318;
  }

  .mobile-job-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
  }

  .mobile-time {
    display: block;
    color: #5a7062;
    font-weight: 900;
    margin-bottom: 8px;
  }

  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
  }

  .status-badge i {
    font-size: 0.42rem;
  }

  .status-on_the_way,
  .status-on_route,
  .status-pending_assignment {
    background: #fff4d6;
    color: #8a5b00;
  }

  .status-arrived {
    background: #e0f2fe;
    color: #075985;
  }

  .status-needs_review,
  .status-pending_payment {
    background: #fef3c7;
    color: #92400e;
  }

  .mobile-job-card h3,
  .mobile-job-hero h2,
  .mobile-section-title h2,
  .mobile-section-title h3 {
    margin: 12px 0 4px;
    color: #102018;
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.12;
  }

  .mobile-job-card h3 {
    font-size: 1.2rem;
  }

  .mobile-address,
  .mobile-service,
  .mobile-muted,
  .mobile-section-title p {
    color: #5c7063;
  }

  .mobile-address,
  .mobile-service {
    margin: 5px 0 0;
    line-height: 1.42;
  }

  .mobile-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
  }

  .mobile-job-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f1f8ef;
    color: #355242;
    font-weight: 800;
    font-size: 0.82rem;
  }

  .mobile-note-preview {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 10px;
    border-radius: 14px;
    background: #fff8e4;
    color: #69511a;
    font-weight: 750;
  }

  .mobile-quick-crew {
    margin-top: 14px;
  }

  .mobile-quick-crew-toggle {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid #e7ca76;
    border-radius: 15px;
    color: #624500;
    background: #fff4d6;
    font-weight: 900;
    text-align: left;
  }

  .mobile-quick-crew-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
  }

  .mobile-quick-crew-toggle .bi-chevron-down {
    transition: transform 160ms ease;
  }

  .mobile-quick-crew-panel {
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #d5e6da;
    border-radius: 15px;
    background: #f4faf5;
  }

  .mobile-quick-crew-panel[hidden] {
    display: none;
  }

  .mobile-quick-crew-panel > label {
    display: block;
    margin-bottom: 7px;
    color: #263d30;
    font-size: 0.82rem;
    font-weight: 900;
  }

  .mobile-quick-crew-panel > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .mobile-quick-crew-panel .btn {
    min-height: 46px;
    padding-inline: 16px;
  }

  .mobile-quick-crew-panel small {
    display: block;
    min-height: 1em;
    margin-top: 7px;
    color: #597064;
    font-weight: 750;
  }

  .mobile-quick-crew-panel small.is-error {
    color: #a42318;
  }

  .mobile-quick-crew-success {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 14px;
    background: #e5f6e9;
    color: #0f6f3f;
    font-weight: 900;
  }

  .mobile-card-actions,
  .mobile-quick-actions,
  .mobile-job-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
  }

  .mobile-action-button {
    width: 100%;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    padding: 0 14px;
    color: #fff;
    background: #0f6f3f;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    box-shadow: 0 14px 26px rgba(15, 111, 63, 0.18);
  }

  .mobile-action-button.secondary {
    color: #102018;
    background: #f2f8f1;
    border: 1px solid #d8e8dc;
    box-shadow: none;
  }

  .mobile-inline-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }

  .mobile-chip-button,
  .quick-note-chips button,
  .mobile-save-photo {
    border: 1px solid #d8e8dc;
    background: #fff;
    color: #143722;
    padding: 0 12px;
    font-weight: 850;
  }

  .mobile-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 190px;
    padding: 22px;
    text-align: center;
    color: #607267;
  }

  .mobile-empty i {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #0f6f3f;
    background: #e8f5ec;
    font-size: 1.45rem;
  }

  .mobile-job-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    max-width: 100%;
    overflow: hidden;
  }

  .mobile-job-detail > *,
  .mobile-today-shell > *,
  .mobile-gallery-shell > * {
    min-width: 0;
    max-width: 100%;
  }

  .desktop-job-layout {
    display: none !important;
  }

  .mobile-job-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    padding: 18px 18px 18px 22px;
  }

  .mobile-job-hero h2 {
    font-size: 1.55rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.08;
  }

  .mobile-job-hero p {
    margin: 0;
    color: #5c7063;
    font-weight: 800;
    overflow-wrap: anywhere;
  }

  .mobile-job-address {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    color: #304537;
    line-height: 1.42;
  }

  .mobile-job-address span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .mobile-job-progress {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 10px;
  }

  .mobile-job-progress span {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dbe8df;
    color: #607267;
    font-weight: 850;
  }

  .mobile-job-progress span.active {
    background: #102018;
    color: #fff;
    border-color: #102018;
  }

  .mobile-section-card {
    padding: 16px;
    width: 100%;
    min-width: 0;
  }

  .mobile-navigation-customize {
    order: -1;
  }

  .mobile-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mobile-section-title h2 {
    font-size: 1.55rem;
  }

  .mobile-section-title h3 {
    font-size: 1.12rem;
    margin-top: 0;
  }

  .mobile-section-title p {
    margin: 2px 0 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .mobile-photo-upload-grid {
    display: grid;
    gap: 10px;
  }

  .mobile-photo-form {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dbe8df;
    border-radius: 18px;
    background: #f8fbf7;
  }

  .mobile-photo-preview[src] {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 16px;
  }

  .mobile-save-photo {
    display: none;
  }

  .mobile-photo-form.has-file .mobile-save-photo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .mobile-photo-strip,
  .mobile-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
  }

  .mobile-photo-strip a,
  .mobile-photo-tile {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #dbe8df;
    color: #102018;
  }

  .mobile-photo-strip img,
  .mobile-photo-tile img {
    width: 100%;
    height: 132px;
    object-fit: cover;
  }

  .mobile-photo-strip span,
  .mobile-photo-tile div {
    display: block;
    padding: 9px;
    font-weight: 850;
  }

  .mobile-photo-tile b,
  .mobile-photo-tile small {
    display: block;
    margin-top: 5px;
  }

  .mobile-photo-tile small {
    color: #607267;
  }

  .quick-note-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .quick-note-chips button {
    flex: 0 0 auto;
    min-height: 38px;
    border-radius: 999px;
    font-size: 0.9rem;
  }

  .mobile-material-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px 78px;
    gap: 8px;
  }

  .mobile-material-form .mobile-action-button {
    grid-column: 1 / -1;
  }

  .mobile-gallery-shell .mobile-section-title {
    padding: 16px;
    border-radius: 22px;
    background: #102018;
    color: #fff;
  }

  .mobile-gallery-shell .mobile-section-title h2,
  .mobile-gallery-shell .mobile-section-title p {
    color: #fff;
  }

  .table-card-mobile {
    display: none;
  }

  .mobile-card-table {
    display: block;
    border-collapse: separate;
  }

  .mobile-card-table thead {
    display: none;
  }

  .mobile-card-table tbody,
  .mobile-card-table tr,
  .mobile-card-table td {
    display: block;
    width: 100%;
  }

  .mobile-card-table tr {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--aureo-border);
    border-radius: 18px;
    background: var(--aureo-card);
    box-shadow: 0 12px 28px rgba(15, 44, 31, 0.07);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
  }

  .mobile-card-table td {
    padding: 7px 0 !important;
    border: 0 !important;
    white-space: normal !important;
  }

  .mobile-card-table td[data-label]:before {
    content: attr(data-label);
    display: block;
    color: #607267;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .mobile-card-table td.text-end {
    text-align: left !important;
  }

  .card-soft {
    border-radius: 20px;
  }

  .mobile-glass-card,
  .card-soft.mobile-glass-card {
    background: var(--aureo-card);
    border-color: var(--aureo-border);
    box-shadow: var(--aureo-shadow);
    backdrop-filter: blur(18px) saturate(155%);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
  }

  .card-soft .card-body {
    padding: 15px;
  }

  .filter-card form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-control,
  .form-select {
    min-height: 48px;
    font-size: 16px;
  }

  .top-actions {
    display: none !important;
  }

  .row.g-4,
  .row.g-3 {
    --bs-gutter-y: 0.75rem;
  }
}

/* Customers: dedicated compact mobile directory inspired by field-service apps. */
@media (max-width: 768px) {
  body.clients-list-screen .clients-desktop-only {
    display: none !important;
  }

  body.clients-list-screen .clients-mobile-shell {
    display: grid;
    gap: 14px;
    min-width: 0;
  }

  body.clients-list-screen .clients-mobile-actions {
    display: grid;
    gap: 8px;
  }

  body.clients-list-screen .clients-mobile-primary {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    color: #fff !important;
    font-size: 1rem;
  }

  body.clients-list-screen .clients-mobile-primary:hover,
  body.clients-list-screen .clients-mobile-primary:focus-visible {
    color: #fff !important;
  }

  body.clients-list-screen .clients-mobile-portal {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    background: #fff;
    font-size: 1rem;
  }

  body.clients-list-screen .clients-mobile-more,
  body.clients-list-screen .clients-mobile-filter-panel,
  body.clients-list-screen .clients-mobile-row-menu {
    position: relative;
  }

  body.clients-list-screen .clients-mobile-more > summary,
  body.clients-list-screen .clients-mobile-filter-panel > summary,
  body.clients-list-screen .clients-mobile-row-menu > summary {
    list-style: none;
    cursor: pointer;
  }

  body.clients-list-screen .clients-mobile-more > summary::-webkit-details-marker,
  body.clients-list-screen .clients-mobile-filter-panel > summary::-webkit-details-marker,
  body.clients-list-screen .clients-mobile-row-menu > summary::-webkit-details-marker {
    display: none;
  }

  body.clients-list-screen .clients-mobile-more > summary {
    min-height: 48px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid #d8e5dc;
    border-radius: 14px;
    background: #fff;
    color: #146b3d;
    font-weight: 850;
    text-align: center;
  }

  body.clients-list-screen .clients-mobile-more > summary i:first-child {
    justify-self: end;
  }

  body.clients-list-screen .clients-mobile-more > summary i:last-child,
  body.clients-list-screen .clients-mobile-filter-panel > summary > i:last-child {
    transition: transform 160ms ease;
  }

  body.clients-list-screen .clients-mobile-more[open] > summary i:last-child,
  body.clients-list-screen .clients-mobile-filter-panel[open] > summary > i:last-child {
    transform: rotate(180deg);
  }

  body.clients-list-screen .clients-mobile-more > div {
    display: grid;
    gap: 6px;
    margin-top: 7px;
    padding: 8px;
    border: 1px solid #d8e5dc;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 44, 31, 0.1);
  }

  body.clients-list-screen .clients-mobile-more > div a,
  body.clients-list-screen .clients-mobile-row-menu > div a {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #173422;
    font-weight: 760;
  }

  body.clients-list-screen .clients-mobile-more > div a:hover,
  body.clients-list-screen .clients-mobile-row-menu > div a:hover {
    background: #edf7f0;
  }

  body.clients-list-screen .clients-mobile-insights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body.clients-list-screen .clients-mobile-insights article {
    position: relative;
    min-width: 0;
    min-height: 118px;
    display: grid;
    align-content: space-between;
    gap: 3px;
    padding: 14px;
    border: 1px solid #d8e5dc;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(15, 44, 31, 0.07);
  }

  body.clients-list-screen .clients-mobile-insights article > span {
    max-width: calc(100% - 18px);
    color: #123525;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  body.clients-list-screen .clients-mobile-insights article > small {
    align-self: start;
    color: #66786d;
    font-size: 0.72rem;
  }

  body.clients-list-screen .clients-mobile-insights article > strong {
    align-self: end;
    font-size: 1.65rem;
    line-height: 1;
  }

  body.clients-list-screen .clients-mobile-insights article > i {
    position: absolute;
    top: 14px;
    right: 13px;
    color: #176f42;
  }

  body.clients-list-screen .clients-mobile-directory-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 2px 0;
  }

  body.clients-list-screen .clients-mobile-directory-head h2 {
    min-width: 0;
    margin: 0;
    color: #102f20;
    font-size: 1.32rem;
    font-weight: 920;
  }

  body.clients-list-screen .clients-mobile-directory-head span {
    flex: 0 0 auto;
    color: #607267;
    font-size: 0.8rem;
  }

  body.clients-list-screen .clients-mobile-filter-panel > summary {
    min-height: 50px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid #ceded3;
    border-radius: 15px;
    background: #fff;
    color: #143722;
    font-weight: 500;
  }

  body.clients-list-screen .clients-mobile-filter-panel > summary > span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  body.clients-list-screen .clients-mobile-filter-panel > summary > b {
    padding: 4px 8px;
    border-radius: 999px;
    background: #e7f4eb;
    color: #146b3d;
    font-size: 0.68rem;
  }

  body.clients-list-screen .clients-mobile-filter-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 7px;
    padding: 10px;
    border: 1px solid #d8e5dc;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 44, 31, 0.08);
  }

  body.clients-list-screen .clients-mobile-search {
    position: relative;
    min-width: 0;
  }

  body.clients-list-screen .clients-mobile-search > i {
    position: absolute;
    left: 13px;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: #65776c;
  }

  body.clients-list-screen .clients-mobile-search input {
    min-width: 0;
    width: 100%;
    padding-left: 38px;
  }

  body.clients-list-screen .clients-mobile-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.clients-list-screen .clients-mobile-filter-actions .btn:only-child {
    grid-column: 1 / -1;
  }

  body.clients-list-screen .clients-mobile-list {
    min-width: 0;
    border: 1px solid #d8e5dc;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 30px rgba(15, 44, 31, 0.07);
  }

  body.clients-list-screen .clients-mobile-customer {
    min-width: 0;
    padding: 14px;
    border-bottom: 1px solid #e5ede7;
  }

  body.clients-list-screen .clients-mobile-customer:last-child {
    border-bottom: 0;
  }

  body.clients-list-screen .clients-mobile-customer-main {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }

  body.clients-list-screen .clients-mobile-customer-main > div {
    min-width: 0;
  }

  body.clients-list-screen .clients-mobile-customer-main > div > a {
    display: block;
    min-width: 0;
    color: #102f20;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  body.clients-list-screen .clients-mobile-customer-main p {
    margin: 5px 0 2px;
    color: #455a4d;
    font-size: 0.84rem;
    font-weight: 720;
  }

  body.clients-list-screen .clients-mobile-customer-main small {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #607267;
    font-size: 0.77rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.clients-list-screen .clients-mobile-customer-main small a {
    color: #176f42;
  }

  body.clients-list-screen .clients-mobile-customer-main > .badge-status {
    padding: 0.32rem 0.52rem;
    font-size: 0.66rem;
  }

  body.clients-list-screen .clients-mobile-customer-meta {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin-top: 11px;
    color: #66786d;
    font-size: 0.7rem;
  }

  body.clients-list-screen .clients-mobile-customer-meta > span {
    display: inline-flex;
    align-items: center;
  }

  body.clients-list-screen .clients-mobile-customer-meta > span + span:before {
    content: "·";
    margin-right: 10px;
    color: #9aaba0;
  }

  body.clients-list-screen .clients-mobile-row-menu {
    margin-left: auto;
  }

  body.clients-list-screen .clients-mobile-row-menu > summary {
    width: 36px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #173422;
    font-size: 1rem;
  }

  body.clients-list-screen .clients-mobile-row-menu > div {
    position: absolute;
    top: 36px;
    right: 0;
    z-index: 25;
    width: min(230px, calc(100vw - 64px));
    display: grid;
    gap: 4px;
    padding: 7px;
    border: 1px solid #d8e5dc;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 44, 31, 0.18);
  }

  body.clients-list-screen .clients-mobile-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding: 0;
    border: 0;
  }

  body.clients-list-screen .clients-mobile-pagination .btn:last-child {
    justify-self: end;
  }
}

@media (max-width: 430px) {
  .mobile-card-actions,
  .mobile-quick-actions,
  .mobile-job-hero-actions {
    grid-template-columns: 1fr;
  }

  .mobile-photo-grid,
  .mobile-photo-strip {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-brand span {
    max-width: 160px;
  }
}

@media (max-width: 375px) {
  .mobile-brand span {
    max-width: 125px;
  }

  .mobile-job-meta span {
    font-size: 0.78rem;
  }
}

@media (min-width: 769px) {
  .desktop-job-layout {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-bottom-nav {
    transition: none !important;
  }
}

@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  @media (max-width: 768px) {
    .mobile-app-header,
    .mobile-icon-button,
    .mobile-bottom-nav,
    .mobile-bottom-sheet,
    .mobile-today-hero,
    .mobile-job-hero,
    .mobile-job-card,
    .mobile-section-card,
    .mobile-card-table tr,
    .mobile-glass-card {
      background: #ffffff;
    }

    .mobile-today-hero {
      background: linear-gradient(135deg, #102018, #197043);
    }
  }
}

@media (max-width: 768px) {
  .mobile-more-sheet {
    width: calc(100vw - 24px);
    max-width: 680px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: max(16px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  }

  .mobile-more-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .mobile-more-grid a.mobile-more-card,
  .mobile-more-grid button.mobile-more-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: auto;
    box-sizing: border-box;
    padding: 14px;
    border-radius: 20px;
    overflow: hidden;
  }

  .mobile-more-card span,
  .mobile-more-card-title,
  .mobile-more-card-description {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
  }

  .mobile-more-card-title {
    font-size: 1rem;
    line-height: 1.2;
  }

  .mobile-more-card-description {
    font-size: 0.86rem;
    line-height: 1.35;
  }
}

/* Shared week strip for Today and Scheduling on desktop and mobile. */
.schedule-mobile-toolbar {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(207, 226, 212, 0.88);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(15, 44, 31, 0.1);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.jobs-week-toolbar {
  margin-bottom: 1rem;
}

.schedule-mobile-week-nav {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  gap: 4px;
  align-items: stretch;
}

.schedule-mobile-week-arrow {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 82px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #143722;
  font-size: 1.1rem;
  text-decoration: none;
}

.schedule-mobile-week-arrow:hover {
  background: #edf6ef;
}

.schedule-mobile-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
}

.schedule-mobile-day {
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-rows: 12px 16px 24px 4px 13px;
  justify-items: center;
  align-items: center;
  padding: 3px 1px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #214334;
  text-decoration: none;
}

.schedule-mobile-day.is-buffer-day {
  display: none;
}

.schedule-mobile-day-month {
  font-size: 0.54rem;
  font-weight: 900;
  color: #74847c;
  text-transform: uppercase;
}

.schedule-mobile-day-month.is-placeholder {
  visibility: hidden;
}

.schedule-mobile-day-weekday {
  font-size: 0.63rem;
  font-weight: 900;
}

.schedule-mobile-day strong {
  font-size: 1rem;
  line-height: 1;
}

.schedule-mobile-day-marker {
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: #b7c6bd;
}

.schedule-mobile-day small {
  min-height: 0.6rem;
  font-size: 0.5rem;
  font-weight: 900;
  text-transform: uppercase;
}

.schedule-mobile-day.is-today:not(.is-selected) {
  background: #e9f6ed;
  border-color: #c5e4ce;
  color: #0f6f3f;
}

.schedule-mobile-day.is-today:not(.is-selected) .schedule-mobile-day-marker {
  background: #72bf44;
}

.schedule-mobile-day.is-selected {
  background: #14452b;
  border-color: #14452b;
  color: #fff;
  box-shadow: 0 8px 16px rgba(20, 69, 43, 0.2);
}

.schedule-mobile-day.is-selected .schedule-mobile-day-month {
  color: #d7f2df;
}

.schedule-mobile-day.is-selected .schedule-mobile-day-marker {
  background: #a8e365;
}

[data-date-navigation] [data-date-fragment] {
  transition: opacity 140ms ease, transform 140ms ease;
}

[data-date-navigation].is-date-loading [data-date-fragment] {
  opacity: 0.55;
  transform: translateY(2px);
  pointer-events: none;
}

.schedule-mobile-day.is-date-pending {
  background: #e9f6ed;
  border-color: #9fd2ad;
  color: #0f6f3f;
}

.schedule-mobile-day.is-date-pending .schedule-mobile-day-marker {
  width: 18px;
  background: linear-gradient(90deg, #72bf44 20%, #d5ecd9 50%, #72bf44 80%);
  background-size: 200% 100%;
  animation: mobile-date-pending 800ms linear infinite;
}

@media (max-width: 768px) {
  .schedule-mobile-week-strip {
    display: flex;
    gap: 3px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-inline: calc(50% - 22px);
    scroll-padding-inline: calc(50% - 22px);
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .schedule-mobile-week-strip::-webkit-scrollbar {
    display: none;
  }

  .schedule-mobile-day,
  .schedule-mobile-day.is-buffer-day {
    display: grid;
    flex: 0 0 44px;
    scroll-snap-align: center;
    scroll-snap-stop: normal;
  }

  .schedule-mobile-week-strip:focus-visible {
    outline: 2px solid #2f8554;
    outline-offset: 3px;
    border-radius: 12px;
  }

}

@keyframes mobile-date-pending {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  [data-date-navigation] [data-date-fragment] {
    transition: none;
  }

  .schedule-mobile-day.is-date-pending .schedule-mobile-day-marker {
    animation: none;
  }
}

.schedule-mobile-return-today {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #cfe2d4;
  border-radius: 12px;
  background: #fff;
  color: #143722;
  font-weight: 850;
  text-decoration: none;
}

.schedule-mobile-filter-row,
.schedule-mobile-primary,
.schedule-mobile-empty {
  display: none;
}

/* Week-view hierarchy: day title, schedule summary and work-order content. */
.schedule-week-day-card {
  padding: 0 !important;
  overflow: hidden;
  border-color: #d7e5db !important;
  background: #fff;
}

.schedule-week-day-card.is-selected {
  border-color: #2b8051 !important;
  box-shadow: 0 12px 28px rgba(20, 69, 43, 0.13) !important;
}

.schedule-week-day-card .schedule-week-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 13px 14px;
  border-bottom: 1px solid #d8e8dd;
  background: #edf7f0;
}

.schedule-week-day-card.is-selected .schedule-week-day-head {
  border-bottom-color: #14452b;
  background: #14452b;
  color: #fff;
}

.schedule-week-day-kicker {
  display: block;
  margin-bottom: 3px;
  color: #568068;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.schedule-week-day-head h3 {
  margin: 0;
  color: #133b25;
  font-size: 1.04rem;
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.schedule-week-day-head time {
  min-width: 48px;
  display: grid;
  justify-items: center;
  padding: 7px 9px;
  border: 1px solid #c9dfd0;
  border-radius: 12px;
  background: #fff;
  color: #17472c;
  line-height: 1;
}

.schedule-week-day-head time b {
  font-size: 1rem;
  font-weight: 950;
}

.schedule-week-day-head time span {
  margin-top: 3px;
  color: #668073;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.schedule-week-day-card.is-selected .schedule-week-day-kicker,
.schedule-week-day-card.is-selected .schedule-week-day-head h3 {
  color: #fff;
}

.schedule-week-day-card.is-selected .schedule-week-day-head time {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.schedule-week-day-card.is-selected .schedule-week-day-head time span {
  color: #d9f1e0;
}

.schedule-week-day-summary {
  display: grid;
  gap: 3px;
  padding: 12px 14px 10px;
}

.schedule-week-day-summary strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #14291d;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.1;
}

.schedule-week-day-summary strong b {
  color: #146f40;
  font-size: 1.28rem;
  font-weight: 950;
}

.schedule-week-day-summary small {
  color: #68796f;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.3;
}

.schedule-week-day-jobs {
  display: grid;
  gap: 7px;
  padding: 0 12px 12px;
}

.schedule-week-day-jobs .schedule-week-job {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 9px;
  border-color: #dbe7df;
  background: #f9fbf9;
}

.schedule-week-job-time {
  padding: 5px 7px;
  border-radius: 8px;
  background: #e5f3e9;
  color: #146f40;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.schedule-week-job-title {
  min-width: 0;
  overflow: hidden;
  color: #20362a;
  font-size: 0.76rem;
  font-weight: 720;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-week-day-jobs .schedule-week-job i {
  color: #718279;
  font-size: 0.72rem;
}

.schedule-week-day-jobs .schedule-day-open {
  min-height: 42px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  border-style: dashed;
  background: #fff;
  color: #146f40 !important;
  font-size: 0.72rem;
  font-weight: 900;
}

/* Mobile scheduling refinement: compact controls, vertical agenda and safe bottom nav. */
.time-history-mobile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  width: 100%;
  max-width: 100%;
  align-items: start;
  gap: 16px;
}

.time-history-desktop {
  display: none !important;
}

@media (min-width: 768px) {
  .time-history-card {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-content: start;
    gap: 14px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 18px;
    border: 1px solid #dbe9df;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 44, 31, 0.07);
  }

  .time-history-card-head {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e5ede7;
  }

  .time-history-date,
  .time-history-person > div,
  .time-history-job,
  .time-history-crew,
  .time-history-audit > div {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .time-history-date small,
  .time-history-person small,
  .time-history-job > small,
  .time-history-clock-grid dt,
  .time-history-crew small,
  .time-history-audit small {
    color: #68776e;
    font-size: 0.69rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .time-history-date strong {
    color: #183323;
    font-size: 1rem;
    font-weight: 900;
    white-space: nowrap;
  }

  .time-history-card .badge-status {
    flex: 0 0 auto;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .time-history-person {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e1ebe4;
    border-radius: 15px;
    background: #fbfdfb;
  }

  .time-history-person > i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #e8f5ec;
    color: #0f6f3f;
    font-size: 1.1rem;
  }

  .time-history-person strong,
  .time-history-job strong,
  .time-history-crew strong,
  .time-history-audit strong {
    min-width: 0;
    color: #172d20;
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .time-history-person span,
  .time-history-job span,
  .time-history-audit span {
    min-width: 0;
    color: #6a776f;
    font-size: 0.8rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .time-history-job {
    gap: 5px;
    padding: 12px;
    border: 1px solid #e1ebe4;
    border-radius: 15px;
    background: #f8fbf9;
  }

  .time-history-job span {
    display: flex;
    align-items: flex-start;
    gap: 5px;
  }

  .time-history-job span i {
    flex: 0 0 auto;
    color: #16804a;
  }

  .time-history-clock-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
  }

  .time-history-clock-grid > div {
    display: grid;
    min-width: 0;
    gap: 5px;
    padding: 11px 12px;
    border: 1px solid #dfeae2;
    border-radius: 14px;
    background: #fff;
  }

  .time-history-clock-grid dd {
    min-width: 0;
    margin: 0;
    color: #173422;
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .time-history-clock-grid .time-history-total {
    grid-column: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    background: #eaf6ed;
    border-color: #cbe4d3;
  }

  .time-history-clock-grid .time-history-total dd {
    color: #0f6f3f;
    font-size: 1.08rem;
  }

  .time-history-crew {
    min-width: 0;
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid #e1ebe4;
    border-radius: 14px;
    background: #fbfdfb;
  }

  .time-history-audit {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border-radius: 14px;
    background: #fff8e6;
    color: #8a5b00;
  }

  .time-history-audit > i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #ffedba;
  }

  .time-history-action {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    white-space: normal;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .time-history-mobile-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.schedule-drawer-backdrop {
  display: none;
}

@media (max-width: 767.98px) {
  .time-history-desktop {
    display: none !important;
  }

  .time-history-mobile-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    gap: 12px;
  }

  .time-history-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 14px;
    border: 1px solid #dbe9df;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 44, 31, 0.06);
  }

  .time-history-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5ede7;
  }

  .time-history-date,
  .time-history-person > div,
  .time-history-job,
  .time-history-crew,
  .time-history-audit > div {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .time-history-date small,
  .time-history-person small,
  .time-history-job > small,
  .time-history-clock-grid dt,
  .time-history-crew small,
  .time-history-audit small {
    color: #68776e;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.045em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .time-history-date strong {
    color: #183323;
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
  }

  .time-history-card .badge-status {
    flex: 0 0 auto;
    max-width: 52%;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
  }

  .time-history-person {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 13px 0;
  }

  .time-history-person > i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #e8f5ec;
    color: #0f6f3f;
    font-size: 1.08rem;
  }

  .time-history-person strong,
  .time-history-job strong,
  .time-history-crew strong,
  .time-history-audit strong {
    min-width: 0;
    color: #172d20;
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1.28;
    overflow-wrap: anywhere;
  }

  .time-history-person span,
  .time-history-job span,
  .time-history-audit span {
    min-width: 0;
    color: #6a776f;
    font-size: 0.78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .time-history-job {
    gap: 4px;
    padding: 12px;
    border: 1px solid #e1ebe4;
    border-radius: 14px;
    background: #f8fbf9;
  }

  .time-history-job span {
    display: flex;
    align-items: flex-start;
    gap: 5px;
  }

  .time-history-job span i {
    flex: 0 0 auto;
    color: #16804a;
  }

  .time-history-clock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
  }

  .time-history-clock-grid > div {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 10px;
    border: 1px solid #dfeae2;
    border-radius: 13px;
    background: #fff;
  }

  .time-history-clock-grid dd {
    min-width: 0;
    margin: 0;
    color: #173422;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .time-history-clock-grid .time-history-total {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    background: #eaf6ed;
    border-color: #cbe4d3;
  }

  .time-history-clock-grid .time-history-total dd {
    color: #0f6f3f;
    font-size: 1.05rem;
  }

  .time-history-crew {
    gap: 4px;
    padding-top: 2px;
  }

  .time-history-audit {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    margin-top: 12px;
    padding: 10px;
    border-radius: 13px;
    background: #fff8e6;
    color: #8a5b00;
  }

  .time-history-audit > i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #ffedba;
  }

  .time-history-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    white-space: normal;
  }

  .main-content > .schedule-shell {
    animation: none !important;
    transform: none !important;
  }

  body.schedule-drawer-open,
  body.schedule-panel-open {
    overflow: hidden !important;
    overflow-x: hidden !important;
    overscroll-behavior: none;
  }

  body.schedule-drawer-open .mobile-bottom-nav,
  body.schedule-drawer-open .copilot-widget,
  body.schedule-panel-open .mobile-bottom-nav,
  body.schedule-panel-open .copilot-widget {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .mobile-bottom-nav {
    left: 50%;
    right: auto;
    bottom: max(14px, calc(env(safe-area-inset-bottom) - 16px));
    width: min(100vw - 20px, 640px);
    min-height: var(--mobile-bottom);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 6px;
    transform: translateX(-50%);
    box-sizing: border-box;
    border-radius: 22px;
  }

  .mobile-bottom-nav.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(calc(100% + 18px));
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 46px;
    width: 100%;
    padding: 5px 2px;
    gap: 2px;
    overflow: hidden;
    border-radius: 15px;
    font-size: 10.5px;
    line-height: 1.05;
    text-align: center;
  }

  .mobile-bottom-nav span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav i {
    font-size: 1.04rem;
    line-height: 1;
  }

  .mobile-bottom-nav .active {
    border-radius: 16px;
  }

  .schedule-shell {
    display: grid;
    gap: 12px;
    padding-bottom: calc(var(--mobile-bottom) + 42px + env(safe-area-inset-bottom));
  }

  .schedule-shell > .schedule-view-tabs,
  .schedule-shell > .schedule-controls {
    display: none !important;
  }

  .schedule-mobile-toolbar {
    position: sticky;
    top: calc(var(--mobile-header) + env(safe-area-inset-top) + 8px);
    z-index: 18;
  }

  .schedule-mobile-filter-row a,
  .schedule-mobile-filter-row button,
  .schedule-mobile-primary {
    min-height: 44px;
    border: 1px solid #cfe2d4;
    border-radius: 14px;
    background: #fff;
    color: #143722;
    font-weight: 850;
    text-decoration: none;
  }

  .schedule-mobile-filter-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .schedule-mobile-filter-row a,
  .schedule-mobile-filter-row button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 6px;
    min-width: 0;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
  }

  .schedule-mobile-filter-row span,
  .schedule-mobile-filter-row a {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .schedule-mobile-filter-row .active {
    background: #123d25;
    border-color: #123d25;
    color: #fff;
  }

  .schedule-mobile-filter-row b {
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #1f8a4c;
    color: #fff;
    font-size: 0.68rem;
  }

  .schedule-mobile-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    background: var(--aureo-green);
    border-color: var(--aureo-green);
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 111, 63, 0.18);
  }

  .schedule-mobile-primary:disabled {
    opacity: 0.55;
    box-shadow: none;
  }

  .schedule-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 10px;
  }

  .schedule-summary > div {
    min-width: 0;
    min-height: 84px;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 4px 10px;
    align-content: center;
    padding: 12px;
    border: 1px solid #dbe9df;
    border-radius: 14px;
    background: #fbfdfb;
  }

  .schedule-summary > div:last-child {
    grid-column: 1 / -1;
    border-right: 1px solid #dbe9df;
  }

  .schedule-summary i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .schedule-summary b {
    min-width: 0;
    font-size: 1.05rem;
    line-height: 1.1;
  }

  .schedule-summary span {
    min-width: 0;
    font-size: 0.75rem;
    line-height: 1.28;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .schedule-week-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .schedule-week-day-card .schedule-week-day-head {
    padding: 15px 16px;
  }

  .schedule-week-day-head h3 {
    font-size: 1.24rem;
  }

  .schedule-week-day-head time {
    min-width: 54px;
  }

  .schedule-week-day-summary {
    padding: 14px 16px 11px;
  }

  .schedule-week-day-summary strong {
    font-size: 0.9rem;
  }

  .schedule-week-day-summary small {
    font-size: 0.76rem;
  }

  .schedule-week-day-jobs {
    gap: 9px;
    padding: 0 14px 14px;
  }

  .schedule-week-day-jobs .schedule-week-job {
    min-height: 52px;
    padding: 10px;
    border-radius: 12px;
  }

  .schedule-week-job-time {
    font-size: 0.76rem;
  }

  .schedule-week-job-title {
    font-size: 0.88rem;
  }

  .schedule-drawer-backdrop:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1058;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(8, 28, 17, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .schedule-filter-drawer:not([hidden]) {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 1065;
    display: block;
    width: auto;
    max-width: calc(100vw - 20px);
    box-sizing: border-box;
    max-height: min(68vh, 560px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 14px;
    border: 1px solid rgba(207, 226, 212, 0.92);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 26px 70px rgba(6, 15, 10, 0.22);
  }

  .schedule-mobile-more-list {
    display: grid;
    gap: 8px;
  }

  .schedule-mobile-more-list a,
  .schedule-mobile-more-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    width: 100%;
    border: 1px solid #dbe9df;
    border-radius: 14px;
    background: #fff;
    color: #143722;
    padding: 0 12px;
    font-weight: 850;
    text-align: left;
    text-decoration: none;
  }

  .schedule-mobile-more-list .active {
    background: #e8f5ec;
    border-color: #b8dcc4;
    color: #0f6f3f;
  }

  .schedule-filter-drawer .drawer-title-row {
    position: sticky;
    top: -14px;
    z-index: 2;
    margin: -14px -14px 12px;
    padding: 14px;
    border-bottom: 1px solid #e2ece5;
    background: rgba(255, 255, 255, 0.98);
  }

  .schedule-filter-drawer .drawer-title-row h3 {
    margin: 0;
    color: #143722;
    font-size: 1.05rem;
    font-weight: 900;
  }

  .schedule-board {
    display: block;
    max-height: none;
    overflow: visible;
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .schedule-hour-rail,
  .schedule-empty-slot,
  .schedule-travel-block {
    display: none !important;
  }

  .schedule-crew-column,
  .schedule-unassigned-column {
    margin-bottom: 12px;
    border: 1px solid #dbe9df;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 44, 31, 0.08);
  }

  .schedule-column-head {
    position: static;
    min-height: auto;
    padding: 12px;
  }

  .schedule-column-head b,
  .schedule-column-head small,
  .schedule-column-head em {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .schedule-day-track {
    height: auto !important;
    min-height: 0;
    display: grid;
    gap: 9px;
    padding: 10px !important;
    background: #fff;
  }

  .schedule-job-card,
  .schedule-unassigned-card {
    position: static !important;
    height: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    margin: 0;
    border-radius: 14px;
  }

  .schedule-job-card button,
  .schedule-unassigned-card button {
    min-height: 74px;
    padding: 12px;
  }

  .schedule-job-card strong,
  .schedule-job-card span,
  .schedule-job-card small,
  .schedule-job-card em,
  .schedule-unassigned-card b,
  .schedule-unassigned-card span,
  .schedule-unassigned-card small,
  .schedule-unassigned-card em {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .schedule-unassigned-tools {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .schedule-mobile-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 18px 14px;
    border: 1px dashed #cfe2d4;
    border-radius: 18px;
    background: #fbfdfb;
    color: #52655a;
    text-align: center;
  }

  .schedule-mobile-empty i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #e8f5ec;
    color: #0f6f3f;
  }

  .schedule-mobile-empty h3,
  .schedule-mobile-empty p {
    margin: 0;
  }

  .schedule-side-panel {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-left: 0;
    overscroll-behavior: contain;
    transform: translate3d(100%, 0, 0) !important;
  }

  .schedule-side-panel.open {
    transform: translate3d(0, 0, 0) !important;
  }

  .schedule-side-panel .schedule-panel-head {
    flex: 0 0 auto;
    min-width: 0;
    padding: calc(14px + env(safe-area-inset-top)) 14px 14px;
    background: #fff;
  }

  .schedule-side-panel .schedule-panel-title-stack {
    min-width: 0;
  }

  .schedule-side-panel .schedule-panel-title {
    font-size: 1.36rem;
  }

  .schedule-side-panel .schedule-panel-subtitle {
    white-space: normal;
  }

  .schedule-side-panel .schedule-detail-view,
  .schedule-side-panel .schedule-create-form {
    flex: 1 1 auto;
    min-width: 0 !important;
    min-height: 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 14px calc(20px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .schedule-create-form section,
  .schedule-create-form .schedule-form-grid,
  .schedule-create-form .schedule-form-grid label,
  .schedule-create-form .quick-create-field {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .schedule-create-form .schedule-form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
  }

  .schedule-create-form .schedule-form-grid label {
    display: grid;
    gap: 7px;
  }

  .schedule-create-form .schedule-form-grid .span-2 {
    grid-column: auto;
  }

  .schedule-create-form .quick-create-field:has(.quick-plus) {
    grid-template-columns: minmax(0, 1fr) 48px !important;
    align-items: end;
  }

  .schedule-create-form .quick-plus {
    align-self: end;
    margin-top: 0 !important;
  }

  .schedule-create-form input,
  .schedule-create-form select,
  .schedule-create-form textarea,
  .schedule-create-form .form-control,
  .schedule-create-form .form-select {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .schedule-create-form .schedule-form-actions {
    position: static !important;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #dbe9df;
    border-radius: 16px;
    background: #f7fbf8;
  }

  .schedule-create-form .schedule-form-actions .btn {
    min-width: 0;
    width: 100%;
    min-height: 46px;
    white-space: normal;
  }

  .schedule-create-form .schedule-form-actions button[type="submit"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .schedule-summary {
    grid-template-columns: 1fr;
  }

  .schedule-summary > div:last-child {
    grid-column: auto;
  }

  .schedule-mobile-week-nav {
    grid-template-columns: 22px minmax(0, 1fr) 22px;
    gap: 2px;
  }

  .schedule-mobile-week-strip {
    gap: 1px;
  }

  .schedule-mobile-day {
    min-height: 78px;
    border-radius: 10px;
  }

  .schedule-mobile-day-weekday {
    font-size: 0.58rem;
  }

  .schedule-mobile-day strong {
    font-size: 0.92rem;
  }

  .schedule-mobile-filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Dashboard: compact mobile hierarchy without changing desktop. */
@media (max-width: 768px) {
  body.dashboard-screen .ops-strip {
    display: grid;
    gap: 10px;
    margin-bottom: 10px !important;
    padding: 13px;
    border-radius: 18px;
  }

  body.dashboard-screen .ops-strip > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }

  body.dashboard-screen .ops-strip > div:first-child .eyebrow {
    min-width: 0;
    max-width: 68%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.dashboard-screen .ops-strip h2 {
    flex: 0 0 auto;
    margin: 0;
    font-size: 1.1rem;
  }

  body.dashboard-screen .ops-strip-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  body.dashboard-screen .ops-strip-metrics span {
    width: auto !important;
    min-width: 0;
    min-height: 56px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    justify-content: initial !important;
    gap: 0 8px;
    padding: 8px 9px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 760;
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  body.dashboard-screen .ops-strip-metrics span > i {
    grid-row: 1 / 3;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #e8f5ec;
    color: #147342;
    font-size: 0.9rem;
  }

  body.dashboard-screen .ops-strip-metrics .attention > i {
    background: #fff3d6;
    color: #b96800;
  }

  body.dashboard-screen .ops-strip-metrics .critical > i {
    background: #fde5e2;
    color: #b42318;
  }

  body.dashboard-screen .ops-strip-metrics span > b {
    min-width: 0;
    margin: 0 !important;
    color: #102017;
    font-size: 1.08rem;
    line-height: 1;
    text-align: left;
  }

  body.dashboard-screen .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    margin-bottom: 10px !important;
  }

  body.dashboard-screen .kpi-card {
    min-width: 0;
    min-height: 112px;
    align-content: start;
    gap: 4px;
    padding: 11px;
    border-radius: 16px;
  }

  body.dashboard-screen .kpi-card small {
    min-height: 2.2em;
    padding-right: 34px;
    font-size: 0.66rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  body.dashboard-screen .kpi-card strong {
    font-size: 1.34rem;
    line-height: 1.05;
  }

  body.dashboard-screen .kpi-card em {
    min-width: 0;
    color: #65766c;
    font-size: 0.74rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  body.dashboard-screen .kpi-icon {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  body.dashboard-screen .signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
    margin-bottom: 12px !important;
  }

  body.dashboard-screen .signal-grid a {
    min-width: 0;
    min-height: 54px;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-content: start !important;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 14px;
  }

  body.dashboard-screen .signal-grid a b {
    min-width: 1.25em;
    margin: 0;
    font-size: 1.02rem;
    text-align: left;
  }

  body.dashboard-screen .signal-grid a span {
    min-width: 0;
    font-size: 0.72rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
  }

  body.dashboard-screen .setup-panel-compact {
    position: relative;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    gap: 10px;
    padding: 11px;
    border-radius: 18px;
  }

  body.dashboard-screen .setup-panel-compact .setup-ring {
    width: 52px;
    height: 52px;
  }

  body.dashboard-screen .setup-panel-compact .setup-ring:before {
    inset: 6px;
  }

  body.dashboard-screen .setup-panel-compact .setup-ring strong {
    font-size: 0.86rem;
  }

  body.dashboard-screen .setup-panel-compact .setup-ring span {
    display: none;
  }

  body.dashboard-screen .setup-panel-compact .setup-copy {
    min-width: 0;
    padding-right: 32px;
  }

  body.dashboard-screen .setup-panel-compact .setup-copy h3 {
    margin-top: 4px;
    font-size: 0.94rem;
  }

  body.dashboard-screen .setup-panel-compact .setup-copy p {
    font-size: 0.78rem;
    line-height: 1.28;
  }

  body.dashboard-screen .setup-panel-compact .setup-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    height: 32px;
  }

  body.dashboard-screen .setup-panel-compact .setup-actions {
    gap: 6px;
  }

  body.dashboard-screen .setup-panel-compact .setup-actions .btn {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 0.76rem;
  }
}
