:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5d6974;
  --line: #d8dee4;
  --panel: #ffffff;
  --page: #f4f7f8;
  --nav: #102a34;
  --nav-2: #183b45;
  --teal: #0f766e;
  --teal-dark: #0b5f59;
  --blue: #2563eb;
  --amber: #b7791f;
  --green: #15803d;
  --red: #b42318;
  --shadow: 0 12px 36px rgba(16, 42, 52, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background: var(--nav);
  color: #eef8f7;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #d7b46a;
  color: #102a34;
  font-weight: 800;
  border-radius: 8px;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
}

.brand-meta,
.field-label,
.label {
  color: #b8c7cc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tenant-select {
  width: 100%;
  min-height: 42px;
  color: #ffffff;
  background: var(--nav-2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 0 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  min-height: 42px;
  text-align: left;
  color: #dce9ec;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.security-block {
  margin-top: auto;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
}

.security-title {
  margin-top: 8px;
  font-weight: 800;
}

.security-copy {
  margin-top: 4px;
  color: #c8d9dd;
  font-size: 13px;
  line-height: 1.35;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.eyebrow {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  margin-top: 4px;
  font-size: 28px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 15px;
}

.topbar-actions,
.row-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.view-host {
  padding: 20px 24px 32px;
}

.primary-button,
.secondary-button,
.small-button,
.icon-button {
  border-radius: 8px;
  border: 1px solid transparent;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button {
  background: var(--teal);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button,
.small-button,
.icon-button {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.small-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.icon-button {
  width: 34px;
  padding: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-body {
  padding: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 14px;
  min-height: 94px;
}

.kpi.blue {
  border-left-color: var(--blue);
}

.kpi.amber {
  border-left-color: var(--amber);
}

.kpi.green {
  border-left-color: var(--green);
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 850;
}

.kpi-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status-pill,
.module-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  background: #e9f6f4;
  color: var(--teal-dark);
  border: 1px solid #bfe5df;
}

.status-pill.amber {
  color: #8a570d;
  background: #fff4d6;
  border-color: #f3d184;
}

.status-pill.green {
  color: var(--green);
  background: #eefbf2;
  border-color: #bfebcc;
}

.status-pill.red {
  color: var(--red);
  background: #fff0ed;
  border-color: #ffd0c7;
}

.project-progress {
  display: grid;
  gap: 8px;
}

.progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecef;
  border: 1px solid var(--line);
}

.progress-track.compact {
  height: 10px;
  min-width: 160px;
}

.progress-fill {
  height: 100%;
  background: var(--teal);
}

.repo-lines {
  display: grid;
  gap: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.module-list {
  display: grid;
  gap: 10px;
}

.module-row,
.activity-row,
.agreement-row {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.module-row:last-child,
.activity-row:last-child,
.agreement-row:last-child {
  border-bottom: 0;
}

.follow-up-list {
  display: grid;
  gap: 10px;
}

.follow-up-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(130px, 0.8fr) auto auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.database-quick-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.database-target {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
}

.module-title,
.entity-title {
  font-weight: 800;
}

.meta-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #123d4a;
  color: #ffffff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:hover td {
  background: #f7fbfb;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) minmax(160px, 220px);
  gap: 10px;
  margin-bottom: 12px;
}

.filters input,
.filters select,
.form-grid input,
.form-grid select,
.form-grid textarea {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
  color: var(--ink);
}

.form-grid textarea {
  min-height: 86px;
  padding-top: 10px;
  resize: vertical;
}

.board {
  display: grid;
  grid-template-columns: repeat(6, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.stage {
  background: #edf3f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 420px;
}

.stage-head {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 850;
}

.op-card {
  margin: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.op-title {
  font-weight: 850;
  line-height: 1.2;
}

.op-value {
  margin-top: 8px;
  font-weight: 850;
  color: var(--green);
}

.stage-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.kinzler-pipeline-panel {
  margin-top: 18px;
  overflow: hidden;
  border-color: #d8b915;
}

.kinzler-pipeline-panel.compact .kinzler-job-grid {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
}

.kinzler-receivables-strip {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kinzler-receivables-strip > div {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #0b1723, #132131);
  color: #ffffff;
}

.kinzler-receivables-strip span,
.kinzler-receivables-strip small {
  color: #cbd5e1;
}

.kinzler-receivables-strip strong {
  font-size: 28px;
  line-height: 1;
}

.kinzler-receivable-main {
  border-color: #f97316 !important;
}

.kinzler-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.kinzler-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--job-accent, #facc15), #facc15);
}

.kinzler-job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
}

.kinzler-job-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--job-accent, #facc15);
  border-radius: 8px;
  background: #ffffff;
}

.kinzler-job-card-head {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
}

.kinzler-job-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.kinzler-brand-tile {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--job-accent, #facc15) 18%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--job-accent, #facc15) 50%, #ffffff);
  color: #111827;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.kinzler-job-money {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kinzler-job-money div {
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.kinzler-job-money span,
.kinzler-job-foot p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.kinzler-job-money strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.kinzler-job-foot {
  display: grid;
  gap: 8px;
}

.kinzler-stage-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.kinzler-stage-lanes section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.kinzler-lane-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.kinzler-lane-row .kinzler-brand-tile {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.kinzler-qbo-section {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.kinzler-qbo-table th {
  background: #12311f;
}

.kinzler-qbo-table td:nth-child(4) {
  font-weight: 850;
  white-space: nowrap;
}

.split-list {
  display: grid;
  gap: 8px;
}

.compact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.compact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.tab-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.tab-strip .small-button.active {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(16, 42, 52, 0.35);
  padding: 0;
}

.dialog::backdrop {
  background: rgba(16, 32, 38, 0.45);
}

.dialog form {
  margin: 0;
}

.dialog-head {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  padding: 14px 16px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.form-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.agreement-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.agreement-form label:last-of-type {
  grid-column: span 2;
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.auth-page {
  min-height: 100vh;
  background: #f4f7f8;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(320px, 1fr);
}

.auth-panel {
  padding: 38px;
  background: #ffffff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.auth-brand {
  color: var(--ink);
  border-bottom-color: var(--line);
}

.auth-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
  color: var(--muted);
  font-weight: 700;
}

.auth-status[data-tone="ok"] {
  color: var(--green);
  background: #eefbf2;
  border-color: #bfebcc;
}

.auth-status[data-tone="warn"] {
  color: #8a570d;
  background: #fff7df;
  border-color: #f3d184;
}

.auth-status[data-tone="error"] {
  color: var(--red);
  background: #fff0ed;
  border-color: #ffd0c7;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form h1 {
  font-size: 28px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-form input,
.auth-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

.auth-admin {
  display: grid;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.auth-admin-head {
  min-height: auto;
  padding: 0 0 12px;
}

.auth-user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tenant-checklist {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tenant-checklist legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tenant-checklist > div {
  display: grid;
  gap: 8px;
}

.tenant-option {
  display: flex !important;
  align-items: center;
  grid-template-columns: none !important;
  gap: 8px !important;
  color: var(--ink) !important;
  font-weight: 700 !important;
}

.tenant-option input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.auth-users-wrap table,
.auth-users-table {
  min-width: 760px;
}

.auth-note {
  padding: 48px;
  align-self: center;
}

.auth-note h2 {
  font-size: 24px;
  margin-bottom: 14px;
}

.auth-note ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.dcli-theme {
  --ink: #e5edf6;
  --muted: #94a3b8;
  --line: #273447;
  --panel: #121923;
  --page: #0d1117;
  --nav: #0d1117;
  --nav-2: #17212f;
  --teal: #38bdf8;
  --teal-dark: #0ea5e9;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --green: #4ade80;
  --red: #fb7185;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  background: var(--page);
}

.dcli-theme .app-shell {
  background:
    linear-gradient(180deg, rgba(56, 189, 248, 0.05), transparent 340px),
    var(--page);
}

.dcli-theme .sidebar {
  border-right: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.94);
}

.dcli-theme .brand-mark {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--teal);
}

.dcli-theme .topbar,
.dcli-theme .panel,
.dcli-theme .dcli-panel,
.dcli-theme .kpi,
.dcli-theme .follow-up-row,
.dcli-theme .table-wrap,
.dcli-theme .auth-status,
.dcli-theme .dialog,
.dcli-theme .activity-row,
.dcli-theme .module-row,
.dcli-theme .agreement-row {
  background: rgba(18, 25, 35, 0.94);
  border-color: var(--line);
  color: var(--ink);
}

.dcli-theme .topbar {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
}

.dcli-theme input,
.dcli-theme select,
.dcli-theme textarea,
.dcli-theme .tenant-select {
  background: #17212f;
  border-color: var(--line);
  color: var(--ink);
}

.dcli-theme .secondary-button,
.dcli-theme .small-button,
.dcli-theme .icon-button {
  background: #17212f;
  color: var(--ink);
  border-color: var(--line);
}

.dcli-theme th {
  background: #0f2533;
}

.dcli-theme tr:hover td {
  background: rgba(56, 189, 248, 0.06);
}

.dcli-hero-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, 0.94);
  box-shadow: var(--shadow);
}

.dcli-hero-panel h2 {
  font-size: 28px;
}

.dcli-map-coordinates {
  min-width: 220px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
}

.dcli-map-coordinates span,
.section-eyebrow {
  color: var(--teal);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.dcli-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.dcli-kpi {
  min-height: 112px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, 0.94);
}

.dcli-kpi span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dcli-kpi strong {
  font-size: 28px;
}

.dcli-kpi small {
  color: var(--muted);
}

.dcli-market-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.5fr);
  gap: 16px;
}

.dcli-map-panel,
.dcli-control-panel,
.dcli-native-frame-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, 0.94);
  box-shadow: var(--shadow);
}

.dcli-map-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.dcli-map-surface {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 25%, rgba(56, 189, 248, 0.18), transparent 22%),
    radial-gradient(circle at 78% 38%, rgba(74, 222, 128, 0.12), transparent 18%),
    linear-gradient(135deg, #0d1117 0%, #101c28 46%, #0d1117 100%);
}

.dcli-map-gridlines {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
  background-size: 46px 46px;
}

.dcli-map-marker {
  position: absolute;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid #4ade80;
  border-radius: 50%;
  background: rgba(13, 17, 23, 0.9);
  color: var(--ink);
  box-shadow: 0 0 22px rgba(74, 222, 128, 0.22);
}

.dcli-map-marker.marker-1 {
  left: 44%;
  top: 38%;
}

.dcli-map-marker.marker-2 {
  left: 58%;
  top: 48%;
}

.dcli-map-marker.marker-3 {
  left: 34%;
  top: 56%;
}

.roofing-map-workspace-panel {
  min-height: 720px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050b13;
  box-shadow: var(--shadow);
}

.roofing-map-filterbar {
  display: grid;
  grid-template-columns: max-content repeat(4, max-content);
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(5, 13, 23, 0.94);
}

.roofing-filter-chip,
.roofing-filter-stat {
  min-height: 46px;
  display: inline-grid;
  align-content: center;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: #f8fafc;
  background: rgba(8, 20, 34, 0.88);
}

.roofing-filter-chip {
  border-color: rgba(34, 211, 238, 0.32);
  font-weight: 900;
}

.roofing-filter-stat span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.roofing-filter-stat strong {
  margin-top: 2px;
  font-size: 13px;
}

.roofing-map-canvas-pro {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 28%, rgba(70, 95, 37, 0.28), transparent 28%),
    radial-gradient(circle at 72% 18%, rgba(63, 73, 44, 0.24), transparent 22%),
    radial-gradient(circle at 34% 72%, rgba(118, 86, 46, 0.2), transparent 30%),
    #101711;
}

.roofing-map-canvas-pro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, transparent 0 54%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.35), transparent 18%, transparent 82%, rgba(3, 7, 18, 0.34)),
    linear-gradient(0deg, rgba(3, 7, 18, 0.34), transparent 20%, transparent 80%, rgba(3, 7, 18, 0.22));
}

.roofing-geo-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.roofing-map-bg {
  fill: #07111d;
}

.roofing-map-basemap {
  fill: url(#roofing-map-radar);
}

.roofing-map-grid-fill {
  fill: rgba(2, 6, 23, 0.12);
}

.roofing-grid {
  opacity: 0.74;
}

.roofing-map-state,
.roofing-map-county,
.roofing-map-service,
.roofing-map-alert {
  fill-rule: evenodd;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

.roofing-map-state {
  fill: rgba(15, 23, 42, 0.55);
  stroke: rgba(248, 250, 252, 0.82);
  stroke-width: 2.8;
  filter: drop-shadow(0 0 12px rgba(248, 250, 252, 0.24));
}

.roofing-map-county {
  fill: rgba(30, 41, 59, 0.1);
  stroke: rgba(203, 213, 225, 0.48);
  stroke-width: 0.88;
}

.roofing-map-service {
  fill: rgba(20, 184, 166, 0.2);
  stroke: rgba(45, 212, 191, 0.95);
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.22));
}

.roofing-map-alert {
  fill: rgba(251, 113, 133, 0.2);
  stroke: rgba(251, 113, 133, 0.95);
  stroke-width: 2;
}

.roofing-map-road {
  fill: none;
  stroke: rgba(248, 250, 252, 0.56);
  stroke-width: 2.4;
  stroke-dasharray: 12 9;
  vector-effect: non-scaling-stroke;
}

.roofing-map-road.secondary {
  stroke: rgba(125, 211, 252, 0.46);
  stroke-width: 1.8;
  stroke-dasharray: 7 8;
}

.roofing-map-hail {
  fill: #fbbf24;
  stroke: #111827;
  stroke-width: 2;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.42));
}

.roofing-map-manager {
  fill: #38bdf8;
  stroke: #082f49;
  stroke-width: 2;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.38));
}

.roofing-map-opportunity {
  fill: #4ade80;
  stroke: #052e16;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 13px rgba(74, 222, 128, 0.36));
}

.roofing-place-label text,
.roofing-county-label text,
.roofing-state-label text {
  paint-order: stroke;
  text-anchor: middle;
  pointer-events: none;
}

.roofing-place-label text {
  fill: #f8fafc;
  stroke: rgba(2, 6, 23, 0.96);
  stroke-width: 4;
  font-size: 13px;
  font-weight: 900;
}

.roofing-county-label text {
  fill: #99f6e4;
  stroke: rgba(2, 6, 23, 0.9);
  stroke-width: 4;
  font-size: 10px;
  font-weight: 900;
  opacity: 0.9;
}

.roofing-state-label text {
  fill: rgba(248, 250, 252, 0.2);
  stroke: rgba(2, 6, 23, 0.42);
  stroke-width: 2;
  font-size: 44px;
  font-weight: 950;
  letter-spacing: 12px;
}

.roofing-map-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--ink);
  text-align: center;
  background: #07111d;
}

.roofing-map-loading span {
  max-width: 560px;
  color: var(--muted);
}

.roofing-layer-panel {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 6;
  width: 292px;
  max-height: calc(100% - 104px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  background: rgba(5, 13, 23, 0.92);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
}

.roofing-basemap-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}

.roofing-basemap-toggle button {
  min-height: 32px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 7px;
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.58);
}

.roofing-basemap-toggle button.active {
  color: #ffffff;
  border-color: rgba(14, 165, 233, 0.52);
  background: rgba(37, 99, 235, 0.48);
}

.roofing-locked-layer-note {
  margin: 12px 0;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.56);
  font-size: 12px;
  line-height: 1.35;
}

.roofing-layer-list {
  display: grid;
  gap: 10px;
}

.roofing-layer-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
}

.roofing-layer-row input {
  width: 18px;
  height: 18px;
  accent-color: #2689ff;
}

.roofing-layer-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #94a3b8;
}

.dot-opportunities {
  background: #4ade80;
}

.dot-propertyManagers {
  background: #38bdf8;
}

.dot-stormZones {
  background: #fbbf24;
}

.dot-counties {
  width: 16px;
  height: 3px;
  border: 0;
  background: transparent;
  background: rgba(226, 232, 240, 0.78);
  border-radius: 999px;
}

.dot-serviceAreas {
  background: #2dd4bf;
}

.roofing-layer-label strong {
  font-size: 14px;
  font-weight: 850;
}

.roofing-layer-save {
  width: 100%;
  margin-top: 14px;
}

.roofing-map-controls {
  position: absolute;
  right: 334px;
  bottom: 32px;
  z-index: 6;
  display: grid;
  gap: 8px;
}

.roofing-map-control-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
  color: #111827;
  background: rgba(248, 250, 252, 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  font-size: 18px;
  font-weight: 900;
}

.roofing-map-status {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 6;
  max-width: calc(100% - 390px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 7px;
  color: #e5edf6;
  background: rgba(5, 13, 23, 0.82);
}

.roofing-map-status i {
  width: 1px;
  height: 18px;
  display: inline-block;
  background: rgba(226, 232, 240, 0.38);
}

.roofing-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.78);
}

.roofing-map-legend span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(23, 33, 47, 0.88);
  font-size: 12px;
  font-weight: 800;
}

.roofing-map-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.roofing-map-legend .legend-state {
  border: 2px solid rgba(226, 232, 240, 0.8);
  border-radius: 2px;
}

.roofing-map-legend .legend-county {
  border: 1px solid rgba(148, 163, 184, 0.8);
  border-radius: 2px;
}

.roofing-map-legend .legend-service {
  background: #2dd4bf;
}

.roofing-map-legend .legend-manager {
  background: #38bdf8;
}

.roofing-map-legend .legend-opportunity {
  background: #4ade80;
}

.roofing-map-legend .legend-hail {
  background: #fbbf24;
}

.roofing-map-legend .legend-alert {
  background: #fb7185;
}

.roofing-source-list {
  display: grid;
  gap: 10px;
}

.roofing-source-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.roofing-source-row strong,
.roofing-source-row small {
  display: block;
}

.roofing-source-row small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.dcli-layer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.dcli-layer-row input {
  width: 16px;
  min-height: 16px;
}

.dcli-control-list {
  display: grid;
  margin-bottom: 14px;
}

.dcli-native-frame-panel {
  height: calc(100vh - 180px);
  margin-top: 16px;
  overflow: hidden;
}

.dcli-native-frame-panel iframe,
.dcli-native-page iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.dcli-native-page {
  margin: 0;
  background: #0d1117;
}

.dcli-native-guard {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 6px;
  max-width: 360px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid.two,
  .grid.three,
  .kpi-grid,
  .dcli-kpi-grid,
  .dcli-market-grid,
  .filters,
  .database-quick-list,
  .follow-up-row,
  .agreement-form {
    grid-template-columns: 1fr;
  }

  .agreement-form label:last-of-type {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-note {
    padding: 24px;
  }

  .auth-panel {
    padding: 24px;
    border-right: 0;
  }

  .auth-user-grid {
    grid-template-columns: 1fr;
  }

  .topbar,

  .dcli-hero-panel {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions button {
    flex: 1;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-host {
    padding: 14px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Strategic admin user-management redesign. Scoped to the auth route. */
.auth-page {
  color-scheme: dark;
  min-height: 100vh;
  overflow-x: hidden;
  color: #eef5fc;
  background:
    radial-gradient(circle at 28% 0%, rgba(42, 103, 152, 0.2), transparent 34rem),
    radial-gradient(circle at 100% 0%, rgba(108, 83, 190, 0.14), transparent 42rem),
    #06111d;
}

.auth-entry {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(320px, 1fr);
}

.auth-panel {
  padding: 38px;
  color: #eef5fc;
  background: linear-gradient(180deg, #0b1a2a, #071321);
  border-right: 1px solid rgba(151, 177, 207, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.auth-brand {
  color: #eef5fc;
  border-bottom-color: rgba(151, 177, 207, 0.18);
}

.auth-logo {
  width: 104px;
  height: auto;
  display: block;
}

.auth-page .brand-name {
  color: #ffffff;
}

.auth-page .brand-meta,
.auth-page .meta-line {
  color: #8ea2b8;
}

.auth-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(151, 177, 207, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #aebfd1;
  font-weight: 700;
}

.auth-status[data-tone="ok"] {
  color: #8ee6bb;
  background: rgba(63, 208, 139, 0.08);
  border-color: rgba(63, 208, 139, 0.3);
}

.auth-status[data-tone="warn"] {
  color: #f2c35c;
  background: rgba(240, 182, 75, 0.09);
  border-color: rgba(240, 182, 75, 0.32);
}

.auth-status[data-tone="error"] {
  color: #ffb1ba;
  background: rgba(245, 109, 123, 0.1);
  border-color: rgba(245, 109, 123, 0.32);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form h1 {
  color: #f6f9fe;
  font-size: 28px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #a9bad0;
  font-size: 13px;
  font-weight: 800;
}

.auth-form input,
.auth-form select {
  min-height: 44px;
  border: 1px solid rgba(151, 177, 207, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  color: #edf4fd;
  background: #071321;
}

.auth-page .primary-button {
  background: linear-gradient(180deg, #f3cf70, #e5b847);
  color: #181204;
  border-color: #efca65;
}

.auth-page .primary-button:hover {
  background: linear-gradient(180deg, #f7d97d, #ebc14f);
}

.auth-page .secondary-button,
.auth-page .small-button,
.auth-page .icon-button {
  color: #edf4fd;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(151, 177, 207, 0.22);
}

.auth-note {
  align-self: center;
  padding: 48px;
  color: #d8e4f1;
}

.auth-note h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.auth-note ul {
  margin: 0;
  padding-left: 20px;
  color: #8ea2b8;
  line-height: 1.7;
}

.strategic-admin {
  --sam-bg: #06111d;
  --sam-sidebar: #071321;
  --sam-surface: #0b1929;
  --sam-surface-2: #102237;
  --sam-surface-3: #13283d;
  --sam-border: rgba(151, 177, 207, 0.16);
  --sam-border-strong: rgba(151, 177, 207, 0.28);
  --sam-text: #edf4fd;
  --sam-muted: #92a6bd;
  --sam-muted-2: #70869c;
  --sam-gold: #e5b847;
  --sam-gold-2: #f3cf70;
  --sam-blue: #5aa8ff;
  --sam-green: #3fd08b;
  --sam-amber: #f0b64b;
  --sam-red: #f56d7b;
  --sam-purple: #756bff;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  color: var(--sam-text);
  background:
    radial-gradient(circle at 25% 0%, rgba(42, 103, 152, 0.17), transparent 34rem),
    radial-gradient(circle at 100% 0%, rgba(108, 83, 190, 0.12), transparent 42rem),
    var(--sam-bg);
}

.strategic-admin[hidden] {
  display: none !important;
}

.sam-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #071523 0%, #07111d 100%);
  border-right: 1px solid var(--sam-border);
}

.sam-brand {
  height: 86px;
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--sam-border);
}

.sam-brand img {
  width: 112px;
  height: auto;
  display: block;
}

.sam-nav {
  display: grid;
  gap: 3px;
  padding: 14px 10px;
}

.sam-nav-label {
  padding: 9px 10px 7px;
  color: var(--sam-muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sam-nav-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #a9bbcf;
  font-weight: 700;
  text-decoration: none;
}

.sam-nav-item span {
  margin-left: auto;
  min-width: 22px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 1px solid var(--sam-border);
  border-radius: 99px;
  color: var(--sam-muted);
  font-size: 9px;
}

.sam-nav-item:hover,
.sam-nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(70, 111, 231, 0.28), rgba(96, 78, 219, 0.22));
  border-color: rgba(101, 126, 230, 0.35);
  box-shadow: inset 3px 0 0 var(--sam-gold);
}

.sam-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--sam-border);
}

.sam-workspace-card,
.sam-profile-card {
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.sam-workspace-card {
  padding: 10px;
}

.sam-workspace-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
}

.sam-workspace-title span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sam-green);
}

.sam-workspace-card p {
  margin: 5px 0 0;
  color: var(--sam-muted-2);
  font-size: 9px;
  line-height: 1.45;
}

.sam-profile-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
}

.sam-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #4e79ff, #8b58ef);
  box-shadow: 0 8px 22px rgba(83, 93, 238, 0.22);
  font-size: 11px;
  font-weight: 800;
}

.sam-profile-name,
.sam-top-profile-copy div:first-child {
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.sam-profile-role,
.sam-top-profile-copy div:last-child {
  margin-top: 2px;
  color: var(--sam-muted-2);
  font-size: 9px;
}

.sam-main {
  min-width: 0;
}

.sam-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: rgba(5, 12, 21, 0.92);
  border-bottom: 1px solid var(--sam-border);
  backdrop-filter: blur(18px);
}

.sam-mobile-button {
  display: none !important;
}

.sam-global-search,
.sam-table-search {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--sam-border-strong);
  background: #08131f;
  color: var(--sam-muted);
}

.sam-global-search {
  width: min(520px, 45vw);
  height: 38px;
  padding: 0 11px;
  border-radius: 9px;
}

.sam-global-search span,
.sam-table-search span {
  font-size: 0;
}

.sam-global-search span::before,
.sam-table-search span::before {
  content: "";
  width: 13px;
  height: 13px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 7px 7px 0 -5px currentColor;
  transform: rotate(-12deg);
}

.sam-global-search input,
.sam-table-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  color: var(--sam-text);
  background: transparent;
}

.sam-global-search input::placeholder,
.sam-table-search input::placeholder {
  color: #72879d;
}

.sam-topbar-spacer {
  flex: 1;
}

.sam-admin-status {
  max-width: 360px;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  color: var(--sam-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
  font-weight: 800;
}

.sam-admin-status[data-tone="ok"] {
  color: #a6f1c8;
  border-color: rgba(63, 208, 139, 0.28);
}

.sam-admin-status[data-tone="warn"] {
  color: #f5d07d;
  border-color: rgba(240, 182, 75, 0.28);
}

.sam-admin-status[data-tone="error"] {
  color: #ffb9c0;
  border-color: rgba(245, 109, 123, 0.28);
}

.sam-top-profile {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sam-icon-button {
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  color: #b6c6d8;
  background: rgba(255, 255, 255, 0.02);
  font-size: 11px;
  font-weight: 800;
}

.sam-icon-button:hover {
  color: #ffffff;
  border-color: var(--sam-border-strong);
}

.sam-content {
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px 28px 50px;
}

.sam-page-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 16px;
}

.sam-breadcrumb {
  margin-bottom: 7px;
  color: var(--sam-muted-2);
  font-size: 10px;
  font-weight: 800;
}

.sam-breadcrumb strong {
  color: #bdcbda;
}

.sam-page-head h1 {
  margin: 0;
  color: #f3f8ff;
  font-size: 31px;
  line-height: 1.1;
  letter-spacing: 0;
}

.sam-page-head p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--sam-muted);
  font-size: 12px;
  line-height: 1.5;
}

.sam-head-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 5px;
}

.sam-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--sam-border-strong);
  border-radius: 8px;
  padding: 0 13px;
  color: #e8f0f8;
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  font-weight: 800;
}

.sam-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.055);
}

.sam-button:disabled {
  cursor: not-allowed;
  color: var(--sam-muted-2);
  opacity: 0.72;
}

.sam-button-primary {
  color: #181204;
  border-color: #efca65;
  background: linear-gradient(180deg, var(--sam-gold-2), var(--sam-gold));
  box-shadow: 0 9px 24px rgba(227, 185, 79, 0.16);
}

.sam-button-primary:hover:not(:disabled) {
  filter: brightness(1.04);
}

.sam-button-small {
  min-height: 31px;
  padding: 0 10px;
  font-size: 10px;
}

.sam-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.sam-summary-chip {
  min-height: 31px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  color: var(--sam-muted);
  background: rgba(255, 255, 255, 0.022);
}

.sam-summary-chip span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sam-green);
}

.sam-summary-chip strong {
  color: var(--sam-text);
  font-size: 11px;
}

.sam-summary-chip.blue span {
  background: var(--sam-blue);
}

.sam-summary-chip.green span {
  background: var(--sam-green);
}

.sam-summary-chip.amber span {
  background: var(--sam-amber);
}

.sam-summary-chip.red span {
  background: var(--sam-red);
}

.sam-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.sam-panel {
  overflow: hidden;
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 29, 47, 0.97), rgba(9, 22, 36, 0.97));
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.12);
}

.sam-panel-head {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--sam-border);
}

.sam-panel-head h2 {
  margin: 0;
  color: #f4f8fd;
  font-size: 13px;
}

.sam-panel-head p {
  margin: 3px 0 0;
  color: var(--sam-muted-2);
  font-size: 9px;
}

.sam-panel-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.sam-tabs {
  display: flex;
  gap: 3px;
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--sam-border);
}

.sam-summary-row::-webkit-scrollbar,
.sam-tabs::-webkit-scrollbar {
  display: none;
}

.sam-tab {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 11px;
  color: var(--sam-muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.sam-tab.active {
  color: #ffffff;
  border-bottom-color: var(--sam-gold);
}

.sam-tab span {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 99px;
  color: var(--sam-muted);
  background: rgba(255, 255, 255, 0.055);
  font-size: 9px;
}

.sam-tab.active span {
  color: #181204;
  background: var(--sam-gold);
}

.sam-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sam-border);
}

.sam-table-search {
  flex: 1;
  min-width: 250px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
}

.sam-select {
  width: min(180px, 22vw);
  height: 34px;
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  color: #b8c6d6;
  background: #0a1827;
  padding: 0 30px 0 10px;
  font-size: 10px;
}

.sam-table-wrap {
  overflow-x: auto;
}

.sam-users-table {
  width: 100%;
  min-width: 830px;
  border-collapse: collapse;
}

.sam-users-table th {
  position: static;
  padding: 9px 12px;
  border-bottom: 1px solid var(--sam-border);
  color: var(--sam-muted-2);
  background: rgba(3, 11, 18, 0.2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.sam-users-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(151, 177, 207, 0.09);
  color: #b7c5d5;
  font-size: 10px;
  vertical-align: middle;
}

.sam-users-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.sam-person {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.sam-table-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 9px;
}

.sam-person-name {
  color: var(--sam-text);
  font-size: 10px;
  font-weight: 800;
}

.sam-person-email {
  margin-top: 2px;
  color: var(--sam-muted-2);
  font-size: 8px;
}

.sam-company-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
}

.sam-company-pill small {
  color: var(--sam-muted-2);
}

.sam-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 2px;
  background: var(--sam-purple);
}

.sam-role-pill,
.sam-access-pill,
.sam-scope-pill {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sam-border);
  border-radius: 6px;
  padding: 0 7px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.sam-role-pill,
.sam-scope-pill {
  color: #c3d0de;
  background: rgba(255, 255, 255, 0.025);
}

.sam-access-pill {
  gap: 5px;
}

.sam-access-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.sam-access-pill.write {
  color: #bff0d7;
  border-color: rgba(63, 208, 139, 0.22);
  background: rgba(63, 208, 139, 0.08);
}

.sam-access-pill.write::before {
  background: var(--sam-green);
}

.sam-access-pill.read {
  color: #c7d9ff;
  border-color: rgba(90, 168, 255, 0.22);
  background: rgba(90, 168, 255, 0.08);
}

.sam-access-pill.read::before {
  background: var(--sam-blue);
}

.sam-access-pill.locked {
  color: #ffc2c8;
  border-color: rgba(245, 109, 123, 0.22);
  background: rgba(245, 109, 123, 0.08);
}

.sam-access-pill.locked::before {
  background: var(--sam-red);
}

.sam-online {
  color: #8fe6bb !important;
}

.sam-empty-state {
  padding: 50px 20px;
  color: var(--sam-muted);
  text-align: center;
}

.sam-table-foot {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-top: 1px solid var(--sam-border);
  color: var(--sam-muted-2);
  font-size: 9px;
}

.sam-side-stack {
  display: grid;
  gap: 12px;
}

.sam-company-list {
  display: grid;
  gap: 2px;
  padding: 6px;
}

.sam-company-row {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 7px;
  transition: 0.16s ease;
}

.sam-company-row:hover,
.sam-company-row:focus-visible {
  background: rgba(255, 255, 255, 0.03);
}

.sam-company-row.selected {
  background: rgba(90, 168, 255, 0.075);
  border-color: rgba(90, 168, 255, 0.22);
}

.sam-company-mark {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #836323, #b28b37);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 9px;
  font-weight: 850;
}

.sam-company-copy {
  min-width: 0;
  flex: 1;
}

.sam-company-name {
  overflow: hidden;
  color: #f2f6fb;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sam-company-meta {
  margin-top: 2px;
  color: var(--sam-muted-2);
  font-size: 8px;
}

.sam-add-user-button {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sam-border-strong);
  border-radius: 7px;
  color: var(--sam-gold-2);
  background: #0b1c2d;
  font-weight: 900;
}

.sam-add-user-button:hover {
  border-color: var(--sam-gold);
  background: rgba(229, 184, 71, 0.1);
}

.sam-attention-list,
.sam-activity-list {
  display: grid;
  gap: 5px;
  padding: 8px 10px 10px;
}

.sam-attention-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.015);
}

.sam-attention-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--sam-amber);
  background: rgba(240, 182, 75, 0.1);
  font-weight: 900;
}

.sam-attention-icon.red {
  color: var(--sam-red);
  background: rgba(245, 109, 123, 0.09);
}

.sam-attention-icon.blue {
  color: var(--sam-blue);
  background: rgba(90, 168, 255, 0.09);
}

.sam-attention-copy {
  min-width: 0;
  flex: 1;
}

.sam-attention-title {
  color: #e8f0f9;
  font-size: 9px;
  font-weight: 800;
}

.sam-attention-sub {
  margin-top: 2px;
  color: var(--sam-muted-2);
  font-size: 8px;
}

.sam-attention-count {
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.sam-compact-toggle {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0 12px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.sam-score {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: conic-gradient(var(--sam-green) 0 86%, #20364a 86%);
  font-size: 10px;
  font-weight: 850;
}

.sam-compact-toggle strong {
  display: block;
  color: #ffffff;
  font-size: 10px;
}

.sam-compact-toggle small {
  display: block;
  margin-top: 2px;
  color: var(--sam-muted-2);
  font-size: 8px;
}

.sam-compact-caret {
  margin-left: auto;
  color: var(--sam-muted-2);
}

.sam-compact-details {
  display: grid;
  gap: 5px;
  padding: 0 10px 10px;
}

.sam-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--sam-muted);
  background: rgba(255, 255, 255, 0.02);
  font-size: 8px;
}

.sam-status-line strong {
  margin-left: auto;
  color: #c6d2df;
}

.sam-activity-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(151, 177, 207, 0.08);
  padding: 7px 4px;
}

.sam-activity-item:last-child {
  border-bottom: 0;
}

.sam-activity-avatar {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
  background: #1c3552;
  color: #bcd8ff;
  font-size: 7px;
}

.sam-activity-copy {
  color: #b4c3d3;
  font-size: 8px;
  line-height: 1.35;
}

.sam-activity-copy small {
  display: block;
  color: var(--sam-muted-2);
}

.sam-activity-time {
  color: var(--sam-muted-2);
  font-size: 7px;
  white-space: nowrap;
}

.sam-empty-mini {
  padding: 8px 4px;
  color: var(--sam-muted-2);
  font-size: 9px;
}

.sam-drawer-dialog {
  width: min(430px, 100vw);
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(151, 177, 207, 0.28);
  color: var(--sam-text);
  background: linear-gradient(180deg, #0d1c2d, #081522);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.32);
}

.sam-drawer-dialog::backdrop {
  background: rgba(2, 7, 13, 0.58);
  backdrop-filter: blur(3px);
}

.sam-drawer-form {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.sam-drawer-head {
  min-height: 82px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--sam-border);
  padding: 18px 20px;
}

.sam-drawer-head h2 {
  margin: 0;
  color: #f5f9ff;
  font-size: 18px;
}

.sam-drawer-head p {
  margin: 4px 0 0;
  color: var(--sam-muted);
  font-size: 10px;
}

.sam-drawer-head .sam-icon-button {
  margin-left: auto;
}

.sam-drawer-error {
  margin: 12px 20px 0;
  border: 1px solid rgba(245, 109, 123, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  color: #ffb9c0;
  background: rgba(245, 109, 123, 0.1);
  font-size: 11px;
  font-weight: 800;
}

.sam-drawer-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  overflow: auto;
}

.sam-drawer-body label {
  display: grid;
  gap: 6px;
  color: #aab9ca;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sam-drawer-body input,
.sam-drawer-body select {
  height: 39px;
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  color: var(--sam-text);
  background: #081522;
  padding: 0 11px;
  font-size: 11px;
}

.sam-drawer-body input:disabled {
  color: var(--sam-muted);
  background: rgba(255, 255, 255, 0.025);
}

.sam-drawer-tenants {
  border-color: var(--sam-border);
}

.sam-drawer-tenants legend {
  color: #aab9ca;
}

.sam-drawer-tenants .tenant-option {
  color: #d7e2ed !important;
}

.sam-drawer-foot {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--sam-border);
  padding: 14px 20px;
}

.strategic-admin :focus-visible,
.auth-entry :focus-visible {
  outline: 2px solid var(--sam-gold, #e5b847);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .sam-layout {
    grid-template-columns: 1fr;
  }

  .sam-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sam-company-panel,
  .sam-activity-panel {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .strategic-admin {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .sam-sidebar {
    min-height: 0;
  }

  .sam-brand {
    padding: 10px;
  }

  .sam-brand img {
    width: 52px;
    object-fit: cover;
    object-position: left;
  }

  .sam-nav-item {
    justify-content: center;
    padding: 0;
  }

  .sam-nav-label,
  .sam-nav-item span,
  .sam-nav-item:not(.active)::after,
  .sam-nav-item {
    font-size: 0;
  }

  .sam-nav-item::first-letter {
    font-size: 0;
  }

  .sam-sidebar-footer {
    display: none;
  }

  .sam-content {
    padding: 20px 16px 44px;
  }

  .sam-top-profile-copy {
    display: none;
  }

  .sam-summary-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .sam-summary-chip {
    flex: 0 0 auto;
  }

  .sam-toolbar {
    flex-wrap: wrap;
  }

  .sam-table-search {
    min-width: 100%;
  }

  .sam-select {
    flex: 1;
    width: auto;
    min-width: 140px;
  }
}

@media (max-width: 640px) {
  .auth-entry {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: auto;
    padding: 24px;
    border-right: 0;
  }

  .auth-note {
    padding: 24px;
  }

  .strategic-admin {
    display: block;
  }

  .sam-sidebar {
    display: none;
  }

  .sam-topbar {
    height: auto;
    min-height: 62px;
    padding: 12px;
    gap: 10px;
  }

  .sam-mobile-button {
    display: inline-grid !important;
  }

  .sam-global-search {
    width: min(100%, 224px);
    flex: 1;
  }

  .sam-admin-status,
  .sam-top-profile-copy {
    display: none;
  }

  .sam-content {
    padding: 16px 12px 40px;
  }

  .sam-page-head {
    display: block;
  }

  .sam-page-head h1 {
    font-size: 30px;
  }

  .sam-head-actions {
    margin: 14px 0 0;
    padding-top: 0;
  }

  .sam-head-actions .sam-button {
    flex: 1;
  }

  .sam-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sam-tab {
    flex: 0 0 auto;
  }

  .sam-side-stack {
    grid-template-columns: 1fr;
  }

  .sam-company-panel,
  .sam-activity-panel {
    grid-column: auto;
  }

  .sam-drawer-dialog {
    width: 100vw;
  }
}
