/* SnowBiller theme on top of Bootstrap 5.3: red (#DF2D3C) and white, Inter for text, Poppins for headings. */

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

/* ------------------------------------------------------------------ tokens */

:root,
[data-bs-theme=light] {
  --sb-red: #DF2D3C;
  --sb-red-dark: #B22430;
  --sb-red-deep: #8F1B26;
  --sb-red-soft: #FDECEE;
  --sb-red-text: #B22430;
  --sb-ink: #1F2328;
  --sb-muted: #6B7280;
  --sb-surface: #FFFFFF;
  --sb-canvas: #F6F7F9;
  --sb-line: #E5E7EB;
  --sb-shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 1px 3px rgba(17, 24, 39, .08);
  --sb-sidebar-width: 252px;
  --sb-topbar-height: 56px;
  --sb-heading-font: "Poppins", var(--bs-font-sans-serif);

  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-primary: #DF2D3C;
  --bs-primary-rgb: 223, 45, 60;
  --bs-primary-text-emphasis: #8F1B26;
  --bs-primary-bg-subtle: #FDECEE;
  --bs-primary-border-subtle: #F5B8BE;
  --bs-link-color: #C42533;
  --bs-link-color-rgb: 196, 37, 51;
  --bs-link-hover-color: #8F1B26;
  --bs-link-hover-color-rgb: 143, 27, 38;
  --bs-focus-ring-color: rgba(223, 45, 60, .25);
  --bs-body-color: #1F2328;
}

[data-bs-theme=dark] {
  --sb-red-soft: #3A1418;
  --sb-red-text: #F59AA2;
  --sb-ink: #E6E8EB;
  --sb-muted: #9AA4B2;
  --sb-surface: #171A1F;
  --sb-canvas: #0F1114;
  --sb-line: #2A2F36;
  --sb-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --bs-primary-text-emphasis: #F59AA2;
  --bs-primary-bg-subtle: #3A1418;
  --bs-primary-border-subtle: #6E1F27;
  --bs-link-color: #F37A85;
  --bs-link-color-rgb: 243, 122, 133;
  --bs-link-hover-color: #F8AAB1;
  --bs-link-hover-color-rgb: 248, 170, 177;
  --bs-body-color: #E6E8EB;
  --bs-body-bg: #0F1114;
}

html[data-sb-text=small] { font-size: 15px; }
html[data-sb-text=medium] { font-size: 16px; }
html[data-sb-text=large] { font-size: 18px; }

body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }

h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6, .sb-heading {
  font-family: var(--sb-heading-font);
  letter-spacing: -0.015em;
}

/* ------------------------------------------------------------------ Bootstrap in red */

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #DF2D3C;
  --bs-btn-border-color: #DF2D3C;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #B22430;
  --bs-btn-hover-border-color: #B22430;
  --bs-btn-focus-shadow-rgb: 223, 45, 60;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #8F1B26;
  --bs-btn-active-border-color: #8F1B26;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #DF2D3C;
  --bs-btn-disabled-border-color: #DF2D3C;
}

.btn-outline-primary {
  --bs-btn-color: #C42533;
  --bs-btn-border-color: #DF2D3C;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #DF2D3C;
  --bs-btn-hover-border-color: #DF2D3C;
  --bs-btn-focus-shadow-rgb: 223, 45, 60;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #B22430;
  --bs-btn-active-border-color: #B22430;
}

.btn-pill { border-radius: 999px; padding: .65rem 1.35rem; font-weight: 600; }
.btn-icon { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border-radius: .6rem; }

.form-control:focus, .form-select:focus { border-color: rgba(223, 45, 60, .55); box-shadow: 0 0 0 .25rem rgba(223, 45, 60, .15); }
.form-check-input:checked { background-color: #DF2D3C; border-color: #DF2D3C; }
.form-check-input:focus { border-color: rgba(223, 45, 60, .55); box-shadow: 0 0 0 .25rem rgba(223, 45, 60, .15); }
.form-switch .form-check-input:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ef8a93'/%3e%3c/svg%3e"); }
.form-label { font-weight: 600; font-size: .875rem; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background-color: #DF2D3C; }
.nav-underline .nav-link.active { color: var(--sb-red-text); border-bottom-color: currentColor; }
.page-link { color: var(--bs-link-color); }
.active > .page-link, .page-link.active { background-color: #DF2D3C; border-color: #DF2D3C; color: #fff; }
.dropdown-item.active, .dropdown-item:active { background-color: #DF2D3C; }
.progress-bar { background-color: #DF2D3C; }
.list-group-item.active { background-color: #DF2D3C; border-color: #DF2D3C; }

/* ------------------------------------------------------------------ app shell */

body.sb-app { background: var(--sb-canvas); }

.sb-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--sb-topbar-height);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 0 1rem;
  background: var(--sb-red);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.sb-topbar a:not(.btn), .sb-topbar .btn-link { color: #fff; }
.sb-topbar .btn-light { --bs-btn-color: #B22430; --bs-btn-hover-color: #8F1B26; --bs-btn-bg: #fff; --bs-btn-border-color: #fff; }
.sb-topbar .sb-logo img { height: 26px; display: block; }
.sb-topbar .btn-icon { color: #fff; background: transparent; border: 0; font-size: 1.25rem; }
.sb-topbar .btn-icon:hover, .sb-topbar .btn-icon:focus-visible { background: rgba(255, 255, 255, .14); }
.sb-topbar .sb-top-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }

.sb-env { background: #FFC107; color: #1F2328; font-size: .68rem; font-weight: 700; border-radius: .35rem; padding: .12rem .4rem; text-transform: uppercase; letter-spacing: .04em; }

.sb-acting {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .75rem;
  padding: .45rem 1rem; font-size: .875rem;
  background: #FFF4D6; color: #5C4300; border-bottom: 1px solid #F3D98A;
}
[data-bs-theme=dark] .sb-acting { background: #3B2F0A; color: #FFE7A3; border-color: #5C4A12; }

.sb-shell { display: flex; min-height: calc(100vh - var(--sb-topbar-height)); }

.sb-sidebar {
  position: sticky;
  top: var(--sb-topbar-height);
  flex: 0 0 var(--sb-sidebar-width);
  width: var(--sb-sidebar-width);
  height: calc(100vh - var(--sb-topbar-height));
  display: flex;
  flex-direction: column;
  background: var(--sb-surface);
  border-right: 1px solid var(--sb-line);
}
.sb-nav { flex: 1; overflow-y: auto; padding: .75rem .6rem; }
.sb-nav-section { padding: .9rem .75rem .3rem; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--sb-muted); }
.sb-nav-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .48rem .75rem; margin-bottom: 1px;
  border-radius: .55rem; color: var(--sb-ink); text-decoration: none; font-weight: 500; font-size: .925rem;
}
.sb-nav-link .bi { width: 1.25rem; font-size: 1.05rem; text-align: center; color: var(--sb-muted); }
.sb-nav-link:hover { background: var(--sb-canvas); color: var(--sb-ink); }
.sb-nav-link.active { background: var(--sb-red-soft); color: var(--sb-red-text); font-weight: 600; }
.sb-nav-link.active .bi { color: var(--sb-red-text); }
.sb-nav-link .badge { margin-left: auto; }

.sb-switcher { padding: .5rem; border-top: 1px solid var(--sb-line); }
.sb-switcher-button {
  display: flex; align-items: center; gap: .65rem; width: 100%;
  padding: .5rem; border: 0; border-radius: .65rem; background: transparent; color: var(--sb-ink); text-align: left;
}
.sb-switcher-button:hover, .sb-switcher-button[aria-expanded=true] { background: var(--sb-canvas); }
.sb-switcher-text { min-width: 0; flex: 1; line-height: 1.25; }
.sb-switcher-text strong, .sb-switcher-text small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-switcher-text small { color: var(--sb-muted); }
.sb-switcher .dropdown-menu { width: calc(var(--sb-sidebar-width) - 1rem); }

.sb-avatar {
  flex: 0 0 auto; display: grid; place-items: center; overflow: hidden;
  width: 2rem; height: 2rem; border-radius: .55rem;
  background: var(--sb-red); color: #fff; font-size: .78rem; font-weight: 700;
}
.sb-avatar.round { border-radius: 50%; }
.sb-avatar.sm { width: 1.5rem; height: 1.5rem; font-size: .62rem; }
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sb-main { flex: 1; min-width: 0; padding: 1.5rem 1.75rem 3rem; }
.sb-content { max-width: 1280px; }
.sb-page-header { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.sb-page-header h1 { margin: 0; font-size: 1.55rem; font-weight: 700; }
.sb-page-header .sb-subtitle { width: 100%; margin: -.35rem 0 0; color: var(--sb-muted); }
.sb-page-header .sb-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; }

.sb-backdrop { display: none; }

@media (max-width: 991.98px) {
  .sb-sidebar {
    position: fixed; left: 0; z-index: 1045;
    /* Hidden (not just moved) while closed so its shadow doesn't show and its links can't be tabbed to. */
    transform: translateX(-100%); visibility: hidden; transition: transform .2s ease-out, visibility 0s linear .2s;
  }
  .sb-sidebar.show { transform: none; visibility: visible; transition: transform .2s ease-out; box-shadow: 0 10px 40px rgba(17, 24, 39, .25); }
  .sb-backdrop.show { display: block; position: fixed; inset: var(--sb-topbar-height) 0 0 0; z-index: 1040; background: rgba(17, 24, 39, .35); }
  .sb-main { padding: 1rem 1rem 2.5rem; }
}

/* ------------------------------------------------------------------ building blocks */

.sb-card { background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: .9rem; box-shadow: var(--sb-shadow); }
.sb-card-header { display: flex; align-items: center; gap: .5rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--sb-line); }
.sb-card-header h2, .sb-card-header h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.sb-card-header .sb-actions { margin-left: auto; display: flex; gap: .4rem; }
.sb-card-body { padding: 1.1rem 1.2rem; }
.sb-card > .table-responsive > .table, .sb-card > .table { margin-bottom: 0; }

.sb-stat { padding: 1rem 1.2rem; }
.sb-stat-label { color: var(--sb-muted); font-size: .82rem; font-weight: 500; }
.sb-stat-value { font-family: var(--sb-heading-font); font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
.sb-stat-note { color: var(--sb-muted); font-size: .8rem; }

.table-sb { --bs-table-bg: transparent; margin-bottom: 0; }
.table-sb > thead > tr > th {
  padding-top: .65rem; padding-bottom: .65rem; white-space: nowrap;
  font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--sb-muted);
  border-bottom-width: 1px; background: var(--sb-surface);
}
.table-sb > tbody > tr > td { vertical-align: middle; }
.table-sb > tbody > tr:last-child > td { border-bottom: 0; }
.table-sb th a { color: inherit; text-decoration: none; }
.table-sb th a:hover { color: var(--sb-ink); }
.table-sb .sb-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-row-link { cursor: pointer; }

.sb-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .16rem .58rem; border-radius: 999px; font-size: .76rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
  color: var(--chip, #DF2D3C);
  background: color-mix(in srgb, var(--chip, #DF2D3C) 13%, transparent);
}
.sb-status { display: inline-flex; align-items: center; gap: .35rem; padding: .16rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.sb-status::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.sb-status-pending { color: #92600A; background: #FEF3C7; }
.sb-status-approved { color: #166534; background: #DCFCE7; }
.sb-status-rejected { color: #B22430; background: #FDECEE; }
.sb-status-billed { color: #1E40AF; background: #DBEAFE; }
[data-bs-theme=dark] .sb-status-pending { color: #FCD34D; background: #3A2C06; }
[data-bs-theme=dark] .sb-status-approved { color: #86EFAC; background: #0F2E1B; }
[data-bs-theme=dark] .sb-status-rejected { color: #F59AA2; background: #3A1418; }
[data-bs-theme=dark] .sb-status-billed { color: #93C5FD; background: #142447; }

.sb-flag { color: #B45309; }
.sb-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-muted { color: var(--sb-muted); }

.sb-empty { padding: 3rem 1rem; text-align: center; color: var(--sb-muted); }
.sb-empty .bi { display: block; margin-bottom: .5rem; font-size: 2.4rem; color: var(--sb-line); }
.sb-empty h2 { font-size: 1.1rem; color: var(--sb-ink); }

.sb-toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.sb-toasts .toast { border: 0; box-shadow: 0 10px 30px rgba(17, 24, 39, .18); }

.sb-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: 1rem; }
.sb-filters > .form-control, .sb-filters > .form-select { flex: 1 1 10rem; width: auto; min-width: 9rem; max-width: 15rem; }
.sb-filters > input[type=search] { flex: 2 1 16rem; max-width: 26rem; }
.sb-filters > input[type=date] { flex: 0 1 10.5rem; }
.sb-filters .form-check { align-self: center; margin-bottom: 0 !important; }

.sb-kbd { padding: .05rem .35rem; border: 1px solid var(--sb-line); border-bottom-width: 2px; border-radius: .3rem; font-size: .75rem; font-family: var(--bs-font-monospace); }

/* ------------------------------------------------------------------ sign-in pages (falling snow on red) */

body.sb-auth { min-height: 100vh; background: var(--sb-canvas); }
.sb-auth-hero { position: relative; height: 46vh; min-height: 300px; overflow: hidden; background: linear-gradient(180deg, #DF2D3C 0%, #B22430 100%); }
.sb-auth-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sb-auth-home { position: absolute; top: 1.1rem; left: 1.25rem; z-index: 1; }
.sb-auth-home img { height: 28px; }
.sb-auth-card {
  position: relative; z-index: 1; width: min(440px, calc(100vw - 2rem));
  margin: -32vh auto 3rem; padding: 2rem;
  border-radius: 1.1rem; background: var(--sb-surface); box-shadow: 0 24px 60px rgba(17, 24, 39, .22);
}
.sb-auth-card.wide { width: min(640px, calc(100vw - 2rem)); }
.sb-auth-card h1 { font-size: 1.45rem; font-weight: 700; }
.sb-auth-logo { display: block; height: 32px; margin: 0 auto 1.4rem; }
.sb-provider {
  display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%;
  padding: .72rem 1rem; border: 1px solid var(--sb-line); border-radius: 999px;
  background: var(--sb-surface); color: var(--sb-ink); font-weight: 600;
}
.sb-provider:hover, .sb-provider:focus-visible { border-color: var(--sb-ink); }
.sb-provider .bi { font-size: 1.1rem; }
.sb-divider { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; color: var(--sb-muted); font-size: .8rem; }
.sb-divider::before, .sb-divider::after { content: ""; flex: 1; border-top: 1px solid var(--sb-line); }
.sb-demo-account { display: flex; width: 100%; align-items: center; gap: .75rem; padding: .7rem .8rem; border: 1px solid var(--sb-line); border-radius: .75rem; background: var(--sb-surface); color: var(--sb-ink); text-align: left; }
.sb-demo-account + .sb-demo-account { margin-top: .5rem; }
.sb-demo-account:hover { border-color: var(--sb-red); background: var(--sb-red-soft); }
.sb-demo-account small { display: block; color: var(--sb-muted); }

/* ------------------------------------------------------------------ marketing site */

body.sb-site { background: #fff; color: #1F2328; }
.sb-site-nav { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid #EEF0F2; }
.sb-site-nav .navbar-brand img { height: 30px; }
.sb-site-nav .nav-link { font-weight: 500; color: #1F2328; }
.sb-site-nav .nav-link:hover, .sb-site-nav .nav-link.active { color: #C42533; }

.sb-hero { position: relative; overflow: hidden; padding: 5rem 0 4rem; background: linear-gradient(180deg, #FFF5F6 0%, #FFFFFF 70%); }
.sb-hero canvas.sb-snow { position: absolute; inset: 0 0 45% 0; width: 100%; height: 55%; pointer-events: none; }
.sb-eyebrow { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem; border-radius: 999px; background: #FDECEE; color: #B22430; font-size: .82rem; font-weight: 700; letter-spacing: .02em; }
.sb-hero h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); font-weight: 800; line-height: 1.08; }
.sb-hero .lead { font-size: 1.2rem; color: #4B5563; max-width: 38rem; }
.sb-hero-visual { position: relative; }

.sb-browser { overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 30px 70px rgba(17, 24, 39, .18), 0 0 0 1px rgba(17, 24, 39, .06); }
.sb-browser-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #F1F3F5; }
.sb-browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #D0D5DB; }
.sb-browser-bar .sb-url { flex: 1; height: 20px; margin-left: 10px; border-radius: 6px; background: #fff; }
.sb-callout { position: absolute; z-index: 2; display: flex; align-items: center; gap: .65rem; padding: .7rem .95rem; border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(17, 24, 39, .16); font-size: .86rem; font-weight: 600; }
.sb-callout .bi { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem; background: #FDECEE; color: #DF2D3C; font-size: 1rem; }
.sb-callout small { display: block; color: #6B7280; font-weight: 500; }

.sb-section { padding: 5rem 0; }
.sb-section.alt { background: #F8F9FB; }
.sb-section h2:not(.h1, .h2, .h3, .h4, .h5, .h6) { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
.sb-feature { height: 100%; padding: 1.5rem; border: 1px solid #EEF0F2; border-radius: 1rem; background: #fff; }
.sb-feature .bi { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: .9rem; border-radius: .8rem; background: #FDECEE; color: #DF2D3C; font-size: 1.35rem; }
.sb-feature h3 { font-size: 1.1rem; font-weight: 700; }
.sb-feature p { margin: 0; color: #4B5563; }
.sb-stats-band { padding: 3rem 0; background: #1F2328; color: #fff; }
.sb-stats-band .sb-big { font-family: var(--sb-heading-font); font-size: 2.4rem; font-weight: 800; color: #fff; }
.sb-stats-band small { color: #C7CDD4; }
.sb-plan { display: flex; flex-direction: column; height: 100%; padding: 2rem; border: 1px solid var(--sb-line); border-radius: 1.1rem; background: var(--sb-surface); }
.sb-plan.highlight, .sb-plan.sb-plan-current { border: 2px solid #DF2D3C; box-shadow: 0 20px 50px rgba(223, 45, 60, .15); }
.sb-section .sb-plan h2 { font-size: 1.4rem; font-weight: 800; }
.sb-plan .sb-price, .sb-plan-price { font-family: var(--sb-heading-font); font-size: 2.6rem; font-weight: 800; line-height: 1.1; }
.sb-plan ul { margin: 1rem 0 1.5rem; padding: 0; list-style: none; }
.sb-plan li { padding: .3rem 0 .3rem 1.6rem; position: relative; }
.sb-plan li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: #DF2D3C; }
.sb-cta-band { padding: 4rem 0; background: linear-gradient(135deg, #DF2D3C, #B22430); color: #fff; }
.sb-site-footer { padding: 3rem 0 2rem; background: #F8F9FB; border-top: 1px solid #EEF0F2; font-size: .92rem; }
.sb-site-footer a:not(.btn) { color: #4B5563; text-decoration: none; }
.sb-site-footer a:not(.btn):hover { color: #C42533; }

/* ------------------------------------------------------------------ field app (phones) */

body.sb-field { min-height: 100vh; padding-bottom: calc(70px + env(safe-area-inset-bottom)); background: var(--sb-canvas); }
body.sb-field.sb-sheet-open { overflow: hidden; }
.sb-field-top {
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: .6rem;
  padding: calc(.55rem + env(safe-area-inset-top)) 1rem .55rem;
  background: var(--sb-red); color: #fff;
}
.sb-field-top img { height: 22px; }
.sb-field-top .sb-field-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.sb-field-top .sb-top-actions { margin-left: auto; display: flex; align-items: center; gap: .3rem; }
.sb-field-top .btn-icon { color: #fff; background: transparent; border: 0; font-size: 1.25rem; }
.sb-field-main { padding: 1rem 1rem 1.5rem; max-width: 640px; margin: 0 auto; }
.sb-field-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--sb-surface); border-top: 1px solid var(--sb-line);
}
.sb-field-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: .5rem .15rem .45rem; color: var(--sb-muted); font-size: .7rem; font-weight: 600; text-decoration: none; }
.sb-field-tab span:not(.sb-tab-badge) { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-field-tab .bi { font-size: 1.35rem; }
.sb-field-tab.active { color: var(--sb-red); }
.sb-tab-badge { position: absolute; top: .3rem; left: calc(50% + .45rem); min-width: 1.05rem; height: 1.05rem; padding: 0 .3rem; border-radius: 999px; background: var(--sb-red); color: #fff; font-size: .62rem; line-height: 1.05rem; text-align: center; }
body.sb-field .sb-toasts { left: 1rem; right: 1rem; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: none; align-items: center; }

.sb-sync { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .18); color: #fff; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.sb-sync[data-state=offline] { background: #FFC107; color: #1F2328; }
.sb-sync[data-state=problem] { background: #fff; color: #B22430; }
.sb-sync[data-state=sending] .bi { animation: sb-spin 1.2s linear infinite; }
@keyframes sb-spin { to { transform: rotate(360deg); } }
.sb-spinning .bi { animation: sb-spin 1s linear infinite; }

.sb-view-title { margin-bottom: .9rem; font-size: 1.35rem; font-weight: 700; }
.sb-section-title { margin: 1.25rem 0 .55rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sb-muted); }
.sb-hint { color: var(--sb-muted); font-size: .85rem; }
.sb-stack { display: flex; flex-direction: column; gap: .5rem; }
.sb-stack:empty { display: none; }
.sb-note { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .75rem; padding: .7rem .85rem; border-radius: .75rem; background: var(--sb-canvas); border: 1px solid var(--sb-line); font-size: .9rem; }
.sb-note > .bi { flex: 0 0 auto; margin-top: .1rem; }
.sb-note-warn { background: #FFF7E0; border-color: #F6D68A; color: #6B4A00; }
.sb-note-info { background: #EAF3FF; border-color: #BFD8FB; color: #1E3A8A; }
[data-bs-theme=dark] .sb-note-warn { background: #2E2508; border-color: #5C4A12; color: #FFE7A3; }
[data-bs-theme=dark] .sb-note-info { background: #0F1F38; border-color: #1E3A6B; color: #BFD8FB; }
.sb-field-banner { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; padding: .65rem .85rem; border-radius: .75rem; background: #FFF7E0; color: #6B4A00; font-size: .88rem; }
.sb-field-banner[data-kind=problem] { background: var(--sb-red-soft); color: var(--sb-red-text); }
[data-bs-theme=dark] .sb-field-banner { background: #2E2508; color: #FFE7A3; }

/* log work: location, groups, search, sites */
.sb-locbar { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.sb-loc { display: inline-flex; align-items: center; gap: .35rem; color: var(--sb-muted); font-size: .8rem; font-weight: 600; }
.sb-loc[data-state=ok] { color: #15803D; }
.sb-loc[data-state=denied], .sb-loc[data-state=off] { color: #B45309; }
[data-bs-theme=dark] .sb-loc[data-state=ok] { color: #86EFAC; }
.sb-search { position: relative; margin-bottom: .75rem; }
.sb-search > .bi { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--sb-muted); }
.sb-search .form-control { padding: .75rem 1rem .75rem 2.5rem; border-radius: .85rem; font-size: 1rem; }
.sb-group-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.sb-group-chips:empty { display: none; }
.sb-group-chip {
  display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; padding: .45rem .8rem;
  border: 1px solid color-mix(in srgb, var(--chip, #6B7280) 35%, transparent); border-radius: 999px;
  background: color-mix(in srgb, var(--chip, #6B7280) 12%, var(--sb-surface)); color: var(--sb-ink); font-size: .85rem;
}
.sb-group-chip .bi { color: var(--chip, #6B7280); }
.sb-group-chip .sb-group-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
.sb-group-chip .sb-group-meta { color: var(--sb-muted); white-space: nowrap; }
button.sb-group-chip.active { background: var(--chip, #6B7280); border-color: var(--chip, #6B7280); color: #fff; }
button.sb-group-chip.active .bi, button.sb-group-chip.active .sb-group-meta { color: #fff; }

.sb-list-tap { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 58px; padding: .7rem .9rem; border: 1px solid var(--sb-line); border-radius: .85rem; background: var(--sb-surface); color: var(--sb-ink); text-align: left; text-decoration: none; }
.sb-list-tap + .sb-list-tap { margin-top: .5rem; }
.sb-stack > .sb-list-tap + .sb-list-tap { margin-top: 0; }
.sb-list-tap:active { background: var(--sb-red-soft); }
.sb-tap-main { flex: 1; min-width: 0; }
.sb-tap-main strong, .sb-tap-main small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-tap-main small { color: var(--sb-muted); }
.sb-list-tap .sb-distance { font-size: .8rem; font-weight: 600; color: var(--sb-muted); white-space: nowrap; }
.sb-list-tap .sb-chevron { color: var(--sb-muted); }
.sb-site-icon { display: grid; flex: 0 0 auto; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .65rem; background: var(--sb-canvas); color: var(--sb-muted); font-size: 1.05rem; }
.sb-list-tap.sb-here { border-color: var(--sb-red); box-shadow: 0 0 0 1px var(--sb-red) inset; }
.sb-list-tap.sb-here .sb-site-icon { background: var(--sb-red); color: #fff; }
.sb-list-tap.sb-done { border-color: #86EFAC; }
.sb-list-tap.sb-done .sb-site-icon { background: #DCFCE7; color: #15803D; }
[data-bs-theme=dark] .sb-list-tap.sb-done { border-color: #1F6B3A; }
[data-bs-theme=dark] .sb-list-tap.sb-done .sb-site-icon { background: #0F2E1B; color: #86EFAC; }
.sb-list-tap.sb-here.sb-done { border-color: var(--sb-red); }
.sb-tap-main .sb-here-label { color: var(--sb-red-text); font-weight: 700; }
.sb-tap-main .sb-done-label { color: #15803D; font-weight: 600; }
[data-bs-theme=dark] .sb-tap-main .sb-done-label { color: #86EFAC; }
.sb-route-number { display: grid; flex: 0 0 auto; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--sb-ink); color: var(--sb-surface); font-weight: 700; }
.sb-done .sb-route-number { background: #15803D; color: #fff; }

.sb-timer-card { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; border-radius: .85rem; background: var(--sb-red); color: #fff; }
.sb-timer-card .sb-tap-main small { color: rgba(255, 255, 255, .8); }
.sb-timer-card .btn-icon { border: 0; background: transparent; color: #fff; }
.sb-timer-clock { font-family: var(--sb-heading-font); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
#log-timers:not(:empty) { margin-bottom: .75rem; }

/* full-screen panels (log at a site, entry details, photo viewer) */
.sb-sheet { position: fixed; inset: 0; z-index: 1050; display: flex; flex-direction: column; background: var(--sb-canvas); }
.sb-sheet[hidden] { display: none; }
.sb-sheet-head {
  display: flex; align-items: center; gap: .6rem;
  padding: calc(.55rem + env(safe-area-inset-top)) .75rem .55rem;
  background: var(--sb-surface); border-bottom: 1px solid var(--sb-line);
}
.sb-sheet-head .btn-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: transparent; color: var(--sb-ink); font-size: 1.3rem; }
.sb-sheet-title { flex: 1; min-width: 0; }
.sb-sheet-title strong, .sb-sheet-title small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-sheet-title strong { font-size: 1.05rem; }
.sb-sheet-title small { color: var(--sb-muted); }
.sb-sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; width: 100%; max-width: 640px; margin: 0 auto; padding: 1rem 1rem 2rem; }
.sb-sheet-foot { display: flex; gap: .5rem; width: 100%; max-width: 640px; margin: 0 auto; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: var(--sb-surface); border-top: 1px solid var(--sb-line); }
.sb-sheet-foot[hidden] { display: none; }
.sb-big-button { width: 100%; padding: 1rem; border-radius: .9rem; font-size: 1.1rem; font-weight: 700; }

.sb-service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; }
.sb-service-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-height: 92px; padding: .75rem .8rem;
  border: 2px solid var(--sb-line); border-radius: .9rem; background: var(--sb-surface); color: var(--sb-ink); text-align: left;
}
.sb-service-tile .sb-service-icon { font-size: 1.35rem; color: var(--chip, var(--sb-red)); }
.sb-service-tile .sb-service-name { font-weight: 700; line-height: 1.2; padding-right: 1.4rem; }
.sb-service-tile small { color: var(--sb-muted); font-size: .74rem; }
.sb-service-tile .sb-service-check { position: absolute; top: .55rem; right: .6rem; color: var(--sb-line); font-size: 1.15rem; }
.sb-service-tile[aria-pressed=true] { border-color: var(--sb-red); background: var(--sb-red-soft); }
.sb-service-tile[aria-pressed=true] .sb-service-check { color: var(--sb-red); }

.sb-capture-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.sb-capture-buttons .btn { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .65rem .3rem; border-radius: .8rem; font-size: .85rem; font-weight: 600; }
.sb-capture-buttons .btn .bi { font-size: 1.35rem; }
.sb-media-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.sb-media-strip:empty { display: none; }
.sb-media-thumb { position: relative; display: grid; place-items: center; width: 84px; height: 84px; overflow: hidden; border-radius: .7rem; background: var(--sb-line); }
.sb-media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sb-media-thumb .sb-tile-badge { position: absolute; left: .25rem; bottom: .25rem; }
.sb-media-remove { position: absolute; top: .2rem; right: .2rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; }

/* today, history, queue */
.sb-entry-row { align-items: flex-start; }
.sb-entry-time { flex: 0 0 auto; min-width: 4.2rem; padding-top: .1rem; color: var(--sb-muted); font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sb-entry-side { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: .25rem; }
.sb-entry-row.sb-rejected { border-color: #F5B8BE; }
.sb-tap-main .sb-review-note { color: var(--sb-red-text); white-space: normal; }
.sb-queue-row { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border: 1px solid var(--sb-line); border-radius: .85rem; background: var(--sb-surface); }
.sb-queue-row.sb-failed { border-color: #F5B8BE; }
.sb-queue-thumb { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: .55rem; object-fit: cover; }
.sb-tap-main .sb-queue-error { color: var(--sb-red-text); white-space: normal; }
.sb-queue-actions { display: flex; flex: 0 0 auto; gap: .35rem; }
.sb-route-card { padding: .9rem 1rem; }
.sb-route-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.sb-route-head .bi { color: var(--chip, var(--sb-red)); }
.sb-route-head .sb-route-count { margin-left: auto; color: var(--sb-muted); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.sb-route-card .progress { height: .45rem; margin-bottom: .6rem; }
.sb-route-card .progress-bar { background: var(--chip, var(--sb-red)); }
.sb-route-list { margin: 0; padding: 0; list-style: none; }
.sb-route-list button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .45rem .1rem; border: 0; background: transparent; color: var(--sb-ink); text-align: left; }
.sb-route-list button .bi { color: var(--sb-line); }
.sb-route-list button.done { color: var(--sb-muted); text-decoration: line-through; }
.sb-route-list button.done .bi { color: #15803D; }
.sb-facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.sb-facts dt { color: var(--sb-muted); font-weight: 500; }
.sb-facts dd { margin: 0; overflow-wrap: anywhere; }
.sb-field .sb-facts dd { white-space: pre-wrap; }

/* photos tab */
button.sb-photo-tile { width: 100%; padding: 0; border: 0; }
.sb-photo-grid > .sb-empty { grid-column: 1 / -1; }
.sb-tile-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--sb-muted); font-size: 1.8rem; }
.sb-tile-badge.sb-badge-waiting { background: #92600A; }
.sb-tile-badge.sb-badge-failed { background: #B22430; }
.sb-media-view { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: .8rem; background: #000; }

/* settings */
.sb-profile { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; }
.sb-profile .sb-avatar { width: 3rem; height: 3rem; font-size: 1rem; }
.sb-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .25rem; padding: .25rem; border-radius: .85rem; background: var(--sb-line); }
.sb-seg button { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .4rem .5rem; border: 0; border-radius: .65rem; background: transparent; color: var(--sb-ink); font-weight: 600; }
.sb-seg button[aria-checked=true] { background: var(--sb-surface); color: var(--sb-red-text); box-shadow: var(--sb-shadow); }
.sb-seg-sm button { min-height: 34px; font-size: .82rem; }
.sb-a { font-family: var(--sb-heading-font); font-weight: 700; }
.sb-a-sm { font-size: .8rem; }
.sb-a-lg { font-size: 1.25rem; }
.sb-setting-row { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; }
.sb-setting-row + .sb-setting-row { border-top: 1px solid var(--sb-line); }
.sb-setting-row[hidden] { display: none; }
.sb-setting-link { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; color: var(--sb-ink); font-weight: 600; text-decoration: none; }
.sb-setting-link + .sb-setting-link { border-top: 1px solid var(--sb-line); }
.sb-version { margin: 1.2rem 0 0; color: var(--sb-muted); font-size: .75rem; text-align: center; }

/* video recorder */
.sb-recorder { position: fixed; inset: 0; z-index: 1060; display: flex; flex-direction: column; background: #000; color: #fff; }
.sb-recorder[hidden] { display: none; }
.sb-recorder video { flex: 1; width: 100%; min-height: 0; object-fit: contain; background: #000; }
.sb-rec-top { position: absolute; top: calc(.75rem + env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: .75rem; pointer-events: none; }
.sb-rec-time { padding: .2rem .7rem; border-radius: 999px; background: rgba(0, 0, 0, .55); font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-rec-error { position: absolute; left: 1rem; right: 1rem; top: 40%; padding: .8rem 1rem; border-radius: .8rem; background: rgba(0, 0, 0, .75); text-align: center; }
.sb-rec-bar { display: flex; align-items: center; justify-content: space-around; gap: .75rem; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: #000; }
.sb-rec-button { width: 72px; height: 72px; border: 4px solid #fff; border-radius: 50%; background: #DF2D3C; box-shadow: 0 0 0 3px rgba(0, 0, 0, .5) inset; }
.sb-rec-button.sb-rec-stop { background: #fff; box-shadow: 0 0 0 18px #DF2D3C inset; border-radius: 50%; }
.sb-rec { display: inline-flex; align-items: center; gap: .4rem; color: #fff; font-weight: 700; }
.sb-rec::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: #DF2D3C; animation: sb-blink 1s infinite; }
@keyframes sb-blink { 50% { opacity: .2; } }

/* ------------------------------------------------------------------ office pages */

.min-w-0 { min-width: 0; }
.sb-back { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: .4rem; color: var(--sb-muted); font-size: .88rem; font-weight: 500; text-decoration: none; }
.sb-back:hover { color: var(--sb-ink); }
.sb-check-col { width: 2.5rem; }
.sb-dropdown-form { width: 320px; }
.sb-facts.sb-facts-compact { gap: .3rem .8rem; font-size: .9rem; }
.sb-pills .nav-link { padding: .35rem .85rem; border-radius: 999px; color: var(--sb-muted); font-weight: 600; font-size: .9rem; }
.sb-pills .nav-link.active { background: var(--sb-ink); color: var(--sb-surface); }
.sb-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.sb-group-card { display: block; padding: 1rem 1.1rem; color: var(--sb-ink); text-decoration: none; border-top: 4px solid var(--chip, var(--sb-line)); }
.sb-group-card:hover { border-color: var(--chip); box-shadow: 0 6px 20px rgba(17, 24, 39, .08); color: var(--sb-ink); }
.sb-group-icon { display: grid; flex: 0 0 auto; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .7rem; background: color-mix(in srgb, var(--chip, #6B7280) 14%, transparent); color: var(--chip, #6B7280); font-size: 1.2rem; }
.sb-group-icon-lg { width: 3.2rem; height: 3.2rem; font-size: 1.6rem; }
.sb-route-checklist { margin: 0 0 1rem; padding: 0; list-style: none; columns: 2 16rem; }
.sb-route-checklist li { display: flex; align-items: baseline; gap: .45rem; padding: .2rem 0; break-inside: avoid; }
.sb-route-checklist .bi { color: var(--sb-line); }
.sb-route-checklist li.done .bi { color: #15803D; }
.sb-route-checklist a { color: var(--sb-ink); text-decoration: none; }
.sb-route-checklist a:hover { color: var(--sb-red-text); text-decoration: underline; }
.sb-route-picker { max-height: 460px; overflow-y: auto; margin: 0; padding: 0; list-style: none; border: 1px solid var(--sb-line); border-radius: .7rem; }
.sb-route-picker li { display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem; background: var(--sb-surface); }
.sb-route-picker li + li { border-top: 1px solid var(--sb-line); }
.sb-route-picker .form-check-label { flex: 1; line-height: 1.2; }
.sb-icon-picker { display: flex; flex-wrap: wrap; gap: .35rem; }
.sb-icon-picker .btn { width: 2.6rem; height: 2.6rem; padding: 0; display: grid; place-items: center; font-size: 1.15rem; }
.sb-type-row { padding: .9rem 1.1rem; }
.sb-type-row + .sb-type-row { border-top: 1px solid var(--sb-line); }
.sb-form-narrow { max-width: 760px; }
.sb-order-list { margin: .75rem 0 0; padding: 0; list-style: none; counter-reset: route; }
.sb-order-list li { display: flex; align-items: center; gap: .7rem; padding: .6rem 1.1rem; border-top: 1px solid var(--sb-line); background: var(--sb-surface); cursor: grab; counter-increment: route; }
.sb-order-list li::before { content: counter(route); min-width: 1.8rem; color: var(--sb-muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.sb-order-list li .text-truncate { min-width: 0; }
.sb-export-section + .sb-export-section { border-top: 1px solid var(--sb-line); }
.sb-export-section .table > :not(caption) > * > :first-child { padding-left: 1rem; }
.sb-export-section .table > :not(caption) > * > :last-child { padding-right: 1rem; }
.sb-detail-line td { padding-top: .15rem; padding-bottom: .15rem; color: var(--sb-muted); font-size: .85rem; }
.sb-bulkbar { position: sticky; top: calc(var(--sb-topbar-height) + .5rem); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: .75rem; padding: .6rem .9rem; border: 1px solid var(--sb-line); border-radius: .8rem; background: var(--sb-surface); box-shadow: var(--sb-shadow); }
.sb-review-list { display: flex; flex-direction: column; gap: .75rem; }
.sb-review-item { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; padding: 1rem 1.1rem; }
.sb-review-item.sb-flagged { border-left: 4px solid #F59E0B; }
.sb-review-check { margin-top: .3rem; }
.sb-review-head { display: flex; align-items: baseline; gap: .75rem; justify-content: space-between; }
.sb-review-head .sb-money { font-weight: 700; }
.sb-review-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .35rem; color: var(--sb-muted); font-size: .86rem; }
.sb-review-meta > span, .sb-review-meta > a { display: inline-flex; align-items: center; gap: .35rem; }
.sb-review-meta .sb-chip { color: var(--chip); }
.sb-flags { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: .5rem 0 0; padding: 0; list-style: none; color: #B45309; font-size: .84rem; font-weight: 600; }
.sb-flags .bi { margin-right: .3rem; }
[data-bs-theme=dark] .sb-flags { color: #FCD34D; }
.sb-review-notes { margin: .5rem 0 0; padding: .5rem .7rem; border-radius: .6rem; background: var(--sb-canvas); font-size: .9rem; white-space: pre-wrap; }
.sb-review-actions { display: flex; flex-direction: column; gap: .4rem; min-width: 7.5rem; }
.sb-reject-form { margin-top: .75rem; padding: .75rem; border: 1px solid #F5B8BE; border-radius: .7rem; background: var(--sb-red-soft); }
.sb-thumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.sb-thumb { position: relative; display: block; width: 76px; height: 57px; overflow: hidden; border-radius: .5rem; background: var(--sb-line); }
.sb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sb-thumb .sb-tile-badge { position: absolute; left: .2rem; bottom: .2rem; }
@media (max-width: 767.98px) {
  .sb-review-item { grid-template-columns: auto 1fr; }
  .sb-review-actions { grid-column: 1 / -1; flex-direction: row; }
}

/* ------------------------------------------------------------------ photos and markup */

.sb-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.sb-photo-tile { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: .7rem; background: var(--sb-line); }
.sb-photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.sb-photo-tile:hover img { transform: scale(1.03); }
.sb-photo-tile .sb-tile-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: .35rem .5rem; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); color: #fff; font-size: .72rem; }
.sb-photo-tile .sb-tile-badges { position: absolute; top: .35rem; right: .35rem; display: flex; gap: .25rem; }
.sb-tile-badge { display: inline-flex; align-items: center; gap: .2rem; padding: .1rem .4rem; border-radius: .4rem; background: rgba(0, 0, 0, .6); color: #fff; font-size: .7rem; font-weight: 600; }
.sb-photo-tile input[type=checkbox] { position: absolute; top: .45rem; left: .45rem; width: 1.15rem; height: 1.15rem; }

.sb-photo-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .75rem; }
.sb-photo-frame { display: flex; justify-content: center; }
.sb-photo-stage { position: relative; display: inline-block; max-width: 100%; user-select: none; line-height: 0; }
.sb-photo-stage > img, .sb-photo-stage > video { display: block; width: auto; height: auto; max-width: 100%; max-height: 72vh; border-radius: .6rem; background: var(--sb-line); }
.sb-photo-stage.drawing { cursor: crosshair; touch-action: none; }
.sb-photo-stage [data-markup] { cursor: pointer; }
.sb-photo-stage.drawing [data-markup] { cursor: crosshair; }
.sb-caption-form { margin-top: 1rem; }
.sb-caption-text { margin: 1rem 0 0; }
.sb-markup-box { position: absolute; border: 3px solid var(--mk, #DF2D3C); border-radius: 3px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.sb-markup-tag { position: absolute; transform: translate(-50%, -50%); }
.sb-markup-badge {
  display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid #fff; border-radius: 50%;
  background: var(--mk, #DF2D3C); color: #fff; font-size: .78rem; font-weight: 700; line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.sb-markup-box > .sb-markup-badge { position: absolute; top: -14px; left: -14px; }
.sb-markup-box.active { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 6px var(--mk, #DF2D3C); }
.sb-markup-tag.active .sb-markup-badge, .sb-markup-box.active > .sb-markup-badge { transform: scale(1.25); }
.sb-markup-badge { transition: transform .15s; }
.sb-markup-list { display: flex; flex-direction: column; gap: .35rem; }
.sb-markup-list .sb-markup-badge { flex: 0 0 auto; }
.sb-markup-draft { border-style: dashed; }
.sb-markup-item { display: flex; align-items: flex-start; gap: .6rem; margin: 0 -.5rem; padding: .45rem .5rem; border-radius: .6rem; transition: background-color .15s; }
.sb-markup-item.active { background: var(--sb-canvas); }
.sb-markup-main { flex: 1; min-width: 0; }
.sb-markup-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sb-markup-actions { display: flex; gap: .6rem; }
.sb-markup-editor { padding: .7rem; border: 1px dashed var(--sb-muted); border-radius: .7rem; }
.sb-swatches { display: flex; gap: .4rem; }
.sb-swatch { width: 1.5rem; height: 1.5rem; padding: 0; border: 2px solid var(--sb-surface); border-radius: 50%; background: var(--mk); box-shadow: 0 0 0 1px var(--sb-line); }
.sb-swatch[aria-checked=true] { box-shadow: 0 0 0 2px var(--mk); }
.sb-comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; margin-bottom: .15rem; font-size: .82rem; }
.sb-comment-actions { display: flex; gap: .75rem; margin-top: .25rem; }
.sb-comment-actions .btn { font-size: .78rem; text-decoration: none; }
.sb-comment-form { margin-top: 1rem; }
.sb-comment { display: flex; gap: .6rem; }
.sb-comment + .sb-comment { margin-top: .9rem; }
.sb-comment-body { flex: 1; min-width: 0; padding: .55rem .75rem; border-radius: .75rem; background: var(--sb-canvas); }
.sb-comment-body p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ maps, charts, route order */

.sb-map { height: 360px; border-radius: .9rem; overflow: hidden; background: var(--sb-line); }
.sb-chart { position: relative; height: 260px; }
.sb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1rem; }
.sb-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-right: auto; }
.sb-periods { align-items: center; }
.sb-measure { display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .8rem; border: 1px solid var(--sb-line); border-radius: 999px; background: var(--sb-surface); font-size: .88rem; }
.sb-share + .sb-share { margin-top: .85rem; }
.sb-share-bar { height: .45rem; margin: .3rem 0; overflow: hidden; border-radius: 999px; background: var(--sb-line); }
.sb-share-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--sb-red); }
.sb-sortable-handle { cursor: grab; color: var(--sb-muted); }
.sb-sortable-ghost { opacity: .4; background: var(--sb-red-soft); }

/* ------------------------------------------------------------------ print (day sheet, reports) */

@media print {
  .sb-topbar, .sb-sidebar, .sb-acting, .sb-actions, .sb-toasts, .sb-field-tabs, .btn, .sb-filters, .sb-no-print { display: none !important; }
  .sb-main { padding: 0; }
  .sb-card { box-shadow: none; }
}

/* ------------------------------------------------------------------ settings */

.sb-subnav { display: flex; gap: .1rem; margin: -.5rem 0 1.5rem; overflow-x: auto; border-bottom: 1px solid var(--sb-line); scrollbar-width: none; }
.sb-subnav::-webkit-scrollbar { display: none; }
@media (min-width: 992px) { .sb-subnav { flex-wrap: wrap; overflow: visible; } }
.sb-subnav a { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: -1px; padding: .55rem .7rem; font-size: .93rem; border-bottom: 2px solid transparent; color: var(--sb-muted); font-weight: 500; white-space: nowrap; text-decoration: none; }
.sb-subnav a:hover { color: var(--sb-ink); }
.sb-subnav a.active { border-bottom-color: var(--sb-red); color: var(--sb-red-text); }
.sb-logo-preview { display: grid; place-items: center; min-height: 6rem; padding: 1rem; border: 1px dashed var(--sb-line); border-radius: .7rem; background: #fff; }
.sb-logo-preview img { max-width: 100%; max-height: 5rem; }
.sb-icon-preview { width: 3.25rem; height: 3.25rem; font-size: 1.05rem; }
.sb-danger-zone { border: 1px solid #F5B8BE; }
.sb-token-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.sb-token-list .btn { --bs-btn-padding-y: .15rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .8rem; }
.sb-template-preview { margin: 0; padding: 0; list-style: none; }
.sb-template-preview li { padding: .5rem .75rem; border-radius: .6rem; background: var(--sb-canvas); font-family: var(--bs-font-monospace); font-size: .88rem; }
.sb-template-preview li + li { margin-top: .4rem; }
.sb-matrix-wrap { max-height: calc(100vh - 15rem); overflow: auto; }
.sb-matrix { --sb-matrix-first: 17rem; }
.sb-matrix th, .sb-matrix td { white-space: nowrap; }
.sb-matrix thead th { text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--sb-ink); position: sticky; top: 0; z-index: 2; background: var(--sb-surface); vertical-align: bottom; box-shadow: inset 0 -1px 0 var(--sb-line); }
.sb-matrix thead .sb-matrix-corner { left: 0; z-index: 3; text-align: left; }
.sb-matrix tbody th { position: sticky; left: 0; z-index: 1; background: var(--sb-surface); font-weight: 500; }
.sb-matrix tbody tr:not(.sb-matrix-group) th { min-width: var(--sb-matrix-first); max-width: var(--sb-matrix-first); white-space: normal; }
.sb-matrix .sb-matrix-group th { background: var(--sb-canvas); color: var(--sb-muted); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sb-matrix td { text-align: center; }
.sb-matrix tbody th .small { font-size: .78rem; line-height: 1.3; }
.sb-matrix .form-check-input { float: none; margin: 0; }
.sb-matrix-role { display: inline-flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 6.5rem; }
.sb-audit-action { font-family: var(--bs-font-monospace); font-size: .78rem; color: var(--sb-muted); }

.validation-summary-valid { display: none; }

/* ------------------------------------------------------------------ account pages */

.sb-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.sb-choice { position: relative; display: block; cursor: pointer; }
.sb-choice input { position: absolute; opacity: 0; pointer-events: none; }
.sb-choice-body { display: flex; flex-direction: column; gap: .1rem; height: 100%; padding: .8rem .9rem; border: 1px solid var(--sb-line); border-radius: .8rem; background: var(--sb-surface); transition: border-color .15s, box-shadow .15s; }
.sb-choice-body .bi { color: var(--sb-red); font-size: 1.3rem; }
.sb-choice-body small { color: var(--sb-muted); line-height: 1.3; }
.sb-choice:hover .sb-choice-body { border-color: var(--sb-muted); }
.sb-choice input:checked + .sb-choice-body { border-color: var(--sb-red); box-shadow: 0 0 0 3px var(--sb-red-soft); }
.sb-choice input:focus-visible + .sb-choice-body { outline: 2px solid var(--sb-red); outline-offset: 2px; }
.sb-invite-note { margin: 0 0 1.25rem; padding: .8rem 1rem; border-left: 3px solid var(--sb-red); border-radius: .5rem; background: var(--sb-canvas); white-space: pre-wrap; }
.sb-profile-avatar { width: 3.5rem; height: 3.5rem; font-size: 1.15rem; }
@media (max-width: 420px) { .sb-choice-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ dashboard */

.sb-setup { margin: 0; padding: 0 1.25rem .5rem; list-style: none; }
.sb-setup li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--sb-line); }
.sb-setup li:first-child { border-top: 0; }
.sb-setup li > .bi { flex: 0 0 auto; color: var(--sb-muted); font-size: 1.2rem; }
.sb-setup li.done > .bi { color: #16A34A; }
.sb-setup li.done .fw-semibold { color: var(--sb-muted); text-decoration: line-through; }
.sb-running { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--sb-line); color: inherit; text-decoration: none; }
.sb-running:first-of-type { border-top: 0; }
.sb-running:hover .fw-semibold { color: var(--sb-red-text); }
.sb-running > .bi { display: grid; flex: 0 0 auto; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; background: color-mix(in srgb, var(--chip, #DF2D3C) 15%, transparent); color: var(--chip, #DF2D3C); }

/* ------------------------------------------------------------------ marketing: home mockups, pricing, contact, legal */

.sb-trust { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0; padding: 0; list-style: none; color: #4B5563; font-size: .92rem; }
.sb-trust .bi { margin-right: .3rem; color: #16A34A; }
.sb-hero-visual { padding: 1.5rem 0 2.5rem 0; }
.sb-hero-visual .sb-browser { margin-right: 7.5rem; }
.sb-hero-visual .sb-mock-main { padding-right: 3.75rem; } /* keeps the rows clear of the phone */
.sb-mock { display: flex; min-height: 300px; background: #F6F7F9; font-size: .8rem; }
.sb-mock-side { display: flex; flex-direction: column; gap: .55rem; width: 3.2rem; padding: .9rem .7rem; background: #fff; border-right: 1px solid #EEF0F2; }
.sb-mock-side i { height: .55rem; border-radius: 4px; background: #E5E7EB; }
.sb-mock-side i.on { background: #F7C5CB; }
.sb-mock-main { flex: 1; min-width: 0; padding: .9rem; }
.sb-mock-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; font-family: var(--sb-heading-font); font-size: 1rem; }
.sb-mock-pill { padding: .1rem .5rem; border-radius: 999px; background: #FEF3C7; color: #92400E; font-family: var(--bs-font-sans-serif); font-size: .7rem; font-weight: 700; }
.sb-mock-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; padding: .6rem .7rem; border-radius: .6rem; background: #fff; box-shadow: 0 1px 2px rgba(17, 24, 39, .06); }
.sb-mock-row > .min-w-0 { flex: 1; }
.sb-mock-site { overflow: hidden; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.sb-mock-meta { overflow: hidden; color: #6B7280; white-space: nowrap; text-overflow: ellipsis; }
.sb-mock-ok { color: #15803D; font-weight: 600; }
.sb-mock-ok .bi { margin-right: .15rem; }
.sb-mock-amount { font-weight: 700; }
.sb-mock-btn { display: flex; gap: .2rem; padding: .2rem .55rem; border-radius: .45rem; background: #16A34A; color: #fff; font-size: .72rem; font-weight: 700; white-space: nowrap; }
/* Laptop widths: the half-width column is narrow, so drop the side menu and the button label. */
@media (min-width: 992px) and (max-width: 1199.98px) { .sb-hero-visual .sb-mock-side, .sb-mock-btn span { display: none; } }
.sb-phone { position: absolute; right: 0; bottom: 0; z-index: 3; width: 10.5rem; padding: .7rem; border: 6px solid #1F2328; border-radius: 1.6rem; background: #fff; box-shadow: 0 24px 50px rgba(17, 24, 39, .25); font-size: .75rem; }
.sb-phone-top { display: flex; justify-content: space-between; margin-bottom: .5rem; font-family: var(--sb-heading-font); }
.sb-phone-top .bi { color: #16A34A; }
.sb-phone-site { display: flex; align-items: center; gap: .45rem; margin-bottom: .55rem; padding: .45rem; border-radius: .6rem; background: #FDECEE; }
.sb-phone-site .bi { color: #DF2D3C; font-size: 1rem; }
.sb-phone-site small { display: block; color: #6B7280; }
.sb-phone-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.sb-phone-tiles span { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem .2rem; border: 1px solid #EEF0F2; border-radius: .55rem; font-weight: 600; }
.sb-phone-tiles .bi { color: #DF2D3C; font-size: 1rem; }
.sb-phone-send { margin-top: .55rem; padding: .4rem; border-radius: 999px; background: #DF2D3C; color: #fff; font-weight: 700; text-align: center; }
.sb-callout-a { top: 0; left: 30%; }
.sb-callout-b { bottom: .5rem; left: -1.5rem; }
@media (max-width: 575.98px) { .sb-phone { display: none; } .sb-hero-visual .sb-browser { margin-right: 0; } .sb-hero-visual .sb-mock-main { padding-right: .9rem; } .sb-callout-a { left: .5rem; } .sb-callout-b { left: .5rem; } }
.sb-kinds { padding: 1.4rem 0; border-top: 1px solid #EEF0F2; border-bottom: 1px solid #EEF0F2; }
.sb-kinds .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem .75rem; color: #6B7280; font-size: .9rem; font-weight: 600; }
.sb-kind { padding: .3rem .85rem; border: 1px solid #E5E7EB; border-radius: 999px; color: #1F2328; }
.sb-checks { margin: 0; padding: 0; list-style: none; }
.sb-checks li { position: relative; margin-bottom: .9rem; padding-left: 1.9rem; color: #4B5563; }
.sb-checks li::before { content: "\F26B"; position: absolute; top: .05rem; left: 0; color: #DF2D3C; font-family: "bootstrap-icons"; font-size: 1.15rem; }
.sb-checks strong { color: #1F2328; }
.sb-steps { display: flex; flex-direction: column; gap: 1rem; }
.sb-step { display: flex; gap: 1rem; padding: 1.4rem; border: 1px solid #EEF0F2; border-radius: 1rem; background: #fff; }
.sb-step > span { display: grid; flex: 0 0 auto; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #DF2D3C; color: #fff; font-family: var(--sb-heading-font); font-size: 1.15rem; font-weight: 800; }
.sb-step h3 { margin-bottom: .2rem; font-size: 1.1rem; font-weight: 700; }
.sb-step p { margin: 0; color: #4B5563; }
.sb-page-hero { padding: 4rem 0 2.5rem; background: linear-gradient(180deg, #FFF5F6 0%, #FFFFFF 100%); text-align: center; }
.sb-page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; }
.sb-page-hero .lead { max-width: 40rem; margin: .75rem auto 0; color: #4B5563; }
.sb-faq .accordion-button { font-weight: 600; }
.sb-legal { max-width: 48rem; padding: 3.5rem 0 4rem; }
.sb-legal h1 { font-weight: 800; }
.sb-legal h2 { margin-top: 2rem; font-size: 1.25rem; font-weight: 700; }
.sb-legal p, .sb-legal li { color: #374151; line-height: 1.7; }
.sb-contact-card { padding: 2rem; border: 1px solid #EEF0F2; border-radius: 1.1rem; background: #fff; box-shadow: 0 20px 50px rgba(17, 24, 39, .08); }
.sb-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
