:root {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17273d;
  background: #f3f6fa;
  font-size: 16px;
  --nav: #07182c;
  --carbon: #212121;
  --brand-orange: #ef3c00;
  --action-orange: #ba3000;
  --nav-muted: #a1aec1;
  --blue: #255fdc;
  --line: #e1e7f0;
  --muted: #5e6b7f;
  --white: #fff;
  --radius: 13px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
svg { flex: none; vertical-align: middle; }
:focus-visible { outline: 3px solid #4896fd; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 2.45vw, 2.35rem); letter-spacing: -.045em; line-height: 1.16; }
h2 { font-size: 1.07rem; letter-spacing: -.022em; line-height: 1.35; }
h3 { font-size: .98rem; }
small { color: var(--muted); }
.portal { display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.workspace, .public { display: flex; flex-direction: column; min-width: 0; }
.sidebar { align-self: start; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; color: #fff; background: var(--nav); z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; padding: 25px 22px 24px; white-space: nowrap; }
.brand img { display: block; width: 142px; max-width: 100%; height: auto; flex: none; }
.brand-field { color: #ffbca7; font-size: .82rem; letter-spacing: .04em; }
.sidebar .brand { align-items: flex-start; flex-direction: column; gap: 5px; }
.sidebar nav { flex: 1; overflow: auto; padding: 2px 13px 16px; scrollbar-width: thin; scrollbar-color: #34445e transparent; }
.nav-group + .nav-group { margin-top: 17px; }
.nav-group p { font-size: .655rem; font-weight: 760; color: #8597b2; text-transform: uppercase; letter-spacing: .105em; padding: 0 11px 6px; }
.nav-group a { min-height: 36px; display: flex; align-items: center; gap: 11px; padding: 7px 10px; margin-bottom: 2px; font-size: .875rem; font-weight: 540; color: #b9c6d9; border-radius: 7px; }
.nav-group a svg { color: #91a5c1; }
.nav-group a:hover { background: #1b2b45; color: #fff; }
.nav-group a[aria-current] { color: #f5f8ff; font-weight: 650; background: #223960; box-shadow: inset 3px 0 var(--brand-orange); }
.nav-group a[aria-current] svg { color: #91b7ff; }
.sidebar-bottom { border-top: 1px solid #26354d; padding: 15px 19px; display: flex; align-items: center; gap: 11px; }
.workspace-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: #243650; color: #9bbdff; }
.sidebar-bottom strong, .account-name strong { display: block; font-size: .83rem; }
.sidebar-bottom small, .account-name small { display: block; font-size: .72rem; margin-top: 3px; }
.sidebar-bottom small { color: #a1aec1; }
.topbar { min-height: 68px; display: flex; align-items: center; gap: 18px; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); padding: 0 clamp(16px, 2.5vw, 38px); }
.breadcrumbs, .top-actions, .top-search, .account summary { display: flex; align-items: center; gap: 12px; }
.breadcrumbs { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.breadcrumbs strong { color: #17273d; }
.top-actions { gap: 15px; }
.top-search { gap: 8px; background: #f7f9fc; border: 1px solid #e5eaf2; color: #66758b; border-radius: 8px; padding: 0 9px; }
.top-search input { min-height: 35px; width: 155px; border: 0; outline-offset: 0; background: transparent; font-size: .84rem; }
kbd { font-size: .73rem; background: white; border: 1px solid #e0e6ef; border-radius: 4px; padding: 1px 5px; }
.icon-button { display: grid; place-items: center; color: #53647b; width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: white; }
.icon-button:hover { background: #edf3ff; color: var(--blue); }
.bell { position: relative; border: 0; }
.bell::after { position: absolute; top: 7px; right: 8px; border: 1.5px solid white; width: 8px; height: 8px; border-radius: 50%; background: #3775f1; content: ""; }
.account { position: relative; padding-left: 14px; border-left: 1px solid var(--line); }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.account-menu { position: absolute; z-index: 6; right: 0; top: calc(100% + 12px); min-width: max-content; background: white; border: 1px solid var(--line); padding: 12px; border-radius: 10px; box-shadow: 0 8px 24px #17273d19; font-size: .875rem; }
.mobile-menu { display: none; }
.main { flex: 1; padding: 32px clamp(16px, 2.5vw, 38px) 22px; width: 100%; max-width: 1680px; margin-inline: auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 27px; }
.page-heading p { color: var(--muted); font-size: .94rem; margin-top: 9px; line-height: 1.45; }
.heading-actions, .quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button, .date-control { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; gap: 7px; border: 1px solid #dce4ef; border-radius: 8px; background: #fff; padding: 9px 12px; color: #30425a; min-height: 38px; font-size: .84rem; font-weight: 670; }
.button:hover { border-color: #9eb8ef; color: #164bb6; background: #f7faff; }
.button.primary { background: var(--action-orange); border-color: var(--action-orange); color: var(--white); box-shadow: 0 2px 4px #21212120; }
.button.primary:hover { background: #962700; border-color: #962700; }
.date-control { color: #4b5c72; padding-block: 5px; }
.date-control input { border: 0; background: transparent; color: inherit; width: 121px; min-height: 27px; padding: 0; }
.section-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .69rem; color: #41536e; font-weight: 760; letter-spacing: .11em; }
.section-date { margin-left: auto; color: #67758a; font-size: .77rem; font-weight: 560; letter-spacing: 0; }
.live-dot, .badge i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: #12a584; }
.live-dot { box-shadow: 0 0 0 3px #cef0e8; }
.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.metric, .panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 4px #263e6205; min-width: 0; }
.metric { padding: 14px 13px 13px; display: flex; flex-direction: column; align-items: flex-start; min-height: 134px; }
.metric:hover { border-color: #9eb8ef; }
.metric-top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; color: #8c9ab0; margin-bottom: 10px; }
.metric-icon { display: grid; place-items: center; border-radius: 8px; width: 34px; height: 34px; }
.blue { background: #e9f0ff; color: #235bc9; }
.purple, .lavender { background: #efebff; color: #6543bd; }
.teal, .aqua { background: #dff6f3; color: #087c70; }
.green { background: #e6f6ed; color: #147647; }
.amber, .peach { background: #fff2db; color: #936011; }
.red { background: #fce8eb; color: #a82440; }
.grey { background: #edf1f6; color: #53647b; }
.metric-label { font-size: .79rem; color: #4f6077; font-weight: 650; line-height: 1.25; }
.metric strong { margin-top: 3px; font-size: clamp(1.4rem, 2.1vw, 2rem); line-height: 1.15; letter-spacing: -.055em; }
.metric small { margin-top: 6px; font-size: .69rem; line-height: 1.25; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(252px, 1fr); gap: 17px; align-items: start; }
.panel-heading { padding: 17px 17px 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.panel-heading p { color: var(--muted); margin-top: 4px; font-size: .79rem; }
.panel-heading .button { min-height: 32px; padding-block: 5px; }
.table-wrapper { max-inline-size: 100%; overflow: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .84rem; white-space: nowrap; }
thead { position: sticky; inset-block-start: 0; z-index: 2; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid #e8edf4; }
thead th { color: #61718a; font-size: .69rem; letter-spacing: .035em; text-transform: uppercase; background: #f7f9fc; }
tbody tr { min-height: 54px; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover > * { background: #f7faff; }
tbody th { position: sticky; inset-inline-start: 0; background: #fff; z-index: 1; font-weight: 650; }
tr > :first-child { padding-left: 17px; }
tr > :last-child { padding-right: 15px; }
td small, th small { display: block; font-size: .72rem; margin-top: 4px; font-weight: 500; }
.table-title:hover, .text-link:hover { color: var(--blue); text-decoration: underline; }
.separator { margin-inline: 2px; color: #8998ad; }
.person { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 35px; height: 35px; border-radius: 50%; font-size: .73rem; font-weight: 750; }
.avatar.small { width: 24px; height: 24px; font-size: .59rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 99px; white-space: nowrap; font-size: .68rem; line-height: 1.2; font-weight: 680; }
.badge i { width: 5px; height: 5px; background: currentColor; }
.row-link { display: inline-grid; place-items: center; width: 25px; height: 27px; color: #77869c; border-radius: 5px; }
.row-link:hover { background: #e3edff; color: #164bb6; }
.team-row { display: flex; align-items: center; gap: 9px; min-height: 67px; margin-inline: 15px; border-bottom: 1px solid #e8edf4; }
.team-row:hover { color: var(--blue); }
.team-row:last-child { border-bottom: 0; }
.team-name { flex: 1; min-width: 0; }
.team-name strong, .activity strong { display: block; font-size: .83rem; }
.team-name small, .activity small { display: block; margin-top: 4px; font-size: .74rem; }
.team-footer { border-top: 1px solid var(--line); padding: 13px 17px; }
.team-footer a, .text-link { color: #2056be; font-weight: 650; font-size: .83rem; }
.team-footer svg { margin-left: 3px; }
.activity { list-style: none; margin: 0; padding: 0 15px; }
.activity li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #e8edf4; min-height: 56px; }
.activity li:last-child { border: 0; }
.activity time { margin-left: auto; align-self: center; font-size: .69rem; color: var(--muted); }
.activity-icon { display: grid; flex: none; place-items: center; width: 29px; height: 29px; background: #eef3fc; border-radius: 8px; color: #3266c8; }
.area-map { position: relative; isolation: isolate; overflow: hidden; min-height: 252px; background: #eaf0e4 url('/assets/service-map.svg') center / cover; border-radius: 0 0 var(--radius) var(--radius); }
.map-caption, .map-type { position: absolute; z-index: 1; padding: 5px 8px; font-size: .68rem; font-weight: 650; background: #fffffff2; border-radius: 5px; }
.map-caption { left: 10px; top: 10px; }
.map-type { right: 10px; bottom: 9px; }
.map-marker { position: absolute; z-index: 2; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: #245ed8; color: #fff; box-shadow: 0 2px 5px #2239575a; font-size: .69rem; font-weight: 750; }
.map-marker span { position: absolute; top: 26px; color: #253f49; background: #ffffffe9; border-radius: 3px; padding: 1px 3px; font-size: .6rem; white-space: nowrap; }
.map-marker:hover, .map-marker:focus-visible { z-index: 4; background: #152d63; }
.foot-grid { margin-top: 17px; }
.quick-actions { padding: 15px 17px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 9px 20px; padding: 17px clamp(16px, 2.5vw, 38px); font-size: .75rem; color: #53647b; border-top: 1px solid var(--line); background: #fff; }
.footer a:hover { text-decoration: underline; }
.empty, .pad { padding: 20px; }
.empty, .muted { color: var(--muted); }
.pad > h2 { margin-bottom: 15px; }
.pad > p + p { margin-top: 12px; }
.pad + .panel { margin-top: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 16px; border-bottom: 1px solid var(--line); }
.filters .text-link { padding-bottom: 11px; }
label { display: grid; gap: 6px; color: #394b63; font-size: .875rem; font-weight: 660; min-width: 0; }
input, textarea, select { min-width: 0; max-width: 100%; color: #17273d; }
label > input, label > select, label > textarea { border: 1px solid #d9e3f0; padding: 9px 10px; min-height: 40px; border-radius: 7px; font-weight: 450; background: white; width: 100%; }
.edit-form label + label, .edit-form label + .field-pair, .field-pair + label, .edit-form details { margin-top: 13px; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-pair > label + label { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 13px; }
.overrides { background: #f6f8fc; border-radius: 7px; padding: 10px; margin-bottom: 10px; font-size: .875rem; }
.overrides[open] summary { margin-bottom: 10px; }
.edit-form [data-price], .edit-form [data-address-lookup] { margin-block: 12px; }
.price-summary { display: block; font-size: .875rem; color: var(--muted); }
.notice { border: 1px solid #9ccfb9; border-radius: 8px; color: #145537; background: #e9f7ef; padding: 12px; margin-bottom: 15px; }
.notice.error { border-color: #e7b0b9; background: #fff1f3; color: #85263a; }
.public-header { background: var(--nav); color: white; }
.public .main { max-width: 990px; }
.public .pad p { line-height: 1.6; }
.public .brand { width: fit-content; }
.record-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.key-values { display: grid; grid-template-columns: 1fr 1.3fr; gap: 9px 14px; margin: 0; font-size: .875rem; }
.key-values dt { color: var(--muted); }
.key-values dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.stack { display: grid; gap: 16px; }
.stack > .panel { margin: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.calendar-day { background: white; min-height: 100px; padding: 9px; min-width: 0; }
.calendar-day time { font-size: .75rem; color: var(--muted); }
.calendar-day a { display: block; margin-top: 5px; background: #e9f0ff; color: #1d51b0; padding: 5px; border-radius: 4px; font-size: .72rem; overflow-wrap: anywhere; }
.calendar-day.is-today { background: #f3f7ff; }
.calendar-day.is-today time { color: #2056be; font-weight: 750; }
.sign-pad { width: 100%; height: 160px; display: block; touch-action: none; border: 1px dashed #a4b4ca; border-radius: 8px; background: #fbfcff; margin-block: 9px; }
@media (max-width: 1280px) {
  .portal { grid-template-columns: 207px minmax(0, 1fr); }
  .metrics { gap: 9px; }
  .metric { padding-inline: 10px; }
  th, td { padding-inline: 9px; }
  .dashboard-grid { grid-template-columns: minmax(0, 2.25fr) minmax(225px, 1fr); gap: 13px; }
}
@media (max-width: 1090px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(200px, .5fr); }
}
@media (max-width: 820px) {
  .portal { display: block; }
  .workspace { min-height: 100dvh; }
  .sidebar { display: none; position: fixed; inset: 62px auto 0 0; height: auto; width: min(270px, 90vw); box-shadow: 6px 0 25px #17273d38; }
  .sidebar.open { display: flex; }
  .sidebar .brand { padding-block: 16px; }
  .topbar { position: sticky; z-index: 4; top: 0; min-height: 62px; }
  .mobile-menu { display: grid; }
  .breadcrumbs > span, .breadcrumbs > svg { display: none; }
  .top-search input { width: 108px; }
}
@media (max-width: 625px) {
  .main { padding-top: 22px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .dashboard-grid, .form-grid, .record-grid { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-name, .top-search kbd, .top-search > svg { display: none; }
  .top-actions { gap: 7px; }
  .account { padding-left: 6px; }
  .calendar-day { padding: 4px; min-height: 70px; }
  .calendar-day time { font-size: .64rem; }
}
.large-map .area-map { min-height: min(53vh, 510px); }
.onsite-report h2 { margin-block: 18px 8px; }
.onsite-report .declaration { margin-bottom: 18px; }
@media print {
  .portal { display: block; }
  .sidebar, .topbar, .page-heading, .footer, .notice { display: none; }
  .main { padding: 0; }
  .panel { border: 0; box-shadow: none; }
  .declaration { break-inside: avoid; }
}
.check-row { display: flex; align-items: center; width: fit-content; gap: 8px; }
.check-row input { width: 16px; min-height: 16px; }
.form-actions { gap: 8px; flex-wrap: wrap; }
.live-map { height: 292px; border-radius: 0 0 var(--radius) var(--radius); }
.large-map .live-map { height: min(53vh, 510px); }
.business-summary { margin-top: 17px; }
.financial-summary { padding: 16px; }
.financial-summary .key-values { grid-template-columns: repeat(3, minmax(0, 1fr) minmax(70px, .6fr)); }
@media (max-width: 1050px) { .financial-summary .key-values { grid-template-columns: 1fr 1fr; } }
body { color: #17273d; background: #f3f6fa; }
.skip-link:focus { position: fixed; inset: 8px auto auto 8px; z-index: 12; padding: 9px 12px; background: white; color: #173e8e; }
.calendar-controls { margin-bottom: 16px; }
.calendar-controls .filters { border-bottom: 0; }
.full-calendar { --fc-button-bg-color: #255fdc; --fc-button-border-color: #255fdc; --fc-button-hover-bg-color: #194cb6; --fc-button-active-bg-color: #183e96; }
[hidden] { display: none !important; }
@media (max-width: 740px) { .full-calendar .fc-header-toolbar { flex-wrap: wrap; gap: 10px; } }
.report-header { border-block: 4px solid var(--brand-orange); border-bottom: 1px solid var(--line); padding: 16px 0; }
.report-logo { display: block; width: 150px; height: auto; margin-bottom: 12px; }
.report-meta, .report-verification { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.report-fields { white-space: normal; }
.report-fields th { width: 29%; color: var(--muted); vertical-align: top; }
.report-fields td { vertical-align: top; }
@media (max-width: 380px) {
  .breadcrumbs strong { display: none; }
  .topbar { gap: 8px; }
}

.integration-settings .muted { margin-bottom: 14px; }
