:root { color-scheme: dark; }
* { box-sizing: border-box; }
body { font-family: ui-sans-serif, system-ui, sans-serif; margin: 24px; background: #0f172a; color: #e2e8f0; }
body.has-side { margin: 0; display: flex; min-height: 100vh; }
.stage { flex: 1; min-width: 0; padding: 24px; }
h1 { margin: 0 0 4px; font-size: 22px; }
h1.brand { display: flex; align-items: center; gap: 12px; color: #4aff00; }
h1.brand img { height: 40px; width: auto; max-width: 180px; object-fit: contain; border-radius: 8px; }
h2 { margin: 0 0 12px; font-size: 16px; }
.sub { color: #4aff00; margin-bottom: 20px; font-weight: 700; }
.grid { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.card { background: #1e293b; border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.stat { min-width: 140px; }
.stat .n { font-size: 28px; font-weight: 700; }
.stat .l { color: #94a3b8; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.ok { color: #4ade80; }
.bad { color: #f87171; }
.warn { border: 1px solid #f59e0b; }
.okbox { border: 1px solid #22c55e; color: #86efac; }
.errbox { border: 1px solid #ef4444; color: #fecaca; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #334155; vertical-align: top; }
th { color: #93c5fd; font-weight: 600; background: #1e293b; }
th a { color: #93c5fd; text-decoration: none; }
th a:hover { text-decoration: underline; }
tr:hover { background: #334155; }
.pill { padding: 2px 8px; border-radius: 999px; font-size: 12px; display: inline-block; }
.pill.active { background: #14532d; color: #86efac; }
.pill.blocked { background: #7f1d1d; color: #fecaca; }
.pill.inactive { background: #334155; color: #cbd5e1; }
.pill.lead { background: #78350f; color: #fde68a; }
.pill.open { background: #1e3a5f; color: #93c5fd; }
.pill.paid { background: #14532d; color: #86efac; }
.pill.void, .pill.draft { background: #334155; color: #cbd5e1; }
.pill.other, .pill.error { background: #7f1d1d; color: #fecaca; }
.pill.ok { background: #14532d; color: #86efac; }
code { font-family: ui-monospace, monospace; }
.tablewrap { overflow: auto; max-height: 70vh; }
form.row, .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #94a3b8; }
input, select, textarea { background: #0f172a; color: #e2e8f0; border: 1px solid #334155; border-radius: 8px; padding: 8px 10px; font: inherit; }
textarea { min-width: 280px; min-height: 70px; }
label.wide { min-width: min(100%, 520px); }
button, .btn { background: #2563eb; color: white; border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; font: inherit; text-decoration: none; display: inline-block; }
button.danger, .btn.danger { background: #7f1d1d; }
button.ghost, .btn.ghost { background: #334155; }
form.inline { display: inline; margin-right: 6px; }
.hint { color: #94a3b8; font-size: 13px; margin: 0 0 12px; }
.muted { color: #94a3b8; }
a { color: #93c5fd; }
.actions button, .actions .btn { font-size: 12px; padding: 4px 10px; }
nav.bar { display: flex; gap: 6px; margin: 12px 0 18px; border-bottom: 1px solid #334155; padding-bottom: 8px; align-items: center; flex-wrap: wrap; }
nav.bar a { color: #94a3b8; text-decoration: none; padding: 8px 14px; border-radius: 8px 8px 0 0; font-size: 14px; font-weight: 600; }
nav.bar a:hover { color: #e2e8f0; background: #334155; }
nav.bar a.on { color: #e2e8f0; background: #1e293b; border: 1px solid #334155; border-bottom-color: #1e293b; }
nav.bar .lang, .side .lang { display: flex; margin-left: auto; border: 1px solid #334155; border-radius: 999px; overflow: hidden; }
nav.bar .lang button, .side .lang button { background: transparent; color: #94a3b8; padding: 4px 10px; font-size: 11px; font-weight: 700; border: 0; border-radius: 0; }
nav.bar .lang button.on, .side .lang button.on { background: #2563eb; color: #fff; }
nav.bar .who { margin-left: 8px; color: #94a3b8; font-size: 12px; font-weight: 500; padding: 8px 10px; }

.side-slot { flex: 0 0 228px; position: relative; z-index: 30; min-height: 100vh; }
html.nav-collapsed .side-slot { flex: 0 0 64px; }
.side {
  position: absolute;
  inset: 0 auto 0 0;
  width: 228px;
  background: #0b1220;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width .2s ease;
}
html.nav-collapsed .side { width: 64px; }
html.nav-collapsed .side-slot:hover .side,
html.nav-collapsed .side:hover {
  width: 228px;
  box-shadow: 12px 0 28px rgba(0,0,0,.4);
}
.side-brand { padding: 16px 14px 12px; display: flex; align-items: center; justify-content: flex-start; min-height: 64px; }
.side-brand .brand { margin: 0; font-size: 15px; gap: 10px; overflow: hidden; }
.side-brand .brand img { height: 32px; max-width: 120px; }
.side-mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex: 0 0 36px;
  background: #0f172a;
}
html.nav-collapsed .side-mark { display: block; }
html.nav-collapsed .side-brand .brand { display: none; }
html.nav-collapsed .side-slot:hover .side-brand .brand { display: flex; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px; flex: 1; overflow: auto; }
.side-nav a, .side-out {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.side-nav a:hover, .side-out:hover { color: #e2e8f0; background: #1e293b; }
.side-nav a.on { color: #e2e8f0; background: #1e3a5f; }
.side .ico { width: 22px; height: 22px; flex: 0 0 22px; display: block; }
.side-foot { padding: 10px 8px 12px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #1e293b; }
.side .lang { margin-left: 0; align-self: flex-start; }
.side .who { color: #64748b; font-size: 11px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-toggle {
  background: transparent;
  color: #94a3b8;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.side-toggle:hover { color: #e2e8f0; background: #1e293b; }
html.nav-collapsed .side-toggle .ico-open { display: none; }
html:not(.nav-collapsed) .side-toggle .ico-shut { display: none; }
html.nav-collapsed .side .lbl,
html.nav-collapsed .side .who,
html.nav-collapsed .side-brand span { display: none; }
html.nav-collapsed .side-slot:hover .side .lbl,
html.nav-collapsed .side-slot:hover .side .who,
html.nav-collapsed .side-slot:hover .side-brand span { display: inline; }
html.nav-collapsed .side-nav a, html.nav-collapsed .side-out { justify-content: center; padding-left: 0; padding-right: 0; }
html.nav-collapsed .side-slot:hover .side-nav a,
html.nav-collapsed .side-slot:hover .side-out { justify-content: flex-start; padding-left: 10px; padding-right: 10px; }
html.nav-collapsed .side .lang { display: none; }
html.nav-collapsed .side-slot:hover .side .lang { display: flex; }
html.nav-collapsed .side-brand { display: flex; justify-content: center; }
html.nav-collapsed .side-slot:hover .side-brand { justify-content: flex-start; }
.thumb { max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid #334155; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } nav.bar .lang { margin-left: 0; } }
.login-box { max-width: 420px; margin: 8vh auto; }

.wizard h2 { margin-bottom: 16px; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; }
.steps li { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #0f172a; color: #94a3b8; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid #334155; }
.steps li b { width: 18px; height: 18px; border-radius: 999px; background: #334155; color: #e2e8f0; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.steps li.on { background: #1e3a5f; color: #e2e8f0; border-color: #2563eb; }
.steps li.on b { background: #2563eb; }
.steps li.done { color: #86efac; border-color: #14532d; }
.steps li.done b { background: #14532d; color: #86efac; }
.pane { display: none; }
.pane.on { display: block; }
.map-row { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr); gap: 28px; align-items: start; }
#cust-map { height: 280px; border-radius: 12px; border: 1px solid #334155; background: #0f172a; z-index: 1; overflow: hidden; }
#cust-map iframe { width: 100%; height: 100%; border: 0; }
.wiz-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
@media (max-width: 800px) { .map-row { grid-template-columns: 1fr; } #cust-map { height: 220px; } }
label.wide { min-width: min(100%, 520px); }

.wizard .row, .wizard .roomy, .wizard .map-fields {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
  align-items: stretch;
}
.wizard label.in,
.wizard .map-fields label {
  display: block;
  width: 100%;
  min-width: 0;
  flex: none;
  margin: 0 0 28px 0;
}
.wizard label.in:last-child,
.wizard .map-fields > label:last-of-type { margin-bottom: 8px; }
.wizard label.in[hidden] { display: none !important; margin: 0; }
.wizard input, .wizard select, .wizard textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  min-height: 46px;
  margin: 0;
}
.wizard textarea { min-height: 110px; }
.wizard input::placeholder, .wizard textarea::placeholder { color: #94a3b8; opacity: 1; }
.wizard label.in.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.wizard label.in.check span { color: #e2e8f0; }
.wizard label.in.check input[type=checkbox] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  flex: none;
  accent-color: #4aff00;
}


.wizard select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  line-height: 22px;
  padding: 12px 36px 12px 14px;
  background-color: #0f172a;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2394a3b8' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.wizard select:invalid, .wizard select option[value=""] { color: #94a3b8; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.wizard input[type=file] {
  padding: 10px 12px;
  color: #94a3b8;
}
.wizard .filepick { margin-bottom: 28px; }
.wizard .doclist { margin: 0 0 18px; padding-left: 18px; color: #cbd5e1; }
.wizard .doclist li { margin-bottom: 6px; }

.ip-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 720px) { .ip-pair { grid-template-columns: 1fr; } }

.crumb { font-size: 13px; }
.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 14px;
}
.status-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.status-actions .btn, .status-actions button { font-weight: 600; }
.status-banner.active .status-actions .btn.ghost { background: #1e3a8a; }
.status-banner.active .status-actions button:not(.danger) { background: #16a34a; }

.status-banner.active { background: #1d4ed8; color: #fff; }
.status-banner.blocked { background: #7f1d1d; color: #fecaca; }
.status-banner.inactive { background: #475569; color: #e2e8f0; }
.status-banner.inactive .status-actions button:not(.danger) { background: #16a34a; }
.status-banner.inactive .status-actions .btn.ghost { background: #334155; }
.status-banner.lead { background: #6d28d9; color: #f5f3ff; }
.status-banner.lead .status-actions .btn.ghost { background: #4c1d95; }
.status-banner.lead .status-actions button:not(.danger) { background: #16a34a; }
.cust-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid #334155;
  margin: 0 0 16px;
}
.cust-tabs a {
  color: #94a3b8;
  text-decoration: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cust-tabs a:hover { color: #e2e8f0; }
.cust-tabs a.on { color: #e2e8f0; border-bottom-color: #2563eb; }
.tabpane { display: none; }
.tabpane.on { display: block; }
.profile-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.ov-location { display: flex; flex-direction: column; min-height: 0; }
.ov-location #profile-map { flex: 1 1 auto; min-height: 240px; height: auto; }
@media (max-width: 900px) { .profile-split { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 18px; margin: 12px 0 0; }
.kv dt { color: #94a3b8; font-size: 13px; padding-top: 2px; }
.kv dd { margin: 0; }
.profile-split textarea { width: 100%; min-width: 0; }
.tablewrap.short { max-height: 280px; }

.cust-tabs a[data-tab="overview"] { font-weight: 800; }

.pick {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
}
.pick label.in {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0 0 16px 0;
}
.pick select {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  line-height: 22px;
  padding: 12px 36px 12px 14px;
  margin: 0;
  background-color: #0f172a;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2394a3b8' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.pick select:invalid, .pick select option[value=""] { color: #94a3b8; }
.pick button { align-self: flex-start; }

#profile-map { height: 240px; border-radius: 12px; border: 1px solid #334155; background: #0f172a; overflow: hidden; margin-top: 10px; }
#profile-map iframe { width: 100%; height: 100%; border: 0; }

.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "profile loc"
    "ips notes"
    "plan logs";
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) > .tabpane[data-tab="overview"].on {
  display: contents;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .profile-split {
  display: contents;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-profile {
  grid-area: profile;
  margin-bottom: 0;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-location {
  grid-area: loc;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-location #profile-map {
  flex: 1 1 auto;
  min-height: 240px;
  height: auto;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-right {
  display: contents;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) > .tabpane[data-tab="services"].on {
  display: contents;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .split {
  display: contents;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-ips {
  grid-area: ips;
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-ips .ip-pair {
  flex: 1 1 auto;
  align-items: stretch;
  min-height: 0;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-ips .ip-pair > div {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-ips .pick {
  margin-top: auto;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-notes {
  grid-area: notes;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-notes form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-notes .pick label.in {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0 0 16px 0;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-notes textarea {
  flex: 1 1 auto;
  min-height: 110px;
  width: 100%;
  min-width: 0;
  margin: 0;
  display: block;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-plan {
  grid-area: plan;
  margin-bottom: 0;
}
.ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .ov-logs {
  grid-area: logs;
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) {
    display: block;
  }
  .ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) > .tabpane[data-tab="overview"].on {
    display: block;
  }
  .ov-flow:has(.tabpane[data-tab="overview"].on):has(.tabpane[data-tab="services"].on) .profile-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tabpane[data-tab="overview"].on .ov-profile,
  .tabpane[data-tab="overview"].on .ov-right > .card:last-child {
    margin-bottom: 0;
  }
}

.pool-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pool-head h2 { margin: 0; }
.pool-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pool-body { margin-top: 12px; }
.pool-notes { margin: 8px 0 0; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 22px 24px;
  max-width: 420px;
  width: 100%;
}
.modal-card p { margin: 0 0 18px; font-size: 16px; line-height: 1.4; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.pay-form.row { align-items: end; gap: 12px; }
.pay-form label.pick {
  flex: 1 1 200px;
  min-width: 200px;
  gap: 6px;
}
.pay-form label.pick select,
.pay-form label.pick input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  line-height: 22px;
  padding: 12px 14px;
  margin: 0;
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  font: inherit;
  color: #e2e8f0;
}
.pay-form label.pick select {
  padding-right: 36px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2394a3b8' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.pay-form label.pick input::placeholder { color: #94a3b8; opacity: 1; }
.pay-form button {
  height: 46px;
  min-height: 46px;
  padding: 0 16px;
  box-sizing: border-box;
}

td a.btn.inv-view {
  font-size: 12px;
  padding: 4px 10px;
  margin-left: 8px;
  font-weight: 600;
  vertical-align: middle;
  background: #16a34a;
  color: #fff;
}
td a.btn.inv-view:hover { background: #15803d; }

.tx-debit { color: #f87171; font-weight: 600; }
.tx-credit { color: #4ade80; font-weight: 600; }

.pay-ack {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
}
.js-fade { transition: opacity .4s ease; }
.js-fade.is-gone { opacity: 0; }

.status-who {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
form.change-id {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.status-banner .change-id input {
  width: 72px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.18);
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0 8px;
}
.status-banner .change-id button {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}
.status-banner.active .change-id button.ghost { background: #1e3a8a; }
.status-banner.blocked .change-id button.ghost { background: #991b1b; color: #fecaca; }

tfoot th { color: #e2e8f0; font-weight: 700; background: #0f172a; border-top: 1px solid #475569; }

.pill.scheduled { background: #1e3a5f; color: #93c5fd; }
.pill.done { background: #14532d; color: #86efac; }
.pill.cancelled { background: #334155; color: #cbd5e1; }
.job-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.job-meta { color: #94a3b8; font-size: 13px; margin: 0 0 10px; }
.job-daybar form { align-items: end; }
.job-card details { margin-top: 10px; }
.job-card summary { cursor: pointer; color: #93c5fd; }


.job-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; margin: 8px 0 12px; }
.job-map { min-height: 320px; height: 100%; border-radius: 12px; border: 1px solid #334155; background: #0f172a; overflow: hidden; margin: 0; }
.job-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
.job-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.job-side h3 { margin: 0; font-size: 12px; color: #93c5fd; text-transform: uppercase; letter-spacing: .04em; }
.job-side p { margin: 0; font-size: 13px; }
.job-side textarea { width: 100%; min-width: 0; min-height: 88px; }
.job-contact a { display: inline-block; margin-right: 10px; }
@media (max-width: 800px) { .job-split { grid-template-columns: 1fr; } .job-map, .job-map iframe { min-height: 220px; } }

.support-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.support-grid > .card { margin-bottom: 0; display: flex; flex-direction: column; min-height: 0; height: 100%; }
@media (max-width: 900px) { .support-grid { grid-template-columns: 1fr; } }
.sig-read { font-size: 22px; display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.pill.excellent { background: #14532d; color: #86efac; }
.pill.good { background: #1e3a5f; color: #93c5fd; }
.pill.bad { background: #7f1d1d; color: #fecaca; }
.ts-steps { margin: 0; padding-left: 18px; color: #cbd5e1; }
.ts-steps li { margin: 0 0 10px; line-height: 1.45; }
.ts-detail { margin: 8px 0 0; padding-left: 18px; }
.ts-detail li { margin: 0 0 6px; color: #94a3b8; }
.cfg-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.cfg-name {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; color: #e2e8f0; background: #0b1220;
  border: 1px solid #334155; border-radius: 8px; padding: 8px 12px;
  text-decoration: none;
}
.cfg-name:hover { border-color: #4aff00; color: #fff; }
.cfg-file form { margin: 0; }

.traffic-card { margin-top: 0; }
.traffic-card h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.traffic-split { display: grid; grid-template-columns: 1fr; gap: 16px; }
.traffic-pane {
  min-width: 0;
  padding: 12px 14px 10px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0b1220;
}
.traffic-pane-rx { border-left: 3px solid #38bdf8; }
.traffic-pane-tx { border-left: 3px solid #4aff00; }
.traffic-pane-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.traffic-pane-head b { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.traffic-pane-head .iface { color: #94a3b8; font-size: 12px; font-weight: 500; margin-left: 6px; }
.traffic-rates { display: flex; gap: 14px; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; }
.traffic-rates .rx { color: #38bdf8; }
.traffic-rates .tx { color: #c084fc; }
.traffic-plot { display: flex; align-items: flex-start; gap: 8px; background: #070b14; border: 1px solid #1e293b; border-radius: 8px; padding: 8px 8px 6px 4px; }
.traffic-axis { width: 3.2rem; flex-shrink: 0; }
.traffic-ticks { height: 168px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: 2px 0; }
.traffic-ticks span { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: #94a3b8; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.traffic-unit { margin-top: 2px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #64748b; text-align: right; font-weight: 600; }
.traffic-chart { flex: 1; width: auto; min-width: 0; height: 168px; display: block; }
.traffic-chart .plot-bg { fill: #05080f; }
.traffic-chart .grid { stroke: #1e293b; stroke-width: 1; stroke-dasharray: 3 4; }
.traffic-chart .line-rx { fill: none; stroke: #38bdf8; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.traffic-chart .line-tx { fill: none; stroke: #c084fc; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.traffic-chart .g-rx-top { stop-color: #38bdf8; stop-opacity: .28; }
.traffic-chart .g-rx-bot { stop-color: #38bdf8; stop-opacity: 0; }
.traffic-chart .g-tx-top { stop-color: #c084fc; stop-opacity: .22; }
.traffic-chart .g-tx-bot { stop-color: #c084fc; stop-opacity: 0; }
.lat-pane { padding: 12px 14px; }
.lat-row { display: grid; grid-template-columns: minmax(11em, max-content) 1fr auto; align-items: center; gap: 10px; margin: 0; }
.lat-row .lat-lab { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.lat-row b { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 4.8em; text-align: right; color: #e2e8f0; }

.traffic-pane-tx .traffic-rates .tx { color: #4aff00; }
.traffic-pane-tx .traffic-chart .line-tx { stroke: #4aff00; }
.traffic-pane-tx .traffic-chart .g-tx-top { stop-color: #4aff00; stop-opacity: .28; }
.traffic-pane-tx .traffic-chart .g-tx-bot { stop-color: #4aff00; stop-opacity: 0; }
.traffic-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #94a3b8; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.traffic-live i { width: 7px; height: 7px; border-radius: 99px; background: #22c55e; display: inline-block; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: traffic-pulse 1.6s ease-out infinite; }
.traffic-live.off i { background: #64748b; box-shadow: none; animation: none; }
@keyframes traffic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.ping-row { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; flex-wrap: wrap; }
.ping-row button.on { background: #991b1b; color: #fecaca; }
.ping-read { font-variant-numeric: tabular-nums; font-size: 13px; color: #e2e8f0; }
.ping-read .lost { color: #fca5a5; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.kanban-col {
  flex: 0 0 240px; min-width: 220px; background: #1e293b; border: 1px solid #334155;
  border-radius: 12px; padding: 10px; min-height: 180px;
}
.kanban-col.drag-over { border-color: #2563eb; background: #1e3a5f; }
.kanban-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; color: #93c5fd; font-weight: 700; font-size: 13px;
}
.kanban-count { color: #94a3b8; font-weight: 600; }
.kanban-nums { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.kanban-worth { color: #86efac; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.lead-card {
  background: #0f172a; border: 1px solid #334155; border-radius: 10px;
  padding: 10px 12px; cursor: grab; color: inherit; display: block;
}
.lead-card:hover { border-color: #2563eb; }
.lead-card.dragging { opacity: .45; }
.lead-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.lead-card .name { font-weight: 700; color: #e2e8f0; display: block; text-decoration: none; min-width: 0; }
.lead-card .name:hover { text-decoration: underline; }
.lead-worth {
  flex: 0 0 auto;
  background: #14532d;
  color: #86efac;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.lead-card .meta { color: #94a3b8; font-size: 12px; }
.sales-overview { margin: 0 0 16px; }

.job-day-stats { margin-bottom: 20px; }
.job-day-stats h2 { margin-bottom: 14px; }
.job-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  align-items: stretch;
}
.stat-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 148px;
  flex: 1 1 148px;
}
.stat-card .n { font-size: 28px; font-weight: 700; }
.stat-card .l { color: #94a3b8; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.job-techs { margin-top: 16px; background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 12px 16px; }
.job-card.job-return { border: 1px dashed #475569; }
.job-card.job-return .job-map { min-height: 240px; margin: 8px 0; }
.job-card.job-return .job-map iframe { min-height: 240px; }

.veh-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.veh-edit input { min-width: 140px; max-width: 220px; }
.veh-econ { white-space: nowrap; }
.veh-econ input { width: 88px; margin-right: 8px; }
.veh-econ select { width: 96px; }

.wx-card-row { display: flex; align-items: center; gap: 12px; }
.wx-stat { min-width: 180px; }
.wx-glyph { width: 48px; height: 48px; flex: 0 0 48px; display: block; }
.wx-glyph svg { width: 100%; height: 100%; display: block; }
.wx-sun { color: #fbbf24; }
.wx-partly { color: #fbbf24; }
.wx-cloud { color: #94a3b8; }
.wx-rain { color: #38bdf8; }
.wx-storm { color: #facc15; }
.wx-fog { color: #cbd5e1; }
.wx-snow { color: #e2e8f0; }
.wx-wind { color: #7dd3fc; }
.wx-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 8px 0 12px;
}
.wx-card .n { font-size: 22px; font-weight: 700; line-height: 1.1; }
.wx-card .l { color: #94a3b8; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }

.wx-support .wx-card { margin: 0 0 8px; padding: 8px 10px; }
.wx-support .wx-card .n { font-size: 20px; }
.wx-support .wx-glyph { width: 36px; height: 36px; flex-basis: 36px; }
.wx-support h3 { margin: 8px 0 6px; font-size: 12px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.wx-outage {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #422006;
  color: #fde68a;
  font-size: 12px;
  line-height: 1.35;
}
.wx-outage[hidden] { display: none; }

.wx-days {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.wx-day {
  display: grid;
  grid-template-columns: 2.8em 24px 1fr auto;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px 8px;
  min-width: 0;
}
.wx-day.today { border-color: #38bdf8; }
.wx-day.severe { border-color: #f59e0b; background: #422006; }
.wx-days .wx-glyph { width: 24px; height: 24px; flex: 0 0 24px; margin: 0; }
.wx-day .wd { font-size: 11px; text-transform: uppercase; color: #94a3b8; letter-spacing: .03em; font-weight: 600; }
.wx-day .temps { font-variant-numeric: tabular-nums; font-size: 13px; }
.wx-day .hi { font-weight: 700; }
.wx-day .lo { color: #94a3b8; }
.wx-day .rain { font-size: 11px; color: #38bdf8; font-variant-numeric: tabular-nums; }

.sig-meters { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 14px; }
.sig-meter-lab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.sig-meter-lab b { color: #e2e8f0; font-variant-numeric: tabular-nums; font-weight: 700; }
.sig-bar { height: 8px; background: #0f172a; border: 1px solid #334155; border-radius: 999px; overflow: hidden; }
.sig-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: #475569; transition: width .35s ease; }
.sig-bar span.excellent { background: #22c55e; }
.sig-bar span.good { background: #38bdf8; }
.sig-bar span.bad { background: #f87171; }

.chains { margin: 10px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.chain { display: grid; grid-template-columns: 4.2em 1fr auto; align-items: center; gap: 8px; }
.chain-lab { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.chain b { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 4.6em; text-align: right; }
.chain-align { margin: 4px 0 0; font-size: 12px; font-weight: 600; color: #94a3b8; }
.chain-align.good { color: #86efac; }
.chain-align.aim { color: #fde68a; }
.sig-bar span.aim { background: #f59e0b; }

.stat-card { text-decoration: none; color: inherit; }
a.stat-card:hover { border-color: #4ade80; }
.job-stats-row.tight { margin: 0 0 14px; gap: 12px; }
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}
.dash-wide { grid-column: 1 / -1; }
.dash-panel h2 {
  margin: 0 0 14px;
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-bars {
  display: flex;
  align-items: stretch;
  gap: 10px;
  height: 168px;
  margin-bottom: 10px;
}
.dash-bars.short { height: 88px; margin-bottom: 0; }
.dash-bar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dash-bar-track {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 8px;
}
.dash-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 5px 5px 0 0;
  min-height: 2px;
}
.dash-bar.billed { background: rgba(56, 189, 248, .38); }
.dash-bar.collected { background: #22c55e; left: 18%; right: 18%; }
.dash-bar-stack {
  position: absolute;
  bottom: 0;
  left: 18%;
  right: 18%;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  min-height: 0;
}
.dash-seg { display: block; min-height: 3px; }
.dash-seg.scheduled { background: #38bdf8; }
.dash-seg.done { background: #22c55e; }
.dash-seg.cancelled { background: #64748b; }
.dash-bar-lab {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.dash-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #cbd5e1;
}
.dash-legend.rowish { flex-direction: row; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.dash-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}
.dash-legend b { font-variant-numeric: tabular-nums; margin-left: 6px; }
.dash-donut { display: flex; align-items: center; gap: 22px; }
.dash-donut-svg { width: 140px; height: 140px; flex: 0 0 140px; }
.dash-donut-n { fill: #e2e8f0; font-size: 18px; font-weight: 700; }
.dash-donut-l { fill: #94a3b8; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.dash-live-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dash-chart { height: 140px; }
.dash-chart svg { width: 100%; height: 100%; display: block; }
.dash-spark .plot-bg { fill: #0f172a; }
.dash-spark .grid { stroke: #1e293b; stroke-width: 1; }
.dash-spark .line-cpu { fill: none; stroke: #4ade80; stroke-width: 2; stroke-linejoin: round; }
.dash-spark .line-mem { fill: none; stroke: #38bdf8; stroke-width: 2; stroke-linejoin: round; }
.dash-spark .g-cpu-top { stop-color: #4ade80; stop-opacity: .45; }
.dash-spark .g-cpu-bot { stop-color: #4ade80; stop-opacity: .02; }
.dash-spark .g-mem-top { stop-color: #38bdf8; stop-opacity: .45; }
.dash-spark .g-mem-bot { stop-color: #38bdf8; stop-opacity: .02; }
.dash-kv {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: end;
}
.dash-kv .n { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; }
.dash-kv .l { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.dash-disk .sig-bar { margin-top: 6px; }
#dash-live { font-size: 10px; }
@media (max-width: 960px) {
  .dash-grid, .dash-live-row, .dash-kv { grid-template-columns: 1fr 1fr; }
  .dash-wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .dash-grid, .dash-live-row, .dash-kv, .dash-donut { grid-template-columns: 1fr; display: grid; }
  .dash-donut { gap: 12px; }
}

.has-tip { position: relative; cursor: help; }
.has-tip[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: #020617;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity .12s ease, transform .12s ease;
}
.has-tip[data-tip]:hover::after,
.has-tip[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.job-stats-row .has-tip[data-tip]::after,
.dash-kv .has-tip[data-tip]::after {
  bottom: auto;
  top: calc(100% + 8px);
}
.dash-panel, .dash-bars, .job-stats-row, .dash-legend, .dash-kv { overflow: visible; }
.dash-bar-col { cursor: help; }

.comm-preview {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px 14px;
  white-space: pre-wrap;
  font-size: 13px;
  color: #e2e8f0;
  max-height: 180px;
  overflow: auto;
}
.comm-table { max-height: 360px; }
.comm-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.comm-links .btn { font-size: 12px; padding: 6px 10px; }

.comm-table .pick { width: 36px; text-align: center; }
.comm-table input[type=checkbox] { width: 16px; height: 16px; accent-color: #4aff00; }
.comm-table tr.dim { opacity: .55; }

.comm-drop {
  position: relative;
  border: 1px dashed #334155;
  border-radius: 12px;
  padding: 0;
  background: #0f172a;
}
.comm-drop.is-over { border-color: #4aff00; background: #102016; }
.comm-drop textarea {
  border: 0;
  background: transparent;
  min-height: 140px;
  width: 100%;
  resize: vertical;
}
.comm-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.comm-drop-hint { padding: 0 14px 12px; margin: 0; cursor: pointer; color: #94a3b8; }
.comm-thumbs { display: flex; flex-direction: column; gap: 12px; padding: 0 14px 10px; }
.comm-thumb {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #1e293b;
  border: 1px solid #334155;
  font-size: 12px;
  color: #cbd5e1;
}
.comm-thumb img { width: 100%; height: auto; display: block; }
.comm-thumb.is-file { padding: 12px 40px 12px 12px; width: auto; }
.comm-thumb-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  background: #0f172a;
  font-size: 14px;
  line-height: 20px;
}

.sub a { color: inherit; text-decoration: none; }
.sub a:hover { text-decoration: underline; }
.auto-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
a.auto-hub-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 22px 24px;
  border: 1px solid #334155;
  transition: border-color .15s;
}
a.auto-hub-card:hover { border-color: #4aff00; }
.auto-hub-card .hub-ico { width: 32px; height: 32px; color: #4aff00; margin-bottom: 12px; display: block; }
.auto-hub-card h2 { color: #4aff00; margin: 0 0 8px; }
.auto-hub-card p { color: #94a3b8; margin: 0; font-size: 14px; line-height: 1.4; }
.auto-hub-card .n { font-size: 18px; font-weight: 700; margin-top: 16px; color: #e2e8f0; }

.dash-log {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dash-log h2 { justify-content: flex-start; }
.dash-log-more {
  margin-left: auto;
  font-size: 11px;
  padding: 4px 10px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.dash-log-list {
  max-height: 202px;
  overflow-y: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.dash-log-modal {
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
}
.dash-log-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-log-modal-head h2 {
  margin: 0;
  flex: 1;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 12px;
  color: #94a3b8;
}
.dash-log-all {
  max-height: min(60vh, 520px);
  height: min(60vh, 520px);
}
.dash-log-row {
  display: grid;
  grid-template-columns: 5.6em 6.2em minmax(0,1fr);
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px solid #1e293b;
  align-items: baseline;
}
.dash-log-row:first-child { border-top: 1px solid #1e293b; }
.dash-log-row .when { color: #94a3b8; }
.dash-log-row .who { color: #4aff00; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-log-row .what { color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-log-row.new { animation: dash-log-in .8s ease; }
@keyframes dash-log-in { from { background: rgba(74,255,0,.12); } to { background: transparent; } }
.dash-log-empty { color: #94a3b8; padding: 8px 2px; }
@media (max-width: 720px) {
  .dash-log-row { grid-template-columns: 5.4em 1fr; }
  .dash-log-row .what { grid-column: 1 / -1; white-space: normal; }
}

.job-card .actions form.inline { margin: 0 4px 0 0; }

.pill.live { background: #14532d; color: #bbf7d0; }
.track-day { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.track-tech { background: #0f172a; border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.track-tech .btn { font-size: 12px; padding: 4px 10px; }
.track-page { max-width: 520px; }
.track-name { font-size: 28px; color: #4aff00; margin: 0 0 8px; }
.track-card .track-status { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.track-https { color: #fde68a; margin: 0 0 8px; }
.track-job { display: flex; gap: 8px; align-items: center; margin: 6px 0; color: #e2e8f0; }
.track-meta { margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.track-page #track_open_maps {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; margin: 10px 0 0; font-weight: 700;
}
.live-page { max-width: 640px; }
.live-map { min-height: 320px; border-radius: 12px; border: 1px solid #334155; background: #0f172a; overflow: hidden; margin: 12px 0 0; }
.live-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
.live-eta { font-size: 22px; font-weight: 700; margin: 0 0 8px; color: #e2e8f0; }
.live-status { margin: 0 0 8px; }

body.tech-app { margin: 0; display: flex; flex-direction: column; min-height: 100vh; }
body.tech-app .side-slot, body.tech-app aside.side { display: none; }
body.tech-app .stage { padding: 12px 14px 28px; flex: 1; min-width: 0; }
.tech-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: #0b1220; border-bottom: 1px solid #1e293b;
  position: sticky; top: 0; z-index: 20;
}
.tech-mark { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: #0f172a; flex: 0 0 36px; }
.tech-who { font-weight: 700; color: #4aff00; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-bar .lang { display: flex; margin-left: 0; border: 1px solid #334155; border-radius: 999px; overflow: hidden; }
.tech-bar .lang button { background: transparent; color: #94a3b8; padding: 8px 12px; min-height: 44px; font-size: 12px; font-weight: 700; border: 0; border-radius: 0; }
.tech-bar .lang button.on { background: #2563eb; color: #fff; }
.tech-out { color: #94a3b8; text-decoration: none; font-weight: 700; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; }
.tech-out:hover { color: #e2e8f0; }
.m-jobs { max-width: 560px; margin: 0 auto; }
.m-day-row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.m-day-row label { flex: 1; min-width: 140px; }
.m-gps-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.m-job-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.m-cust { margin: 0 0 6px; font-size: 22px; color: #e2e8f0; }
.m-addr { margin: 0 0 12px; color: #94a3b8; font-size: 15px; }
.m-actions { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.m-actions form { margin: 0; }
.m-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.m-notes textarea { min-width: 0; width: 100%; min-height: 88px; }
.m-tap, .m-actions .btn, .m-actions button, .m-notes button, .m-day-row .btn, .m-gps button {
  min-height: 44px; width: 100%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; padding: 10px 14px; box-sizing: border-box;
}
.m-day-row .btn { width: auto; flex: 1; }
.pill.scheduled { background: #1e3a5f; color: #93c5fd; }
.pill.done { background: #14532d; color: #86efac; }
.pill.cancelled { background: #334155; color: #cbd5e1; }

.job-photos { display: flex; flex-direction: column; gap: 8px; }
.job-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.job-thumb { width: 88px; }
.job-thumb a { display: block; }
.job-thumb img {
  width: 88px; height: 88px; object-fit: cover; border-radius: 8px;
  display: block; background: #0f172a; border: 1px solid #334155;
}
.job-thumb form { margin: 4px 0 0; }
.job-thumb button { width: 100%; padding: 4px 6px; font-size: 11px; }
.job-photos input[type=file] { width: 100%; }
.m-jobs .job-thumb { width: 120px; }
.m-jobs .job-thumb img { width: 120px; height: 120px; }
.m-jobs .job-photos input[type=file],
.m-jobs .job-photos button.m-tap {
  min-height: 44px; width: 100%;
}
.m-photos h3 { margin: 8px 0 0; font-size: 14px; color: #93c5fd; }
