@charset "UTF-8";
:root {
  color-scheme: light;
  --navy:#0d1a2b; --navy-deep:#0a1524; --ink:#172536; --muted:#506177;
  --surface:#f5f7fa; --white:#fff; --line:#dce4ed; --blue:#1c55c7;
  --blue-light:#eaf2ff; --green:#13724b; --shadow:0 8px 24px #1229450b;
  --radius:12px; --font:Inter,"Segoe UI",system-ui,sans-serif;
}
* {box-sizing:border-box}
html {scroll-padding-top:24px}
body {margin:0;color:var(--ink);font-family:var(--font);font-size:15px;background:var(--surface);line-height:1.55}
a {color:inherit;text-decoration:none}
button,input,textarea,select {font:inherit}
button {cursor:pointer}
img {display:block;max-width:100%}
h1,h2,h3,p {margin:0}
h1,h2,h3 {line-height:1.14;letter-spacing:-.035em}
h1,h2,h3,strong,dd {overflow-wrap:anywhere}
h1 {font-size:clamp(2rem,4vw,3rem)}
h2 {font-size:1.22rem}
h3 {font-size:1.03rem}
p {overflow-wrap:anywhere}
:focus-visible {outline:3px solid #498df4;outline-offset:4px}
.icon {display:inline-block;vertical-align:middle;flex:none;pointer-events:none}
.wrap {width:min(1248px,calc(100% - 96px));margin-inline:auto}
.skip {position:fixed;top:8px;left:8px;z-index:12;transform:translateY(-150%);background:white;padding:8px 12px;border-radius:6px}
.skip:focus {transform:none}
.brand {display:inline-flex;align-items:center;gap:8px;color:white;font-size:26px;letter-spacing:-.055em;font-weight:750;line-height:1}
.brand img {display:block;height:32px;width:auto}
.button {display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:11px 16px;min-height:44px;background:var(--blue);border:1px solid transparent;border-radius:8px;color:white;font-weight:650;white-space:normal;text-align:center;transition:background .16s,box-shadow .16s}
.button:hover {background:#1546a5}
.brand img {flex:none}
.public-bar {background:var(--navy-deep);color:#edf4ff}
.public-nav {min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:22px}
.public-nav nav {display:flex;align-items:center;gap:28px;font-size:14px;font-weight:600}
.public-nav nav>a:not(.button):hover,.public-footer a:hover {color:#93c5fd}
.small-button {padding:8px 13px;min-height:40px}
.hero {position:relative;isolation:isolate;color:white;background:#0c192a;overflow:hidden}
.hero-image {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 42%;z-index:-2}
.hero::after {content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#091626 0%,#091626ed 24%,#091626a0 47%,#09162608 78%),linear-gradient(0deg,#0a162a38,transparent 46%)}
.hero-inner {min-height:510px;display:flex;justify-content:center;align-items:flex-start;flex-direction:column;padding-block:56px 62px}
.eyebrow {font-size:11px;line-height:1.4;font-weight:750;letter-spacing:.16em;color:#c3dbff}
.hero-label {display:flex;align-items:center;gap:9px}
.hero-label span {display:block;width:17px;height:2px;background:#6da9fa}
.hero h1 {font-size:clamp(3.35rem,6.25vw,6rem);line-height:.98;letter-spacing:-.07em;max-width:min(820px,76%);margin:21px 0 20px;font-weight:750}
.hero h1 em {font-style:normal;color:#96c2ff}
.hero p {max-width:430px;color:#e4ebf6;font-size:clamp(.99rem,1.45vw,1.18rem);line-height:1.57}
.hero-actions {display:flex;flex-wrap:wrap;gap:12px;margin-top:30px}
.hero .button {min-height:48px;padding-inline:17px;background:#2563df}
.hero .button:hover {background:#1e52bd}
.hero .ghost {background:#0e1e34cf;border-color:#7890ac;color:#f3f7ff}
.hero .ghost:hover {background:#263a53}
.principles {background:#eaf0f8;border-bottom:1px solid #dce5f1}
.principle-grid {display:grid;grid-template-columns:repeat(4,1fr);min-height:69px}
.principle-grid>div {display:flex;align-items:center;justify-content:center;gap:11px;font-size:13px;font-weight:700;color:#233b56;padding:12px;border-right:1px solid #d7e1ef}
.principle-grid>div:first-child {border-left:1px solid #d7e1ef}
.principle-grid .icon {color:#2157a4}
.gateways {padding-block:43px 62px}
.section-head {margin:0 0 23px}
.section-head h2 {font-size:clamp(1.9rem,3.2vw,2.8rem);letter-spacing:-.055em}
.section-head p {margin-top:6px;color:var(--muted)}
.gateway-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.gateway-grid.is-two {grid-template-columns:repeat(2,minmax(0,1fr));max-width:860px}
.gateway {position:relative;display:flex;flex-direction:column;align-items:flex-start;min-height:219px;background:white;border:1px solid var(--line);border-radius:var(--radius);padding:21px 22px;box-shadow:var(--shadow)}
a.gateway {transition:box-shadow .16s,border-color .16s}
a.gateway:hover {border-color:#7ca5df;box-shadow:0 9px 28px #1b4b8d16}
.gateway-icon,.metric-icon {display:inline-grid;place-items:center;color:#215bc4;background:#edf3ff;border-radius:10px;width:47px;height:47px;flex:none}
.gateway-staff .gateway-icon {color:#166c69;background:#e6f5f3}
.gateway-superadmin .gateway-icon {color:#4e49a1;background:#f0effb}
.gateway-external {position:absolute;right:20px;top:23px;color:#50627b}
.gateway h3 {font-size:1.36rem;margin:15px 0 6px}
.gateway p {color:var(--muted);font-size:14px;margin-bottom:15px}
.gateway-link {display:inline-flex;align-items:center;gap:8px;margin-top:auto;color:#1d53b3;font-weight:700;font-size:14px}
.pricing {padding-top:0}
.public-footer {background:var(--navy-deep);color:#b9c8dc;margin-top:auto}
.footer-inner {display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:90px;padding-block:15px}
.footer-links {display:flex;gap:18px;flex-wrap:wrap;font-size:13px}
.footer-inner small {white-space:nowrap}
.public-page,.login-page {min-height:100svh;display:flex;flex-direction:column}
.login-wrap {max-width:1070px;padding-block:46px 52px}
.login-shell {display:grid;grid-template-columns:1fr 1fr;overflow:hidden;min-height:560px;border:1px solid var(--line);border-radius:18px;box-shadow:0 16px 50px #10243b12;background:white}
.login-image {position:relative;isolation:isolate;display:flex;align-items:flex-end;color:white;background:var(--navy)}
.login-image img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
.login-image::after {content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,#081427 0%,#081427bc 23%,transparent 63%)}
.login-caption {padding:34px 37px}
.login-caption h2 {margin:10px 0 7px;font-size:clamp(1.9rem,3.7vw,2.9rem);max-width:13ch}
.login-caption p {color:#dce6f6;max-width:31ch}
.login-form-area {display:flex;flex-direction:column;padding:26px 38px 44px}
.back-link,.text-link {display:inline-flex;align-items:center;gap:7px;color:#2056b6;font-weight:650;font-size:14px}
.back-link .icon {transform:rotate(180deg)}
.back-link:hover,.text-link:hover,.table-link:hover {text-decoration:underline}
.login-form-inner {width:min(100%,360px);margin:auto;padding-block:28px 0}
.login-form-inner h1 {font-size:clamp(2rem,4vw,2.7rem);margin:10px 0 7px}
.login-form-inner>p {color:var(--muted);margin-bottom:22px}
.login-form-inner .button {width:100%;margin-top:4px}
.published-page {padding-block:60px;min-height:480px}
.published-page h1 {margin:17px 0 23px}
.prose {max-width:76ch;white-space:normal;overflow-wrap:anywhere}
.workspace {display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100svh}
.workspace.sidebar-collapsed {grid-template-columns:0 minmax(0,1fr)}
.side {position:sticky;top:0;height:100svh;display:flex;flex-direction:column;overflow:auto;background:var(--navy);color:#c2cfe0;padding:22px 14px 13px}
.sidebar-collapsed .side {visibility:hidden;padding:0}
.side-brand {margin:0 10px 22px;align-self:flex-start}
.context {display:flex;align-items:center;gap:9px;padding:10px;margin:0 0 22px;border:1px solid #34455e;border-radius:9px;background:#142439;min-width:0}
.context-icon {display:grid;place-items:center;flex:none;width:34px;height:34px;background:#233b57;color:#add0ff;border-radius:7px}
.context strong,.context small,.account-name strong,.account-name small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.context>div {min-width:0}
.context strong {font-size:13px;color:#f2f6ff}
.context small {font-size:11px;color:#b6c6dc}
.side nav {display:grid;gap:5px}
.side nav a,.side-bottom a {display:flex;align-items:center;gap:11px;padding:10px 11px;min-height:44px;border-radius:7px;font-size:14px;font-weight:600}
.side nav a .icon,.side-bottom a .icon {color:#a4bad7}
.side nav a:hover,.side-bottom a:hover {background:#192e48;color:white}
.side nav a[aria-current=page] {color:white;background:#234366;box-shadow:inset 3px 0 #76b4ff}
.side nav a[aria-current=page] .icon {color:#a5cdff}
.side-bottom {margin-top:auto;padding-top:26px}
.side-bottom a .icon:last-child {margin-left:auto}
.side-bottom small {display:block;padding:8px 11px;color:#a5b8d0}
.workarea {min-width:0}
.workbar {min-height:67px;display:flex;align-items:center;gap:14px;padding:9px 29px;border-bottom:1px solid var(--line);background:white}
.breadcrumbs {display:flex;align-items:center;gap:8px;min-width:0;font-size:13px;color:var(--muted)}
.breadcrumbs a {color:#2258b7;font-weight:650}
.breadcrumbs span {white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.breadcrumbs > span:last-child {color:var(--ink,#172536);font-weight:750}   /* current page */
.account {display:flex;align-items:center;gap:9px;margin-left:auto;min-width:0}
.avatar {width:35px;height:35px;display:grid;place-items:center;background:var(--blue-light);color:#245cc2;border-radius:50%;flex:none}
.account-name {min-width:0;max-width:180px}
.account-name strong {font-size:13px}
.account-name small {font-size:11px;color:var(--muted)}
.icon-button {display:inline-grid;place-items:center;border:0;border-radius:8px;background:transparent;color:#3c526d;min-width:40px;min-height:40px;padding:0}
.icon-button:hover {background:#eaf2ff;color:#1e53b3}
.work-main {width:100%;max-width:none;padding:24px 28px}
.work-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
/* Small page header (the breadcrumbs already name the page) */
.work-heading h1 {font-size:18px;font-weight:750;letter-spacing:-.01em;line-height:1.3}
.work-heading p {margin-top:3px;color:var(--muted);font-size:13px;line-height:1.45}
.work-heading .back-link {margin-bottom:9px}
.metric-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.metric {background:white;border:1px solid var(--line);border-radius:var(--radius);padding:16px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center;box-shadow:var(--shadow)}
.metric>span:first-child {color:var(--muted);font-size:13px;font-weight:650}
.metric strong {font-size:32px;font-variant-numeric:tabular-nums;line-height:1.1;letter-spacing:-.045em}
.metric-icon {width:35px;height:35px;border-radius:8px}
.metric:nth-child(2) .metric-icon {color:#946000;background:#fff2d8}
.metric:nth-child(3) .metric-icon {color:#5549ad;background:#f0ecff}
.metric:nth-child(4) .metric-icon {color:#17654a;background:#e9f8ef}
.panel {min-width:0;background:white;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel-heading {min-height:60px;display:flex;justify-content:space-between;align-items:center;padding:13px 18px;gap:12px;border-bottom:1px solid var(--line)}
.dash-grid {display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);align-items:start;gap:16px}
.stack {display:grid;gap:16px;min-width:0}
.pad,.form-panel {padding:20px}
.form-panel {max-width:none}
.pad>h2,.form-panel>h2 {margin-bottom:13px}
.muted {color:var(--muted)}
.empty {text-align:center;display:grid;justify-items:center;gap:7px;padding:37px 12px;color:var(--muted)}
.empty h3 {color:var(--ink)}
.table-wrap {max-width:100%;overflow-x:auto}
table {width:100%;border-collapse:collapse;text-align:left;font-size:14px}
th,td {padding:13px 16px;border-bottom:1px solid #edf1f5;vertical-align:middle}
tr:last-child td {border-bottom:0}
th {font-size:12px;letter-spacing:.015em;background:#f8fafd;color:#465a73;white-space:nowrap}
td {min-width:95px;overflow-wrap:anywhere}
td small,.resource-row small {display:block;color:var(--muted);margin-top:2px}
.table-link {color:#2056b6;font-weight:720}
.pill {display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:#ebf0f6;color:#38516e;font-size:12px;line-height:1.3;font-weight:700;white-space:nowrap}
.pill::before {content:"";height:6px;width:6px;border-radius:50%;background:currentColor;flex:none}
.status-requested,.status-paused {background:#fff2d8;color:#825400}
.status-assigned,.status-traveling,.status-working {background:#e7efff;color:#2356b5}
.status-customer_signed,.status-service_completed {background:#e2f5e9;color:#146342}
.status-checked_in {background:#e0f5f3;color:#0f6b63}
.status-checked_out {background:#f0eaff;color:#5b3fa5}
.status-closed,.status-completed {background:#e2f5e9;color:#146342}
.status-terminated {background:#fde8e8;color:#a3281c}
.activity-list li.is-completed,.activity-list li.is-terminated {margin:4px -17px;padding:11px 17px;border-radius:10px;border-bottom:0}
.activity-list li.is-completed {background:#e9f7ee}
.activity-list li.is-completed strong {color:#146342}
.activity-list li.is-terminated {background:#fdecec}
.activity-list li.is-terminated strong {color:#a3281c}
.activity-list {list-style:none;margin:0;padding:0 17px}
.activity-list li {display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #edf1f5}
.activity-list li:last-child {border-bottom:0}
.activity-list strong,.activity-list small {display:block}
.activity-list small {color:var(--muted)}
.shortcuts {display:grid;padding:7px 13px}
.shortcuts a {display:flex;align-items:center;gap:9px;min-height:44px;padding:5px 8px;font-weight:650;font-size:14px;color:#2b4e7a;border-radius:7px}
.shortcuts a:hover {background:#eff5fd}
.shortcuts a .icon:last-child {margin-left:auto}
.form-stack {display:grid;gap:14px}
.form-stack label,.filters label {display:grid;gap:5px;color:#293e56;font-weight:650;font-size:14px;min-width:0}
input:not([type=checkbox]),select,textarea {display:block;background:white;border:1px solid #b9c8da;border-radius:8px;min-height:44px;width:100%;min-width:0;color:var(--ink);padding:9px 11px;font-weight:400}
input::placeholder,textarea::placeholder {color:#66788d}
textarea {resize:vertical}
label small {color:var(--muted);font-weight:400}
.password-wrap,.search-wrap {position:relative;display:block}
.password-wrap input {padding-right:46px}
.password-toggle {position:absolute;right:2px;top:2px}
.search-wrap .icon {position:absolute;left:11px;top:14px;color:#5b7292}
.search-wrap input {padding-left:36px}
.form-columns {display:flex;gap:14px;flex-wrap:wrap}
.form-columns>* {flex:1 1 175px}
.form-stack label.checkbox-label {display:flex;align-items:center;gap:8px}
.checkbox-label input {width:17px;height:17px;accent-color:var(--blue)}
.form-stack>.button {justify-self:start}
.login-form-inner .form-stack>.button {justify-self:stretch}
.filters {display:flex;align-items:end;flex-wrap:wrap;gap:12px;padding:15px 16px;border-bottom:1px solid var(--line)}
.filters>label:first-child {flex:1 1 235px}
.filters>label:nth-child(2) {flex:0 1 190px}
.filters>.text-link {align-self:center}
.primary-soft {background:#eaf2ff;color:#2056b6;border-color:#d3e1f8}
.primary-soft:hover {background:#dce9ff}
.pagination,.actions {display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.pagination {padding:14px 16px;border-top:1px solid var(--line)}
.job-summary {display:flex;align-items:center;gap:12px;margin-bottom:14px}
.detail-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr));gap:12px;margin:0 0 18px}
dt {color:var(--muted);font-size:13px}
dd {margin:0;font-weight:650}
.detail-grid+h3 {margin-bottom:6px}
.notice,.error {display:flex;align-items:center;flex-wrap:wrap;gap:8px;border:1px solid #aadbc3;border-radius:8px;background:#edf9f2;padding:10px 12px;color:#186345;margin-bottom:15px}
.error,.login-form-inner>p.error {background:#fff1f1;color:#91252a;border-color:#ecc3c6}
.danger {color:#a62e34}
button.text-link {padding:5px 0;background:none;border:0}
.row-details {margin-bottom:14px}
.row-details summary {list-style:none;cursor:pointer;display:flex;align-items:center;min-height:47px;gap:8px;padding:10px 17px;font-weight:700;color:#2056b6}
.row-details summary::-webkit-details-marker {display:none}
.row-details[open]>summary {border-bottom:1px solid var(--line)}
.resource-row {margin:0;border-bottom:1px solid #edf1f5}
.resource-row:last-child {border-bottom:0}
.resource-row summary {color:var(--ink)}
.resource-row summary>span:first-child {flex:1;min-width:0}
.resource-row small {font-weight:400}
.resource-row[open] summary>.icon:last-child {transform:rotate(90deg)}
.api-panel {margin-bottom:16px}
.endpoint-list {display:grid;gap:8px;margin-top:15px}
.endpoint-list>div {display:flex;align-items:center;gap:12px;flex-wrap:wrap}
code {font-family:Consolas,monospace;background:#eaf1f9;color:#254975;border-radius:5px;padding:2px 5px;overflow-wrap:anywhere}
@media (max-width:1000px) {
  .wrap {width:calc(100% - 56px)}
  .work-main,.workbar {padding-inline:20px}
  .workspace {grid-template-columns:218px minmax(0,1fr)}
  .metric-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-grid {grid-template-columns:1fr}
}
@media (max-width:760px) {
  .wrap {width:calc(100% - 36px)}
  .public-nav {min-height:64px}
  .public-nav nav {gap:12px}
  .public-nav nav .nav-workspaces {display:none}
  .hero-inner {min-height:455px;padding-block:54px 46px}
  .hero-image {object-position:62% center}
  .hero::after {background:linear-gradient(90deg,#081524f5,#081524b5 54%,#08152442)}
  .hero h1 {max-width:100%;font-size:clamp(2.75rem,9.6vw,4.8rem)}
  .principle-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .principle-grid>div {justify-content:flex-start;border:0;min-height:48px;padding-left:8px}
  .principle-grid>div:first-child {border-left:0}
  .gateway-grid {grid-template-columns:1fr;gap:12px}
  .gateway-grid.is-two {grid-template-columns:1fr}
  .gateway {min-height:0}
  .gateways {padding-block:32px 42px}
  .pricing {padding-top:0}
  .footer-inner {flex-wrap:wrap;justify-content:flex-start;gap:11px 20px}
  .footer-inner small {width:100%}
  .login-wrap {padding-block:27px}
  .login-shell {grid-template-columns:1fr;min-height:0}
  .login-image {min-height:210px}
  .login-image img {object-position:50% 34%}
  .login-caption {padding:22px}
  .login-caption h2 {max-width:none}
  .login-form-area {padding:20px 22px 30px}
  .workspace,.workspace.sidebar-collapsed {display:block}
  .workspace .side {position:fixed;z-index:6;left:0;top:64px;width:min(270px,88vw);height:calc(100dvh - 64px);visibility:hidden;transform:translateX(-100%)}
  .workspace.sidebar-open .side {visibility:visible;transform:none;box-shadow:12px 0 32px #0b172b44}
  .workbar {min-height:64px;position:sticky;top:0;z-index:7;padding-inline:12px}
  .work-main {padding:20px 14px}
  .work-heading {align-items:flex-start;flex-wrap:wrap}
}
@media (max-width:370px) {
  .public-nav nav>a:not(.button) {display:none}
  .hero-actions {gap:8px}
  .account-name {display:none}
  .metric {padding:11px}
}
@media (prefers-reduced-motion:reduce) {*,*::before,*::after {transition:none!important}}

.password-field {display:grid;gap:5px}
.account-edit summary {color:#2056b6;font-weight:650;cursor:pointer}
.account-edit .form-stack {min-width:min(255px, 65vw);padding:10px 0}

.footer-attribution {display:grid;gap:2px}

/* SuperAdmin > Users: compact folder tree (clients, with workers loaded on expand) */
.user-tree th,.user-tree td {padding:7px 12px;font-size:13px}
.user-tree td {min-width:0}
.user-tree .muted-inline {color:var(--muted);font-size:12px;font-weight:400}
.tree-cell {display:flex;align-items:center;gap:6px;min-width:0}
.tree-label {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tree-toggle,.tree-spacer,.tree-branch {flex:none;width:22px;height:22px}
.tree-toggle {display:inline-grid;place-items:center;border:0;border-radius:5px;background:transparent;color:#38516e;cursor:pointer;padding:0}
.tree-toggle:hover,.tree-toggle:focus-visible {background:#ebf0f6}
.tree-toggle .icon {transition:transform .15s ease}
.tree-toggle[aria-expanded="true"] .icon {transform:rotate(90deg)}
.tree-toggle[aria-busy="true"] {opacity:.5;cursor:progress}
.worker-row td {background:#fbfcfe}
.worker-row .tree-cell {padding-left:22px}
.tree-branch {position:relative}
.tree-branch::before {content:"";position:absolute;left:10px;top:-6px;height:17px;width:9px;border-left:1px solid #b9c6d6;border-bottom:1px solid #b9c6d6;border-bottom-left-radius:3px}
.employer-note {font-size:12px;margin-left:6px}
.employer-note.warning {color:#a3281c;font-weight:650}
.row-actions {display:flex;align-items:flex-start;gap:14px;flex-wrap:wrap}
.row-actions .text-link {font-size:13px}
.user-tree .account-edit summary {font-size:13px}
.user-tree .account-edit[open] {flex-basis:100%}
.tree-message td {color:var(--muted);font-size:12px;padding-left:52px}
[data-employer-field][hidden] {display:none}
.compact-table th,.compact-table td {padding:7px 12px;font-size:13px}
.compact-table td {min-width:0}
.compact-table .account-edit summary {font-size:13px}
.compact-table .account-edit[open] {flex-basis:100%}
.panel-heading .muted-inline,.compact-table .muted-inline {color:var(--muted);font-size:12px;font-weight:400}

/* Map Location (client portal) */
.map-layout {display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;height:calc(100svh - 210px);min-height:480px}
.map-panel {overflow:hidden;padding:0}
.pin-map {width:100%;height:100%;min-height:420px}
.map-side {display:flex;flex-direction:column;min-height:0;overflow:hidden}
.pin-form {border-bottom:1px solid #edf1f5;gap:10px}
.pin-hint {font-size:13px;margin:0}
.pin-hint.ready {color:#1f6b3a;font-weight:650}
.pin-list {list-style:none;margin:0;padding:6px;overflow-y:auto;flex:1}
.pin-list li {display:flex;align-items:center;gap:4px;border-radius:8px}
.pin-list li:hover,.pin-list li.active {background:#eef4fc}
.pin-item {flex:1;min-width:0;display:flex;align-items:flex-start;gap:9px;padding:8px;border:0;background:transparent;text-align:left;cursor:pointer;font:inherit;color:inherit}
.pin-item .icon {flex:none;margin-top:2px;color:#2056b6}
.pin-item span {min-width:0}
.pin-item strong,.pin-item small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pin-item strong {font-size:13px}
.pin-item small {font-size:12px;color:var(--muted)}
.pin-remove {min-width:32px;min-height:32px;color:#a62e34}
.pin-remove:hover {background:#fbeaea;color:#a62e34}
.map-side .muted-inline {color:var(--muted);font-size:12px}
.leaflet-container {font:inherit}
@media (max-width:1000px) {
  .map-layout {grid-template-columns:1fr;height:auto}
  .pin-map {height:60vh}
  .map-side {max-height:none}
}
.place-search {position:relative;border-bottom:1px solid #edf1f5;padding-bottom:10px}
.place-search label {font-size:13px;font-weight:700}
.place-search .search-wrap {margin-top:6px}
.place-results {position:absolute;left:16px;right:16px;z-index:1000;list-style:none;margin:4px 0 0;padding:4px;max-height:320px;overflow-y:auto;background:white;border:1px solid #d7e0eb;border-radius:9px;box-shadow:0 12px 28px #0d1a2b26}
.place-results li {padding:8px 10px;border-radius:6px;cursor:pointer}
.place-results li:hover,.place-results li[aria-selected="true"] {background:#eef4fc}
.place-results strong,.place-results small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.place-results strong {font-size:13px}
.place-results small {font-size:12px;color:var(--muted)}
.place-results li.saved strong::before {content:"★ ";color:#c78a12}
.place-status {font-size:12px;margin:6px 0 0;min-height:0}
.place-status:empty {display:none}
.map-side {overflow:visible}
.pin-list {overflow-y:auto}

/* Technician permissions (client > Manage users) */
.permission-boxes {border:1px solid #e2e9f2;border-radius:9px;padding:10px 12px;margin:0;display:grid;gap:8px}
.permission-boxes legend {font-size:13px;font-weight:700;padding:0 4px}
.permission-boxes legend small {font-weight:400;color:var(--muted);margin-left:4px}
.permission-box {align-items:flex-start;gap:8px}
.permission-box span strong,.permission-box span small {display:block}
.permission-box span small {color:var(--muted);font-weight:400;font-size:12px}
.level {display:inline-block;padding:2px 8px;border-radius:999px;background:#ebf0f6;color:#38516e;font-size:12px;font-weight:700}
.level-admin {background:#e5efff;color:#1e53b3}
.level-custom {background:#f2ecff;color:#5b3fa5}

/* Modal dialog with tabs (client > Manage users) */
.modal {border:0;padding:0;border-radius:14px;width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 48px);box-shadow:0 24px 64px #0b172b4d;color:inherit;background:white}
.modal::backdrop {background:#0d1a2b73;backdrop-filter:blur(2px)}
.modal-form {display:flex;flex-direction:column;max-height:calc(100dvh - 48px)}
.modal-head {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px 6px}
.modal-head h2 {font-size:18px;letter-spacing:-.02em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tabs {display:flex;gap:4px;padding:0 14px;border-bottom:1px solid #e6ecf3}
.tabs [role="tab"] {border:0;background:transparent;font:inherit;font-size:13px;font-weight:650;color:var(--muted);padding:10px 10px 9px;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer}
.tabs [role="tab"]:hover {color:var(--ink)}
.tabs [role="tab"][aria-selected="true"] {color:#1e53b3;border-bottom-color:#1e53b3}
.modal-body {padding:18px;overflow-y:auto;min-height:190px}
.modal-body .form-stack {gap:14px}
.modal-error {margin:0 0 14px}
.modal-note {font-size:13px;margin:0 0 12px}
.permission-list {display:grid;gap:8px}
.permission-row {display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid #e2e9f2;border-radius:9px;cursor:pointer;font-weight:400}
.permission-row:hover {background:#f7faff}
.permission-row:has(input:checked) {border-color:#9cbcf0;background:#f2f7ff}
.permission-row input {margin-top:3px}
.permission-row strong,.permission-row small {display:block}
.permission-row strong {font-size:14px}
.permission-row small {color:var(--muted);font-size:12px;margin-top:2px}
.modal-foot {display:flex;justify-content:flex-end;align-items:center;gap:16px;padding:12px 18px;border-top:1px solid #e6ecf3;background:#fafcfe;border-radius:0 0 14px 14px}
.panel-heading h2 .muted-inline {margin-left:6px;font-size:12px;font-weight:400;color:var(--muted)}
.compact-table .actions-col {width:1%;white-space:nowrap}
.compact-table .row-actions {flex-wrap:nowrap;align-items:center}
.compact-table .row-actions .text-link {font-size:13px;background:none;border:0;padding:0;cursor:pointer;font-family:inherit}

/* Anything marked hidden stays hidden, whatever its layout class (fixes empty red bar / wrong tab showing). */
[hidden] {display:none !important}

/* Avatars */
.avatar {width:35px;height:35px;border-radius:50%;flex:none;object-fit:cover}
.avatar-initials {display:inline-grid;place-items:center;background:#e3edfc;color:#245cc2;font-weight:750;font-size:13px;letter-spacing:.02em}
.avatar-28 {width:28px;height:28px;font-size:11px}
.avatar-35 {width:35px;height:35px}
.avatar-72 {width:72px;height:72px;font-size:24px}
.account-link {display:flex;align-items:center;gap:9px;min-width:0;border-radius:999px;padding:3px 10px 3px 3px;color:inherit;text-decoration:none}
.account-link:hover {background:#eef3fa}
.person-cell {display:flex;align-items:center;gap:9px;min-width:0}
.person-cell>span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Photo picker */
.photo-field {display:flex;align-items:center;gap:16px}
.photo-preview {display:grid;flex:none}
.photo-actions {display:grid;gap:6px;justify-items:start}
.photo-pick {position:relative;overflow:hidden;cursor:pointer}
.photo-pick input[type=file] {position:absolute;inset:0;opacity:0;cursor:pointer;font-size:0}
.photo-actions small {font-size:12px}
.photo-error {color:#a3281c;font-weight:650}
.photo-remove {font-size:13px;font-weight:600}

/* My profile */
.profile-panel {max-width:none}
.profile-head {display:flex;align-items:center;gap:16px;padding:20px 18px 14px}
.profile-head h2 {font-size:20px;letter-spacing:-.02em}
.profile-head p {margin-top:3px;font-size:13px}

/* Custom service status colours */
.status-custom {border:1px solid transparent}
.status-color-slate {background:#eef1f5;color:#465568}
.status-color-blue {background:#e5efff;color:#1e53b3}
.status-color-teal {background:#e0f5f3;color:#0f6b63}
.status-color-green {background:#e6f6ec;color:#1d6b3c}
.status-color-amber {background:#fff4d6;color:#8a5a00}
.status-color-orange {background:#ffeadb;color:#a2460f}
.status-color-red {background:#fde8e8;color:#a3281c}
.status-color-purple {background:#f0eaff;color:#5b3fa5}
.status-color-pink {background:#fde9f3;color:#a12a68}

/* Settings */
.settings-tabs {padding-top:6px}
.settings-intro {display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:16px 18px}
.settings-intro h2 {font-size:16px}
.settings-intro p {font-size:13px;margin-top:4px;max-width:720px}
.settings-error {margin:0 18px 12px}
.status-table .group-row td {background:#f6f8fb;color:var(--muted);font-size:12px;font-weight:650;padding-top:9px;padding-bottom:9px}
.status-table .empty-row td {color:var(--muted);font-size:13px;padding:14px 12px}
.status-table .builtin-row td {color:#5a6b80}
.locked-note {display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:12px}
.color-picker {border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px}
.color-picker legend {font-size:14px;font-weight:650;color:#293e56;margin-bottom:6px;padding:0}
.swatch {display:inline-flex !important;align-items:center;gap:6px;padding:5px 9px 5px 6px;border:1px solid #e2e9f2;border-radius:999px;cursor:pointer;font-weight:600 !important;font-size:13px !important}
.swatch input {position:absolute;opacity:0;pointer-events:none}
.swatch-dot {width:16px;height:16px;border-radius:50%;border:1px solid #0000001a}
.swatch:has(input:checked) {border-color:#1e53b3;box-shadow:0 0 0 2px #1e53b333}
.swatch:has(input:focus-visible) {outline:2px solid #1e53b3;outline-offset:2px}

/* Map pins: edit mode */
.pin-form-head {display:flex;justify-content:space-between;align-items:center;padding:7px 10px;border-radius:8px;background:#fff6dd;color:#7a5200;font-size:13px}
.pin-form-head .text-link {font-size:13px;background:none;border:0;padding:0;cursor:pointer;font-family:inherit}
.pin-edit {min-width:32px;min-height:32px;color:#38516e}
.pin-edit:hover {background:#ebf0f6}
.pin-list li.editing {background:#fff6dd;box-shadow:inset 3px 0 0 #e0a100}
.status-none {color:#9aa8b8;font-weight:600}

/* Devices: pairing window */
.pair-modal {width:min(460px,calc(100vw - 32px))}
.pair-body {display:grid;gap:12px;justify-items:center;text-align:center}
.pair-steps {margin:0;padding-left:20px;text-align:left;font-size:13px;color:#33475e;display:grid;gap:3px;justify-self:stretch}
.qr-box {position:relative;width:264px;height:264px;display:grid;place-items:center;border:1px solid #e2e9f2;border-radius:12px;background:white}
.qr-box img {width:248px;height:248px;image-rendering:pixelated;transition:opacity .2s}
.qr-box img.qr-faded {opacity:.12}
.qr-placeholder {color:var(--muted);font-size:13px;padding:16px}
.qr-overlay {position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:8px;text-align:center}
.qr-overlay.success {color:#1d6b3c}
.qr-overlay.success strong {font-size:16px}
.qr-overlay small {color:var(--muted)}
.pair-status {font-size:13px;color:#33475e;min-height:18px;margin:0}
.device-icon {display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#eef3fa;color:#38516e;flex:none}
.row-muted td {color:#8a99ab}

/* Paired phones: green dot while the phone is online */
.live-dot {display:inline-block;width:9px;height:9px;margin-left:7px;border-radius:50%;background:#2fbf71;vertical-align:middle;box-shadow:0 0 0 3px rgba(47,191,113,.22);animation:live-pulse 2s ease-in-out infinite}
.live-dot[hidden] {display:none}
.broker-status {display:inline-flex;align-items:center;gap:7px;flex:none;margin-right:6px;padding:5px 11px 5px 9px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.2;white-space:nowrap}
.broker-status .broker-dot {width:8px;height:8px;border-radius:50%;background:currentColor;flex:none}
.broker-status.is-online {background:#e2f5e9;color:#146342}
.broker-status.is-online .broker-dot {background:#2fbf71;box-shadow:0 0 0 3px rgba(47,191,113,.22);animation:live-pulse 2s ease-in-out infinite}
.broker-status.is-offline {background:#eef1f5;color:#6b7a8d}
@media (max-width: 640px) {.broker-status [data-broker-label] {display:none}.broker-status {padding:7px}}
@keyframes live-pulse {50% {box-shadow:0 0 0 5px rgba(47,191,113,0)}}

/* Map Location: live phones */
.phone-marker-wrap {background:none;border:0}
.phone-marker {position:relative;display:block;width:26px;height:26px}
.phone-marker b {position:absolute;inset:5px;border-radius:50%;border:3px solid #fff;box-shadow:0 1px 6px rgba(13,26,43,.45)}
.phone-marker.is-online b {background:#2fbf71}
.phone-marker.is-online::before {content:"";position:absolute;inset:0;border-radius:50%;background:rgba(47,191,113,.28);animation:phone-ping 2s ease-out infinite}
.phone-marker.is-offline b {background:#8a97a8}
.phone-heading {position:absolute;left:50%;top:50%;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:10px solid #1c55c7;transform:translate(-50%,-50%) rotate(var(--heading)) translateY(-15px)}
@keyframes phone-ping {0% {transform:scale(.6);opacity:1} 100% {transform:scale(1.5);opacity:0}}
.phone-popup {display:grid;gap:3px;min-width:150px;font-size:13px}
.phone-popup strong {font-size:14px}
.phone-popup-state {justify-self:start;padding:1px 8px;border-radius:999px;font-size:11px;font-weight:700}
.phone-popup-state.is-online {background:#e2f5e9;color:#146342}
.phone-popup-state.is-offline {background:#eef1f5;color:#6b7a8d}

/* Map Location: full-screen map with a sliding pin drawer */
.screen-map {height:100svh;overflow:hidden}
.screen-map .workarea {display:flex;flex-direction:column;height:100svh;min-height:0;overflow:hidden}
.screen-map .workbar {flex:none}
.screen-map .work-main {position:relative;flex:1;min-height:0;padding:0;overflow:hidden}
.screen-map .work-heading {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0}   /* the breadcrumbs name the page */
.screen-map .work-main > .notice,.screen-map .work-main > .error {position:absolute;z-index:1100;top:14px;left:50%;transform:translateX(-50%);box-shadow:0 8px 24px #0d1a2b33}
.screen-map .map-layout {position:relative;display:block;height:100%;min-height:0;gap:0;overflow:hidden}   /* clips the closed drawer */
.screen-map .map-panel {position:absolute;inset:0;border:0;border-radius:0;box-shadow:none}
.screen-map .pin-map {height:100%;min-height:0}
.screen-map .map-side {position:absolute;z-index:1001;top:14px;right:14px;bottom:14px;width:min(360px,calc(100% - 28px));max-height:none;
  box-shadow:0 18px 48px #0d1a2b38;transform:translateX(calc(100% + 28px));visibility:hidden;transition:transform .28s ease,visibility 0s linear .28s}
.screen-map .drawer-open .map-side {transform:none;visibility:visible;transition:transform .28s ease}
.screen-map .map-side .panel-heading {align-items:center}
.screen-map .map-side .panel-heading .muted-inline {margin-left:auto}
.screen-map .map-side {display:block;overflow-y:auto;overscroll-behavior:contain}
.screen-map .map-side .panel-heading {position:sticky;top:0;z-index:2;background:#fff}
.screen-map .map-side .pin-list {overflow:visible}
.map-drawer-close {margin-left:6px}
.map-drawer-toggle {display:none}
.screen-map .map-drawer-toggle {display:inline-flex;position:absolute;z-index:1000;top:14px;right:14px;align-items:center;gap:7px;padding:10px 14px;
  border:0;border-radius:12px;background:#fff;color:var(--ink);font:inherit;font-size:14px;font-weight:700;cursor:pointer;box-shadow:0 8px 24px #0d1a2b2e}
.screen-map .map-drawer-toggle .icon {color:#2056b6}
.screen-map .map-drawer-toggle b {min-width:22px;padding:1px 7px;border-radius:999px;background:#e7efff;color:#1c55c7;font-size:12px;text-align:center}
.screen-map .map-drawer-toggle:hover {background:#f3f7fd}
.screen-map .drawer-open .map-drawer-toggle {opacity:0;pointer-events:none}
.screen-map .leaflet-top.leaflet-right {top:62px}
@media (max-width:1000px) {
  .screen-map .pin-map {height:100%}
  .screen-map .map-side {top:auto;left:10px;right:10px;bottom:10px;width:auto;max-height:72%;transform:translateY(calc(100% + 20px))}
}
@media (prefers-reduced-motion:reduce) {.screen-map .map-side {transition:none}}

/* Map: phone directory toolbar (under + / −) and history drawn on the map */
.map-tools-button {display:flex !important;align-items:center;justify-content:center;width:34px !important;height:34px !important;color:#1c55c7 !important}
.map-tools-button:hover {background:#f3f7fd !important}
.phone-dir {position:absolute;z-index:1000;top:10px;left:54px;width:min(340px,calc(100% - 64px));max-height:calc(100% - 20px);display:flex;flex-direction:column;
  background:#fff;border-radius:16px;box-shadow:0 18px 48px #0d1a2b38;overflow:hidden;font-size:13px;color:var(--ink)}
.phone-dir[hidden] {display:none}
.phone-dir-head {display:flex;align-items:center;gap:8px;padding:12px 12px 10px 16px;border-bottom:1px solid #edf1f5}
.phone-dir-head strong {font-size:15px;margin-right:auto}
.phone-dir-clear {border:0;background:#edf3ff;color:#1c55c7;font:inherit;font-size:12px;font-weight:700;padding:6px 10px;border-radius:999px;cursor:pointer}
.phone-dir-close {border:0;background:transparent;color:var(--muted);font-size:22px;line-height:1;width:30px;height:30px;border-radius:8px;cursor:pointer}
.phone-dir-close:hover,.phone-dir-clear:hover {filter:brightness(.96)}
.phone-dir-tree {overflow-y:auto;overscroll-behavior:contain;padding:6px}
.dir-row {display:flex;align-items:center;gap:8px;width:100%;padding:8px;border:0;border-radius:10px;background:transparent;font:inherit;color:inherit;text-align:left;cursor:pointer}
.dir-row:hover {background:#f2f6fb}
.dir-chevron {width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:6px solid #7d8ca0;transition:transform .15s ease;flex:none}
.dir-row[aria-expanded=true] > .dir-chevron {transform:rotate(90deg)}
.dir-count {margin-left:auto;min-width:22px;padding:1px 7px;border-radius:999px;background:#eef1f5;color:#506177;font-size:11px;font-weight:700;text-align:center}
.dir-kids {padding-left:16px}
.dir-phone {display:flex;align-items:center;gap:8px;font-weight:750;font-size:14px;min-width:0}
.dir-phone span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dir-dot {width:9px;height:9px;border-radius:50%;flex:none}
.dir-dot.is-online {background:#2fbf71;box-shadow:0 0 0 3px rgba(47,191,113,.2)}
.dir-dot.is-offline {background:#9aa7b5}
.dir-cat {display:flex;align-items:center;gap:8px;font-weight:700}
.dir-cat::before {content:"";width:22px;height:22px;border-radius:7px;flex:none;background:#e7efff center/14px no-repeat}
.cat-nav::before {background-color:#e7efff;box-shadow:inset 0 0 0 7px #e7efff,inset 0 0 0 11px #1c55c7}
.cat-log::before {background-color:#e2f5e9;box-shadow:inset 0 0 0 7px #e2f5e9,inset 0 0 0 11px #2e7d32}
.cat-photo::before {background-color:#ffeadf;box-shadow:inset 0 0 0 7px #ffeadf,inset 0 0 0 11px #f4511e}
.cat-call::before {background-color:#e0f2f1;box-shadow:inset 0 0 0 7px #e0f2f1,inset 0 0 0 11px #00897b}
.dir-day {padding:8px 8px 2px;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.dir-leaf {display:flex;align-items:center;gap:10px;width:100%;padding:7px 8px;border:0;border-radius:10px;background:transparent;font:inherit;color:inherit;text-align:left;cursor:pointer}
.dir-leaf:hover {background:#f2f6fb}
.dir-leaf.is-selected {background:#e7efff;box-shadow:inset 3px 0 #1c55c7}
.dir-words {display:grid;min-width:0}
.dir-words strong,.dir-words small {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dir-words strong {font-size:13px}
.dir-words small {color:var(--muted);font-size:12px}
.dir-icon {width:28px;height:28px;border-radius:50%;flex:none;position:relative}
.dir-icon::after {content:"";position:absolute;inset:9px;border-radius:50%;background:#fff}
.icon-nav {background:#1c55c7}.icon-log {background:#2e7d32}.icon-photo {background:#f4511e}
.icon-call.call-in {background:#2e7d32}.icon-call.call-out {background:#1c55c7}.icon-call.call-missed {background:#c62828}
.dir-thumb {width:40px;height:40px;border-radius:8px;object-fit:cover;flex:none;background:#eef1f5}
.dir-empty {padding:10px 8px;color:var(--muted);font-size:12px}
.hist-icon-wrap {background:none;border:0}
.hist-icon {display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;border:3px solid #fff;color:#fff;font-size:11px;font-weight:800;box-shadow:0 1px 6px rgba(13,26,43,.45)}
.hist-start {background:#2e7d32}.hist-end {background:#172536}.hist-dest {background:#c62828}
.hist-photo-dot {background:#f4511e}
.hist-call-dot.call-in {background:#2e7d32}.hist-call-dot.call-out {background:#1c55c7}.hist-call-dot.call-missed {background:#c62828}
.hist-popup .leaflet-popup-content {margin:10px 12px}
.hist-photo {display:grid;gap:4px;width:260px}
.hist-photo img {display:block;width:100%;max-height:300px;object-fit:cover;border-radius:10px;background:#eef1f5}
.hist-photo small,.hist-call small {color:var(--muted)}
.hist-call {display:grid;gap:3px;min-width:220px}
.hist-call audio {width:100%;margin-top:6px}
@media (max-width:640px) {.phone-dir {left:10px;top:auto;bottom:10px;width:auto;right:10px;max-height:60%}}

/* New photo / call notices (portal.js) */
.notify-bell {color:var(--muted)}
.notify-stack {position:fixed;right:18px;bottom:18px;z-index:2000;display:flex;flex-direction:column;gap:10px;width:min(340px,calc(100% - 36px));pointer-events:none}
.notify-card {pointer-events:auto;display:flex;align-items:center;gap:11px;background:var(--white);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 10px 30px #0d1a2b29;padding:10px 10px 10px 12px;animation:notify-in .2s ease-out}
.notify-card:hover {border-color:#b9c8da}
.notify-card img,.notify-icon {width:46px;height:46px;border-radius:8px;flex:none}
.notify-card img {object-fit:cover;background:var(--surface)}
.notify-icon {display:grid;place-items:center;background:#edf9f2;color:var(--green);font-size:21px}
.notify-text {display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.35}
.notify-text strong {font-size:14px}
.notify-text small {color:var(--muted);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notify-close {align-self:flex-start;border:0;background:none;color:var(--muted);font-size:20px;line-height:1;padding:2px 5px;border-radius:6px}
.notify-close:hover {background:var(--surface);color:var(--ink)}
@keyframes notify-in {from {opacity:0;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce) {.notify-card {animation:none}}
.hist-note {display:block;color:var(--muted);font-size:12px;margin-top:3px}
.notify-live .notify-icon {background:var(--blue-light);color:var(--blue)}

/* Navigation summary and finish flag (map history) */
.hist-finish {display:block;filter:drop-shadow(0 2px 3px rgba(13,26,43,.45))}
.hist-trip {min-width:210px}
.hist-trip strong {display:block;font-size:14px;line-height:1.3;margin-bottom:2px}
.hist-trip-state {display:block;color:var(--muted);font-size:12px}
.hist-trip-state.is-arrived {color:var(--green);font-weight:700}
.hist-trip-rows {display:grid;grid-template-columns:auto 1fr;gap:3px 12px;margin:8px 0 0;font-size:13px}
.hist-trip-rows dt {color:var(--muted)}
.hist-trip-rows dd {margin:0;font-weight:700;text-align:right}
.hist-trip-detour {display:block;margin-top:8px;padding:6px 8px;border-radius:6px;background:#fff4e5;color:#8a4b00;font-size:12px;line-height:1.35}
.phone-popup-idle {margin:6px 0 2px;font-weight:700}
.phone-popup-idle.is-idle {color:#8a4b00}
.phone-popup-idle.is-moving {color:var(--green)}

/* Permission tree (Manage users) */
.perm-tree {gap:6px}
.perm-tree .perm-depth-0 {margin-top:6px}
.perm-tree .perm-depth-0:first-child {margin-top:0}
.perm-tree .perm-depth-0 strong {font-size:14.5px}
.perm-tree .perm-depth-1 {margin-left:26px;padding:8px 11px}
.perm-tree .perm-depth-2 {margin-left:52px;padding:7px 11px}
.perm-tree .perm-depth-1 strong,.perm-tree .perm-depth-2 strong {font-size:13.5px}

/* New request: service address with saved-pin suggestions and the New location map */
.address-field {display:grid;gap:6px}
.address-field > label {font-weight:700;font-size:14px}
.address-row {display:flex;gap:10px;align-items:stretch}
.address-combo {position:relative;flex:1;min-width:0}
.address-combo input {width:100%}
.address-row .button {white-space:nowrap}
.address-suggestions {left:0;right:0;top:100%}
.address-chosen {font-size:12.5px;color:var(--muted)}
.address-chosen.is-set {color:var(--green);font-weight:600}
.location-modal {width:min(1280px,calc(100vw - 32px));max-height:calc(100dvh - 24px)}
.location-modal .modal-form {max-height:calc(100dvh - 24px)}
.location-modal .modal-body {display:flex;flex-direction:column;gap:12px}
.location-search {position:relative;padding:0}
.location-search .place-results {left:0;right:0}
.location-map {height:calc(100dvh - 400px);min-height:320px;border-radius:10px;border:1px solid #d7e0eb;z-index:0;flex:none}
@media (max-width:600px) {.address-row {flex-direction:column}}

/* Job page */
.job-bar {display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;margin-bottom:16px}
.job-number {display:inline-flex;flex-direction:column;line-height:1.1;padding:7px 14px;border-radius:10px;background:var(--blue-light);color:var(--blue);border:1px solid #cfe0fa}
.job-number small {font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.8}
.job-number strong {font-size:20px;letter-spacing:.04em;font-variant-numeric:tabular-nums}
.job-number.is-none {background:var(--surface);color:var(--muted);border-color:#e2e9f2}
.job-created {font-size:13px}
.pill.priority-normal {background:#eef2f7;color:#475569}
.pill.priority-high {background:#fff4e5;color:#8a4b00}
.pill.priority-urgent {background:#fdecec;color:#b42318}
.job-layout {display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,1fr);gap:16px;align-items:start}
.job-details .detail-wide {grid-column:1/-1}
.job-directions {margin-left:8px;font-weight:600;white-space:nowrap}
.job-map {height:210px;border-radius:10px;border:1px solid #d7e0eb;margin:0 0 18px;z-index:0}
.job-no {font-variant-numeric:tabular-nums}
.job-no.is-none {color:var(--muted);font-style:italic}
.dispatch-panel {position:sticky;top:16px}
.dispatch-form {display:grid;gap:16px;padding:18px}
.dispatch-head h2 {margin:0}
.dispatch-head p {margin:4px 0 0;font-size:13px}
.dispatch-block {border:0;margin:0;padding:0;min-width:0}
.dispatch-block legend {font-weight:700;font-size:14px;margin-bottom:8px;padding:0;display:flex;gap:8px;align-items:baseline;width:100%}
.dispatch-block[disabled] {opacity:.65}
.dispatch-row {display:grid;grid-template-columns:1fr 1fr;gap:12px}
.crew-search {margin-bottom:8px}
.crew-list {list-style:none;margin:0;padding:0;display:grid;gap:6px;max-height:300px;overflow-y:auto}
.crew-option {display:flex;align-items:center;gap:10px;padding:7px 10px;border:1px solid #e2e9f2;border-radius:9px;cursor:pointer;font-weight:400}
.crew-option:hover {background:#f7faff}
.crew-option:has(input:checked) {border-color:#9cbcf0;background:#f2f7ff}
.crew-option input {margin:0}
.crew-option > span {display:flex;flex-direction:column;min-width:0;flex:1}
.crew-option strong {font-size:14px}
.crew-option small {font-size:12px;color:var(--muted)}
.crew-lead {font-style:normal;font-size:11px;font-weight:700;color:var(--blue);background:var(--blue-light);padding:2px 7px;border-radius:999px}
.crew-list.is-readonly .crew-option {cursor:default}
.segmented {display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #d7e0eb;border-radius:9px;overflow:hidden}
.segment {position:relative;cursor:pointer;font-weight:600}
.segment input {position:absolute;opacity:0;pointer-events:none}
.segment span {display:block;text-align:center;padding:8px 6px;font-size:13.5px;border-left:1px solid #d7e0eb}
.segment:first-child span {border-left:0}
.segment input:focus-visible + span {outline:2px solid var(--blue);outline-offset:-2px}
.segment-normal input:checked + span {background:#475569;color:#fff}
.segment-high input:checked + span {background:#c46a00;color:#fff}
.segment-urgent input:checked + span {background:#c62828;color:#fff}
.dispatch-foot {display:grid;gap:6px}
.dispatch-foot .button {justify-content:center;width:100%}
.dispatch-foot small {font-size:12px}
@media (max-width:980px) {.job-layout {grid-template-columns:1fr}.dispatch-panel {position:static}}

/* Dispatch panel: technician chips, Add technician picker, schedule shortcuts */
.crew-chips {list-style:none;margin:0 0 10px;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.crew-chip {display:inline-flex;align-items:center;gap:7px;padding:4px 6px 4px 4px;border-radius:999px;background:#f2f7ff;border:1px solid #cfe0fa;font-size:13.5px;font-weight:600}
.crew-remove {border:0;background:none;color:var(--muted);font-size:17px;line-height:1;padding:0 4px;border-radius:50%;cursor:pointer}
.crew-remove:hover {color:#b42318;background:#fdecec}
.crew-empty {font-size:13px;padding:4px 0}
.crew-add {position:relative;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.crew-picker {position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:30;background:white;border:1px solid #d7e0eb;border-radius:10px;box-shadow:0 14px 32px #0d1a2b29;padding:8px}
.crew-options {list-style:none;margin:8px 0 0;padding:0;display:grid;gap:4px;max-height:260px;overflow-y:auto}
.crew-options .crew-option {width:100%;text-align:left;background:white;font:inherit;color:inherit}
.crew-none {margin:8px 4px 2px;font-size:13px}
.dispatch-block input[type="datetime-local"] {width:100%}
.quick-dates {display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.chip-button {border:1px solid #d7e0eb;background:white;border-radius:999px;padding:5px 12px;font:inherit;font-size:13px;font-weight:600;color:var(--ink);cursor:pointer}
.chip-button:hover {background:#f2f7ff;border-color:#9cbcf0;color:var(--blue)}
label.dispatch-block {display:grid;gap:6px;font-weight:700;font-size:14px}
.avatar-26 {width:26px;height:26px;font-size:10.5px}
.avatar-30 {width:30px;height:30px;font-size:11.5px}
.avatar-32 {width:32px;height:32px;font-size:12px}
.job-print-link {margin-left:auto}

/* SMS in the phone history, and "deleted on the phone" marks */
.cat-sms {color:#6d3fc0}
.dir-leaf.is-deleted .dir-words small {color:#b42318}
.icon-sms.sms-in {background:#6d3fc0}.icon-sms.sms-out {background:#9b6ee8}
.hist-sms {min-width:220px;max-width:320px}
.hist-sms strong {display:block;font-size:14px}
.hist-sms small {display:block;color:var(--muted);font-size:12px}
.hist-sms-body {margin:8px 0 6px;padding:8px 11px;border-radius:12px;font-size:13.5px;line-height:1.4;white-space:pre-wrap;word-break:break-word;max-height:240px;overflow-y:auto}
.hist-sms-body.is-in {background:#f1f3f6;border-top-left-radius:4px}
.hist-sms-body.is-out {background:#e9f1ff;border-top-right-radius:4px}
.hist-deleted {display:block;margin-top:4px;color:#b42318 !important;font-weight:600}
.hist-sms-dot.sms-in {background:#6d3fc0}.hist-sms-dot.sms-out {background:#9b6ee8}
.notify-sms .notify-icon {background:#f3edfd;color:#6d3fc0}

/* ---------------- VChat (Facebook Messenger look, inside the client's circle) */
.nav-badge {margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#e41e3f;color:#fff;font-size:11.5px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;line-height:1}
.vchat {--vc-blue:#0866ff;--vc-grad:linear-gradient(180deg,#00b2ff 0%,#006aff 100%);--vc-grey:#f0f2f5;--vc-text:#050505;--vc-sub:#65676b;
  display:grid;grid-template-columns:360px minmax(0,1fr);height:calc(100dvh - 170px);min-height:480px;background:#fff;border:1px solid #e4e6eb;border-radius:12px;overflow:hidden;color:var(--vc-text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.vchat-side {position:relative;display:flex;flex-direction:column;border-right:1px solid #e4e6eb;min-height:0;background:#fff}
.vchat-side-head {display:flex;align-items:center;justify-content:space-between;padding:16px 16px 8px}
.vchat-side-head h2 {margin:0;font-size:24px;font-weight:800;letter-spacing:-.01em}
.vchat-leave {margin-right:10px;background:transparent}
.vchat-leave[hidden] {display:none}
.vchat-leave svg {transform:rotate(180deg)}
.vchat-leave:not([hidden]) + h2 {flex:1}
.vchat-round {width:36px;height:36px;border-radius:50%;border:0;background:var(--vc-grey);color:var(--vc-text);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.vchat-round:hover {background:#e4e6eb}
.vchat-round[disabled] {opacity:.45;cursor:not-allowed}
.vchat-search {display:flex;align-items:center;gap:8px;margin:4px 16px 8px;padding:0 12px;height:36px;border-radius:999px;background:var(--vc-grey);color:var(--vc-sub)}
.vchat-search input {border:0;background:transparent;outline:none;font:inherit;font-size:15px;color:var(--vc-text);width:100%;padding:0;min-height:0;box-shadow:none}
.vchat-list {list-style:none;margin:0;padding:0 8px 12px;overflow-y:auto;flex:1;min-height:0}
.vchat-item {position:relative;display:flex;align-items:center;gap:12px;width:100%;padding:8px;border:0;border-radius:10px;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}
.vchat-item:hover {background:var(--vc-grey)}
.vchat-item.is-active {background:#ebf5ff}
.vchat-item-words {display:flex;flex-direction:column;min-width:0;flex:1;gap:3px}
.vchat-item-words strong {font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vchat-item-line {display:flex;min-width:0;font-size:13px;color:var(--vc-sub)}
.vchat-preview {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;color:var(--vc-sub)}
.vchat-when {flex:none;white-space:nowrap;font-size:13px;color:var(--vc-sub)}
.vchat-item.is-unread strong,.vchat-item.is-unread .vchat-preview,.vchat-item.is-unread .vchat-when {font-weight:700;color:var(--vc-text)}
.vchat-dot {min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--vc-blue);color:#fff;font-size:11.5px;display:inline-flex;align-items:center;justify-content:center;flex:none}
.vchat-group {list-style:none;padding:12px 8px 4px;font-size:13px;font-weight:700;color:var(--vc-sub)}
.vchat-pic {--size:40px;width:var(--size);height:var(--size);border-radius:50%;flex:none;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:#e4e6eb}
.vchat-pic img {width:100%;height:100%;object-fit:cover}
.vchat-pic.is-initials {background:linear-gradient(135deg,#6a8dff,#0866ff);color:#fff;font-weight:700;font-size:calc(var(--size) * .38)}
.vchat-pic.is-phone {background:linear-gradient(135deg,#34c38f,#0b8a5f);color:#fff}
.vchat-people {position:absolute;inset:0;background:#fff;display:flex;flex-direction:column;z-index:2}
.vchat-people-head {display:flex;align-items:center;gap:12px;padding:16px 16px 8px}
.vchat-people-head strong {font-size:18px}
.vchat-people-head .vchat-round svg {transform:rotate(180deg)}
.vchat-empty {padding:24px 14px;color:var(--vc-sub);text-align:center;font-size:14px;list-style:none}
.vchat-main {display:flex;flex-direction:column;min-width:0;min-height:0;background:#fff}
.vchat-placeholder {margin:auto;text-align:center;color:var(--vc-sub);padding:20px}
.vchat-logo {display:inline-flex;width:72px;height:72px;border-radius:50%;align-items:center;justify-content:center;background:var(--vc-grad);color:#fff}
.vchat-placeholder h2 {margin:12px 0 6px;color:var(--vc-text);font-size:22px}
.vchat-thread {display:flex;flex-direction:column;height:100%;min-height:0}
.vchat-thread[hidden] {display:none}
.vchat-thread-head {display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid #e4e6eb;box-shadow:0 1px 2px rgba(0,0,0,.06);z-index:1}
.vchat-head-pic {display:inline-flex}
.vchat-who {display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.25}
.vchat-who strong {font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vchat-who small {color:var(--vc-sub);font-size:12.5px}
.vchat-calls {display:flex;gap:6px}
.vchat-calls .vchat-round {background:transparent;color:var(--vc-blue)}
.vchat-calls .vchat-round:hover:not([disabled]) {background:var(--vc-grey)}
.vchat-back {display:none}
.vchat-back svg {transform:rotate(180deg)}
.vchat-messages {flex:1;min-height:0;overflow-y:auto;padding:12px 14px 8px;display:flex;flex-direction:column}
.vchat-intro {display:flex;flex-direction:column;align-items:center;gap:4px;padding:20px 0 16px;text-align:center}
.vchat-intro strong {font-size:17px;margin-top:6px}
.vchat-intro small {color:var(--vc-sub);font-size:13px}
.vchat-day {align-self:center;margin:14px 0 8px;font-size:12px;font-weight:600;color:var(--vc-sub)}
.vchat-row {display:flex;align-items:flex-end;gap:8px;margin-top:2px}
.vchat-row.is-first {margin-top:10px}
.vchat-row.is-mine {justify-content:flex-end;flex-wrap:wrap}
.vchat-row-pic {width:28px;flex:none;display:inline-flex}
.dispatch-locked {padding:20px 20px 18px}
.locked-head {display:flex;align-items:flex-start;gap:14px;padding-bottom:16px;border-bottom:1px solid #edf1f5}
.locked-badge {width:44px;height:44px;border-radius:12px;background:#eef1ff;color:#3949ab;display:inline-flex;align-items:center;justify-content:center;flex:none}
.locked-head h2 {margin:0 0 4px;font-size:18px;line-height:1.2}
.locked-head p {margin:0;font-size:14px;color:#334155}
.locked-head p strong {color:#0f172a}
.locked-head small {display:block;margin-top:2px;font-size:13px;color:var(--muted)}
.locked-rows {list-style:none;margin:0;padding:0}
.locked-rows li {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid #edf1f5}
.locked-label {display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:14px;flex:none}
.locked-label svg {color:#94a3b8}
.locked-value {font-weight:700;font-size:14px;color:#0f172a;text-align:right}
.locked-crew {display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.locked-person {display:inline-flex;align-items:center;gap:6px;padding:3px 10px 3px 3px;border-radius:999px;background:#f1f5f9;font-weight:600}
.locked-note {display:flex;align-items:center;gap:8px;margin:14px 0 0;padding:10px 12px;border-radius:10px;background:#f6f8fb;color:var(--muted);font-size:13px;line-height:1.4}
.locked-note svg {flex:none;color:#94a3b8}
.vchat-context {flex:none;line-height:1.4;margin:12px 0 2px 36px;font-size:12px;font-weight:600;color:#0b8a5f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 36px)}
.vchat-bubble {max-width:min(70%,520px);padding:8px 12px;border-radius:18px;background:var(--vc-grey);font-size:15px;line-height:1.34}
.vchat-row.is-mine .vchat-bubble {background:var(--vc-grad);background-attachment:fixed;color:#fff}
.vchat-row.is-theirs:not(.is-first) .vchat-bubble {border-top-left-radius:4px}
.vchat-row.is-theirs:not(.is-last) .vchat-bubble {border-bottom-left-radius:4px}
.vchat-row.is-mine:not(.is-first) .vchat-bubble {border-top-right-radius:4px}
.vchat-row.is-mine:not(.is-last) .vchat-bubble {border-bottom-right-radius:4px}
.vchat-row.is-pending .vchat-bubble {opacity:.6}
.vchat-row.is-failed .vchat-bubble {background:#fdecec;color:#b42318}
.vchat-text {display:block;white-space:pre-wrap;word-break:break-word}
.vchat-seen {flex-basis:100%;text-align:right;font-size:11px;color:var(--vc-sub);margin:3px 2px 0}
.vchat-compose {display:flex;align-items:flex-end;gap:8px;padding:8px 12px 10px}
.vchat-compose textarea {flex:1;resize:none;border:0;border-radius:20px;background:var(--vc-grey);padding:9px 14px;font:inherit;font-size:15px;max-height:140px;line-height:1.35;outline:none;box-shadow:none;min-height:0}
.vchat-send {width:38px;height:38px;border:0;border-radius:50%;background:transparent;color:var(--vc-blue);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.vchat-send:hover {background:var(--vc-grey)}
@media (max-width:860px) {
  .vchat {grid-template-columns:1fr;height:calc(100dvh - 140px)}
  .vchat-main {display:none}
  .vchat.is-open .vchat-side {display:none}
  .vchat.is-open .vchat-main {display:flex}
  .vchat-back {display:inline-flex}
}
/* Inside the ServiROS phone app: full screen, no frame */
body.vchat-app {margin:0;background:#fff}
body.vchat-app .vchat {height:100dvh;min-height:0;border:0;border-radius:0;grid-template-columns:1fr}
body.vchat-app .vchat-main {display:none}
body.vchat-app .vchat.is-open .vchat-side {display:none}
body.vchat-app .vchat.is-open .vchat-main {display:flex}
body.vchat-app .vchat-back {display:inline-flex}

/* ---------------------------------------------------------------- VChat calls (Messenger-style call screen) */
html.vcall-open, html.vcall-open body {overflow:hidden}
.vcall {position:fixed;inset:0;z-index:2000;background:radial-gradient(120% 90% at 50% 0%,#3a3b3c 0%,#18191a 70%);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;
 padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);font-family:inherit;user-select:none}
.vcall[hidden] {display:none}
.vcall-stage {position:absolute;inset:0;display:grid;gap:4px;background:transparent}
.vcall-stage[data-count="2"] {grid-template-rows:1fr 1fr}
.vcall-stage[data-count="3"], .vcall-stage[data-count="4"] {grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
@media (min-width:861px) {.vcall-stage[data-count="2"] {grid-template-rows:none;grid-template-columns:1fr 1fr}}
.vcall-tile {position:relative;background:#000;overflow:hidden;min-height:0}
.vcall-tile[hidden] {display:none}
.vcall-tile video {width:100%;height:100%;object-fit:cover;display:block}
.vcall-stage[data-count="1"] .vcall-tile video {object-fit:contain}
@media (max-width:860px) {.vcall-stage[data-count="1"] .vcall-tile video {object-fit:cover}}
.vcall-tile-name {position:absolute;left:10px;bottom:10px;font-size:13px;font-weight:600;background:rgba(0,0,0,.45);padding:3px 8px;border-radius:12px}
.vcall-stage[data-count="1"] .vcall-tile-name {display:none}
.vcall-info {position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:0 24px;margin-bottom:120px;transition:all .25s}
.vcall-info strong {font-size:26px;font-weight:700;letter-spacing:-.01em;text-shadow:0 1px 3px rgba(0,0,0,.4)}
.vcall-info small {font-size:15px;color:rgba(255,255,255,.8);font-variant-numeric:tabular-nums}
.vcall-pic .vchat-pic {box-shadow:0 0 0 6px rgba(255,255,255,.08)}
.vcall-info.is-small {position:absolute;top:calc(14px + env(safe-area-inset-top));left:14px;align-items:flex-start;margin:0;padding:6px 12px;border-radius:14px;background:rgba(0,0,0,.35);gap:0}
.vcall-info.is-small .vcall-pic {display:none}
.vcall-info.is-small strong {font-size:16px}
.vcall-info.is-small small {font-size:13px}
.vcall-self {position:absolute;z-index:2;top:calc(14px + env(safe-area-inset-top));right:14px;width:110px;height:160px;object-fit:cover;border-radius:14px;background:#000;box-shadow:0 4px 16px rgba(0,0,0,.45);transform:scaleX(-1)}
.vcall-self.is-back {transform:none}
.vcall-self[hidden] {display:none}
@media (min-width:861px) {.vcall-self {width:220px;height:140px}}
.vcall-actions {position:absolute;z-index:2;left:0;right:0;bottom:calc(28px + env(safe-area-inset-bottom));display:flex;justify-content:center;gap:18px;padding:0 16px;flex-wrap:wrap}
.vcall-actions.is-ringing {gap:90px}
.vcall-action {display:flex;flex-direction:column;align-items:center;gap:6px;min-width:60px}
.vcall-btn {width:58px;height:58px;border-radius:50%;border:0;background:rgba(255,255,255,.18);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s,transform .1s;-webkit-tap-highlight-color:transparent}
.vcall-btn:hover {background:rgba(255,255,255,.28)}
.vcall-btn:active {transform:scale(.94)}
.vcall-btn.is-on {background:#fff;color:#050505}
.vcall-btn.is-muted {background:#fff;color:#050505}
.vcall-btn.is-red {background:#f02849}
.vcall-btn.is-red:hover {background:#d81f3e}
.vcall-btn.is-green {background:#31a24c}
.vcall-btn.is-green:hover {background:#2b9143}
.vcall-actions.is-ringing .vcall-btn {width:68px;height:68px}
.vcall-actions.is-ringing .is-green {animation:vcall-pulse 1.4s ease-out infinite}
@keyframes vcall-pulse {0% {box-shadow:0 0 0 0 rgba(49,162,76,.6)} 100% {box-shadow:0 0 0 22px rgba(49,162,76,0)}}
.vcall-caption {font-size:12px;color:rgba(255,255,255,.85)}
@media (prefers-reduced-motion:reduce) {.vcall-actions.is-ringing .is-green {animation:none}}

/* Incoming call on other pages of the website */
.vcall-notice {position:fixed;z-index:2100;right:18px;bottom:18px;display:flex;align-items:center;gap:10px;background:#242526;color:#fff;border-radius:16px;padding:12px 14px;box-shadow:0 10px 30px rgba(0,0,0,.35);max-width:calc(100vw - 36px);animation:vcall-in .2s ease-out}
.vcall-notice div {display:flex;flex-direction:column;min-width:0;margin-right:6px}
.vcall-notice strong {font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vcall-notice small {font-size:13px;color:#b0b3b8}
.vcall-pill {border:0;border-radius:999px;padding:8px 16px;font:600 14px/1 inherit;color:#fff;cursor:pointer;text-decoration:none;white-space:nowrap}
.vcall-pill.is-red {background:#f02849}
.vcall-pill.is-green {background:#31a24c}
@keyframes vcall-in {from {transform:translateY(12px);opacity:0}}

/* Call lines in the chat ("Video call · 2:31", "Missed voice call") */
.vchat-bubble.vchat-callmsg {display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px 10px;background:var(--vc-grey,#f0f2f5) !important;color:var(--vc-text,#050505) !important;padding:10px 14px;min-width:180px;border-radius:18px !important}
.vchat-callmsg-icon {width:36px;height:36px;border-radius:50%;background:#e4e6eb;color:#050505;display:flex;align-items:center;justify-content:center}
.vchat-callmsg.is-missed .vchat-callmsg-icon {background:#f02849;color:#fff}
.vchat-callmsg-words {display:flex;flex-direction:column}
.vchat-callmsg-words strong {font-size:14px}
.vchat-callmsg-words small {font-size:12px;color:#65676b}
.vchat-callmsg-again {grid-column:1 / -1;margin-top:6px;border:0;border-radius:8px;background:#e4e6eb;color:#050505;font:600 14px/1 inherit;padding:9px;cursor:pointer}
.vchat-callmsg-again:hover {background:#d8dadf}
.vchat-calls .vchat-round.is-join {background:#31a24c;color:#fff}
.job-modal {width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 48px);padding:0;border:0;border-radius:18px;box-shadow:0 24px 60px rgba(15,23,42,.28);overflow:auto}
.job-modal::backdrop {background:rgba(15,23,42,.45)}
.jm-body {padding:22px 24px 18px}
.jm-loading {padding:28px 24px;margin:0;color:var(--muted)}
.jm-head {display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.jm-no {display:block;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.jm-head h2 {margin:2px 0 0;font-size:21px;line-height:1.25}
.jm-x {width:36px;height:36px;border:0;border-radius:50%;background:#f1f5f9;color:#334155;font-size:22px;line-height:1;cursor:pointer;flex:none}
.jm-chips {display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 14px}
.jm-facts {display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:0;padding:14px 0;border-top:1px solid #edf1f5;border-bottom:1px solid #edf1f5;font-size:14px}
.jm-facts dt {color:var(--muted)}
.jm-facts dd {margin:0;font-weight:600;color:#0f172a}
.jm-desc {margin:12px 0 0;font-size:14px;color:#334155;white-space:pre-line}
.jm-section {margin:18px 0 10px;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.jm-previous {margin:0 0 10px;padding:10px 12px;border-radius:10px;background:#fff4d6;color:#8a5a00;font-size:13px}
.jm-previous p {margin:4px 0 0;color:#0f172a}
.jm-steps {list-style:none;margin:0;padding:0}
.jm-step {position:relative;display:flex;align-items:flex-start;gap:12px;padding:0 0 16px}
.jm-step:not(:last-child)::before {content:"";position:absolute;left:15px;top:32px;bottom:2px;width:2px;background:#e2e8f0}
.jm-step.is-done:not(:last-child)::before {background:#9fd8b4}
.jm-dot {width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;flex:none;font-weight:800;font-size:14px;background:#f1f5f9;color:#94a3b8;border:2px solid #e2e8f0}
.jm-step.is-done .jm-dot {background:#16a34a;border-color:#16a34a;color:#fff}
.jm-step.is-stopped .jm-dot {background:#c62828;border-color:#c62828;color:#fff}
.jm-step.is-next .jm-dot {background:#fff;border-color:#2356b5;color:#2356b5}
.jm-words {flex:1;min-width:0;padding-top:5px}
.jm-words strong {display:block;font-size:15px;color:#0f172a}
.jm-step:not(.is-done):not(.is-next):not(.is-stopped) .jm-words strong {color:#94a3b8}
.jm-step.is-next .jm-words small {color:#2356b5;font-weight:600}
.jm-words small {display:block;margin-top:2px;font-size:13px;color:var(--muted)}
.jm-note {margin:6px 0 0;padding:8px 10px;border-radius:8px;background:#f6f8fb;font-size:13px;color:#334155}
.jm-thumb img {width:44px;height:44px;border-radius:10px;object-fit:cover;display:block}
.jm-photos {display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
.jm-photo {display:block;border-radius:12px;overflow:hidden;background:#f6f8fb;text-decoration:none;color:inherit}
.jm-photo img {width:100%;height:90px;object-fit:cover;display:block}
.jm-photo strong {display:block;padding:6px 8px 0;font-size:13px;color:#0f172a}
.jm-photo small {display:block;padding:0 8px 8px;font-size:12px;color:var(--muted)}
.jm-foot {display:flex;justify-content:flex-end;gap:10px;margin-top:18px;padding-top:14px;border-top:1px solid #edf1f5}
.jm-lightbox {position:fixed;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;background:rgba(8,12,20,.88);cursor:zoom-out}
.jm-lightbox img {max-width:min(92vw,900px);max-height:78vh;border-radius:12px;object-fit:contain;box-shadow:0 18px 50px rgba(0,0,0,.45);background:#111}
.jm-lightbox-caption {text-align:center;color:#fff}
.jm-lightbox-caption strong {display:block;font-size:16px}
.jm-lightbox-caption small {display:block;margin-top:2px;font-size:13px;color:#cbd5e1}
.jm-lightbox-x {position:absolute;top:16px;right:16px;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:26px;line-height:1;cursor:pointer}
.jm-thumb {cursor:zoom-in}
.dispatch-foot .button:disabled {background:#c7d3e6;color:#f8fafc;cursor:not-allowed;box-shadow:none}
.dispatch-why {display:block;margin-top:8px;text-align:center;font-size:13px;color:#8a5a00}

/* ===== Landing page (ServiROS, 2026-12-01) ===== */
.landing h2 {margin:0}
.lp-hero {position:relative;overflow:hidden;color:#fff;background:#0b1b33}
.lp-hero::before {content:"";position:absolute;inset:-40% -10% auto auto;width:720px;height:720px;border-radius:50%;background:#123063;opacity:.55;z-index:0}
.lp-hero-inner {position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.02fr) minmax(0,1fr);gap:48px;align-items:center;padding-block:64px 72px}
.lp-hero h1 {font-size:clamp(2.6rem,5vw,4.4rem);line-height:1.02;letter-spacing:-.055em;margin:20px 0 18px;font-weight:780}
.lp-hero h1 em {font-style:normal;color:#2bb3f0;display:block}
.lp-lead {max-width:520px;color:#d9e4f3;font-size:clamp(1rem,1.4vw,1.15rem);line-height:1.6}
.lp-hero .button {min-height:48px;padding-inline:18px;background:#f7811e;color:#fff}
.lp-hero .button:hover,.lp-calm .button:hover {background:#e06e0c}
.lp-hero .ghost,.lp-calm .ghost {background:transparent;border-color:#5f7ea8;color:#f3f7ff}
.lp-hero .ghost:hover,.lp-calm .ghost:hover {background:#16325c}
.lp-ticks {list-style:none;display:flex;flex-wrap:wrap;gap:8px 20px;margin:26px 0 0;padding:0;font-size:14px;font-weight:600;color:#c9d8ec}
.lp-ticks li {display:inline-flex;align-items:center;gap:7px}
.lp-ticks .icon {color:#2bb3f0}
.lp-map-card {background:#fff;border-radius:22px;padding:10px;box-shadow:0 24px 60px #02091a55}
.lp-map-card.is-large {box-shadow:0 18px 48px #10243b1f;border:1px solid var(--line)}
.live-map-svg {display:block;width:100%;height:auto;font-family:var(--font)}

.lp-eyebrow {color:#1e7bd8;margin-bottom:10px}
.lp-center {text-align:center;max-width:760px;margin-inline:auto;margin-bottom:34px}
.lp-center p {font-size:1.05rem}
.lp-problem {background:#fff;border-bottom:1px solid var(--line);padding-block:72px 64px}
.lp-pain-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.lp-pain {background:#f5f7fa;border:1px solid var(--line);border-radius:16px;padding:22px 20px 20px;position:relative}
.lp-pain::before {content:"";position:absolute;left:20px;top:0;width:36px;height:4px;border-radius:0 0 4px 4px;background:#f7811e}
.lp-quote {display:block;font-size:1.22rem;font-weight:750;letter-spacing:-.03em;color:#0f2a5c;margin:6px 0 10px;line-height:1.25}
.lp-pain p {margin:0;color:var(--muted);font-size:14.5px}
.lp-turn {text-align:center;margin:38px 0 0;font-size:1.15rem;color:var(--muted)}
.lp-turn strong {color:#0f2a5c}

.lp-solution {padding-block:72px 40px}
.lp-feature-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.lp-feature {background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px;box-shadow:var(--shadow)}
.lp-feature h3 {font-size:1.18rem;margin:16px 0 6px;letter-spacing:-.02em}
.lp-feature p {margin:0;color:var(--muted);font-size:14.5px}
.lp-feature-icon {display:inline-grid;place-items:center;width:50px;height:50px;border-radius:14px;background:#e8f1fd;color:#1e7bd8}
.lp-feature-icon.is-orange {background:#fff1e5;color:#e06e0c}
.lp-feature-icon.is-sky {background:#e5f6fd;color:#0e8fc7}
.lp-feature-icon.is-green {background:#e7f6ec;color:#16803c}

.lp-live {padding-block:56px 72px}
.lp-live-grid {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:40px;align-items:center}
.lp-steps {list-style:none;margin:0;padding:0;display:grid;gap:10px}
.lp-step {display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;opacity:.45;animation:14s linear infinite both}
.lp-step strong {display:block;font-size:1.02rem;color:#0f2a5c}
.lp-step p {margin:2px 0 0;color:var(--muted);font-size:14px}
.lp-step-dot {flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;color:#fff;font-weight:750;font-size:14px;background:#0f2a5c}
.s2 .lp-step-dot {background:#1e7bd8}.s3 .lp-step-dot {background:#f7811e}.s4 .lp-step-dot {background:#2bb3f0}.s5 .lp-step-dot {background:#16a34a}
.s1 {animation-name:lp-s1}.s2 {animation-name:lp-s2}.s3 {animation-name:lp-s3}.s4 {animation-name:lp-s4}.s5 {animation-name:lp-s5}
@keyframes lp-s1 {0%,1%{opacity:.45;border-color:var(--line)} 2%,99%{opacity:1;border-color:#9fb7da} 100%{opacity:.45}}
@keyframes lp-s2 {0%,21%{opacity:.45;border-color:var(--line)} 22%,99%{opacity:1;border-color:#9fc4f0} 100%{opacity:.45}}
@keyframes lp-s3 {0%,59%{opacity:.45;border-color:var(--line)} 60%,99%{opacity:1;border-color:#f8c08f} 100%{opacity:.45}}
@keyframes lp-s4 {0%,77%{opacity:.45;border-color:var(--line)} 78%,99%{opacity:1;border-color:#9fdcf6} 100%{opacity:.45}}
@keyframes lp-s5 {0%,89%{opacity:.45;border-color:var(--line)} 90%,99%{opacity:1;border-color:#93d7a9} 100%{opacity:.45}}

.lp-fields {padding-block:24px 72px}
.lp-field-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.lp-field {background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column}
.lp-field img {display:block;width:100%;aspect-ratio:3/2;height:auto;object-fit:cover;background:#eaf3fc}
.lp-field>div {padding:18px 18px 20px}
.lp-field h3 {font-size:1.08rem;margin:0 0 6px;letter-spacing:-.02em}
.lp-field p {margin:0;color:var(--muted);font-size:14px}

.lp-calm {background:#0f2a5c;color:#fff}
.lp-calm-inner {display:flex;align-items:center;justify-content:space-between;gap:32px;padding-block:52px}
.lp-calm h2 {font-size:clamp(1.8rem,3vw,2.6rem);letter-spacing:-.05em}
.lp-calm p {margin:8px 0 0;color:#cfdcef;max-width:560px}
.lp-calm .hero-actions {margin:0;flex:none}
.lp-calm .button {min-height:48px}
.lp-calm .button:not(.ghost) {background:#f7811e}

@media (max-width:1000px) {
  .lp-hero-inner,.lp-live-grid {grid-template-columns:1fr;gap:36px}
  .lp-pain-grid,.lp-field-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .lp-feature-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .lp-calm-inner {flex-direction:column;align-items:flex-start}
}
@media (max-width:760px) {
  .lp-hero-inner {padding-block:44px 52px}
  .lp-problem,.lp-solution {padding-block:52px 32px}
  .lp-pain-grid,.lp-field-grid,.lp-feature-grid {grid-template-columns:1fr}
  .lp-center h2 br {display:none}
}
@media (prefers-reduced-motion:reduce) {
  .lp-step {animation:none;opacity:1}
}

/* Job progress: milestones on one side, the visit's route map on the other */
.job-progress .panel-heading .muted-inline {display:inline-flex;align-items:center;gap:5px;font-size:13px}
.job-progress {margin-top:16px}
.progress-split.has-map {display:grid;grid-template-columns:minmax(300px,1fr) minmax(0,2fr);align-items:start}
.progress-split.has-map>.activity-list {border-right:1px solid var(--line)}
.progress-side {padding:14px 16px 16px;display:grid;gap:12px;position:sticky;top:12px}
.progress-stats {display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.progress-stat {border:1px solid var(--line);border-radius:10px;padding:9px 11px;background:var(--surface);display:grid;gap:2px;min-width:0}
.progress-stat span {font-size:12px;font-weight:650;color:var(--muted)}
.progress-stat strong {font-size:18px;line-height:1.2;color:var(--ink)}
.progress-stat small {font-size:11.5px;color:var(--muted);line-height:1.35}
.progress-stat.is-live {border-color:#b9cdf3;background:#eef4ff}
.progress-stat.is-live span::before {content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--blue);margin-right:6px;vertical-align:1px;animation:progress-pulse 1.6s ease-in-out infinite}
@keyframes progress-pulse {50% {opacity:.25}}
.progress-map {height:440px;border-radius:10px;border:1px solid #d7e0eb;z-index:0}
.progress-note {font-size:12px}
.progress-stops {list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:4px;max-height:220px;overflow:auto}
.progress-stop {all:unset;box-sizing:border-box;width:100%;display:flex;align-items:center;gap:10px;padding:7px 9px;border-radius:8px;cursor:pointer}
.progress-stop:hover,.progress-stop:focus-visible {background:var(--surface);outline:none}
.progress-stop strong,.progress-stop small {display:block}
.progress-stop strong {font-size:13.5px}
.progress-stop small {font-size:12px;color:var(--muted)}
.stop-no {flex:none;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;background:#f2a33a;color:#fff}
.stop-no.is-site {background:#146342}
.route-dot {display:grid!important;place-items:center;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px #0d1a2b55;font:700 11px/1 system-ui,sans-serif;color:#fff;background:#506177}
.route-dot.is-start {background:#1c55c7}
.route-dot.is-arrived {background:#146342}
.route-dot.is-done {background:#7a4fd0}
.route-dot.is-complete {background:#0d1a2b}
.route-dot.is-photo {background:#506177}
.route-dot.is-stop {background:#f2a33a}
.route-dot.is-stop.is-site {background:#146342}
.route-dot.is-here {background:#1c55c7;box-shadow:0 0 0 6px #1c55c733,0 1px 4px #0d1a2b55}
@media (max-width:900px) {
  .progress-split.has-map {grid-template-columns:1fr}
  .progress-split.has-map>.activity-list {border-right:0;border-bottom:1px solid var(--line)}
  .progress-side {position:static}
}
@media (prefers-reduced-motion:reduce) {.progress-stat.is-live span::before {animation:none}}

/* Service history: full-width compact table (date & time · type + phone · details) */
.service-history {margin-top:16px}
.service-history .panel-heading {min-height:48px;padding:9px 16px}
.history-table {font-size:13px}
.history-table th {padding:7px 12px}
.history-table td {padding:5px 12px;min-width:0;line-height:1.35}
.history-table .history-when {width:1%;white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums}
.history-table .history-type {width:1%;white-space:nowrap}
.history-type {display:table-cell}
.history-icon {display:inline-grid;place-items:center;width:22px;height:22px;border-radius:6px;background:#eef4ff;color:var(--blue);vertical-align:middle;margin-right:7px}
.history-phone-name {font-weight:600;color:var(--ink);vertical-align:middle}
.history-type .muted {vertical-align:middle}
.history-table .history-detail {font-weight:550;color:var(--ink)}
.history-table tr.is-completed td {background:#e9f7ee}
.history-table tr.is-completed .history-detail {color:#146342}
.history-table tr.is-completed .history-icon {background:#d3efdd;color:#146342}
.history-table tr.is-terminated td {background:#fdecec}
.history-table tr.is-terminated .history-detail {color:#a3281c}
.history-table tr.is-terminated .history-icon {background:#f9d6d3;color:#a3281c}
@media (max-width:760px) {.history-table .history-type {white-space:normal}}

/* Overview job popup: route map on the right, durations between the steps */
.job-modal.has-map {width:min(1060px,calc(100vw - 32px))}
.jm-grid.has-map {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:24px;align-items:start}
.jm-side {position:sticky;top:0;display:grid;gap:10px}
.jm-side .jm-section {margin-top:10px;margin-bottom:0}
.jm-map {height:440px;border-radius:12px;border:1px solid #d7e0eb;z-index:0}
.progress-stats.is-compact {grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:6px}
.progress-stats.is-compact .progress-stat {padding:6px 9px}
.progress-stats.is-compact .progress-stat strong {font-size:15px}
.jm-step.has-dur {padding-bottom:34px}
.jm-dur {position:absolute;left:26px;bottom:9px;display:inline-flex;align-items:center;gap:4px;padding:1px 8px;border-radius:999px;background:#eef4ff;color:#1c55c7;font-size:11.5px;font-weight:650;line-height:18px;white-space:nowrap}
.jm-dur::before {content:"⏱";font-size:10px}
.jm-dur.is-live {background:#fff4d6;color:#8a5a00}
@media (max-width:820px) {
  .jm-grid.has-map {grid-template-columns:1fr}
  .jm-side {position:static;order:-1}
  .jm-map {height:260px}
}

/* Job page: Dispatch first (left), Service details with its map next to it (right) */
.job-layout {grid-template-columns:minmax(340px,1fr) minmax(0,1.45fr)}
.job-layout>aside {order:-1}
.job-layout .job-details .job-map {height:260px}
@media (max-width:980px) {.job-layout {grid-template-columns:1fr}}

/* ===== SuperAdmin › Firmware ===== */
.fw-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:18px}
.fw-card {display:flex;flex-direction:column;gap:4px}
.fw-label {font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.fw-big {font-size:1.5rem;letter-spacing:-.03em;color:#0f2a5c}
.fw-log {padding:6px 18px 12px}
.fw-entry {padding:14px 0;border-bottom:1px solid var(--line)}
.fw-entry:last-child {border-bottom:0}
.fw-entry header {display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.fw-entry h3 {margin:0;font-size:1rem}
.fw-entry ul {margin:8px 0 0;padding-left:20px;color:#2c3e55}
.fw-entry li {margin:3px 0}
.fw-entry.is-next h3 {color:#805300}
.fw-badge {display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;background:#ebf0f6;color:#38516e;font-size:12px;font-weight:700;white-space:nowrap}
.fw-badge.is-green {background:#e4f5eb;color:#146342}
.fw-badge.is-amber {background:#fff2d8;color:#805300}
.fw-badge.is-red {background:#ffe5e5;color:#b3261e}
.fw-note {padding:0 18px 14px;font-size:13px}
@media (max-width:900px) {.fw-grid {grid-template-columns:1fr}}

/* Devices: unlock PIN card (one PIN for all phones) */
.pin-panel {margin-bottom:16px}
.pin-panel .panel-heading h2 {display:flex;align-items:center;gap:8px}
.pin-summary {display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:14px 18px 0}
.pin-summary .muted-inline {color:var(--muted);font-size:13px}
.pin-note {margin:0;padding:8px 18px 16px;font-size:13px;max-width:780px}
.compact-table .pill svg {vertical-align:-2px}
.lost-pill {margin-top:4px}

/* Branches: the owner's branch menu in the sidebar, and the Branches page */
.branch-switch {margin:-12px 0 18px}
.branch-switch label {display:grid;gap:4px}
.branch-switch small {font-size:11px;color:#b6c6dc;text-transform:uppercase;letter-spacing:.04em}
.branch-switch select {min-height:38px;background:#142439;color:#f2f6ff;border:1px solid #34455e;border-radius:8px;padding:6px 10px;font-weight:600}
.branch-switch button {margin-top:6px}
.branch-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;padding:16px 18px}
.branch-card {border:1px solid var(--line);border-radius:12px;padding:14px;display:grid;gap:8px;background:#fbfcfe}
.branch-card.is-current {border-color:#1c55c7;box-shadow:0 0 0 1px #1c55c7 inset}
.branch-card.is-off {opacity:.65}
.branch-card h3 {margin:0;font-size:16px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.branch-stats {display:flex;gap:14px;font-size:13px;color:var(--muted)}
.branch-stats strong {color:var(--ink);font-size:16px;display:block}
.branch-actions {display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
.move-form {display:flex;gap:6px;align-items:center}
.move-form select {min-height:34px;padding:4px 8px;width:auto;max-width:170px}
.branch-row td:first-child .tree-cell {padding-left:26px}
.branch-mark {color:var(--muted);font-weight:700}
.permission-row.is-locked {opacity:.55}

/* Sign in: Google and "with your phone" (QR) */
.login-or {display:flex;align-items:center;gap:10px;margin:18px 0 12px;color:var(--muted);font-size:13px}
.login-or::before,.login-or::after {content:"";flex:1;height:1px;background:var(--line)}
.login-alt {display:grid;gap:10px}
.google-button,.phone-signin-button {display:flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:0 16px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:700;font-size:15px;text-decoration:none;cursor:pointer;font-family:inherit}
.google-button:hover,.phone-signin-button:hover {background:#f5f8fc}
.google-mark {display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#1a73e8;color:#fff;font-size:13px;font-weight:800}
.qr-login {display:flex;gap:16px;align-items:center;margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fbfcfe}
.qr-login img {width:160px;height:160px;flex:none;border-radius:8px;background:#fff;image-rendering:pixelated}
.qr-login img.is-expired {opacity:.2}
.qr-login p {margin:6px 0 0;font-size:13px}
.qr-login-state {font-weight:700}
.qr-approve {max-width:440px;margin:40px auto;padding:28px 22px;background:#fff;border:1px solid var(--line);border-radius:16px;display:grid;gap:10px;text-align:center;justify-items:center}
.qr-approve h1 {margin:6px 0 0;font-size:24px}
.qr-approve p {margin:0}
.qr-approve .login-alt {width:100%;margin-top:8px}
.qr-device {font-weight:700;padding:8px 12px;border-radius:8px;background:#eef3fb}
.qr-answers {display:grid;gap:10px;width:100%;margin-top:8px}
.button-light {background:#fff;color:var(--ink);border:1px solid var(--line)}
@media (max-width:560px) {.qr-login {flex-direction:column;text-align:center}}
.new-buttons {display:grid;gap:12px;margin-bottom:16px}
.new-buttons > .panel {margin:0}

/* SuperAdmin accounts stand out in SuperAdmin › Users (flat colours) */
.user-tree tr.superadmin-row > td {background:#f4f0ff}
.user-tree tr.superadmin-row > td:first-child {box-shadow:inset 4px 0 0 #6d28d9}
.user-tree tr.superadmin-row .tree-label strong {color:#4c1d95}
.role-badge-superadmin {display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;background:#6d28d9;color:#fff;font-size:12px;font-weight:700;letter-spacing:.02em}
.role-badge-superadmin svg {width:13px;height:13px}
