:root {
  --bg: #f4f5f2;
  --card: #ffffff;
  --ink: #101114;
  --muted: #6b6f76;
  --line: #e2e4df;
  --soft: #eff1ed;
  --dark: #111318;
  --good: #137333;
  --warn: #9a5b00;
  --bad: #b42318;
  --radius: 24px;
  --shadow: 0 18px 55px rgb(16 17 20 / 12%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(circle at 50% 0, #ffffff 0, var(--bg) 44%); color: var(--ink); font-family: "UberMoveText", "Helvetica Neue", Arial, system-ui, sans-serif; padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }
.app-shell, .customer-shell { width: min(520px, 100%); margin: 0 auto; padding: 12px 12px 0; }
.top-bar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 0 12px; background: linear-gradient(var(--bg) 72%, rgb(244 245 242 / 0)); }
.back-button, .icon-button, .text-button, .circle-button { border: 0; background: rgb(255 255 255 / 74%); color: var(--ink); border-radius: 999px; min-height: 40px; padding: 0 14px; font-weight: 850; font-size: 13px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 6%); }
.circle-button { width: 46px; padding: 0; font-size: 0; position: relative; }
.circle-button::after { content: ""; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; position: absolute; top: 18px; left: 20px; transform: rotate(135deg); }
#nextMonth::after { transform: rotate(-45deg); left: 17px; }
.tiny-label { display: block; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 29px; line-height: 1; letter-spacing: -.05em; margin: 0; }
h2 { font-size: 23px; line-height: 1.03; letter-spacing: -.045em; margin-bottom: 10px; }
h3 { font-size: 17px; letter-spacing: -.03em; margin-bottom: 10px; }
p { color: var(--muted); line-height: 1.36; }
.tab { display: none; animation: enter .18s ease-out; }
.tab.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .tab { animation: none; } }
.quick-card, .hero-card, .compact-section, .customer-card, .calendar-card, .job-panel, .detail-form, .job-hero { background: rgb(255 255 255 / 88%); border: 1px solid rgb(255 255 255 / 72%); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.hero-card { min-height: 164px; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: 12px; background: linear-gradient(145deg, #ffffff 0%, #f4f7f2 55%, #e9eee7 100%); }
.hero-card h2 { font-size: 30px; }
.status-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat-pill { border: 0; border-radius: 22px; min-height: 72px; background: rgb(255 255 255 / 78%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 6%); display: grid; place-items: center; gap: 2px; }
.stat-pill strong { font-size: 22px; letter-spacing: -.05em; }
.stat-pill span { color: var(--muted); font-size: 11px; font-weight: 850; }
label { display: grid; gap: 6px; color: #24262a; font-size: 12px; font-weight: 850; margin-bottom: 10px; }
input, textarea, select { width: 100%; min-height: 46px; border: 1px solid transparent; border-radius: 16px; background: var(--soft); color: var(--ink); outline: 0; padding: 11px 12px; transition: border-color .14s ease, background .14s ease, transform .14s ease; }
.phone-first input { min-height: 58px; font-size: 24px; letter-spacing: -.03em; font-weight: 850; border-radius: 18px; }
textarea { resize: vertical; min-height: 72px; }
input:focus, textarea:focus, select:focus { background: #fff; border-color: var(--ink); }
.two-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-box { border: 1px solid var(--line); border-radius: 18px; margin: 2px 0 10px; overflow: hidden; }
.more-box summary { min-height: 44px; display: flex; align-items: center; padding: 0 12px; font-weight: 850; cursor: pointer; list-style: none; }
.more-box summary::-webkit-details-marker { display: none; }
.more-box[open] { padding: 0 10px 10px; }
.more-box[open] summary { margin: 0 -10px 10px; background: #fafafa; border-bottom: 1px solid var(--line); }
.sticky-actions { position: sticky; bottom: calc(104px + env(safe-area-inset-bottom)); z-index: 8; display: grid; grid-template-columns: 1fr .82fr; gap: 8px; padding-top: 8px; background: linear-gradient(rgb(255 255 255 / 0), rgb(255 255 255 / 90%) 28%); }
.primary-action, .secondary-action { min-height: 50px; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 900; font-size: 15px; }
.primary-action { background: var(--dark); color: white; }
.secondary-action { background: var(--soft); color: var(--ink); }
.primary-action:active, .secondary-action:active, .icon-button:active, .nav-item:active, .lead-card:active { transform: scale(.985); }
.form-note { min-height: 18px; margin: 8px 2px 0; font-size: 12px; }
.compact-section { margin-top: 10px; box-shadow: none; }
.section-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 8px; }
.section-line h2 { margin: 0; }
.lead-stack { display: grid; gap: 9px; }
.lead-card { display: grid; gap: 7px; background: rgb(255 255 255 / 86%); border: 1px solid rgb(255 255 255 / 80%); border-radius: 22px; padding: 13px; box-shadow: 0 10px 30px rgb(16 17 20 / 7%); transition: transform .14s ease; }
.lead-card.compact { grid-template-columns: 1fr; }
.lead-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lead-topline strong { font-size: 17px; letter-spacing: -.025em; }
.lead-meta, .lead-note { color: var(--muted); font-size: 13px; line-height: 1.32; }
.lead-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.chip, .count-pill, .mini-count { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--soft); color: var(--ink); min-height: 30px; padding: 0 10px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.chip.link-sent, .chip.customer-completed, .chip.completed { background: #e9f5ee; color: var(--good); }
.chip.urgent, .chip.emergency { background: #fdecea; color: var(--bad); }
.chip.today, .chip.needs-follow-up { background: #fff4db; color: var(--warn); }
.chip.in-progress, .chip.on-the-way, .chip.scheduled { background: #e8f0fe; color: #1558d6; }
.quick-action { min-height: 34px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); padding: 0 11px; font-weight: 850; font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; }
.quick-action.dark { background: var(--dark); color: white; }
.mini-count { background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.empty { padding: 16px; border-radius: 18px; background: var(--soft); color: var(--muted); font-size: 14px; }
.search-wrap { margin-bottom: 10px; }
.search-wrap input { min-height: 50px; border-radius: 999px; }
.segment-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; scrollbar-width: none; }
.filter-chip, .status-button { flex: 0 0 auto; border: 0; border-radius: 999px; min-height: 38px; padding: 0 13px; background: rgb(255 255 255 / 75%); color: var(--muted); font-weight: 850; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 6%); }
.filter-chip.active, .status-button.active { background: var(--dark); color: white; }
.calendar-card { margin-bottom: 12px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; text-align: center; }
.calendar-head h2 { margin: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.weekday-row { margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 900; text-align: center; }
.day-cell { min-height: 48px; border: 0; border-radius: 16px; background: var(--soft); display: grid; align-content: center; justify-items: center; color: var(--ink); }
.day-cell strong { font-size: 15px; }
.day-cell span { font-size: 10px; font-weight: 900; color: var(--good); }
.day-cell.muted { background: transparent; }
.day-cell.has-jobs { background: #e9f5ee; }
.day-cell.selected { background: var(--dark); color: white; }
.day-cell.selected span { color: white; }
.job-mode .top-bar { grid-template-columns: auto 1fr auto; padding-bottom: 6px; }
.job-mode .top-bar .tiny-label { display: none; }
.job-mode #screenTitle { font-size: 18px; letter-spacing: -.02em; }
.job-customer-strip { position: sticky; top: 56px; z-index: 9; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 10px; padding: 8px 10px; border-radius: 22px; background: rgb(255 255 255 / 78%); border: 1px solid rgb(255 255 255 / 80%); backdrop-filter: blur(18px); box-shadow: 0 10px 34px rgb(0 0 0 / 10%); }
.mini-back { border: 0; border-radius: 999px; min-height: 36px; padding: 0 12px; background: var(--soft); font-weight: 900; }
.customer-mini { min-width: 0; display: grid; gap: 1px; }
.customer-mini strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; letter-spacing: -.02em; }
.customer-mini span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.job-focus-card { background: linear-gradient(145deg, #ffffff 0%, #eef2ee 100%); border: 1px solid rgb(255 255 255 / 80%); border-radius: 28px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 10px; }
.job-focus-card h2 { font-size: 31px; margin: 0 0 12px; }
.job-focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.job-focus-grid div { background: rgb(255 255 255 / 70%); border-radius: 18px; padding: 10px; }
.job-focus-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.job-focus-grid strong { font-size: 13px; line-height: 1.2; }
.job-address, .job-main-note, .access-pill { margin: 0 0 8px; color: var(--ink); }
.job-main-note { font-size: 17px; line-height: 1.35; }
.muted-note { color: var(--muted); }
.access-pill { background: #fff4db; border-radius: 18px; padding: 10px; color: var(--warn); font-weight: 850; font-size: 13px; }
.job-drive-actions { display: grid; grid-template-columns: .72fr .72fr .78fr 1.05fr; gap: 7px; margin: 10px 0; padding: 8px; border-radius: 26px; background: rgb(255 255 255 / 72%); backdrop-filter: blur(22px); box-shadow: 0 14px 40px rgb(0 0 0 / 12%); }
.job-drive-actions:has(.drive-button:nth-child(3):last-child) { grid-template-columns: .75fr .85fr 1.1fr; }
.drive-button { min-height: 58px; border: 0; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 950; font-size: 14px; }
.drive-button.primary { background: var(--dark); color: white; }
.drive-button.secondary { background: var(--soft); color: var(--ink); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-head h3 { margin: 0; }
.panel-head span { min-width: 28px; min-height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); font-size: 12px; font-weight: 900; color: var(--muted); }
.detail-form, .job-panel, .edit-details { margin-bottom: 10px; box-shadow: none; }
.edit-details { background: rgb(255 255 255 / 86%); border: 1px solid rgb(255 255 255 / 72%); border-radius: var(--radius); padding: 0; overflow: hidden; }
.edit-details summary { min-height: 54px; display: flex; align-items: center; padding: 0 14px; font-weight: 950; cursor: pointer; list-style: none; }
.edit-details summary::-webkit-details-marker { display: none; }
.edit-details[open] .detail-form { border-radius: 0; margin-bottom: 0; }
.inline-form, .upload-box { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.inline-form label, .upload-box label { margin: 0; }
.hidden-file { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.camera-button { width: 100%; min-height: 66px; border: 0; border-radius: 22px; background: var(--dark); color: white; font-weight: 950; font-size: 16px; margin-bottom: 10px; }
.job-status-drawer { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 4px; scrollbar-width: none; }
.timeline { display: grid; gap: 8px; }
.timeline-item { border-radius: 18px; background: var(--soft); padding: 12px; }
.timeline-item strong { font-size: 11px; color: var(--muted); }
.timeline-item p { margin: 4px 0 0; color: var(--ink); }
.image-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.image-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; display: block; }
.bottom-nav { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; width: min(440px, calc(100% - 28px)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px; border-radius: 28px; border: 1px solid rgb(255 255 255 / 70%); background: linear-gradient(135deg, rgb(255 255 255 / 72%), rgb(255 255 255 / 34%)); backdrop-filter: blur(28px) saturate(180%) contrast(1.05); -webkit-backdrop-filter: blur(28px) saturate(180%) contrast(1.05); box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%), 0 18px 60px rgb(0 0 0 / 22%); }
.bottom-nav::before { content: ""; position: absolute; inset: 1px; border-radius: 27px; pointer-events: none; background: radial-gradient(circle at 20% 0%, rgb(255 255 255 / 75%), transparent 34%); }
.nav-item { position: relative; border: 0; border-radius: 22px; min-height: 54px; background: transparent; color: #555b62; font-weight: 950; font-size: 12px; z-index: 1; }
.nav-item.active { background: var(--dark); color: #fff; box-shadow: 0 10px 22px rgb(0 0 0 / 18%); }
.nav-item.new-tab { background: rgb(255 255 255 / 62%); color: var(--ink); }
.nav-item.new-tab.active { background: var(--dark); color: white; }
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: end; justify-content: center; background: rgb(0 0 0 / 32%); padding: 12px; }
.sheet-panel { width: min(520px, 100%); background: #fff; border-radius: 28px 28px 18px 18px; padding: 18px; box-shadow: 0 -20px 60px rgb(0 0 0 / 20%); }
.sheet-close { float: right; border: 0; background: var(--soft); border-radius: 999px; min-height: 34px; padding: 0 12px; font-weight: 850; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.customer-card h1 { font-size: 34px; margin-bottom: 8px; }
.customer-card p { margin-bottom: 14px; }
@media (min-width: 860px) { body { padding-bottom: 116px; } .app-shell, .customer-shell { width: 430px; padding-top: 22px; } .sticky-actions { bottom: 104px; } }
@media (max-width: 380px) { .two-field-row, .inline-form, .upload-box { grid-template-columns: 1fr; } .sticky-actions { grid-template-columns: 1fr; } h1 { font-size: 28px; } .bottom-nav { width: calc(100% - 18px); } .nav-item { font-size: 11px; } }

.calendar-workspace { padding: 12px; overflow: hidden; }
.calendar-mode-row { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 2px; scrollbar-width: none; }
.calendar-mode { flex: 0 0 auto; min-height: 38px; border: 0; border-radius: 999px; padding: 0 13px; background: var(--soft); color: var(--muted); font-weight: 950; font-size: 12px; }
.calendar-mode.active { background: var(--dark); color: #fff; }
#calendarViewport { min-height: 120px; }
.today-dot strong::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 999px; background: currentColor; margin: 2px auto 0; opacity: .75; }
.timeline-scroll { display: grid; grid-template-columns: 42px 1fr; gap: 7px; overflow-x: auto; padding-bottom: 4px; }
.time-rail { padding-top: 50px; color: var(--muted); font-size: 10px; font-weight: 950; text-align: right; }
.time-hour { border-top: 1px solid var(--line); padding-top: 4px; }
.timeline-days { display: grid; gap: 7px; min-width: 250px; }
.timeline-days.cols-1 { grid-template-columns: minmax(230px, 1fr); }
.timeline-days.cols-3 { grid-template-columns: repeat(3, minmax(172px, 1fr)); min-width: 550px; }
.timeline-days.cols-7 { grid-template-columns: repeat(7, minmax(132px, 1fr)); min-width: 980px; }
.timeline-day { min-width: 0; }
.timeline-day-head { width: 100%; min-height: 44px; border: 0; border-radius: 16px 16px 10px 10px; background: var(--soft); display: grid; justify-items: start; padding: 7px 9px; font-weight: 950; }
.timeline-day.is-today .timeline-day-head { background: var(--dark); color: white; }
.timeline-day-head span { color: inherit; opacity: .72; font-size: 11px; }
.timeline-lane { position: relative; background: linear-gradient(#eef0ec 1px, transparent 1px) 0 0 / 100% 76px, rgb(255 255 255 / 64%); border-radius: 0 0 18px 18px; overflow: hidden; }
.timeline-job { position: absolute; left: 6px; right: 6px; min-height: 58px; border: 0; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 8px 22px rgb(0 0 0 / 12%); padding: 8px; text-align: left; display: grid; gap: 1px; border-left: 4px solid #1558d6; }
.timeline-job.completed { opacity: .72; border-left-color: var(--good); }
.timeline-job.needs-follow-up, .timeline-job.urgent, .timeline-job.emergency { border-left-color: var(--warn); }
.timeline-job strong { font-size: 11px; color: var(--muted); }
.timeline-job span { font-size: 13px; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-job em { font-size: 11px; color: var(--muted); font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #ff3b30; box-shadow: 0 0 0 1px rgb(255 59 48 / 18%); z-index: 5; }
.now-line span { position: absolute; right: 5px; top: -11px; border-radius: 999px; background: #ff3b30; color: white; font-size: 9px; font-weight: 950; padding: 2px 6px; }
.agenda-list { display: grid; gap: 8px; }
.agenda-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; border-radius: 18px; padding: 10px; background: rgb(255 255 255 / 82%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 5%); }
.agenda-item time { color: var(--muted); font-weight: 950; font-size: 12px; }
.agenda-item strong { display: block; font-size: 15px; letter-spacing: -.02em; }
.agenda-item p { margin: 2px 0 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inline-now { display: flex; align-items: center; gap: 8px; color: #ff3b30; font-size: 11px; font-weight: 950; text-transform: uppercase; letter-spacing: .08em; }
.inline-now::before, .inline-now::after { content: ""; height: 2px; background: #ff3b30; flex: 1; border-radius: 999px; }
.inline-now span { border: 1px solid #ff3b30; border-radius: 999px; padding: 3px 8px; background: #fff; }
.task-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(238px, 84%); gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.task-column { scroll-snap-align: start; display: grid; gap: 8px; align-content: start; min-height: 210px; padding: 10px; border-radius: 22px; background: rgb(255 255 255 / 65%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 5%); }
.task-head { display: flex; align-items: center; justify-content: space-between; font-weight: 950; }
.task-head span { min-width: 28px; min-height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); color: var(--muted); font-size: 12px; }
.empty.small { padding: 11px; font-size: 12px; }
@media (max-width: 380px) { .agenda-item { grid-template-columns: 46px 1fr; } .agenda-item .chip { grid-column: 2; justify-self: start; } }
