@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap");
@import url("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css");

:root {
  --bg: #08060a;
  --bg-soft: #120d16;
  --panel: rgba(17, 12, 23, 0.88);
  --panel-solid: #110d16;
  --text: #f6f1ed;
  --muted: #bfb6c6;
  --border: rgba(255, 255, 255, 0.08);
  --brand: #53c7f0;
  --brand-deep: #1a6b86;
  --accent: #7cdcff;
  --accent-soft: rgba(83, 199, 240, 0.16);
  --brand-rgb: 83, 199, 240;
  --accent-rgb: 124, 220, 255;
  --danger: #ff7a66;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.36);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --surface-raised: rgba(17, 12, 23, 0.96);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --input-bg: rgba(8, 6, 10, 0.92);
  --input-border: rgba(255, 255, 255, 0.12);
  --topbar-bg: rgba(10, 7, 13, 0.88);
}

:root[data-theme-mode="light"] {
  --bg: #f5efe6;
  --bg-soft: #efe2d1;
  --panel: rgba(255, 250, 243, 0.86);
  --panel-solid: #fff9f2;
  --text: #1e2833;
  --muted: #5f6b74;
  --border: rgba(30, 40, 51, 0.12);
  --danger: #ba503a;
  --shadow: 0 22px 65px rgba(31, 31, 31, 0.11);
  --surface-soft: rgba(255, 255, 255, 0.55);
  --surface-raised: rgba(255, 255, 255, 0.74);
  --surface-hover: rgba(255, 255, 255, 0.92);
  --input-bg: rgba(255, 255, 255, 0.78);
  --input-border: rgba(30, 40, 51, 0.14);
  --topbar-bg: rgba(250, 245, 239, 0.86);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(var(--brand-rgb), 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 215, 120, 0.08), transparent 32%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 48%, var(--bg) 100%);
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.shell {
  padding-bottom: 56px;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px;
}

.jobs-container-wide {
  max-width: min(1760px, calc(100vw - 28px));
}

.stack {
  display: grid;
  gap: 22px;
}

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

.row.wrap {
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field-grow {
  flex: 1 1 320px;
}

.actions-inline {
  align-items: flex-end;
}

.page-header {
  justify-content: space-between;
  margin-bottom: 14px;
}

@media (min-width: 920px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  background: var(--topbar-bg);
}

.topbar-inner {
  width: min(1540px, calc(100vw - 12px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-link {
  text-decoration: none;
}

.brand {
  font-family: "Avenir Next", "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.86rem;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  transition: 180ms ease;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(var(--brand-rgb), 0.14);
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent);
  font-size: 0.76rem;
}

.topbar-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-signout {
  min-height: 44px;
  padding-inline: 18px;
}

.nav-toggle {
  display: none;
  width: 50px;
  height: 50px;
  padding: 0;
  margin-left: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  border-radius: 999px;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.hero {
  max-width: 1140px;
  margin: 22px auto 0;
  padding: 28px;
  border-radius: 32px;
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  background:
    linear-gradient(135deg, rgba(17, 25, 36, 0.95), rgba(9, 16, 24, 0.88)),
    linear-gradient(135deg, rgba(var(--brand-rgb), 0.08), rgba(var(--accent-rgb), 0.05));
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

@media (min-width: 920px) {
  .hero {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    align-items: end;
  }
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  font-family: "Avenir Next", "Source Sans 3", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1rem;
}

.hero-text,
.muted,
small {
  color: var(--muted);
}

.hero-text {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  gap: 12px;
}

.hero-stat {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(var(--brand-rgb), 0.1);
}

.hero-stat .label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-stat strong {
  font-size: 1.1rem;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.auth-screen {
  width: min(520px, 100%);
}

.auth-card {
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  border-radius: 30px;
  padding: clamp(24px, 4vw, 34px);
  background:
    linear-gradient(180deg, rgba(19, 14, 25, 0.96), rgba(11, 8, 16, 0.98)),
    linear-gradient(135deg, rgba(var(--brand-rgb), 0.08), rgba(255, 215, 120, 0.05));
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.auth-card-header {
  display: grid;
  gap: 8px;
}

.auth-card-header h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 0.98;
}

.auth-card-subtitle {
  margin: 0;
  color: var(--muted);
}

.auth-provider-row {
  display: grid;
  gap: 12px;
}

.auth-form-grid {
  gap: 14px;
}

.auth-action-row {
  justify-content: flex-start;
}

.auth-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 10px;
  background: rgba(15, 10, 19, 0.96);
}

.panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel-accent {
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.12), rgba(15, 22, 31, 0.92));
}

.status-card {
  display: grid;
  gap: 8px;
  min-height: 172px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(18, 26, 37, 0.86);
  box-shadow: var(--shadow);
}

.status-card.ready {
  border-color: rgba(var(--brand-rgb), 0.24);
}

.status-card.pending {
  border-color: rgba(var(--accent-rgb), 0.24);
}

.status-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-card.ready .status-pill {
  background: rgba(var(--brand-rgb), 0.16);
  color: var(--brand);
}

.status-card.pending .status-pill {
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent);
}

.status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.metric-card {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 30, 42, 0.94), rgba(11, 17, 24, 0.84));
  box-shadow: var(--shadow);
}

.metric-card.tone-brand {
  border-color: rgba(var(--brand-rgb), 0.22);
}

.metric-card.tone-accent {
  border-color: rgba(var(--accent-rgb), 0.26);
}

.metric-value {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
}

.metric-label {
  margin-top: 8px;
  color: var(--muted);
}

.dashboard-grid {
  align-items: start;
}

.planner-top-grid {
  align-items: stretch;
}

.planner-map {
  min-height: 420px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(6, 11, 17, 0.92);
}

.planner-panel-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  background: transparent;
  border: 0;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.planner-panel-toggle > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.planner-panel-toggle h2,
.planner-panel-toggle p {
  margin: 0;
}

.planner-panel-toggle:hover,
.planner-panel-toggle:focus-visible {
  transform: none;
  background: transparent;
  border-color: transparent;
}

.planner-panel-toggle:focus-visible {
  outline: 2px solid rgba(var(--brand-rgb), 0.38);
  outline-offset: 6px;
}

.planner-panel-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1;
  flex-shrink: 0;
  transition: 180ms ease;
}

.planner-panel-toggle:hover .planner-panel-pill,
.planner-panel-toggle:focus-visible .planner-panel-pill {
  border-color: rgba(var(--brand-rgb), 0.28);
  color: var(--text);
  background: rgba(var(--brand-rgb), 0.12);
}

.planner-calendar-shell {
  display: grid;
  gap: 14px;
}

.planner-calendar-toolbar,
.planner-calendar-jump {
  justify-content: space-between;
  align-items: center;
}

.planner-calendar-title-wrap {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.planner-calendar-title {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.planner-calendar-grid-labels,
.planner-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.planner-calendar-grid-labels span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.planner-calendar-day {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 88px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 24, 34, 0.94), rgba(10, 15, 22, 0.9));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  text-align: left;
}

.planner-calendar-day:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--brand-rgb), 0.26);
}

.planner-calendar-day.selected {
  border-color: rgba(var(--brand-rgb), 0.42);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.18) inset;
}

.planner-calendar-day.today {
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.16), rgba(10, 15, 22, 0.92));
}

.planner-calendar-day.outside-month {
  opacity: 0.5;
}

.planner-calendar-date {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.planner-calendar-meta {
  display: grid;
  gap: 6px;
}

.planner-stop-row {
  align-items: flex-start;
}

.planner-stop-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 160px;
}

.planner-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.planner-timetable {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.planner-time-labels {
  display: grid;
  grid-template-rows: repeat(var(--planner-hours, 8), 84px);
  position: relative;
}

.planner-time-label {
  min-height: 84px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
}

.planner-time-label-end {
  position: absolute;
  left: 0;
  bottom: -6px;
  min-height: 0;
  padding-top: 0;
}

.planner-time-grid {
  position: relative;
  min-height: calc(var(--planner-hours, 8) * 84px);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.94), rgba(10, 15, 22, 0.88));
}

.planner-time-slot {
  height: 84px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.planner-time-slot:first-child {
  border-top: 0;
}

.planner-time-block {
  position: absolute;
  padding: 10px 10px 8px;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-rgb), 0.24);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.22), rgba(24, 47, 70, 0.94));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.planner-time-block:hover,
.planner-time-block:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(var(--brand-rgb), 0.38);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.planner-time-block:focus-visible {
  outline: 2px solid rgba(var(--brand-rgb), 0.42);
  outline-offset: 2px;
}

.planner-time-block-time,
.planner-time-block-title {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.planner-time-block-time {
  font-size: 0.82rem;
  color: rgba(255, 248, 243, 0.82);
}

.planner-time-block-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fffaf6;
  line-height: 1.15;
}

.planner-time-block-meta {
  font-size: 0.82rem;
  color: rgba(255, 248, 243, 0.78);
  line-height: 1.28;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.planner-time-block-action {
  margin-top: auto;
  padding-top: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 248, 243, 0.82);
}

.planner-time-block-mini {
  padding: 10px 10px 8px;
  gap: 3px;
}

.planner-time-block-mini .planner-time-block-time {
  font-size: 0.76rem;
}

.planner-time-block-mini .planner-time-block-title {
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.planner-time-block-mini .planner-time-block-meta,
.planner-time-block-mini .planner-time-block-action {
  display: none;
}

.planner-time-block-compact {
  padding-bottom: 9px;
}

.planner-time-block-compact .planner-time-block-title {
  font-size: 0.95rem;
}

.planner-time-block-compact .planner-time-block-meta + .planner-time-block-meta,
.planner-time-block-compact .planner-time-block-action {
  display: none;
}

.planner-time-block-standard .planner-time-block-title,
.planner-time-block-expanded .planner-time-block-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.planner-time-block-expanded .planner-time-block-meta:last-of-type {
  -webkit-line-clamp: 2;
}

.reschedule-week-grid,
.reschedule-shell {
  display: grid;
  gap: 14px;
}

.reschedule-week-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.reschedule-week-summary {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  flex: 1 1 auto;
  min-width: 0;
}

.reschedule-week-summary strong {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.reschedule-week-summary span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.reschedule-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.reschedule-day-button {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 88px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(18, 28, 39, 0.9), rgba(10, 16, 23, 0.82));
  text-align: left;
}

.reschedule-day-button.active {
  border-color: rgba(var(--brand-rgb), 0.34);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.14) inset;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.18), rgba(10, 16, 23, 0.88));
}

.reschedule-day-button-label {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
}

.reschedule-day-button-date,
.reschedule-day-count {
  color: var(--muted);
  font-size: 0.88rem;
}

.reschedule-day-detail {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(18, 28, 39, 0.9), rgba(10, 16, 23, 0.84));
}

.reschedule-day-detail-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.reschedule-selection-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.reschedule-selection-bar.compact {
  justify-content: flex-start;
}

.reschedule-selection-summary {
  display: grid;
  gap: 4px;
}

.reschedule-selection-summary strong {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.98rem;
}

.reschedule-selection-summary span {
  color: var(--muted);
  font-size: 0.92rem;
}

.reschedule-timeline-shell {
  --reschedule-hour-height: 64px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.reschedule-time-labels {
  display: grid;
  grid-template-rows: repeat(12, var(--reschedule-hour-height));
}

.reschedule-time-label {
  height: var(--reschedule-hour-height);
  color: var(--muted);
  font-size: 0.88rem;
  transform: translateY(-0.6rem);
}

.reschedule-time-grid {
  position: relative;
  min-height: calc(12 * var(--reschedule-hour-height));
  border-radius: 22px;
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: crosshair;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent calc(var(--reschedule-hour-height) / 4)
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px,
      transparent var(--reschedule-hour-height)
    ),
    linear-gradient(180deg, rgba(9, 15, 22, 0.92), rgba(12, 20, 28, 0.88));
}

.reschedule-time-hour {
  height: var(--reschedule-hour-height);
}

.reschedule-slot-block,
.reschedule-selected-block {
  position: absolute;
  left: 12px;
  right: 12px;
  border-radius: 18px;
}

.reschedule-busy-block {
  position: absolute;
  border-radius: 18px;
  z-index: 2;
  padding: 10px 12px;
  border: 1px solid rgba(104, 175, 255, 0.24);
  background: linear-gradient(180deg, rgba(59, 120, 255, 0.28), rgba(36, 73, 150, 0.22));
  overflow: hidden;
}

.reschedule-busy-title {
  font-weight: 700;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.reschedule-busy-meta {
  margin-top: 4px;
  font-size: 0.82rem;
  color: rgba(255, 248, 243, 0.82);
}

.reschedule-slot-block {
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 14px;
  padding: 0 10px;
  border: 1px dashed rgba(var(--brand-rgb), 0.24);
  background: rgba(var(--brand-rgb), 0.08);
  text-align: left;
  transform: translateY(-50%);
  overflow: hidden;
  box-shadow: none;
}

.reschedule-slot-block.clean {
  border-color: rgba(var(--brand-rgb), 0.34);
  background: rgba(var(--brand-rgb), 0.12);
}

.reschedule-slot-block.watch {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.1);
}

.reschedule-slot-block-time {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 160ms ease;
}

.reschedule-slot-block:hover,
.reschedule-slot-block:focus-visible {
  z-index: 3;
  background: rgba(var(--brand-rgb), 0.2);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.18);
}

.reschedule-slot-block:hover .reschedule-slot-block-time,
.reschedule-slot-block:focus-visible .reschedule-slot-block-time {
  opacity: 1;
}

.reschedule-selected-block {
  z-index: 4;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--brand-rgb), 0.44);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.34), rgba(var(--brand-rgb), 0.18));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  cursor: grab;
}

.reschedule-selected-block.dragging {
  cursor: grabbing;
}

.reschedule-selected-chip {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(11, 18, 25, 0.42);
  color: #fff7f2;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.reschedule-selected-time {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fffaf6;
  line-height: 1.1;
}

.planner-map-index {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  border: 0;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--panel-solid);
  color: var(--text);
}

.leaflet-control-attribution,
.leaflet-control-attribution a {
  color: var(--muted);
}

.section-header {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.collapsible-header {
  margin-bottom: 0;
}

.collapsible-panel-body {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.collapsible-panel-body.closed {
  display: none;
}

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

.dropbox-reuse-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dropbox-reuse-summary-panel {
  display: grid;
  gap: 14px;
}

.dropbox-reuse-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.dropbox-reuse-summary-count {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dropbox-media-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.dropbox-media-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(18, 29, 40, 0.9), rgba(10, 17, 25, 0.82));
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.dropbox-media-card:hover {
  border-color: rgba(var(--brand-rgb), 0.28);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.12), rgba(10, 17, 25, 0.9));
  transform: translateY(-1px);
}

.dropbox-media-card.selected {
  border-color: rgba(var(--brand-rgb), 0.42);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.18) inset;
}

.dropbox-media-card input[type="checkbox"] {
  justify-self: start;
}

.dropbox-media-thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
}

.dropbox-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dropbox-media-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.dropbox-media-body {
  display: grid;
  gap: 4px;
}

.dropbox-media-body strong {
  font-size: 0.95rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dropbox-media-body span {
  color: var(--muted);
  font-size: 0.86rem;
}

.dropbox-media-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3, 8, 13, 0.7);
  backdrop-filter: blur(8px);
}

body.modal-open {
  overflow: hidden;
}

.dropbox-media-modal {
  width: min(1180px, calc(100vw - 40px));
  max-height: min(84vh, 980px);
  overflow: hidden;
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 25, 35, 0.98), rgba(8, 14, 20, 0.96));
  box-shadow: var(--shadow);
}

.dropbox-media-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.dropbox-media-modal-head h3 {
  margin-bottom: 6px;
}

.dropbox-media-modal-actions {
  justify-content: flex-start;
}

.dropbox-media-modal-grid {
  overflow: auto;
  padding-right: 6px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.dropbox-media-card-modal {
  gap: 12px;
  padding: 14px;
}

.dropbox-media-thumb-large {
  aspect-ratio: 1 / 1;
  min-height: 180px;
}

.ops-preset-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ops-preset {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 88px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(18, 28, 39, 0.92), rgba(11, 18, 25, 0.84));
  text-align: left;
}

.ops-preset strong {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.98rem;
}

.ops-preset span {
  color: var(--muted);
  font-size: 0.92rem;
}

.ops-preset.active {
  border-color: rgba(var(--brand-rgb), 0.42);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.18) inset;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.18), rgba(12, 20, 28, 0.88));
}

.ops-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.ops-selection-summary {
  display: grid;
  gap: 4px;
}

.ops-selection-summary strong {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.ops-selection-summary span {
  color: var(--muted);
}

.ops-lanes {
  display: grid;
  gap: 18px;
}

.ops-lane {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 32, 0.9), rgba(9, 15, 22, 0.82));
}

.ops-lane-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.ops-lane-header h3 {
  margin-bottom: 4px;
}

.ops-lane-count {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  background: rgba(var(--brand-rgb), 0.1);
  color: var(--brand);
  font-size: 0.88rem;
  white-space: nowrap;
}

.activity-row {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.activity-row.selectable {
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 18px;
  transition: background 180ms ease, border-color 180ms ease;
}

.activity-row.selectable.selected {
  background: rgba(var(--brand-rgb), 0.08);
  border-color: rgba(var(--brand-rgb), 0.18);
}

.activity-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.activity-select {
  display: flex;
  align-items: flex-start;
  padding-top: 3px;
}

.activity-select input {
  accent-color: var(--brand);
}

.activity-main {
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
}

.activity-title {
  font-weight: 700;
}

.activity-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.status-dot.tone-brand {
  color: var(--brand);
  border-color: rgba(var(--brand-rgb), 0.22);
}

.status-dot.tone-accent {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.24);
}

.status-dot.tone-neutral {
  color: var(--muted);
}

.status-dot.tone-danger {
  color: var(--danger);
  border-color: rgba(255, 122, 102, 0.26);
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--border);
  color: var(--muted);
  background: var(--surface-soft);
}

.jobs-board-controls-hidden {
  display: none;
}

.jobs-page-shell {
  display: grid;
  gap: 16px;
}

.jobs-page-shell-calendar {
  grid-template-columns: minmax(0, 1fr);
}

.jobs-board-panel-calendar {
  min-width: 0;
}

.jobs-create-panel-wrap {
  display: grid;
  justify-content: center;
}

.jobs-create-panel {
  width: 100%;
}

.jobs-page-shell-calendar .jobs-create-panel {
  max-width: 920px;
}

.jobs-create-toggle {
  width: 100%;
  min-height: 0;
  padding: 0 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
}

.jobs-create-toggle:hover,
.jobs-create-toggle:focus-visible {
  transform: none;
  background: transparent;
}

.jobs-create-panel .collapsible-panel-body {
  padding-top: 0;
}

.jobs-board-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.jobs-board-filter-grid .notice {
  grid-column: 1 / -1;
}

.jobs-board-calendar-toolbar {
  align-items: stretch;
  padding: 14px 16px;
}

.jobs-calendar-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.jobs-calendar-layout-stack {
  gap: 18px;
}

.jobs-calendar-surface-panel,
.jobs-calendar-agenda-wrap {
  min-width: 0;
}

.jobs-calendar-surface-panel {
  display: grid;
  gap: 14px;
}

.jobs-calendar-shell {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.jobs-calendar-grid-labels,
.jobs-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.jobs-calendar-grid-labels span {
  padding-left: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.jobs-calendar-day {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 150px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 32, 0.92), rgba(9, 16, 24, 0.84));
  text-align: left;
}

.jobs-calendar-day:hover {
  border-color: rgba(var(--brand-rgb), 0.28);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.12), rgba(9, 16, 24, 0.9));
}

.jobs-calendar-day.selected {
  border-color: rgba(var(--brand-rgb), 0.42);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.16) inset;
}

.jobs-calendar-day.today {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.22) inset;
}

.jobs-calendar-day.outside-month {
  opacity: 0.56;
}

.jobs-calendar-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.jobs-calendar-date {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.jobs-weather-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  background: rgba(var(--brand-rgb), 0.1);
  color: var(--brand);
  font-size: 0.76rem;
  white-space: nowrap;
}

.jobs-weather-icon {
  width: 14px;
  height: 14px;
  position: relative;
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.92;
}

.jobs-weather-icon[data-weather-icon="cloud"] {
  border-radius: 999px;
  width: 16px;
  height: 10px;
  top: 2px;
}

.jobs-weather-icon[data-weather-icon="cloud-sun"]::after,
.jobs-weather-icon[data-weather-icon="fog"]::after,
.jobs-weather-icon[data-weather-icon="drizzle"]::after,
.jobs-weather-icon[data-weather-icon="rain"]::after,
.jobs-weather-icon[data-weather-icon="snow"]::after,
.jobs-weather-icon[data-weather-icon="storm"]::after {
  content: "";
  position: absolute;
  inset: 0;
}

.jobs-weather-icon[data-weather-icon="cloud-sun"] {
  border-radius: 999px;
  width: 16px;
  height: 10px;
  top: 2px;
}

.jobs-weather-icon[data-weather-icon="cloud-sun"]::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 210, 115, 0.9);
  left: -2px;
  top: -3px;
}

.jobs-weather-icon[data-weather-icon="fog"] {
  border-radius: 999px;
  width: 16px;
  height: 8px;
  top: 3px;
}

.jobs-weather-icon[data-weather-icon="fog"]::after {
  width: 16px;
  height: 2px;
  background: currentColor;
  left: 0;
  top: 10px;
  box-shadow: 0 4px 0 currentColor;
  opacity: 0.82;
}

.jobs-weather-icon[data-weather-icon="drizzle"],
.jobs-weather-icon[data-weather-icon="rain"],
.jobs-weather-icon[data-weather-icon="snow"],
.jobs-weather-icon[data-weather-icon="storm"] {
  border-radius: 999px;
  width: 16px;
  height: 10px;
  top: 1px;
}

.jobs-weather-icon[data-weather-icon="drizzle"]::after,
.jobs-weather-icon[data-weather-icon="rain"]::after,
.jobs-weather-icon[data-weather-icon="snow"]::after {
  width: 2px;
  height: 6px;
  left: 3px;
  top: 10px;
  background: currentColor;
  box-shadow: 4px 0 0 currentColor, 8px 0 0 currentColor;
}

.jobs-weather-icon[data-weather-icon="snow"]::after {
  width: 4px;
  height: 4px;
  left: 2px;
  top: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 5px 1px 0 currentColor, 10px -1px 0 currentColor;
}

.jobs-weather-icon[data-weather-icon="storm"]::after {
  width: 8px;
  height: 10px;
  clip-path: polygon(35% 0, 100% 0, 58% 48%, 80% 48%, 28% 100%, 42% 58%, 18% 58%);
  background: rgba(255, 214, 92, 0.94);
  left: 4px;
  top: 8px;
}

.jobs-calendar-day-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.jobs-calendar-day-list {
  display: grid;
  gap: 6px;
}

.jobs-calendar-mini-job {
  display: block;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(var(--brand-rgb), 0.12);
  color: rgba(255, 248, 243, 0.92);
  font-size: 0.8rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jobs-week-calendar {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.jobs-week-scroll {
  overflow: visible;
  padding-bottom: 6px;
  min-width: 0;
}

.jobs-week-time-labels {
  display: grid;
}

.jobs-week-time-label {
  min-height: 52px;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.jobs-week-column {
  display: grid;
  gap: 10px;
}

.jobs-week-column-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.jobs-week-column.selected .jobs-week-column-header {
  border-color: rgba(var(--brand-rgb), 0.42);
  background: rgba(var(--brand-rgb), 0.1);
}

.jobs-week-column-header strong,
.jobs-week-column-header span {
  display: block;
}

.jobs-week-column-header span {
  color: var(--muted);
  font-size: 0.8rem;
}

.jobs-week-column-grid {
  position: relative;
  min-height: calc((20 - 8) * 52px);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.94), rgba(10, 15, 22, 0.88));
}

.jobs-week-hour-slot {
  height: 52px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.jobs-week-hour-slot:first-child {
  border-top: 0;
}

.jobs-week-event {
  position: absolute;
  padding: 10px 10px 8px;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-rgb), 0.26);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.18), rgba(28, 49, 78, 0.94));
  display: grid;
  align-content: start;
  gap: 4px;
  color: #fffaf6;
  text-decoration: none;
  overflow: hidden;
  min-height: 44px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.jobs-week-event strong {
  font-size: 0.88rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jobs-week-event span {
  font-size: 0.75rem;
  color: rgba(255, 248, 243, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jobs-week-event.overlap {
  padding-inline: 8px;
}

.jobs-week-event.tight strong {
  font-size: 0.8rem;
}

.jobs-week-event.tight span {
  display: none;
}

.jobs-calendar-agenda-panel {
  margin: 0;
  position: static;
}

.jobs-calendar-agenda-panel .activity-list {
  display: grid;
  gap: 12px;
}

.job-command-bar {
  display: grid;
  gap: 14px;
}

.job-command-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.job-command-intro {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.job-command-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}

.job-command-summary {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.06;
}

.job-primary-actions {
  align-items: center;
}

.job-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-inline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge-danger {
  color: var(--danger);
  border-color: rgba(255, 122, 102, 0.28);
  background: rgba(255, 122, 102, 0.08);
}

.job-detail-shell {
  display: grid;
  gap: 16px;
}

.job-detail-primary-grid {
  display: grid;
  gap: 16px;
  align-items: start;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.job-overview-panel,
.job-workflow-panel,
.job-workspace-panel {
  padding: 20px;
}

.job-workflow-panel {
  display: grid;
  gap: 14px;
}

.job-workflow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.58fr);
  gap: 16px;
  align-items: start;
}

.job-workflow-head h2 {
  margin: 0 0 6px;
}

.job-workflow-status-field {
  display: grid;
  gap: 8px;
}

.job-workflow-attention {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.job-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.job-step-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 13, 20, 0.36);
}

.job-step-card.active {
  border-color: rgba(var(--brand-rgb), 0.34);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.12) inset;
}

.job-step-card.complete {
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.12), rgba(255, 255, 255, 0.03));
}

.job-step-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.job-step-index,
.job-step-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.76rem;
}

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

.job-workspace-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.job-workspace-tab {
  display: grid;
  gap: 4px;
  justify-items: flex-start;
  align-content: start;
  min-height: 0;
  padding: 12px 14px;
  border-radius: 18px;
  text-align: left;
}

.job-workspace-tab small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.job-workspace-tab.active {
  border-color: rgba(var(--brand-rgb), 0.34);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.14), rgba(255, 255, 255, 0.04));
}

.job-workspace-body {
  min-width: 0;
}

.job-workspace-pane {
  display: none;
}

.job-workspace-pane.active {
  display: block;
}

.job-detail-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}

.job-detail-main,
.job-detail-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.job-detail-section {
  padding: 0;
  overflow: hidden;
}

.job-section-toggle {
  width: 100%;
  min-height: 0;
  padding: 18px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  box-shadow: none;
}

.job-section-toggle:hover,
.job-section-toggle:focus-visible {
  transform: none;
  background: rgba(255, 255, 255, 0.03);
}

.job-section-toggle h2 {
  margin: 0;
}

.job-section-toggle p {
  margin: 6px 0 0;
}

.job-section-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.84rem;
}

.job-section-body {
  padding: 0 20px 20px;
}

.job-section-body.closed {
  display: none;
}

.job-section-body.open {
  display: block;
}

.job-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.job-field-span-2 {
  grid-column: 1 / -1;
}

.job-inline-grid {
  display: grid;
  gap: 14px;
  align-items: start;
}

.job-inline-stack {
  display: grid;
  gap: 12px;
}

.job-subpanel {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.job-subpanel h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.job-page-header {
  margin-bottom: 10px;
}

.task-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.task-row-actions button {
  min-height: 38px;
  padding: 8px 12px;
}

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

.job-task-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.job-task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.job-task-card-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
}

.job-task-card-subtitle {
  margin-top: 4px;
}

.job-task-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.job-task-card-body {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.job-task-due-inline {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.job-task-due-inline label {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.job-task-controls {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.job-task-status-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.job-task-status-group button,
.job-task-utility-actions button {
  min-height: 38px;
  padding: 8px 12px;
}

.job-task-utility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.jobs-board-panel {
  padding: 22px;
}

.jobs-create-panel-wrap {
  justify-content: stretch;
}

.jobs-page-shell-calendar .jobs-create-panel {
  max-width: 100%;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

input[type="checkbox"] {
  width: auto;
}

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

.mono-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transition: 180ms ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--brand-rgb), 0.32);
  background: var(--surface-hover);
}

button.primary,
.primary-link {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff8f3;
  border-color: transparent;
}

button.danger {
  background: rgba(255, 122, 102, 0.1);
  border-color: rgba(255, 122, 102, 0.24);
  color: var(--danger);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.kpi {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.kpi .value {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
}

.notice {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-rgb), 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.notice.danger {
  border-color: rgba(255, 122, 102, 0.28);
  color: var(--danger);
}

.code,
.code-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.code {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(18, 24, 28, 0.92);
  color: #f7f1e8;
}

.code-inline {
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  background: rgba(var(--brand-rgb), 0.14);
}

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

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.checklist {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.checkpoint-list,
.timeline {
  display: grid;
  gap: 12px;
}

.checkpoint-row,
.timeline-entry {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.checkpoint-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.checkpoint-main {
  display: grid;
  gap: 4px;
}

.checkpoint-title,
.timeline-title {
  font-weight: 700;
}

.checkpoint-meta,
.timeline-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.timeline-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  width: 100%;
  margin: 8px 0;
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-swatch {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: transparent;
}

.theme-swatch.active {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.32);
  border-color: rgba(var(--brand-rgb), 0.62);
}

.theme-preview {
  display: flex;
  align-items: stretch;
}

.theme-preview-card {
  width: 100%;
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.08), rgba(255, 255, 255, 0.03)),
    rgba(11, 17, 24, 0.82);
  box-shadow: var(--shadow);
}

@media (min-width: 960px) {
  .job-delivery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jobs-calendar-agenda-panel .activity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1240px) {
  .job-command-bar {
    position: sticky;
    top: 82px;
    z-index: 8;
  }
}

@media (min-width: 1460px) {
  .job-production-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  }
}

@media (max-width: 1100px) {
  .brand-subtitle {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .topbar-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 18px;
    right: 18px;
    display: none;
    padding: 18px;
    border-radius: 26px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(19, 14, 25, 0.98), rgba(11, 8, 16, 0.98));
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  body.nav-open .topbar-menu {
    display: flex;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .nav a,
  .topbar-signout {
    justify-content: center;
    width: 100%;
  }
}

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

  .job-field-span-2 {
    grid-column: auto;
  }

  .job-task-card-head {
    align-items: flex-start;
  }

  .job-task-card-body {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .job-task-status-group {
    min-width: 0;
    width: 100%;
  }

  .job-detail-primary-grid,
  .job-workflow-head,
  .job-workspace-tabs {
    grid-template-columns: 1fr;
  }
}

:root[data-theme-mode="light"] .hero {
  background:
    linear-gradient(135deg, rgba(255, 250, 243, 0.92), rgba(245, 232, 216, 0.84)),
    linear-gradient(135deg, rgba(var(--brand-rgb), 0.06), rgba(var(--accent-rgb), 0.05));
}

:root[data-theme-mode="light"] .hero-stat {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(var(--brand-rgb), 0.08);
}

:root[data-theme-mode="light"] .panel-accent {
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.09), rgba(255, 250, 243, 0.95));
}

:root[data-theme-mode="light"] .status-card {
  background: rgba(255, 250, 243, 0.78);
}

:root[data-theme-mode="light"] .metric-card {
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.92), rgba(255, 255, 255, 0.7));
}

:root[data-theme-mode="light"] .ops-preset,
:root[data-theme-mode="light"] .ops-lane {
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.92), rgba(255, 255, 255, 0.76));
}

:root[data-theme-mode="light"] .planner-calendar-day {
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.92), rgba(255, 255, 255, 0.76));
}

:root[data-theme-mode="light"] .planner-time-grid {
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.86), rgba(255, 255, 255, 0.7));
}

:root[data-theme-mode="light"] .status-dot,
:root[data-theme-mode="light"] .badge,
:root[data-theme-mode="light"] .notice,
:root[data-theme-mode="light"] .empty-state,
:root[data-theme-mode="light"] button,
:root[data-theme-mode="light"] .button-link {
  background: var(--surface-raised);
}

:root[data-theme-mode="light"] .theme-preview-card {
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.08), rgba(255, 255, 255, 0.7)),
    rgba(255, 250, 243, 0.85);
}

.location-list {
  margin: 12px 0 0;
  padding-left: 20px;
}

.location-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

@media (max-width: 760px) {
  .topbar {
    padding: 0 12px;
  }

  .topbar-inner {
    min-height: 68px;
  }

  .brand-subtitle {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .topbar-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    display: none;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(19, 14, 25, 0.98), rgba(11, 8, 16, 0.98));
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  body.nav-open .topbar-menu {
    display: flex;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .nav a,
  .topbar-signout {
    justify-content: center;
    width: 100%;
  }

  .section-header,
  .activity-row,
  .ops-bulk-bar,
  .ops-lane-header,
  .checkpoint-row,
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .panel,
  .status-card {
    border-radius: 20px;
  }

  .planner-timetable {
    grid-template-columns: 1fr;
  }

  .planner-time-labels {
    display: none;
  }

  .planner-calendar-grid-labels,
  .planner-calendar-grid {
    gap: 6px;
  }

  .planner-calendar-day {
    min-height: 72px;
    padding: 10px;
  }

  .planner-panel-toggle {
    gap: 12px;
  }

  .planner-panel-pill {
    min-width: 64px;
    min-height: 34px;
    padding: 7px 10px;
  }

  .reschedule-week-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reschedule-week-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .reschedule-week-summary {
    justify-items: start;
    text-align: left;
  }

  .reschedule-timeline-shell {
    grid-template-columns: 1fr;
  }

  .reschedule-time-labels {
    display: none;
  }

  .reschedule-day-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .jobs-calendar-agenda-panel {
    position: static;
  }

  .jobs-week-calendar {
    min-width: 680px;
  }
}

#lineItems {
  display: grid;
  gap: 12px;
}

.invoice-line-row {
  align-items: flex-start;
  padding: 14px;
  border: 1px solid rgba(113, 139, 168, 0.18);
  border-radius: 18px;
  background: rgba(14, 21, 30, 0.42);
}

.invoice-estimate-card {
  gap: 10px;
}

.invoice-estimate-grid {
  gap: 14px;
  align-items: center;
}

.invoice-estimate-grid > span {
  min-width: 120px;
}

.invoice-estimate-total {
  margin-left: auto;
}

.email-compose-body {
  min-height: 260px;
}

.datetime-picker {
  color-scheme: dark;
}

.datetime-picker::-webkit-calendar-picker-indicator {
  filter: invert(0.88);
  opacity: 0.9;
}
