﻿:root {
  --bg: #eef6fa;
  --panel: #ffffff;
  --ink: #102436;
  --muted: #5b7386;
  --line: #b9d6e4;
  --line-soft: #d7eaf2;
  --blue: #075b8d;
  --blue-dark: #034a78;
  --blue-soft: #d8edf7;
  --brand-primary: #075b8d;
  --brand-secondary: #0b77aa;
  --brand-accent: #1f6feb;
  --brand-soft: #eef8fc;
  --brand-shadow: rgba(7, 91, 141, 0.16);
  --green: #15803d;
  --green-soft: #e8f7ee;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --amber: #b45309;
  --amber-soft: #fff7e6;
  --sidebar: #064f7f;
  --sidebar-soft: #0b6b9f;
  --sidebar-line: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 42px rgba(5, 48, 78, 0.14);
  --shadow-soft: 0 8px 22px rgba(5, 48, 78, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(7, 91, 141, 0.12), transparent 34vw),
    linear-gradient(180deg, #f7fbff 0, var(--bg) 420px),
    var(--bg);
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

body.login-active {
  display: block;
}

body.client-portal-active {
  display: block;
}

.connection-status-banner {
  background: #dcfce7;
  border-bottom: 1px solid #86efac;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
  left: 0;
  padding: 9px 14px;
  position: sticky;
  right: 0;
  text-align: center;
  top: 0;
  z-index: 1500;
}

.connection-status-banner.offline {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

[hidden] {
  display: none !important;
}

.login-view {
  background:
    radial-gradient(circle at 12% 12%, rgba(27, 138, 190, 0.34), transparent 28vw),
    radial-gradient(circle at 78% 22%, rgba(226, 29, 35, 0.14), transparent 22vw),
    linear-gradient(135deg, #042f4c 0%, #075b8d 44%, #eef8fc 44%, #f7fbff 100%);
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  padding: 30px;
  place-items: center;
  position: relative;
}

.login-view::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 34px),
    linear-gradient(30deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 38px);
  content: "";
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
  position: absolute;
}

.login-shell {
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 460px);
  max-width: 1120px;
  min-height: 640px;
  position: relative;
  width: min(100%, 1120px);
  z-index: 1;
}

.login-hero {
  background:
    linear-gradient(160deg, rgba(3, 74, 120, 0.94), rgba(2, 44, 70, 0.98)),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.18), transparent 26%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px 0 0 8px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.25);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px;
}

.login-hero-brand {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: flex-start;
}

.login-hero-brand .brand-logo {
  background: transparent;
  border-radius: 8px;
  box-shadow: none;
  max-height: 96px;
  object-fit: contain;
  padding: 0;
  width: min(420px, 86vw);
}

.login-logo {
  background: transparent;
  border-radius: 8px;
  display: block !important;
  max-height: 92px;
  object-fit: contain;
  padding: 0;
  width: min(360px, 82vw);
}

.login-hero-brand span,
.login-hero p {
  color: #cde8f6;
}

.login-hero h1 {
  color: #fff;
  font-size: 42px;
  line-height: 1.08;
  margin: 16px 0;
  max-width: 620px;
}

.login-hero p {
  font-size: 16px;
  line-height: 1.7;
  max-width: 560px;
}

.login-hero .eyebrow {
  color: #9ed8f3;
}

.login-hero-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.login-hero-stats article {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 14px;
}

.login-hero-stats strong {
  color: #fff;
  display: block;
  font-size: 22px;
}

.login-hero-stats span {
  color: #bddff0;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.login-form-stack {
  align-items: center;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.18);
  display: grid;
  padding: 42px;
}

.login-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d8e9f4;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  padding: 34px;
  width: 100%;
}

.login-card h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--muted);
  margin-bottom: 24px;
}

.login-brand {
  justify-content: center;
  margin-bottom: 26px;
}

.login-brand span {
  color: var(--muted);
}

.login-company-brand {
  align-items: center;
  background: var(--brand-soft);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  margin: -10px 0 22px;
  padding: 12px;
}

.login-company-logo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--blue-dark);
  display: flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  min-width: 88px;
  padding: 6px 8px;
}

.login-company-logo img {
  display: block;
  max-height: 44px;
  max-width: 118px;
  object-fit: contain;
}

.login-company-brand strong {
  color: var(--ink);
  font-size: 15px;
}

.sidebar {
  background:
    linear-gradient(180deg, #043d62 0%, #064f7f 48%, #023b61 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 34px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand-logo {
  width: 132px;
  max-height: 42px;
  object-fit: contain;
  display: block;
}

.sidebar .brand {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  flex-direction: row;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
}

.sidebar .brand-logo {
  width: 176px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  padding: 8px 9px;
}

.sidebar-company-brand {
  color: #fff;
}

.sidebar-company-brand strong,
.sidebar-company-brand span {
  display: block;
}

.sidebar-company-brand strong {
  font-size: 15px;
  line-height: 1.2;
}

.sidebar-company-brand span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-top: 4px;
  text-transform: uppercase;
}

.sidebar-company-logo {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  color: var(--blue-dark);
  display: flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 62px;
  min-width: 96px;
  padding: 8px 10px;
  width: 118px;
}

.sidebar-company-logo img {
  display: block;
  max-height: 56px;
  max-width: 100%;
  object-fit: contain;
}

.sidebar-serviceops-logo {
  display: block;
  flex: 0 0 auto;
  max-height: 74px;
  max-width: 230px;
  object-fit: contain;
  width: min(230px, 100%);
}

.sidebar-company-logo span,
.sidebar-company-logo small {
  display: block;
  text-align: center;
}

.sidebar-company-logo small {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-left: 6px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1 1 auto;
}

.sidebar-platform-brand {
  border-top: 1px solid var(--sidebar-line);
  margin-top: auto;
  padding-top: 14px;
}

.sidebar-platform-brand span {
  color: rgba(255, 255, 255, 0.62);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.sidebar-platform-brand img {
  background: transparent;
  border-radius: 8px;
  display: block;
  max-height: 54px;
  max-width: 190px;
  object-fit: contain;
  padding: 0;
}

.sidebar-tools {
  border-bottom: 1px solid var(--sidebar-line);
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.sidebar-tools label {
  display: grid;
  gap: 6px;
}

.sidebar-tools span {
  color: #8ea0b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-tools input {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  min-height: 38px;
}

.sidebar-tools input::placeholder {
  color: #94a3b8;
}

.login-card .brand-logo {
  width: min(340px, 76vw);
  max-height: 88px;
}

.login-card .login-logo {
  margin: 0 auto;
  max-height: 88px;
  width: min(340px, 76vw);
}

.client-portal {
  display: grid;
  gap: 18px;
  grid-template-columns: 260px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1480px;
  padding: 24px;
}

.client-portal-header {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(6, 79, 127, 0.98), rgba(11, 119, 170, 0.9)),
    var(--sidebar);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 18px;
  grid-column: 1 / -1;
  justify-content: space-between;
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
}

.client-portal-header .brand {
  margin-bottom: 0;
}

.client-portal-header .brand-logo {
  max-height: 72px;
  max-width: 260px;
  width: min(260px, 45vw);
}

.client-portal-session {
  display: grid;
  gap: 4px;
  margin-right: auto;
}

.client-portal-session span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.client-portal-main {
  align-content: start;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.client-portal-sidebar {
  align-self: start;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 230, 240, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
  padding: 16px;
  position: sticky;
  top: 18px;
}

.client-portal-sidebar-card {
  background: #f5fbff;
  border: 1px solid #d9edf8;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.client-portal-sidebar-card span,
.client-portal-sidebar-card small {
  color: var(--muted);
}

.client-portal-nav {
  display: grid;
  gap: 8px;
}

.client-portal-nav a {
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  padding: 11px 12px;
  text-decoration: none;
}

.client-portal-nav a:hover,
.client-portal-nav a.active {
  background: #e8f4fb;
  color: var(--blue);
}

.client-portal-alerts {
  display: grid;
  gap: 10px;
}

.client-portal-alert-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 4px;
  padding: 12px;
  text-decoration: none;
}

.client-portal-alert-card span,
.client-portal-alert-card small {
  color: var(--muted);
}

.client-portal-alert-card strong {
  font-size: 18px;
}

.client-portal-alert-card.ok {
  border-left-color: #1f9d68;
}

.client-portal-alert-card.warning {
  border-left-color: #d89400;
}

.client-portal-alert-card.danger {
  border-left-color: #c24141;
}

.client-portal-hero {
  align-self: start;
  background:
    linear-gradient(135deg, rgba(6, 79, 127, 0.96), rgba(11, 119, 170, 0.88)),
    var(--sidebar);
  border: 0;
  border-radius: 8px;
  color: #fff;
  margin-bottom: 18px;
  min-height: 0;
  padding: 22px;
}

.client-portal-hero .technician-toolbar {
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.client-portal-hero .inline-filter {
  color: rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 4px;
}

.client-portal-hero .inline-filter input {
  min-width: 128px;
  padding: 9px 10px;
}

.client-portal-hero .technician-toolbar button {
  min-height: 38px;
  padding: 9px 12px;
}

.client-portal-hero h1 {
  margin-bottom: 8px;
}

.client-portal-hero p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 720px;
}

.client-portal-hero .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.client-portal-main .summary-grid {
  margin: 0;
}

.client-overview-kpis {
  gap: 12px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.client-overview-kpi {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(205, 224, 237, 0.95);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 14px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.client-overview-kpi:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 26px rgba(15, 70, 110, 0.14);
  transform: translateY(-1px);
}

.client-overview-kpi span,
.client-overview-kpi small {
  color: var(--muted);
}

.client-overview-kpi span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.client-overview-kpi strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  margin: 0;
}

.client-request-card {
  align-items: start;
  gap: 14px;
}

.client-request-card.expanded {
  border-color: #b9dff2;
  box-shadow: 0 12px 28px rgba(15, 70, 110, 0.12);
}

.client-request-detail {
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  padding-top: 12px;
  width: 100%;
}

.client-request-detail article {
  background: #f8fcff;
  border: 1px solid #d9edf8;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.client-request-detail article button {
  justify-self: start;
}

.client-portal-main .table-panel {
  margin: 0;
}

.location-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.location-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 10px;
  padding: 14px;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.location-card.active,
.location-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.location-card strong,
.location-card span,
.location-card small {
  display: block;
}

.location-card span,
.location-card small {
  color: var(--muted);
}

.location-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.location-card-meta > span:not(.status-pill) {
  background: #f1f5f9;
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  padding: 5px 8px;
}

.chip-picker,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.capability-chip,
.capability-pill {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  padding: 7px 10px;
}

.capability-chip {
  cursor: pointer;
}

.capability-chip.selected,
.capability-pill {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--blue-dark);
  font-weight: 700;
}

.crew-detail-panel {
  display: grid;
  gap: 14px;
}

.crew-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crew-detail-card,
.crew-detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.crew-detail-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.crew-detail-card strong,
.crew-detail-card small {
  display: block;
}

.crew-detail-card small {
  color: var(--muted);
  margin-top: 4px;
}

.crew-detail-section {
  display: grid;
  gap: 8px;
}

.crew-detail-section h4 {
  margin: 0;
}

.technician-scope-list {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 8px;
  padding: 9px 10px;
}

.technician-scope-list strong {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}

.technician-scope-list ul {
  margin: 0;
  padding-left: 18px;
}

.technician-scope-list li {
  color: var(--ink);
  font-size: 13px;
  margin: 3px 0;
}

.summary-filter {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
  min-height: 86px;
  padding: 18px;
  text-align: left;
}

.summary-filter span,
.summary-filter strong {
  display: block;
}

.summary-filter strong {
  color: var(--ink);
  font-size: 28px;
  margin-top: 8px;
}

.summary-filter.active,
.summary-filter:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.brand span,
.eyebrow,
.summary-grid span,
.plan-card p,
.two-column p {
  color: var(--muted);
}

.brand span {
  color: #aab4c5;
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

nav {
  display: grid;
  gap: 9px;
}

.nav-group {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  display: grid;
  gap: 3px;
  padding: 9px;
}

.nav-group > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0 7px 5px;
  text-transform: uppercase;
}

nav a {
  color: #e2f3fb;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

nav a[hidden],
.nav-group[hidden] {
  display: none !important;
}

nav a.active,
nav a:hover {
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue-dark);
}

nav a.active {
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.12);
}

nav a:hover {
  transform: translateX(2px);
}

.app {
  min-width: 0;
  padding: 24px 30px 44px;
}

.mobile-menu-toggle {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.install-app-button {
  background: #fff;
  color: var(--blue);
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-company-logo {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: var(--blue-dark);
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  min-width: 76px;
  padding: 6px 8px;
}

.topbar-company-logo img {
  display: block;
  height: auto;
  max-height: 40px;
  max-width: 124px;
  object-fit: contain;
  width: auto;
}

.plan-status-button {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 9px 12px;
  text-align: left;
}

.plan-status-button span,
.plan-status-button small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.plan-status-button strong {
  color: #fff;
  font-size: 14px;
}

.session-summary {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 180px;
  padding: 9px 11px;
  text-align: right;
}

.session-summary strong {
  color: #fff;
  font-size: 14px;
}

.session-summary span,
.session-summary small,
.topbar-actions span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.session-summary small {
  font-size: 12px;
}

.topbar,
.section-heading,
.two-column {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.topbar {
  background:
    linear-gradient(135deg, #075b8d, #0b77aa);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
  padding: 22px 24px;
  color: #fff;
}

.topbar h1 {
  font-size: 24px;
}

.topbar .eyebrow,
.topbar p,
.topbar span,
.topbar small {
  color: rgba(255, 255, 255, 0.78);
}

.topbar .session-summary {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.topbar .session-summary strong {
  color: #fff;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 30px;
  margin-bottom: 0;
  line-height: 1.15;
}

h2 {
  font-size: 24px;
  margin-bottom: 6px;
  line-height: 1.2;
}

h3 {
  line-height: 1.25;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

button {
  border: 1px solid #b9d6e4;
  background: #f8fcff;
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 38px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

button.primary {
  background: linear-gradient(135deg, var(--blue), #0b77aa);
  border-color: transparent;
  color: #fff;
}

button.primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

button.danger-button {
  border-color: #fecaca;
  color: #b91c1c;
}

button.danger-button:hover {
  border-color: #dc2626;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31, 111, 235, 0.16);
  outline-offset: 2px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.api-notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  margin: 18px 0 0;
  padding: 12px 14px;
}

.summary-grid article,
.section-panel,
.plan-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
}

.summary-grid article {
  padding: 18px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
}

.summary-grid article::before {
  background: var(--blue);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 4px;
}

.summary-grid .kpi-chart-card::before {
  display: none;
}

.summary-grid strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
}

.kpi-chart-grid {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.kpi-chart-card {
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f5fbff 100%);
  border: 1px solid #d8e9f4;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 132px;
  padding: 16px;
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.analytics-panel .kpi-chart-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 252, 0.98));
  border-color: #cfe5f1;
  box-shadow: 0 16px 34px var(--brand-shadow);
  min-height: 146px;
}

.analytics-panel .kpi-chart-card::after {
  background: linear-gradient(180deg, var(--brand-shadow), transparent);
  content: "";
  inset: 0 0 auto;
  height: 3px;
  position: absolute;
}

.kpi-chart-card:hover,
.kpi-chart-card:focus {
  border-color: var(--blue);
  box-shadow: 0 18px 36px rgba(15, 80, 119, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.kpi-chart-visual {
  display: grid;
  place-items: center;
  position: relative;
}

.kpi-chart-visual strong {
  color: var(--ink);
  font-size: 20px;
  left: 50%;
  margin: 0;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.kpi-ring {
  height: 86px;
  transform: rotate(-90deg);
  width: 86px;
}

.kpi-ring-bg,
.kpi-ring-value {
  fill: none;
  stroke-width: 5;
}

.kpi-ring-bg {
  stroke: #e5eef5;
}

.kpi-ring-value {
  stroke: var(--blue);
  stroke-linecap: round;
  transition: stroke-dasharray 0.25s ease;
}

.kpi-chart-card.green .kpi-ring-value,
.kpi-chart-card.green .kpi-progress i {
  stroke: #16a34a;
  background: #16a34a;
}

.kpi-chart-card.orange .kpi-ring-value,
.kpi-chart-card.orange .kpi-progress i {
  stroke: #f97316;
  background: #f97316;
}

.kpi-chart-card.red .kpi-ring-value,
.kpi-chart-card.red .kpi-progress i {
  stroke: #dc2626;
  background: #dc2626;
}

.kpi-chart-card.purple .kpi-ring-value,
.kpi-chart-card.purple .kpi-progress i {
  stroke: #7c3aed;
  background: #7c3aed;
}

.kpi-chart-card.slate .kpi-ring-value,
.kpi-chart-card.slate .kpi-progress i {
  stroke: #475569;
  background: #475569;
}

.kpi-chart-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.kpi-chart-copy span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.kpi-chart-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.kpi-progress {
  background: #e5eef5;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.kpi-progress i {
  background: var(--blue);
  display: block;
  height: 100%;
}

.dashboard-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.analytics-panel .dashboard-card,
.analytics-panel .table-panel {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #dbeaf2;
  box-shadow: 0 14px 30px rgba(15, 80, 119, 0.08);
  overflow: hidden;
}

.analytics-panel .dashboard-card {
  padding: 18px;
}

.analytics-panel .dashboard-card > .section-heading:first-child,
.analytics-panel .table-panel > .section-heading:first-child {
  background: #f5fbff;
  border-bottom: 1px solid #dbeaf2;
  margin: -18px -18px 16px;
  padding: 16px 18px;
}

.analytics-panel .table-panel > .section-heading:first-child {
  margin: -24px -24px 18px;
  padding: 18px 24px;
}

.analytics-panel .dashboard-card h3,
.analytics-panel .table-panel h3 {
  margin-bottom: 0;
}

.analytics-panel .evidence-item {
  background: #fbfdff;
  border-color: #dbeaf2;
}

.analytics-panel .evidence-item:hover {
  border-color: #9bcbe3;
  box-shadow: 0 12px 24px rgba(7, 91, 141, 0.1);
}

.reports-panel > .table-panel:first-of-type {
  background: #f8fcff;
  border-color: #cfe5f1;
}

.reports-panel > .table-panel:first-of-type .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.reports-panel > .table-panel:first-of-type label {
  background: #fff;
  border: 1px solid #dbeaf2;
  border-radius: 8px;
  padding: 10px;
}

.reports-panel > .table-panel:first-of-type input,
.reports-panel > .table-panel:first-of-type select {
  background: #f8fcff;
}

.reports-insights-stack {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.reports-insights-stack > .table-panel {
  width: 100%;
}

.reports-insights-stack #reports-center-kpis {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.reports-insights-stack #reports-center-alerts {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.platform-dashboard-panel .kpi-chart-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.platform-metric-item {
  border-left: 4px solid var(--brand-primary);
}

.platform-metric-item.green {
  border-left-color: #16a34a;
}

.platform-metric-item.orange {
  border-left-color: #f97316;
}

.platform-metric-item.red {
  border-left-color: #dc2626;
}

.platform-metric-item span {
  color: var(--brand-primary);
  font-size: 24px;
  font-weight: 800;
}

.dashboard-item span {
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
}

.small-link {
  background: #f8fcff;
  border: 1px solid #b9d6e4;
  border-radius: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  text-decoration: none;
}

.section-panel {
  padding: 28px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}

.analytics-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 253, 0.96));
  border-color: #d7e8f2;
  overflow: hidden;
}

.analytics-panel > .section-heading:first-child {
  background:
    linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)),
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.24), transparent 28%);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 16px 32px var(--brand-shadow);
  color: #fff;
  margin: -6px -6px 24px;
  padding: 22px;
}

.analytics-panel > .section-heading:first-child .eyebrow,
.analytics-panel > .section-heading:first-child p {
  color: rgba(255, 255, 255, 0.78);
}

.analytics-panel > .section-heading:first-child h2 {
  color: #fff;
}

.analytics-panel > .section-heading:first-child button {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.section-panel > .section-heading:first-child {
  background:
    linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)),
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.22), transparent 28%);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 16px 32px var(--brand-shadow);
  color: #fff;
  margin: -6px -6px 24px;
  padding: 22px;
}

.section-panel > .section-heading:first-child .eyebrow,
.section-panel > .section-heading:first-child p {
  color: rgba(255, 255, 255, 0.78);
}

.section-panel > .section-heading:first-child h2 {
  color: #fff;
}

.section-panel > .section-heading:first-child button {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.section-panel > .section-heading:first-child button:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.46);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.plan-card {
  padding: 18px;
  box-shadow: none;
}

.plan-card.highlighted {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
}

.plan-card strong {
  display: block;
  font-size: 24px;
  margin: 14px 0;
}

.plan-card ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.plan-card-header,
.compact {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.status-pill {
  background: #eef2ff;
  border-radius: 999px;
  color: var(--blue-dark);
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  text-transform: capitalize;
}

.status-pill.completed,
.status-pill.paid,
.status-pill.posted,
.status-pill.success {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.scheduled,
.status-pill.sent,
.status-pill.draft,
.status-pill.trial {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.status-pill.missed,
.status-pill.cancelled,
.status-pill.void,
.status-pill.failed,
.status-pill.suspended,
.status-pill.overdue {
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.in_progress,
.status-pill.pending,
.status-pill.partially_paid,
.status-pill.under_review,
.status-pill.estimate_required,
.status-pill.estimate_sent {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.inactive {
  background: #f1f5f9;
  color: #64748b;
}

.status-pill.expired {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.expires_today,
.status-pill.expiring_soon {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.active {
  background: #dcfce7;
  color: #166534;
}

.status-pill.no_expiration {
  background: #f1f5f9;
  color: #475569;
}

.status-pill.neutral {
  background: #f1f5f9;
  color: #475569;
}

.status-pill.warning {
  background: #fef3c7;
  color: #92400e;
}

.management-grid {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(440px, 560px) minmax(0, 1fr);
  margin-top: 24px;
}

.crm-management-grid {
  align-items: start;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
}

.editor-panel,
.table-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(215, 234, 242, 0.95);
  border-radius: 8px;
  min-width: 0;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(5, 48, 78, 0.07);
}

.management-grid > .table-panel {
  overflow-x: auto;
}

.management-grid > .editor-panel {
  align-self: start;
  overflow: visible;
}

.management-grid.editor-modal-enabled > .editor-panel {
  display: none;
}

.management-grid.editor-modal-enabled {
  grid-template-columns: minmax(0, 1fr);
}

.management-grid.editor-modal-enabled > .table-panel {
  width: 100%;
}

.import-center-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.import-preview-panel .table-scroll {
  max-height: 560px;
  overflow: auto;
}

.import-preview-panel table {
  min-width: 760px;
}

.editor-launch-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 18px 0 -6px;
}

.editor-launch-button {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
}

.editor-launch-button::before {
  content: "+";
  font-size: 18px;
  line-height: 1;
}

.editor-launch-bar-in-modal {
  justify-content: flex-start;
  margin: 0;
}

.editor-placeholder {
  display: none;
}

.editor-panel {
  display: grid;
  gap: 18px;
}

.conversion-panel {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.editor-panel label {
  color: var(--ink);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

input,
select,
textarea {
  background: #fbfdff;
  border: 1px solid #b9d6e4;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  background: #fff;
  outline: 3px solid rgba(7, 91, 141, 0.14);
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.form-grid.two-fields {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.form-grid.three-fields {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.branding-preview {
  align-items: center;
  background: linear-gradient(135deg, #075b8d, #0b77aa);
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 16px;
  min-height: 128px;
  padding: 18px;
}

.branding-preview-logo {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  font-weight: 800;
  height: 72px;
  justify-content: center;
  min-width: 120px;
  overflow: hidden;
  padding: 10px;
}

.branding-preview-logo img {
  max-height: 58px;
  max-width: 100%;
  object-fit: contain;
}

.branding-preview strong,
.branding-preview span {
  display: block;
}

.branding-preview span {
  color: rgba(255, 255, 255, 0.82);
  margin-top: 6px;
}

.inline-filter {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

.inline-filter input {
  min-width: 150px;
}

.inline-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.inline-summary span {
  align-items: center;
  background: #f4f9fc;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  padding: 7px 11px;
}

.inline-summary strong {
  color: var(--primary-dark);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.form-message {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  min-height: 18px;
}

.form-hint {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  padding: 10px 12px;
}

.form-message.success {
  color: var(--green);
}

.form-message.error {
  color: #b91c1c;
}

.status-pill.evidence-complete {
  background: #dcfce7;
  color: #166534;
}

.status-pill.evidence-incomplete,
.status-pill.evidence-missing {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.evidence-partial,
.status-pill.evidence-not_required_yet {
  background: #fef3c7;
  color: #92400e;
}

.table-scroll {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow-x: auto;
}

.analytics-panel .table-scroll {
  border: 1px solid #dbeaf2;
  border-radius: 8px;
  overflow: auto;
}

.analytics-panel .table-scroll table {
  margin-top: 0;
}

.analytics-panel .table-scroll th {
  background: #e8f5fb;
  border-bottom: 1px solid #cfe5f1;
  color: #34566f;
  position: sticky;
  top: 0;
  z-index: 1;
}

.analytics-panel .table-scroll td {
  background: #fff;
}

.analytics-panel .table-scroll tbody tr:nth-child(even) td {
  background: #f7fcff;
}

.analytics-panel .table-scroll tbody tr:hover td {
  background: #eef9fd;
}

td small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
  max-width: 320px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-actions button[disabled],
.section-heading-actions button[disabled],
.technician-toolbar button[disabled] {
  display: none;
}

.document-alert-legend {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbeaf2;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 16px;
  padding: 10px 12px;
}

.document-alert-legend span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
}

.document-alert-dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.document-alert-dot.ok {
  background: #16a34a;
}

.document-alert-dot.warning {
  background: #f59e0b;
}

.document-alert-dot.danger {
  background: #dc2626;
}

button.document-alert-button.ok {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

button.document-alert-button.warning {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}

button.document-alert-button.danger {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

.document-alert-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
  padding: 4px 8px;
}

.document-alert-badge.ok {
  background: #dcfce7;
  color: #166534;
}

.document-alert-badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.document-alert-badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.table-number-input {
  display: inline-block;
  margin-right: 8px;
  max-width: 72px;
  padding: 8px;
}

.evidence-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.evidence-gallery {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.pending-evidence-gallery {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.evidence-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.evidence-item:hover {
  border-color: #c5d1e2;
  box-shadow: var(--shadow-soft);
}

.evidence-card {
  align-items: stretch;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.evidence-card-body {
  min-width: 0;
}

.evidence-card-body strong,
.evidence-card-body span,
.evidence-card-body small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-thumb-button {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  min-height: 150px;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.evidence-thumb {
  aspect-ratio: 4 / 3;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.evidence-file-fallback {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-weight: 800;
  height: 100%;
  justify-content: center;
}

.hidden-file-input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.file-picker-button {
  justify-content: center;
  margin-top: 6px;
  width: 100%;
}

.photo-gallery-modal-panel {
  max-width: min(920px, calc(100vw - 24px));
}

.photo-gallery-viewer {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.photo-gallery-viewer figure {
  display: grid;
  gap: 10px;
  margin: 0;
  min-width: 0;
}

.photo-gallery-viewer img {
  background: #0f172a;
  border-radius: 8px;
  max-height: 72vh;
  object-fit: contain;
  width: 100%;
}

.photo-gallery-viewer figcaption {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: center;
}

.photo-gallery-viewer figcaption strong,
.photo-gallery-viewer figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-gallery-viewer > button {
  border-radius: 999px;
  font-size: 26px;
  height: 46px;
  justify-content: center;
  padding: 0;
  width: 46px;
}

.evidence-item strong,
.evidence-item span,
.evidence-item small {
  display: block;
  min-width: 0;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.compact-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.compact-list li {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.map-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 20px 0;
  padding: 18px;
  position: relative;
  z-index: 20;
}

.route-map-frame {
  background: #eef6fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  height: min(62vh, 560px);
  min-height: 420px;
  position: relative;
  width: 100%;
  z-index: 21;
}

.report-location-map {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  margin-top: 10px;
  max-height: 420px;
  object-fit: cover;
  width: 100%;
}

.report-location-map-frame {
  min-height: 360px;
}

.location-map-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.location-area-map {
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 360px;
  overflow: hidden;
  width: 100%;
}

.modal-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(3px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow: auto;
  padding: 18px;
  width: min(100%, 960px);
}

.map-modal-panel {
  width: min(100%, 1100px);
}

.invoice-email-modal-panel {
  width: min(100%, 760px);
}

.client-portal-invoice-modal-panel {
  width: min(100%, 980px);
}

.client-portal-evidence-modal-panel {
  width: min(100%, 1120px);
}

.client-portal-service-modal-panel {
  width: min(100%, 920px);
}

.client-portal-location-modal-panel {
  width: min(100%, 1040px);
}

.client-portal-evidence-modal-panel .evidence-gallery {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.client-location-snapshot-card {
  cursor: pointer;
}

.client-location-snapshot-card:focus,
.client-location-snapshot-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-soft);
  outline: none;
}

.interactive-row {
  cursor: pointer;
}

.interactive-row:hover td {
  background: #f8fbff;
}

.client-service-detail-popup {
  display: grid;
  gap: 14px;
}

.client-location-snapshot-actions,
.client-location-snapshot-header-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-location-snapshot-detail {
  display: grid;
  gap: 14px;
}

.client-location-snapshot-header {
  align-items: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.client-location-snapshot-header strong,
.client-location-snapshot-header span,
.client-location-snapshot-header small {
  color: #fff;
  display: block;
}

.client-location-snapshot-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-location-map-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.client-location-map-card h4 {
  margin: 0 0 4px;
}

.client-location-map-view {
  background: #eef6fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 360px;
  overflow: hidden;
  width: 100%;
}

.client-location-snapshot-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.client-location-snapshot-grid h4 {
  margin: 0 0 8px;
}

.client-location-snapshot-grid p {
  color: var(--muted);
  margin: 0 0 12px;
}

.link-row {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.link-row:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-soft);
}

.link-row small {
  color: var(--muted);
}

.client-invoice-preview {
  align-items: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.client-invoice-brand {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.client-invoice-logo {
  background: #fff;
  border-radius: 8px;
  display: block;
  max-height: 62px;
  max-width: 210px;
  object-fit: contain;
  padding: 7px 9px;
}

.client-invoice-logo-fallback {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: var(--brand-primary);
  display: inline-flex;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  min-width: 82px;
  padding: 0 12px;
}

.client-invoice-logo-fallback[hidden] {
  display: none;
}

.client-invoice-brand div,
.client-invoice-meta {
  display: grid;
  gap: 4px;
}

.client-invoice-brand strong,
.client-invoice-brand span,
.client-invoice-meta strong {
  color: #fff;
}

.client-invoice-meta {
  justify-items: end;
  text-align: right;
}

.client-invoice-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.client-invoice-summary-grid article,
.client-invoice-total-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.client-invoice-summary-grid span,
.client-invoice-summary-grid small {
  color: var(--muted);
  display: block;
}

.client-invoice-summary-grid span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-invoice-lines {
  overflow-x: auto;
}

.client-invoice-lines table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.client-invoice-lines th,
.client-invoice-lines td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.client-invoice-lines th {
  background: var(--blue-soft);
  color: #34566f;
  font-size: 12px;
  text-transform: uppercase;
}

.client-invoice-total-box {
  justify-self: end;
  max-width: 360px;
  width: 100%;
}

.client-invoice-total-box div {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
}

.client-invoice-total-box .balance {
  border-top: 2px solid var(--brand-primary);
  font-size: 18px;
  font-weight: 800;
}

.editor-modal-panel {
  width: min(100%, 1240px);
}

.module-print-modal-panel {
  width: min(100%, 1180px);
}

.module-print-content {
  color: #0f2540;
  font-size: 12px;
}

.module-print-content .print-header {
  align-items: center;
  border-bottom: 2px solid #0b6fae;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
}

.module-print-content .print-brand {
  align-items: center;
  display: flex;
  gap: 14px;
}

.module-print-content .print-logo {
  max-height: 54px;
  max-width: 180px;
  object-fit: contain;
}

.module-print-content table {
  border-collapse: collapse;
  margin: 14px 0 22px;
  width: 100%;
}

.module-print-content th,
.module-print-content td {
  border-bottom: 1px solid #d8e7f1;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.module-print-content th {
  background: #d9edf8;
  color: #31526f;
  font-size: 11px;
  text-transform: uppercase;
}

#editor-modal-body {
  display: grid;
  gap: 18px;
}

.editor-modal-panel .editor-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.editor-modal-panel .editor-panel[hidden] {
  display: none;
}

.editor-modal-panel .table-panel {
  box-shadow: none;
  padding: 18px;
}

#customers .management-grid > .customer-support-panel {
  display: none;
}

.editor-modal-panel .customer-support-panel {
  display: block;
}

#location-map-modal,
#technician-stop-modal,
#technician-signature-modal,
#invoice-email-modal,
#plan-upgrade-modal,
#help-modal {
  z-index: 1200;
}

.plan-upgrade-modal-panel,
.help-modal-panel {
  width: min(100%, 760px);
}

.plan-upgrade-body,
.help-grid {
  display: grid;
  gap: 14px;
}

.help-install-card {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.help-install-card div {
  display: grid;
  gap: 4px;
}

.help-install-card .install-app-button {
  background: var(--blue);
  color: #fff;
  flex: 0 0 auto;
}

.help-install-card .install-app-button[hidden] {
  display: none !important;
}

.month-range-filter input {
  min-width: 160px;
}

.month-range-original {
  transition: opacity 0.16s ease;
}

.plan-upgrade-current,
.plan-upgrade-option,
.help-grid article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.plan-upgrade-option {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.button-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-size: 14px;
  min-height: 38px;
  padding: 9px 12px;
  text-decoration: none;
}

.button-link.disabled {
  color: var(--muted);
  pointer-events: none;
}

.link-button {
  background: transparent;
  border: 0;
  color: #0f4c81;
  font: inherit;
  min-height: 0;
  padding: 0;
  text-align: left;
  text-decoration: underline;
}

.link-button:hover {
  background: transparent;
  color: #0b355b;
}

.inline-field {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-right: 8px;
  min-width: 220px;
}

.route-map-addresses {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.route-map-addresses a {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 10px;
  text-decoration: none;
}

.route-map-addresses strong,
.route-map-addresses span {
  display: block;
}

.route-map-addresses span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.technician-toolbar {
  align-items: end;
  display: flex;
  gap: 10px;
}

.section-heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.module-export-print-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.module-export-print-actions button {
  white-space: nowrap;
}

.technician-route-list {
  display: grid;
  gap: 16px;
}

.offline-queue-panel {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 5px solid #f59e0b;
  border-radius: 8px;
  color: #92400e;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.offline-queue-panel.syncing {
  background: #e8f4fb;
  border-color: #9bcbe3;
  border-left-color: var(--blue);
  color: var(--blue-dark);
}

.offline-queue-panel strong,
.offline-queue-panel span {
  display: block;
}

.offline-queue-panel span {
  color: #92400e;
  font-size: 13px;
  margin-top: 3px;
}

.offline-queue-panel.syncing span {
  color: var(--blue-dark);
}

.technician-route-card,
.technician-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.technician-route-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.technician-route-header h3 {
  margin: 0 0 6px;
}

.technician-route-header span,
.technician-empty span {
  color: var(--muted);
}

.technician-route-count {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 96px;
  padding: 10px;
  text-align: center;
}

.technician-route-count strong,
.technician-route-count span {
  display: block;
}

.technician-route-summary,
.technician-signature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.technician-route-summary small,
.technician-signature-list small {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 5px 8px;
}

.technician-progress {
  background: #e2edf5;
  border-radius: 999px;
  height: 9px;
  margin: -2px 0 12px;
  overflow: hidden;
}

.technician-progress span {
  background: linear-gradient(90deg, #0b77aa, #1f9d68);
  display: block;
  height: 100%;
}

.technician-next-stop {
  background: #f0f9ff;
  border: 1px solid #b7dff2;
  border-left: 5px solid var(--blue);
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.technician-next-stop span,
.technician-next-stop small {
  color: var(--muted);
}

.technician-next-stop strong {
  color: var(--ink);
}

.signature-list-detailed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.technician-signature-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.technician-signature-card span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.technician-signature-card strong,
.technician-signature-card small {
  display: block;
}

.technician-signature-card small {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.technician-stop-list {
  display: grid;
  gap: 10px;
}

.technician-stop-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.technician-stop-card.completed {
  border-left: 5px solid #1f9d68;
}

.technician-stop-card.arrived,
.technician-stop-card.in_progress {
  border-left: 5px solid var(--blue);
}

.technician-stop-card.missed,
.technician-stop-card.skipped {
  border-left: 5px solid #c24141;
}

.technician-stop-card.evidence-needed.completed {
  background: #fff7ed;
}

.technician-stop-card:focus-within,
.technician-stop-card:hover {
  border-color: var(--blue);
}

.technician-stop-main {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.technician-stop-main strong,
.technician-stop-main span,
.technician-stop-main small {
  display: block;
}

.technician-stop-main small {
  color: var(--muted);
  margin-top: 4px;
}

.technician-stop-number {
  background: #eef2ff;
  border-radius: 8px;
  color: var(--blue-dark);
  font-weight: 800;
  min-width: 42px;
  padding: 9px 8px;
  text-align: center;
}

.technician-stop-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.technician-stop-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.technician-stop-modal-panel {
  width: min(100%, 760px);
}

.technician-signature-modal-panel {
  width: min(100%, 560px);
}

.technician-signature-form {
  display: grid;
  gap: 12px;
}

.technician-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.technician-detail-card,
.technician-detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.technician-detail-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.technician-detail-card strong,
.technician-detail-card small {
  display: block;
}

.technician-detail-card small,
.technician-detail-section p {
  color: var(--muted);
}

.technician-detail-section {
  margin-bottom: 12px;
}

.technician-detail-section h4 {
  margin: 0 0 8px;
}

.technician-detail-actions {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.technician-detail-actions button {
  min-height: 44px;
}

.technician-evidence-gallery {
  display: grid;
  gap: 12px;
}

.technician-evidence-group {
  display: grid;
  gap: 8px;
}

.technician-evidence-group > strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.technician-evidence-items {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permission-list {
  display: grid;
  gap: 10px;
  min-width: 300px;
}

.permission-group-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.permission-group-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.permission-group-card strong,
.permission-group-card span {
  display: block;
}

.permission-group-card span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.checkbox-line {
  align-items: center;
  display: flex !important;
  flex-direction: row;
  font-weight: 600 !important;
  gap: 9px !important;
}

.checkbox-line input {
  width: auto;
}

.compact-checkbox {
  font-size: 13px;
  margin: 0;
  white-space: nowrap;
}

.role-permissions-list,
.checkbox-list {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.role-permissions-list fieldset,
.checkbox-list label {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
}

.role-permissions-list legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 5px;
  text-transform: uppercase;
}

.permission-list label,
.role-grid span,
.steps div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.role-grid small {
  color: var(--muted);
  display: block;
  margin-top: 5px;
}

.role-grid,
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.steps .done {
  border-color: #86efac;
  color: var(--green);
  background: #f0fdf4;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 10px;
  vertical-align: top;
}

th {
  background: #edf7fc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 12px 10px;
  position: sticky;
  top: 0;
  z-index: 1;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #eef9fd;
}

tbody tr:nth-child(even) {
  background: #f8fcff;
}

.table-scroll table {
  min-width: 760px;
}

.table-panel > .section-heading:first-child {
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.group-row td {
  background: #f8fafc;
  color: var(--ink);
}

.analytics-panel.section-panel > .section-heading:first-child {
  border: 0;
  margin: -6px -6px 24px;
  padding: 22px;
}

.analytics-panel .table-panel > .section-heading:first-child {
  margin: -24px -24px 18px;
  padding: 18px 24px;
}

.analytics-panel .dashboard-card > .section-heading:first-child {
  margin: -18px -18px 16px;
  padding: 16px 18px;
}

code {
  background: #f1f5f9;
  border-radius: 6px;
  color: #334155;
  font-size: 12px;
  padding: 4px 6px;
}

@media (max-width: 1440px) {
  .client-portal {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .management-grid,
  .crm-management-grid {
    grid-template-columns: 1fr;
  }

  .management-grid > .editor-panel {
    max-width: 860px;
  }

  .management-grid > .table-panel {
    width: 100%;
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-bottom: 92px;
  }

  .login-view {
    background:
      linear-gradient(180deg, #043d62 0%, #075b8d 36%, #f7fbff 36%, #f7fbff 100%);
    overflow: auto;
    padding: 18px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-hero {
    border-radius: 8px 8px 0 0;
    padding: 24px;
  }

  .login-hero h1 {
    font-size: 30px;
  }

  .login-hero-stats {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .login-form-stack {
    border-left: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 0 0 8px 8px;
    padding: 18px;
  }

  .login-card {
    padding: 24px;
  }

  body {
    grid-template-columns: 1fr;
  }

  body:not(.login-active) {
    padding-bottom: 78px;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .client-portal {
    grid-template-columns: 1fr;
    padding: 12px 12px 86px;
  }

  .client-portal-header {
    align-items: stretch;
    flex-direction: column;
    position: sticky;
    top: 8px;
    z-index: 700;
  }

  .client-portal-sidebar {
    position: static;
  }

  .client-portal-nav {
    display: none;
  }

  .client-portal-alerts {
    grid-template-columns: 1fr;
    max-height: 220px;
    overflow: auto;
  }

  .client-overview-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-invoice-preview,
  .client-invoice-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-invoice-meta {
    justify-items: start;
    text-align: left;
  }

  .client-invoice-summary-grid {
    grid-template-columns: 1fr;
  }

  .client-location-snapshot-header,
  .client-location-snapshot-header-actions,
  .client-location-snapshot-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-location-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .client-location-map-view {
    min-height: 280px;
  }

  .mobile-bottom-nav {
    align-items: center;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(185, 214, 228, 0.9);
    border-radius: 8px 8px 0 0;
    bottom: 0;
    box-shadow: 0 -12px 32px rgba(15, 70, 110, 0.18);
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(var(--mobile-nav-count, 5), minmax(0, 1fr));
    left: 0;
    padding: 8px max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    position: fixed;
    right: 0;
    z-index: 820;
  }

  .mobile-bottom-nav a {
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    min-height: 44px;
    padding: 8px 4px;
    text-align: center;
    text-decoration: none;
  }

  .mobile-bottom-nav a.active {
    background: #e8f4fb;
    color: var(--blue);
  }

  body.login-active .mobile-bottom-nav {
    display: none;
  }

  .client-invoice-total-box {
    justify-self: stretch;
    max-width: none;
  }

  .sidebar {
    border-bottom: 1px solid var(--sidebar-line);
    box-shadow: 18px 0 38px rgba(2, 6, 23, 0.22);
    height: 100vh;
    max-height: none;
    overflow-y: auto;
    padding: 14px;
    position: fixed;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
    top: 0;
    width: min(84vw, 320px);
    z-index: 900;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  body.mobile-menu-open::after {
    background: rgba(2, 6, 23, 0.44);
    content: "";
    inset: 0;
    position: fixed;
    z-index: 850;
  }

  .sidebar .brand {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .sidebar .brand-logo {
    max-height: 42px;
    width: min(168px, 48vw);
  }

  .sidebar-company-logo {
    min-height: 56px;
    min-width: 92px;
    padding: 6px 8px;
    width: 108px;
  }

  .sidebar-company-logo img {
    max-height: 50px;
    max-width: 94px;
  }

  .sidebar-serviceops-logo {
    max-height: 70px;
    max-width: 210px;
    width: min(210px, 62vw);
  }

  .sidebar-platform-brand {
    margin-top: 12px;
    padding-top: 12px;
  }

  .sidebar-platform-brand img {
    max-height: 52px;
    max-width: 184px;
  }

  .sidebar-tools {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .sidebar-nav {
    gap: 10px;
  }

  .nav-group {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--sidebar-line);
    border-radius: 8px;
    padding: 10px;
  }

  .nav-group > span {
    padding-left: 2px;
  }

  nav a {
    padding: 10px;
  }

  .app {
    padding: 12px 12px 86px;
  }

  .mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
    display: inline-flex;
  }

  .topbar {
    gap: 10px;
    margin: -4px -4px 12px;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 700;
  }

  .topbar > div:first-child {
    display: none;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .topbar-actions {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(58px, 80px) minmax(0, 1fr) auto;
    overflow: visible;
    width: 100%;
  }

  .topbar-company-logo {
    background: #fff;
    min-height: 36px;
    min-width: 64px;
    overflow: hidden;
    padding: 3px 5px;
  }

  .topbar-company-logo img {
    max-height: 32px;
    max-width: 76px;
  }

  .section-heading-actions,
  .module-export-print-actions {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    overflow-x: auto;
    width: 100%;
  }

  .section-heading-actions > button,
  .section-heading-actions > .module-export-print-actions,
  .module-export-print-actions > button {
    flex: 1 1 auto;
  }

  .topbar-actions > button {
    min-height: 38px;
    padding: 8px 10px;
  }

  .topbar-actions .install-app-button,
  .topbar-actions #help-top-button,
  .topbar-actions #logout-button {
    display: none;
  }

  .plan-status-button,
  .session-summary {
    min-width: 0;
    text-align: left;
  }

  .plan-status-button {
    padding: 7px 9px;
  }

  .plan-status-button span,
  .plan-status-button small,
  .session-summary small,
  .session-summary span {
    display: none;
  }

  .plan-status-button strong,
  .session-summary strong {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .session-summary {
    padding: 7px 9px;
  }

  .editor-panel,
  .table-panel,
  .dashboard-card,
  .section-panel {
    padding: 16px;
  }

  .modal-panel {
    max-height: calc(100vh - 20px);
    padding: 14px;
    width: calc(100vw - 16px);
  }

  .map-panel {
    margin: 14px 0 92px;
    padding: 12px;
    scroll-margin-top: 78px;
    z-index: 40;
  }

  .route-map-frame {
    height: 58vh;
    min-height: 360px;
    z-index: 41;
  }

  .editor-modal-panel,
  .module-print-modal-panel,
  .client-portal-invoice-modal-panel,
  .client-portal-evidence-modal-panel,
  .client-portal-service-modal-panel,
  .client-portal-location-modal-panel,
  .technician-stop-modal-panel {
    max-width: none;
    width: calc(100vw - 16px);
  }

  .table-scroll {
    margin-inline: -8px;
    padding-inline: 8px;
  }

  .responsive-card-scroll {
    border: 0;
    margin-inline: 0;
    overflow: visible;
    padding-inline: 0;
  }

  .responsive-card-table {
    border-collapse: separate;
    border-spacing: 0 10px;
    min-width: 0 !important;
    width: 100%;
  }

  .responsive-card-table thead {
    display: none;
  }

  .responsive-card-table tbody,
  .responsive-card-table tr,
  .responsive-card-table td {
    display: block;
    width: 100%;
  }

  .responsive-card-table tr {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(5, 48, 78, 0.06);
    margin-bottom: 10px;
    overflow: hidden;
  }

  .responsive-card-table tr.group-row {
    box-shadow: none;
  }

  .responsive-card-table td {
    align-items: flex-start;
    border-bottom: 1px solid #edf6fa;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    min-height: 42px;
    padding: 10px 12px;
    text-align: left;
  }

  .responsive-card-table td:last-child {
    border-bottom: 0;
  }

  .responsive-card-table td::before {
    color: #486a80;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .responsive-card-table td[colspan] {
    display: block;
  }

  .responsive-card-table td[colspan]::before {
    content: "";
    display: none;
  }

  .responsive-card-table td.table-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .responsive-card-table td.table-actions::before {
    flex: 0 0 100%;
  }

  .responsive-card-table td.table-actions button,
  .responsive-card-table td.table-actions .button-link {
    flex: 1 1 120px;
    justify-content: center;
    min-height: 42px;
  }

  body.role-field .topbar-actions {
    grid-template-columns: auto minmax(58px, 82px) minmax(0, 1fr);
  }

  body.role-field .topbar-actions #current-plan-button,
  body.role-field .topbar-actions #help-top-button,
  body.role-field .topbar-actions #logout-button {
    display: none !important;
  }

  body.role-field .admin-mobile-nav {
    grid-template-columns: 1fr;
  }

  .client-overview-kpis {
    grid-template-columns: 1fr;
  }

  nav,
  .summary-grid,
  .dashboard-grid,
  .plans,
  .management-grid,
  .crm-management-grid,
  .form-grid,
  .form-grid.two-fields,
  .form-grid.three-fields,
  .permission-group-list,
  .route-map-addresses,
  .crew-detail-grid,
  .technician-detail-grid,
  .technician-detail-actions,
  .technician-evidence-items,
  .signature-list-detailed,
  .role-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .two-column,
  .technician-route-header,
  .technician-stop-footer,
  .technician-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .technician-panel .table-actions button {
    flex: 1 1 120px;
    min-height: 44px;
  }

  .technician-panel {
    background: #f4f9fd;
  }

  .technician-route-card {
    box-shadow: 0 14px 30px rgba(15, 70, 110, 0.12);
    padding: 14px;
  }

  .offline-queue-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .technician-route-count {
    align-self: stretch;
    min-width: 0;
  }

  .technician-route-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technician-route-actions button,
  .technician-route-actions .button-link {
    justify-content: center;
    min-height: 46px;
    text-align: center;
  }

  .technician-stop-card {
    background: #fff;
    gap: 10px;
    padding: 12px;
  }

  .technician-stop-main {
    gap: 10px;
  }

  .technician-stop-number {
    min-width: 38px;
    padding: 8px 6px;
  }

  .technician-stop-footer .table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .technician-stop-footer .table-actions button,
  .technician-stop-footer .table-actions .button-link {
    justify-content: center;
    min-height: 46px;
    text-align: center;
  }

  .technician-stop-badges {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .login-view {
    padding: 10px;
  }

  .login-hero,
  .login-card {
    padding: 18px;
  }

  .login-hero h1,
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .client-portal-header .brand-logo {
    max-width: 150px;
  }

  .client-portal-hero {
    padding: 16px;
  }

  .client-portal-hero .technician-toolbar,
  .table-actions,
  .section-heading-actions,
  .module-export-print-actions {
    gap: 8px;
  }

  .month-range-filter {
    order: -2;
  }

  .month-range-original {
    display: none !important;
  }

  .month-range-filter input {
    width: 100%;
  }

  .client-portal-hero .technician-toolbar button,
  .client-portal-hero .technician-toolbar label,
  .table-actions button,
  .section-heading-actions button,
  .module-export-print-actions button {
    flex: 1 1 100%;
  }

  .mobile-bottom-nav a {
    font-size: 11px;
    padding-inline: 2px;
  }

  .technician-route-actions,
  .technician-stop-footer .table-actions {
    grid-template-columns: 1fr;
  }

  .technician-detail-section .table-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  html,
  body.module-print-active {
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  body.module-print-active > *:not(#module-print-modal) {
    display: none !important;
  }

  body.module-print-active #module-print-modal {
    background: #fff !important;
    display: block !important;
    inset: auto !important;
    left: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important;
    width: 100% !important;
  }

  body.module-print-active .module-print-modal-panel {
    border: 0 !important;
    box-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    width: 100% !important;
  }

  body.module-print-active .no-print {
    display: none !important;
  }

  body.module-print-active .module-print-content {
    display: block !important;
    font-size: 12px;
    height: auto !important;
    overflow: visible !important;
    page-break-before: avoid !important;
  }

  body.module-print-active .module-print-content .print-header {
    margin-top: 0 !important;
    page-break-before: avoid !important;
  }

  body.module-print-active .table-scroll {
    overflow: visible !important;
  }

  body.module-print-active table {
    min-width: 0 !important;
    page-break-before: avoid !important;
  }

  body.module-print-active article,
  body.module-print-active section,
  body.module-print-active .table-panel,
  body.module-print-active .dashboard-card,
  body.module-print-active .summary-card {
    break-inside: auto !important;
    box-shadow: none !important;
    margin-bottom: 18px;
    page-break-inside: auto !important;
  }
}
