@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/fonts/material-symbols-rounded.woff2") format("woff2");
}

.material-symbols-rounded {
  display: inline-block;
  width: 1em;
  min-width: 1em;
  overflow: hidden;
  font-family: "Material Symbols Rounded";
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  font-feature-settings: "liga";
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

:root {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-soft: #fffbea;
  --surface-muted: #f5f7fa;
  --line: #e7e8ef;
  --line-strong: #d8dae3;
  --text: #0f172a;
  --muted: #586472;
  --blue: #0b5fe8;
  --focus-ring: #2563eb;
  --blue-dark: #064ec4;
  --brand-yellow: #ffd51d;
  --brand-yellow-soft: #fff3b0;
  --teal: #0f9f95;
  --green: #22a06b;
  --amber: #f59e0b;
  --red: #dc2626;
  --purple: #7c3aed;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 2px 6px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --fs-2xs: 10px;
  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-body: 14px;
  --fs-ui: 14px;
  --fs-card-title: 16px;
  --fs-section: 17px;
  --fs-title: 28px;
  --fs-metric: 32px;
  --lh-tight: 1.18;
  --lh-body: 1.5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0e1014;
  --surface: #181b21;
  --surface-soft: #232831;
  --surface-muted: #1f242c;
  --line: #2a2f39;
  --line-strong: #3a4150;
  --text: #e8eaef;
  --muted: #9aa3b2;
  --blue: #c9ced8;
  --blue-dark: #eceef3;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.34);
  --shadow-card-hover: 0 2px 8px rgba(0, 0, 0, 0.4), 0 14px 32px rgba(0, 0, 0, 0.46);
  /* status-pill palette tuned for dark surfaces */
  --chip-neutral-bg: rgba(148, 163, 184, 0.16);
  --chip-neutral-line: rgba(148, 163, 184, 0.3);
  --chip-neutral-fg: #d7dde7;
  --chip-green-bg: rgba(34, 160, 107, 0.18);
  --chip-green-line: rgba(34, 160, 107, 0.36);
  --chip-green-fg: #6fe0a6;
  --chip-amber-bg: rgba(245, 158, 11, 0.18);
  --chip-amber-line: rgba(245, 158, 11, 0.38);
  --chip-amber-fg: #f6c065;
  --chip-red-bg: rgba(220, 38, 38, 0.2);
  --chip-red-line: rgba(220, 38, 38, 0.42);
  --chip-red-fg: #f59a9a;
  --chip-grey-bg: rgba(148, 163, 184, 0.14);
  --chip-grey-line: rgba(148, 163, 184, 0.26);
  --chip-grey-fg: #aab4c2;
  --chip-blue-bg: rgba(96, 165, 250, 0.18);
  --chip-blue-fg: #93c5fd;
  --focus-ring: #ffd51d;
  color-scheme: dark;
}

/* Visible keyboard-focus ring on all interactive controls (enterprise a11y) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[role="menuitem"]:focus-visible,
[role="option"]:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Dark-mode component touch-ups for spots that hardcode light values */
:root[data-theme="dark"] .topbar {
  background: rgba(16, 18, 23, 0.82);
}

:root[data-theme="dark"] .nav-item.active {
  background: linear-gradient(180deg, #313742, #272c35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .primary-button {
  border-color: var(--brand-yellow);
  background: var(--brand-yellow);
  color: #1f2023;
}

:root[data-theme="dark"] .primary-button:hover {
  background: #ffde47;
}

:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .pill {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

:root[data-theme="dark"] .global-search-result:hover,
:root[data-theme="dark"] .global-search-result.active {
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .global-search-result em {
  background: var(--surface-muted);
  color: var(--muted);
}

:root[data-theme="dark"] .nav-list::-webkit-scrollbar-thumb {
  border-color: var(--surface);
  background: #3a4150;
}

:root[data-theme="dark"] .segment.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

:root[data-theme="dark"] .month-job {
  background: rgba(148, 163, 184, 0.16);
  color: var(--text);
}

:root[data-theme="dark"] .month-job.green {
  background: rgba(34, 160, 107, 0.2);
  color: #6fe0a6;
}

:root[data-theme="dark"] .month-job.teal {
  background: rgba(15, 159, 149, 0.2);
  color: #5fd6cc;
}

:root[data-theme="dark"] .month-job.amber {
  background: rgba(245, 158, 11, 0.2);
  color: #f6c065;
}

:root[data-theme="dark"] .month-job.red {
  background: rgba(220, 38, 38, 0.22);
  color: #f59a9a;
}

/* Calendar week-view: highlights, selections, and event chips in dark */
:root[data-theme="dark"] .day-head:hover,
:root[data-theme="dark"] .day-head.selected {
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .calendar-cell.highlight,
:root[data-theme="dark"] .day-head.highlight {
  background: rgba(255, 213, 29, 0.07);
}

:root[data-theme="dark"] .calendar-cell.selected-slot,
:root[data-theme="dark"] .calendar-cell.selected-day {
  background: rgba(37, 99, 235, 0.2);
}

:root[data-theme="dark"] .job-chip {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

:root[data-theme="dark"] .job-chip.green {
  background: rgba(34, 160, 107, 0.2);
  color: #6fe0a6;
}

:root[data-theme="dark"] .job-chip.purple {
  background: rgba(124, 58, 237, 0.26);
  color: #c4b5fd;
}

:root[data-theme="dark"] .job-chip.teal {
  background: rgba(15, 159, 149, 0.2);
  color: #5fd6cc;
}

:root[data-theme="dark"] .job-chip.amber {
  background: rgba(245, 158, 11, 0.2);
  color: #f6c065;
}

:root[data-theme="dark"] .job-chip.red {
  background: rgba(220, 38, 38, 0.22);
  color: #f59a9a;
}

/* Onboarding checklist "complete" rows in dark */
:root[data-theme="dark"] .onboarding-row.complete {
  background: rgba(34, 160, 107, 0.1);
}

:root[data-theme="dark"] .onboarding-row.complete .onboarding-step {
  background: rgba(34, 160, 107, 0.22);
  color: #6fe0a6;
}

:root[data-theme="dark"] .day-head.current .date-dot {
  background: var(--brand-yellow);
  color: #1f2023;
}

/* Icons inside the solid primary button should match its text colour */
.primary-button .material-symbols-rounded {
  color: inherit;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.app-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: grid;
  gap: 3px;
  min-width: min(360px, calc(100vw - 32px));
  max-width: 420px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

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

.app-toast.green {
  border-left-color: var(--green);
}

.app-toast.amber {
  border-left-color: var(--amber);
}

.app-toast.red {
  border-left-color: var(--red);
}

.app-toast strong,
.app-toast span {
  display: block;
}

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

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

p {
  line-height: var(--lh-body);
}

strong {
  font-weight: 700;
}

.eyebrow {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  width: 100vw;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: clip;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 213, 29, 0.2), transparent 28%),
    linear-gradient(135deg, #f6f7f4 0%, #ffffff 46%, #fff8d6 100%);
}

.login-screen.active,
.login-mode .login-screen {
  display: grid;
}

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

.login-panel {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.login-panel img {
  display: block;
  width: min(310px, 100%);
  margin-bottom: 24px;
}

.login-panel h1 {
  margin: 4px 0 18px;
  font-size: 30px;
  letter-spacing: 0;
}

.auth-form {
  display: grid;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.auth-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-tabs button.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: inset 0 -2px 0 var(--brand-yellow), 0 1px 3px rgba(15, 23, 42, 0.12);
}

.signup-fields[hidden] {
  display: none;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.login-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.role-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.role-preview span {
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.auth-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.auth-message.error {
  color: #b42318;
}

.auth-message.success {
  color: #087443;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 22px 22px 15px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.nav-list::-webkit-scrollbar {
  width: 8px;
}

.nav-list::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: #cbd5e1;
}

.brand {
  display: flex;
  width: 100%;
  align-items: center;
  height: 39px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand img {
  display: block;
  width: 176px;
  height: 40px;
  object-fit: contain;
}

.user-card-copy strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand span,
.user-card-copy span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.nav-list {
  display: grid;
  flex: 1 1 auto;
  gap: 7px;
  min-height: 0;
  margin-top: 3px;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  min-height: 40px;
  gap: 10px;
  width: 100%;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  text-align: left;
}

.nav-item:hover {
  background: var(--surface-soft);
}

.nav-item > span:not(.icon):not(.badge):not(.count):not(.pill) {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav-item.active {
  background: #eef5ff;
  color: #0b5fe8;
  box-shadow: none;
}

.nav-item[hidden] {
  display: none !important;
}

.nav-item[data-view="assets"],
.admin-phone-only {
  display: none;
}

.nav-item.secondary {
  color: var(--muted);
}

.nav-item.secondary.active {
  color: #0b5fe8;
}

:root[data-theme="dark"] .nav-item.secondary.active {
  color: var(--text);
}

.icon,
.material-symbols-rounded.icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  font-size: 20px;
  opacity: 0.86;
}

.badge,
.count,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7f1ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.nav-item.active .badge,
.nav-item.active .count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.count,
.pill.amber {
  background: #f59e0b;
  color: #fff;
}

.sidebar-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.user-card {
  position: relative;
  display: block;
  min-width: 0;
  padding-top: 26px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.user-menu-trigger {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] {
  background: var(--surface-soft);
}

.user-menu-caret {
  justify-self: center;
  color: var(--muted);
  font-size: 20px;
  transition: transform 0.16s ease;
}

.user-menu-trigger[aria-expanded="true"] .user-menu-caret {
  transform: rotate(180deg);
}

.user-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 60;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

.user-menu[hidden] {
  display: none;
}

.user-menu button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.user-menu button:hover {
  background: var(--surface-soft);
}

.user-menu .icon {
  color: var(--muted);
  font-size: 20px;
}

.user-menu strong,
.user-menu small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu strong {
  font-size: 13px;
  line-height: 1.2;
}

.user-menu small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  padding: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 800;
}

.avatar.purple {
  background: #ede9fe;
  color: #5b21b6;
}

.avatar.red {
  background: #fee2e2;
  color: #b91c1c;
}

.avatar.green {
  background: #dcfce7;
  color: #15803d;
}

.avatar.teal {
  background: #ccfbf1;
  color: #0f766e;
}

.avatar.orange {
  background: #ffedd5;
  color: #c2410c;
}

.main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  height: 60px;
  padding: 5px 22px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.search {
  position: relative;
  flex: 1;
  max-width: 560px;
}

.search > span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: transparent;
  width: 18px;
  height: 18px;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.search > span::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -5px;
  bottom: 0;
  background: var(--muted);
  transform: rotate(45deg);
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: min(480px, calc(100vh - 96px));
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.global-search-results[hidden] {
  display: none;
}

.global-search-result {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.global-search-result:hover,
.global-search-result.active {
  background: var(--surface-muted);
}

.global-search-result strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result em {
  justify-self: end;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.global-search-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.ghost-button,
.primary-button,
.link-button,
.icon-button,
.segment,
.chip {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  font-weight: 700;
}

.topbar-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #0b5fe8;
  border-radius: 8px;
  background: #0b5fe8;
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 95, 232, 0.22);
  font-weight: 800;
}

.new-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 45;
  display: grid;
  width: min(220px, calc(100vw - 24px));
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.new-menu[hidden] {
  display: none;
}

.new-menu button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 44px;
  width: 100%;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-align: left;
}

.new-menu button:hover {
  background: var(--surface-soft);
}

.plus-mark {
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0;
}

.topbar-new .plus-mark {
  border: 0;
  border-color: currentColor;
  color: #fff;
  font-size: 20px;
  height: auto;
  line-height: 1;
  width: auto;
}

.topbar-new .plus-mark::before,
.topbar-new .plus-mark::after {
  display: none;
}

.plus-mark::before,
.plus-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.plus-mark::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.75;
}

.topbar-separator {
  width: 1px;
  height: 30px;
  background: var(--line);
}

.today-button,
.topbar-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.today-button {
  min-width: 82px;
}

.topbar-date {
  gap: 8px;
  padding: 0 12px;
  border-color: transparent;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.calendar-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 48px;
  z-index: 40;
  display: grid;
  width: min(280px, calc(100vw - 32px));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.calendar-picker-popover[hidden] {
  display: none;
}

.calendar-picker-head,
.calendar-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-picker-head strong {
  font-size: 14px;
}

.calendar-picker-head .icon-button {
  width: 40px;
  min-height: 40px;
  padding: 0;
}

.primary-button {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.primary-button:hover {
  box-shadow: 0 4px 12px rgba(31, 32, 35, 0.22);
}

.compact-button {
  min-height: 38px;
  padding: 0 13px;
  font-size: 13px;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary-button:disabled:hover {
  background: var(--blue);
}

.danger-button {
  border-color: #fecaca;
  background: var(--surface);
  color: var(--red);
}

.danger-button:hover {
  border-color: #fca5a5;
  background: #fff5f5;
}

.confirm-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.36);
}

.confirm-dialog {
  display: grid;
  gap: 18px;
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.confirm-dialog.green {
  border-top-color: var(--green);
}

.confirm-dialog.amber {
  border-top-color: var(--amber);
}

.confirm-dialog.red {
  border-top-color: var(--red);
}

.confirm-dialog-copy {
  display: grid;
  gap: 10px;
}

.confirm-dialog h2 {
  margin: 0;
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
}

.confirm-dialog p,
.confirm-dialog ul {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.confirm-dialog ul {
  display: grid;
  gap: 5px;
  padding-left: 18px;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-danger-button,
.confirm-danger-button:hover {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.ghost-button.is-busy,
.primary-button.is-busy,
.ghost-button.is-done,
.primary-button.is-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.link-button {
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
}

.wide {
  width: 100%;
}

.weather-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 138px;
  min-height: 50px;
  padding: 5px 12px 5px 6px;
  border: 1px solid #93c5fd;
  border-radius: 12px;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.weather-card strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}

.weather-card span {
  display: block;
  color: #586472;
  font-size: 11px;
  line-height: 1.2;
}

.weather-card-art {
  display: block;
  width: 56px;
  height: 46px;
  flex: 0 0 auto;
  margin: -5px -8px -5px -4px;
  object-fit: contain;
  transform-origin: 50% 55%;
  animation: weatherCardFloat 5s ease-in-out infinite;
}

.weather-card-art.cloud,
.weather-card-art.rain,
.weather-card-art.snow,
.weather-card-art.storm {
  filter:
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.95))
    drop-shadow(0 6px 10px rgba(59, 130, 246, 0.22));
}

@keyframes weatherCardFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1.02);
  }

  50% {
    transform: translate3d(0, -1px, 0) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-card-art {
    animation: none;
  }
}

.weather-card small {
  display: block;
  max-width: 70px;
  overflow: hidden;
  color: #586472;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-card-caret {
  color: #586472;
  font-size: 18px;
  margin-left: -2px;
}

.weather-card:disabled {
  cursor: progress;
  opacity: 0.72;
}

.weather-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 42;
  display: none;
  width: min(560px, calc(100vw - 28px));
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.16);
}

.weather-popover.is-open {
  display: grid;
}

.weather-popover[hidden] {
  display: none;
}

.weather-popover-head,
.weather-popover-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.weather-popover-head div {
  display: grid;
  gap: 4px;
}

.weather-popover-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 18px;
  padding-top: 6px;
  border-top: 0;
}

.weather-popover-actions button {
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.weather-popover-actions button .material-symbols-rounded {
  font-size: 22px;
}

.weather-popover-actions .primary-button {
  background: #111827;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
  color: #fff;
}

.weather-popover-head strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.weather-popover-head small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.weather-close-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
}

.weather-close-button .material-symbols-rounded {
  font-size: 20px;
}

.weather-current-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  align-items: center;
  gap: 22px;
  min-height: 92px;
}

.weather-current-main {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.weather-current-main div {
  display: grid;
  gap: 4px;
}

.weather-current-main strong {
  color: var(--text);
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

.weather-current-label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.weather-current-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.weather-hero-art {
  display: block;
  width: 112px;
  height: 102px;
  margin: -8px 0 -8px -6px;
  object-fit: contain;
  transform-origin: 50% 55%;
  animation: weatherHeroFloat 5s ease-in-out infinite;
}

.weather-hero-art.cloud,
.weather-hero-art.rain,
.weather-hero-art.snow,
.weather-hero-art.storm {
  filter: drop-shadow(0 10px 18px rgba(148, 163, 184, 0.18));
}

@keyframes weatherHeroFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1.02);
  }

  50% {
    transform: translate3d(0, -3px, 0) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-hero-art {
    animation: none;
  }
}

.weather-metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.weather-metric {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.weather-metric > .material-symbols-rounded {
  color: #475569;
  font-size: 19px;
}

.weather-metric small {
  color: inherit;
  font-size: inherit;
  font-weight: 700;
  text-transform: none;
}

.weather-metric strong {
  grid-column: 2;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}

.weather-work-window {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 11px 13px;
  border: 1px solid #7db3ff;
  border-radius: 8px;
  background: #f6fbff;
  color: #2457a6;
}

.weather-work-window > .material-symbols-rounded {
  color: #2f7df6;
  font-size: 28px;
}

.weather-work-window div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.weather-work-window strong {
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.weather-work-window small {
  overflow: hidden;
  color: #475569;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.weather-section-label small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
}

.weather-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.weather-forecast-list {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 0 17px;
  border-bottom: 1px solid var(--line);
}

.weather-forecast-row {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: start;
  gap: 8px;
  min-height: 96px;
  padding: 0;
  border-top: 0;
  font-size: 13px;
  text-align: center;
}

.weather-forecast-row .weather-hour,
.weather-forecast-row small,
.weather-forecast-row em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.3;
}

.weather-forecast-row .weather-hour {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.weather-row-icon {
  color: #94a3b8;
  font-size: 22px;
  text-align: center;
}

.weather-row-art {
  display: block;
  width: 34px;
  height: 30px;
  justify-self: center;
  object-fit: contain;
  transform-origin: 50% 55%;
  animation: weatherRowFloat 5s ease-in-out infinite;
}

.weather-row-art.cloud,
.weather-row-art.rain,
.weather-row-art.snow,
.weather-row-art.storm {
  filter: drop-shadow(0 5px 8px rgba(148, 163, 184, 0.16));
}

@keyframes weatherRowFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1.02);
  }

  50% {
    transform: translate3d(0, -1px, 0) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-row-art {
    animation: none;
  }
}

.weather-row-icon.sunny {
  color: #f59e0b;
}

.weather-row-icon.rain {
  color: #0284c7;
}

.weather-row-icon.night,
.weather-row-icon.storm {
  color: #334155;
}

.weather-forecast-row strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.weather-forecast-row small {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.weather-forecast-row em {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #1d80f5;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.weather-forecast-row em .material-symbols-rounded {
  color: #1d80f5;
  font-size: 13px;
  line-height: 1;
}

.weather-daily-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.weather-daily-card {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 104px;
  padding: 9px 4px;
  text-align: center;
}

.weather-daily-card > span {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.weather-daily-card .weather-row-art {
  height: 28px;
  width: 34px;
}

.weather-daily-card strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.weather-daily-card em {
  align-items: center;
  color: #1d80f5;
  display: flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  gap: 1px;
  line-height: 1;
}

.weather-daily-card em .material-symbols-rounded {
  color: #1d80f5;
  font-size: 13px;
  line-height: 1;
}

.weather-updated {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: var(--muted);
}

.weather-updated-button {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  margin: 0;
  padding: 0 6px;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
  width: fit-content;
}

.weather-updated-icon-button {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: inline-grid;
  height: 28px;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
  width: 28px;
}

.weather-updated-button:hover,
.weather-updated-button:focus-visible,
.weather-updated-icon-button:hover,
.weather-updated-icon-button:focus-visible {
  background: var(--surface-muted);
  border-color: var(--line);
  color: var(--text);
}

.weather-updated-button:hover small,
.weather-updated-button:focus-visible small {
  color: var(--text);
}

.weather-updated .material-symbols-rounded {
  font-size: 18px;
}

.weather-updated small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .weather-popover {
    right: -4px;
    width: min(560px, calc(100vw - 24px));
  }

  .weather-current-panel {
    grid-template-columns: 1fr;
  }

  .weather-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .weather-forecast-row {
    min-height: 92px;
  }

  .weather-forecast-list {
    gap: 8px;
    overflow-x: auto;
  }

  .weather-forecast-row {
    min-width: 54px;
  }

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

  .weather-popover-actions {
    grid-template-columns: 1fr;
  }
}

.weather-mark {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #facc15;
  box-shadow: 0 0 0 5px #fff7cc;
}

.weather-mark.cloud {
  background: #94a3b8;
  box-shadow: 0 0 0 5px #e2e8f0;
}

.weather-mark.rain {
  background: #38bdf8;
  box-shadow: 0 0 0 5px #dff6ff;
}

.weather-mark.storm {
  background: #64748b;
  box-shadow: 0 0 0 5px #e2e8f0;
}

.weather-mark.night {
  background: #1e293b;
  box-shadow: 0 0 0 5px #dbeafe;
}

.weather-mark.snow {
  background: #bae6fd;
  box-shadow: 0 0 0 5px #e0f2fe;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.content-grid {
  display: grid;
  gap: 0;
}

.calendar-layout {
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 74px);
}

.calendar-layout.has-selected-job {
  grid-template-columns: minmax(0, 1fr);
}

.calendar-layout.has-event-editor {
  grid-template-columns: minmax(0, 1fr);
}

.calendar-detail-panel[hidden] {
  display: none;
}

.calendar-detail-panel.event-editor-panel,
.calendar-detail-panel.job-detail-view-panel {
  position: fixed;
  inset: 74px 0 0 auto;
  z-index: 45;
  width: min(440px, 100vw);
  border-left: 1px solid var(--line);
  background: #f7f7f8;
  padding: 0;
  box-shadow: -18px 0 45px rgba(15, 23, 42, 0.16);
  animation: calendarDetailPanelSlideIn 280ms cubic-bezier(0.19, 1, 0.22, 1) both;
  will-change: transform, opacity;
}

.calendar-detail-panel.event-editor-panel {
  width: min(540px, 100vw);
  container-type: inline-size;
}

.calendar-detail-panel.event-editor-panel #calendarEventForm {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.calendar-detail-panel.event-editor-panel #calendarEventForm > .event-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100cqw;
  box-sizing: border-box;
}

@keyframes calendarDetailPanelSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes calendarSoftIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes calendarPopoverIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes calendarModalBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes calendarModalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.calendar-detail-panel.event-editor-panel .mini-header,
.calendar-detail-panel.event-editor-panel #calendarDetailAction,
.calendar-detail-panel.job-detail-view-panel .mini-header,
.calendar-detail-panel.job-detail-view-panel #calendarDetailAction {
  display: none !important;
}

.calendar-detail-panel.event-editor-panel .panel-section,
.calendar-detail-panel.job-detail-view-panel .panel-section {
  padding: 0;
  margin: 0;
  border: 0;
}

.calendar-detail-panel.event-editor-panel .calendar-job-details,
.calendar-detail-panel.job-detail-view-panel .calendar-job-details {
  min-height: 100%;
}

.calendar-detail-panel.calendar-job-editor-panel {
  width: min(540px, 100vw);
  overflow: hidden;
}

.calendar-detail-panel.calendar-unscheduled-panel-mode {
  overflow: hidden;
}

.calendar-detail-panel.calendar-unscheduled-panel-mode .jobs-panel,
.calendar-detail-panel.calendar-unscheduled-panel-mode .calendar-job-details {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.calendar-detail-panel.calendar-unscheduled-panel-mode .calendar-job-details {
  gap: 0;
}

@media (min-width: 1181px) {
  .calendar-layout {
    --calendar-editor-width: clamp(440px, 33.333vw, 540px);
    grid-template-columns: minmax(0, 1fr) 0;
    transition: grid-template-columns 280ms cubic-bezier(0.19, 1, 0.22, 1);
  }

  .calendar-layout.has-event-editor {
    grid-template-columns: minmax(0, 1fr) var(--calendar-editor-width);
  }

  .calendar-layout.has-inline-job-editor {
    grid-template-columns: minmax(0, 1fr) var(--calendar-editor-width);
  }

  .calendar-layout.has-event-editor > .calendar-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .calendar-layout.has-event-editor > .calendar-detail-panel.event-editor-panel {
    position: fixed;
    inset: 60px 0 0 auto;
    z-index: 25;
    width: var(--calendar-editor-width);
    height: calc(100dvh - 60px);
    min-height: 0;
    max-height: calc(100dvh - 60px);
    align-self: start;
    border-left: 1px solid var(--line);
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.08);
  }

  .calendar-layout.has-event-editor .event-editor-toolbar {
    height: var(--calendar-workspace-day-row-height, 48px);
    min-height: var(--calendar-workspace-day-row-height, 48px);
  }

  .calendar-layout.has-event-editor .event-editor-toolbar .icon-button {
    width: clamp(34px, calc(var(--calendar-workspace-day-row-height, 48px) - 4px), 44px);
    height: clamp(34px, calc(var(--calendar-workspace-day-row-height, 48px) - 4px), 44px);
    min-width: clamp(34px, calc(var(--calendar-workspace-day-row-height, 48px) - 4px), 44px);
    min-height: clamp(34px, calc(var(--calendar-workspace-day-row-height, 48px) - 4px), 44px);
  }

  .calendar-layout.has-event-editor .timetree-event-card {
    min-height: 100%;
    animation: none;
  }

  .calendar-layout.has-event-editor :is(.calendar-header, .calendar-header .header-tools, .calendar-stage, .month-grid, .week-grid) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

.calendar-inline-job-editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  background: #f7f7f8;
  color: #111827;
}

.calendar-job-editor-open {
  overflow: hidden;
}

.calendar-inline-job-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  padding: 0 18px;
  border-bottom: 0;
  background: rgba(247, 247, 248, 0.96);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.calendar-inline-job-header .event-editor-toolbar {
  margin: 0 -18px;
}

.calendar-inline-job-header .event-editor-toolbar .icon-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #e1e6ec;
  background: #f1f3f5;
}

.calendar-inline-job-header .event-type-tabs button.active,
.calendar-inline-job-header .event-type-tabs button[aria-pressed="true"] {
  color: var(--blue);
  box-shadow: 0 1px 10px rgba(11, 95, 232, 0.18), inset 0 0 0 1px rgba(11, 95, 232, 0.14);
}

.calendar-inline-job-editor #calendarInlineJobHost {
  max-width: 100%;
  min-height: 0;
  padding: 0 18px 24px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  box-sizing: border-box;
}

.calendar-inline-job-editor .calendar-inline-job-page {
  width: 100%;
  max-width: none;
  padding: 0;
  box-sizing: border-box;
}

.calendar-inline-job-editor .calendar-inline-job-page > .section-header {
  display: none;
}

.calendar-inline-job-editor .project-form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.calendar-inline-job-editor .project-form-column,
.calendar-inline-job-editor .surface {
  min-width: 0;
}

.calendar-inline-job-editor .surface {
  padding: 16px;
}

.calendar-inline-job-editor .field-label {
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.calendar-inline-job-editor .currency-field {
  position: relative;
}

.calendar-inline-job-editor .currency-input-prefix {
  position: absolute;
  z-index: 1;
  left: 12px;
  bottom: 12px;
  color: #667085;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}

.calendar-inline-job-editor .currency-field .input {
  padding-left: 30px;
}

.calendar-inline-job-editor .form-bottom-actions {
  position: static;
  bottom: auto;
  z-index: auto;
  margin: 14px -18px -24px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: rgba(247, 247, 248, 0.96);
  backdrop-filter: blur(12px);
}

.calendar-inline-job-editor .project-schedule-pair {
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.68fr);
  align-items: end;
}

.calendar-inline-job-editor .job-details-primary-grid,
.calendar-inline-job-editor .quote-question-grid-single,
.calendar-inline-job-editor .compact-uploads {
  grid-template-columns: minmax(0, 1fr);
}

.calendar-detail-panel.event-detail-view-panel,
.calendar-detail-panel.job-detail-view-panel {
  background: #fff;
}

.calendar-event-details-view {
  min-height: calc(100vh - 74px);
  background: #fff;
  color: #111827;
  animation: calendarSoftIn 220ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.calendar-job-detail-view {
  align-content: start;
  overflow-y: auto;
}

.calendar-job-tabs {
  gap: 24px;
  margin: 0;
  padding: 14px 18px 0;
  background: #fff;
  scrollbar-width: none;
}

.calendar-job-tabs::-webkit-scrollbar {
  display: none;
}

.calendar-job-tabs button {
  min-height: 44px;
  padding-bottom: 12px;
  font-size: 14px;
}

.calendar-job-tabs span {
  min-width: 20px;
  padding: 3px 6px;
  font-size: 10px;
}

.calendar-job-detail-view .calendar-detail-card {
  padding: 20px 18px 24px;
}

.event-details-appbar {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.event-details-appbar h2 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.event-detail-icon-button {
  display: inline-grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #111827;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms ease, transform 120ms ease;
}

.event-detail-icon-button:hover,
.event-detail-icon-button:focus-visible {
  background: #f3f4f6;
  outline: none;
}

.event-detail-icon-button:active {
  transform: scale(0.94);
}

.event-details-menu-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.event-details-menu {
  position: absolute;
  top: 36px;
  right: 10px;
  z-index: 4;
  width: 160px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  animation: calendarPopoverIn 160ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top right;
}

.event-details-menu.delete-confirm {
  width: 306px;
}

.event-details-menu-message {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #eef0f3;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
}

.event-details-menu button {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid #eef0f3;
  background: #fff;
  color: #111827;
  text-align: left;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.event-details-menu button:last-child {
  border-bottom: 0;
}

.event-details-menu button:hover,
.event-details-menu button:focus-visible {
  background: #f8fafc;
  outline: none;
}

.event-details-menu button:active {
  transform: scale(0.992);
}

.event-details-menu .danger {
  color: #dc2626;
}

.event-detail-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 30px 24px 28px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.event-detail-hero.all-day {
  gap: 18px;
  padding-bottom: 42px;
}

.event-detail-avatar {
  width: 22px;
  height: 22px;
}

.event-detail-hero h3 {
  max-width: min(300px, calc(100% - 48px));
  margin: 0;
  overflow: hidden;
  color: var(--event-detail-accent, #31c98b);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-detail-date-row,
.event-detail-time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  max-width: 360px;
}

.event-detail-date-row {
  margin-top: 4px;
}

.event-detail-all-day-date {
  margin-top: 12px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.event-detail-date-row span {
  color: #111827;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.event-detail-date-row span:first-child {
  grid-column: 1;
}

.event-detail-date-row span:last-child {
  grid-column: 3;
}

.event-detail-time-row {
  margin-top: -2px;
}

.event-detail-time-block {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
}

.event-detail-time-block > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.event-detail-time-block strong {
  color: #111827;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.event-detail-time-block small {
  margin-left: 3px;
  font-size: 12px;
  font-weight: 800;
}

.event-detail-time-arrow {
  color: #31c98b;
  font-size: 42px;
  text-align: center;
}

.event-detail-label-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.event-detail-label-row .material-symbols-rounded {
  font-size: 24px;
}

.event-detail-label-row strong {
  color: #111827;
  font-size: 15px;
  font-weight: 500;
}

.event-detail-extra-section {
  display: grid;
  gap: 12px;
  padding: 0 18px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.event-detail-info-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
}

.event-detail-info-row .material-symbols-rounded {
  color: #31c98b;
  font-size: 24px;
}

.event-detail-info-row strong,
.event-detail-info-row a {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-detail-info-row a:hover,
.event-detail-info-row a:focus-visible {
  color: #2563eb;
  outline: none;
  text-decoration: underline;
}

.event-detail-map {
  display: block;
  width: 100%;
  height: 206px;
  border: 0;
  border-radius: 12px;
  background: #eef2f7;
}

.event-detail-url-preview-slot[hidden] {
  display: none;
}

.event-detail-url-preview-slot .calendar-url-preview-card {
  border: 1px solid #e5e7eb;
}

.event-detail-activity {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 20px 18px;
}

.event-detail-date-pill,
.event-detail-created-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #8b95a1;
  font-size: 12px;
  line-height: 1;
}

.event-detail-created-pill .event-member-avatar {
  width: 17px;
  height: 17px;
}

.calendar-panel,
.ops-panel,
.page-wrap {
  padding: 20px 22px;
}

.calendar-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: calc(100vh - 74px);
}

.calendar-unscheduled-trigger {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #e2e4e7;
  border-radius: 6px;
  background: #fff;
  color: #55585d;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.calendar-unscheduled-trigger:hover,
.calendar-unscheduled-trigger:focus-visible,
.calendar-unscheduled-trigger[aria-expanded="true"] {
  outline: none;
  border-color: #efc25e;
  background: #fffaf0;
  color: #6f4b00;
  box-shadow: 0 0 0 3px rgba(239, 194, 94, 0.17);
}

.calendar-unscheduled-trigger > .material-symbols-rounded {
  color: #b47b00;
  font-size: 18px;
}

.calendar-unscheduled-trigger-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff0c2;
  color: #805500;
  font-size: 10px;
  font-weight: 800;
}

.calendar-unscheduled-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #f7f7f8;
}

.calendar-unscheduled-toolbar-title {
  display: grid;
  min-width: 0;
  place-items: center;
  text-align: center;
}

.calendar-unscheduled-toolbar-title strong {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.calendar-unscheduled-panel-count {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  justify-self: center;
  border-radius: 999px;
  background: #fff0c2;
  color: #805500;
  font-size: 11px;
  font-weight: 900;
}

.calendar-unscheduled-docked-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  background: #f7f7f8;
}

.calendar-unscheduled-drawer-body.calendar-unscheduled-drop-active {
  background: #edf5ff;
  box-shadow: inset 0 0 0 2px #0b5fe8;
}

.calendar-unscheduled-drawer-body.calendar-unscheduled-drop-active .calendar-unscheduled-empty {
  border-color: #0b5fe8;
  background: #f7faff;
}

.calendar-unscheduled-drawer-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  background: #fbfcfd;
  scrollbar-gutter: stable;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.calendar-unscheduled-drawer-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 13px;
}

.calendar-unscheduled-drawer-intro strong {
  font-size: 13px;
  font-weight: 800;
}

.calendar-unscheduled-drawer-intro span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.calendar-unscheduled-list {
  display: grid;
  gap: 9px;
}

.calendar-unscheduled-empty {
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  padding: 34px 24px;
  border: 1px dashed #dfe3e8;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.calendar-unscheduled-empty > .material-symbols-rounded {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 14px;
  background: #eaf8f2;
  color: #24a874;
  font-size: 27px;
}

.calendar-unscheduled-empty strong {
  font-size: 14px;
  font-weight: 800;
}

.calendar-unscheduled-empty p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.calendar-unscheduled-job {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 20px;
  width: clamp(250px, 29vw, 330px);
  min-width: 250px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: grab;
}

.calendar-unscheduled-panel .calendar-unscheduled-job {
  width: 100%;
  min-width: 0;
  background: #fff;
}

.calendar-unscheduled-job:hover,
.calendar-unscheduled-job:focus-visible {
  outline: none;
  border-color: #9fc4ff;
  background: #f1f6ff;
  box-shadow: 0 0 0 2px rgba(11, 95, 232, 0.08);
}

.calendar-unscheduled-job.awaiting-schedule {
  border-color: var(--blue);
  background: #eaf2ff;
  box-shadow: 0 0 0 2px rgba(11, 95, 232, 0.12);
}

.calendar-unscheduled-job:active {
  cursor: grabbing;
}

.calendar-unscheduled-job-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #fff4d6;
  color: #9a6700;
  font-size: 18px;
}

.calendar-unscheduled-job-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.calendar-unscheduled-job-copy strong,
.calendar-unscheduled-job-copy span,
.calendar-unscheduled-job-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-unscheduled-job-copy strong {
  font-size: 12px;
  font-weight: 800;
}

.calendar-unscheduled-job-copy span {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.calendar-unscheduled-job-copy small {
  color: var(--muted);
  font-size: 10px;
}

.calendar-unscheduled-drag {
  color: var(--muted);
  font-size: 19px;
}

.calendar-stage.awaiting-unscheduled-schedule .calendar-cell,
.calendar-stage.awaiting-unscheduled-schedule [data-calendar-day] {
  cursor: copy;
}

.calendar-stage.awaiting-unscheduled-schedule .calendar-cell:hover,
.calendar-stage.awaiting-unscheduled-schedule [data-calendar-day]:hover {
  background: #eaf4ff;
  box-shadow: inset 0 0 0 1px #78aefc;
}

.ops-panel {
  border-left: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 20px;
  min-height: calc(100vh - 74px);
  max-height: calc(100vh - 74px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 1180px) {
  .calendar-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-layout .calendar-panel {
    min-height: auto;
  }

  .calendar-layout .ops-panel {
    min-height: 0;
    max-height: none;
    border-top: 1px solid var(--line);
    border-left: 0;
    overflow: visible;
  }

}

.section-header,
.mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.view > .page-wrap > .section-header:not(.teams-header):not(.job-detail-header) {
  justify-content: flex-end;
}

.view > .page-wrap > .section-header:not(.teams-header):not(.job-detail-header) > div:first-child {
  display: none;
}

.view > .page-wrap > .section-header:not(.teams-header):not(.job-detail-header):not(:has(> button, > .header-actions, > .section-actions)) {
  display: none;
}

.view > .page-wrap > .section-header.live-page-header:not(.teams-header):not(.job-detail-header) {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.view > .page-wrap > .section-header.live-page-header:not(.teams-header):not(.job-detail-header) > div:first-child {
  display: block;
}

#time-view > .page-wrap > .section-header,
#equipment-view > .page-wrap > .section-header,
#vehicles-view > .page-wrap > .section-header {
  justify-content: space-between;
  align-items: flex-end;
}

#time-view > .page-wrap > .section-header > div:first-child,
#equipment-view > .page-wrap > .section-header > div:first-child,
#vehicles-view > .page-wrap > .section-header > div:first-child {
  display: block;
}

#clients-view .clients-empty-header {
  justify-content: space-between;
}

#clients-view .clients-empty-header > div:first-child {
  display: block;
}

#clients-view .clients-empty-header h1 {
  margin: 0;
  font-size: 18px;
}

#dashboard-view .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#dashboard-view .section-header > div:first-child {
  display: block;
}

#dashboard-view .section-header h1 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.15;
}

.clients-empty-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.section-header h1,
.drawer-header h2 {
  margin: 2px 0 0;
  font-size: var(--fs-title);
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: -0.018em;
}

.calendar-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.calendar-header h1 {
  display: block;
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.calendar-header .header-spacer {
  display: none;
}

.calendar-header .header-tools {
  justify-self: start;
}

.dispatch-metrics {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: -4px 0 14px;
}

.dispatch-metric {
  display: grid;
  gap: 3px;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.dispatch-metric.green {
  border-left-color: var(--green);
}

.dispatch-metric.amber {
  border-left-color: var(--amber);
}

.dispatch-metric.red {
  border-left-color: var(--red);
}

.dispatch-metric span,
.dispatch-metric small {
  color: var(--muted);
  font-size: 12px;
}

.dispatch-metric strong {
  font-size: 24px;
  line-height: 1.05;
}

.eyebrow {
  display: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.calendar-date-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
}

.calendar-team-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 168px;
  min-width: 150px;
}

.calendar-team-filter::after {
  content: "";
  position: absolute;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--muted);
  pointer-events: none;
  transform: rotate(45deg) translateY(-2px);
}

.calendar-team-filter select {
  width: 100%;
  min-height: 36px;
  padding: 0 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  appearance: none;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
}

.calendar-team-filter select:focus {
  border-color: rgba(11, 95, 232, 0.58);
  box-shadow: 0 0 0 3px rgba(11, 95, 232, 0.1);
  outline: none;
}

.calendar-team-filter select:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.72;
}

.native-calendar-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented {
  display: flex;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  overflow: hidden;
}

.segment {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  font-weight: 600;
}

.segment.active {
  background: #eaf4ff;
  color: var(--blue);
  box-shadow: none;
}

.arrow-button {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  width: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.arrow-button:hover,
.arrow-button:focus-visible {
  background: var(--surface-muted);
  outline: none;
}

.arrow-button:active {
  transform: scale(0.94);
}

.arrow-button .material-symbols-rounded {
  font-size: 22px;
}

.team-strip {
  display: none;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.team-pill {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.team-pill strong {
  font-size: 12px;
}

.team-pill span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.calendar-stage {
  min-height: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow-x: hidden;
  overflow-y: auto;
  height: 100%;
}

.calendar-stage:empty {
  border-color: transparent;
}

.week-grid {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 72px repeat(7, minmax(0, 1fr));
  grid-template-rows: 64px 88px repeat(23, 60px);
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 100%;
}

.week-grid.all-day-expanded {
  grid-template-rows: 64px 148px repeat(23, 60px);
}

.time-cell,
.day-head,
.calendar-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.week-grid > :nth-child(8n) {
  border-right: 0;
}

.day-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 0;
  padding: 6px 8px;
  background: var(--surface);
  text-align: center;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.1;
  border-top: 0;
  border-left: 0;
  cursor: pointer;
}

.day-head:hover,
.day-head.selected {
  background: #eaf4ff;
}

.day-head span {
  display: block;
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
}

.day-head.current .date-dot {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  line-height: 1;
}

.time-cell {
  min-height: 0;
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  background: var(--surface);
  border-right: 0;
}

.time-cell:not(.all-day-label) {
  align-items: flex-start;
  border-bottom: 0;
  line-height: 1;
  transform: translateY(-7px);
}

.calendar-cell {
  position: relative;
  min-height: 0;
  padding: 3px 5px;
}

.calendar-cell.time-slot {
  cursor: pointer;
}

.calendar-cell.time-slot:hover {
  background: var(--surface-muted);
  box-shadow: none;
}

.calendar-cell.selected-slot {
  background: #eef7ff;
  box-shadow: none;
}

.calendar-cell.highlight,
.day-head.highlight {
  background: #f4faff;
}

.calendar-cell.selected-day {
  background: #eef7ff;
  box-shadow: none;
}

.all-day-label {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: end;
  gap: 22px;
  align-items: flex-start;
  min-height: 0;
  padding-top: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.all-day-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b8c0cc;
  cursor: pointer;
}

.all-day-toggle:hover,
.all-day-toggle:focus-visible {
  background: var(--surface-muted);
  color: var(--muted);
  outline: none;
}

.all-day-toggle .material-symbols-rounded {
  font-size: 18px;
}

.all-day-pill {
  display: block;
  width: 72%;
  margin: 5px auto 0;
  min-height: 25px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: #fff6df;
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
}

.all-day-pill.blue {
  background: #eaf4ff;
  color: var(--blue);
}

.all-day-pill.green {
  background: #e9f8ef;
  color: var(--green);
}

.job-chip {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--blue);
  text-align: left;
}

.compact-calendar-item {
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 17px;
  padding: 1px 2px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--green);
  text-align: left;
}

.compact-calendar-item:hover,
.compact-calendar-item:focus-visible {
  background: var(--surface-muted);
  outline: none;
}

.compact-calendar-item strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
}

.compact-calendar-item small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.compact-calendar-item em {
  grid-column: 2 / 4;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-resize-handle {
  position: absolute;
  right: 2px;
  bottom: 0;
  width: 26px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  cursor: ns-resize;
}

.calendar-event-item:hover .calendar-resize-handle,
.calendar-event-item:focus-visible .calendar-resize-handle {
  opacity: 0.35;
}

.calendar-dot {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.job-chip.green {
  background: #e9f8ef;
  color: var(--green);
}

.job-chip.purple {
  background: #f1ebff;
  color: var(--purple);
}

.job-chip.teal {
  background: #e8fbf8;
  color: var(--teal);
}

.job-chip.amber {
  background: #fff5df;
  color: var(--amber);
}

.job-chip.red {
  background: #fff1f2;
  color: var(--red);
}

.job-chip.grey {
  background: var(--surface-muted);
  color: var(--muted);
}

.job-chip.compact-calendar-item,
.job-chip.compact-calendar-item.green,
.job-chip.compact-calendar-item.purple,
.job-chip.compact-calendar-item.teal,
.job-chip.compact-calendar-item.amber,
.job-chip.compact-calendar-item.red,
.job-chip.compact-calendar-item.grey,
.month-job.compact-calendar-item,
.month-job.compact-calendar-item.green,
.month-job.compact-calendar-item.purple,
.month-job.compact-calendar-item.teal,
.month-job.compact-calendar-item.amber,
.month-job.compact-calendar-item.red,
.month-job.compact-calendar-item.grey {
  background: transparent;
}

.job-chip.open-slot {
  place-items: center;
  min-height: min(100px, calc(100% + 42px));
  border-style: dashed;
  background: var(--surface-muted);
  color: var(--blue);
  text-align: center;
}

.job-chip.open-slot::after {
  display: none;
}

.job-chip.open-slot .slot-plus {
  font-size: 20px;
}

.slot-task-stack {
  position: absolute;
  inset: 5px;
  display: grid;
  align-content: start;
  gap: 4px;
  pointer-events: none;
}

.slot-task-chip {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 6px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.slot-task-stack small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.calendar-item-stack {
  display: grid;
  align-content: start;
  gap: 1px;
}

.calendar-bar {
  position: relative;
  display: block;
  width: 100%;
  min-height: 18px;
  margin-bottom: 2px;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  padding: 2px 6px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-bar[draggable="true"],
.calendar-event-item[draggable="true"] {
  cursor: grab;
}

.calendar-bar[draggable="true"]:active,
.calendar-event-item[draggable="true"]:active {
  cursor: grabbing;
}

.calendar-pointer-dragging,
.calendar-pointer-dragging * {
  cursor: grabbing !important;
}

.calendar-bar.purple {
  background: #a78bfa;
}

.calendar-bar.teal {
  background: var(--teal);
}

.calendar-bar.amber {
  background: #facc15;
  color: #3f2f00;
}

.calendar-bar.red {
  background: var(--red);
}

.calendar-bar.grey {
  background: #111827;
}

.compact-calendar-item.purple {
  color: var(--purple);
}

.compact-calendar-item.teal {
  color: var(--teal);
}

.compact-calendar-item.amber {
  color: #d9a400;
}

.compact-calendar-item.red {
  color: var(--red);
}

.compact-calendar-item.grey {
  color: #111827;
}

.calendar-more,
.month-more {
  display: inline-block;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.calendar-drop-target {
  background: #eaf4ff !important;
  box-shadow: none;
}

.calendar-drop-choice-popover {
  position: fixed;
  z-index: 1200;
  display: grid;
  width: 156px;
  overflow: visible;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  animation: calendarPopoverIn 140ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.calendar-drop-choice-popover::before {
  position: absolute;
  top: -7px;
  left: 34px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  transform: rotate(45deg);
  content: "";
}

.calendar-drop-choice-popover button {
  position: relative;
  z-index: 1;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: transparent;
  color: #333842;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.calendar-drop-choice-popover button:first-child {
  border-radius: 13px 13px 0 0;
}

.calendar-drop-choice-popover button:last-child {
  border-bottom: 0;
  border-radius: 0 0 13px 13px;
}

.calendar-drop-choice-popover button:hover,
.calendar-drop-choice-popover button:focus-visible {
  outline: none;
  background: #f6f8fb;
  color: #101828;
}

.calendar-now-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  top: var(--minute-offset);
  height: 0;
  border-top: 2px solid var(--red);
  pointer-events: none;
}

.calendar-now-line span {
  position: absolute;
  left: -42px;
  top: -10px;
  min-width: 38px;
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 34px repeat(var(--month-week-count, 5), minmax(118px, 1fr));
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 650px;
}

.month-weekday {
  display: grid;
  align-items: center;
  justify-items: center;
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.month-day {
  container-name: calendar-day;
  container-type: inline-size;
  min-height: 0;
  padding: 6px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.month-day.muted {
  background: #fbfbfc;
}

.month-day.current > strong {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
}

.month-day > strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  text-align: center;
}

.month-items {
  display: grid;
  gap: 1px;
}

.month-job {
  margin-bottom: 0;
}

.month-job.green {
  background: #e9f8ef;
  color: var(--green);
}

.month-job.teal {
  background: #e8fbf8;
  color: var(--teal);
}

.month-job.amber {
  background: #fff5df;
  color: var(--amber);
}

.month-job.red {
  background: #fff1f2;
  color: var(--red);
}

.month-job.grey {
  background: var(--surface-muted);
  color: var(--muted);
}

.month-job.compact-calendar-item,
.month-job.compact-calendar-item.green,
.month-job.compact-calendar-item.purple,
.month-job.compact-calendar-item.teal,
.month-job.compact-calendar-item.amber,
.month-job.compact-calendar-item.red,
.month-job.compact-calendar-item.grey {
  background: transparent;
}

.month-items .compact-calendar-item {
  grid-template-columns: 10px minmax(0, 1fr) 52px;
  column-gap: 5px;
  min-height: 18px;
  padding: 0 2px;
}

.month-items .compact-calendar-item strong {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-items .compact-calendar-item small {
  display: block;
  width: 52px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.button-icon {
  font-size: 18px;
  vertical-align: -4px;
}

.panel-section {
  padding: 0 0 21px;
  margin-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.calendar-work-filter {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.calendar-work-filter .field-label {
  margin: 0;
}

.jobs-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.panel-section:last-child {
  border-bottom: 0;
}

.calendar-slot-card,
.calendar-detail-card,
.calendar-allocation-card {
  display: grid;
  gap: 14px;
}

.slot-summary,
.allocation-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.slot-summary span,
.slot-summary small,
.allocation-summary span,
.allocation-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.slot-summary strong,
.allocation-summary strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}

.slot-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.slot-task-list,
.slot-task-form {
  display: grid;
  gap: 8px;
}

.slot-task-row {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.slot-task-row strong {
  font-size: 13px;
  line-height: 1.25;
}

.slot-task-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.calendar-event-card {
  display: grid;
  gap: 14px;
}

.timetree-event-card {
  min-height: calc(100vh - 74px);
  align-content: start;
  gap: 16px;
  padding: 0 20px 28px;
  background: #f7f7f8;
  animation: calendarSoftIn 220ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.event-editor-toolbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  margin: 0 -20px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.event-editor-toolbar strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.event-editor-toolbar .icon-button {
  justify-self: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #e1e6ec;
  border-radius: 50%;
  background: #f1f3f5;
  color: #111827;
  box-shadow: none;
  transition: background-color 150ms ease, transform 120ms ease;
}

.event-editor-toolbar .icon-button:hover,
.event-editor-toolbar .icon-button:focus-visible {
  background: #eef0f3;
}

.event-editor-toolbar .icon-button:active {
  transform: scale(0.94);
}

.event-title-field,
.event-note-field,
.event-select-row,
.event-toggle-row,
.event-field-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timetree-event-card .event-title-field {
  margin-top: 12px;
}

.event-title-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.event-title-label em {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eaf4ff;
  color: var(--blue);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.event-title-input {
  width: 100%;
  border: 0;
  border-bottom: 0;
  border-radius: 0;
  padding: 12px 14px;
  background: transparent;
  color: #111827;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
}

.event-title-input::placeholder {
  color: #8c8f96;
  opacity: 1;
}

.event-title-input:focus {
  outline: none;
}

.event-title-input[aria-invalid="true"] {
  border-radius: 10px;
  background: #fff1f2;
  box-shadow: inset 0 0 0 1px #fda4af;
}

.event-field-error {
  padding: 0 14px;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.event-field-error[hidden] {
  display: none;
}

.event-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-self: center;
  width: min(256px, 100%);
  padding: 2px;
  gap: 2px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #ececec;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
}

.event-editor-toolbar > .event-type-tabs {
  margin: 0 auto;
}

.event-editor-toolbar .event-type-tabs button.active,
.event-editor-toolbar .event-type-tabs button[aria-pressed="true"] {
  color: var(--blue);
  box-shadow: 0 1px 10px rgba(11, 95, 232, 0.18), inset 0 0 0 1px rgba(11, 95, 232, 0.14);
}

.event-type-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.event-type-tabs button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.13);
}

.event-section-card {
  display: grid;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  transition: box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.event-date-card {
  position: relative;
  z-index: 8;
  overflow: visible;
}

.event-meta-card {
  overflow: visible;
  position: relative;
  z-index: 5;
}

.event-reminder-card {
  overflow: visible;
  position: relative;
  z-index: 7;
}

.event-toggle-row,
.event-select-row {
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  border-bottom: 1px solid #edf0f4;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
}

button.event-select-row {
  width: 100%;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  background: transparent;
  text-align: left;
  transition: background-color 160ms ease, transform 120ms ease;
}

button.event-select-row:hover,
button.event-select-row:focus-visible {
  background: #f8fafc;
  outline: none;
}

button.event-select-row:active {
  transform: scale(0.996);
}

.event-disclosure-row,
.event-label-summary {
  grid-template-columns: 110px minmax(0, 1fr) 20px;
}

.event-disclosure-row strong {
  justify-self: end;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-disclosure-row > .material-symbols-rounded,
.event-label-summary > .material-symbols-rounded {
  justify-self: end;
  color: #a5acb8;
  font-size: 20px;
  transition: transform 180ms ease, color 160ms ease;
}

.event-disclosure-row[aria-expanded="true"] > .material-symbols-rounded,
.event-label-summary[aria-expanded="true"] > .material-symbols-rounded {
  transform: rotate(90deg);
}

.event-section-card > :last-child {
  border-bottom: 0;
}

.event-label-picker {
  position: relative;
  display: grid;
  border-bottom: 0;
}

.project-job-label-control {
  position: relative;
  z-index: 6;
  margin-top: 14px;
}

.project-job-label-control .event-label-picker {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.project-job-label-control .event-label-summary {
  min-height: 50px;
  border: 0;
  border-radius: 10px;
}

.project-job-label-control .event-label-options {
  border: 1px solid var(--line);
  border-top: 0;
}

.event-label-summary {
  width: 100%;
  background: transparent;
  text-align: left;
}

.event-label-summary[aria-expanded="true"] {
  box-shadow: none;
}

.event-label-summary strong {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.event-label-summary strong em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-label-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: var(--label-color);
}

.event-member-row strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.event-member-avatar {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, #f97316 0 22%, transparent 23%),
    radial-gradient(circle at 38% 50%, #ef4444 0 28%, transparent 29%),
    radial-gradient(circle at 62% 52%, #16a34a 0 28%, transparent 29%),
    #f3f4f6;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.event-members-panel {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  z-index: 26;
  display: grid;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
  animation: calendarPopoverIn 170ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top center;
}

.event-members-panel[hidden] {
  display: none;
}

.event-members-search {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #edf0f4;
  color: #8c8f96;
}

.event-members-search .material-symbols-rounded {
  color: #8c8f96;
  font-size: 20px;
}

.event-members-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 14px;
  outline: none;
}

.event-members-search input::placeholder {
  color: #8c8f96;
  opacity: 1;
}

.event-members-section-label {
  padding: 12px 18px 8px;
  color: #8c8f96;
  font-size: 12px;
  font-weight: 500;
}

.event-member-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 0;
  padding: 8px 14px 10px 18px;
  background: #f1f1f2;
  color: #111827;
  text-align: left;
  transition: background-color 150ms ease, transform 120ms ease;
}

.event-member-option:active {
  transform: scale(0.996);
}

.event-member-option-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, #f97316 0 22%, transparent 23%),
    radial-gradient(circle at 38% 50%, #ef4444 0 28%, transparent 29%),
    radial-gradient(circle at 62% 52%, #16a34a 0 28%, transparent 29%),
    #f3f4f6;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.event-member-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.event-member-option-copy strong {
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.05;
}

.event-member-option-copy small {
  justify-self: start;
  border-radius: 999px;
  padding: 2px 7px;
  background: #202124;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.event-member-check {
  color: #202124;
  font-size: 20px;
}

.event-label-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 430px;
  overflow-y: auto;
  border-top: 1px solid #edf0f4;
  border-radius: 0 0 10px 10px;
  background: #fff;
  box-shadow: 0 16px 26px rgba(15, 23, 42, 0.18);
  animation: calendarPopoverIn 170ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top center;
}

.event-label-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 20px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: #fff;
  color: #111827;
  text-align: left;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.event-label-option:hover,
.event-label-option:focus-visible {
  background: #f7f8fa;
  outline: none;
}

.event-label-option:active {
  transform: scale(0.996);
}

.event-label-option.selected {
  background: #f7f7f8;
  box-shadow: none;
}

.event-label-option strong {
  font-size: 14px;
  font-weight: 500;
}

.event-label-radio {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  justify-self: end;
  border: 2px solid #9ca3af;
  border-radius: 50%;
}

.event-label-option.selected .event-label-radio {
  border-color: #202124;
}

.event-label-option.selected .event-label-radio::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #202124;
}

.event-inline-panel {
  display: grid;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  animation: calendarSoftIn 170ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top center;
}

.event-inline-panel[hidden] {
  display: none;
}

.event-reminder-panel {
  display: grid;
  padding: 0 14px 12px;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  animation: calendarSoftIn 170ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top center;
}

.event-reminder-panel[hidden] {
  display: none;
}

.event-reminder-row {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  color: #374151;
  font-size: 14px;
}

.event-reminder-row input {
  min-width: 0;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f5;
  color: #111827;
  font-size: 14px;
}

.event-reminder-row input {
  padding: 0 8px;
  text-align: center;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.event-reminder-unit-picker {
  position: relative;
  min-width: 0;
}

.event-reminder-unit-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 0 9px 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f4f4f5;
  color: #111827;
  font-size: 14px;
  text-align: left;
  transition: background-color 150ms ease, border-color 150ms ease, transform 120ms ease;
}

.event-reminder-unit-button:hover,
.event-reminder-unit-button[aria-expanded="true"] {
  background: #eef4ff;
  border-color: #cfe0ff;
}

.event-reminder-unit-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-reminder-unit-button .material-symbols-rounded {
  color: #8b95a1;
  font-size: 19px;
  transition: transform 0.16s ease;
}

.event-reminder-unit-button[aria-expanded="true"] .material-symbols-rounded {
  transform: rotate(180deg);
}

.event-reminder-unit-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid #dfe5ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  animation: calendarPopoverIn 150ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top center;
}

.event-reminder-unit-menu[hidden] {
  display: none;
}

.event-reminder-unit-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #111827;
  font-size: 14px;
  text-align: left;
  transition: background-color 140ms ease, color 140ms ease, transform 120ms ease;
}

.event-reminder-unit-option:active {
  transform: scale(0.992);
}

.event-reminder-unit-option:hover,
.event-reminder-unit-option:focus-visible {
  background: #f2f6ff;
  outline: none;
}

.event-reminder-unit-option.selected {
  background: #eaf2ff;
  color: #0b5fe8;
  font-weight: 800;
}

.event-reminder-unit-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-reminder-unit-option .material-symbols-rounded {
  color: #0b5fe8;
  font-size: 17px;
}

.event-reminder-clear {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  font-size: 16px;
  line-height: 1;
}

.event-reminder-clear:hover,
.event-reminder-clear:focus-visible {
  background: #f3f4f6;
  color: #6b7280;
  outline: none;
}

.event-choice-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  min-height: 46px;
  padding: 0 14px 0 22px;
  border: 0;
  border-top: 1px solid #edf0f4;
  background: #fff;
  color: #111827;
  text-align: left;
}

.event-choice-option.selected {
  background: #f7f7f8;
  box-shadow: none;
}

.event-repeat-panel {
  display: grid;
  overflow: hidden;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  animation: calendarSoftIn 180ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top center;
}

.event-repeat-panel[hidden] {
  display: none;
}

.modern-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.modern-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.modern-select-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 9px 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #f4f4f5;
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.modern-select-toggle:hover,
.modern-select-toggle:focus-visible,
.modern-select-toggle[aria-expanded="true"] {
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px #cfe0ff;
  outline: 0;
}

.modern-select-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modern-select-toggle .material-symbols-rounded {
  color: #8b95a1;
  font-size: 19px;
  transition: transform 160ms ease;
}

.modern-select-toggle[aria-expanded="true"] .material-symbols-rounded {
  transform: rotate(180deg);
}

.modern-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(320px, calc(100vh - 180px));
  overflow-y: auto;
  border: 1px solid #e4e9f2;
  border-radius: 12px;
}

.modern-select-option:first-child {
  border-top: 0;
}

.modern-select.is-disabled .modern-select-toggle {
  cursor: not-allowed;
  opacity: 0.55;
}

.event-repeat-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  min-height: 48px;
  padding: 0 16px 0 22px;
  border: 0;
  border-top: 1px solid #edf0f4;
  background: #fff;
  color: #202124;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.event-repeat-option:first-child {
  border-top: 0;
}

.event-repeat-option:hover,
.event-repeat-option:focus-visible {
  background: #f7f8fa;
  outline: none;
}

.event-repeat-option:active {
  transform: scale(0.996);
}

.event-repeat-option.selected {
  background: #f2f2f3;
}

.event-repeat-option.selected .event-label-radio {
  border-color: #202124;
}

.event-repeat-option.selected .event-label-radio::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #202124;
}

.event-repeat-custom .material-symbols-rounded {
  justify-self: end;
  color: #a5acb8;
  font-size: 20px;
}

.calendar-repeat-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(17, 24, 39, 0.58);
  animation: calendarModalBackdropIn 180ms ease both;
}

.calendar-repeat-modal {
  display: grid;
  width: min(452px, calc(100vw - 36px));
  min-height: 500px;
  gap: 30px;
  padding: 42px 40px 26px;
  border-radius: 28px;
  background: #fff;
  color: #202124;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.3);
  animation: calendarModalIn 210ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.calendar-repeat-modal h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #202124;
  font-size: 22px;
  line-height: 1.2;
}

.calendar-repeat-modal h2 .material-symbols-rounded {
  font-size: 22px;
}

.calendar-repeat-modal-row {
  display: grid;
  grid-template-columns: auto 68px 94px;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.calendar-repeat-modal-row > span {
  color: #303235;
}

.calendar-repeat-modal-row input,
.calendar-repeat-end-row input[type="date"],
.calendar-repeat-end-row input[type="number"] {
  min-width: 0;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #f5f5f6;
  color: #202124;
  font-size: 14px;
  text-align: center;
}

.calendar-repeat-unit-picker {
  width: 94px;
}

.calendar-repeat-unit-menu {
  min-width: 128px;
}

.calendar-repeat-ends {
  display: grid;
  gap: 18px;
  align-content: start;
}

.calendar-repeat-ends > strong {
  margin-bottom: 6px;
  color: #303235;
  font-size: 16px;
  font-weight: 500;
}

.calendar-repeat-end-row {
  display: grid;
  grid-template-columns: 22px 96px minmax(0, 150px);
  align-items: center;
  gap: 10px;
  color: #303235;
  font-size: 16px;
}

.calendar-repeat-end-row input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #202124;
}

.calendar-repeat-end-row input:disabled {
  color: #a8adb5;
  opacity: 0.62;
}

.calendar-repeat-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  margin-top: auto;
}

.calendar-repeat-cancel,
.calendar-repeat-save {
  min-width: 90px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.calendar-repeat-cancel {
  background: transparent;
  color: #8b8e96;
}

.calendar-repeat-save {
  background: #202124;
  color: #fff;
}

.calendar-repeat-cancel:hover,
.calendar-repeat-cancel:focus-visible {
  background: #f1f2f4;
  color: #4b5563;
  outline: none;
}

.calendar-repeat-save:hover,
.calendar-repeat-save:focus-visible {
  background: #111827;
  outline: none;
}

.calendar-repeat-cancel:active,
.calendar-repeat-save:active {
  transform: scale(0.98);
}

.event-inline-input {
  min-height: 42px;
  margin: 10px 14px 12px;
  border: 0;
  border-radius: 8px;
  background: #f4f4f5;
  font-size: 14px;
}

.event-inline-panel .textarea.event-inline-input {
  min-height: 86px;
  padding: 10px 12px;
  resize: vertical;
}

.event-inline-note {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.event-extra-list button strong {
  justify-self: end;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-toggle-row input {
  justify-self: end;
  width: 42px;
  height: 24px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #d1d5db;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.event-toggle-row input::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin: 2px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms cubic-bezier(0.19, 1, 0.22, 1);
}

.event-toggle-row input:active {
  transform: scale(0.96);
}

.event-toggle-row input:checked {
  background: #31c98b;
}

.event-toggle-row input:checked::after {
  transform: translateX(18px);
}

.event-field-grid {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
}

.timetree-event-card .event-select-row .input,
.timetree-event-card .event-toggle-row .input {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f4f4f5;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.timetree-event-card .event-date-time-row {
  position: relative;
  grid-template-columns: 110px minmax(0, 1fr) 88px;
  column-gap: 8px;
}

.timetree-event-card .event-date-time-row[data-calendar-event-date-row="start"] {
  z-index: 3;
}

.timetree-event-card .event-date-time-row[data-calendar-event-date-row="end"] {
  z-index: 2;
}

.timetree-event-card .event-date-time-row .event-date-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.timetree-event-card .event-date-display,
.timetree-event-card .event-time-input {
  justify-self: end;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: #f4f4f5;
  color: #111827;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.timetree-event-card .event-date-display {
  min-height: 32px;
  cursor: pointer;
}

.timetree-event-card .event-date-display[aria-expanded="true"] {
  box-shadow: none;
}

.timetree-event-card .event-date-display:hover,
.timetree-event-card .event-time-input:hover,
.timetree-event-card .event-date-display:focus-visible,
.timetree-event-card .event-time-input:focus-visible {
  background: #eef4ff;
  outline: none;
}

.timetree-event-card .event-date-display:active,
.timetree-event-card .event-time-input:active {
  transform: scale(0.985);
}

.timetree-event-card .event-time-input {
  min-height: 32px;
  cursor: pointer;
  caret-color: transparent;
  opacity: 1;
  -webkit-text-fill-color: #111827;
}

.timetree-event-card.all-day-event .event-date-time-row {
  grid-template-columns: 110px minmax(0, 1fr);
}

.timetree-event-card.all-day-event .event-time-input,
.timetree-event-card.all-day-event .event-time-picker-popover {
  display: none;
}

.event-time-picker-popover {
  position: absolute;
  top: calc(100% - 1px);
  right: 14px;
  z-index: 46;
  display: grid;
  width: 160px;
  max-height: 338px;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 0 0 12px 12px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
  scrollbar-color: #9ca3af transparent;
  scrollbar-width: auto;
  animation: calendarPopoverIn 160ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top right;
}

.event-time-picker-popover[hidden] {
  display: none;
}

.shared-time-native-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.shared-time-picker-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.shared-time-display {
  justify-self: end;
  width: 100%;
  min-height: 32px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: #f4f4f5;
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
  cursor: text;
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.shared-time-display:hover,
.shared-time-display:focus-visible,
.shared-time-display[aria-expanded="true"] {
  background: #eef4ff;
  box-shadow: 0 0 0 2px rgba(24, 102, 255, 0.28);
  outline: none;
}

.shared-time-display[aria-invalid="true"] {
  background: #fff1f2;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.28);
}

.shared-time-display:active {
  transform: scale(0.985);
}

.shared-time-picker-popover {
  top: calc(100% + 6px);
  right: 0;
  border-radius: 12px;
}

.event-time-picker-option {
  display: grid;
  align-items: center;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: background-color 140ms ease, color 140ms ease, transform 120ms ease;
}

.event-time-picker-option:hover,
.event-time-picker-option:focus-visible {
  background: #f7f8fa;
  outline: none;
}

.event-time-picker-option.selected {
  background: #eef4ff;
  color: #0b5fe8;
  font-weight: 800;
}

.event-time-picker-option:active {
  transform: scale(0.992);
}

.event-date-picker-popover {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  z-index: 40;
  width: min(320px, 100%);
  padding: 18px 20px 20px;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.18);
  animation: calendarPopoverIn 170ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top center;
}

.event-date-picker-popover[hidden] {
  display: none;
}

.shared-date-picker-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.shared-date-picker-field > .input {
  width: 100%;
  padding-right: 42px;
}

.shared-date-picker-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8b95a1;
  font-size: 19px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.shared-date-picker-toggle:hover,
.shared-date-picker-toggle:focus-visible,
.shared-date-picker-toggle[aria-expanded="true"] {
  background: #eef4ff;
  color: #0b5fe8;
  outline: none;
}

.shared-date-picker-toggle:active {
  transform: translateY(-50%) scale(0.94);
}

.shared-date-picker-field .shared-date-picker-popover {
  top: calc(100% + 7px);
  left: 0;
  width: min(320px, calc(100vw - 32px));
  border-radius: 8px;
}

.toolbar-date-picker-popover {
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: min(320px, calc(100vw - 32px));
  border-radius: 8px;
}

.event-date-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.event-date-picker-head strong {
  color: #25c789;
  font-size: 16px;
  font-weight: 500;
}

.event-date-picker-head > span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.event-date-picker-icon,
.event-date-picker-nav button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #8b95a1;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.event-date-picker-icon {
  border-radius: 999px;
}

.event-date-picker-nav {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.event-date-picker-nav button {
  border: 0;
  border-radius: 0;
}

.event-date-picker-nav button + button {
  border-left: 1px solid #e5e7eb;
}

.event-date-picker-icon:hover,
.event-date-picker-nav button:hover,
.event-date-picker-icon:focus-visible,
.event-date-picker-nav button:focus-visible {
  background: #f3f8ff;
  border-color: #cfe0ff;
  color: #0b5fe8;
  outline: none;
}

.event-date-picker-icon:active,
.event-date-picker-nav button:active {
  transform: scale(0.94);
}

.event-date-picker-icon .material-symbols-rounded,
.event-date-picker-nav .material-symbols-rounded {
  font-size: 20px;
}

.event-date-picker-weekdays,
.event-date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  text-align: center;
}

.event-date-picker-weekdays {
  margin-bottom: 9px;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
}

.event-date-picker-days {
  row-gap: 6px;
}

.event-date-picker-day {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 140ms ease, color 140ms ease, transform 120ms ease;
}

.event-date-picker-day.muted {
  color: #aeb6c1;
}

.event-date-picker-day.sunday {
  color: #ef4444;
}

.event-date-picker-day.selected {
  background: #31c98b;
  color: #fff;
}

.event-date-picker-day:hover,
.event-date-picker-day:focus-visible {
  background: #eef4ff;
  outline: none;
}

.event-date-picker-day.selected:hover,
.event-date-picker-day.selected:focus-visible {
  background: #31c98b;
}

.event-date-picker-day:active {
  transform: scale(0.92);
}

.event-note-row {
  gap: 8px;
  padding: 12px 14px;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
}

.event-note-row .textarea {
  min-height: 74px;
  border: 0;
  padding: 0;
  background: transparent;
  resize: vertical;
}

.event-note-card {
  gap: 14px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.event-note-card > .event-disclosure-row {
  min-height: 48px;
  border-bottom: 0;
  border-radius: 12px;
  background: #fff;
  color: #111827;
}

.event-note-card > .event-disclosure-row strong {
  color: #8c8f96;
}

.event-clearable-row {
  position: relative;
  display: grid;
  align-items: center;
}

.event-note-card .event-clearable-row > .event-disclosure-row {
  min-height: 48px;
  padding-right: 40px;
  border-bottom: 0;
  border-radius: 12px;
  background: #fff;
  color: #111827;
}

.event-note-card .event-clearable-row > .event-disclosure-row strong {
  color: #8c8f96;
}

.event-clear-field-button {
  position: absolute;
  right: 13px;
  top: 50%;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  font-size: 16px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.event-clear-field-button:hover,
.event-clear-field-button:focus-visible {
  background: #f3f4f6;
  color: #6b7280;
  outline: none;
}

.event-clear-field-button:active {
  transform: translateY(-50%) scale(0.9);
}

.event-clear-field-button[hidden] {
  display: none;
}

.event-clearable-row:has(#calendarEventLocationEditor:placeholder-shown) > .event-clear-field-button,
.event-clearable-row:has(#calendarEventUrlEditor:placeholder-shown) > .event-clear-field-button,
.event-note-clearable:has([data-calendar-editor-summary="note"]:empty) > .event-clear-field-button {
  display: none;
}

.event-extra-list {
  display: grid;
  gap: 14px;
  overflow: visible;
  border-top: 0;
  border-radius: 0;
  background: transparent;
  padding-top: 0;
}

.event-extra-field {
  display: grid;
  gap: 6px;
}

.event-extra-field > label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.event-extra-field > label span {
  color: #8c8f96;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.event-extra-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: #111827;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.event-extra-list button:hover,
.event-extra-list button:focus-visible {
  background: #f8fafc;
  outline: none;
}

.event-extra-list button:active {
  transform: scale(0.996);
}

.event-extra-list button:last-child {
  border-bottom: 0;
}

.event-extra-list button small {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.event-extra-list button .material-symbols-rounded {
  color: #a5acb8;
  font-size: 20px;
}

.event-extra-list .calendar-todo-preview {
  align-items: stretch;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.project-scope-checklist-slot {
  display: block;
  min-width: 0;
}

.project-scope-checklist-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: #111827;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.project-scope-checklist-button:hover,
.project-scope-checklist-button:focus-visible {
  border-color: #9ec3ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.project-scope-checklist-button > span {
  font-size: 14px;
  font-weight: 700;
}

.project-scope-checklist-button > strong {
  color: #8c8f96;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.project-scope-checklist-button > .material-symbols-rounded,
.project-scope-checklist-button > i.material-symbols-rounded {
  color: #a5acb8;
  font-size: 20px;
  font-style: normal;
}

.project-scope-checklist-button.calendar-todo-preview {
  align-items: stretch;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.calendar-todo-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  min-height: 48px;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #edf0f4;
}

.calendar-todo-preview-head > span {
  color: #111827;
  font-size: 14px;
  font-weight: 500;
}

.calendar-todo-preview-head strong {
  color: #8c8f96;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.calendar-todo-preview-head .material-symbols-rounded {
  color: #a5acb8;
}

.calendar-todo-preview-items {
  display: grid;
  gap: 8px;
  padding: 14px 16px 14px;
}

.calendar-todo-preview-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 18px;
}

.calendar-todo-preview-checkbox {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 2px solid #9aa0a6;
  border-radius: 2px;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.calendar-todo-preview-item em {
  color: #111827;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.15;
}

.calendar-todo-preview-item.completed .calendar-todo-preview-checkbox {
  border-color: #8c8f96;
  background: #8c8f96;
}

.calendar-todo-preview-item.completed em {
  color: #8c8f96;
}

.job-scope-checklist-inline {
  display: grid;
  min-height: 198px;
}

.job-scope-checklist-editor {
  min-height: 0;
  gap: 0;
  padding: 8px 0 0;
}

.job-scope-checklist-edit-list {
  gap: 8px;
}

.job-scope-checklist-item-row,
.job-scope-checklist-item-row.completed {
  grid-template-columns: 18px 20px minmax(0, 1fr) 24px;
  min-height: 40px;
  padding: 0 14px;
}

.calendar-todo-item-row.job-scope-checklist-item-row.completed {
  grid-template-columns: 18px 20px minmax(0, 1fr) 24px;
}

.job-scope-checklist-item-row .calendar-todo-drag {
  display: inline-grid;
  place-items: center;
}

.job-scope-checklist-item-row .job-scope-checklist-text-input {
  box-sizing: border-box;
  min-height: 34px;
  padding: 7px 4px 5px;
}

.job-scope-checklist-add-row {
  margin: 16px 12px 8px;
}

.job-scope-checklist-head {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  border-radius: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  margin: 0;
  padding: 0 14px;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

button.job-scope-checklist-head {
  cursor: pointer;
}

button.job-scope-checklist-head:hover,
button.job-scope-checklist-head:focus-visible {
  background: #f8fbff;
  outline: none;
}

.job-scope-checklist-head > span {
  font-size: 14px;
  font-weight: 500;
  min-width: 0;
}

.job-scope-checklist-head strong {
  color: #8c8f96;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.job-scope-checklist-head .material-symbols-rounded {
  color: #a5acb8;
  font-size: 22px;
}

.job-scope-checklist-items {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px 16px 18px;
}

.job-scope-checklist-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  min-width: 0;
}

label.job-scope-checklist-item {
  cursor: pointer;
}

.job-scope-checklist-text-input {
  width: 100%;
  min-width: 0;
  min-height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.25;
  overflow: hidden;
  padding: 2px 4px;
  resize: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  field-sizing: content;
}

.job-scope-checklist-text-input:hover,
.job-scope-checklist-text-input:focus {
  background: #f3f6fa;
  outline: none;
}

.job-scope-checklist-checkbox {
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
  accent-color: #202124;
  flex: 0 0 auto;
}

.job-scope-checklist-box {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 2px solid #9aa0a6;
  border-radius: 2px;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.job-scope-checklist-item.completed {
  color: #8c8f96;
}

.job-scope-checklist-item.completed .job-scope-checklist-box {
  border-color: #8c8f96;
  background: #8c8f96;
}

.job-scope-checklist-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.event-extra-list .event-extra-input {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 40px 0 14px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.event-extra-list .event-clear-field-button {
  display: inline-grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 18px;
  padding: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 16px;
}

.event-extra-list .event-extra-input:last-child {
  border-bottom: 0;
}

.event-extra-list .event-extra-input::placeholder {
  color: #8c8f96;
  opacity: 1;
}

.event-extra-list .event-extra-input:focus,
.event-extra-list .event-extra-input:focus-visible {
  outline: none;
  outline-offset: 0;
  box-shadow: none;
}

.calendar-url-preview-slot[hidden] {
  display: none;
}

.calendar-url-preview-card {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 98px;
  padding: 12px 34px 12px 12px;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  animation: calendarSoftIn 180ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.calendar-url-preview-card.loading {
  opacity: 0.72;
}

.calendar-url-preview-info {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #9aa0a6;
  font-size: 16px;
  line-height: 1;
}

.calendar-url-preview-thumb {
  display: grid;
  place-items: center;
  width: 86px;
  height: 74px;
  overflow: hidden;
  border-radius: 4px;
  background: #f3f4f6;
  color: #9aa0a6;
}

.calendar-url-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.calendar-url-preview-thumb .material-symbols-rounded {
  font-size: 28px;
}

.calendar-url-preview-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.calendar-url-preview-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.calendar-url-preview-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #7b8492;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.calendar-url-preview-copy span {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  color: #8c8f96;
  font-size: 12px;
  line-height: 1.2;
}

.calendar-url-preview-copy span img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.calendar-url-preview-copy span .material-symbols-rounded {
  color: #8c8f96;
  font-size: 15px;
}

.calendar-url-preview-copy em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-todo-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(17, 24, 39, 0.52);
  animation: calendarModalBackdropIn 180ms ease both;
}

.calendar-discard-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.52);
  animation: calendarModalBackdropIn 180ms ease both;
}

.calendar-discard-modal {
  display: grid;
  grid-template-rows: auto auto auto;
  width: min(520px, calc(100vw - 40px));
  border-radius: 24px;
  gap: 12px;
  padding: 30px 24px 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  animation: calendarModalIn 200ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.calendar-discard-modal h2 {
  max-width: 420px;
  margin: 0;
  color: #202124;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.14;
}

.calendar-discard-modal p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.45;
}

.calendar-discard-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.calendar-discard-cancel,
.calendar-discard-ok {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.calendar-discard-cancel:active,
.calendar-discard-ok:active {
  transform: scale(0.98);
}

.calendar-discard-cancel {
  background: transparent;
  color: #8c8f96;
}

.calendar-discard-ok {
  background: #ef3b3f;
  color: #fff;
}

.calendar-todo-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(520px, calc(100vw - 40px));
  min-height: min(500px, calc(100vh - 96px));
  max-height: min(620px, calc(100vh - 64px));
  border-radius: 24px;
  padding: 30px 24px 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  animation: calendarModalIn 210ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.calendar-todo-modal h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
}

.calendar-todo-scroll-area {
  min-height: 0;
  margin: 34px 0 18px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 8px 0 0;
  scrollbar-gutter: stable;
}

.calendar-todo-list {
  display: grid;
  gap: 6px;
  margin-top: 0;
  min-width: 0;
  width: 100%;
}

.calendar-todo-completed-list {
  margin-top: 10px;
}

.calendar-todo-completed-list[hidden] {
  display: none;
}

.calendar-todo-item-row {
  display: grid;
  grid-template-columns: 18px 20px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 40px;
  border-radius: 10px;
  padding: 0 14px;
  background: #f5f5f5;
  transform-origin: center;
  will-change: transform;
}

.calendar-todo-item-row.completed {
  grid-template-columns: 20px minmax(0, 1fr) 24px;
  background: #f7f7f8;
}

.calendar-todo-item-row.dragging {
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  opacity: 0.78;
}

.calendar-todo-drag {
  color: #b8bec6;
  cursor: grab;
  font-size: 18px;
  outline: none;
  user-select: none;
}

.calendar-todo-drag:active {
  cursor: grabbing;
}

.calendar-todo-drag:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.22);
}

.calendar-todo-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #202124;
}

.calendar-todo-item-row.completed .calendar-todo-checkbox {
  accent-color: #8c8f96;
}

.calendar-todo-item-input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 14px;
  outline: 0;
}

.calendar-todo-item-row.completed .calendar-todo-item-input {
  color: #8c8f96;
}

.calendar-todo-item-input::placeholder {
  color: #8b95a1;
  opacity: 1;
}

.calendar-todo-remove {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: #9aa0a6;
  font-size: 17px;
}

.calendar-todo-remove:hover,
.calendar-todo-remove:focus-visible {
  background: #f3f4f6;
  color: #6b7280;
  outline: none;
}

.calendar-todo-add-row {
  align-self: start;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 16px 12px 0;
  border: 0;
  background: transparent;
  color: #8b95a1;
  font-size: 14px;
  text-align: left;
}

.calendar-todo-add-row:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.calendar-todo-add-row .material-symbols-rounded {
  color: #a5acb8;
  font-size: 22px;
}

.calendar-todo-completed-block {
  display: grid;
  margin: 18px 0 0;
  border-top: 1px solid #edf0f4;
  padding: 14px 0 0;
  min-width: 0;
}

.calendar-todo-completed-block[hidden] {
  display: none;
}

.calendar-todo-completed-toggle {
  display: inline-grid;
  grid-template-columns: 24px auto;
  align-items: center;
  justify-self: start;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #8c8f96;
  font-size: 14px;
  text-align: left;
}

.calendar-todo-completed-toggle .material-symbols-rounded {
  color: #8c8f96;
  font-size: 18px;
}

.calendar-note-modal {
  min-height: min(384px, calc(100vh - 96px));
}

.calendar-note-scroll-area {
  min-height: 0;
  margin: 42px 0 18px;
  overflow: hidden;
}

.calendar-note-field {
  display: block;
  height: 100%;
  min-height: 0;
}

.calendar-note-field textarea {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 180px;
  border: 0;
  padding: 0 12px;
  background: transparent;
  color: #111827;
  font-size: 14px;
  line-height: 1.45;
  outline: 0;
  overflow-y: auto;
  resize: none;
}

.calendar-note-field textarea::placeholder {
  color: #8b95a1;
  opacity: 1;
}

.calendar-todo-ok-button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: #202124;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.event-footer-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  margin: auto -20px -28px;
  padding: 12px 20px 18px;
  border-top: 1px solid #e5e7eb;
  background: rgba(247, 247, 248, 0.96);
  box-shadow: 0 -10px 22px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.event-save-bottom-button {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.event-save-bottom-button:active {
  transform: scale(0.992);
}

.ghost-button.danger {
  color: var(--red);
}

.mini-header h2,
.surface h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}

.mini-header {
  margin-bottom: 15px;
  gap: 8px;
}

.mini-header h2 {
  white-space: nowrap;
}

.mini-header .compact-button {
  margin-left: auto;
}

.stack {
  display: grid;
  gap: 9px;
}

.compact {
  gap: 8px;
}

.list-card {
  position: relative;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.list-card.active,
.availability-row.selected {
  border-color: #bfdbfe;
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.list-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.list-card span,
.list-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.staff-list {
  display: grid;
  gap: 9px;
}

.staff-row {
  display: grid;
  grid-template-columns: 34px 1fr 78px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

button.staff-row {
  width: 100%;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

button.staff-row:hover {
  background: var(--surface-muted);
}

.availability-row.has-conflict {
  border-color: #fecaca;
  background: #fff7f7;
}

.availability-row.is-free {
  border-color: #bbf7d0;
}

.staff-row .avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.status {
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.status.conflict {
  color: var(--red);
}

.dispatch-builder-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--surface-muted);
}

.dispatch-builder-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.dispatch-builder-head strong,
.dispatch-builder-head span {
  display: block;
}

.dispatch-builder-head span,
.crew-slots span,
.crew-slots small,
.dispatch-warning span {
  color: var(--muted);
  font-size: 12px;
}

.crew-slots {
  display: grid;
  gap: 8px;
}

.crew-slots div,
.dispatch-warning {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.crew-slots strong,
.dispatch-warning strong {
  font-size: 13px;
}

.dispatch-warning {
  border-color: #fed7aa;
  background: #fffdf7;
}

.dispatch-warning.red {
  border-color: #fecaca;
  background: #fff7f7;
}

.job-priority {
  position: absolute;
  top: 20px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid #f7c56b;
  background: #fff6df;
  color: #c77700;
  font-size: 12px;
  font-weight: 600;
}

.job-priority.low {
  border-color: #afe0bc;
  background: #e9f8ef;
  color: #209458;
}

.job-priority.high {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.email-card {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 84px;
  gap: 9px;
  align-items: start;
  padding: 7px 0;
  font-size: 12px;
}

.email-card::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--amber);
}

.email-card.muted-dot::before {
  background: #9ca3af;
}

.email-card strong,
.email-card span,
.email-card small {
  display: block;
  line-height: 1.35;
}

.email-card small {
  color: var(--text);
  text-align: right;
}

.status.available {
  color: var(--green);
}

.status.booked {
  color: var(--amber);
}

.page-wrap {
  max-width: 1640px;
  margin-inline: auto;
}

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

.inventory-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.metric,
.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.metric {
  padding: 18px 18px 16px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin: 8px 0 3px;
  font-size: var(--fs-metric);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.ops-alert-strip {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-priority {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 4px solid var(--blue);
  min-height: 88px;
}

.dashboard-priority.red {
  border-left-color: var(--red);
}

.dashboard-priority.amber {
  border-left-color: var(--amber);
}

.dashboard-priority.green {
  border-left-color: var(--green);
}

.dashboard-priority > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-priority span,
.dashboard-priority small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-priority span {
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-priority strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.dashboard-priority em {
  justify-self: end;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-priority-badge.red {
  background: #fee2e2;
  color: #991b1b;
}

.dashboard-priority-badge.amber {
  background: #fef3c7;
  color: #92400e;
}

.dashboard-priority-badge.green {
  background: #dcfce7;
  color: #166534;
}

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

.ops-alert,
.today-job-card,
.gap-card,
.equipment-issue,
.attention-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.ops-alert {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 12px;
  border-left: 4px solid var(--blue);
}

.ops-alert.red,
.metric-button.red,
.today-job-card.red,
.gap-card.red,
.equipment-issue.red,
.attention-card.red {
  border-left-color: var(--red);
}

.ops-alert.amber,
.metric-button.amber,
.today-job-card.amber,
.gap-card.amber,
.equipment-issue.amber,
.attention-card.amber {
  border-left-color: var(--amber);
}

.ops-alert.green,
.metric-button.green,
.metric.green,
.today-job-card.green,
.gap-card.green,
.equipment-issue.green,
.attention-card.green {
  border-left-color: var(--green);
}

.metric.amber {
  border-left: 4px solid var(--amber);
}

.metric.red {
  border-left: 4px solid var(--red);
}

.metric.green {
  border-left: 4px solid var(--green);
}

.time-attendance-header {
  align-items: flex-start;
  gap: 16px;
}

.time-attendance-header .section-kicker {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.time-attendance-summary {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
}

.time-attendance-day-card,
.time-attendance-stat {
  display: grid;
  align-content: center;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.time-attendance-day-card {
  gap: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.time-attendance-day-card .status-chip {
  width: fit-content;
}

.time-attendance-day-card strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.time-attendance-day-card small,
.time-attendance-stat small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.time-attendance-stat {
  border-left: 4px solid #cbd5e1;
}

.time-attendance-stat.green {
  border-left-color: var(--green);
}

.time-attendance-stat.amber {
  border-left-color: var(--amber);
}

.time-attendance-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.time-attendance-stat strong {
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.time-roster-panel {
  padding: 18px;
}

.attendance-date-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.attendance-date-filter .icon-only {
  width: 38px;
  min-width: 38px;
  padding: 0;
  font-size: 18px;
}

.attendance-date-input {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.attendance-date-input .input {
  width: 162px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.attendance-date-input .shared-date-picker-field > .input {
  padding-right: 34px;
}

.attendance-date-input .shared-date-picker-toggle {
  right: 0;
  width: 28px;
  height: 28px;
}

.attendance-calendar-button {
  width: 28px;
  height: 28px;
  margin-left: 4px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.attendance-calendar-button:hover,
.attendance-calendar-button[aria-expanded="true"] {
  background: #e8f1ff;
  color: var(--blue);
}

.attendance-calendar-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 4px;
  z-index: 35;
  width: 286px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.attendance-calendar-popover[hidden] {
  display: none;
}

.attendance-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.attendance-calendar-header strong {
  font-size: 14px;
}

.attendance-calendar-weekdays,
.attendance-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.attendance-calendar-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.attendance-calendar-day {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.attendance-calendar-day:hover {
  border-color: #bfdbfe;
  background: #f0f7ff;
}

.attendance-calendar-day.muted {
  color: var(--muted);
}

.attendance-calendar-day.today {
  border-color: var(--blue);
}

.attendance-calendar-day.selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.time-roster-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.time-roster-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 0.9fr) minmax(240px, 1.1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.time-roster-row:hover {
  border-color: #bfdbfe;
  background: var(--surface-muted);
}

.time-roster-person,
.time-roster-detail {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.time-roster-row strong,
.time-roster-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-roster-row strong {
  color: var(--ink);
  font-size: 14px;
}

.time-roster-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.time-roster-detail small {
  color: var(--blue);
  font-weight: 800;
}

@media (max-width: 980px) {
  .time-attendance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-roster-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .time-roster-detail {
    grid-column: 2 / -1;
  }
}

@media (max-width: 760px) {
  .time-attendance-summary {
    grid-template-columns: 1fr;
  }

  .attendance-date-filter {
    width: 100%;
    flex-wrap: wrap;
  }

  .attendance-date-input {
    flex: 1;
    min-width: 180px;
  }

  .attendance-date-input .input {
    width: 100%;
  }
}

.attendance-override-form .form-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ops-alert:hover,
.metric-button:hover,
.today-job-card:hover,
.gap-card:hover,
.equipment-issue:hover,
.attention-card:hover {
  border-color: #bfdbfe;
  background: var(--surface-muted);
}

.ops-alert span,
.ops-alert small,
.muted-label,
.today-job-card small,
.today-job-card em,
.gap-card span,
.equipment-issue span,
.attention-card span,
.attention-card small,
.attention-card em,
.revenue-row span,
.revenue-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ops-alert span,
.attention-card span,
.revenue-row span {
  font-weight: 800;
  text-transform: uppercase;
}

.ops-alert strong {
  font-size: 18px;
  line-height: 1.2;
}

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

.dashboard-owner-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-metrics .metric {
  min-height: 104px;
  border-left: 4px solid var(--blue);
}

.dashboard-metrics .metric strong {
  font-size: 30px;
}

.dashboard-owner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.dashboard-secondary-grid {
  grid-template-columns: minmax(240px, 0.8fr) minmax(420px, 1.6fr) minmax(260px, 0.9fr);
}

.dashboard-secondary-stack {
  display: grid;
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.dashboard-core-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.dashboard-side-panel {
  display: grid;
  gap: 16px;
  align-items: start;
}

.dashboard-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dashboard-card {
  min-height: 0;
}

.dashboard-card-wide {
  grid-column: auto;
}

#dashboard-view .page-wrap {
  max-width: 1320px;
}

.dashboard-page-title {
  margin-bottom: 12px;
}

.dashboard-page-title h1 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: 0;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

.dashboard-main-column,
.dashboard-side-panel {
  display: grid;
  gap: 14px;
  align-items: start;
}

.dashboard-workspace .surface {
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.dashboard-workspace .dashboard-card {
  padding: 16px;
}

.dashboard-workspace .mini-header {
  margin-bottom: 10px;
}

.dashboard-workspace .mini-header h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0;
}

.dashboard-workspace .muted-label {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.dashboard-priority {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  min-height: 96px;
  margin-bottom: 0;
  padding: 16px;
}

.dashboard-priority > div:first-child {
  grid-row: 1 / span 2;
}

.dashboard-priority span {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}

.dashboard-priority strong {
  font-size: 20px;
}

.dashboard-priority small {
  font-size: 12px;
}

.dashboard-priority em {
  align-self: start;
  justify-self: end;
  max-width: 300px;
  min-height: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-priority-actions {
  align-self: end;
}

.dashboard-secondary-panel {
  margin-top: 16px;
}

.dashboard-secondary-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.dashboard-secondary-panel summary::-webkit-details-marker {
  display: none;
}

.dashboard-secondary-panel summary::after {
  content: "expand_more";
  font-family: "Material Symbols Rounded";
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
}

.dashboard-secondary-panel[open] summary::after {
  content: "expand_less";
}

.dashboard-secondary-panel summary em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-secondary-panel .dashboard-owner-grid {
  margin-top: 14px;
}

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

.dashboard-glance-tile {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.dashboard-glance-tile:hover,
.dashboard-glance-tile:focus-visible,
.dashboard-compact-row:hover,
.dashboard-compact-row:focus-visible,
.dashboard-signin-row:hover,
.dashboard-signin-row:focus-visible,
.dashboard-full-link:hover,
.dashboard-full-link:focus-visible {
  border-color: #c8d8ed;
  background: #f8fbff;
  outline: none;
}

.dashboard-glance-tile > .material-symbols-rounded {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 22px;
}

.dashboard-glance-tile.amber > .material-symbols-rounded {
  background: #fff3da;
  color: var(--amber);
}

.dashboard-glance-tile.green > .material-symbols-rounded {
  background: #e7f7ee;
  color: var(--green);
}

.dashboard-glance-tile.red > .material-symbols-rounded {
  background: #fdeced;
  color: var(--red);
}

.dashboard-glance-tile strong {
  font-size: 22px;
  line-height: 1;
}

.dashboard-glance-tile small,
.dashboard-glance-tile em {
  display: block;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.3;
}

.dashboard-glance-tile small {
  margin-top: 7px;
  color: var(--text);
  font-weight: 800;
}

.dashboard-compact-list,
.dashboard-signin-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-compact-row,
.dashboard-signin-row,
.dashboard-full-link {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.dashboard-compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
}

.dashboard-compact-row span,
.dashboard-compact-row strong,
.dashboard-compact-row small {
  display: block;
  min-width: 0;
}

.dashboard-compact-row strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-compact-row small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-compact-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-signin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 9px 12px;
}

.dashboard-signin-row span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-full-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-full-link:last-child,
.dashboard-compact-row:last-child,
.dashboard-signin-row:last-child {
  border-bottom: 0;
}

.dashboard-full-link.compact {
  min-height: 44px;
}

.dashboard-full-link .material-symbols-rounded {
  font-size: 18px;
}

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

.onboarding-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.onboarding-row.complete {
  border-left-color: var(--green);
  background: #f8fffb;
}

.onboarding-step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.onboarding-row.complete .onboarding-step {
  background: #dcfce7;
  color: #166534;
}

.onboarding-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.onboarding-copy strong,
.onboarding-copy small {
  display: block;
  overflow-wrap: anywhere;
}

.onboarding-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-command-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.32fr);
  gap: 18px;
  align-items: start;
}

.dashboard-side-stack,
.dashboard-stack,
.today-job-list,
.attention-list,
.revenue-status {
  display: grid;
  gap: 10px;
}

.dashboard-primary .empty-state {
  min-height: 154px;
  justify-items: start;
  place-content: center start;
  text-align: left;
}

.dashboard-primary .empty-state > div {
  justify-items: start;
}

.dashboard-primary .empty-actions {
  justify-content: flex-start;
}

.today-job-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  border-left: 4px solid var(--blue);
}

.today-job-time {
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
}

.today-job-time strong {
  color: var(--blue-dark);
  font-size: 16px;
  line-height: 1.15;
  white-space: nowrap;
}

.today-job-time small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.today-job-card span,
.today-job-card small,
.today-job-card em {
  display: block;
}

.today-job-card span {
  font-weight: 800;
}

.today-job-card em,
.attention-card em {
  margin-top: 3px;
  font-style: normal;
  font-weight: 700;
}

#dashboard-view .today-job-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

#dashboard-view .today-job-card {
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 76px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 0;
  box-shadow: none;
}

#dashboard-view .today-job-card:last-child {
  border-bottom: 0;
}

#dashboard-view .today-job-card.red {
  border-left-color: var(--red);
}

#dashboard-view .today-job-card.amber {
  border-left-color: var(--amber);
}

#dashboard-view .today-job-card.green {
  border-left-color: var(--green);
}

#dashboard-view .today-job-card > div {
  min-width: 0;
}

#dashboard-view .today-job-card > div span,
#dashboard-view .today-job-card > div small,
#dashboard-view .today-job-card > div em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-view .today-job-card > div span {
  font-size: 13px;
  line-height: 1.25;
}

#dashboard-view .today-job-card > div small,
#dashboard-view .today-job-card > div em {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

#dashboard-view .today-job-card .status-chip {
  justify-self: end;
}

#dashboard-view .dashboard-primary > .dashboard-full-link {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gap-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border-left: 4px solid var(--blue);
}

.gap-count {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.gap-count strong,
.gap-count span,
.gap-card strong,
.gap-card span,
.equipment-issue strong,
.equipment-issue span,
.attention-card strong,
.attention-card span,
.attention-card small,
.attention-card em {
  display: block;
}

.gap-count strong {
  font-size: 22px;
}

.equipment-issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 60px;
  padding: 10px;
  border-left: 4px solid var(--blue);
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

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

.dashboard-action-card .attention-list {
  grid-template-columns: 1fr;
}

.attention-card {
  display: grid;
  gap: 4px;
  min-height: 104px;
  padding: 12px;
  border-left: 4px solid var(--blue);
}

.dashboard-action-card .attention-card {
  min-height: 88px;
}

.dashboard-view-all {
  width: 100%;
  justify-content: center;
}

.dashboard-stat-card {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.dashboard-stat-card.green {
  border-left-color: var(--green);
}

.dashboard-stat-card.amber {
  border-left-color: var(--amber);
}

.dashboard-stat-card.red {
  border-left-color: var(--red);
}

.dashboard-stat-card span,
.dashboard-stat-card small,
.dashboard-stat-card em {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-stat-card span {
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-stat-card strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}

.dashboard-stat-card em {
  font-style: normal;
  font-weight: 800;
}

.dashboard-stack .attention-card {
  min-height: 82px;
}

.dashboard-stack .attention-card strong,
.dashboard-stack .attention-card small,
.dashboard-stack .attention-card em,
.attention-list .attention-card strong,
.attention-list .attention-card small,
.attention-list .attention-card em {
  overflow-wrap: anywhere;
}

.revenue-row {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
}

.revenue-row.green {
  border-left-color: var(--green);
}

.revenue-row.amber {
  border-left-color: var(--amber);
}

.revenue-row strong {
  display: block;
  margin: 2px 0;
  font-size: 22px;
}

.revenue-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf8;
}

.revenue-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.revenue-row.green .revenue-bar span {
  background: var(--green);
}

.revenue-row.amber .revenue-bar span {
  background: var(--amber);
}

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

.marketing-grid {
  grid-template-columns: 0.9fr 1fr 0.75fr;
}

.surface {
  padding: 20px;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 16px;
}

.toolbar-row .filter-row {
  margin: 0;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  min-height: 24px;
  padding: 2px 10px;
  border: 1px solid var(--chip-neutral-line, #d9e3f0);
  border-radius: 999px;
  background: var(--chip-neutral-bg, #eef4fb);
  color: var(--chip-neutral-fg, #243049);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.status-chip.green {
  border-color: var(--chip-green-line, #c5ecd4);
  background: var(--chip-green-bg, #e7f7ee);
  color: var(--chip-green-fg, #157f3c);
}

.status-chip.amber {
  border-color: var(--chip-amber-line, #f8dfac);
  background: var(--chip-amber-bg, #fff3da);
  color: var(--chip-amber-fg, #8a4708);
}

.status-chip.red {
  border-color: var(--chip-red-line, #f6ccce);
  background: var(--chip-red-bg, #fdeced);
  color: var(--chip-red-fg, #ba1c1c);
}

.status-chip.grey {
  border-color: var(--chip-grey-line, #e2e7ee);
  background: var(--chip-grey-bg, #f1f4f8);
  color: var(--chip-grey-fg, #5b6677);
}

.staff-card-statuses {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.35rem;
}

.project-team-assignment-field {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.job-team-select-label {
  display: grid;
  gap: 0.4rem;
  margin: 0.8rem 0;
}

.job-team-select-label > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-chip.purple {
  border-color: #e9d5ff;
  background: #f5eaff;
  color: #9a35d4;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-menu {
  position: relative;
  display: inline-flex;
}

.toolbar-menu .jobs-actions-menu {
  left: auto;
  right: 0;
  width: 180px;
}

.toolbar-menu .clients-import-menu {
  left: auto;
  right: 0;
  width: 190px;
}

#jobs-view {
  background: #f8fafc;
}

#jobs-view .page-wrap {
  min-height: calc(100vh - 74px);
  padding: 30px 34px 34px;
}

#jobs-view .jobs-page-header {
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

#jobs-view .jobs-page-header > div:first-child {
  display: block;
}

#jobs-view .jobs-page-header .eyebrow {
  display: block;
  margin: 0 0 3px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

#jobs-view .jobs-page-header h1 {
  margin: 0;
  color: #080f2b;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.08;
}

#jobs-view .jobs-page-header span:not(.material-symbols-rounded) {
  display: block;
  margin-top: 6px;
  color: #647085;
  font-size: 15px;
  font-weight: 500;
}

#jobs-view .jobs-page-header .header-actions {
  gap: 18px;
  padding-top: 6px;
}

#jobs-view .jobs-page-header .ghost-button,
#jobs-view .jobs-page-header .primary-button {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

#jobs-view .jobs-page-header .ghost-button {
  border-color: #e6ebf3;
  background: #fff;
  color: #10234d;
}

#jobs-view .jobs-page-header .primary-button {
  border-color: #1769e8;
  background: #1769e8;
  color: #fff;
}

.jobs-ops-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.jobs-summary-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 28px;
  gap: 16px;
  align-items: center;
  min-height: 126px;
  padding: 22px;
  border: 1px solid #cfe0ff;
  border-left: 2px solid #1d72f3;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.06), rgba(255, 255, 255, 0.86));
  color: #111a35;
  text-align: left;
  box-shadow: 0 16px 30px rgba(30, 41, 59, 0.04);
}

.jobs-summary-card:hover,
.jobs-summary-card:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  outline-offset: 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.09), #fff);
}

.jobs-summary-card.active {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.3), 0 16px 30px rgba(30, 41, 59, 0.05);
}

.jobs-summary-card.green {
  border-color: #bbf2d8;
  border-left-color: #16a765;
  background: linear-gradient(90deg, rgba(22, 167, 101, 0.08), rgba(255, 255, 255, 0.9));
}

.jobs-summary-card.amber {
  border-color: #fde3af;
  border-left-color: #f59e0b;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.9));
}

.jobs-summary-card.red {
  border-color: #facbd2;
  border-left-color: #e23f53;
  background: linear-gradient(90deg, rgba(226, 63, 83, 0.08), rgba(255, 255, 255, 0.9));
}

.jobs-summary-copy,
.jobs-summary-copy em,
.jobs-summary-copy small {
  display: block;
  min-width: 0;
  color: #657289;
}

.jobs-summary-copy em {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
  text-transform: uppercase;
}

.jobs-summary-card strong {
  display: block;
  color: #07142f;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}

.jobs-summary-card small {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.25;
}

.jobs-summary-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #1d72f3;
  color: #fff;
  font-size: 29px;
  box-shadow: 0 12px 20px rgba(29, 114, 243, 0.22);
}

.jobs-summary-card.green .jobs-summary-icon {
  background: #16a765;
  box-shadow: 0 12px 20px rgba(22, 167, 101, 0.22);
}

.jobs-summary-card.amber .jobs-summary-icon {
  background: #f59e0b;
  box-shadow: 0 12px 20px rgba(245, 158, 11, 0.2);
}

.jobs-summary-card.red .jobs-summary-icon {
  background: #e23f53;
  box-shadow: 0 12px 20px rgba(226, 63, 83, 0.2);
}

.jobs-summary-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d72f3;
  font-size: 22px;
}

.jobs-summary-card.green .jobs-summary-arrow {
  background: rgba(22, 167, 101, 0.08);
  color: #16a765;
}

.jobs-summary-card.amber .jobs-summary-arrow {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
}

.jobs-summary-card.red .jobs-summary-arrow {
  background: rgba(226, 63, 83, 0.08);
  color: #e23f53;
}

.metric-button {
  display: block;
  width: 100%;
  color: var(--text);
  text-align: left;
}

.metric-button.active {
  border-color: #bfdbfe;
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.metric-button.danger.active {
  border-color: #fecaca;
  background: #fff7f7;
  box-shadow: inset 0 0 0 1px #fecaca;
}

.communications-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 16px;
}

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

.communication-pane.hidden {
  display: none;
}

.communication-detail {
  position: sticky;
  top: 92px;
}

.email-queue-list,
.sent-history,
.detail-stack {
  display: grid;
  gap: 10px;
}

.email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  width: 100%;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.email-row:hover,
.email-row.active,
.template-list button.active {
  border-color: #bfdbfe;
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.email-row strong,
.email-row span,
.email-row small,
.email-row-meta small,
.email-row-title strong,
.email-row-title em,
.project-email-summary strong,
.project-email-summary span {
  display: block;
}

.email-row span,
.email-row small,
.email-row-meta small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.email-row span {
  margin-top: 3px;
}

.email-row-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.email-row-title em {
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.email-row-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.empty-state {
  display: grid;
  gap: 14px;
  min-height: 110px;
  padding: 26px 22px;
  place-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(130% 120% at 50% -10%, rgba(255, 213, 29, 0.07), transparent 55%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  color: var(--muted);
  text-align: center;
}

.empty-state > div {
  display: grid;
  gap: 5px;
  justify-items: center;
  max-width: 520px;
}

.empty-state small {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.empty-state strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.empty-state span:not(.material-symbols-rounded) {
  max-width: 48ch;
  font-size: 13px;
  line-height: 1.45;
}

.empty-icon {
  display: inline-grid;
  width: 60px;
  height: 60px;
  margin-bottom: 2px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 32%, var(--surface), var(--surface-soft));
  color: var(--blue);
  font-size: 30px;
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.empty-state-large {
  min-height: 200px;
  padding: 28px 22px;
}

.empty-page-surface {
  min-height: min(38vh, 360px);
  display: grid;
  align-items: center;
}

.table-empty-row {
  grid-column: 1 / -1;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.table-empty-row .empty-state {
  min-height: 150px;
  border-style: solid;
}

.detail-title-row,
.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-title-row h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

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

.email-admin-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.email-admin-strip span,
.automation-checks div,
.job-history-card {
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.email-admin-strip span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
}

.email-admin-strip strong {
  color: var(--text);
  font-size: 12px;
}

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

.automation-checks div {
  display: grid;
  gap: 4px;
}

.automation-checks span,
.job-history-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.message-context div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.message-context span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-context strong,
.message-context small {
  overflow-wrap: anywhere;
}

.message-context small {
  color: var(--muted);
  font-size: 11px;
}

.client-preview {
  background: var(--surface);
}

.preview-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.preview-header span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.variable-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variable-row span {
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

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

.history-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr) 110px auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.history-row span,
.history-row small {
  color: var(--muted);
}

.template-list button small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.job-history-card {
  display: grid;
  gap: 8px;
}

.job-history-card .mini-header {
  margin-bottom: 0;
}

.job-history-card span {
  display: block;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.compact-empty {
  min-height: 74px;
  padding: 14px;
}

.compact-empty .empty-icon {
  width: 34px;
  height: 34px;
  font-size: 20px;
}

.compact-empty .empty-actions .compact-button {
  min-height: 34px;
}

.project-email-summary {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--surface-muted);
}

.project-email-summary span {
  color: #1e3a8a;
  font-size: 12px;
}

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

.settings-wide {
  grid-column: 1 / -1;
}

.settings-menu-card {
  padding: 14px;
}

.settings-menu-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.settings-menu-list button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.settings-menu-list button:hover {
  border-color: #bfdbfe;
  background: var(--surface-muted);
}

.settings-menu-list button.active {
  border-color: var(--blue);
  background: var(--surface-muted);
  box-shadow: inset 3px 0 0 var(--blue);
}

.settings-menu-list .icon {
  grid-row: span 2;
  color: var(--blue);
}

.settings-menu-list strong,
.settings-menu-list em {
  display: block;
}

.settings-menu-list strong {
  font-size: var(--fs-body);
  line-height: var(--lh-tight);
}

.settings-menu-list em {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-style: normal;
  line-height: 1.35;
}

.settings-tab-panels {
  display: grid;
}

.settings-panel[hidden] {
  display: none;
}

.settings-save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.settings-save-bar[hidden] {
  display: none;
}

.settings-save-bar span {
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 700;
}

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

.settings-subheader {
  margin-top: 18px;
}

.settings-alert-metrics {
  margin-bottom: 14px;
}

.settings-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.settings-split h3 {
  margin: 0 0 10px;
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
}

.settings-section-note {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.mini-metric {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.mini-metric strong,
.mini-metric span {
  display: block;
}

.mini-metric strong {
  font-size: 20px;
}

.mini-metric span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 70px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.setting-row strong,
.setting-row span {
  display: block;
}

.setting-row div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

button.timeline-item:hover {
  background: var(--surface-muted);
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
  border-bottom-color: transparent;
}

.sync-card {
  display: grid;
  gap: 8px;
  margin: 14px 0 22px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.sync-card span,
.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.media-grid,
.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.media-grid div,
.dropzone {
  min-height: 92px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-muted);
}

.table {
  display: grid;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 150px 150px 130px 130px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-size: 14px;
}

.table-row.header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

button.table-row:hover {
  background: var(--surface-muted);
}

.compact-table .table-row {
  grid-template-columns: 1fr 140px 1.4fr 130px 80px;
}

.jobs-register {
  overflow: hidden;
  padding: 0;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.jobs-register .toolbar-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  min-height: 64px;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #e7edf5;
  background: #fbfcfe;
}

.jobs-register .filter-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  width: auto;
  margin: 0;
  padding: 3px;
  border: 1px solid #e4e9f2;
  border-radius: 10px;
  background: #f5f7fb;
}

.jobs-register .chip {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344157;
  font-size: 11px;
  font-weight: 750;
  box-shadow: none;
}

.jobs-register .chip.active {
  background: #e8f1ff;
  color: #145fd6;
  box-shadow: inset 0 0 0 1px rgba(20, 95, 214, 0.3);
}

.jobs-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.jobs-register .toolbar-menu .icon-button.small {
  width: 32px;
  height: 32px;
  border-color: #e4e9f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.jobs-table {
  overflow-x: hidden;
}

.jobs-table .table-row {
  position: relative;
  grid-template-columns: minmax(220px, 1.15fr) minmax(225px, 1.18fr) minmax(70px, 0.42fr) minmax(155px, 0.72fr) minmax(108px, 0.5fr) minmax(86px, 0.42fr) 18px;
  gap: 14px;
  min-height: 74px;
  padding: 0 20px;
  border-bottom-color: #e7edf5;
  min-width: 0;
  background: #fff;
}

.jobs-table .table-row.header {
  min-height: 44px;
  background: #f8fafc;
  color: #53617a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.jobs-table .table-row.header > span {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.job-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.job-sort-button:hover,
.job-sort-button:focus-visible {
  color: #145fd6;
}

.job-sort-button:focus-visible {
  outline: 2px solid rgba(20, 95, 214, 0.24);
  outline-offset: 3px;
  border-radius: 6px;
}

.job-sort-button.active {
  color: #145fd6;
}

.job-sort-indicator {
  color: #8a94a7;
  font-size: 16px;
  font-weight: 400;
}

.job-sort-button.active .job-sort-indicator {
  color: #145fd6;
}

.jobs-table .job-action-row {
  align-items: center;
  cursor: pointer;
}

.jobs-table .job-action-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: #1d72f3;
  content: "";
}

.jobs-table .job-action-row.green::before {
  background: #16a765;
}

.jobs-table .job-action-row.amber::before {
  background: #f59e0b;
}

.jobs-table .job-action-row.red::before {
  background: #e23f53;
}

.jobs-table .job-action-row.purple::before {
  background: #b844f2;
}

.jobs-table .job-action-row.grey::before {
  background: #94a3b8;
}

.jobs-table .job-action-row.archived {
  background: #f8fafc;
}

.jobs-table .job-action-row:hover,
.jobs-table .job-action-row:focus-visible {
  outline: 2px solid rgba(29, 114, 243, 0.16);
  outline-offset: -2px;
  background: #fbfdff;
}

.job-project-cell,
.job-client-cell,
.job-value-cell,
.job-schedule-cell,
.job-ready-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.job-project-cell {
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.job-project-copy {
  min-width: 0;
}

.job-select-control {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.job-select-checkbox {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.job-select-box {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid #c8d2e1;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  pointer-events: none;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.job-select-box::after {
  width: 10px;
  height: 6px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  opacity: 0;
  transform: rotate(-45deg) translate(1px, -1px);
  content: "";
}

.job-select-control:hover .job-select-box {
  border-color: #7fa7e8;
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 4px rgba(29, 114, 243, 0.08);
}

.job-select-checkbox:focus-visible + .job-select-box {
  outline: 2px solid rgba(29, 114, 243, 0.28);
  outline-offset: 2px;
}

.job-select-checkbox:checked + .job-select-box {
  border-color: #1769e8;
  background: #1769e8;
  box-shadow: none;
}

.job-select-checkbox:checked + .job-select-box::after {
  opacity: 1;
}

.job-project-cell strong,
.job-client-cell strong,
.job-value-cell strong,
.job-schedule-cell strong {
  overflow: hidden;
  color: #0c1633;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-project-cell small,
.job-client-cell small,
.job-value-cell small,
.job-schedule-cell small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: #647085;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-schedule-cell strong {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.job-value-cell small {
  color: #8a94a7;
}

.job-ready-cell {
  align-content: center;
  gap: 7px;
  max-width: 90px;
}

.job-ready-cell strong {
  color: #0c1633;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}

.ready-meter {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebf1;
}

.ready-meter i {
  display: block;
  width: var(--ready);
  height: 100%;
  border-radius: inherit;
  background: #1d72f3;
}

.job-action-row:has(.status-chip.green) .ready-meter i {
  background: #16a765;
}

.job-action-row:has(.status-chip.amber) .ready-meter i {
  background: #f59e0b;
}

.job-action-row:has(.status-chip.red) .ready-meter i {
  background: #e23f53;
}

.job-action-row:has(.status-chip.purple) .ready-meter i {
  background: #b844f2;
}

.job-stage-chip {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
}

.job-row-chevron {
  justify-self: end;
  color: #33425b;
  font-size: 24px;
}

.danger-icon-button {
  color: #b91c1c;
}

.assign-icon-button {
  color: var(--blue);
}

.files-table .table-row {
  grid-template-columns: 1.4fr 1fr 1fr 120px 120px;
}

.staff-matrix .table-row {
  grid-template-columns: 1.1fr 110px 110px 1.1fr 1.2fr 100px;
}

.client-import-table .table-row,
.equipment-table .table-row,
.integration-table .table-row {
  grid-template-columns: 1.25fr 130px 1.3fr 110px;
}

.equipment-asset-table .table-row {
  grid-template-columns: minmax(180px, 1.25fr) minmax(140px, 0.9fr) minmax(190px, 1.15fr) minmax(150px, 0.9fr) 110px 130px;
}

.vehicle-table .table-row,
.inventory-table .table-row {
  grid-template-columns: 1.35fr 110px 1.1fr 130px 120px 130px;
}

.inventory-table {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.inventory-table .table-row {
  min-width: 700px;
  grid-template-columns: minmax(150px, 1.35fr) 130px minmax(130px, 1.1fr) 95px 95px 110px;
}

#equipment-view .panel-grid {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.equipment-asset-table .table-row strong,
.equipment-asset-table .table-row span,
.inventory-table .table-row strong,
.inventory-table .table-row span {
  min-width: 0;
}

.equipment-asset-table .table-row b,
.equipment-asset-table .table-row small,
.inventory-table .table-row b,
.inventory-table .table-row small {
  display: block;
}

.equipment-asset-table .table-row b,
.inventory-table .table-row b {
  color: var(--text);
  font-size: 13px;
}

.equipment-asset-table .table-row small,
.inventory-table .table-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.vehicle-table .table-row {
  grid-template-columns: minmax(170px, 1.25fr) minmax(135px, 0.9fr) minmax(190px, 1.25fr) minmax(170px, 1.1fr) 120px 140px;
}

.vehicle-table .table-row strong,
.vehicle-table .table-row span {
  min-width: 0;
}

.vehicle-table .table-row b,
.vehicle-table .table-row small {
  display: block;
}

.vehicle-table .table-row b {
  color: var(--text);
  font-size: 13px;
}

.vehicle-table .table-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.report-table .table-row {
  grid-template-columns: 1.15fr 1fr 110px 120px 1fr;
}

.client-crm-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.28fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.client-directory-layout {
  grid-template-columns: minmax(0, 1fr);
}

.client-directory {
  position: sticky;
  top: 92px;
}

.client-directory-full {
  position: static;
}

.client-directory-full .client-account-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: stretch;
}

.client-crm-side {
  grid-column: 2;
}

.client-crm-main,
.client-account-list,
.client-action-list,
.client-history-list,
.client-health-grid,
.client-crm-side {
  display: grid;
  gap: 10px;
}

.client-crm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
  margin-top: 16px;
}

.client-detail-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.client-detail-main > .surface,
.client-detail-main .client-crm-grid > .surface {
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.client-detail-main .mini-header {
  align-items: center;
  min-height: 32px;
  margin-bottom: 22px;
}

.client-detail-main .mini-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.client-detail-main .mini-header h2 .material-symbols-rounded {
  color: #334155;
  font-size: 24px;
}

.client-detail-backbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin-bottom: 10px;
}

.client-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #1e3a5f;
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.client-back-link .material-symbols-rounded {
  font-size: 20px;
  text-decoration: none;
}

.client-detail-hidden-edit {
  display: none;
}

.client-detail-main .client-import-table,
.client-detail-main .client-import-table .table-row,
.client-detail-main .import-summary {
  min-width: 0;
  max-width: 100%;
}

.client-detail-main .client-import-table .table-row {
  grid-template-columns: minmax(0, 1fr) minmax(86px, 0.7fr) minmax(0, 1fr) minmax(72px, 0.6fr);
}

.client-detail-main .client-import-table .table-row > *,
.client-detail-main .import-summary > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.clients-empty-workspace {
  min-height: 242px;
  padding: 0;
  border: 0;
  background: transparent;
}

.clients-empty-workspace > .empty-state {
  min-height: 166px;
}

.clients-directory-workspace {
  width: 100%;
  max-width: 100%;
  padding: 0;
  overflow-x: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.client-directory-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
  min-width: 0;
  width: 100%;
}

#clients-view .client-account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 20px;
  min-width: 0;
  min-height: 176px;
  border: 0;
  border-left: 4px solid var(--client-card-tone, var(--blue));
  border-radius: 8px;
  padding: 22px 24px 20px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

#clients-view .client-account-card:hover,
#clients-view .client-account-card:focus-visible {
  border-left-color: var(--client-card-tone, var(--blue));
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  outline: none;
  transform: translateY(-1px);
}

#clients-view .client-account-card.tone-blue {
  --client-card-tone: #1e73ff;
  --client-card-tone-soft: #e7f0ff;
}

#clients-view .client-account-card.tone-green {
  --client-card-tone: #20b76b;
  --client-card-tone-soft: #e5f8ef;
}

#clients-view .client-account-card.tone-purple {
  --client-card-tone: #7c3aed;
  --client-card-tone-soft: #f0e8ff;
}

#clients-view .client-account-card.tone-orange {
  --client-card-tone: #f97316;
  --client-card-tone-soft: #fff0e5;
}

.client-account-modern-head {
  display: grid;
  padding-bottom: 18px;
  border-bottom: 1px solid #e7eaf0;
}

.client-account-modern-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-account-modern-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.client-modern-metric {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.client-modern-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--client-card-tone-soft, #e7f0ff);
  color: var(--client-card-tone, var(--blue));
  font-size: 21px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.client-modern-metric strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.client-modern-metric small {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-account-card,
.client-action-card,
.client-health-card,
.client-priority-action,
.client-history-row,
.client-reminder-row {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.client-account-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  min-height: 118px;
  padding: 11px;
  text-decoration: none;
  align-items: stretch;
}

.client-account-card.active {
  border-color: #bfdbfe;
  border-left-color: var(--blue);
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.client-account-card.red,
.client-action-card.red,
.client-health-card.red,
.client-priority-action.red,
.client-reminder-row.red {
  border-left-color: var(--red);
}

.client-account-card.amber,
.client-action-card.amber,
.client-health-card.amber,
.client-priority-action.amber,
.client-reminder-row.amber {
  border-left-color: var(--amber);
}

.client-account-card.green,
.client-action-card.green,
.client-health-card.green,
.client-priority-action.green,
.client-reminder-row.green {
  border-left-color: var(--green);
}

.client-account-card:hover,
.client-action-card:hover,
.client-health-card:hover,
.client-priority-action:hover,
.client-history-row:hover,
.client-reminder-row:hover {
  border-color: #bfdbfe;
  background: var(--surface-muted);
}

.client-account-copy {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
}

.client-account-card strong,
.client-account-card span,
.client-account-card small,
.client-action-card strong,
.client-action-card span,
.client-priority-action strong,
.client-priority-action small,
.client-health-card strong,
.client-health-card span,
.client-history-row strong,
.client-history-row span,
.client-history-row small,
.client-reminder-row strong,
.client-reminder-row span {
  display: block;
}

.client-account-card strong,
.client-account-card span,
.client-account-card small {
  overflow-wrap: anywhere;
}

.client-account-card span,
.client-account-card small,
.client-action-card span,
.client-priority-action small,
.client-health-card span,
.client-history-row small,
.client-reminder-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

#clients-view .client-modern-icon {
  display: grid;
  color: var(--client-card-tone, var(--blue));
  font-size: 21px;
  line-height: 1;
}

#clients-view .client-modern-metric strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.1;
  overflow-wrap: normal;
}

#clients-view .client-modern-metric small {
  color: #667085;
  font-size: 13px;
  line-height: 1.15;
}

.client-profile-hero {
  display: grid;
  gap: 0;
  padding: 22px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.client-profile-head,
.client-profile-actions,
.client-contact-strip {
  display: flex;
  gap: 12px;
}

.client-profile-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
}

.client-profile-head h2 {
  margin: 0 0 7px;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
}

.client-profile-head p {
  margin: 0;
  color: var(--muted);
}

.client-profile-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 0;
}

.client-profile-actions .ghost-button,
.client-profile-actions .primary-button {
  min-height: 42px;
  min-width: 108px;
  border-radius: 6px;
  font-size: 14px;
}

.client-profile-actions .primary-button {
  min-width: 118px;
  background: #0f172a;
  color: #fff;
}

.client-profile-stats,
.client-contact-strip,
.client-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.client-account-overview-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.client-detail-field-grid,
.client-money-grid,
.client-sites-list {
  display: grid;
  gap: 0;
}

.client-detail-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 42px;
  row-gap: 22px;
}

.client-detail-field,
.client-money-card,
.client-site-card-display {
  min-width: 0;
}

.client-detail-field {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  align-items: start;
}

.client-detail-field > .material-symbols-rounded {
  color: #334155;
  font-size: 20px;
}

.client-detail-field em,
.client-money-card span,
.client-site-card-display span,
.client-site-card-display dt {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  font-style: normal;
}

.client-detail-field strong,
.client-money-card strong,
.client-site-card-display strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.client-money-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.client-money-card {
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) minmax(0, 1fr);
  align-content: start;
  align-items: center;
  gap: 5px;
  min-height: 54px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-left: 0;
}

.client-site-card-display {
  display: grid;
  gap: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.client-site-card-display dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.client-site-card-display dl > div {
  min-width: 0;
}

.client-site-card-display dt,
.client-site-card-display dd {
  margin: 0;
}

.client-site-card-display dd {
  margin-top: 3px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.client-profile-stats div {
  min-height: 68px;
  padding: 12px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.client-contact-strip span,
.client-health-card {
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.client-profile-stats {
  gap: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.client-profile-stats div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 14px;
}

.client-profile-stats div + div {
  border-left: 1px solid var(--line);
}

.client-profile-stats .material-symbols-rounded {
  grid-row: 1 / span 2;
  color: #2f6f91;
  font-size: 30px;
}

.client-profile-stats span,
.client-contact-strip span,
.client-contact-strip strong {
  display: block;
}

.client-profile-stats p,
.client-contact-strip span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.client-profile-stats strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  line-height: 1;
}

.client-priority-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px;
  border-left-width: 5px;
}

.client-priority-action strong {
  font-size: 15px;
}

.client-priority-action em {
  color: var(--blue-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.client-contact-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-action-card,
.client-reminder-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border-left-width: 4px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.client-action-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #10b981;
  font-size: 20px;
  line-height: 1;
}

.client-action-card.amber .client-action-icon {
  background: #eff6ff;
  color: #2563eb;
}

.client-action-card.red .client-action-icon {
  background: #fdf2f8;
  color: #c026d3;
}

.client-action-card.client-action-2 .client-action-icon {
  background: #eff6ff;
  color: #2563eb;
}

.client-action-card.client-action-3 .client-action-icon {
  background: #faf5ff;
  color: #c026d3;
}

.client-action-card em {
  color: var(--blue-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.client-health-card {
  display: grid;
  align-content: start;
  gap: 4px;
  border-left: 4px solid var(--blue);
}

.client-history-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 80px auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
}

.client-history-row em,
.client-reminder-row em {
  font-style: normal;
}

.import-summary,
.form-alert {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface-soft);
}

.import-summary {
  margin-bottom: 10px;
}

.import-summary.amber,
.form-alert {
  border-left-color: var(--amber);
}

.import-summary.green {
  border-left-color: var(--green);
}

.import-summary span,
.form-alert span,
.field-error {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.form-alert {
  background: #fff7ed;
  color: #7c2d12;
}

.form-alert[hidden] {
  display: none;
}

.resource-error-banner {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 0 0 16px;
  border-left-color: var(--red);
  background: #fef2f2;
  color: #7f1d1d;
}

.resource-error-banner strong {
  color: #7f1d1d;
}

.resource-error-banner span {
  color: #991b1b;
}

.client-extra-fields {
  display: grid;
  gap: 12px;
  padding: 4px 0 0;
  border-top: 1px solid #dbe5ef;
}

.client-extra-fields summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: var(--surface-muted);
  cursor: pointer;
  color: var(--ink);
  list-style: none;
}

.client-extra-fields summary::-webkit-details-marker {
  display: none;
}

.client-extra-fields summary > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.client-extra-fields summary strong {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.client-extra-fields summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.client-extra-fields summary .material-symbols-rounded {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 160ms ease;
}

.client-extra-fields[open] summary .material-symbols-rounded {
  transform: rotate(180deg);
}

.client-extra-fields[open] {
  padding-bottom: 0;
}

.client-extra-fields > .form-row:first-of-type {
  margin-top: 4px;
}

.client-extra-section {
  display: grid;
  gap: 10px;
}

.client-extra-section + .client-extra-section {
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.client-extra-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.client-site-section-head,
.client-site-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.client-add-site-button {
  justify-self: start;
}

.client-add-site-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.client-site-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: var(--surface-muted);
}

.client-site-card-head strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.client-site-card.using-client-details .field-label:has(input[name="siteAddress"], input[name="siteContact"]) {
  color: #718096;
}

.client-site-card.using-client-details input[name="siteAddress"],
.client-site-card.using-client-details input[name="siteContact"] {
  background: #eef4fb;
}

.client-same-site-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.client-same-site-checkbox input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.address-autocomplete-panel {
  position: absolute;
  z-index: 90;
  display: grid;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  animation: calendarPopoverIn 160ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: top center;
}

.address-autocomplete-panel[hidden] {
  display: none;
}

.address-autocomplete-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, transform 120ms ease;
}

.address-autocomplete-option:hover,
.address-autocomplete-option.active {
  background: var(--surface-muted);
}

.address-autocomplete-option:active {
  transform: scale(0.996);
}

.address-autocomplete-option strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-autocomplete-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.address-autocomplete-pin {
  color: #8c8f96;
  font-size: 20px;
}

.address-autocomplete-check {
  color: #202124;
  font-size: 20px;
}

.address-autocomplete-option:not(.selected) .address-autocomplete-check {
  color: #c2c7cf;
}

.address-autocomplete-option em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-form {
  gap: 16px;
}

.client-form-section {
  display: grid;
  gap: 12px;
}

.client-form-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.client-form .field-label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #52637a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.client-form .label-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.client-form .required-mark {
  color: var(--red);
  font-weight: 900;
}

.client-form .input {
  min-height: 40px;
  border-color: #d5dfeb;
  background: var(--surface);
}

.client-form .input.invalid,
.client-form .input[aria-invalid="true"] {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.client-form .modern-select-toggle.invalid,
.client-form .modern-select-toggle[aria-invalid="true"] {
  background: #fff7f7;
  box-shadow: inset 0 0 0 1px #f87171, 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.client-form .form-row.two-up {
  gap: 12px;
}

.client-form .client-identity-row {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 180px);
}

.client-form .detail-actions.full {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.client-form .field-error {
  min-height: 0;
  margin-top: 0;
}

.client-form .field-error:empty {
  display: none;
}

.client-form .field-error:not(:empty) {
  margin-top: 2px;
  color: var(--red);
  font-weight: 700;
}

.compact-textarea {
  min-height: 74px;
}

.field-error {
  display: block;
  min-height: 16px;
  margin-top: 5px;
  color: var(--red);
  font-weight: 700;
  text-transform: none;
}

.input.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.modern-select-toggle.invalid,
.shared-time-display.invalid {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.required-mark {
  color: var(--red);
  font-weight: 800;
}

.project-field-error {
  margin-bottom: 4px;
}

.team-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 14px;
}

.staff-page-wrap {
  display: grid;
  align-content: start;
  gap: 18px;
  padding-top: 28px;
}

.staff-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.staff-page-heading h1 {
  margin: 3px 0 6px;
  font-size: var(--fs-title);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

.staff-page-heading > p:last-child {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.staff-add-button {
  min-height: 42px;
  padding-inline: 16px;
  white-space: nowrap;
}

.staff-setup-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.staff-setup-metric {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.staff-setup-metric > div {
  display: grid;
  min-width: 0;
}

.staff-summary-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #eaf2ff;
  color: var(--blue);
}

.staff-summary-icon .material-symbols-rounded {
  font-size: 21px;
}

.staff-setup-metric span:not(.staff-summary-icon),
.staff-setup-metric small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.staff-setup-metric strong {
  margin: 2px 0 3px;
  font-size: 25px;
  line-height: 1;
}

.staff-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(340px, 0.8fr);
  align-items: start;
  gap: 16px;
}

.surface.staff-register-panel,
.surface.staff-teams-panel {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.staff-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.staff-panel-header h2 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.25;
}

.staff-panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.staff-panel-header .pill {
  margin-top: 1px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--muted);
  white-space: nowrap;
}

.staff-directory-table-head,
.staff-directory-row {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(130px, 0.85fr) minmax(170px, 0.95fr) 22px;
  align-items: center;
  gap: 16px;
}

.staff-directory-table-head {
  min-height: 38px;
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.site-staff-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.site-staff-grid .staff-directory-row {
  width: 100%;
  min-height: 80px;
  padding: 13px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.site-staff-grid .staff-directory-row:last-child {
  border-bottom: 0;
}

.site-staff-grid .staff-directory-row:hover {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.site-staff-grid .staff-directory-row:focus-visible {
  outline: none;
  box-shadow: inset 3px 0 0 var(--blue), inset 0 0 0 2px var(--focus-ring);
}

.staff-person-cell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-staff-grid .avatar {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.staff-person-copy,
.staff-directory-cell {
  display: grid;
  min-width: 0;
}

.staff-person-copy > strong,
.staff-directory-cell > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-person-copy > span,
.staff-directory-cell > span:not(.staff-card-statuses):not(.staff-mobile-label) {
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-directory-cell.muted > strong {
  color: var(--muted);
  font-weight: 700;
}

.staff-card-statuses {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.staff-card-statuses .status-chip {
  margin: 0;
}

.staff-mobile-label {
  display: none;
}

.staff-row-arrow {
  color: #94a3b8;
  font-size: 20px;
  transition: color 150ms ease, transform 150ms ease;
}

.staff-directory-row:hover .staff-row-arrow {
  color: var(--blue);
  transform: translateX(2px);
}

.staff-directory-empty {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 20px;
}

.staff-directory-empty > .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 20px;
}

.staff-directory-empty strong,
.staff-directory-empty p {
  margin: 0;
}

.staff-directory-empty p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

#staff-view #teamBoard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}

.staff-team-empty {
  display: grid;
  gap: 16px;
  padding: 4px 2px 2px;
}

.staff-team-empty-icon,
.staff-team-card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #eaf2ff;
  color: var(--blue);
}

.staff-team-empty-icon .material-symbols-rounded,
.staff-team-card-icon .material-symbols-rounded {
  font-size: 21px;
}

.staff-team-empty-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.staff-team-empty-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.staff-team-readiness {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.staff-team-readiness-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.staff-team-readiness-row:last-child {
  border-bottom: 0;
}

.staff-team-step {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.staff-team-step .material-symbols-rounded {
  font-size: 15px;
}

.staff-team-readiness-row.complete .staff-team-step {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #15803d;
}

.staff-team-readiness-row > span:last-child {
  display: grid;
  gap: 2px;
}

.staff-team-readiness-row strong {
  font-size: 12px;
}

.staff-team-readiness-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

:root[data-theme="dark"] .staff-summary-icon,
:root[data-theme="dark"] .staff-team-empty-icon,
:root[data-theme="dark"] .staff-team-card-icon,
:root[data-theme="dark"] .staff-directory-empty > .material-symbols-rounded {
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
}

:root[data-theme="dark"] .site-staff-grid .staff-directory-row:hover {
  background: rgba(96, 165, 250, 0.08);
}

:root[data-theme="dark"] .staff-team-readiness-row.complete .staff-team-step {
  border-color: rgba(34, 160, 107, 0.4);
  background: rgba(34, 160, 107, 0.18);
  color: #6fe0a6;
}

@media (max-width: 1180px) {
  .staff-management-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #staff-view #teamBoard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #staff-view #teamBoard > .staff-team-empty {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .staff-directory-table-head,
  .staff-directory-row {
    grid-template-columns: minmax(220px, 1.6fr) minmax(110px, 0.8fr) minmax(150px, 0.9fr) 22px;
    gap: 12px;
  }
}

.crew-name-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  vertical-align: middle;
}

.crew-name-with-badge span {
  display: inline;
  min-width: 0;
  margin-top: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.supervisor-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: var(--surface-muted);
  color: #075985;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.teams-header {
  margin-top: 18px;
}

.teams-header h1 {
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
  font-weight: 800;
}

#staff-view #teamBoard > .empty-state {
  grid-column: 1 / -1;
}

.team-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.team-card-header h3,
.team-card-header p {
  margin: 0;
}

.team-card-header p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.team-card-header .compact-button {
  flex: 0 0 auto;
}

#staff-view .staff-teams-header {
  align-items: center;
}

#staff-view .staff-teams-header .ghost-button {
  min-height: 36px;
  padding: 0 11px;
  white-space: nowrap;
}

#staff-view .staff-team-card {
  padding: 14px;
  border-radius: 10px;
  box-shadow: none;
}

#staff-view .staff-team-card .team-card-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 10px;
}

#staff-view .staff-team-card-copy {
  min-width: 0;
}

#staff-view .staff-team-card-copy h3,
#staff-view .staff-team-card-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#staff-view .staff-team-card .team-members {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

#staff-view .staff-team-card .member {
  padding: 9px 10px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

#staff-view .staff-team-card .member:last-child {
  border-bottom: 0;
}

.team-crew-list {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.team-crew-search {
  margin-top: 8px;
}

.team-crew-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.team-crew-option:last-child {
  border-bottom: 0;
}

.team-crew-option[hidden],
.team-crew-empty[hidden] {
  display: none;
}

.team-crew-option > span {
  display: grid;
  gap: 3px;
}

.team-crew-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

#staff-view .panel-grid .empty-state {
  min-height: 140px;
}

.crew-member-card {
  cursor: pointer;
}

.crew-member-card:hover {
  border-color: #bfdbfe;
  background: var(--surface-muted);
}

.crew-form {
  display: grid;
  gap: 4px;
}

.field-hint {
  display: block;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.crew-form .field-label {
  margin-top: 10px;
}

.crew-form .modern-select {
  margin-top: 4px;
}

.crew-form .modern-select-toggle {
  min-height: 42px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  font-weight: 800;
}

.crew-documents-section {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.crew-owned-detail {
  display: grid;
  align-content: center;
  gap: 1px;
  min-height: 42px;
  cursor: default;
  background: var(--surface-soft);
}

.crew-owned-detail strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-owned-detail small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

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

.crew-documents-heading {
  display: grid;
  gap: 3px;
}

.crew-documents-heading > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.crew-document-tile {
  position: relative;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 8px;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.crew-document-tile.has-file:hover,
.crew-document-tile.has-file:focus-visible {
  background: #f3f8ff;
  border-color: rgba(0, 105, 217, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 105, 217, 0.08);
  outline: 0;
}

.crew-document-tile.is-missing {
  border-style: dashed;
  background: var(--surface-soft);
}

.crew-document-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: 98px;
  overflow: hidden;
  border-radius: 6px;
  background: #eef2f7;
}

.crew-document-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crew-document-preview .material-symbols-rounded {
  color: var(--muted);
  font-size: 28px;
}

.crew-document-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.crew-document-copy strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.crew-document-copy small {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-document-open-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 16px;
}

.crew-documents-load-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.crew-documents-empty-state {
  justify-content: flex-start;
}

.crew-documents-empty-state .material-symbols-rounded {
  color: var(--primary);
}

.vehicle-form .form-row.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vehicle-state-field {
  display: grid;
  gap: 8px;
}

.vehicle-state-select,
.vehicle-choice-select {
  position: relative;
}

.vehicle-state-trigger,
.vehicle-choice-trigger {
  align-items: center;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  text-align: left;
  width: 100%;
}

.vehicle-state-trigger [data-vehicle-state-label],
.vehicle-choice-trigger [data-vehicle-choice-label] {
  color: var(--text);
}

.vehicle-state-trigger .icon,
.vehicle-choice-trigger .icon {
  color: var(--muted);
  font-size: 20px;
}

.vehicle-state-menu,
.vehicle-choice-menu {
  background: var(--surface);
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 4px;
  left: 0;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
}

.vehicle-state-menu[hidden],
.vehicle-choice-menu[hidden] {
  display: none;
}

.vehicle-state-option,
.vehicle-choice-option {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.vehicle-state-option:hover,
.vehicle-choice-option:hover {
  background: var(--surface-muted);
}

.vehicle-state-option:focus,
.vehicle-choice-option:focus {
  outline: none;
}

.vehicle-state-option.active,
.vehicle-choice-option.active {
  background: var(--surface-muted);
  color: var(--blue);
}

.crew-return-date.is-disabled {
  color: var(--muted);
}

.crew-return-date.is-disabled .input {
  border-color: #e2e8f0;
  background: var(--surface-muted);
  color: var(--muted);
  cursor: not-allowed;
}

.crew-skill-editor {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.crew-skill-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.crew-skill-list:empty {
  display: none;
}

.project-skill-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.project-skill-option {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: var(--surface-muted);
}

.job-quote-questions {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid #dde6f1;
  border-radius: 8px;
  background: #f8fafc;
}

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

.job-details-primary-grid {
  align-items: end;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 14px;
}

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

.segmented-field label,
.paint-option-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.segmented-field label:hover,
.paint-option-grid label:hover {
  border-color: #c5d3e4;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.segmented-field label:has(input:checked),
.paint-option-grid label:has(input:checked) {
  border-color: rgba(0, 105, 217, 0.5);
  background: #f0f6ff;
  color: var(--blue);
}

.paint-dropdown {
  display: grid;
  gap: 10px;
}

.paint-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  list-style: none;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.paint-dropdown summary:hover {
  border-color: #c5d3e4;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.paint-dropdown summary::-webkit-details-marker {
  display: none;
}

.paint-dropdown summary > span:first-child {
  display: grid;
  gap: 2px;
}

.paint-dropdown summary strong,
.paint-dropdown summary small {
  display: block;
}

.paint-dropdown summary strong {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
}

.paint-dropdown summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.paint-dropdown summary .material-symbols-rounded {
  color: var(--muted);
  transition: transform 160ms ease;
}

.paint-dropdown[open] summary .material-symbols-rounded {
  transform: rotate(180deg);
}

.paint-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.crew-skill-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  max-width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 8px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.crew-skill-option .checkbox-row {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.crew-skill-option:has(input:checked) {
  border-color: #93c5fd;
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 800;
}

.crew-skill-option .checkbox-row span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-skill-option .icon-button {
  flex: 0 0 auto;
  width: 22px;
  min-height: 22px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.crew-skill-option:has(input:checked) .icon-button {
  color: #075985;
}

.crew-skill-option:has(input:checked) .checkbox-row span {
  color: var(--text);
}

.crew-skill-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.crew-form-message {
  min-height: 18px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.crew-form-message.error {
  color: #b91c1c;
}

.resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 16px;
}

.team-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.team-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.team-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.team-members {
  display: grid;
  gap: 6px;
}

.member {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

button.member {
  width: 100%;
  min-height: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.ops-spine,
.import-review,
.allocation-panel,
.document-readiness,
.sync-log-panel,
.help-search {
  margin-bottom: 16px;
}

.lifecycle-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(110px, 1fr));
  gap: 8px;
}

.lifecycle-step {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  text-align: left;
}

.lifecycle-step strong,
.lifecycle-step small,
.action-card strong,
.action-card span,
.action-card small,
.readiness-card strong,
.readiness-card span,
.readiness-card small,
.role-card strong,
.role-card span,
.approval-card strong,
.approval-card span,
.approval-card small,
.document-card strong,
.document-card span,
.setup-row strong,
.setup-row span {
  display: block;
}

.lifecycle-step small,
.action-card span,
.action-card small,
.readiness-card span,
.readiness-card small,
.role-card span,
.approval-card span,
.approval-card small,
.document-card span,
.setup-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.jobs-command-layout {
  grid-template-columns: minmax(0, 1fr);
}

.command-side {
  position: sticky;
  top: 92px;
}

.calendar-job-details,
.calendar-detail-card {
  display: grid;
  gap: 12px;
}

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

.calendar-detail-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.calendar-detail-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.calendar-allocation-card {
  display: grid;
  gap: 16px;
}

.allocation-summary {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.allocation-summary span,
.allocation-summary small,
.allocation-staff-row small,
.allocation-job-row small,
.allocation-job-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.allocation-summary strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
}

.allocation-section {
  display: grid;
  gap: 9px;
}

.allocation-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.allocation-staff-list,
.allocation-job-list {
  display: grid;
  gap: 8px;
}

.allocation-staff-row,
.allocation-job-row {
  display: grid;
  width: 100%;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.allocation-staff-row {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}

.allocation-staff-row strong,
.allocation-job-row strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.allocation-staff-row span:last-child {
  min-width: 0;
}

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

.action-list.compact {
  gap: 8px;
}

.action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 12px;
  width: 100%;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.action-card.amber {
  border-left-color: var(--amber);
}

.action-card.red {
  border-left-color: var(--red);
}

.action-card.green {
  border-left-color: var(--green);
}

.action-card:hover,
.lifecycle-step:hover,
.readiness-card:hover,
.role-card:hover,
.approval-card:hover,
.document-card:hover,
.setup-row:hover {
  background: var(--surface-muted);
  border-color: #bfdbfe;
}

.action-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.job-detail-header p {
  max-width: 72ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

#job-detail-view .page-wrap {
  padding-top: 32px;
}

.job-detail-shell {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 18.5vw, 280px);
  gap: clamp(18px, 1.5vw, 26px);
}

.job-detail-shell.job-detail-middle-focus {
  grid-template-columns: minmax(0, 1fr);
}

.job-detail-main {
  container: jobmain / inline-size;
  min-width: 0;
}

.job-back-link {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
}

.job-back-link .material-symbols-rounded {
  font-size: 18px;
}

.job-detail-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 26px;
}

.job-detail-middle-focus .job-detail-header {
  gap: 24px;
  margin-bottom: 34px;
}

.job-detail-header > div:first-child {
  flex: 1 1 auto;
  max-width: calc(100% - 355px);
  min-width: 0;
}

.job-detail-middle-focus .job-detail-header > div:first-child {
  max-width: none;
}

.job-title-row {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  min-width: 0;
}

.job-title-row h1 {
  font-size: clamp(24px, 1.65vw, 30px);
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.job-detail-middle-focus .job-title-row h1 {
  font-size: clamp(32px, 2.6vw, 42px);
}

.job-detail-meta-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

.job-detail-middle-focus .job-detail-meta-row {
  gap: 28px;
  margin-top: 18px;
}

.job-detail-meta-row > span {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.job-detail-middle-focus .job-detail-meta-row > span {
  font-size: 16px;
  gap: 10px;
}

.job-detail-meta-row .material-symbols-rounded {
  color: #2563eb;
  font-size: 18px;
}

.job-detail-middle-focus .job-detail-meta-row .material-symbols-rounded {
  font-size: 24px;
}

.job-detail-header .header-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: max-content;
}

.job-detail-middle-focus .job-detail-header .header-actions {
  gap: 18px;
}

.job-detail-header .header-actions .material-symbols-rounded {
  font-size: 18px;
}

.job-detail-middle-focus .job-detail-header .ghost-button,
.job-detail-middle-focus .job-detail-header .primary-button {
  border-radius: 12px;
  font-size: 16px;
  min-height: 64px;
  padding-left: 24px;
  padding-right: 24px;
}

.job-detail-middle-focus .job-detail-header .icon-button {
  border-radius: 999px;
  height: 64px;
  width: 64px;
}

.job-detail-middle-focus .job-detail-header .header-actions .material-symbols-rounded {
  font-size: 24px;
}

.job-detail-status-strip {
  background: var(--surface);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 28px;
  overflow: hidden;
}

.job-detail-middle-focus .job-detail-status-strip {
  border-radius: 14px;
  margin-bottom: 28px;
}

.job-status-card {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 16px;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 156px;
  padding: 24px 22px;
}

.job-detail-middle-focus .job-status-card {
  gap: 24px;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 310px;
  padding: 34px 24px;
}

.job-status-card + .job-status-card {
  border-left: 1px solid rgba(203, 213, 225, 0.78);
}

.job-detail-status-strip .job-status-card:nth-child(even) {
  border-left: 1px solid rgba(203, 213, 225, 0.78);
}

.job-detail-status-strip .job-status-card:nth-child(n + 3) {
  border-top: 0;
}

.job-status-card div {
  align-content: center;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.job-status-card span:not(.material-symbols-rounded):not(.job-ready-ring) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.job-detail-middle-focus .job-status-card span:not(.material-symbols-rounded):not(.job-ready-ring) {
  font-size: 14px;
}

.job-status-card strong {
  font-size: clamp(18px, 1.2vw, 21px);
  letter-spacing: 0;
  line-height: 1.15;
}

.job-detail-middle-focus .job-status-card strong {
  font-size: clamp(24px, 2vw, 29px);
}

.job-status-card .status-chip {
  border: 0;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  justify-self: start;
  min-height: 24px;
  padding: 3px 10px;
}

/* The untinted chip ("Active" on scheduled jobs) is grey-on-grey next to the
   saturated tone chips — give it the workspace blue so it holds its own. */
.job-status-card .status-chip:not(.green):not(.amber):not(.red):not(.grey) {
  background: var(--chip-blue-bg, #e3edff);
  color: var(--chip-blue-fg, #1d4ed8);
}

.job-detail-middle-focus .job-status-card .status-chip {
  font-size: 16px;
  min-height: 34px;
  padding: 6px 16px;
}

.job-detail-status-strip .job-status-card:nth-child(3) {
  gap: 16px;
  padding-left: 20px;
  padding-right: 20px;
}

.job-detail-middle-focus .job-detail-status-strip .job-status-card:nth-child(3) {
  gap: 18px;
  padding: 34px 34px;
}

.job-summary-card {
  align-items: center;
  gap: 14px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 104px;
  padding: 16px 18px;
}

.job-summary-icon {
  align-items: center;
  background: #eef4ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 22px;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.job-summary-icon.weather {
  background: #e7f9ef;
  color: #16a34a;
}

.job-summary-icon.weather.grey {
  background: #f1f5f9;
  color: #64748b;
}

.job-summary-icon.weather.amber {
  background: #fff7ed;
  color: #d97706;
}

.job-summary-icon.weather.red {
  background: #fef2f2;
  color: #dc2626;
}

.job-summary-card .job-summary-copy {
  align-content: center;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.job-summary-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.job-summary-card strong {
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
}

.job-summary-card small {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.2;
}

.job-summary-card em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.job-summary-pill {
  align-self: start;
  border-radius: 999px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 900;
  justify-self: start;
  line-height: 1;
  padding: 4px 8px;
}

.job-summary-pill.red {
  background: #fee2e2;
  color: #b91c1c;
}

.job-summary-pill.amber {
  background: #fef3c7;
  color: #b45309;
}

.job-summary-pill.green {
  background: #dcfce7;
  color: #15803d;
}

.job-readiness-card .job-summary-copy {
  gap: 8px;
}

.job-readiness-head {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.job-readiness-head small {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.job-readiness-bar {
  background: #e8eef7;
  border-radius: 999px;
  display: block;
  height: 8px;
  overflow: hidden;
  width: 100%;
}

.job-readiness-bar i {
  background: linear-gradient(90deg, #2563eb, #16a34a);
  border-radius: inherit;
  display: block;
  height: 100%;
  width: var(--ready, 0%);
}

.job-summary-next {
  color: #1d4ed8;
}

.job-progress-status-card {
  align-content: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  justify-items: stretch;
}

.job-detail-middle-focus .job-progress-status-card {
  align-content: start;
  gap: 24px;
}

.job-progress-status-card h2 {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.15;
  margin: 0;
  text-transform: uppercase;
}

.job-detail-middle-focus .job-progress-status-card h2 {
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.job-progress-status-body {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 56px minmax(0, 1fr);
  width: 100%;
}

.job-detail-middle-focus .job-progress-status-body {
  gap: 26px;
  grid-template-columns: 104px minmax(0, 1fr);
}

.job-progress-status-card .job-ready-ring.small-ring {
  width: 56px;
}

.job-detail-middle-focus .job-progress-status-card .job-ready-ring.small-ring {
  width: 104px;
}

.job-progress-status-card .job-ready-ring.small-ring::before {
  inset: 7px;
}

.job-detail-middle-focus .job-progress-status-card .job-ready-ring.small-ring::before {
  inset: 12px;
}

.job-progress-status-card .job-ready-ring.small-ring strong {
  font-size: 16px;
}

.job-detail-middle-focus .job-progress-status-card .job-ready-ring.small-ring strong {
  font-size: 32px;
}

.job-progress-status-card .job-ready-ring.small-ring small {
  font-size: 9px;
}

.job-detail-middle-focus .job-progress-status-card .job-ready-ring.small-ring small {
  font-size: 15px;
}

.job-progress-status-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.job-detail-middle-focus .job-progress-status-list {
  gap: 12px;
}

.job-progress-status-item {
  align-items: center;
  color: var(--text);
  display: grid;
  gap: 7px;
  grid-template-columns: 16px minmax(0, 1fr);
  min-height: 20px;
}

.job-detail-middle-focus .job-progress-status-item {
  gap: 14px;
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 26px;
}

.job-progress-status-item .material-symbols-rounded {
  color: #d1d5db;
  font-size: 16px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 32;
}

.job-detail-middle-focus .job-progress-status-item .material-symbols-rounded {
  font-size: 25px;
}

.job-progress-status-item.done .material-symbols-rounded {
  color: #16b84e;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 32;
}

.job-progress-status-item.active {
  color: var(--blue);
}

.job-progress-status-item.active .material-symbols-rounded {
  color: var(--blue);
}

.job-progress-status-item strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-detail-middle-focus .job-progress-status-item strong {
  font-size: 18px;
  line-height: 1.2;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.job-weather-card {
  gap: 16px;
  grid-template-columns: 64px minmax(0, 1fr);
  padding-left: 20px;
  padding-right: 20px;
}

.job-detail-middle-focus .job-weather-card {
  gap: 24px;
  grid-template-columns: 86px minmax(0, 1fr);
  padding-left: 24px;
  padding-right: 24px;
}

.job-weather-card strong {
  color: #16a34a;
  font-size: clamp(18px, 1.2vw, 21px);
  white-space: nowrap;
}

.job-summary-card.job-weather-card {
  gap: 14px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding-left: 18px;
  padding-right: 18px;
}

.job-summary-card.job-weather-card strong {
  color: var(--text);
  font-size: 19px;
  white-space: normal;
}

.job-detail-middle-focus .job-weather-card strong {
  font-size: clamp(24px, 2vw, 29px);
}

.job-detail-middle-focus .job-status-icon,
.job-detail-middle-focus .job-weather-visual {
  font-size: 44px;
  height: 86px;
  width: 86px;
}

.job-detail-middle-focus .job-weather-visual .material-symbols-rounded {
  font-size: 48px;
}

.job-detail-middle-focus .job-weather-note {
  font-size: 15px;
  max-width: none;
}

.job-detail-middle-focus .job-weather-updated,
.job-detail-middle-focus .job-status-subline {
  font-size: 16px;
}

.job-detail-middle-focus .job-weather-updated .material-symbols-rounded,
.job-detail-middle-focus .job-status-subline .material-symbols-rounded {
  font-size: 24px;
}

.job-detail-middle-focus .job-status-card .job-weather-meta-line,
.job-detail-middle-focus .job-status-card .job-weather-meta-line span:not(.material-symbols-rounded) {
  font-size: 16px;
  gap: 8px;
}

.job-detail-middle-focus .job-status-card .job-weather-meta-line {
  gap: 14px 22px;
}

.job-detail-middle-focus .job-status-card .job-weather-meta-line .material-symbols-rounded {
  font-size: 24px;
}

.job-weather-card .status-chip {
  max-width: 100%;
  padding-left: 9px;
  padding-right: 9px;
  white-space: nowrap;
}

.job-weather-copy {
  align-content: center;
}

.job-weather-note {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.22;
  margin: 0;
  max-width: 30ch;
  white-space: nowrap;
}

.job-weather-updated {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  line-height: 1.2;
  text-transform: none;
}

.job-weather-updated .material-symbols-rounded {
  font-size: 19px;
}

.job-status-subline {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  gap: 10px;
  line-height: 1.35;
  text-transform: none;
  white-space: nowrap;
}

.job-status-subline .material-symbols-rounded {
  font-size: 20px;
}

.job-status-card .job-weather-meta-line {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

.job-status-card .job-weather-meta-line span:not(.material-symbols-rounded) {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 750;
  gap: 5px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.job-status-card .job-weather-meta-line span + span::before {
  content: none;
}

.job-weather-meta-line .material-symbols-rounded {
  font-size: 16px;
}

.job-weather-visual {
  align-items: center;
  background: #dcfce7;
  border-radius: 999px;
  color: #16a34a;
  display: inline-grid;
  height: 54px;
  justify-items: center;
  overflow: hidden;
  position: relative;
  width: 54px;
}

.job-weather-visual.green {
  background: #dcfce7;
  color: #16a34a;
}

.job-weather-visual.amber {
  background: #fff7e6;
  color: #d97706;
}

.job-weather-visual.red {
  background: #fee2e2;
  color: #dc2626;
}

.job-weather-visual .material-symbols-rounded {
  animation: jobWeatherFloat 3.4s ease-in-out infinite;
  font-size: 28px;
}

.job-weather-visual i {
  background: currentColor;
  border-radius: 999px;
  display: none;
  height: 7px;
  opacity: 0.48;
  position: absolute;
  top: 27px;
  transform: rotate(18deg);
  width: 2px;
}

.job-weather-visual.wet i {
  animation: jobWeatherRain 1.3s linear infinite;
  display: block;
}

.job-weather-visual i:nth-of-type(1) {
  left: 17px;
}

.job-weather-visual i:nth-of-type(2) {
  animation-delay: 0.24s;
  left: 24px;
}

.job-weather-visual i:nth-of-type(3) {
  animation-delay: 0.48s;
  left: 31px;
}

@keyframes jobWeatherFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes jobWeatherRain {
  0% {
    opacity: 0;
    transform: translateY(-6px) rotate(18deg);
  }

  30% {
    opacity: 0.55;
  }

  100% {
    opacity: 0;
    transform: translateY(10px) rotate(18deg);
  }
}

.job-status-icon {
  align-items: center;
  background: #eaf2ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 28px;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.job-status-icon.purple {
  background: #f1edff;
  color: #7c3aed;
}

.job-status-icon.amber {
  background: #fff7e6;
  color: #d97706;
}

.job-status-icon.weather {
  background: #dcfce7;
  color: #16a34a;
}

.job-status-icon.weather.green {
  background: #dcfce7;
  color: #16a34a;
}

.job-status-icon.weather.amber {
  background: #fff7e6;
  color: #d97706;
}

.job-status-icon.weather.red {
  background: #fee2e2;
  color: #dc2626;
}

.job-status-outline-button,
.job-status-primary-button {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  justify-self: start;
  min-height: 38px;
  padding: 0 14px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.job-status-outline-button {
  background: var(--surface);
  border: 2px solid #8b5cf6;
  color: #7c3aed;
}

.job-status-outline-button:hover,
.job-status-outline-button:focus-visible {
  background: #f5f3ff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.14);
  transform: translateY(-1px);
}

.job-status-primary-button {
  background: #111827;
  border: 1px solid #111827;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  color: #ffffff;
  gap: 12px;
  margin-top: 8px;
  max-width: 100%;
  min-width: 148px;
  padding-left: 16px;
  padding-right: 16px;
}

.job-status-primary-button .material-symbols-rounded {
  font-size: 28px;
}

.job-status-card .job-status-primary-button span:not(.material-symbols-rounded) {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.job-status-primary-button:hover,
.job-status-primary-button:focus-visible {
  background: #0f172a;
  border-color: #0f172a;
  transform: translateY(-1px);
}

:root[data-theme="dark"] .job-status-primary-button {
  background: #f8fafc;
  border-color: #f8fafc;
  color: #0f172a;
}

:root[data-theme="dark"] .job-status-outline-button:hover,
:root[data-theme="dark"] .job-status-outline-button:focus-visible {
  background: rgba(124, 58, 237, 0.14);
}

.job-ready-ring {
  --ready: 0%;
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(#2563eb var(--ready), #edf1f7 0);
  border-radius: 999px;
  color: var(--text);
  display: inline-grid;
  font-weight: 900;
  justify-items: center;
  place-content: center;
  position: relative;
  width: 116px;
}

.job-ready-ring::before {
  background: var(--surface);
  border-radius: inherit;
  content: "";
  inset: 12px;
  position: absolute;
}

.job-ready-ring > *,
.job-ready-ring {
  z-index: 1;
}

.job-ready-ring.small-ring {
  color: #0f172a;
  font-size: 14px;
  width: 48px;
}

.job-ready-ring.small-ring::before {
  inset: 6px;
}

.job-ready-ring strong {
  font-size: 26px;
  line-height: 1;
}

.job-ready-ring small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inline-link {
  justify-self: start;
  min-height: 0;
  padding: 0;
}

.job-detail-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 30px;
  margin-bottom: 26px;
  overflow-x: auto;
}

.job-detail-middle-focus .job-detail-tabs {
  gap: 30px;
  margin-bottom: 30px;
}

.job-detail-tabs button {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 7px;
  padding: 0 0 13px;
  white-space: nowrap;
}

.job-detail-middle-focus .job-detail-tabs button {
  font-size: 18px;
  padding-bottom: 20px;
}

.job-detail-tabs button.active {
  border-bottom-color: #2563eb;
  color: #2563eb;
}

.job-detail-tabs span {
  background: var(--surface-muted);
  border-radius: 999px;
  color: var(--text);
  font-size: 11px;
  min-width: 22px;
  padding: 3px 6px;
}

.job-detail-middle-focus .job-detail-tabs span {
  font-size: 12px;
  min-width: 26px;
  padding: 4px 8px;
}

.job-detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.job-detail-middle-focus .job-detail-content-grid {
  gap: 32px;
}

.surface.job-emails-panel {
  display: grid;
  gap: 24px;
  padding: 28px 22px 22px;
}

.job-email-section-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.job-detail-shell .ghost-button,
.job-detail-shell .primary-button,
.job-detail-shell .link-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.job-detail-header .ghost-button,
.job-detail-header .primary-button {
  min-height: 42px;
  padding-left: 14px;
  padding-right: 14px;
}

.job-detail-shell .ghost-button .material-symbols-rounded,
.job-detail-shell .primary-button .material-symbols-rounded,
.job-detail-shell .link-button .material-symbols-rounded {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.job-email-section-head h2,
.job-email-history h2 {
  font-size: 20px;
  margin: 0 0 8px;
}

.job-email-section-head p,
.job-email-history p {
  color: var(--muted);
  margin: 0;
}

.job-email-template-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.job-email-template-card {
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-rows: 68px auto minmax(54px, 1fr) auto;
  min-height: 236px;
  padding: 22px 18px 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.job-email-template-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.job-email-template-icon {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 34px;
  height: 68px;
  justify-content: center;
  justify-self: center;
  width: 68px;
}

.job-email-template-icon.green {
  background: #dcfce7;
  color: #16a34a;
}

.job-email-template-icon.amber {
  background: #ffedd5;
  color: #f97316;
}

.job-email-template-icon.blue {
  background: #dbeafe;
  color: #2563eb;
}

.job-email-template-icon.purple {
  background: #ede9fe;
  color: #7c3aed;
}

.job-email-template-icon.grey {
  background: #eef2f7;
  color: #64748b;
}

.job-email-template-card h3 {
  font-size: 15px;
  line-height: 1.3;
  margin: 0;
}

.job-email-template-card p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.job-email-template-card button {
  align-self: end;
  justify-content: center;
}

.job-email-history {
  display: grid;
  gap: 14px;
}

.job-email-history-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.job-email-history-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1.6fr) minmax(140px, 0.9fr) minmax(180px, 1fr) minmax(160px, 0.9fr) minmax(92px, 0.5fr);
  min-width: 920px;
  padding: 13px 16px;
}

.job-email-history-row + .job-email-history-row {
  border-top: 1px solid var(--line);
}

.job-email-history-row.header {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.job-email-history-row strong,
.job-email-history-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.job-email-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 4px 9px;
}

.job-email-status.sent {
  background: #dcfce7;
  color: #15803d;
}

.job-email-status.scheduled {
  background: #dbeafe;
  color: #2563eb;
}

.job-email-history-actions {
  display: flex;
  justify-content: center;
}

.job-email-history-actions .link-button {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  font-weight: 800;
}

.job-messages-panel {
  display: grid;
  gap: 18px;
  grid-template-rows: auto minmax(320px, auto) auto;
  height: auto;
  padding: 22px;
}

.job-messages-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.job-messages-head h2 {
  font-size: 21px;
  margin: 0 0 7px;
}

.job-messages-head p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  max-width: 72ch;
}

.job-messages-head-compact {
  justify-content: flex-end;
}

.job-message-head-actions {
  align-items: flex-end;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.job-message-participants {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  min-width: 220px;
}

.job-message-participants strong {
  color: var(--muted);
  font-size: 12px;
  margin-left: 10px;
  white-space: nowrap;
}

.job-message-participants.empty {
  min-width: 0;
}

.job-message-participants.empty strong {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  margin-left: 0;
  padding: 5px 9px;
}

.job-message-avatar {
  align-items: center;
  background: #eef2f7;
  border: 2px solid var(--surface);
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  margin-left: -7px;
  width: 34px;
}

.job-message-avatar:first-child {
  margin-left: 0;
}

.job-message-avatar.admin {
  background: #dbeafe;
  color: #1d4ed8;
}

.job-message-avatar.more {
  background: #f8fafc;
  color: var(--muted);
}

.job-message-error {
  margin: 0;
}

.job-message-thread {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  max-height: 560px;
  min-height: 320px;
  overflow-y: auto;
  padding: 18px;
}

.job-message {
  align-items: flex-start;
  display: grid;
  gap: 9px;
  grid-template-columns: 34px minmax(0, 1fr);
}

.job-message-date-divider {
  align-items: center;
  color: #64748b;
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 14px;
  grid-template-columns: minmax(40px, 180px) auto minmax(40px, 180px);
  justify-content: center;
  letter-spacing: 0;
  margin: 6px 0;
  text-align: center;
  text-transform: none;
}

.job-message-date-divider::before,
.job-message-date-divider::after {
  background: #e6edf5;
  content: "";
  display: block;
  height: 1px;
}

.job-message-date-divider span {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 10px;
}

.job-message-system {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-self: center;
  max-width: min(620px, 100%);
  padding: 2px 0;
}

.job-message-system .material-symbols-rounded {
  color: #94a3b8;
  font-size: 15px;
}

.job-message-system strong {
  color: #334155;
  font-size: 12px;
}

.job-message-system small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.job-message.mine {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.job-message.mine > .job-message-avatar {
  grid-column: 2;
  grid-row: 1;
}

.job-message.mine > .job-message-content {
  grid-column: 1;
  justify-self: end;
}

.job-message-content {
  display: grid;
  gap: 3px;
  min-width: 0;
  position: relative;
}

.job-message-sender {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding-left: 4px;
}

.job-message.mine .job-message-sender {
  padding-left: 0;
  padding-right: 4px;
  text-align: right;
}

.job-message-row {
  align-items: end;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.job-message.mine .job-message-row {
  flex-direction: row-reverse;
}

.job-message-row > time {
  color: #94a3b8;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  white-space: nowrap;
}

.job-message-bubble {
  background: #f1f3f5;
  border: 0;
  border-radius: 0 12px 12px 12px;
  box-shadow: none;
  display: grid;
  gap: 9px;
  max-width: min(420px, 100%);
  min-width: 0;
  padding: 11px 13px;
}

.job-message.mine .job-message-bubble {
  background: #eaf3ff;
  border-radius: 12px 0 12px 12px;
}

.job-message-bubble p {
  font-size: 14px;
  line-height: 1.36;
  margin: 0;
  overflow-wrap: anywhere;
}

.job-message-attachments,
.job-message-draft-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-message-attachment,
.job-message-draft-file {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  display: grid;
  gap: 8px;
  grid-template-columns: 22px minmax(84px, 1fr);
  min-height: 38px;
  max-width: 360px;
  padding: 7px 9px;
  text-decoration: none;
}

.job-message-attachment:hover,
.job-message-draft-file:hover {
  border-color: #93c5fd;
}

.job-message-attachment .material-symbols-rounded,
.job-message-draft-file .material-symbols-rounded {
  color: #2563eb;
  font-size: 20px;
}

.job-message-attachment.image-preview {
  align-items: stretch;
  border-radius: 8px;
  grid-template-columns: 88px minmax(112px, 1fr);
  max-width: 420px;
  min-height: 76px;
  padding: 6px;
}

.job-message-attachment.image-preview img {
  aspect-ratio: 4 / 3;
  background: #e2e8f0;
  border-radius: 6px;
  height: 72px;
  object-fit: cover;
  width: 88px;
}

.job-message-attachment span:not(.material-symbols-rounded) {
  align-self: center;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.job-message-attachment strong,
.job-message-draft-file strong {
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-message-attachment small,
.job-message-draft-file small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.job-message-draft-file {
  cursor: pointer;
  font-family: inherit;
}

.job-message-draft-file .remove {
  color: #64748b;
  font-size: 18px;
}

.job-message-empty {
  align-self: center;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 34px 16px;
  text-align: center;
}

.job-message-empty .material-symbols-rounded {
  background: #e0f2fe;
  border-radius: 999px;
  color: #0284c7;
  font-size: 28px;
  padding: 12px;
}

.job-message-empty strong {
  color: var(--text);
  font-size: 16px;
}

.job-message-empty p {
  margin: 0;
}

.job-message-composer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 9px;
  padding: 10px;
  position: relative;
}

.job-message-composer-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 0 48px;
}

.job-message-input-row {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
}

.job-message-input-row .file-input {
  display: none;
}

.job-message-tool-button,
.job-message-send-button,
.job-message-inline-button {
  align-items: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: inherit;
  justify-content: center;
  padding: 0;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.job-message-tool-button,
.job-message-send-button {
  height: 38px;
  width: 38px;
}

.job-message-tool-button {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.job-message-tool-button:hover,
.job-message-tool-button:focus-visible {
  background: #f8fafc;
  color: #0f172a;
  transform: translateY(-1px);
}

.job-message-send-button {
  background: #111827;
  color: #ffffff;
}

.job-message-send-button:hover,
.job-message-send-button:focus-visible {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.job-message-tool-button .material-symbols-rounded,
.job-message-send-button .material-symbols-rounded {
  font-size: 21px;
}

.job-message-input-shell {
  align-items: end;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 32px;
  min-height: 42px;
  padding: 5px 6px 5px 16px;
}

.job-message-input-shell:focus-within {
  background: #ffffff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}

.job-message-input-shell textarea {
  align-self: center;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  max-height: 92px;
  min-height: 24px;
  outline: none;
  padding: 2px 0;
  resize: none;
}

.job-message-input-shell textarea::placeholder {
  color: #94a3b8;
}

.job-message-inline-button {
  align-self: center;
  background: transparent;
  color: #64748b;
  height: 32px;
  width: 32px;
}

.job-message-inline-button:hover,
.job-message-inline-button:focus-visible {
  background: #e0f2fe;
  color: #2563eb;
}

.job-message-tool-button:disabled,
.job-message-send-button:disabled,
.job-message-inline-button:disabled,
.job-message-input-shell textarea:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.job-message-inline-button .material-symbols-rounded {
  font-size: 20px;
}

.job-message-emoji-picker {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 17px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  bottom: calc(100% + 10px);
  display: grid;
  justify-self: end;
  max-width: min(286px, calc(100vw - 48px));
  padding: 11px 14px;
  position: absolute;
  right: 46px;
  width: max-content;
  z-index: 20;
}

.job-message-emoji-grid {
  display: grid;
  gap: 8px 9px;
  grid-template-columns: repeat(5, 42px);
  justify-content: start;
}

.job-message-emoji-option {
  align-items: center;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  font-size: 28px;
  height: 42px;
  justify-content: center;
  padding: 0;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  width: 42px;
}

.job-message-emoji-option:hover,
.job-message-emoji-option:focus-visible {
  background: #f8fafc;
  border-color: transparent;
  box-shadow: none;
  outline: none;
  transform: translateY(-1px);
}

.job-message-compose-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-width: max-content;
}

.job-message-compose-actions .file-input {
  display: none;
}

.job-tab-placeholder {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.job-tab-placeholder > .material-symbols-rounded {
  background: #eff6ff;
  border-radius: 999px;
  color: #2563eb;
  font-size: 28px;
  padding: 12px;
}

.job-tab-placeholder h2 {
  margin: 0 0 6px;
}

.job-tab-placeholder p {
  color: var(--muted);
  margin: 0;
}

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

.job-files-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.job-files-head h2 {
  margin: 0 0 5px;
}

.job-files-head p {
  color: var(--muted);
  margin: 0;
}

.job-file-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.job-file-summary-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 62px;
  padding: 10px;
}

.job-file-summary-card .material-symbols-rounded {
  align-items: center;
  background: #eaf2ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 19px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.job-file-summary-card strong {
  font-size: 20px;
  grid-column: 2;
  line-height: 1;
}

.job-file-summary-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  grid-column: 2;
}

.job-file-list {
  display: grid;
  gap: 8px;
}

.job-file-gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
}

.job-file-gallery-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 0;
  padding: 0;
  text-align: left;
  min-height: 0;
  overflow: hidden;
  text-decoration: none;
}

.job-file-gallery-card:hover,
.job-file-gallery-card:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.1);
  outline: none;
}

.job-file-gallery-card img {
  aspect-ratio: 4 / 3;
  background: #e2e8f0;
  display: block;
  object-fit: cover;
  width: 100%;
}

.job-file-gallery-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px 11px;
}

.job-file-gallery-meta strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-file-gallery-meta small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-image-viewer-open {
  overflow: hidden;
}

.job-image-viewer-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.82);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 28px;
  position: fixed;
  z-index: 220;
}

.job-image-viewer {
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  color: #f8fafc;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(92vh, 920px);
  max-width: calc(100vw - 56px);
  overflow: hidden;
  width: min(92vw, 1180px);
}

.job-image-viewer-head {
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 66px;
  padding: 14px 16px 14px 18px;
}

.job-image-viewer-head > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.job-image-viewer-head strong {
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-image-viewer-head span:not(.material-symbols-rounded) {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-image-viewer-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: max-content;
}

.job-image-viewer-action,
.job-image-viewer-icon-button,
.job-image-viewer-nav,
.job-image-viewer-thumbs button {
  border: 1px solid rgba(148, 163, 184, 0.24);
  cursor: pointer;
  font: inherit;
}

.job-image-viewer-action,
.job-image-viewer-icon-button {
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 8px;
  color: #f8fafc;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  text-decoration: none;
}

.job-image-viewer-icon-button {
  justify-content: center;
  padding: 0;
  width: 38px;
}

.job-image-viewer-action:hover,
.job-image-viewer-action:focus-visible,
.job-image-viewer-icon-button:hover,
.job-image-viewer-icon-button:focus-visible,
.job-image-viewer-nav:hover,
.job-image-viewer-nav:focus-visible,
.job-image-viewer-thumbs button:hover,
.job-image-viewer-thumbs button:focus-visible {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(191, 219, 254, 0.7);
  outline: none;
}

.job-image-viewer-action .material-symbols-rounded,
.job-image-viewer-icon-button .material-symbols-rounded {
  font-size: 19px;
}

.job-image-viewer-stage {
  align-items: center;
  background: #020617;
  display: grid;
  justify-items: center;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.job-image-viewer-stage > img {
  display: block;
  height: auto;
  max-height: calc(min(92vh, 920px) - 142px);
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.job-image-viewer-nav {
  align-items: center;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  color: #f8fafc;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  z-index: 1;
}

.job-image-viewer-nav.prev {
  left: 18px;
}

.job-image-viewer-nav.next {
  right: 18px;
}

.job-image-viewer-nav .material-symbols-rounded {
  font-size: 32px;
}

.job-image-viewer-footer {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 66px;
  padding: 10px 16px;
}

.job-image-viewer-footer > span {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.job-image-viewer-thumbs {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

.job-image-viewer-thumbs button {
  background: transparent;
  border-radius: 7px;
  height: 48px;
  min-width: 64px;
  overflow: hidden;
  padding: 0;
  width: 64px;
}

.job-image-viewer-thumbs button.active {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.28);
}

.job-image-viewer-thumbs img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.job-file-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 8px 12px 8px 8px;
  text-decoration: none;
}

.job-file-row:hover,
.job-file-row:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
  outline: none;
}

.job-file-row > .material-symbols-rounded,
.job-file-row > img {
  align-items: center;
  background: #eff6ff;
  border-radius: 7px;
  color: #2563eb;
  display: inline-flex;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  object-fit: cover;
  width: 48px;
}

.job-file-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.job-file-row strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-file-row small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-file-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.job-detail-panel {
  min-height: 0;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.job-detail-middle-focus .job-detail-panel {
  border-radius: 14px;
  padding: 24px;
}

.job-detail-middle-focus .job-section-header {
  margin-bottom: 18px;
}

.job-detail-middle-focus .job-section-header h2 {
  font-size: 28px;
}

.job-detail-middle-focus .job-section-header .ghost-button {
  border-radius: 10px;
  font-size: 18px;
  min-height: 50px;
  padding-left: 22px;
  padding-right: 22px;
}

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

.job-overview-info-item {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 82px;
  padding: 14px 12px;
}

.job-detail-middle-focus .job-overview-info-item {
  gap: 24px;
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 116px;
  padding: 20px 0;
}

.job-overview-info-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.job-overview-info-icon {
  color: #64748b;
  font-size: 25px;
}

.job-detail-middle-focus .job-overview-info-icon {
  font-size: 34px;
}

.job-overview-info-icon.purple {
  color: #7c3aed;
}

.job-overview-info-item span:not(.material-symbols-rounded) {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.job-detail-middle-focus .job-overview-info-item span:not(.material-symbols-rounded) {
  font-size: 14px;
}

.job-overview-info-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.job-overview-info-edit-button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: block;
  margin: -6px -8px;
  padding: 6px 8px;
  text-align: left;
  width: calc(100% + 16px);
}

.job-overview-info-edit-button:hover {
  background: #f8fbff;
}

.job-overview-info-edit-button:focus-visible {
  background: #f8fbff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  outline: 0;
}

.job-detail-middle-focus .job-overview-info-item strong {
  font-size: 20px;
  margin-top: 8px;
}

.blue-text {
  color: #2563eb;
}

.amber-text {
  color: #d97706;
}

.job-dispatch-list {
  display: grid;
}

.job-dispatch-row {
  border-bottom: 1px solid var(--line);
}

.job-dispatch-icon {
  color: #2563eb;
}

.job-dispatch-check {
  color: #22c55e;
  font-size: 22px;
  font-style: normal;
}

.job-detail-middle-focus .job-dispatch-check {
  font-size: 30px;
}

.job-dispatch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0 0;
}

.job-detail-middle-focus .job-dispatch-actions {
  gap: 20px;
  padding-top: 22px;
}

.job-dispatch-actions .ghost-button,
.job-dispatch-actions .primary-button {
  min-height: 38px;
  padding-left: 16px;
  padding-right: 16px;
}

.job-detail-middle-focus .job-dispatch-actions .ghost-button,
.job-detail-middle-focus .job-dispatch-actions .primary-button {
  border-radius: 10px;
  font-size: 18px;
  min-height: 54px;
  min-width: 190px;
  padding-left: 24px;
  padding-right: 24px;
}

.job-detail-panel .drawer-grid {
  gap: 0;
}

.job-detail-panel .drawer-grid.job-inline-form {
  gap: 14px;
}

.job-activity-list {
  display: grid;
  gap: 8px;
}

.job-activity-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 58px;
  padding: 10px 12px;
}

.job-activity-row > .material-symbols-rounded {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 18px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.job-activity-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.job-activity-row strong {
  font-size: 13px;
  line-height: 1.25;
  text-transform: capitalize;
}

.job-activity-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.job-activity-row.empty > .material-symbols-rounded {
  background: var(--surface-muted);
  color: var(--muted);
}

.job-detail-panel .detail-row {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 72px;
  padding: 16px 12px;
}

.job-detail-panel .detail-row:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.job-detail-panel .detail-row.full {
  border-bottom: 1px solid var(--line);
}

.job-detail-panel .detail-row.full:last-child {
  border-bottom: 0;
}

.job-detail-panel.wide {
  grid-column: 1 / -1;
}

.job-detail-side {
  display: grid;
  gap: 16px;
  margin-top: 115px;
  position: sticky;
  top: 82px;
}

.job-side-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.job-side-card h2 {
  font-size: 17px;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.job-progress-card {
  gap: 12px;
}

.job-progress-card h2 {
  line-height: 1.15;
}

.job-progress-overview {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 86px minmax(0, 1fr);
  padding: 0;
}

.job-side-card-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.job-side-card-heading > span {
  background: #eff6ff;
  border: 0;
  border-radius: 9px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
  white-space: nowrap;
}

.job-progress-meter {
  display: grid;
  justify-items: center;
  padding: 0;
}

.job-progress-card .job-ready-ring {
  width: 86px;
}

.job-progress-card .job-ready-ring::before {
  inset: 10px;
}

.job-progress-card .job-ready-ring strong {
  font-size: 23px;
}

.job-progress-card .job-ready-ring small {
  font-size: 12px;
}

.job-progress-list {
  display: grid;
  gap: 5px;
}

.job-progress-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #334155;
  display: grid;
  gap: 7px;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 24px;
  padding: 0;
}

.job-progress-item .material-symbols-rounded {
  color: #d1d5db;
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 32;
}

.job-progress-item.done {
  background: transparent;
  border-color: transparent;
  color: var(--text);
}

.job-progress-item.done .material-symbols-rounded {
  color: #16b84e;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 32;
}

.job-progress-item.active {
  color: var(--blue);
}

.job-progress-item.active .material-symbols-rounded {
  color: var(--blue);
}

.job-progress-item strong {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-width {
  width: 100%;
}

.job-quick-actions {
  display: grid;
  gap: 9px;
}

.job-quick-actions button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 10px;
  min-height: 38px;
  padding: 8px 11px;
  text-align: left;
}

.job-quick-actions button:hover {
  background: var(--surface-muted);
  border-color: #bfdbfe;
}

.job-quick-actions button:disabled,
.job-quick-actions button.is-disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

.job-quick-actions button:disabled .material-symbols-rounded,
.job-quick-actions button.is-disabled .material-symbols-rounded {
  color: #94a3b8;
}

.job-quick-actions .material-symbols-rounded {
  color: #334155;
  font-size: 20px;
}

.job-side-detail-list {
  display: grid;
  gap: 16px;
}

.job-side-detail-list div {
  display: grid;
  gap: 5px;
}

.job-side-detail-list span {
  color: var(--muted);
  font-size: 12px;
}

.job-side-detail-list strong {
  font-size: 14px;
}

.job-team-summary {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 8px 9px;
}

.job-team-summary span,
.job-team-staff-row span,
.job-team-empty p {
  color: var(--muted);
  font-size: 12px;
}

.job-team-summary strong {
  font-size: 14px;
}

.job-team-staff-list {
  display: grid;
  gap: 10px;
}

.job-team-staff-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
}

.job-team-staff-row .avatar {
  height: 34px;
  width: 34px;
}

.job-team-staff-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.job-team-staff-row strong,
.job-team-staff-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-team-empty {
  align-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 8px;
  text-align: center;
}

.job-team-empty .material-symbols-rounded {
  color: #334155;
  font-size: 20px;
}

.job-team-empty-blocked {
  background: #f8fafc;
}

.job-team-empty-blocked .material-symbols-rounded {
  color: #94a3b8;
}

.job-team-empty p {
  margin: 0;
}

.job-team-empty strong {
  font-size: 14px;
}

.job-team-actions {
  display: grid;
  gap: 8px;
}

.job-assign-crew-button,
.job-add-crew-button {
  align-items: center;
  border-color: var(--blue);
  color: var(--blue);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
}

.job-assign-crew-button .material-symbols-rounded,
.job-add-crew-button .material-symbols-rounded {
  font-size: 20px;
}

.job-assign-crew-button:hover,
.job-add-crew-button:hover {
  background: #eff6ff;
  border-color: var(--blue);
  color: var(--blue);
}

.job-assign-crew-button:disabled,
.job-assign-crew-button.is-disabled,
.job-assign-crew-button.is-disabled:hover {
  background: #f8fafc;
  border-color: #dbe3ee;
  color: #94a3b8;
  cursor: not-allowed;
}

.job-assign-crew-button:disabled .material-symbols-rounded,
.job-assign-crew-button.is-disabled .material-symbols-rounded {
  color: #94a3b8;
}

@media (max-width: 1500px) and (min-width: 901px) {
  .job-detail-shell {
    grid-template-columns: minmax(0, 1fr) clamp(250px, 18.5vw, 268px);
    gap: 18px;
  }

  .job-detail-side {
    gap: 18px;
    margin-top: 115px;
    top: 74px;
  }

  .job-side-card {
    gap: 14px;
    padding: 18px;
  }

  .job-side-card h2 {
    font-size: 22px;
  }

  .job-detail-side .job-progress-overview {
    align-items: center;
    column-gap: 12px;
    grid-template-columns: 78px minmax(0, 1fr);
    padding: 0;
  }

  .job-detail-side .job-progress-card .job-progress-meter {
    grid-column: 1;
    grid-row: 1;
  }

  .job-detail-side .job-progress-card .job-progress-list {
    grid-column: 2;
    grid-row: 1;
  }

  .job-progress-meter {
    padding: 0;
  }

  .job-progress-card .job-ready-ring {
    width: 78px;
  }

  .job-progress-card .job-ready-ring::before {
    inset: 10px;
  }

  .job-progress-card .job-ready-ring strong {
    font-size: 21px;
  }

  .job-progress-card .job-ready-ring small {
    font-size: 12px;
  }

  .job-progress-list {
    gap: 9px;
  }

  .job-progress-item {
    gap: 6px;
    grid-template-columns: 18px minmax(0, 1fr);
    min-height: 24px;
    padding: 0;
  }

  .job-progress-item .material-symbols-rounded {
    font-size: 18px;
  }

  .job-progress-item strong {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .job-quick-actions {
    gap: 9px;
  }

  .job-quick-actions button {
    font-size: 13px;
    gap: 10px;
    min-height: 38px;
    padding: 8px 11px;
  }

  .job-quick-actions .material-symbols-rounded {
    font-size: 20px;
  }

  .job-side-detail-list {
    gap: 10px;
  }

  .job-team-summary {
    padding: 8px 9px;
  }

  .job-team-empty {
    gap: 4px;
    padding: 8px;
  }

  .job-team-empty .material-symbols-rounded {
    font-size: 20px;
  }
}

.job-detail-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.job-detail-hero > div {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.job-detail-hero span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.job-detail-hero strong {
  font-size: 20px;
  line-height: 1.15;
}

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

.job-detail-grid > .surface:last-child {
  grid-column: 1 / -1;
}

.readiness-list,
.approval-strip,
.document-checklist,
.setup-checklist,
.funnel {
  display: grid;
  gap: 10px;
}

.readiness-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.readiness-card.red {
  background: #fff7f7;
}

.readiness-card.amber {
  background: #fffdf7;
}

.readiness-score {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) var(--score), #e5edf8 0);
  color: var(--text);
  font-size: 11px;
}

.readiness-score strong {
  font-size: 15px;
}

.role-card,
.approval-card,
.document-card,
.setup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.role-card,
.approval-card,
.document-card {
  align-items: flex-start;
}

.approval-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.approval-card {
  border-left: 4px solid var(--line-strong);
}

.approval-card.amber {
  border-left-color: var(--amber);
}

.approval-card.red {
  border-left-color: var(--red);
}

.approval-card em {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.permission-matrix {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.permission-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

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

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

.permission-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.permission-cell span {
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}

.permission-cell strong {
  font-size: 11px;
  text-transform: uppercase;
}

.permission-cell.allowed {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.permission-cell.allowed strong {
  color: #166534;
}

.permission-cell.blocked {
  border-color: #fecaca;
  background: #fff7f7;
}

.permission-cell.blocked strong {
  color: #991b1b;
}

.state-coverage {
  display: grid;
  gap: 8px;
}

.state-row {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.state-row strong {
  font-size: 13px;
}

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

.state-row em {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--blue-dark);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.document-checklist {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.document-card {
  display: grid;
  min-height: 92px;
}

.document-card.red {
  border-color: #fecaca;
  background: #fff7f7;
}

.document-card.amber {
  border-color: #fed7aa;
  background: #fffdf7;
}

.setup-row {
  text-align: left;
}

.compact-timeline {
  margin-top: 14px;
}

.compact-timeline .timeline-item {
  grid-template-columns: 72px minmax(130px, 0.36fr) minmax(0, 1fr);
}

.funnel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.funnel-step {
  display: grid;
  gap: 4px;
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.funnel-step strong {
  font-size: 26px;
}

.funnel-step span,
.funnel-step small {
  color: var(--muted);
  font-size: 12px;
}

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

.ops-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-card {
  display: grid;
  gap: 10px;
}

.ops-kpi-card {
  width: 100%;
  min-height: 166px;
  padding: 14px;
  color: var(--text);
  text-align: left;
}

.ops-kpi-card.amber {
  border-color: #fed7aa;
}

.ops-kpi-card.red {
  border-color: #fecaca;
}

.ops-kpi-card.green {
  border-color: #bbf7d0;
}

.report-card strong {
  font-size: 26px;
}

.report-card small {
  color: var(--muted);
  font-size: 12px;
}

.report-card em {
  color: var(--blue-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.ops-report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.secondary-report-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.drilldown-report-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.ops-combo-chart {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  min-height: 285px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.ops-combo-bar {
  position: relative;
  display: grid;
  align-content: end;
  gap: 7px;
  min-height: 240px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  text-align: center;
}

.ops-combo-bar::before {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  height: var(--bar);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--brand-yellow), #d7aa00);
  opacity: 0.9;
}

.ops-combo-bar > * {
  position: relative;
  z-index: 1;
}

.ops-combo-bar span {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.ops-combo-bar strong,
.ops-combo-bar small,
.ops-combo-bar em {
  color: var(--text);
}

.ops-combo-bar em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.utilization-list,
.delay-grid,
.email-health-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.utilization-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 50px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.utilization-row div:first-child {
  display: grid;
  gap: 3px;
}

.utilization-row span,
.utilization-row small {
  color: var(--muted);
  font-size: 12px;
}

.utilization-row small {
  grid-column: 1 / -1;
}

.utilization-row.green {
  border-color: #bbf7d0;
}

.utilization-row.amber {
  border-color: #fed7aa;
}

.utilization-row.red {
  border-color: #fecaca;
}

.utilization-meter {
  height: 10px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
}

.utilization-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

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

.delay-card,
.email-health-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 132px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.delay-card strong,
.email-health-card strong {
  font-size: 26px;
}

.delay-card span,
.delay-card small,
.email-health-card span,
.email-health-card small {
  color: var(--muted);
  font-size: 12px;
}

.delay-card.amber,
.email-health-card.amber {
  border-color: #fed7aa;
}

.delay-card.red,
.email-health-card.red {
  border-color: #fecaca;
}

.delay-card.green,
.email-health-card.green {
  border-color: #bbf7d0;
}

.campaign-report-table .table-row {
  grid-template-columns: 1.6fr 90px 90px 95px 110px 80px;
}

.report-drilldown-table .table-row {
  grid-template-columns: 1.1fr 1.1fr 100px 120px 1.2fr 110px;
}

.surface,
.metric,
.team-card,
.today-job-card,
.client-account-card,
.client-action-card,
.client-health-card,
.email-detail-card,
.dashboard-block {
  padding: 12px;
}

.table-row,
.action-card,
.setting-row,
.template-detail-list button {
  min-height: 56px;
}

.metric strong {
  font-size: 24px;
}

.page-wrap,
.calendar-panel,
.ops-panel {
  gap: 14px;
}

.help-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.field-label {
  display: block;
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field-label span {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 700;
  text-transform: none;
}

.field-label .field-error {
  margin-left: 0;
  text-transform: none !important;
}

.field-label-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.field-label-row .field-label {
  margin: 0 0 6px;
}

.inline-checkbox.small-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.inline-checkbox.small-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
}

.input:disabled {
  background: var(--bg-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-card-header h2 {
  margin: 0;
}

.project-card-header .compact-button {
  min-height: 42px;
  white-space: nowrap;
}

#create-project-view .page-wrap {
  display: grid;
  gap: 18px;
  max-width: 1460px;
  padding-inline: 24px;
}

#create-project-view .section-header {
  align-items: flex-end;
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

#create-project-view .section-header h1 {
  font-size: 26px;
  letter-spacing: 0;
}

#create-project-view .surface {
  position: relative;
  overflow: visible;
  padding: 22px;
  border-radius: 8px;
  border: 1px solid rgba(216, 218, 227, 0.92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.055);
}

#create-project-view .surface:has(.modern-select-toggle[aria-expanded="true"]) {
  z-index: 50;
}

#create-project-view .surface h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

#create-project-view .project-form-grid {
  counter-reset: project-section;
}

#create-project-view .surface h2::before {
  counter-increment: project-section;
  content: counter(project-section);
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #edf5ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

#create-project-view .project-card-header {
  align-items: flex-start;
  margin-bottom: 18px;
}

#create-project-view .input {
  min-height: 46px;
  border-color: #dce2eb;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

#create-project-view .input:hover {
  border-color: #c7d2e0;
}

#create-project-view .input:focus {
  border-color: rgba(11, 95, 232, 0.58);
  box-shadow: 0 0 0 3px rgba(11, 95, 232, 0.1);
  outline: none;
}

#create-project-view .modern-select-toggle {
  min-height: 46px;
  border: 1px solid #dce2eb;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

#create-project-view .modern-select-toggle:hover {
  border-color: #c7d2e0;
}

#create-project-view .modern-select-toggle:focus-visible,
#create-project-view .modern-select-toggle[aria-expanded="true"] {
  border-color: rgba(11, 95, 232, 0.58);
  box-shadow: 0 0 0 3px rgba(11, 95, 232, 0.1);
}

#create-project-view .field-label {
  margin: 18px 0 7px;
  color: #566170;
  font-size: 12px;
  letter-spacing: 0;
}

#create-project-view .form-row {
  gap: 14px;
}

#create-project-view .field-label-row {
  align-items: center;
  margin-top: 18px;
}

#create-project-view .site-address-label-row {
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin: 18px 0 7px;
}

#create-project-view .field-label-row .field-label {
  margin-bottom: 7px;
}

#create-project-view .inline-checkbox.small-checkbox {
  margin-bottom: 7px;
  color: #4b5563;
  font-size: 12px;
}

#create-project-view .site-address-label-row .field-label,
#create-project-view .site-address-label-row .inline-checkbox.small-checkbox {
  margin: 0;
}

#create-project-view .project-scope-checklist-button {
  min-height: 58px;
  border-color: #dbe5ef;
  border-radius: 8px;
  background: #fff;
  padding: 0 14px;
}

#create-project-view .project-scope-checklist-button:hover,
#create-project-view .project-scope-checklist-button:focus-visible {
  border-color: rgba(11, 95, 232, 0.45);
  background: #f8fbff;
}

#create-project-view .project-scope-checklist-button > span,
#create-project-view .calendar-todo-preview-head > span {
  font-size: 14px;
  font-weight: 800;
}

#create-project-view .project-scope-checklist-button > strong,
#create-project-view .calendar-todo-preview-head strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

#create-project-view .calendar-todo-preview-head {
  min-height: 54px;
  padding: 0 14px;
}

.textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

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

.client-detail-fields {
  margin-top: 12px;
}

.single-field-row {
  grid-template-columns: minmax(0, 1fr);
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 2px 0 14px;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.date-source-row,
.shift-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.project-schedule-fields {
  display: grid;
}

.project-schedule-fields[hidden],
.project-unscheduled-assignment-note[hidden] {
  display: none;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-job-schedule {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e4eaf1;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-subsection-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-job-schedule .date-source-row {
  margin: 0;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-required-details {
  margin-top: 4px;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure {
  margin-top: 16px;
  overflow: visible;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #f8fafc;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 14px;
  list-style: none;
  color: var(--text);
  cursor: pointer;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure > summary::-webkit-details-marker {
  display: none;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure > summary:focus-visible {
  border-radius: 10px;
  outline: 3px solid rgba(11, 95, 232, 0.18);
  outline-offset: 2px;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure-copy strong {
  font-size: 14px;
  font-weight: 800;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure > summary > .material-symbols-rounded {
  color: #64748b;
  transition: transform 160ms ease;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure[open] > summary > .material-symbols-rounded {
  transform: rotate(180deg);
}

:is(#create-project-view, .calendar-inline-job-editor) .project-disclosure-content {
  padding: 0 14px 14px;
  border-top: 1px solid #e4eaf1;
}

:is(#create-project-view, .calendar-inline-job-editor) .project-optional-section .job-quote-questions {
  margin-top: 14px;
}

.project-crew-readiness {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #f8fafc;
}

.project-crew-readiness > .material-symbols-rounded {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: #eaf4ff;
  color: var(--blue);
  font-size: 20px;
}

.project-crew-readiness > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-crew-readiness strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.project-crew-readiness small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.project-crew-readiness.ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.project-crew-readiness.ready > .material-symbols-rounded {
  background: #dcfce7;
  color: #15803d;
}

.project-crew-readiness.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.project-crew-readiness.warning > .material-symbols-rounded {
  background: #ffedd5;
  color: #c2410c;
}

.project-assignment-options .project-assignment-block {
  padding-top: 2px;
}

.project-assignment-block.unscheduled .toggle-row {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--muted);
  cursor: default;
  opacity: 0.72;
}

.project-unscheduled-assignment-note {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

.project-auto-assignment-preview[hidden] {
  display: none;
}

.project-auto-assignment-preview {
  display: grid;
  gap: 10px;
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 9px;
  background: #f0fdf4;
}

.project-auto-assignment-preview.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.project-auto-assignment-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.project-auto-assignment-heading > .material-symbols-rounded {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: #dcfce7;
  color: #15803d;
  font-size: 20px;
}

.project-auto-assignment-preview.warning .project-auto-assignment-heading > .material-symbols-rounded {
  background: #ffedd5;
  color: #c2410c;
}

.project-auto-assignment-heading > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-auto-assignment-heading strong {
  font-size: 13px;
  font-weight: 800;
}

.project-auto-assignment-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.project-auto-assignment-preview .assignment-plan {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.72);
}

.project-auto-assignment-preview .assigned-crew-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#create-project-view .date-source-row,
#create-project-view .shift-row {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px;
  border-color: #dde6f1;
  background: #f8fafc;
}

#create-project-view .date-source-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#create-project-view .shift-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}

#create-project-view .shift-selection-label {
  display: block;
  margin-top: 12px;
}

#create-project-view .date-source-row label,
#create-project-view .shift-row label {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 13.5px;
}

#create-project-view .date-source-row label:has(input:checked),
#create-project-view .shift-row label:has(input:checked) {
  border-color: rgba(11, 95, 232, 0.35);
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.project-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  gap: 20px;
  align-items: start;
}

.form-bottom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  order: 2;
  position: sticky;
  bottom: 0;
  z-index: 9;
  margin-top: 2px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(10px);
}

.project-form-column {
  display: grid;
  gap: 20px;
  min-width: 0;
}

#create-project-view .project-form-column:last-child {
  position: sticky;
  top: 96px;
}

#create-project-view .project-form-column:last-child .surface {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.project-validation {
  display: grid;
  gap: 4px;
  margin: 14px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.project-validation.valid {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-weight: 700;
}

.project-validation.invalid {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.project-validation strong,
.project-validation span {
  display: block;
}

.project-review-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

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

.review-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--surface-muted);
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 700;
}

.toggle-switch-row {
  cursor: pointer;
}

.toggle-switch-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.toggle-switch {
  position: relative;
  flex: 0 0 auto;
  inline-size: 44px;
  block-size: 24px;
  border-radius: 999px;
  background: #94a3b8;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.toggle-switch-thumb {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  inline-size: 18px;
  block-size: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.16s ease;
}

.toggle-switch-input:checked + .toggle-switch {
  background: var(--blue);
}

.toggle-switch-input:checked + .toggle-switch .toggle-switch-thumb {
  transform: translateX(20px);
}

.toggle-switch-input:focus-visible + .toggle-switch {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

.manual-crew-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: var(--surface);
}

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

.manual-crew-panel-head {
  display: grid;
  gap: 2px;
}

.manual-crew-panel-head strong,
.manual-crew-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.manual-crew-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.manual-crew-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
}

.manual-crew-search .material-symbols-rounded {
  color: var(--muted);
  font-size: 19px;
}

.manual-crew-search .input {
  min-height: 38px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.manual-crew-search .input:focus {
  outline: none;
}

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

.manual-crew-group {
  display: grid;
  align-content: start;
  gap: 8px;
}

.manual-crew-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: var(--surface-muted);
  cursor: pointer;
}

.manual-crew-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.manual-crew-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.ai-assign-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.ai-assign-card h3 {
  margin: 8px 0 4px;
  font-size: 16px;
}

.ai-assign-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ai-assignment-result {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ai-assignment-result > span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-assignment-result.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.ai-assignment-result.warning > span {
  color: #c2410c;
}

.assigned-crew-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.assigned-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.assigned-person strong,
.assigned-person small {
  display: block;
}

.assigned-person strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assigned-person small {
  color: var(--muted);
  font-size: 11px;
}

.assignment-plan {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
}

.assignment-plan.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.assignment-plan-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.assignment-plan-summary span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.assignment-blockers {
  margin: 0;
  padding-left: 18px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

.assignment-rejections {
  font-size: 12px;
}

.assignment-rejections summary {
  cursor: pointer;
  font-weight: 800;
}

.assignment-rejections p {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
}

.assignment-rejections span {
  color: var(--muted);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.chip {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
}

.chip.active {
  border-color: #bfdbfe;
  background: var(--surface-muted);
  color: var(--blue);
}

.campaign-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.campaign-stats div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.campaign-stats strong,
.campaign-stats span {
  display: block;
}

.campaign-stats span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.compliance-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.email-shell {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.5;
}

.template-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.template-list button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  padding: 0 12px;
}

.template-detail-list button,
.project-form-grid .template-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  min-height: 72px;
  padding: 12px;
  align-items: center;
}

.template-detail-list button strong,
.template-detail-list button span,
.template-detail-list button em,
.project-form-grid .template-list button strong,
.project-form-grid .template-list button span,
.project-form-grid .template-list button em {
  display: block;
}

.template-detail-list button span,
.project-form-grid .template-list button span {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.template-detail-list button em,
.project-form-grid .template-list button em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-style: normal;
}

.compact-email {
  margin-top: 0;
  min-height: 255px;
}

.compact-email hr {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 14px 0;
}

.clean-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.clean-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  width: 100%;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.clean-list button:hover {
  background: var(--surface-muted);
}

.clean-list strong {
  font-size: 14px;
}

.clean-list span {
  color: var(--muted);
  font-size: 13px;
}

.clean-list em {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.profile-preview {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.profile-preview > strong {
  font-size: 18px;
}

.profile-preview > span {
  color: var(--muted);
}

.profile-preview dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-preview dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.profile-preview dt {
  color: var(--muted);
}

.profile-preview dd {
  margin: 0;
  font-weight: 700;
}

.bar-report {
  display: flex;
  align-items: end;
  gap: 16px;
  height: 260px;
  margin-top: 18px;
  padding: 22px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.bar-report span {
  display: flex;
  align-items: end;
  justify-content: center;
  flex: 1;
  min-height: 44px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--brand-yellow), #d7aa00);
  color: #fff;
  font-weight: 800;
  padding-bottom: 10px;
}

.dropzone {
  display: grid;
  place-content: center;
  min-height: 220px;
  text-align: center;
}

.dropzone span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.dropzone strong {
  font-size: 16px;
}

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

.compact-uploads .dropzone {
  position: relative;
  min-height: 118px;
  padding: 16px;
  place-content: center;
  cursor: pointer;
}

.compact-uploads .dropzone strong {
  font-size: 14px;
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads {
  gap: 12px;
  margin-top: 12px;
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .dropzone {
  grid-template-columns: 40px minmax(0, 1fr) 30px;
  gap: 12px;
  place-content: stretch;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border-style: solid;
  border-color: #dbe5ef;
  background: #f8fafc;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .dropzone::after {
  content: none;
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .dropzone:hover,
:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .dropzone:focus-within {
  border-color: rgba(0, 105, 217, 0.45);
  background: #f3f8ff;
  box-shadow: 0 0 0 3px rgba(0, 105, 217, 0.08);
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .upload-action-icon,
:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .upload-action-plus {
  display: inline-grid;
  place-items: center;
  margin-top: 0;
  border-radius: 50%;
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .upload-action-icon {
  width: 40px;
  height: 40px;
  background: #eaf4ff;
  color: var(--blue);
  font-size: 20px;
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .upload-action-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  margin-top: 0;
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .upload-action-copy span {
  margin-top: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .upload-action-plus {
  width: 30px;
  height: 30px;
  background: #e0f2fe;
  color: var(--blue);
  font-size: 19px;
}

:is(#create-project-view, .calendar-inline-job-editor) .compact-uploads .dropzone strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  #create-project-view .page-wrap {
    padding-inline: 16px;
  }

  #create-project-view .project-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #create-project-view .project-form-column:last-child {
    position: static;
  }
}

@media (max-width: 760px) {
  #create-project-view .page-wrap {
    padding-inline: 12px;
  }

  #create-project-view .surface {
    padding: 16px;
  }

  #create-project-view .date-source-row,
  #create-project-view .shift-row,
  #create-project-view .quote-question-grid,
  #create-project-view .segmented-field,
  #create-project-view .paint-option-grid,
  #create-project-view .compact-uploads {
    grid-template-columns: minmax(0, 1fr);
  }

  #create-project-view .field-label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  #create-project-view .inline-checkbox.small-checkbox {
    margin-bottom: 0;
    white-space: normal;
  }
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nav-item,
.topbar-actions,
.search input,
.ghost-button,
.primary-button,
.link-button,
.icon-button,
.segment,
.chip,
.input,
.clean-list button,
.template-list button,
.table-row,
.staff-row,
.timeline-item,
.sync-card,
.profile-preview,
.email-shell,
.setting-row,
.assigned-person {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.primary-button,
.ghost-button,
.topbar-new,
.chip,
.segment,
.status-chip,
.pill,
.count,
.badge {
  font-weight: 700;
}

.mini-header h2,
.surface h2,
.team-card h3,
.ai-assign-card h3 {
  margin-top: 0;
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: 0;
}

.metric span,
.metric small,
.team-card p,
.clean-list span,
.template-list button span,
.setting-row div span,
.profile-preview span,
.profile-preview dt,
.timeline-item small,
.staff-row small,
.email-shell .muted,
.compliance-note,
.dropzone span,
.assigned-person small {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

.metric strong {
  font-size: var(--fs-metric);
  line-height: 1.05;
  font-weight: 800;
}

.mini-metric strong {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
}

.vehicle-form .vehicle-state-trigger,
.vehicle-form .vehicle-choice-trigger,
.vehicle-form .vehicle-state-trigger [data-vehicle-state-label],
.vehicle-form .vehicle-choice-trigger [data-vehicle-choice-label] {
  color: var(--text);
  font-weight: 800;
  opacity: 1;
}

.vehicle-form .vehicle-state-trigger .icon,
.vehicle-form .vehicle-choice-trigger .icon {
  color: var(--muted);
}

.vehicle-form input.input {
  cursor: text;
}

.vehicle-form .input:focus,
.vehicle-form .vehicle-state-trigger:focus,
.vehicle-form .vehicle-choice-trigger:focus {
  border-color: rgba(8, 116, 216, 0.65);
  box-shadow: 0 0 0 3px rgba(8, 116, 216, 0.12);
  outline: none;
}

.vehicle-form .vehicle-status-preview {
  display: flex;
  align-items: center;
  min-height: 40px;
  cursor: default;
  font-weight: 800;
}

.vehicle-form .vehicle-status-preview.green {
  color: #0f8a4b;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.vehicle-form .vehicle-status-preview.amber {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.vehicle-form .vehicle-status-preview.red {
  color: #b91c1c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.table-row.header,
.field-label,
.detail-row span,
.ai-assignment-result > span {
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 800;
  line-height: var(--lh-tight);
  text-transform: uppercase;
}

.job-card {
  font-size: var(--fs-xs);
  line-height: 1.25;
}

.job-card strong {
  font-size: var(--fs-xs);
  line-height: 1.2;
  font-weight: 800;
}

.job-card small,
.job-card span {
  font-size: var(--fs-2xs);
  line-height: 1.25;
}

.login-panel h1 {
  font-size: 30px;
  line-height: 1.12;
  font-weight: 800;
}

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

.progress-item {
  display: grid;
  gap: 8px;
}

.progress-item div {
  height: 8px;
  border-radius: 999px;
  background: #e5edf6;
  overflow: hidden;
}

.progress-item div span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.progress-item strong {
  font-size: 13px;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}

.drawer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 260ms ease;
}

.mobile-fab {
  display: none;
}

.crew-view {
  background: #eef4fb;
}

.crew-mobile-shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 16px;
  background: var(--surface-muted);
}

.crew-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.crew-app-bar h1 {
  margin: 2px 0 0;
  font-size: 30px;
  line-height: 1.05;
}

.crew-weather,
.crew-summary-card,
.crew-card,
.crew-job-pill {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.crew-weather {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
}

.crew-weather .material-symbols-rounded {
  color: #eab308;
}

.crew-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 13px;
  border-radius: 14px;
}

.crew-summary-card div,
.crew-section-title div {
  display: grid;
  gap: 2px;
}

.crew-summary-card span,
.crew-section-title span,
.crew-info-grid span,
.crew-notes span,
.crew-time-grid span,
.crew-timesheet-note span {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
}

.crew-job-strip {
  display: flex;
  gap: 10px;
  margin: 0 -16px 12px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.crew-job-strip::-webkit-scrollbar {
  display: none;
}

.crew-job-pill {
  display: grid;
  flex: 0 0 174px;
  gap: 4px;
  min-height: 98px;
  padding: 13px;
  border-radius: 14px;
  text-align: left;
}

.crew-job-pill.active {
  border-color: rgba(8, 116, 216, 0.42);
  box-shadow: 0 14px 36px rgba(8, 116, 216, 0.18);
}

.crew-job-pill span,
.crew-job-pill small {
  color: var(--muted);
}

.crew-job-pill.green {
  background: #f0fdf7;
}

.crew-job-pill.amber {
  background: #fffbeb;
}

.crew-card {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 16px;
}

.crew-job-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: -2px -2px 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-muted);
}

.crew-job-hero.green {
  background: #ecfdf5;
}

.crew-job-hero.amber {
  background: #fffbeb;
}

.crew-job-hero span,
.crew-job-hero p {
  margin: 0;
  color: var(--muted);
}

.crew-job-hero h2 {
  margin: 3px 0;
  font-size: 21px;
  line-height: 1.15;
}

.crew-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.crew-info-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.crew-info-grid strong {
  overflow-wrap: anywhere;
}

.crew-notes {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: var(--surface-muted);
}

.crew-notes p {
  margin: 0;
}

.crew-action-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.crew-action-bar .primary-button,
.crew-action-bar .ghost-button,
.crew-timesheet .primary-button {
  width: 100%;
  min-height: 46px;
}

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

.crew-photo-list {
  display: grid;
  gap: 9px;
}

.crew-photo-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
}

.crew-photo-item.done {
  border-color: rgba(34, 160, 107, 0.28);
  background: #f0fdf7;
}

.crew-photo-item .material-symbols-rounded {
  color: var(--blue);
}

.crew-photo-item.done .material-symbols-rounded {
  color: var(--green);
}

.crew-photo-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.crew-photo-item small,
.crew-photo-item em {
  color: var(--muted);
  font-style: normal;
}

.crew-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.crew-stock-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 10px;
}

.crew-stock-summary label,
.crew-time-grid label,
.crew-timesheet-note {
  display: grid;
  gap: 6px;
}

.crew-stock-summary span,
.crew-stock-note span {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
}

.crew-stock-note {
  display: grid;
  gap: 3px;
  margin: 10px 0;
  padding: 11px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: var(--surface-muted);
}

.crew-stock-note small {
  color: var(--muted);
}

.crew-stock-note + .primary-button {
  width: 100%;
  min-height: 44px;
}

.crew-timesheet-note {
  margin: 10px 0;
}

.crew-issue-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.crew-issue-types .chip {
  flex: 1 1 calc(50% - 4px);
  justify-content: center;
  min-width: 0;
}

.crew-issue-panel textarea {
  resize: vertical;
}

.drawer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(520px, 100%);
  height: min(100dvh, 100%);
  max-height: 100dvh;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(34px);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
  will-change: transform, opacity;
}

.drawer.open .drawer-panel {
  opacity: 1;
  transform: translateX(0);
}

.drawer.client-drawer {
  align-items: flex-start;
}

.drawer.client-drawer .drawer-panel {
  width: min(520px, calc(100vw - 32px));
  height: auto;
  max-height: calc(100dvh - 32px);
  margin: 16px;
  border: 1px solid rgba(207, 216, 229, 0.72);
  border-radius: 10px;
}

.drawer.client-drawer .drawer-header {
  margin-bottom: 14px;
}

.drawer.client-drawer .icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.drawer-header h2:focus {
  outline: none;
}

#drawerBody {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
}

.icon-button.small {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 999px;
}

.drawer-grid {
  display: grid;
  gap: 12px;
}

.crew-profile-event-layout {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 100%;
  margin: 0 -4px;
  padding: 12px;
  border-radius: 14px;
  background: #f7f7f8;
}

.crew-profile-card {
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.78);
}

.crew-profile-info-row {
  grid-template-columns: 128px minmax(0, 1fr);
}

.crew-profile-info-row > span {
  min-width: 0;
  color: #111827;
  font-weight: 500;
  text-transform: none;
}

.crew-profile-info-row > strong {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.crew-profile-actions {
  display: grid;
}

.crew-profile-actions .primary-button {
  width: 100%;
  min-height: 44px;
}

.crew-resource-review {
  display: grid;
  gap: 14px;
  padding: 2px 0 4px;
}

.crew-resource-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.crew-resource-section-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crew-resource-section-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
}

.crew-resource-section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.crew-resource-privacy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.crew-resource-privacy .material-symbols-rounded {
  font-size: 14px;
}

.crew-resource-loading,
.crew-resource-error {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.crew-resource-loading-icon,
.crew-resource-error-icon,
.crew-resource-overview-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #eaf2ff;
  color: var(--blue);
}

.crew-resource-loading-icon .material-symbols-rounded,
.crew-resource-error-icon .material-symbols-rounded,
.crew-resource-overview-icon .material-symbols-rounded {
  font-size: 21px;
}

.crew-resource-loading > div,
.crew-resource-error > div {
  display: grid;
  gap: 3px;
}

.crew-resource-loading strong,
.crew-resource-error strong {
  font-size: 13px;
}

.crew-resource-loading span,
.crew-resource-error span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.crew-resource-overview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.crew-resource-overview-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.crew-resource-overview-top > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crew-resource-overview-top > div strong {
  color: var(--text);
  font-size: 13px;
}

.crew-resource-overview-top > div span,
.crew-resource-overview p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.crew-resource-overview-value {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.crew-resource-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe7f5;
}

.crew-resource-progress span {
  display: block;
  width: var(--resource-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.crew-resource-overview p {
  margin: 0;
}

.crew-resource-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.crew-resource-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.crew-resource-card:last-child {
  border-bottom: 0;
}

.crew-resource-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.crew-resource-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crew-resource-header h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.crew-resource-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.crew-resource-type-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--blue);
}

.crew-resource-type-icon .material-symbols-rounded {
  color: inherit;
  font-size: 19px;
}

.crew-resource-doc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.crew-resource-card.single-capture .crew-resource-doc-list {
  grid-template-columns: minmax(0, 1fr);
}

.crew-resource-doc {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 66px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.crew-resource-preview,
.crew-resource-empty {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.crew-resource-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crew-resource-empty .material-symbols-rounded {
  color: #94a3b8;
  font-size: 20px;
}

.crew-resource-file-link {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  background: var(--surface);
}

.crew-resource-doc-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.crew-resource-doc-copy strong,
.crew-resource-doc-copy span,
.crew-resource-doc-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.crew-resource-doc-copy strong {
  color: var(--text);
  font-size: 12px;
}

.crew-resource-doc-copy span,
.crew-resource-doc-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.crew-resource-doc-state {
  grid-column: 2 / -1;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.crew-resource-doc-state .material-symbols-rounded {
  font-size: 14px;
}

.crew-resource-doc-state.green {
  color: var(--green);
}

.crew-resource-doc-state.amber {
  color: #b45309;
}

.crew-resource-doc-state.red {
  color: var(--red);
}

.crew-resource-doc-state-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #94a3b8;
}

.crew-resource-doc-state-icon .material-symbols-rounded {
  font-size: 17px;
}

.crew-resource-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.crew-resource-actions .compact-button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 11px;
}

:root[data-theme="dark"] .crew-resource-overview {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(96, 165, 250, 0.08);
}

:root[data-theme="dark"] .crew-resource-loading-icon,
:root[data-theme="dark"] .crew-resource-error-icon,
:root[data-theme="dark"] .crew-resource-overview-icon {
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
}

:root[data-theme="dark"] .crew-resource-progress {
  background: rgba(148, 163, 184, 0.2);
}

@media (max-width: 520px) {
  .crew-resource-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .crew-resource-doc-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.job-info-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.job-info-detail-grid .detail-row.full {
  grid-column: 1 / -1;
}

.detail-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.job-section-header {
  margin-bottom: 12px;
}

.job-section-header .header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.job-click-edit-section {
  border-radius: 10px;
  cursor: pointer;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.job-click-edit-section:hover {
  background: #f8fbff;
}

.job-click-edit-section:focus-visible {
  background: #f8fbff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  outline: 0;
}

.job-edit-required-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  margin: -4px 0 14px;
}

.job-edit-required-note span,
.required-star {
  color: #dc2626;
  font-weight: 900;
}

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

.job-modern-section-card {
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.78);
  overflow: visible;
}

.job-modern-edit-row {
  grid-template-columns: 116px minmax(0, 1fr);
  min-height: 52px;
  padding: 0 13px;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
}

.job-modern-edit-row > span {
  min-width: 0;
  color: #111827;
  font-weight: 500;
  text-transform: none;
}

.job-modern-edit-row > span em {
  color: #dc2626;
  font-style: normal;
  font-weight: 800;
}

.job-modern-pill-input {
  justify-self: end;
  width: 100%;
  min-height: 36px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: #f4f4f5;
  color: #111827;
  font-size: 13px;
  font-weight: 750;
  text-align: right;
}

.job-modern-pill-input::placeholder {
  color: #8c8f96;
  opacity: 1;
}

.job-modern-pill-input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 0;
}

.job-modern-select-row select.job-modern-pill-input {
  cursor: pointer;
  text-align-last: right;
}

.job-modern-edit-row .modern-select-toggle {
  text-align: right;
}

.job-modern-edit-row .modern-select-toggle span {
  text-align: right;
}

.job-modern-date-time-row {
  position: relative;
  grid-template-columns: minmax(78px, 0.8fr) minmax(142px, 1.35fr) minmax(82px, 0.8fr);
  column-gap: 6px;
  overflow: visible;
}

.job-modern-date-time-row .shared-date-picker-field {
  justify-self: end;
  width: 100%;
}

.job-modern-date-time-row .shared-time-picker-field {
  justify-self: end;
  width: 100%;
}

.job-modern-date-time-row .shared-date-picker-field > .job-modern-pill-input {
  min-width: 142px;
  padding-right: 31px;
  text-align: center;
}

.job-modern-date-time-row .shared-date-picker-toggle {
  right: 4px;
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.job-modern-date-time-row .shared-date-picker-popover {
  top: calc(100% + 8px);
  left: 0;
  width: min(320px, calc(100vw - 32px));
}

.job-modern-schedule-card {
  overflow: visible;
  position: relative;
  z-index: 4;
}

.job-edit-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.job-edit-field .field-label {
  line-height: 1.15;
  margin: 0;
}

.job-edit-control {
  position: relative;
}

.job-edit-control .input {
  font-weight: 600;
}

.job-edit-control.has-affordance .input {
  padding-right: 38px;
}

.job-edit-control > .material-symbols-rounded {
  color: #64748b;
  font-size: 19px;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.job-edit-control select.input {
  cursor: pointer;
}

.surface:has(.job-edit-field) {
  padding-bottom: 20px;
}

.job-inline-form .field-label {
  margin: 0;
}

.job-inline-form .form-row {
  margin: 0;
}

.job-inline-form {
  gap: 14px;
}

.job-inline-form .form-row {
  gap: 12px;
}

.job-inline-form .textarea {
  min-height: 96px;
}

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

  .brand div:not(.brand-mark),
  .nav-item span:not(.icon),
  .sidebar-footer .user-card-copy,
  .sidebar-footer .user-menu-caret {
    display: none;
  }

  .sidebar-footer .user-menu-trigger {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .sidebar-footer .user-menu {
    right: auto;
    width: 220px;
  }

  .sidebar {
    padding: 18px 12px;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .calendar-layout,
  .staff-setup-hero,
  .staff-register-grid,
  .two-column,
  .marketing-grid,
  .communications-layout,
  .project-form-grid,
  .settings-grid,
  .settings-menu-list,
  .settings-integration-grid,
  .settings-split,
  .dashboard-command-layout,
  .dashboard-bottom-grid,
  .client-crm-layout,
  .client-crm-grid,
  .command-layout,
  .job-detail-shell,
  .job-detail-grid,
  .report-layout {
    grid-template-columns: 1fr;
  }

  .job-detail-side {
    margin-top: 0;
    position: static;
  }

  .job-detail-status-strip,
  .job-detail-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-detail-status-strip .job-status-card + .job-status-card {
    border-left: 0;
  }

  .job-detail-status-strip .job-status-card:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .job-detail-status-strip .job-status-card:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .job-status-card,
  .job-weather-card {
    grid-template-columns: 70px minmax(0, 1fr);
    min-height: 190px;
    padding: 26px;
  }

  .job-status-icon,
  .job-weather-visual {
    font-size: 34px;
    height: 70px;
    width: 70px;
  }

  .job-weather-visual .material-symbols-rounded {
    font-size: 36px;
  }

  .job-email-template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .job-email-history-table {
    overflow-x: auto;
  }

  .job-info-detail-grid {
    grid-template-columns: 1fr;
  }

  .job-file-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-file-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-image-viewer-backdrop {
    padding: 0;
  }

  .job-image-viewer {
    border-radius: 0;
    height: 100vh;
    max-width: 100vw;
    width: 100vw;
  }

  .job-image-viewer-head,
  .job-image-viewer-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .job-image-viewer-actions {
    width: 100%;
    justify-content: space-between;
  }

  .job-image-viewer-stage {
    min-height: 0;
  }

  .job-image-viewer-stage > img {
    height: auto;
    max-height: calc(100vh - 220px);
  }

  .job-image-viewer-nav {
    height: 42px;
    width: 42px;
  }

  .job-image-viewer-nav.prev {
    left: 10px;
  }

  .job-image-viewer-nav.next {
    right: 10px;
  }

  .job-file-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .job-file-row em {
    grid-column: 2;
    justify-self: start;
  }

  .lifecycle-strip,
  .report-grid,
  .dispatch-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ops-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ops-report-layout,
  .secondary-report-layout,
  .drilldown-report-layout {
    grid-template-columns: 1fr;
  }

  .ops-alert-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .document-checklist,
  .approval-strip,
  .funnel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-staff-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .staff-setup-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .job-detail-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-side,
  .communication-detail,
  .client-directory,
  .client-crm-side {
    position: static;
  }

  .client-crm-side {
    grid-column: auto;
  }

  .onboarding-checklist {
    grid-template-columns: 1fr;
  }

  .ops-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

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

  body {
    background: var(--surface);
    -webkit-tap-highlight-color: rgba(8, 116, 216, 0.14);
  }

  .job-detail-header {
    display: grid;
  }

  .job-detail-header .header-actions {
    justify-content: stretch;
    min-width: 0;
  }

  .job-detail-status-strip,
  .job-detail-content-grid,
  .job-overview-detail-grid,
  .job-email-template-grid,
  .crew-document-grid {
    grid-template-columns: 1fr;
  }

  .job-overview-info-item:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .job-overview-info-item:last-child {
    border-bottom: 0;
  }

  .job-dispatch-list {
    grid-template-columns: 1fr;
  }

  .job-dispatch-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .job-email-section-head,
  .job-messages-head,
  .job-tab-placeholder {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .job-email-section-head,
  .job-messages-head {
    display: grid;
  }

  .job-message-head-actions {
    align-items: stretch;
    justify-items: stretch;
  }

  .job-message-participants {
    justify-content: flex-start;
    min-width: 0;
  }

  .job-message-thread {
    max-height: 64vh;
    min-height: 280px;
    padding: 12px;
  }

  .job-message-input-row {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .job-message-tool-button,
  .job-message-send-button {
    height: 36px;
    width: 36px;
  }

  .job-message-emoji-picker {
    left: auto;
    max-width: 100%;
    right: 36px;
    width: max-content;
  }

  .job-message-emoji-grid {
    grid-template-columns: repeat(5, 42px);
  }

  .job-status-card + .job-status-card {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .job-detail-status-strip .job-status-card:nth-child(even) {
    border-left: 0;
  }

  .job-status-card,
  .job-weather-card {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 150px;
    padding: 22px;
  }

  .job-status-icon,
  .job-weather-visual {
    font-size: 31px;
    height: 64px;
    width: 64px;
  }

  .job-weather-visual .material-symbols-rounded {
    font-size: 32px;
  }

  .job-status-card strong,
  .job-weather-card strong {
    font-size: 24px;
  }

  .job-status-card .status-chip {
    font-size: 14px;
    min-height: 30px;
    padding: 3px 13px;
  }

  .job-status-outline-button,
  .job-status-primary-button {
    font-size: 15px;
    min-height: 48px;
    padding: 0 20px;
  }

  .job-title-row h1 {
    font-size: 26px;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    height: calc(72px + env(safe-area-inset-bottom));
    flex-direction: row;
    align-items: center;
    gap: 0;
    overflow: hidden;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08);
  }

  .brand,
  .sidebar-footer {
    display: none;
  }

  .nav-list {
    display: flex;
    flex: 1;
    justify-content: space-between;
    gap: 4px;
    min-width: 0;
    margin: 0;
    overflow: visible;
  }

  .nav-item {
    display: none;
  }

  .nav-item[data-view="dashboard"],
  .nav-item[data-view="calendar"],
  .nav-item[data-view="crew"],
  .nav-item[data-view="jobs"],
  .nav-item[data-view="time"] {
    display: grid;
    flex: 1 1 0;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 56px;
    padding: 7px 8px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    touch-action: manipulation;
  }

  .nav-item[data-view="dashboard"] {
    order: 1;
  }

  .nav-item[data-view="calendar"] {
    order: 2;
  }

  .nav-item[data-view="crew"] {
    order: 3;
  }

  .nav-item[data-view="jobs"] {
    order: 4;
  }

  .nav-item[data-view="time"] {
    order: 5;
  }

  .nav-item[data-view="dashboard"] span:not(.icon),
  .nav-item[data-view="calendar"] span:not(.icon),
  .nav-item[data-view="crew"] span:not(.icon),
  .nav-item[data-view="jobs"] span:not(.icon),
  .nav-item[data-view="time"] span:not(.icon) {
    display: none;
  }

  .nav-item[data-mobile-label]::after {
    content: attr(data-mobile-label);
    display: block;
    max-width: 66px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-item .count,
  .nav-item .badge {
    display: none !important;
  }

  .nav-item .icon {
    font-size: 22px;
  }

  .nav-item.active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(32, 33, 36, 0.22);
  }

  body[data-role="admin"] .sidebar {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    overflow: hidden;
  }

  body[data-role="admin"] .nav-list,
  body[data-role="admin"] .sidebar-footer {
    display: contents;
  }

  body[data-role="admin"] .sidebar-footer .user-card,
  body[data-role="admin"] .nav-item[data-admin-phone-tab="false"] {
    display: none !important;
  }

  body[data-role="admin"] .nav-item[data-admin-phone-tab="true"] {
    display: grid !important;
    flex: 1 1 0;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 56px;
    padding: 7px 4px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    touch-action: manipulation;
  }

  body[data-role="admin"] .nav-item[data-view="calendar"] {
    order: 1;
  }

  body[data-role="admin"] .nav-item[data-view="jobs"] {
    order: 2;
  }

  body[data-role="admin"] .nav-item[data-view="staff"] {
    order: 3;
  }

  body[data-role="admin"] .nav-item[data-view="clients"] {
    order: 4;
  }

  body[data-role="admin"] .nav-item[data-view="assets"] {
    order: 5;
  }

  body[data-role="admin"] .nav-item[data-view="notifications"] {
    order: 6;
  }

  body[data-role="admin"] .nav-item[data-view="settings"] {
    order: 7;
  }

  body[data-role="admin"] .nav-item[data-admin-phone-tab="true"] span:not(.icon) {
    display: none;
  }

  body[data-role="admin"] .nav-item[data-admin-phone-tab="true"][data-mobile-label]::after {
    content: attr(data-mobile-label);
    display: block;
    max-width: 54px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-role="admin"] .nav-item[data-admin-phone-tab="true"].active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(32, 33, 36, 0.22);
  }

  .mobile-fab {
    position: fixed;
    right: 16px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 45;
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 14px 34px rgba(8, 116, 216, 0.34);
  }

  .mobile-fab span {
    font-size: 28px;
  }

  body[data-view="create-project"] .mobile-fab,
  body[data-view="dashboard"] .mobile-fab,
  body[data-view="calendar"] .mobile-fab,
  body[data-view="crew"] .mobile-fab,
  body[data-view="jobs"] .mobile-fab,
  body[data-view="clients"] .mobile-fab,
  body[data-view="reports"] .mobile-fab,
  body[data-view="settings"] .mobile-fab,
  body[data-view="login"] .mobile-fab {
    display: none;
  }

  body[data-role="admin"] .mobile-fab {
    display: none;
  }

  body[data-view="crew"] .topbar {
    display: none;
  }

  body[data-view="crew"] .app-shell {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  body[data-view="crew"] .main {
    padding-bottom: 0;
  }

  .crew-mobile-shell {
    width: 100%;
    min-height: calc(100dvh - 72px - env(safe-area-inset-bottom));
    padding: 14px 12px 18px;
  }

  .crew-job-strip {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .crew-stock-summary {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px 8px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
  }

  body[data-view="calendar"] .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 8px 12px;
  }

  body[data-view="calendar"] .search {
    display: none;
  }

  body[data-view="calendar"] .topbar-actions {
    display: grid;
    grid-template-columns: 44px minmax(72px, 1fr);
    justify-content: stretch;
    gap: 6px;
    overflow: visible;
    padding-bottom: 0;
  }

  body[data-view="calendar"] .topbar-new {
    min-width: 44px;
    padding: 0 10px;
  }

  body[data-view="calendar"] .topbar-separator {
    display: none;
  }

  body[data-view="calendar"] .weather-card {
    width: 100%;
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
  }

  body[data-view="calendar"] .weather-card {
    justify-content: center;
  }

  body[data-view="calendar"] .topbar-new > span:not(.plus-mark) {
    display: none;
  }

  body[data-role="admin"] .topbar {
    min-height: 55px;
  }

  body[data-role="admin"] .topbar .search {
    display: none;
  }

  body[data-role="admin"] .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .search {
    width: 100%;
    max-width: none;
  }

  .search input {
    min-height: 40px;
  }

  .topbar-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar-separator {
    display: none;
  }

  .topbar-new,
  .today-button,
  .date-button,
  .weather-card,
  .icon-button {
    flex: 0 0 auto;
    min-height: 38px;
  }

  .topbar-new .caret {
    display: none;
  }

  .topbar-new {
    padding: 0 8px;
  }

  .date-button {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .weather-card {
    gap: 6px;
    padding: 0 6px;
  }

  .weather-card small {
    display: none;
  }

  .header-tools,
  .section-header {
    flex-wrap: wrap;
  }

  .calendar-date-controls,
  .calendar-team-filter {
    width: 100%;
    margin-left: 0;
  }

  .calendar-team-filter {
    flex-basis: 100%;
  }

  .calendar-date-controls .today-button {
    flex: 0 0 auto;
  }

  .calendar-date-controls .topbar-date {
    flex: 1 1 0;
    min-width: 0;
  }

  .section-header {
    align-items: flex-start;
    gap: 12px;
  }

  .section-header .primary-button,
  .section-header .ghost-button {
    min-height: 40px;
  }

  .main {
    min-width: 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .calendar-panel,
  .ops-panel,
  .page-wrap {
    padding: 14px 12px 18px;
    max-width: 100%;
    min-width: 0;
  }

  #jobs-view .page-wrap,
  #job-detail-view .page-wrap,
  #clients-view .page-wrap,
  #create-project-view .page-wrap {
    display: flex;
    flex-direction: column;
  }

  #jobs-view .command-layout,
  #job-detail-view .job-detail-grid,
  #clients-view .client-crm-layout,
  #create-project-view .project-form-grid {
    order: 1;
  }

  #jobs-view .ops-spine {
    order: 2;
  }

  body[data-role="admin"] #jobs-view .page-wrap > :not(.admin-phone-only),
  body[data-role="admin"] #staff-view .page-wrap > :not(.admin-phone-only),
  body[data-role="admin"] #assets-view .page-wrap > :not(.admin-phone-only),
  body[data-role="admin"] #notifications-view .page-wrap > :not(.admin-phone-only),
  body[data-role="admin"] #settings-view .page-wrap > :not(.admin-phone-only) {
    display: none;
  }

  body[data-role="admin"] .admin-phone-only {
    display: block;
  }

  .phone-command-screen {
    display: grid;
    gap: 12px;
  }

  .phone-screen-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .phone-screen-head h2 {
    margin: 2px 0 0;
    font-size: 22px;
    line-height: 1.15;
  }

  .phone-head-actions {
    display: grid;
    justify-items: end;
    gap: 6px;
  }

  .phone-head-actions .compact-button {
    min-height: 34px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .phone-group-list,
  .phone-group {
    display: grid;
    gap: 10px;
  }

  .phone-group h3 {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .phone-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 74px;
    padding: 11px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    text-align: left;
  }

  .phone-card.red {
    border-left-color: var(--red);
  }

  .phone-card.amber {
    border-left-color: var(--amber);
  }

  .phone-card.green {
    border-left-color: var(--green);
  }

  .phone-card.purple {
    border-left-color: var(--purple);
  }

  .phone-card.teal {
    border-left-color: var(--teal);
  }

  .phone-card:has(.avatar) {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .phone-card .avatar {
    width: 38px;
    height: 38px;
    font-size: 12px;
  }

  .phone-card span,
  .phone-card small {
    display: block;
    color: var(--muted);
    font-size: 11px;
  }

  .phone-card strong {
    display: block;
    margin: 2px 0;
    font-size: 14px;
    line-height: 1.2;
  }

  .phone-card .status-chip {
    white-space: nowrap;
  }

  .phone-account-card {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .phone-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }

  .phone-action-row .primary-button,
  .phone-action-row .ghost-button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .phone-segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-muted);
  }

  .phone-segmented button {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .phone-segmented button.active {
    background: var(--surface);
    color: var(--blue);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  }

  .calendar-stage {
    height: min(580px, calc(100dvh - 265px - env(safe-area-inset-bottom)));
    min-height: 360px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 8px;
  }

  .week-grid {
    min-width: 0;
    grid-template-columns: 56px repeat(7, minmax(0, 1fr));
    grid-template-rows: 42px 58px repeat(23, 38px);
    height: auto;
    min-height: 0;
  }

  .week-grid.all-day-expanded {
    grid-template-rows: 42px 112px repeat(23, 38px);
  }

  .month-grid {
    min-width: 0;
    grid-template-rows: 28px repeat(var(--month-week-count, 5), minmax(72px, 1fr));
    min-height: 500px;
  }

  .day-head {
    gap: 2px;
    padding: 4px 2px;
    font-size: 11px;
    font-weight: 700;
  }

  .day-head span {
    margin-top: 0;
    font-size: 10px;
    line-height: 1.1;
  }

  .day-head.current .date-dot {
    width: 20px;
    height: 20px;
    margin-top: 0;
  }

  .time-cell {
    padding-right: 8px;
    font-size: 10px;
    line-height: 1.1;
  }

  .time-cell:not(.all-day-label) {
    transform: translateY(-6px);
  }

  .all-day-label {
    min-height: 0;
    padding-top: 8px;
    gap: 14px;
  }

  .calendar-cell {
    padding: 3px;
  }

  .all-day-pill {
    width: 100%;
    min-height: 22px;
    margin-top: 3px;
    padding: 2px;
    border-radius: 5px;
    font-size: 8px;
    line-height: 1.05;
  }

  .job-chip {
    top: auto;
    left: auto;
    right: auto;
    gap: 1px;
    min-height: 17px;
    max-height: none;
    padding: 1px 2px;
    border-radius: 3px;
    overflow: hidden;
  }

  .job-chip .job-id {
    font-size: 8px;
  }

  .job-chip strong {
    font-size: 8px;
    line-height: 1.1;
  }

  .compact-calendar-item strong {
    font-size: 8px;
  }

  .compact-calendar-item small {
    font-size: 7px;
  }

  .job-chip::after {
    display: none;
  }

  .job-chip.open-slot {
    min-height: 38px;
  }

  .month-weekday {
    padding: 0 4px;
    font-size: 10px;
  }

  .month-day {
    padding: 5px 4px;
  }

  .month-day > strong {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .month-job {
    padding: 3px 4px;
    font-size: 8px;
    line-height: 1.1;
  }

  .metric,
  .surface,
  .team-card,
  .clean-list button,
  .template-list button,
  .setting-row,
  .profile-preview,
  .email-shell,
  .ai-assign-card,
  .ai-assignment-result {
    min-width: 0;
  }

  .metric-grid,
  .vehicle-metrics,
  .inventory-metrics,
  .team-board,
  .staff-register-grid,
  .site-staff-grid,
  .media-grid,
  .upload-grid,
  .campaign-stats,
  .form-row,
  .panel-grid,
  .mini-metrics,
  .assigned-crew-list,
  .ops-alert-strip,
  .dashboard-workspace,
  .dashboard-priority,
  .dashboard-command-layout,
  .dashboard-core-grid,
  .dashboard-side-panel,
  .dashboard-owner-grid,
  .dashboard-support-grid,
  .dashboard-bottom-grid,
  .attention-list,
  .lifecycle-strip,
  .report-grid,
  .ops-kpi-grid,
  .ops-report-layout,
  .secondary-report-layout,
  .drilldown-report-layout,
  .delay-grid,
  .email-health-grid,
  .dispatch-metrics,
  .document-checklist,
  .approval-strip,
  .funnel {
    grid-template-columns: 1fr;
  }

  .two-column,
  .marketing-grid,
  .communications-layout,
  .project-form-grid,
  .settings-grid,
  .settings-menu-list,
  .settings-integration-grid,
  .settings-split,
  .dashboard-command-layout,
  .dashboard-core-grid,
  .dashboard-side-panel,
  .dashboard-support-grid,
  .dashboard-bottom-grid,
  .client-crm-layout,
  .client-crm-grid,
  .command-layout,
  .report-layout {
    gap: 12px;
  }

  .client-profile-head,
  .client-profile-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .client-profile-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .client-profile-stats,
  .client-contact-strip,
  .client-health-grid,
  .client-account-overview-grid,
  .client-detail-field-grid,
  .client-money-grid,
  .client-site-card-display dl {
    grid-template-columns: 1fr;
  }

  .dashboard-card-wide {
    grid-column: auto;
  }

  .dashboard-owner-strip {
    grid-template-columns: 1fr;
  }

  .client-priority-action {
    grid-template-columns: 1fr;
  }

  .client-priority-action em {
    text-align: left;
  }

  .dashboard-priority {
    gap: 10px;
  }

  .dashboard-priority em,
  .dashboard-priority-actions {
    justify-self: stretch;
  }

  .dashboard-priority-actions {
    justify-content: flex-start;
  }

  .client-action-card,
  .client-reminder-row,
  .client-history-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .client-action-card em {
    text-align: left;
  }

  .dashboard-metrics .metric {
    min-height: 102px;
  }

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

  .today-job-card,
  .equipment-issue,
  .utilization-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-workspace {
    gap: 12px;
  }

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

  #dashboard-view .today-job-card .status-chip {
    justify-self: start;
  }

  .ops-combo-chart {
    min-width: 620px;
  }

  .report-volume-panel {
    overflow-x: auto;
  }

  .today-job-card .status-chip {
    justify-self: start;
  }

  body[data-view="dashboard"] .dashboard-bottom-grid > .surface > .mini-header .compact-button {
    display: none;
  }

  .communications-metrics {
    gap: 10px;
  }

  .communications-tabs {
    position: sticky;
    top: 93px;
    z-index: 8;
    margin: 0 -12px 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .communications-tabs .chip {
    flex: 0 0 auto;
  }

  .communication-detail {
    position: static;
  }

  .email-row,
  .message-context,
  .history-row,
  .email-admin-strip,
  .automation-checks {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-row-meta {
    justify-items: start;
    text-align: left;
  }

  .email-row-title {
    display: grid;
    gap: 2px;
  }

  .detail-title-row,
  .preview-header,
  .header-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .surface {
    padding: 14px;
  }

  .metric {
    padding: 14px;
  }

  .metric strong {
    font-size: 24px;
  }

  .timeline-item {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }

  .timeline-item small {
    grid-column: 2;
  }

  .section-header h1,
  .calendar-header h1 {
    font-size: 24px;
  }

  .clean-list button,
  .template-detail-list button,
  .project-form-grid .template-list button {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-bottom-actions {
    flex-direction: column-reverse;
  }

  .form-bottom-actions .ghost-button,
  .form-bottom-actions .primary-button {
    width: 100%;
  }

  .clean-list em,
  .template-detail-list button em,
  .project-form-grid .template-list button em {
    grid-column: 1;
    grid-row: auto;
    justify-self: flex-start;
  }

  .setting-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-screen {
    padding: 18px;
  }

  .login-panel {
    padding: 24px;
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
  }

  .table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .table-row {
    min-width: 760px;
  }

  .jobs-table .table-row {
    min-width: 0;
  }

  .staff-matrix .table-row {
    grid-template-columns: 140px 110px 110px 150px 150px 110px;
  }

  .client-import-table .table-row,
  .equipment-table .table-row,
  .integration-table .table-row {
    grid-template-columns: 170px 130px 180px 120px;
  }

  .equipment-asset-table .table-row {
    grid-template-columns: 190px 150px 210px 170px 120px 140px;
  }

  .vehicle-table .table-row,
  .inventory-table .table-row {
    grid-template-columns: 190px 120px 160px 130px 120px 140px;
  }

  .vehicle-table .table-row {
    grid-template-columns: 190px 150px 220px 180px 130px 150px;
  }

  .report-table .table-row {
    grid-template-columns: 170px 140px 110px 130px 160px;
  }

  .campaign-report-table .table-row {
    grid-template-columns: 230px 100px 100px 100px 120px 90px;
  }

  .report-drilldown-table .table-row {
    grid-template-columns: 160px 160px 110px 130px 180px 130px;
  }

  .action-card {
    grid-template-columns: 1fr;
  }

  .action-meta {
    justify-items: start;
    text-align: left;
  }

  .permission-grid,
  .state-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .permission-header,
  .review-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-row strong {
    text-align: left;
  }

  .app-toast {
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    min-width: 0;
    width: calc(100vw - 24px);
  }

  .drawer {
    align-items: flex-end;
  }

  .drawer.client-drawer {
    align-items: flex-end;
  }

  .drawer-panel {
    width: 100%;
    height: min(88dvh, 720px);
    padding: 18px;
    border-radius: 16px 16px 0 0;
    transform: translateY(28px);
  }

  .drawer.client-drawer .drawer-panel {
    width: 100%;
    height: min(88dvh, 720px);
    max-height: min(88dvh, 720px);
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }

  #drawerBody {
    padding-right: 0;
  }

  .crew-form .detail-actions.full {
    position: sticky;
    bottom: -18px;
    z-index: 2;
    margin: 8px -18px -18px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .client-form .client-identity-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .drawer.open .drawer-panel {
    transform: translateY(0);
  }
}

/* Status strip sizing/layout is driven by the main column's OWN width (container
   query on .job-detail-main), so it stays correct no matter how much the nav
   rail and right sidebar narrow the column.

   Whenever the column is wide enough to hold multiple cards side by side
   (>=460px) the cards switch to a compact, denser treatment — smaller icons and
   type, wrapping sublines — so they never clip. The very widest case (>=746px)
   then lays all four out in a single row. Below 460px (phones) the comfortable
   single-column treatment from the base/mobile rules applies. */
@container jobmain (min-width: 460px) {
  .job-status-card,
  .job-weather-card,
  .job-detail-status-strip .job-status-card:nth-child(3),
  .job-detail-status-strip .job-status-card:nth-child(4) {
    align-items: start;
    gap: 11px;
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 0;
    padding: 12px 16px;
  }

  .job-status-icon,
  .job-weather-visual,
  .job-summary-icon {
    font-size: 21px;
    height: 38px;
    width: 38px;
  }

  .job-weather-visual .material-symbols-rounded {
    font-size: 22px;
  }

  .job-status-card div {
    align-content: start;
    gap: 4px;
  }

  .job-summary-card .job-summary-copy {
    align-content: center;
    gap: 4px;
  }

  .job-summary-card.job-weather-card {
    gap: 11px;
    grid-template-columns: 38px minmax(0, 1fr);
    padding-left: 16px;
    padding-right: 16px;
  }

  .job-status-card span:not(.material-symbols-rounded):not(.job-ready-ring) {
    font-size: 11px;
    letter-spacing: 0.05em;
  }

  .job-status-card strong,
  .job-weather-card strong {
    font-size: 18px;
    line-height: 1.08;
    white-space: normal;
  }

  .job-summary-card small,
  .job-summary-card em {
    font-size: 10.5px;
    line-height: 1.15;
  }

  .job-readiness-head {
    align-items: baseline;
    display: flex;
  }

  .job-status-card .status-chip {
    font-size: 11px;
    min-height: 0;
    padding: 2px 8px;
  }

  .job-status-subline,
  .job-weather-updated,
  .job-weather-note {
    font-size: 10.5px;
    line-height: 1.12;
    white-space: normal;
  }

  .job-status-subline .material-symbols-rounded {
    font-size: 14px;
  }

  .job-status-card .job-weather-meta-line,
  .job-status-card .job-weather-meta-line span:not(.material-symbols-rounded) {
    font-size: 10.5px;
  }

  .job-status-outline-button,
  .job-status-primary-button {
    font-size: 12px;
    gap: 4px;
    min-height: 0;
    padding: 8px 10px;
  }

  .job-status-primary-button {
    box-sizing: border-box;
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .job-status-primary-button .material-symbols-rounded {
    font-size: 15px;
  }

  .job-detail-status-strip .job-status-card.job-progress-status-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  .job-detail-status-strip .job-progress-status-card {
    align-content: start;
    gap: 7px;
  }

  .job-detail-status-strip .job-progress-status-body {
    gap: 11px;
    grid-template-columns: 48px minmax(0, 1fr);
    width: 100%;
  }

  .job-detail-status-strip .job-ready-ring.small-ring {
    width: 48px;
  }

  .job-detail-status-strip .job-ready-ring.small-ring::before {
    inset: 6px;
  }

  .job-detail-status-strip .job-ready-ring.small-ring strong {
    font-size: 15px;
  }

  .job-detail-status-strip .job-ready-ring.small-ring small {
    font-size: 8px;
  }

  .job-detail-status-strip .job-progress-status-list {
    gap: 3px;
  }

  .job-detail-status-strip .job-progress-status-item {
    gap: 5px;
    min-height: 16px;
  }

  .job-detail-status-strip .job-progress-status-item strong {
    font-size: 11px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}

/* Wide enough to seat all status cards in a single row. Weather carries the
   least content, the progress checklist the most — weight the columns so the
   whitespace lands where the content is. */
@container jobmain (min-width: 746px) {
  .job-detail-status-strip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr);
  }

  .job-detail-status-strip .job-progress-status-list {
    column-gap: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 3px;
  }

  .job-detail-status-strip .job-progress-status-item strong {
    font-size: 10.5px;
    white-space: nowrap;
  }

  .job-detail-status-strip .job-status-card:nth-child(even) {
    border-left: 1px solid rgba(203, 213, 225, 0.78);
  }

  .job-detail-status-strip .job-status-card:nth-child(n + 3) {
    border-top: 0;
  }

  .job-detail-status-strip .job-status-card + .job-status-card {
    border-left: 1px solid rgba(203, 213, 225, 0.78);
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer,
  .drawer-panel,
  .calendar-detail-panel.event-editor-panel,
  .calendar-detail-panel.job-detail-view-panel,
  .calendar-event-details-view,
  .timetree-event-card,
  .event-details-menu,
  .event-members-panel,
  .event-label-options,
  .event-inline-panel,
  .event-reminder-panel,
  .event-reminder-unit-menu,
  .event-repeat-panel,
  .calendar-repeat-modal-backdrop,
  .calendar-repeat-modal,
  .event-time-picker-popover,
  .event-date-picker-popover,
  .calendar-url-preview-card,
  .calendar-todo-modal-backdrop,
  .calendar-discard-modal-backdrop,
  .calendar-discard-modal,
  .calendar-todo-modal,
  .job-image-viewer-backdrop,
  .job-image-viewer,
  .address-autocomplete-panel {
    animation: none;
    transition: none;
  }
}

/* Theme toggle button (topbar) */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.theme-toggle:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.theme-toggle .icon {
  font-size: 20px;
  opacity: 0.9;
}

.theme-toggle .theme-icon-dark {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-icon-light {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-icon-dark {
  display: inline;
}

/* ---- Loading skeletons ---- */
@keyframes cf-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-line,
.skeleton-block {
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--surface-muted) 25%,
    var(--line) 38%,
    var(--surface-muted) 55%
  );
  background-size: 200% 100%;
  animation: cf-skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-line {
  height: 11px;
}

.skeleton-row {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.skeleton-metric {
  display: grid;
  gap: 10px;
  align-content: start;
}

[aria-busy="true"] {
  cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line,
  .skeleton-block {
    animation: none;
  }
}

/* ---- Alert/error banners in dark mode ---- */
:root[data-theme="dark"] .form-alert {
  background: rgba(245, 158, 11, 0.14);
  color: #f3c98b;
}

:root[data-theme="dark"] .form-alert strong {
  color: #f7d9a8;
}

:root[data-theme="dark"] .resource-error-banner {
  background: rgba(220, 38, 38, 0.16);
  color: #f3b0b0;
}

:root[data-theme="dark"] .resource-error-banner strong {
  color: #f7c5c5;
}

/* ---- Skip to main content (keyboard a11y) ---- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--surface);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transform: translateY(-160%);
  transition: transform 150ms ease;
}

.skip-link:focus-visible,
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  #jobs-view .page-wrap {
    padding: 22px 14px 28px;
  }

  #jobs-view .jobs-page-header,
  .jobs-register .toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .jobs-ops-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .jobs-summary-card {
    min-height: 104px;
    padding: 18px;
  }

  .jobs-register .toolbar-row {
    min-height: 0;
  }

  .jobs-register .filter-row {
    width: 100%;
  }

  .jobs-toolbar-actions {
    align-self: flex-start;
  }

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

  .jobs-table .table-row {
    grid-template-columns: minmax(220px, 1.35fr) minmax(200px, 1.1fr) minmax(100px, 0.55fr) minmax(140px, 0.75fr) minmax(130px, 0.62fr) minmax(115px, 0.58fr) 28px;
    min-width: 980px;
    align-items: center;
  }
}

/* ---- Contextual job evidence and message reactions ---- */
.job-evidence-head,
.job-evidence-head > div,
.job-completion-alert,
.job-evidence-summary,
.job-evidence-list {
  display: flex;
  flex-direction: column;
}

.job-evidence-head {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.job-evidence-head > div {
  gap: 5px;
}

.job-evidence-head h2,
.job-evidence-head p,
.job-evidence-card h3 {
  margin: 0;
}

.job-evidence-head p,
.job-evidence-empty,
.job-evidence-row small,
.job-evidence-summary dt {
  color: var(--muted);
}

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

.job-evidence-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft, #f8fafc);
}

.job-evidence-card.wide {
  grid-column: span 1;
}

.job-evidence-list {
  gap: 10px;
}

.job-evidence-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.job-evidence-row > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.job-evidence-row.done > .material-symbols-rounded {
  color: var(--green, #16845b);
}

.job-evidence-row.issue > .material-symbols-rounded {
  color: var(--amber, #b66a00);
}

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

.job-evidence-photo-grid .job-file-gallery-card {
  min-width: 0;
}

.job-evidence-summary {
  gap: 10px;
  margin: 0;
}

.job-evidence-summary > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
}

.job-evidence-summary dt,
.job-evidence-summary dd {
  margin: 0;
}

.job-completion-alert {
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}

.job-completion-alert ul {
  margin: 0;
  padding-left: 20px;
}

.job-message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.job-message-reaction {
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.job-message-reaction.active {
  border-color: var(--brand, #2856d8);
  background: var(--brand-soft, #eef3ff);
}

@media (max-width: 760px) {
  .job-evidence-grid,
  .job-evidence-photo-grid {
    grid-template-columns: 1fr;
  }

  .job-evidence-head {
    flex-direction: column;
  }
}

/* ---- Team drawer: professional staff workflow ---- */
.drawer.team-drawer .drawer-panel {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}

.drawer.team-drawer .drawer-header {
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.drawer.team-drawer .drawer-header h2 {
  margin-top: 5px;
  font-size: 28px;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.drawer.team-drawer #drawerBody {
  padding-right: 0;
}

.team-form {
  gap: 14px;
}

.team-form-lede {
  margin: 0 2px 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.team-form-section {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.team-form-section-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.team-form-section-head > .material-symbols-rounded {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(11, 95, 232, 0.1);
  color: var(--blue);
  font-size: 20px;
}

.team-form-section-head h3,
.team-form-section-head p {
  margin: 0;
}

.team-form-section-head h3 {
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.team-form-section-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.team-form .field-label {
  margin-top: 0;
}

.team-form .field-label .input {
  min-height: 44px;
}

.team-selection-summary {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.team-selection-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
}

.team-selection-summary strong,
.team-selection-summary small {
  font-size: 10px;
  line-height: 1.2;
}

.team-selection-summary strong {
  color: var(--text);
}

.team-selection-summary small {
  color: var(--muted);
}

.team-search-field {
  position: relative;
  display: block;
}

.team-search-field > .material-symbols-rounded {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  color: var(--muted);
  font-size: 19px;
  pointer-events: none;
  transform: translateY(-50%);
}

.team-search-field .team-crew-search {
  min-height: 42px;
  margin-top: 0;
  padding-left: 40px;
  font-size: 12px;
}

.team-form .team-crew-list {
  max-height: 284px;
  margin-top: 0;
  overflow-y: auto;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.team-form .team-crew-option {
  grid-template-columns: 18px 38px minmax(0, 1fr) auto;
  gap: 11px;
  min-height: 70px;
  padding: 11px 12px;
  color: var(--text);
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.team-form .team-crew-option:hover {
  background: var(--surface-muted);
}

.team-form .team-crew-option.selected {
  background: rgba(11, 95, 232, 0.08);
  box-shadow: inset 3px 0 0 var(--blue);
}

.team-form .team-crew-option:focus-within {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--focus-ring);
}

.team-form .team-crew-option.selected:focus-within {
  box-shadow: inset 3px 0 0 var(--blue), inset 0 0 0 2px var(--focus-ring);
}

.team-form .team-crew-option > input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--blue);
}

.team-form .team-crew-option .avatar {
  width: 38px;
  height: 38px;
  font-size: 11px;
}

.team-form .team-member-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.team-form .team-member-copy strong,
.team-form .team-member-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-form .team-member-copy strong {
  color: var(--text);
  font-size: 13px;
}

.team-form .team-member-copy small {
  color: var(--muted);
  font-size: 11px;
}

.team-form .team-crew-option .status-chip {
  justify-self: end;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.team-form .team-form-message:empty {
  display: none;
}

.team-form .team-form-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.team-form .team-form-actions .primary-button,
.team-form .team-form-actions .ghost-button {
  min-height: 42px;
  padding-inline: 16px;
}

@media (max-width: 900px) {
  .drawer.team-drawer .drawer-panel {
    width: 100%;
    height: min(88dvh, 760px);
    max-height: min(88dvh, 760px);
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }

  .team-form .team-crew-option {
    grid-template-columns: 18px 38px minmax(0, 1fr);
  }

  .team-form .team-crew-option .status-chip {
    grid-column: 3;
    justify-self: start;
  }
}

/* ---- Core admin workspaces: Jobs, Clients, Equipment, Vehicles ---- */
:is(#jobs-view, #clients-view, #equipment-view, #vehicles-view) > .page-wrap {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px 34px 34px;
}

#jobs-view .jobs-page-header,
:is(#clients-view, #equipment-view, #vehicles-view) .admin-page-header {
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
}

:is(#clients-view, #equipment-view, #vehicles-view) .admin-page-header > div:first-child,
#jobs-view .jobs-page-header > div:first-child {
  display: block;
}

#jobs-view .jobs-page-header .eyebrow,
:is(#clients-view, #equipment-view, #vehicles-view) .admin-page-header .eyebrow,
.admin-panel-heading .eyebrow,
.admin-readiness-panel .eyebrow,
.admin-activity-panel .eyebrow {
  display: block;
  margin: 0 0 3px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

#jobs-view .jobs-page-header h1,
:is(#clients-view, #equipment-view, #vehicles-view) .admin-page-header h1,
#clients-view .clients-empty-header h1 {
  margin: 3px 0 6px;
  color: var(--text);
  font-size: var(--fs-title);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

#jobs-view .jobs-page-header span:not(.material-symbols-rounded),
:is(#clients-view, #equipment-view, #vehicles-view) .admin-page-header > div:first-child > span {
  display: block;
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

#jobs-view .jobs-page-header .header-actions,
:is(#clients-view, #equipment-view, #vehicles-view) .admin-page-header .header-actions,
:is(#equipment-view) .admin-page-header .section-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
}

#jobs-view .jobs-page-header .primary-button,
:is(#clients-view, #equipment-view, #vehicles-view) .admin-page-header .primary-button,
:is(#clients-view, #equipment-view, #vehicles-view) .admin-page-header .ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
  white-space: nowrap;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.admin-summary-grid .metric.admin-summary-card,
#jobs-view .jobs-summary-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-card);
}

#jobs-view .jobs-summary-card {
  grid-template-columns: 42px minmax(0, 1fr) 20px;
}

.admin-summary-grid .metric.admin-summary-card.green,
#jobs-view .jobs-summary-card.green {
  border-color: rgba(34, 160, 107, 0.32);
  background: var(--surface);
}

.admin-summary-grid .metric.admin-summary-card.amber,
#jobs-view .jobs-summary-card.amber {
  border-color: rgba(245, 158, 11, 0.34);
  background: var(--surface);
}

.admin-summary-grid .metric.admin-summary-card.red,
#jobs-view .jobs-summary-card.red {
  border-color: rgba(220, 38, 38, 0.3);
  background: var(--surface);
}

.admin-summary-grid .metric.admin-summary-card > .admin-summary-icon,
#jobs-view .jobs-summary-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: rgba(11, 95, 232, 0.1);
  color: var(--blue);
  font-size: 21px;
  box-shadow: none;
}

.admin-summary-card.green .admin-summary-icon,
#jobs-view .jobs-summary-card.green .jobs-summary-icon {
  background: rgba(34, 160, 107, 0.12);
  color: var(--green);
  box-shadow: none;
}

.admin-summary-card.amber .admin-summary-icon,
#jobs-view .jobs-summary-card.amber .jobs-summary-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #c87400;
  box-shadow: none;
}

.admin-summary-card.red .admin-summary-icon,
#jobs-view .jobs-summary-card.red .jobs-summary-icon {
  background: rgba(220, 38, 38, 0.1);
  color: var(--red);
  box-shadow: none;
}

.admin-summary-copy,
.jobs-summary-copy {
  display: grid;
  min-width: 0;
}

.admin-summary-copy em,
#jobs-view .jobs-summary-copy em {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-transform: uppercase;
}

.admin-summary-copy strong,
#jobs-view .jobs-summary-card strong {
  margin: 2px 0 3px;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.admin-summary-copy small,
#jobs-view .jobs-summary-copy small {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#jobs-view .jobs-summary-arrow {
  width: 20px;
  height: 20px;
  background: transparent;
  font-size: 20px;
}

.admin-workspace-grid,
.asset-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(330px, 0.72fr);
  align-items: start;
  gap: 16px;
}

.surface.admin-register-panel,
.surface.admin-readiness-panel,
.surface.admin-activity-panel {
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.admin-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.admin-panel-heading h2,
.admin-readiness-panel .mini-header h2,
.admin-activity-panel .mini-header h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.admin-panel-heading > div > span,
.admin-panel-intro {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-readiness-panel,
.admin-activity-panel {
  padding: 18px !important;
}

.admin-readiness-panel .mini-header,
.admin-activity-panel .mini-header {
  align-items: flex-start;
  margin: 0 0 12px;
}

.admin-readiness-panel .status-chip {
  margin-top: 1px;
  white-space: nowrap;
}

.admin-panel-intro {
  margin-bottom: 15px;
}

.admin-checklist {
  display: grid;
  gap: 8px;
}

.admin-checklist > div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.admin-checklist > div > .material-symbols-rounded {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue);
  font-size: 19px;
}

.admin-checklist > div.green > .material-symbols-rounded {
  color: var(--green);
}

.admin-checklist > div.amber > .material-symbols-rounded {
  color: #c87400;
}

.admin-checklist p,
.admin-checklist strong,
.admin-checklist small {
  display: block;
  min-width: 0;
  margin: 0;
}

.admin-checklist strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}

.admin-checklist small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

#jobs-view .jobs-command-layout {
  grid-template-columns: minmax(0, 1.8fr) minmax(330px, 0.72fr);
}

#jobs-view .jobs-register .toolbar-row {
  min-height: 54px;
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

#jobs-view .jobs-register .filter-row {
  gap: 3px;
}

#jobs-view .jobs-register .chip {
  min-height: 34px;
  padding: 7px 11px;
  border-color: transparent;
  background: transparent;
}

#jobs-view .jobs-register .chip.active {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#jobs-view .jobs-register .jobs-table,
#equipment-view .equipment-asset-table,
#equipment-view .inventory-table,
#vehicles-view .vehicle-table {
  padding: 0 12px 12px;
}

:is(#jobs-view, #equipment-view, #vehicles-view) .table-empty-row {
  padding: 12px 0 0;
  border-top: 0;
}

:is(#jobs-view, #equipment-view, #vehicles-view) .table-empty-row .empty-state,
#jobs-view .jobs-table > .empty-state {
  min-height: 172px;
  border-style: solid;
  border-color: var(--line);
  background: var(--surface-muted);
}

.admin-readiness-panel .empty-state,
.admin-activity-panel .empty-state {
  min-height: 184px;
  padding: 20px 14px;
  border-style: solid;
  border-color: var(--line);
  background: var(--surface-muted);
}

#clients-view .clients-empty-workspace {
  padding: 12px;
}

.admin-onboarding-empty {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 148px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.admin-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--blue);
  box-shadow: var(--shadow-card);
}

.admin-empty-icon .material-symbols-rounded {
  font-size: 23px;
}

.admin-onboarding-empty > div {
  display: grid;
  gap: 5px;
}

.admin-onboarding-empty strong {
  color: var(--text);
  font-size: 15px;
}

.admin-onboarding-empty > div > span {
  max-width: 62ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

#clients-view .clients-directory-workspace {
  padding: 12px;
}

#clients-view .clients-empty-count {
  color: var(--muted);
  font-size: 10px;
}

.asset-side-stack {
  display: grid;
  gap: 16px;
}

#equipment-view .stock-register-panel {
  margin: 0;
}

#equipment-view .asset-side-stack .empty-state {
  min-height: 146px;
}

#equipment-view .admin-activity-panel .empty-state {
  min-height: 126px;
}

#vehicles-view .fleet-readiness-panel > .ghost-button {
  width: 100%;
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .admin-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-workspace-grid,
  .asset-workspace-grid,
  #jobs-view .jobs-command-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :is(#jobs-view, #clients-view, #equipment-view, #vehicles-view) > .page-wrap {
    gap: 14px;
    padding: 18px 12px 24px;
  }

  #jobs-view .jobs-page-header,
  :is(#clients-view, #equipment-view, #vehicles-view) .admin-page-header,
  .admin-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-onboarding-empty {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .admin-onboarding-empty .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* ---- Desktop sidebar: compact professional navigation ---- */
@media (min-width: 901px) {
  .sidebar {
    gap: 0;
    padding: 18px 14px 14px;
    background: var(--surface);
    border-right-color: var(--line);
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.025);
  }

  .sidebar .brand {
    flex: 0 0 auto;
    height: 64px;
    padding: 0 10px 16px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
  }

  .sidebar .brand img {
    width: 174px;
    height: 44px;
    object-position: left center;
  }

  .sidebar .nav-list {
    grid-auto-rows: 44px;
    align-content: start;
    gap: 4px;
    margin: 0;
    padding: 0 2px 14px 0;
  }

  .sidebar .nav-item {
    position: relative;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 10px;
    height: 44px;
    min-height: 44px;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  }

  .sidebar .nav-item > .icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #5b6676;
    font-size: 19px;
    opacity: 1;
    transition: background-color 0.16s ease, color 0.16s ease;
  }

  .sidebar .nav-item:hover {
    border-color: rgba(148, 163, 184, 0.2);
    background: var(--surface-muted);
  }

  .sidebar .nav-item:hover > .icon {
    color: var(--text);
  }

  .sidebar .nav-item.active,
  .sidebar .nav-item.secondary.active {
    border-color: rgba(11, 95, 232, 0.16);
    background: rgba(11, 95, 232, 0.085);
    color: var(--blue);
    font-weight: 750;
    box-shadow: none;
  }

  .sidebar .nav-item.active::before {
    content: "";
    position: absolute;
    top: 11px;
    bottom: 11px;
    left: -1px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: var(--blue);
  }

  .sidebar .nav-item.active > .icon {
    background: rgba(11, 95, 232, 0.11);
    color: var(--blue);
  }

  .sidebar .nav-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }

  .sidebar .sidebar-footer {
    gap: 4px;
    padding-top: 12px;
  }

  .sidebar .nav-item.secondary {
    height: 40px;
    min-height: 40px;
    color: var(--muted);
  }

  .sidebar .user-card {
    padding-top: 12px;
    margin-top: 8px;
  }

  .sidebar .user-menu-trigger {
    min-height: 56px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
  }

  .sidebar .user-menu-trigger:hover {
    border-color: rgba(148, 163, 184, 0.2);
    background: var(--surface-muted);
  }

  .sidebar .user-menu-trigger[aria-expanded="true"] {
    border-color: rgba(11, 95, 232, 0.16);
    background: rgba(11, 95, 232, 0.065);
  }

  .sidebar .user-card-copy strong {
    font-size: 13px;
    font-weight: 750;
  }

  .sidebar .user-card-copy span {
    margin-top: 1px;
    font-size: 11px;
  }

  :root[data-theme="dark"] .sidebar {
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.12);
  }

  :root[data-theme="dark"] .sidebar .nav-item > .icon {
    color: #a7b0bf;
  }

  :root[data-theme="dark"] .sidebar .nav-item:hover {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.045);
  }

  :root[data-theme="dark"] .sidebar .nav-item.active,
  :root[data-theme="dark"] .sidebar .nav-item.secondary.active {
    border-color: rgba(96, 165, 250, 0.22);
    background: rgba(59, 130, 246, 0.14);
    color: #8dbbff;
    box-shadow: none;
  }

  :root[data-theme="dark"] .sidebar .nav-item.active > .icon {
    background: rgba(96, 165, 250, 0.14);
    color: #8dbbff;
  }

  :root[data-theme="dark"] .sidebar .user-menu-trigger:hover,
  :root[data-theme="dark"] .sidebar .user-menu-trigger[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.045);
  }
}

/* ---- Workspace settings: admin command centre ---- */
#settings-view > .page-wrap {
  max-width: 1760px;
  padding: 24px 28px 36px;
}

#settings-view .settings-page-header {
  align-items: flex-start;
  margin-bottom: 18px;
}

#settings-view .settings-page-header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

#settings-view .settings-page-header p {
  max-width: 66ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.settings-command-layout {
  display: grid;
  grid-template-columns: minmax(200px, 230px) minmax(520px, 1fr) minmax(270px, 310px);
  grid-template-rows: 104px minmax(682px, auto);
  gap: 16px;
  align-items: start;
}

.settings-workspace-health {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 54px minmax(190px, 1fr) minmax(180px, 230px) auto;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  padding: 18px 20px;
  box-shadow: none;
}

.settings-health-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 30px;
  font-variation-settings: "FILL" 0, "wght" 650, "GRAD" 0, "opsz" 32;
}

.settings-health-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-health-copy strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.settings-health-copy span {
  color: var(--muted);
  font-size: 13px;
}

.settings-health-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(20px, 1fr));
  gap: 6px;
}

.settings-health-progress span {
  height: 5px;
  border-radius: 999px;
  background: var(--line-strong);
}

.settings-health-progress span.complete {
  background: var(--green);
}

.settings-local-nav {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  gap: 4px;
  padding: 2px 14px 2px 0;
  border-right: 1px solid var(--line);
}

.settings-local-nav button {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.settings-local-nav button:hover {
  background: var(--surface-muted);
}

.settings-local-nav button.active {
  border-color: rgba(11, 95, 232, 0.08);
  background: rgba(11, 95, 232, 0.075);
  color: var(--blue);
}

.settings-local-nav button.active::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -1px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--blue);
}

.settings-local-nav button > .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #64748b;
  font-size: 20px;
}

.settings-local-nav button.active > .material-symbols-rounded {
  color: var(--blue);
}

.settings-local-nav button:focus-visible,
.settings-control-row:focus-visible,
.settings-rail-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.settings-command-main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}

.settings-command-main .settings-tab-panels {
  min-width: 0;
  min-height: 682px;
}

.settings-command-main .settings-panel {
  min-width: 0;
}

.settings-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.settings-panel-heading h2,
.settings-panel-heading p {
  margin: 0;
}

.settings-panel-heading h2 {
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.settings-panel-heading p {
  max-width: 62ch;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-control-list {
  display: grid;
  padding: 0 20px 14px;
}

.settings-control-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(100px, auto) 24px;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.settings-control-row:last-child {
  border-bottom: 0;
}

.settings-control-row:hover {
  margin-inline: -10px;
  padding-inline: 10px;
  border-radius: 9px;
  background: var(--surface-muted);
}

.settings-row-icon,
.settings-service-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(11, 95, 232, 0.08);
  color: var(--blue);
  font-size: 22px;
}

.settings-row-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.settings-row-copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.settings-row-copy small {
  max-width: 62ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-row-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

.settings-row-status .material-symbols-rounded {
  font-size: 18px;
}

.settings-row-status.green,
.settings-connected-ok {
  color: var(--green);
}

.settings-row-status.amber,
.settings-connected-warning {
  color: #c66a00;
}

.settings-row-arrow {
  color: #64748b;
  font-size: 22px;
}

.settings-command-rail {
  grid-column: 3;
  grid-row: 1 / 3;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.settings-rail-card {
  padding: 18px;
  box-shadow: none;
}

.settings-rail-card h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.3;
}

.settings-connected-list,
.settings-change-list {
  display: grid;
}

.settings-connected-list > div,
.settings-connected-list > button,
.settings-change-list > div {
  display: grid;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
}

.settings-connected-list > div,
.settings-connected-list > button {
  grid-template-columns: 38px minmax(0, 1fr) 22px;
}

.settings-connected-list > button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.settings-connected-list > button:hover,
.settings-connected-list > button:focus-visible {
  background: rgba(8, 102, 232, 0.045);
}

.settings-change-list > div {
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 82px;
}

.settings-connected-list p,
.settings-change-list p,
.settings-connected-list strong,
.settings-connected-list small,
.settings-change-list strong,
.settings-change-list small {
  display: block;
  min-width: 0;
  margin: 0;
}

.settings-connected-list strong,
.settings-change-list strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.settings-connected-list small,
.settings-change-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.settings-connected-list .settings-service-icon {
  width: 36px;
  height: 36px;
  background: var(--surface-muted);
  color: #475569;
  font-size: 19px;
}

.settings-connected-list > div > .material-symbols-rounded:last-child,
.settings-connected-list > button > .material-symbols-rounded:last-child {
  font-size: 19px;
}

.settings-change-list .avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.settings-rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  text-align: left;
  font-size: 12px;
  font-weight: 750;
}

.settings-rail-link:hover {
  text-decoration: underline;
}

.settings-rail-link .material-symbols-rounded {
  font-size: 20px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
}

.settings-prerequisite {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 18px 20px 0;
  padding: 12px 14px;
  border: 1px solid rgba(198, 106, 0, 0.22);
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.07);
}

.settings-prerequisite > .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.12);
  color: #b86100;
  font-size: 20px;
}

.settings-prerequisite.is-connected {
  border-color: rgba(23, 163, 109, 0.24);
  background: rgba(23, 163, 109, 0.07);
}

.settings-prerequisite.is-connected > .material-symbols-rounded {
  background: rgba(23, 163, 109, 0.12);
  color: #098456;
}

.settings-prerequisite strong,
.settings-prerequisite span {
  display: block;
}

.settings-prerequisite strong {
  color: var(--text);
  font-size: 12px;
}

.settings-prerequisite div > span,
.settings-inline-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.settings-inline-note {
  margin: 0;
  text-align: right;
}

.settings-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.settings-field > span {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.settings-field-wide {
  grid-column: 1 / -1;
}

.settings-rule-list,
.settings-service-list {
  display: grid;
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
}

.settings-rule-list .setting-row {
  min-height: 76px;
}

.settings-rule-list .setting-row.is-disabled {
  background: var(--surface-muted);
  color: var(--muted);
}

.settings-rule-list .setting-row.is-disabled strong {
  color: var(--muted-strong);
}

.settings-rule-list .setting-row.is-disabled .toggle-switch {
  opacity: 0.55;
}

.permission-cell > span small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

.settings-service-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.settings-service-row:last-child {
  border-bottom: 0;
}

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

.settings-service-action {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.settings-service-action:hover,
.settings-service-action:focus-visible {
  background: rgba(8, 102, 232, 0.045);
}

.drawer.email-provider-drawer .drawer-panel {
  width: min(590px, 100%);
  padding: 0;
}

.drawer.email-provider-drawer .drawer-header {
  align-items: center;
  min-height: 84px;
  margin: 0;
  padding: 18px 24px 17px;
  border-bottom: 1px solid var(--line);
}

.drawer.email-provider-drawer .drawer-header h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.drawer.email-provider-drawer .drawer-header .icon-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.drawer.email-provider-drawer .drawer-header .icon-button:hover {
  background: var(--surface-muted);
}

.drawer.email-provider-drawer #drawerBody {
  display: grid;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  scrollbar-gutter: auto;
}

.email-provider-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.email-provider-scroll {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  padding: 20px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.email-provider-lede {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.email-provider-status-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.7);
}

.email-provider-status-icon,
.email-provider-section-head > .material-symbols-rounded {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.email-provider-status-icon {
  width: 42px;
  height: 42px;
  font-size: 21px;
}

.email-provider-status-card strong,
.email-provider-status-card div > span {
  display: block;
}

.email-provider-status-card strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.email-provider-status-card div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.email-provider-section {
  display: grid;
  gap: 16px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.email-provider-section[hidden] {
  display: none;
}

.email-provider-section-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.email-provider-section-head > .material-symbols-rounded {
  width: 38px;
  height: 38px;
  font-size: 20px;
}

.email-provider-section-head h3,
.email-provider-section-head p {
  margin: 0;
}

.email-provider-section-head h3 {
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.email-provider-section-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.email-provider-section-fields {
  display: grid;
  gap: 14px;
}

.hubspot-settings-form .email-provider-scroll {
  gap: 14px;
}

.hubspot-connection-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.58);
}

.hubspot-connection-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.hubspot-connection-head h3,
.hubspot-connection-head p {
  margin: 0;
}

.hubspot-connection-head h3 {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.hubspot-connection-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.hubspot-connection-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.hubspot-connection-facts > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
}

.hubspot-connection-facts > div + div {
  border-left: 1px solid var(--line);
}

.hubspot-connection-facts span,
.hubspot-connection-facts strong,
.hubspot-mapping-row small,
.hubspot-mapping-row strong,
.hubspot-sync-strip small,
.hubspot-sync-strip strong {
  display: block;
  min-width: 0;
  line-height: 1.35;
}

.hubspot-connection-facts span,
.hubspot-mapping-row small,
.hubspot-sync-strip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.hubspot-connection-facts strong,
.hubspot-mapping-row strong,
.hubspot-sync-strip strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hubspot-mapping-card {
  gap: 14px;
  padding: 16px;
}

.hubspot-mapping-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.hubspot-mapping-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px minmax(0, 1.2fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 11px;
  background: var(--surface);
}

.hubspot-mapping-row + .hubspot-mapping-row {
  border-top: 1px solid var(--line);
}

.hubspot-mapping-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--blue);
  font-size: 18px;
}

.hubspot-mapping-arrow {
  color: #94a3b8;
  font-size: 18px;
}

.hubspot-sync-strip {
  display: grid;
  grid-template-columns: 36px repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.hubspot-sync-strip > .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--blue);
  font-size: 19px;
}

.hubspot-sync-strip div + div {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.hubspot-sync-strip strong {
  margin-top: 3px;
}

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

.email-provider-server-row > .field-label {
  align-self: start;
}

.email-provider-form .field-label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.email-provider-form .field-label .input {
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.email-provider-form .field-label .input::placeholder {
  color: #8a98aa;
  font-weight: 500;
  opacity: 1;
}

.email-provider-form .field-label .input[readonly] {
  background: var(--surface-muted);
  color: var(--muted);
}

.email-field-hint {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.email-provider-form .field-error {
  min-height: 0;
  margin: 0;
}

.email-provider-form .field-error:empty {
  display: none;
}

.email-provider-form .field-error:not(:empty) {
  color: var(--red);
  font-weight: 700;
}

.email-password-field {
  position: relative;
}

.email-password-field .input {
  width: 100%;
  padding-right: 48px !important;
}

.email-password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.email-password-toggle:hover,
.email-password-toggle:focus-visible {
  background: var(--surface-muted);
  color: var(--text);
}

.email-password-toggle .material-symbols-rounded {
  font-size: 20px;
}

.email-provider-security {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.email-provider-security .material-symbols-rounded {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--blue);
  font-size: 17px;
}

.email-provider-security.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.email-provider-security.warning .material-symbols-rounded {
  color: #b45309;
}

.email-provider-footer {
  display: grid;
  gap: 9px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(12px);
}

.email-provider-footer .crew-form-message {
  min-height: 0;
  margin: 0;
}

.email-provider-footer .crew-form-message:empty {
  display: none;
}

.email-provider-actions {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}

.email-provider-actions .ghost-button,
.email-provider-actions .primary-button {
  min-height: 44px;
  justify-content: center;
}

@media (max-width: 700px) {
  .drawer.email-provider-drawer .drawer-panel {
    width: 100%;
    height: min(92dvh, 820px);
    max-height: min(92dvh, 820px);
  }

  .drawer.email-provider-drawer .drawer-header {
    min-height: 72px;
    padding: 14px 18px;
  }

  .drawer.email-provider-drawer .drawer-header h2 {
    font-size: 23px;
  }

  .email-provider-scroll {
    padding: 18px;
  }

  .email-provider-server-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-provider-footer {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  }
}

.settings-service-row strong {
  color: var(--text);
  font-size: 13px;
}

.settings-service-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.settings-command-main > .settings-save-bar {
  margin: 0 20px;
  padding: 14px 0 18px;
}

.settings-command-main > .settings-save-bar.show {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--surface);
}

.settings-command-main .permission-matrix,
.settings-command-main .integration-table,
.settings-command-main > .settings-tab-panels > .settings-panel > .setting-row {
  margin-inline: 20px;
}

.settings-command-main .settings-subheader {
  margin: 18px 20px 0;
}

.settings-command-main .integration-table {
  margin-bottom: 20px;
}

.settings-danger-row strong {
  color: var(--red);
}

:root[data-theme="dark"] .settings-local-nav button.active,
:root[data-theme="dark"] .settings-row-icon {
  background: rgba(96, 165, 250, 0.13);
}

:root[data-theme="dark"] .settings-connected-list .settings-service-icon {
  color: #cbd5e1;
}

@media (max-width: 1320px) {
  .settings-command-layout {
    grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  }

  .settings-workspace-health {
    grid-column: 1 / -1;
  }

  .settings-command-rail {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  #settings-view > .page-wrap {
    padding-inline: 20px;
  }

  .settings-command-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .settings-workspace-health,
  .settings-local-nav,
  .settings-command-main,
  .settings-command-rail {
    grid-column: 1;
  }

  .settings-workspace-health {
    grid-row: 1;
  }

  .settings-local-nav {
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-local-nav button {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 46px;
    padding: 6px 8px;
  }

  .settings-local-nav button > .material-symbols-rounded {
    width: 28px;
    height: 28px;
  }

  .settings-local-nav button.active::before {
    top: auto;
    right: 10px;
    bottom: -1px;
    left: 10px;
    width: auto;
    height: 3px;
    border-radius: 999px 999px 0 0;
  }

  .settings-command-main {
    grid-row: 3;
  }

  .settings-command-main .settings-tab-panels {
    min-height: 0;
  }

  .settings-command-rail {
    grid-row: 4;
  }
}

@media (max-width: 760px) {
  .settings-workspace-health {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .settings-health-progress,
  .settings-workspace-health > .primary-button {
    grid-column: 1 / -1;
  }

  .settings-local-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-command-rail,
  .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .settings-prerequisite {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .settings-prerequisite > button {
    grid-column: 1 / -1;
  }

  .settings-control-row {
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    min-height: 92px;
  }

  .settings-row-status {
    grid-column: 2;
    justify-content: flex-start;
  }

  .settings-row-arrow {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .settings-field-wide {
    grid-column: auto;
  }
}

/* ---- Client detail: calm account workspace ---- */
#client-detail-view .client-detail-backbar {
  min-height: 30px;
  margin: 0 0 12px;
}

#client-detail-view .client-back-link {
  gap: 2px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

#client-detail-view .client-back-link:hover,
#client-detail-view .client-back-link:focus-visible {
  color: var(--blue);
}

#client-detail-view .client-detail-main {
  gap: 18px;
}

#client-detail-view .client-profile-hero {
  display: grid;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#client-detail-view .client-profile-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 0;
}

#client-detail-view .client-profile-identity {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

#client-detail-view .client-profile-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: rgba(11, 95, 232, 0.1);
  color: var(--blue);
  font-size: 26px;
}

#client-detail-view .client-profile-head h1 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#client-detail-view .client-profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

#client-detail-view .client-profile-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

#client-detail-view .client-profile-meta .client-profile-source {
  border-color: rgba(11, 95, 232, 0.2);
  background: rgba(11, 95, 232, 0.07);
  color: var(--blue-dark);
}

#client-detail-view .client-profile-meta .material-symbols-rounded {
  font-size: 15px;
}

#client-detail-view .client-profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

#client-detail-view .client-profile-actions .ghost-button,
#client-detail-view .client-profile-actions .primary-button {
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

#client-detail-view .client-profile-actions .primary-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--blue);
}

#client-detail-view .client-profile-actions .primary-button .material-symbols-rounded {
  font-size: 18px;
}

#client-detail-view .client-destructive-action {
  color: var(--red);
}

#client-detail-view .client-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border: 0;
}

#client-detail-view .client-profile-stats .client-summary-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 13px;
  min-height: 92px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

#client-detail-view .client-profile-stats .client-summary-card.green {
  border-color: rgba(34, 160, 107, 0.3);
}

#client-detail-view .client-profile-stats .client-summary-card.amber {
  border-color: rgba(245, 158, 11, 0.34);
}

#client-detail-view .client-summary-card > .material-symbols-rounded {
  grid-row: 1 / span 3;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(11, 95, 232, 0.1);
  color: var(--blue);
  font-size: 21px;
}

#client-detail-view .client-summary-card.green > .material-symbols-rounded {
  background: rgba(34, 160, 107, 0.12);
  color: var(--green);
}

#client-detail-view .client-summary-card.amber > .material-symbols-rounded {
  background: rgba(245, 158, 11, 0.12);
  color: #c87400;
}

#client-detail-view .client-summary-card p,
#client-detail-view .client-summary-card strong,
#client-detail-view .client-summary-card small {
  min-width: 0;
  margin: 0;
}

#client-detail-view .client-summary-card p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-transform: uppercase;
}

#client-detail-view .client-summary-card strong {
  margin: 2px 0 3px;
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#client-detail-view .client-summary-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#client-detail-view .client-detail-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.72fr);
  align-items: start;
  gap: 16px;
}

#client-detail-view .client-detail-primary-column,
#client-detail-view .client-detail-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

#client-detail-view .surface.client-detail-panel {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

#client-detail-view .client-detail-panel .mini-header {
  min-height: 0;
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

#client-detail-view .client-detail-panel .mini-header h2 {
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

#client-detail-view .client-detail-panel .mini-header h2 .material-symbols-rounded {
  color: var(--muted);
  font-size: 19px;
}

#client-detail-view .client-detail-panel .mini-header .ghost-button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: var(--radius);
  font-size: 11px;
}

#client-detail-view .client-detail-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 30px;
  padding: 4px 18px 12px;
}

#client-detail-view .client-detail-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  min-width: 0;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

#client-detail-view .client-detail-field:nth-child(-n + 2) {
  border-top: 0;
}

#client-detail-view .client-detail-field em {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.25;
  text-transform: uppercase;
}

#client-detail-view .client-detail-field strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

#client-detail-view .client-detail-field.is-empty strong {
  color: var(--muted);
  font-weight: 600;
}

#client-detail-view .client-sites-list {
  padding: 17px 18px 18px;
}

#client-detail-view .client-site-card-display {
  gap: 16px;
}

#client-detail-view .client-site-card-display > div:first-child {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

#client-detail-view .client-site-card-display dl {
  grid-template-columns: 1fr;
  gap: 0;
}

#client-detail-view .client-site-card-display dl > div {
  display: grid;
  grid-template-columns: minmax(92px, 0.62fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

#client-detail-view .client-site-card-display dl > div:first-child {
  padding-top: 0;
  border-top: 0;
}

#client-detail-view .client-site-card-display dd {
  margin-top: 0;
  text-align: left;
}

#client-detail-view .client-money-grid {
  padding: 0 18px 8px;
}

#client-detail-view .client-money-card {
  grid-template-columns: minmax(102px, 0.72fr) minmax(0, 1fr);
  min-height: 48px;
  padding: 10px 0;
}

#client-detail-view .client-money-card:first-child {
  border-top: 0;
}

#client-detail-view .client-money-card strong {
  font-size: 12px;
  text-align: left;
}

#client-detail-view .client-next-actions-panel .client-action-list {
  gap: 8px;
  padding: 12px;
}

#client-detail-view .client-action-card {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 54px;
  padding: 9px 10px;
  border-left-width: 1px;
  border-radius: var(--radius);
  box-shadow: none;
}

#client-detail-view .client-action-card .client-action-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 9px;
  font-size: 18px;
  line-height: 1;
}

#client-detail-view .client-action-card strong {
  font-size: 12px;
  line-height: 1.3;
}

#client-detail-view .client-action-detail {
  display: none;
}

#client-detail-view .client-action-card em {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}

#client-detail-view .client-activity-sections {
  display: grid;
  gap: 0;
}

#client-detail-view .client-activity-section + .client-activity-section {
  border-top: 1px solid var(--line);
}

#client-detail-view .client-subsection-header {
  padding: 14px 18px 8px;
}

#client-detail-view .client-subsection-header h3 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-transform: uppercase;
}

#client-detail-view .client-activity-section .client-history-list {
  gap: 8px;
  padding: 0 14px 14px;
}

#client-detail-view .client-activity-section .client-history-row {
  border-left-width: 1px;
  border-radius: var(--radius);
  box-shadow: none;
}

#client-detail-view .client-inline-empty {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

#client-detail-view .client-inline-empty > .material-symbols-rounded {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue);
  font-size: 19px;
}

#client-detail-view .client-inline-empty strong,
#client-detail-view .client-inline-empty small {
  display: block;
}

#client-detail-view .client-inline-empty strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}

#client-detail-view .client-inline-empty small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

#client-detail-view .client-inline-empty .primary-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 11px;
}

@media (max-width: 1100px) {
  #client-detail-view .client-detail-workspace-grid {
    grid-template-columns: 1fr;
  }

  #client-detail-view .client-detail-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #client-detail-view .client-next-actions-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  #client-detail-view .client-profile-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  #client-detail-view .client-profile-head h1 {
    overflow: visible;
    white-space: normal;
  }

  #client-detail-view .client-profile-actions {
    justify-content: flex-start;
  }

  #client-detail-view .client-profile-stats,
  #client-detail-view .client-detail-sidebar,
  #client-detail-view .client-detail-field-grid {
    grid-template-columns: 1fr;
  }

  #client-detail-view .client-detail-field:nth-child(2) {
    border-top: 1px solid var(--line);
  }

  #client-detail-view .client-inline-empty {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  #client-detail-view .client-inline-empty .primary-button {
    grid-column: 2;
    justify-self: start;
  }
}

/* ---- Dedicated staff management page ---- */
#staff-detail-view .staff-detail-page-wrap {
  width: min(100%, 1460px);
  padding-bottom: 44px;
}

#staff-detail-view .staff-detail-backbar {
  margin-bottom: 10px;
}

#staff-detail-view .staff-back-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

#staff-detail-view .staff-back-link:hover,
#staff-detail-view .staff-back-link:focus-visible {
  color: var(--blue);
}

#staff-detail-view .staff-back-link:focus-visible {
  outline: 2px solid rgba(11, 95, 232, 0.28);
  outline-offset: 2px;
  border-radius: 8px;
}

#staff-detail-view .staff-back-link .material-symbols-rounded {
  font-size: 18px;
}

#staff-detail-view .staff-detail-main,
#staff-detail-view .staff-detail-primary-column,
#staff-detail-view .staff-detail-sidebar {
  display: grid;
  gap: 16px;
  min-width: 0;
}

#staff-detail-view .staff-profile-hero,
#staff-detail-view .staff-detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

#staff-detail-view .staff-profile-hero {
  overflow: hidden;
}

#staff-detail-view .staff-detail-tabs {
  display: flex;
  align-items: stretch;
  min-width: 0;
  min-height: 58px;
  padding: 0 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}

#staff-detail-view .staff-detail-tab {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 56px;
  padding: 0 17px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

#staff-detail-view .staff-detail-tab::after {
  position: absolute;
  right: 13px;
  bottom: -1px;
  left: 13px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}

#staff-detail-view .staff-detail-tab:hover {
  color: var(--text);
}

#staff-detail-view .staff-detail-tab.active {
  color: var(--blue);
}

#staff-detail-view .staff-detail-tab.active::after {
  background: var(--blue);
}

#staff-detail-view .staff-detail-tab:focus-visible {
  z-index: 1;
  outline: 2px solid rgba(11, 95, 232, 0.28);
  outline-offset: -4px;
  border-radius: 10px;
}

#staff-detail-view .staff-detail-tab .material-symbols-rounded {
  font-size: 18px;
}

#staff-detail-view .staff-detail-tab-panel[hidden] {
  display: none !important;
}

#staff-detail-view .staff-detail-tab-panels,
#staff-detail-view .staff-detail-tab-panel {
  min-width: 0;
}

#staff-detail-view .staff-profile-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px;
}

#staff-detail-view .staff-profile-identity {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

#staff-detail-view .staff-profile-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #cfe0fb;
  border-radius: 14px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

#staff-detail-view .staff-profile-head h1 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(22px, 2.2vw, 31px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#staff-detail-view .staff-profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

#staff-detail-view .staff-profile-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}

#staff-detail-view .staff-profile-meta > span.green {
  border-color: #bce8d3;
  background: #edf9f3;
  color: #16865a;
}

#staff-detail-view .staff-profile-meta > span.amber {
  border-color: #f5d798;
  background: #fff8e8;
  color: #a35d09;
}

#staff-detail-view .staff-profile-meta > span.grey,
#staff-detail-view .staff-profile-meta > span.red {
  border-color: #e4e7ec;
  background: #f7f8fa;
  color: #687386;
}

#staff-detail-view .staff-profile-meta .material-symbols-rounded {
  font-size: 14px;
}

#staff-detail-view .staff-profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#staff-detail-view .staff-profile-actions .ghost-button {
  min-height: 38px;
  padding: 0 14px;
}

#staff-detail-view .staff-profile-actions .primary-button {
  min-height: 38px;
  padding: 0 16px;
}

#staff-detail-view .staff-destructive-action {
  border-color: #fecaca;
  color: #c62828;
}

#staff-detail-view .staff-destructive-action:hover {
  border-color: #fca5a5;
  background: #fff5f5;
}

#staff-detail-view .staff-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

#staff-detail-view .staff-summary-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 11px;
  min-width: 0;
  min-height: 112px;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

#staff-detail-view .staff-summary-card:last-child {
  border-right: 0;
}

#staff-detail-view .staff-summary-card > .material-symbols-rounded {
  grid-row: 1 / 4;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 20px;
}

#staff-detail-view .staff-summary-card.green > .material-symbols-rounded {
  background: #e7f7ef;
  color: #16865a;
}

#staff-detail-view .staff-summary-card.amber > .material-symbols-rounded {
  background: #fff2d5;
  color: #b76b0b;
}

#staff-detail-view .staff-summary-card p,
#staff-detail-view .staff-summary-card strong,
#staff-detail-view .staff-summary-card small {
  min-width: 0;
  margin: 0;
}

#staff-detail-view .staff-summary-card p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

#staff-detail-view .staff-summary-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#staff-detail-view .staff-summary-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

#staff-detail-view .staff-detail-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.72fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
}

#staff-detail-view .staff-detail-info-grid > aside {
  min-width: 0;
}

#staff-detail-view .staff-detail-panel {
  overflow: hidden;
}

#staff-detail-view .staff-detail-panel > .client-section-mini-header {
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

#staff-detail-view .staff-detail-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 16px 16px;
}

#staff-detail-view .staff-detail-field-grid.is-editing {
  display: block;
  padding: 16px;
}

#staff-detail-view .staff-detail-inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
}

#staff-detail-view .staff-detail-inline-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

#staff-detail-view .staff-detail-inline-field .input,
#staff-detail-view .staff-detail-inline-field .modern-select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: normal;
  text-transform: none;
}

#staff-detail-view .staff-detail-inline-field .input:focus,
#staff-detail-view .staff-detail-inline-field .modern-select:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 95, 232, 0.12);
}

#staff-detail-view .staff-detail-edit-message {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
}

#staff-detail-view .staff-detail-field {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 74px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

#staff-detail-view .staff-detail-field:nth-child(odd) {
  padding-right: 18px;
}

#staff-detail-view .staff-detail-field:nth-child(even) {
  padding-left: 18px;
}

#staff-detail-view .staff-detail-field:nth-last-child(-n + 2) {
  border-bottom: 0;
}

#staff-detail-view .staff-detail-field em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

#staff-detail-view .staff-detail-field strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

#staff-detail-view .staff-detail-field.is-empty strong {
  color: var(--muted);
  font-weight: 650;
}

#staff-detail-view .staff-detail-list,
#staff-detail-view .staff-detail-history {
  display: grid;
  padding: 0 14px 14px;
}

#staff-detail-view .staff-detail-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 12px;
  min-height: 42px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

#staff-detail-view .staff-detail-list-row:last-child {
  border-bottom: 0;
}

#staff-detail-view .staff-detail-list-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

#staff-detail-view .staff-detail-list-row strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  text-align: right;
}

#staff-detail-view .staff-detail-history-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

#staff-detail-view button.staff-detail-history-row {
  cursor: pointer;
}

#staff-detail-view button.staff-detail-history-row:hover,
#staff-detail-view button.staff-detail-history-row:focus-visible {
  background: var(--surface-soft);
}

#staff-detail-view button.staff-detail-history-row:focus-visible {
  outline: 2px solid rgba(11, 95, 232, 0.25);
  outline-offset: -2px;
  border-radius: 8px;
}

#staff-detail-view .staff-detail-history-row:last-child {
  border-bottom: 0;
}

#staff-detail-view .staff-detail-history-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 17px;
}

#staff-detail-view .staff-detail-history-row > span:nth-child(2) {
  min-width: 0;
}

#staff-detail-view .staff-detail-history-row strong,
#staff-detail-view .staff-detail-history-row small {
  display: block;
}

#staff-detail-view .staff-detail-history-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#staff-detail-view .staff-detail-history-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

#staff-detail-view .staff-detail-history-row .status-chip {
  white-space: nowrap;
}

#staff-detail-view .staff-timesheet-datebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

#staff-detail-view .staff-timesheet-datebar > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#staff-detail-view .staff-timesheet-datebar .material-symbols-rounded {
  color: var(--blue);
  font-size: 18px;
}

#staff-detail-view .staff-timesheet-datebar strong {
  color: var(--text);
  font-size: 12px;
}

#staff-detail-view .staff-timesheet-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

#staff-detail-view .staff-timesheet-metric {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 98px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

#staff-detail-view .staff-timesheet-metric:last-child {
  border-right: 0;
}

#staff-detail-view .staff-timesheet-metric span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#staff-detail-view .staff-timesheet-metric strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#staff-detail-view .staff-timesheet-metric small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

#staff-detail-view .staff-timesheet-events {
  display: grid;
  padding: 4px 16px 16px;
}

#staff-detail-view .staff-timesheet-event {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 66px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

#staff-detail-view .staff-timesheet-event:last-child {
  border-bottom: 0;
}

#staff-detail-view .staff-timesheet-event-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 18px;
}

#staff-detail-view .staff-timesheet-event > span:nth-child(2),
#staff-detail-view .staff-timesheet-event strong,
#staff-detail-view .staff-timesheet-event small {
  min-width: 0;
}

#staff-detail-view .staff-timesheet-event strong,
#staff-detail-view .staff-timesheet-event small {
  display: block;
}

#staff-detail-view .staff-timesheet-event strong {
  color: var(--text);
  font-size: 12px;
}

#staff-detail-view .staff-timesheet-event small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#staff-detail-view .staff-timesheet-event time {
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

#staff-detail-view .staff-detail-empty {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px 0;
}

#staff-detail-view .staff-detail-empty > .material-symbols-rounded {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 17px;
}

#staff-detail-view .staff-detail-empty strong,
#staff-detail-view .staff-detail-empty small {
  display: block;
}

#staff-detail-view .staff-detail-empty strong {
  color: var(--text);
  font-size: 11px;
}

#staff-detail-view .staff-detail-empty small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

#staff-detail-view .staff-compliance-panel .crew-resource-review {
  gap: 14px;
  padding: 16px;
}

#staff-detail-view .staff-compliance-panel .crew-resource-section-header {
  padding: 0;
}

#staff-detail-view .staff-profile-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 126px;
  padding: 22px;
  color: var(--muted);
}

#staff-detail-view .staff-profile-loading .material-symbols-rounded {
  color: var(--blue);
  animation: crew-profile-loading-spin 1s linear infinite;
}

@keyframes crew-profile-loading-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  #staff-detail-view .staff-detail-workspace-grid {
    grid-template-columns: 1fr;
  }

  #staff-detail-view .staff-detail-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #staff-detail-view .staff-access-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  #staff-detail-view .staff-detail-tabs {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 8px;
    padding-left: 8px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  #staff-detail-view .staff-detail-tab {
    padding-right: 14px;
    padding-left: 14px;
  }

  #staff-detail-view .staff-profile-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
    padding: 16px;
  }

  #staff-detail-view .staff-profile-head h1 {
    overflow: visible;
    white-space: normal;
  }

  #staff-detail-view .staff-profile-actions {
    justify-content: flex-start;
  }

  #staff-detail-view .staff-detail-inline-form {
    grid-template-columns: 1fr;
  }

  #staff-detail-view .staff-profile-stats,
  #staff-detail-view .staff-detail-field-grid,
  #staff-detail-view .staff-detail-sidebar {
    grid-template-columns: 1fr;
  }

  #staff-detail-view .staff-timesheet-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #staff-detail-view .staff-timesheet-metric:nth-child(2) {
    border-right: 0;
  }

  #staff-detail-view .staff-timesheet-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  #staff-detail-view .staff-summary-card {
    min-height: 92px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #staff-detail-view .staff-summary-card:last-child {
    border-bottom: 0;
  }

  #staff-detail-view .staff-access-panel {
    grid-column: auto;
  }

  #staff-detail-view .staff-detail-field:nth-child(n) {
    min-height: 66px;
    padding-right: 0;
    padding-left: 0;
  }

  #staff-detail-view .staff-detail-field:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

  #staff-detail-view .staff-compliance-panel .crew-resource-section-header {
    display: grid;
  }

  #staff-detail-view .crew-resource-doc-list {
    grid-template-columns: 1fr;
  }
}

/* ---- TimeTree-style desktop monthly calendar ---- */
.brand .brand-icon,
.calendar-month-new {
  display: none;
}

@media (min-width: 761px) {
  body[data-view="calendar"][data-calendar-mode="month"] {
    --month-calendar-line: #e8e9eb;
    --month-calendar-muted: #a8abb0;
    --calendar-workspace-day-row-height: clamp(42px, 4.8dvh, 52px);
    background: #fff;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .app-shell,
  body.sidebar-collapsed .app-shell {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar,
  body.sidebar-collapsed .sidebar {
    gap: 8px;
    padding: 9px 7px 10px;
    border-right-color: var(--month-calendar-line);
    background: #fff;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .brand,
  body.sidebar-collapsed .sidebar .brand {
    justify-content: center;
    height: 43px;
    padding: 0;
    margin: 0;
    border: 0;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .brand:focus-visible,
  body.sidebar-collapsed .sidebar .brand:focus-visible {
    outline: 2px solid #0b5fe8;
    outline-offset: 2px;
    border-radius: 7px;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .brand .brand-wordmark,
  body.sidebar-collapsed .brand .brand-wordmark {
    display: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .brand .brand-icon,
  body.sidebar-collapsed .brand .brand-icon {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    object-position: center;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .nav-list,
  body.sidebar-collapsed .sidebar .nav-list {
    grid-auto-rows: 40px;
    align-content: start;
    gap: 3px;
    margin: 0;
    padding: 0;
    scrollbar-width: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .nav-list::-webkit-scrollbar,
  body.sidebar-collapsed .sidebar .nav-list::-webkit-scrollbar {
    display: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .nav-item,
  body.sidebar-collapsed .sidebar .nav-item {
    position: relative;
    grid-template-columns: 24px;
    justify-content: center;
    justify-items: center;
    gap: 0;
    height: 40px;
    min-height: 40px;
    padding: 8px;
    border: 0;
    border-radius: 7px;
    color: #8b8e93;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .nav-item:hover,
  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .nav-item:focus-visible,
  body.sidebar-collapsed .sidebar .nav-item:hover,
  body.sidebar-collapsed .sidebar .nav-item:focus-visible {
    outline: none;
    background: #f2f3f4;
    color: #34363a;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .nav-item.active,
  body.sidebar-collapsed .sidebar .nav-item.active {
    border: 0;
    background: #e9f8f2;
    color: #22b97d;
    box-shadow: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .nav-item > .icon,
  body.sidebar-collapsed .sidebar .nav-item > .icon {
    width: 24px;
    height: 24px;
    font-size: 22px;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .nav-item > span:not(.icon),
  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .user-card-copy,
  body.sidebar-collapsed .sidebar .nav-item > span:not(.icon),
  body.sidebar-collapsed .sidebar .user-card-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar-footer,
  body.sidebar-collapsed .sidebar-footer {
    gap: 3px;
    padding-top: 7px;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .user-card,
  body.sidebar-collapsed .sidebar .user-card {
    padding-top: 7px;
    border-top-color: var(--month-calendar-line);
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .user-menu-trigger,
  body.sidebar-collapsed .sidebar .user-menu-trigger {
    grid-template-columns: 36px;
    justify-content: center;
    justify-items: center;
    gap: 0;
    min-height: 42px;
    padding: 3px;
    border-radius: 7px;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .user-menu-caret,
  body.sidebar-collapsed .sidebar .user-menu-caret {
    display: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .avatar,
  body.sidebar-collapsed .sidebar .avatar {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  body[data-view="calendar"][data-calendar-mode="month"]:not(.calendar-sidebar-expanded) .sidebar .user-menu,
  body.sidebar-collapsed .sidebar .user-menu {
    position: fixed;
    right: auto;
    bottom: 10px;
    left: 68px;
    width: 240px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 21;
    display: flex;
    width: 600px;
    height: 60px;
    justify-content: flex-end;
    gap: 8px;
    padding: 5px 13px 5px 0;
    border-bottom: 1px solid var(--month-calendar-line);
    background: #fff;
    backdrop-filter: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search {
    flex: 1 1 230px;
    min-width: 180px;
    max-width: 250px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search input {
    height: 42px;
    border-color: #d8dce3;
    border-radius: 8px;
    background: #fff;
    color: #60646b;
    font-size: 12px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-actions {
    gap: 7px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-new {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 8px;
    box-shadow: 0 7px 16px rgba(11, 95, 232, 0.2);
    font-size: 12px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .theme-toggle {
    width: 42px;
    height: 42px;
    min-height: 42px;
    border-color: #e2e5e9;
    border-radius: 50%;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-separator {
    height: 30px;
    margin: 0 2px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card {
    min-width: 126px;
    min-height: 50px;
    padding-right: 9px;
    border-radius: 11px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card-art {
    width: 48px;
    height: 42px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .main,
  body[data-view="calendar"][data-calendar-mode="month"] #calendar-view,
  body[data-view="calendar"][data-calendar-mode="month"] .calendar-layout,
  body[data-view="calendar"][data-calendar-mode="month"] .calendar-panel {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] .app-shell,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] .main,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] #calendar-view,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] .calendar-layout,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] .calendar-panel {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] .main,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] #calendar-view,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] .calendar-layout {
    overflow: hidden;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .app-shell,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .main,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] #calendar-view,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .calendar-layout,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .calendar-panel {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .main,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] #calendar-view,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .calendar-layout {
    overflow: hidden;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-layout {
    gap: 0;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-panel {
    grid-template-rows: 60px minmax(0, 1fr);
    gap: 0;
    padding: 0;
    background: #fff;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: block;
    height: 60px;
    margin: 0;
    border-bottom: 1px solid var(--month-calendar-line);
    background: #fff;
    backface-visibility: hidden;
    transform: translateZ(0);
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .header-tools {
    position: relative;
    display: flex;
    width: 100%;
    height: 60px;
    min-height: 60px;
    align-items: center;
    gap: 4px;
    padding: 0 620px 0 13px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .segmented {
    position: static;
    z-index: 1;
    order: 0;
    flex: 0 0 auto;
    height: 38px;
    margin-right: 8px;
    padding: 2px;
    border-color: #e2e4e7;
    border-radius: 7px;
    background: #f7f7f8;
    transform: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .segment {
    min-height: 32px;
    padding: 0 20px;
    border-radius: 5px;
    color: #777b80;
    font-size: 12px;
    font-weight: 600;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .segment.active {
    background: #32c98b;
    color: #fff;
    box-shadow: 0 1px 2px rgba(16, 120, 80, 0.15);
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .today-button {
    order: 1;
    width: 38px;
    min-width: 38px;
    flex: 0 0 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    background: #fff;
    color: #55585d;
    font-size: 13px;
    font-weight: 700;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .arrow-button {
    width: 36px;
    min-height: 36px;
    flex: 0 0 36px;
    border-radius: 6px;
    color: #707378;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .arrow-button[aria-label^="Previous"] {
    order: 2;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .arrow-button[aria-label^="Next"] {
    order: 4;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-unscheduled-trigger {
    order: 5;
    flex: 0 0 auto;
    margin-left: 4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-date-controls {
    order: 3;
    width: 124px;
    flex: 0 0 124px;
    gap: 0;
    margin-left: 1px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-date-controls .topbar-date {
    width: 100%;
    min-height: 38px;
    padding: 0 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #36383c;
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-date-controls .topbar-date.is-static {
    cursor: default;
  }

  body[data-view="calendar"][data-calendar-mode="month"] #calendarPickerPopover {
    display: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-team-filter {
    position: static;
    order: 6;
    width: 128px;
    flex: 0 0 128px;
    min-width: 116px;
    margin-left: 4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-team-filter select {
    min-height: 38px;
    padding: 0 34px;
    border-color: #e2e4e7;
    border-radius: 6px;
    background: #fff;
    color: #55585d;
    font-size: 12px;
    font-weight: 600;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-month-new {
    order: 7;
    display: none;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #32c98b;
    color: #fff;
    box-shadow: 0 2px 6px rgba(25, 151, 103, 0.2);
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-month-new:hover,
  body[data-view="calendar"][data-calendar-mode="month"] .calendar-month-new:focus-visible {
    outline: none;
    background: #25b97d;
    box-shadow: 0 0 0 3px rgba(50, 201, 139, 0.2);
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-month-new > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-month-new .material-symbols-rounded {
    font-size: 22px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-stage {
    height: auto;
    min-height: 0;
    border: 0;
    background: #fff;
    overflow: auto;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="month"] .calendar-stage {
    height: 100%;
    overflow: hidden;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-grid {
    height: 100%;
    min-height: 0;
    grid-template-rows: var(--calendar-workspace-day-row-height) repeat(var(--month-week-count, 5), minmax(0, 1fr));
    background: #fff;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] {
    --calendar-workspace-day-row-height: 48px;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .week-grid {
    grid-template-columns: 54px repeat(7, minmax(0, 1fr));
    grid-template-rows: 48px 68px repeat(23, 60px);
    background: #fff;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .calendar-stage {
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .week-grid.all-day-expanded {
    grid-template-rows: 48px 128px repeat(23, 60px);
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .day-head,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .time-cell,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .calendar-cell {
    border-color: var(--month-calendar-line);
    background-color: #fff;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .day-head {
    position: sticky;
    top: 0;
    z-index: 18;
    color: #8f9297;
    font-size: 13px;
    font-weight: 500;
    box-shadow: inset 0 -1px 0 var(--month-calendar-line);
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .day-head:nth-child(2) {
    color: #e45656;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .day-head.current,
  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .calendar-cell.highlight {
    background-color: #fafafa;
  }

  body[data-view="calendar"][data-calendar-mode="month"][data-calendar-view-mode="week"] .day-head.current .date-dot {
    background: #383a3e;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-weekday {
    padding: 0 8px;
    border-color: var(--month-calendar-line);
    background: #fff;
    color: #8f9297;
    font-size: 13px;
    font-weight: 500;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-weekday:first-child {
    color: #e45656;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day {
    position: relative;
    min-height: 0;
    overflow: hidden;
    padding: 0 7px 6px;
    border-color: var(--month-calendar-line);
    background: #fff;
    color: #383a3e;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day.muted {
    background: #fff;
    color: #b9bbc0;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day.current {
    background: #fafafa;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day.selected-editor-day {
    z-index: 1;
    background: #f7fbff;
    box-shadow: inset 0 0 0 2px rgba(11, 95, 232, 0.46);
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day.selected-editor-day:not(.current) > strong {
    color: var(--blue);
    font-weight: 800;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day:focus-visible {
    z-index: 1;
    outline: none;
    box-shadow: inset 0 0 0 2px #32c98b;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day > strong {
    display: grid;
    width: 100%;
    height: 36px;
    place-items: center;
    margin: 0;
    color: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 36px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day.sunday > strong {
    color: #e45656;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day.muted.sunday > strong {
    color: #dda5a5;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day.current > strong {
    display: grid;
    width: 24px;
    height: 24px;
    margin: 6px auto;
    border-radius: 50%;
    background: #2f3033;
    color: #fff;
    line-height: 24px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items {
    gap: 1px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item {
    height: 20px;
    min-height: 20px;
    grid-template-columns: 8px minmax(0, 1fr) 52px;
    column-gap: 5px;
    padding: 0 5px;
    border: 0;
    border-radius: 4px;
    background: transparent;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item:hover,
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item:focus-visible {
    outline: none;
    background: #f2f3f4;
    box-shadow: inset 0 0 0 1px #e1e3e5;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item strong {
    font-size: 11px;
    font-weight: 400;
    line-height: 20px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item small {
    color: #92959a;
    font-size: 9px;
    font-weight: 400;
    line-height: 20px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .calendar-dot {
    width: 8px;
    height: 8px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .calendar-bar {
    height: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 20px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .month-more {
    justify-self: end;
    min-height: 20px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
  }
}

@media (min-width: 761px) and (max-width: 1500px) {
  body[data-view="calendar"][data-calendar-mode="month"] .topbar {
    width: 500px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search {
    max-width: 190px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .header-tools {
    padding-right: 510px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-team-filter {
    position: static;
    width: 128px;
    flex-basis: 128px;
    min-width: 116px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-unscheduled-trigger {
    width: 58px;
    justify-content: center;
    padding: 0 7px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-unscheduled-trigger-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  body[data-view="calendar"][data-calendar-mode="month"] .topbar {
    width: 410px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search {
    min-width: 104px;
    max-width: 138px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search input {
    padding-left: 38px;
    font-size: 11px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search > span {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-new {
    padding: 0 10px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card {
    min-width: 104px;
    gap: 4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card-art {
    width: 40px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .header-tools {
    padding-right: 420px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-date-controls .topbar-date {
    max-width: 135px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .segment {
    padding: 0 6px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-unscheduled-trigger {
    width: 54px;
    justify-content: center;
    padding: 0 5px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-team-filter {
    width: 108px;
    flex-basis: 108px;
    min-width: 108px;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  body[data-view="calendar"][data-calendar-mode="month"] .calendar-team-filter {
    position: absolute;
    top: 62px;
    right: 42px;
    z-index: 7;
    width: 128px;
    min-width: 116px;
    margin-left: 0;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-team-filter select {
    min-height: 30px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar {
    width: 300px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search {
    min-width: 82px;
    max-width: 100px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-actions {
    gap: 4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-new {
    width: 40px;
    justify-content: center;
    padding: 0;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-new > span:not(.plus-mark) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-separator {
    display: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card {
    min-width: 50px;
    width: 50px;
    justify-content: center;
    padding: 4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card > div,
  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card-caret {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card-art {
    width: 42px;
    margin: -4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .header-tools {
    padding-right: 310px;
  }
}

@media (min-width: 761px) and (max-width: 1250px) {
  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .header-tools {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 60px;
    min-height: 60px;
    gap: 2px;
    padding-right: 230px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .segmented {
    width: 100px;
    flex: 0 0 100px;
    margin-right: 4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .segment {
    min-width: 0;
    flex: 1 1 0;
    padding: 0 5px;
    font-size: 11px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .today-button {
    width: 34px;
    min-width: 34px;
    flex-basis: 34px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .arrow-button {
    width: 30px;
    flex-basis: 30px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-date-controls {
    width: 96px;
    flex-basis: 96px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-date-controls .topbar-date {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 12px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-unscheduled-trigger {
    position: static;
    width: 44px;
    min-width: 44px;
    flex: 0 0 44px;
    justify-content: center;
    margin-left: 4px;
    padding: 0 4px;
    gap: 2px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-unscheduled-trigger > .material-symbols-rounded {
    font-size: 16px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-unscheduled-trigger-count {
    min-width: 16px;
    width: 16px;
    height: 16px;
    font-size: 9px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-team-filter {
    position: static;
    top: auto;
    right: auto;
    width: 94px;
    min-width: 94px;
    flex: 0 0 94px;
    margin-left: 4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-team-filter select {
    min-height: 38px;
    padding-right: 25px;
    padding-left: 25px;
    font-size: 11px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar {
    width: 225px;
    min-width: 225px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search {
    position: absolute;
    top: 5px;
    left: 0;
    z-index: 4;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    flex: 0 0 40px;
    transition: width 160ms ease, max-width 160ms ease, left 160ms ease;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search input {
    width: 40px;
    padding-right: 0;
    padding-left: 38px;
    color: transparent;
    caret-color: transparent;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search input::placeholder {
    color: transparent;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search:focus-within {
    left: -160px;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search:focus-within input {
    width: 200px;
    padding-right: 12px;
    padding-left: 38px;
    color: #60646b;
    caret-color: auto;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search:focus-within input::placeholder {
    color: #8a8d92;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-actions {
    width: auto;
    margin-left: 46px;
    gap: 4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-new {
    width: 40px;
    min-width: 40px;
    justify-content: center;
    padding: 0;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-new > span:not(.plus-mark) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .topbar-separator {
    display: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card {
    width: 72px;
    min-width: 72px;
    gap: 2px;
    padding: 4px 5px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card-art {
    width: 28px;
    height: 34px;
    margin: 0;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card small,
  body[data-view="calendar"][data-calendar-mode="month"] .topbar .weather-card-caret {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@media (min-width: 1700px) {
  body[data-view="calendar"][data-calendar-mode="month"] {
    --calendar-shared-strip-right: clamp(760px, 43vw, 1020px);
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar {
    width: var(--calendar-shared-strip-right);
  }

  body[data-view="calendar"][data-calendar-mode="month"] .topbar .search {
    flex: 1 1 auto;
    min-width: 320px;
    max-width: none;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .calendar-header .header-tools {
    padding-right: calc(var(--calendar-shared-strip-right) + 20px);
  }
}

@media (min-width: 761px) and (max-height: 800px) {
  body[data-view="calendar"][data-calendar-mode="month"] .month-day {
    padding-right: 5px;
    padding-bottom: 4px;
    padding-left: 5px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day > strong {
    height: 30px;
    font-size: 12px;
    line-height: 30px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day.current > strong {
    width: 22px;
    height: 22px;
    margin: 4px auto;
    line-height: 22px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item,
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .calendar-bar,
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .month-more {
    height: 18px;
    min-height: 18px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item strong,
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item small,
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .calendar-bar {
    line-height: 18px;
  }
}

@media (min-width: 761px) and (max-height: 680px) {
  body[data-view="calendar"][data-calendar-mode="month"] .month-day {
    padding-right: 4px;
    padding-bottom: 2px;
    padding-left: 4px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day > strong {
    height: 26px;
    font-size: 11px;
    line-height: 26px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-day.current > strong {
    width: 20px;
    height: 20px;
    margin: 3px auto;
    line-height: 20px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item,
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .calendar-bar,
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .month-more {
    height: 16px;
    min-height: 16px;
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item strong,
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item small,
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .calendar-bar {
    font-size: 9px;
    line-height: 16px;
  }
}

/* Calendar editor: keep the docked workspace useful from large desktops down
   to phones, without changing geometry when Job and Event modes toggle. */
@media (min-width: 761px) and (max-width: 1180px) {
  .calendar-layout.has-event-editor > .calendar-detail-panel.event-editor-panel {
    position: fixed;
    inset: 60px 0 0 auto;
    z-index: 45;
    width: min(520px, calc(100vw - 60px));
    height: calc(100dvh - 60px);
    min-height: 0;
    max-height: calc(100dvh - 60px);
    overflow: hidden;
    border-top: 0;
    border-left: 1px solid var(--line);
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
  }

  .calendar-layout.has-event-editor .event-editor-toolbar {
    height: var(--calendar-workspace-day-row-height, 48px);
    min-height: var(--calendar-workspace-day-row-height, 48px);
  }

  .calendar-layout.has-event-editor .event-editor-toolbar .icon-button {
    width: clamp(34px, calc(var(--calendar-workspace-day-row-height, 48px) - 4px), 44px);
    height: clamp(34px, calc(var(--calendar-workspace-day-row-height, 48px) - 4px), 44px);
    min-width: clamp(34px, calc(var(--calendar-workspace-day-row-height, 48px) - 4px), 44px);
    min-height: clamp(34px, calc(var(--calendar-workspace-day-row-height, 48px) - 4px), 44px);
  }

  .calendar-layout.has-event-editor .timetree-event-card {
    min-height: 100%;
    animation: none;
  }
}

@media (max-width: 760px) {
  body[data-view="calendar"].calendar-job-editor-open {
    overflow: hidden;
  }

  body[data-view="calendar"] .calendar-detail-panel.event-editor-panel {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body[data-view="calendar"] .calendar-inline-job-header {
    padding: 0 12px;
  }

  body[data-view="calendar"] .calendar-inline-job-header .event-editor-toolbar {
    margin: 0 -12px;
  }

  body[data-view="calendar"] .event-editor-toolbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 4px;
    height: 56px;
    min-height: 56px;
    padding: 0 4px;
  }

  body[data-view="calendar"] .event-editor-toolbar .icon-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  body[data-view="calendar"] .calendar-inline-job-editor #calendarInlineJobHost {
    padding: 0 12px 18px;
    scrollbar-gutter: auto;
  }

  body[data-view="calendar"] .calendar-inline-job-editor .project-form-grid {
    gap: 12px;
    margin-top: 12px;
  }

  body[data-view="calendar"] .calendar-inline-job-editor .surface {
    padding: 14px;
  }

  body[data-view="calendar"] .calendar-inline-job-editor :is(
    .project-schedule-pair,
    .job-details-primary-grid,
    .quote-question-grid,
    .quote-question-grid-single,
    .segmented-field,
    .paint-option-grid,
    .compact-uploads
  ) {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-view="calendar"] .calendar-inline-job-editor .form-bottom-actions {
    display: grid;
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
    gap: 8px;
    margin: 12px -12px -18px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }

  body[data-view="calendar"] .calendar-inline-job-editor .form-bottom-actions :is(.ghost-button, .primary-button) {
    width: 100%;
  }

  body[data-view="calendar"] #calendarEventForm {
    gap: 12px;
    padding: 0 12px calc(20px + env(safe-area-inset-bottom));
  }

  body[data-view="calendar"] #calendarEventForm > .event-editor-toolbar {
    margin: 0 -12px;
    width: 100cqw;
  }

  body[data-view="calendar"] .timetree-event-card .event-date-time-row {
    grid-template-columns: 90px minmax(0, 1fr) 76px;
  }

  body[data-view="calendar"] .timetree-event-card.all-day-event .event-date-time-row {
    grid-template-columns: 90px minmax(0, 1fr);
  }
}

/* When an individual day column is narrow, preserve the event or job identity
   and move its time to the accessible label/tooltip instead of truncating the
   name to make room for a fixed-width timestamp. */
@container calendar-day (max-width: 200px) {
  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  body[data-view="calendar"][data-calendar-mode="month"] .month-items .compact-calendar-item small {
    display: none;
  }
}

/* ---- Calendar interaction motion ---- */
body[data-view="calendar"] button:not(.month-day):not(.week-cell),
body:not([data-view="calendar"]) :is(.topbar, .sidebar) button,
body[data-view="calendar"] .calendar-header select {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    scale 110ms ease;
}

body[data-view="calendar"] button:not(.month-day):not(.week-cell):active:not(:disabled),
body:not([data-view="calendar"]) :is(.topbar, .sidebar) button:active:not(:disabled) {
  scale: 0.97;
}

@keyframes app-view-enter {
  from {
    opacity: 0.45;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main > .view.active {
  animation: app-view-enter 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes calendar-enter-next {
  from {
    opacity: 0.35;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes calendar-enter-previous {
  from {
    opacity: 0.35;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes calendar-enter-settle {
  from {
    opacity: 0.45;
    transform: scale(0.992);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes calendar-enter-mode {
  from {
    opacity: 0.3;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes calendar-label-next {
  from {
    opacity: 0.25;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes calendar-label-previous {
  from {
    opacity: 0.25;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

body[data-view="calendar"] .calendar-stage.calendar-motion-next > :is(.month-grid, .week-grid) {
  animation: calendar-enter-next 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-view="calendar"] .calendar-stage.calendar-motion-previous > :is(.month-grid, .week-grid) {
  animation: calendar-enter-previous 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-view="calendar"] .calendar-stage.calendar-motion-settle > :is(.month-grid, .week-grid) {
  animation: calendar-enter-settle 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-view="calendar"] .calendar-stage.calendar-motion-mode > :is(.month-grid, .week-grid) {
  animation: calendar-enter-mode 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-view="calendar"] .calendar-header.calendar-motion-next .calendar-date-controls {
  animation: calendar-label-next 210ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-view="calendar"] .calendar-header.calendar-motion-previous .calendar-date-controls {
  animation: calendar-label-previous 210ms cubic-bezier(0.22, 1, 0.36, 1);
}

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