/* =====================================
   UAS ENTERPRISE - GLOBAL VARIABLES
===================================== */

:root {
  --bg-main: #071018;
  --bg-panel: #0d1822;
  --bg-card: #111f2b;
  --bg-card-soft: #142434;

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --orange: #f2600e;
  --orange-soft: rgba(242, 96, 14, 0.16);

  --green: #22c55e;
  --red: #ef4444;
  --blue: #2d78ff;
  --yellow: #facc15;
  --purple: #8b5cf6;

  --text-main: #f7f9fc;
  --text-soft: #9ca3af;
  --text-muted: #64748b;

  --radius: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(242, 96, 14, 0.08), transparent 30%),
    linear-gradient(135deg, #050b11 0%, #08131d 45%, #04080d 100%);
  color: var(--text-main);
  font-family: "Inter", Arial, sans-serif;
  overflow-x: hidden;
}

.root-entry-page {
  min-height: 100vh;
}

.root-entry-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.root-entry-link {
  text-decoration: none;
}


/* =====================================
   APP SHELL
===================================== */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow-x: hidden;
}

.main {
  padding: 28px;
}


/* =====================================
   SIDEBAR
===================================== */

.sidebar {
  border-right: 1px solid var(--border);
  background: rgba(5, 11, 17, 0.88);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-logo {
  width: 135px;
  display: block;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item:hover,
.nav-item.active {
  background: var(--orange-soft);
  color: var(--orange);
  border-color: rgba(242, 96, 14, 0.45);
}

.nav-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}


/* =====================================
   USER CARD
===================================== */

.user-card {
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  overflow: hidden;
}

.user-toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.user-name,
.user-role,
.online {
  display: block;
  width: 100%;
}

.user-name {
  font-weight: 600;
}

.user-role {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 400;
}

.online {
  color: var(--green);
  font-size: 12px;
  margin-top: 4px;
  font-weight: 400;
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.user-arrow {
  color: var(--text-soft);
  font-size: 12px;
  margin-top: 4px;
  transition: transform 0.2s ease;
}

.user-card.open .user-arrow {
  transform: rotate(180deg);
}

.user-menu {
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.user-card.open .user-menu {
  display: grid;
}

.user-menu button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.user-menu button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.logout-btn {
  color: var(--red) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}


/* =====================================
   TOP BAR + BUTTONS
===================================== */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 18px;
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-weight: 400;
}

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

.top-actions input {
  width: 300px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 14px 16px;
  border-radius: 8px;
  outline: none;
}

.primary-btn,
.secondary-btn,
.icon-btn {
  width: auto;
  min-width: auto;
  height: auto;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.primary-btn {
  border: 1px solid rgba(242, 96, 14, 0.85);
  background: linear-gradient(180deg, #ff7a1a, var(--orange));
  color: #ffffff;
}

.secondary-btn,
.icon-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
}

.secondary-btn:hover,
.icon-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.compact-btn {
  padding: 10px 15px;
}

.full-btn {
  width: 100%;
  margin-bottom: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;

  gap: 14px;
  padding-left: 22px;

  color: #d7dde7;
  font-weight: 600;
}

.action-btn img {
  width: 22px;
  height: 22px;
  opacity: .9;
  flex-shrink: 0;
}
.status-select {
  height: 46px;
  min-width: 165px;
  border-radius: 10px;
  border: 1px solid rgba(242, 96, 14, 0.85);
  background-color: #f2600e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M3 5l5 6 5-6z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 15px center;
background-size: 27px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
padding: 0 38px 0 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(242, 96, 14, 0.25);
  transition: all 0.2s ease;
}

.status-select:hover {
  box-shadow: 0 6px 16px rgba(242, 96, 14, 0.35);
}

.status-select:focus {
  outline: none;
  border-color: #ff9b52;
}

.status-select option {
  color: #111;
}

.danger-btn {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.45);
}

.danger-btn:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.16);
}


/* =====================================
   SHARED CARD SURFACES
===================================== */

.kpi-card,
.panel,
.system-status {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    var(--bg-panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}


/* =====================================
   KPI CARDS
===================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.kpi-card {
  padding: 24px;
  min-height: 175px;
  overflow: hidden;
}

.kpi-layout {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
}

.kpi-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--orange-soft);
  color: var(--orange);
  flex-shrink: 0;
}

.kpi-svg {
  width: 26px;
  height: 26px;
  display: block;
}

.kpi-content {
  flex: 1;
  min-width: 0;
}

.kpi-content p {
  margin: 0 0 12px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  overflow-wrap: break-word;
}

.kpi-content h2 {
  margin: 0 0 10px;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 1;
}

.kpi-content small {
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: break-word;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.money {
  background: rgba(34, 197, 94, 0.14);
  color: var(--green);
}

.icon-dollar {
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.revenue select {
  width: 100%;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 10px;
  border-radius: 8px;
}


/* =====================================
   COMMAND CENTER
===================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 0.85fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 22px;
  min-height: 330px;
}

.panel h3,
.system-status h3,
.operations-queue h3 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 600;
}

.donut-placeholder {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  margin: 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  position: relative;
  background:
    radial-gradient(circle, #071018 0 42%, transparent 43%),
    conic-gradient(var(--blue) 0 30%, var(--orange) 30% 55%, var(--yellow) 55% 72%, var(--purple) 72% 88%, var(--green) 88% 100%);
}

.donut-placeholder span {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 400;
}

.panel-count {
  float: right;
  color: var(--text-main);
  font-size: 18px;
  margin-top: -34px;
  font-weight: 500;
}

.panel ul {
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.panel li {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  color: var(--text-main);
  font-weight: 400;
}

.panel li span {
  float: right;
  color: var(--text-soft);
  font-size: 13px;
}

.panel-link {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  padding: 14px;
  cursor: pointer;
  font-size: 15px;
}

.operations-queue {
  min-height: auto;
  padding: 18px;
  margin-bottom: 18px;
}

.operations-queue h3 {
  margin-bottom: 12px;
}

.queue-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.queue-item {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.025);
  border-radius: 10px;
  padding: 18px;
}

.queue-label {
  color: var(--text-soft);
  font-size: 13px;
  margin-bottom: 10px;
}

.queue-value {
  font-size: 28px;
  font-weight: 500;
}


/* =====================================
   SYSTEM STATUS
===================================== */

.system-status {
  padding: 22px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.status-grid div {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  padding: 22px;
  border-radius: 10px;
  font-size: 17px;
}

.status-grid span {
  display: block;
  color: var(--green);
  margin-top: 10px;
  font-size: 14px;
}

.system-icon {
  width: 18px;
  height: 18px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 6px;
  position: relative;
}

.system-icon::after {
  content: "";
  width: 8px;
  height: 2px;
  background: currentColor;
  position: absolute;
  left: 4px;
  top: 7px;
  border-radius: 99px;
}


/* =====================================
   MOBILE OPS DASHBOARD
===================================== */

.mobile-kpis {
  margin-bottom: 18px;
}

.mobile-kpis .kpi-card {
  min-height: 125px;
  padding: 18px 20px;
}

.mobile-kpis .kpi-layout {
  align-items: center;
  gap: 16px;
}

.mobile-kpis .kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.mobile-kpis .kpi-svg {
  width: 21px;
  height: 21px;
}

.mobile-kpis .kpi-content p {
  margin: 0 0 6px;
  font-size: 14px;
  white-space: nowrap;
}

.mobile-kpis .kpi-content h2 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1;
}

.mobile-kpis .kpi-content small {
  display: block;
  font-size: 12px;
  white-space: nowrap;
}

.mobile-kpis .revenue h2 {
  font-size: 34px;
}

.mobile-kpis .revenue .kpi-content p,
.mobile-kpis .revenue .kpi-content small {
  white-space: nowrap;
}

.job-queue-panel {
  min-height: auto;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.queue-search-wrap {
  flex: 0 0 min(360px, 36%);
  min-width: 260px;
}

.queue-search-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
  font: inherit;
  font-size: 14px;
  outline: none;
  padding: 0 14px;
}

.queue-search-input::placeholder {
  color: var(--text-soft);
}

.queue-search-input:focus {
  border-color: rgba(242, 96, 14, 0.72);
  box-shadow: 0 0 0 3px rgba(242, 96, 14, 0.08);
}

.operational-warning {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 196, 87, 0.42);
  border-radius: 8px;
  background: rgba(255, 196, 87, 0.08);
  color: #ffd47a;
  font-size: 14px;
  font-weight: 700;
}

.uas-action-notice {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.48);
}

.uas-action-notice[hidden] {
  display: none;
}

.uas-action-dialog {
  width: min(430px, 92vw);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #18222d, #121b24);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  padding: 20px;
}

.uas-action-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.uas-action-dialog h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.uas-action-dialog p {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.uas-action-close {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.queue-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.queue-header p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.job-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  overflow-x: auto;
}

.job-tab {
  border: none;
  background: transparent;
  color: var(--text-soft);
  padding: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.job-tab span {
  color: var(--text-muted);
  margin-left: 4px;
}

.job-tab.active {
  color: var(--orange);
  border-bottom: 2px solid var(--orange);
}

.job-table-wrap {
  overflow-x: auto;
}

.job-table {
  width: 100%;
  border-collapse: collapse;
}

.job-table th {
  text-align: left;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.18);
}

.job-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 400;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.assigned {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.14);
}

.status-badge.progress {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
}

.status-badge.approval {
  color: #facc15;
  background: rgba(250, 204, 21, 0.14);
}

.status-badge.parts {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.14);
}

.status-badge.repair {
  color: #f97316;
  background: rgba(249, 115, 22, 0.14);
}


/* =====================================
   MOBILE OPS STANDARDIZATION
===================================== */

.mobile-ops-page {
  overflow-x: hidden;
}

.mobile-ops-page .main,
.job-profile-shell .main {
  min-width: 0;
  overflow-x: hidden;
}

.mobile-ops-page .topbar,
.job-profile-shell .topbar {
  margin-bottom: 24px;
}

.mobile-ops-page .topbar h1,
.job-profile-shell .topbar h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.mobile-ops-page .topbar p,
.job-profile-shell .topbar p {
  color: var(--text-soft);
  font-size: 15px;
}

.mobile-ops-page .job-queue-panel,
.job-profile-shell .panel {
  min-width: 0;
}

.job-profile-shell .job-file-layout {
  grid-template-columns: 280px minmax(0, 1fr) 240px 220px;
  gap: 12px;
}

.job-profile-shell .workflow-panel,
.job-profile-shell .job-info-panel,
.job-profile-shell .workflow-notes-panel,
.job-profile-shell .job-summary-panel,
.job-profile-shell .actions-panel,
.mobile-ops-page .kpi-card,
.mobile-ops-page .job-queue-panel {
  border-color: var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
    var(--bg-panel);
  box-shadow: var(--shadow);
}

.job-profile-shell .job-info-panel,
.job-profile-shell .workflow-notes-panel,
.job-profile-shell .job-summary-panel,
.job-profile-shell .actions-panel {
  min-height: 430px;
}

.job-profile-page .mobile-vehicle-info-panel .info-group {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 10px;
  margin-bottom: 9px;
  align-items: center;
  min-width: 0;
}

.job-profile-page .mobile-vehicle-info-panel .info-group label {
  margin: 0;
  color: var(--text-soft);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 500;
}

.job-profile-page .mobile-vehicle-info-panel .info-group p,
.vehicle-info-panel .info-group p {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.job-profile-page .mobile-vehicle-info-panel .info-group p {
  font-size: 12px;
  font-weight: 500;
}

.mobile-ops-page .job-tabs {
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 10px;
  overflow-x: visible;
}

.mobile-ops-page .job-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
}

.mobile-ops-page .job-tab span {
  margin-left: 0;
}

.mobile-ops-page .job-table-wrap {
  overflow-x: hidden;
}

.mobile-ops-page .job-table {
  table-layout: fixed;
}

.mobile-ops-page .job-table th,
.mobile-ops-page .job-table td {
  height: 58px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.2;
  vertical-align: middle;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mobile-ops-page .job-table th {
  height: 48px;
  white-space: nowrap;
}

.mobile-ops-page .job-table tbody tr {
  cursor: pointer;
}

.mobile-ops-page .job-table tbody tr:hover {
  background: rgba(255,255,255,.03);
}


/* =====================================
   UAS COLOR SYSTEM STANDARDIZATION
===================================== */

.mobile-ops-page,
.job-profile-shell {
  background:
    radial-gradient(circle at top left, rgba(242, 96, 14, 0.08), transparent 30%),
    linear-gradient(135deg, #050b11 0%, #08131d 45%, #04080d 100%);
}

.mobile-ops-page .panel,
.mobile-ops-page .kpi-card,
.job-profile-shell .panel,
.job-profile-shell .workflow-panel,
.job-profile-shell .job-info-panel,
.job-profile-shell .workflow-notes-panel,
.job-profile-shell .job-summary-panel,
.job-profile-shell .actions-panel {
  border-color: var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
    var(--bg-panel);
  box-shadow: var(--shadow);
}

.mobile-ops-page .secondary-btn,
.mobile-ops-page .icon-btn,
.job-profile-shell .secondary-btn,
.job-profile-shell .icon-btn {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
}

.mobile-ops-page .secondary-btn:hover,
.mobile-ops-page .icon-btn:hover,
.job-profile-shell .secondary-btn:hover,
.job-profile-shell .icon-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.mobile-ops-page .job-table th,
.job-profile-shell .job-table th {
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-soft);
}

.mobile-ops-page .job-table td,
.job-profile-shell .job-table td {
  border-bottom-color: var(--border);
  color: var(--text-main);
}

.mobile-ops-page .job-table tbody tr:hover,
.job-profile-shell .job-table tbody tr:hover {
  background: rgba(255,255,255,.03);
}

.job-profile-shell .workflow-panel {
  border-color: var(--border);
}

.job-profile-shell .workflow-circle {
  border-color: var(--border-strong);
  background: #2b3440;
}

.job-profile-shell .workflow-step.active .workflow-circle {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(242, 96, 14, 0.12);
}

.job-profile-shell .workflow-step.in-progress .workflow-circle {
  border-color: var(--orange);
  background: #2b3440;
  box-shadow: 0 0 0 4px rgba(242, 96, 14, 0.18);
}

.job-profile-shell .profile-panel h3,
.job-profile-shell .job-info-panel h3,
.job-profile-shell .workflow-notes-panel h3,
.job-profile-shell .job-summary-panel h3,
.job-profile-shell .actions-panel h3 {
  border-bottom-color: var(--border);
}

.job-profile-shell .summary-divider {
  background: var(--border);
}


/* =====================================
   RECON DASHBOARD
===================================== */

.recon-page {
  overflow-x: hidden;
}

.recon-page .main {
  min-width: 0;
  overflow-x: hidden;
}

.recon-kpis {
  margin-bottom: 18px;
}

.recon-tabs {
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 10px;
  overflow-x: visible;
}

.recon-tabs .job-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
}

.recon-tabs .job-tab span {
  margin-left: 0;
}

.recon-queue-panel {
  min-width: 0;
}

.recon-table-wrap {
  overflow-x: visible;
}

.recon-table {
  table-layout: fixed;
}

.recon-table th,
.recon-table td {
  height: 58px;
  padding: 10px 8px;
  font-size: 12px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: middle;
}

.recon-table th {
  height: 48px;
  white-space: nowrap;
}

.recon-table td {
  line-height: 1.2;
}

.recon-table .status-badge,
.recon-table .priority-badge {
  align-items: center;
}

.recon-table th:nth-child(1),
.recon-table td:nth-child(1) {
  width: 8%;
}

.recon-table th:nth-child(2),
.recon-table td:nth-child(2) {
  width: 20%;
}

.recon-table th:nth-child(3),
.recon-table td:nth-child(3) {
  width: 9%;
  text-align: center;
}

.recon-table th:nth-child(4),
.recon-table td:nth-child(4) {
  width: 8%;
}

.recon-table th:nth-child(5),
.recon-table td:nth-child(5) {
  width: 11%;
}

.recon-table th:nth-child(6),
.recon-table td:nth-child(6) {
  width: 17%;
}

.recon-table th:nth-child(7),
.recon-table td:nth-child(7) {
  width: 15%;
}

.recon-table th:nth-child(8),
.recon-table td:nth-child(8) {
  width: 12%;
}

.recon-row {
  cursor: pointer;
}

.recon-row:hover {
  background: rgba(255,255,255,.03);
}

.recon-table .status-badge,
.recon-table .priority-badge {
  min-height: 30px;
  flex-shrink: 0;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.status-badge.received {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.14);
}

.status-badge.ready {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
}

.status-badge.delivered {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}

.priority-badge.normal {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.14);
}

.priority-badge.high-priority {
  color: #f97316;
  background: rgba(249, 115, 22, 0.14);
}

.priority-badge.grounded {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
}

.priority-badge.retail-ready {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
}


/* =====================================
   JOB FILE / VEHICLE PROFILE
===================================== */

.main {
  min-width: 0;
  overflow-x: hidden;
}

.panel {
  min-width: 0;
}

.workflow-panel,
.job-info-panel,
.workflow-notes-panel,
.job-summary-panel,
.actions-panel {
  border-radius: 8px;
}

.workflow-panel {
  min-height: auto;
  padding: 18px 22px 14px;
  margin-bottom: 18px;
}

.workflow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  position: relative;
}

.workflow-step {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.workflow-step::before {
  display: none;
  content: none;
}

.workflow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 23px;
  left: calc(50% + 28px);
  width: calc(100% - 56px);
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  z-index: 0;
}

.workflow-step:last-child::after {
  display: none;
}

.workflow-step.active {
  color: var(--orange);
}

.workflow-step.active:not(:last-child)::after {
  background: linear-gradient(
    90deg,
    rgba(242, 96, 14, 0.95),
    rgba(242, 96, 14, 0.72)
  );
}

.workflow-step span::before,
.workflow-circle::after {
  display: none;
  content: none;
}

.workflow-circle {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: #2b3440;
  position: relative;
  z-index: 1;
}

.workflow-step.active .workflow-circle {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(242, 96, 14, 0.12);
}

.workflow-step.in-progress .workflow-circle {
  border-color: var(--orange);
  background: #2b3440;
  box-shadow: 0 0 0 4px rgba(242, 96, 14, 0.18);
}

.workflow-step.in-progress span {
  color: var(--orange);
}

.workflow-icon {
  width: 20px;
  height: 20px;
  display: block;
  margin: 0;
  object-fit: contain;
  opacity: .95;
}

.job-file-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 240px 220px;
  gap: 12px;
  margin-top: 20px;
  align-items: start;
}

.workflow-notes-panel {
  min-width: 0;
}

.job-info-panel,
.workflow-notes-panel,
.job-summary-panel,
.actions-panel {
  min-height: 430px;
}

.profile-panel h3,
.job-info-panel h3,
.workflow-notes-panel h3,
.job-summary-panel h3,
.actions-panel h3 {
  margin: -22px -22px 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  font-weight: 600;
}

.actions-panel {
  padding-left: 20px;
  padding-right: 20px;
}

.actions-panel h3 {
  margin-left: -20px;
  margin-right: -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.actions-panel .full-btn {
  min-height: 46px;
  margin-bottom: 10px;
}

.actions-panel .action-btn {
  justify-content: center !important;
  gap: 11px;
  padding: 0 14px;
  font-size: 14px;
  overflow: hidden;
}

.actions-panel .action-btn span {
  min-width: 0;
  white-space: nowrap;
}

.actions-panel .action-icon {
  width: 21px;
  height: 21px;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.panel-title-row p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.info-group {
  margin-bottom: 18px;
}

.info-group label {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.info-group p {
  margin: 0;
  font-size: 14px;
}

.note-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,.02);
}

.note-card strong {
  display: block;
  margin-bottom: 8px;
}

.note-card p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.note-card small {
  color: var(--text-soft);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 14px;
  gap: 12px;
  min-width: 0;
}

.summary-row span,
.summary-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.summary-row.total {
  font-size: 16px;
  font-weight: 600;
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.summary-status-badge {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.2);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.workflow-feed {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
}

.feed-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.feed-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.feed-meta span {
  color: var(--text-muted);
  font-size: 11px;
}

.feed-content p {
  margin: 0;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
}

.job-profile-page .feed-content p,
.job-profile-page .note-composer textarea {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
}

.feed-photos {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.photo-thumb {
  width: 62px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(242,96,14,.18), rgba(255,255,255,.06));
}

.note-composer {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 10px;
  margin-top: 18px;
}

.note-composer textarea {
  resize: vertical;
  min-height: 46px;
  max-height: 160px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 10px;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  outline: none;
}

.note-composer textarea:focus {
  border-color: var(--orange);
}

.send-note-btn {
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text-main);
  cursor: pointer;
  font-size: 18px;
}

.send-note-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}


/* =====================================
   RECON PROFILE
===================================== */

.recon-profile-page {
  overflow-x: hidden;
}

.recon-profile-page .main {
  padding: 20px 28px 24px;
  min-width: 0;
  overflow-x: hidden;
}

.recon-profile-page .topbar {
  margin-bottom: 18px;
}

.recon-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recon-title-row h1 {
  margin: 0;
}

.recon-title-row .priority-badge {
  min-height: 24px;
  padding: 5px 10px;
}

.recon-profile-page .workflow-panel {
  padding: 16px 24px 14px;
  margin-bottom: 14px;
}

.recon-profile-page .workflow-step {
  min-width: 0;
  gap: 8px;
  font-size: 12px;
}

.recon-profile-page .workflow-step span {
  max-width: 145px;
  line-height: 1.25;
}

.recon-profile-page .workflow-circle {
  width: 31px;
  height: 31px;
}

.recon-profile-page .workflow-icon {
  width: 17px;
  height: 17px;
}

.recon-profile-page .workflow-step:not(:last-child)::after {
  top: 15.5px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
}

.recon-scope-panel {
  min-height: auto;
  margin-bottom: 14px;
  padding-bottom: 16px;
}

.recon-scope-panel h3,
.financial-summary-panel h3,
.vehicle-info-panel h3,
.recon-detail-panel h3 {
  margin: -22px -22px 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.recon-scope-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.5fr) minmax(280px, 1fr) minmax(180px, .7fr) minmax(180px, .7fr) 170px;
  gap: 0;
  align-items: stretch;
}

.recon-scope-standard {
  grid-template-columns: minmax(420px, 1.45fr) minmax(170px, .55fr) minmax(230px, .7fr) minmax(250px, .8fr);
}

.recon-scope-final {
  grid-template-columns: minmax(430px, 1.25fr) minmax(260px, .72fr) minmax(380px, 1fr);
}

.scope-section {
  border-right: 1px solid var(--border);
  padding: 0 16px;
}

.scope-section:first-child {
  padding-left: 0;
}

.scope-section:last-child {
  border-right: 0;
  padding-right: 0;
}

.scope-section,
.damage-card,
.financial-card {
  border-radius: 8px;
}

.damage-card,
.financial-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  padding: 10px;
}

.scope-section h4,
.damage-card strong,
.financial-card h4 {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.scope-subtitle {
  margin: -4px 0 10px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}

.damage-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.damage-card ul,
.scope-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 5px;
}

.damage-card li,
.scope-list li {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.damage-card li::before,
.scope-list li::before {
  content: "•";
  color: var(--orange);
  margin-right: 8px;
}

.photos-attached {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 12px;
}

.repair-total,
.edc-summary {
  display: grid;
  align-content: start;
  gap: 10px;
}

.repair-total strong,
.edc-summary strong {
  color: var(--text-main);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}

.photo-action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.photo-count {
  font-size: 38px;
  line-height: 1;
  font-weight: 600;
}

.recon-profile-layout {
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(520px, 1.45fr) 235px;
  gap: 12px;
  align-items: start;
}

.recon-notes-panel,
.financial-summary-panel,
.recon-profile-layout .actions-panel {
  min-height: 430px;
}

.scope-detail-list {
  display: grid;
  gap: 8px;
}

.scope-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  font-size: 12px;
}

.scope-detail-row span {
  color: var(--text-soft);
  min-width: 0;
}

.scope-detail-row strong {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.photos-row strong {
  white-space: nowrap;
}

.photo-count-inline {
  color: var(--text-main) !important;
  font-size: 18px;
  font-weight: 600;
}

.scope-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 7px;
}

.scope-info-grid .info-group {
  margin-bottom: 0;
}

.vehicle-vin-value {
  white-space: nowrap;
  font-size: 11px !important;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recon-profile-page .info-group {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 10px;
  margin-bottom: 7px;
  align-items: center;
  min-width: 0;
}

.recon-profile-page .info-group label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

.recon-profile-page .info-group p {
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vehicle-info-columns {
  display: contents;
}

.recon-feed-photos {
  gap: 8px;
  margin-top: 12px;
}

.recon-feed-photos .photo-thumb {
  width: 62px;
  height: 52px;
  border-radius: 8px;
}

.recon-profile-page .vehicle-thumb {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)),
    linear-gradient(160deg, #162330 0%, #0c1620 55%, #111f2b 100%);
  background-size: auto;
  background-position: center;
}

.recon-profile-page .thumb-1 {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    linear-gradient(160deg, #172635 0%, #0c1620 58%, #111f2b 100%);
}

.recon-profile-page .thumb-2 {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.012)),
    linear-gradient(160deg, #142231 0%, #09131d 58%, #132231 100%);
}

.recon-profile-page .thumb-3 {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.014)),
    linear-gradient(160deg, #1a2a39 0%, #0d1822 55%, #101d29 100%);
}

.recon-profile-page .thumb-4 {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012)),
    linear-gradient(160deg, #132230 0%, #0a141d 58%, #142433 100%);
}

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

.panel-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -22px -22px 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.financial-summary-panel .panel-heading-row h3 {
  margin: 0;
  padding: 0;
  border-bottom: 0;
  min-width: 0;
}

.edit-summary-btn {
  min-height: 32px;
  padding: 7px 13px;
  font-size: 12px;
}

.financial-card .summary-row {
  gap: 10px;
  min-height: 26px;
  margin-bottom: 6px;
  font-size: 12px;
}

.financial-card .summary-row span {
  color: var(--text-soft);
}

.financial-card .summary-row strong {
  text-align: right;
}

.positive-finance-row span,
.positive-finance-row strong {
  color: var(--green);
}

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

.recon-detail-panel {
  min-height: 225px;
}

.recon-detail-panel .summary-row {
  gap: 12px;
  margin-bottom: 9px;
  font-size: 12px;
}

.recon-detail-panel .summary-row span {
  color: var(--text-soft);
}

.recon-detail-panel .summary-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.alerts-panel .summary-row:last-child strong {
  color: var(--text-main);
}

.alerts-panel .summary-row strong {
  color: var(--text-main);
}

.alerts-panel .summary-row:nth-child(5) strong {
  color: var(--red);
}

.recon-profile-page .actions-panel .action-icon {
  filter: brightness(0) invert(1);
  opacity: .95;
}

.recon-profile-page .actions-panel .danger-btn .action-icon {
  filter: invert(34%) sepia(95%) saturate(1898%) hue-rotate(334deg) brightness(99%) contrast(89%);
}

.danger-btn:hover {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.65);
}

.check-mark {
  color: var(--green);
  margin-left: 10px;
}

@media (max-width: 1500px) {
  .recon-scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recon-scope-final {
    grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr);
  }

  .scope-vehicle-info {
    grid-column: span 2;
  }

  .photos-attached {
    grid-column: span 2;
  }

  .recon-profile-layout {
    grid-template-columns: minmax(0, 1fr) 235px;
  }

  .financial-summary-panel,
  .recon-profile-layout .actions-panel {
    min-height: auto;
  }

  .recon-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .recon-profile-layout,
  .recon-secondary-grid,
  .recon-scope-grid,
  .damage-card-grid,
  .financial-columns,
  .scope-info-grid {
    grid-template-columns: 1fr;
  }

  .scope-vehicle-info {
    grid-column: auto;
  }

  .photos-attached {
    grid-column: auto;
  }
}


/* =====================================
   RESPONSIVE
===================================== */

@media (max-width: 1200px) {
  .job-file-layout {
    grid-template-columns: 1fr;
  }

  .workflow-steps {
    overflow-x: auto;
    gap: 18px;
  }

  .workflow-step {
    min-width: 120px;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px;
  }

  .kpi-grid,
  .dashboard-grid,
  .status-grid,
  .queue-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .top-actions input {
    width: 100%;
  }
}


/* =====================================
   LOGIN PAGE
===================================== */

.login-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(242, 96, 14, 0.08), transparent 30%),
    linear-gradient(135deg, #050b11 0%, #08131d 45%, #04080d 100%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2vh, 24px);
  overflow-x: hidden;
}

.login-card,
.login-container {
  width: min(96vw, 1700px);
  height: min(90vh, 900px);
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 60fr) minmax(390px, 40fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
    var(--bg-panel);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.035),
    0 30px 80px rgba(0, 0, 0, 0.58);
}

.login-vehicle-panel {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background:
    linear-gradient(
      rgba(5, 10, 20, 0.18),
      rgba(5, 10, 20, 0.30)
    ),
    url("../Assets/images/login-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-vehicle-panel::before {
  display: none;
}

.login-vehicle-panel::after {
  display: none;
}

.login-vehicle-image,
img[alt="Genesis G70 in a dark garage"] {
  display: none !important;
}

.login-vehicle-overlay {
  display: none;
}

.login-brand-lockup {
  position: absolute;
  top: clamp(24px, 4.5vh, 54px);
  left: 73%;
  width: min(320px, 34%);
  z-index: 3;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 0;
  text-align: center;
  transform: translateX(-50%);
}

.login-logo {
  width: min(285px, 100%);
  height: auto;
  display: block;
  filter: none;
}

.login-brand-lockup p {
  margin: 1px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  text-shadow: 0 2px 14px rgba(0,0,0,.9);
}

.login-form-panel {
  display: grid;
  align-items: center;
  min-width: 0;
  border-left: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.032), rgba(255,255,255,.012)),
    rgba(13, 24, 34, .94);
}

.login-form-wrap {
  width: min(390px, 100%);
  margin: 0 auto;
  padding: clamp(42px, 7vh, 76px) clamp(34px, 4vw, 58px);
}

.login-heading {
  margin-bottom: 28px;
}

.login-heading h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.login-heading p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
}

.login-field input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(5, 11, 17, 0.28);
  color: var(--text-main);
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-field input::placeholder {
  color: var(--text-muted);
}

.login-field input:focus {
  border-color: rgba(242, 96, 14, 0.72);
  background: rgba(5, 11, 17, 0.42);
  box-shadow: 0 0 0 3px rgba(242, 96, 14, 0.12);
}

.pin-input-wrap {
  position: relative;
}

.pin-input-wrap input {
  padding-right: 48px;
}

.pin-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  transform: translateY(-50%);
  cursor: pointer;
}

.pin-eye-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pin-eye-btn:hover {
  color: var(--orange);
}

.login-error {
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.login-submit {
  height: 50px;
  margin-top: 4px;
  border: 1px solid rgba(242, 96, 14, 0.85);
  border-radius: 8px;
  background: linear-gradient(180deg, #ff7a1a, var(--orange));
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(242, 96, 14, 0.22);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-submit:hover {
  box-shadow: 0 14px 30px rgba(242, 96, 14, 0.30);
}

.forgot-pin {
  justify-self: center;
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.forgot-pin:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .login-shell {
    padding: 18px;
  }

  .login-card {
    grid-template-columns: 1fr;
    width: min(94vw, 620px);
    height: auto;
    min-height: auto;
  }

  .login-vehicle-panel {
    min-height: 260px;
  }

  .login-brand-lockup {
    top: 38px;
    left: 50%;
    width: min(300px, 76%);
    transform: translateX(-50%);
  }

  .login-form-panel {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .login-form-wrap {
    width: min(420px, 100%);
    padding: 32px 24px 36px;
  }
}

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

  .login-card {
    width: 100%;
    height: auto;
    min-height: 100vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .login-vehicle-panel {
    min-height: 210px;
  }

  .login-logo {
    width: min(230px, 78%);
  }

  .login-heading h1 {
    font-size: 27px;
  }
}


/* =====================================
   FACILITIES PAGE
===================================== */

.facilities-page {
  grid-template-columns: 240px minmax(1180px, 1fr);
  width: 100vw;
  min-width: 0;
  overflow-x: auto;
}

.facilities-page .main {
  min-width: 1180px;
  overflow-x: visible;
}

.facilities-page .topbar {
  align-items: flex-start;
}

.facilities-actions {
  flex-wrap: nowrap;
}

.facility-search {
  width: 280px;
  height: 42px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0 14px;
  border-radius: 8px;
  outline: none;
  font: inherit;
  font-size: 14px;
}

.facility-search::placeholder {
  color: var(--text-muted);
}

.facilities-kpis {
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  min-width: 1120px;
}

.facilities-kpis .kpi-card {
  min-height: 125px;
  padding: 18px 18px;
}

.facilities-kpis .kpi-layout {
  gap: 14px;
}

.facilities-kpis .kpi-content p {
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
}

.facilities-kpis .kpi-content h2 {
  font-size: 32px;
  white-space: nowrap;
  letter-spacing: -0.6px;
}

.facilities-kpis .revenue .kpi-content h2 {
  font-size: 31px;
}

.facilities-kpis .revenue .kpi-content small {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.facilities-kpis .kpi-content small {
  color: var(--text-soft);
  white-space: normal;
  line-height: 1.25;
  font-size: 12px;
}

.facility-queue-panel {
  min-width: 1120px;
}

.facility-table-wrap {
  overflow-x: visible;
}

.facility-table {
  table-layout: fixed;
  min-width: 1120px;
}

.facility-table th,
.facility-table td {
  height: 66px;
  padding: 12px 14px;
  vertical-align: middle;
  line-height: 1.2;
}

.facility-table th {
  height: 48px;
  white-space: nowrap;
}

.facility-table th:nth-child(1),
.facility-table td:nth-child(1) {
  width: 24%;
}

.facility-table th:nth-child(2),
.facility-table td:nth-child(2) {
  width: 14%;
}

.facility-table th:nth-child(3),
.facility-table td:nth-child(3) {
  width: 15%;
}

.facility-table th:nth-child(4),
.facility-table td:nth-child(4) {
  width: 12%;
}

.facility-table th:nth-child(5),
.facility-table td:nth-child(5) {
  width: 10%;
}

.facility-table th:nth-child(6),
.facility-table td:nth-child(6) {
  width: 13%;
}

.facility-table th:nth-child(7),
.facility-table td:nth-child(7) {
  width: 12%;
}

.facility-row {
  cursor: pointer;
}

.facility-row:hover {
  background: rgba(255,255,255,.03);
}

.facility-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.facility-name-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.facility-logo-mark {
  width: 54px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
}

.facility-logo-mark.blue-mound,
.facility-logo-mark.alliance {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
}

.facility-logo-mark.hutchins,
.facility-logo-mark.prairie,
.facility-logo-mark.protech {
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
}

.facility-logo-mark.arlington,
.facility-logo-mark.maverick {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.12);
}

.facility-logo-mark.mesquite,
.facility-logo-mark.denton,
.facility-logo-mark.legacy {
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
}

.capacity-cell {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.capacity-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.capacity-fill {
  height: 100%;
  border-radius: 999px;
}

.capacity-fill.healthy {
  background: var(--green);
}

.capacity-fill.warning {
  background: var(--yellow);
}

.capacity-fill.full {
  background: var(--red);
}

.status-badge.facility-approved {
  color: var(--green);
  background: rgba(34, 197, 94, 0.14);
}

.status-badge.facility-onboarding {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.14);
}

.status-badge.facility-review {
  color: var(--yellow);
  background: rgba(250, 204, 21, 0.14);
}

.status-badge.facility-denied {
  color: var(--red);
  background: rgba(239, 68, 68, 0.14);
}

.facility-table .status-badge {
  max-width: 100%;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .facilities-page {
    grid-template-columns: 240px minmax(1180px, 1fr);
    width: 100vw;
    min-width: 0;
    overflow-x: auto;
  }

  .facilities-page .sidebar {
    display: flex;
  }

  .facilities-page .main {
    min-width: 1180px;
    padding: 28px;
  }

  .facilities-page .topbar {
    flex-direction: row;
    align-items: flex-start;
  }

  .facilities-page .top-actions {
    width: auto;
    flex-wrap: nowrap;
  }

  .facilities-page .kpi-grid {
    grid-template-columns: repeat(5, minmax(210px, 1fr));
  }
}


/* =====================================
   FACILITY PROFILE PAGE
===================================== */

.facility-profile-page {
  overflow-x: hidden;
}

.facility-profile-page .main {
  min-width: 0;
  overflow-x: hidden;
}

.facility-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
}

.profile-back-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 14px;
}

.profile-back-link:hover {
  color: var(--orange);
}

.facility-title-block h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.facility-title-block > p {
  margin: 5px 0 0;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 500;
}

.facility-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 13px;
}

.facility-meta-row > span:not(:last-child) {
  padding-right: 12px;
  border-right: 1px solid var(--border-strong);
}

.facility-meta-row strong {
  color: var(--text-main);
  font-weight: 500;
}

.facility-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.facility-edit-btn img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.facility-profile-kpis {
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  margin-bottom: 24px;
}

.facility-profile-kpis .kpi-card {
  min-height: 122px;
  padding: 18px 20px;
}

.facility-profile-kpis .kpi-icon.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.facility-profile-kpis .kpi-icon.neutral img {
  filter: brightness(0) invert(1);
  opacity: .9;
}

.facility-profile-kpis .kpi-content p,
.facility-profile-kpis .kpi-content small {
  white-space: normal;
}

.facility-profile-kpis .kpi-content p {
  max-width: 100%;
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.facility-profile-kpis .kpi-content h2 {
  font-size: 30px;
  white-space: nowrap;
}

.facility-profile-kpis .revenue .kpi-content p,
.facility-profile-kpis .revenue .kpi-content small {
  white-space: normal;
  overflow-wrap: break-word;
}

.facility-profile-kpis .revenue .kpi-content h2 {
  font-size: 28px;
  letter-spacing: -0.6px;
}

.facility-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  align-items: stretch;
}

.facility-profile-grid .panel {
  min-height: 390px;
  padding: 18px 18px;
  overflow: hidden;
}

.facility-profile-grid h3,
.facility-actions-panel h3 {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: break-word;
}

.facility-performance-panel h3 span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
}

.facility-contact-panel {
  grid-column: 1 / -1;
  min-height: auto !important;
}

.contact-list {
  display: grid;
  grid-template-columns: 1.25fr .9fr 1.35fr 1.3fr 1fr;
  gap: 18px;
}

.contact-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.contact-icon {
  color: var(--text-main);
  font-size: 17px;
  line-height: 1.1;
  opacity: .92;
}

.contact-item label,
.team-group label {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 7px;
}

.contact-item p {
  margin: 0;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-item a {
  color: var(--text-main);
  text-decoration: none;
}

.email-contact a {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  font-size: 12px;
}

.contact-item a:hover {
  color: var(--orange);
}

.facility-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.facility-panel-title h3 {
  margin-bottom: 0;
}

.text-link-btn {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.text-link-btn:hover {
  color: var(--orange);
}

.vehicle-list {
  margin: 16px -18px 0;
  border-top: 1px solid var(--border);
}

.vehicle-row {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: center;
  padding: 12px 18px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.vehicle-row:hover {
  background: rgba(255,255,255,.03);
}

.vehicle-row strong {
  font-size: 13px;
  font-weight: 600;
}

.vehicle-row span {
  min-width: 0;
  color: var(--text-soft);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-status {
  justify-self: end;
  min-width: 0;
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  max-width: 100%;
  line-height: 1.2;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.vehicle-status.repair,
.vehicle-status.ready {
  color: var(--green);
}

.vehicle-status.approval {
  color: var(--yellow);
}

.vehicle-status.parts {
  color: #38bdf8;
}

.vehicle-status.quality {
  color: #c084fc;
}

.team-group {
  margin-bottom: 26px;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  min-width: 0;
}

.team-member strong {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: rgba(242, 96, 14, 0.16);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
}

.team-avatar.tech {
  background: rgba(96, 165, 250, 0.14);
}

.performance-list {
  display: grid;
}

.performance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.performance-row:last-child {
  border-bottom: 0;
}

.performance-row span {
  color: var(--text-soft);
  min-width: 0;
  overflow-wrap: break-word;
}

.performance-row strong {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  justify-self: end;
}

.warning-text {
  color: var(--yellow);
}

.facility-utilization-panel {
  display: flex;
  flex-direction: column;
}

.utilization-chart {
  display: grid;
  place-items: center;
  padding: 18px 0 24px;
}

.utilization-ring {
  width: min(170px, 78%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle, var(--bg-panel) 0 56%, transparent 57%),
    conic-gradient(var(--green) 0 67%, rgba(255,255,255,.12) 67% 100%);
}

.utilization-ring strong {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.utilization-ring span {
  color: var(--text-soft);
  font-size: 12px;
  margin-top: 8px;
}

.utilization-list {
  display: grid;
  gap: 18px;
  margin-top: auto;
}

.utilization-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-soft);
  font-size: 13px;
}

.utilization-list span {
  min-width: 0;
  overflow-wrap: break-word;
}

.utilization-list strong {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
}

.facility-actions-panel {
  min-height: auto;
}

.facility-action-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
}

.facility-action-btn {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-main);
  min-width: 0;
  text-align: center;
}

.facility-action-btn span {
  min-width: 0;
  overflow-wrap: break-word;
}

.facility-action-btn img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  opacity: .92;
  flex-shrink: 0;
}

.facility-action-btn.danger {
  color: var(--red);
}

.facility-action-btn.danger img {
  filter: none;
}

@media (max-width: 1180px) {
  .facility-profile-page .main {
    overflow-x: auto;
  }

  .facility-profile-header,
  .facility-profile-kpis,
  .facility-profile-grid,
  .facility-actions-panel {
    min-width: 1120px;
  }

  .facility-profile-page .kpi-grid {
    grid-template-columns: repeat(5, minmax(190px, 1fr));
  }
}


/* =====================================
   CLIENTS PAGE
===================================== */

.clients-page {
  overflow-x: hidden;
}

.clients-page .main {
  min-width: 0;
  overflow-x: hidden;
}

.clients-actions {
  flex-wrap: nowrap;
}

.client-search-wrap {
  position: relative;
  min-width: 0;
}

.client-search-wrap span {
  position: absolute;
  right: 13px;
  top: 50%;
  color: var(--text-soft);
  transform: translateY(-50%);
  pointer-events: none;
}

.client-search {
  padding-right: 36px;
}

.clients-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.clients-section-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.client-portfolio-panel {
  min-height: auto;
  margin-bottom: 12px;
  padding: 18px;
}

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

.client-card {
  min-width: 0;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
    rgba(5, 11, 17, 0.24);
  padding: 14px;
  overflow: hidden;
}

.client-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 16px;
}

.client-card-head > div {
  min-width: 0;
}

.client-logo-upload {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.client-logo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.client-logo,
.client-mini-logo {
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-weight: 700;
}

.client-logo {
  width: 42px;
  height: 42px;
  font-size: 15px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}

.client-mini-logo {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.client-logo.carvana,
.client-mini-logo.carvana {
  background: #0ea5e9;
}

.client-logo.adesa,
.client-mini-logo.adesa {
  background: #f8fafc;
  color: #0369a1;
}

.client-logo.drivetime,
.client-mini-logo.drivetime {
  background: #22c55e;
}

.client-logo.enterprise,
.client-mini-logo.enterprise {
  background: #16a34a;
  font-size: 26px;
}

.client-logo.fleet,
.client-mini-logo.fleet {
  background: var(--orange);
}

.client-logo.local,
.client-mini-logo.local {
  background: #374151;
}

.client-card h4 {
  margin: 0;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: break-word;
}

.client-card p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 11px;
}

.client-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.client-card-head > .client-status {
  grid-column: 2;
  justify-self: end;
  margin-top: 7px;
}

.client-status.active {
  color: var(--green);
  background: rgba(34, 197, 94, 0.14);
}

.client-status.onboarding {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
}

.client-status.inactive {
  color: var(--text-soft);
  background: rgba(148, 163, 184, 0.14);
}

.client-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.client-card-metrics span,
.client-revenue-row span,
.distribution-summary span {
  display: block;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.2;
}

.client-card-metrics strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
  font-weight: 600;
}

.client-revenue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  grid-template-areas:
    "revenue chart"
    "trend chart";
  gap: 2px 10px;
  align-items: end;
}

.client-revenue-row > div {
  grid-area: revenue;
  min-width: 0;
}

.client-revenue-row strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}

.client-trend {
  grid-area: trend;
  justify-self: start;
  align-self: end;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.sparkline {
  grid-area: chart;
  width: 70px;
  height: 30px;
  border-radius: 6px;
  display: block;
  overflow: visible;
  background: linear-gradient(180deg, rgba(14,165,233,.12), rgba(14,165,233,0));
}

.sparkline-line {
  fill: none;
  stroke: #18aef7;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline-fill {
  fill: url("#sparkFill");
  stroke: none;
}

.client-middle-grid {
  display: grid;
  grid-template-columns: .92fr 1.28fr;
  gap: 12px;
  margin-bottom: 12px;
}

.pending-client-panel,
.client-distribution-panel,
.client-directory-panel {
  min-height: auto;
  padding: 18px;
}

.client-action-list {
  display: grid;
}

.client-action-row {
  min-width: 0;
  min-height: 55px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px 16px;
  gap: 12px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
  padding: 8px 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.client-action-row:hover {
  background: rgba(255,255,255,.03);
}

.client-action-row strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.client-action-row small {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  margin-top: 2px;
}

.client-action-row em {
  justify-self: center;
  min-width: 34px;
  border: 1px solid rgba(250, 204, 21, .5);
  border-radius: 7px;
  color: var(--yellow);
  padding: 5px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.client-action-row b {
  color: var(--text-soft);
  font-size: 20px;
  font-weight: 400;
}

.client-action-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 14px;
}

.client-action-icon.approval { color: var(--yellow); background: rgba(250,204,21,.14); }
.client-action-icon.tow { color: var(--orange); background: rgba(242,96,14,.14); }
.client-action-icon.rep { color: #c084fc; background: rgba(192,132,252,.14); }
.client-action-icon.docs { color: #38bdf8; background: rgba(56,189,248,.14); }
.client-action-icon.location { color: var(--green); background: rgba(34,197,94,.14); }
.client-action-icon.inquiry { color: #14b8a6; background: rgba(20,184,166,.14); }

.client-distribution-select {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: var(--text-main);
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
}

.distribution-layout {
  display: grid;
  grid-template-columns: .78fr 1fr 1.35fr;
  gap: 20px;
  align-items: center;
}

.distribution-summary {
  display: grid;
  gap: 22px;
}

.distribution-summary strong {
  display: block;
  color: var(--text-main);
  font-size: 25px;
  font-weight: 600;
  margin-top: 4px;
}

.distribution-summary em {
  font-size: 12px;
  font-style: normal;
  vertical-align: middle;
}

.distribution-summary small {
  color: var(--text-soft);
  font-size: 12px;
}

.distribution-donut {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  min-height: 230px;
}

.client-donut {
  width: 190px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  background:
    radial-gradient(circle, var(--bg-panel) 0 54%, transparent 55%),
    conic-gradient(#0ea5e9 0 40%, #38bdf8 40% 67%, #22c55e 67% 85%, #facc15 85% 94%, #f97316 94% 99%, #64748b 99% 100%);
}

.client-donut strong {
  font-size: 14px;
  font-weight: 700;
}

.client-donut span {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.25;
  margin-top: 4px;
}

.distribution-table {
  width: 100%;
  border-collapse: collapse;
}

.distribution-table th,
.distribution-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-align: left;
}

.distribution-table th {
  color: var(--text-soft);
  font-weight: 500;
}

.legend-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 8px;
}

.enterprise-dot { background: #0ea5e9; }
.carvana-dot { background: #38bdf8; }
.drivetime-dot { background: #22c55e; }
.adesa-dot { background: #facc15; }
.fleet-dot { background: #f97316; }
.local-dot { background: #64748b; }

.directory-header {
  margin-bottom: 12px;
}

.directory-controls {
  display: flex;
  gap: 10px;
}

.client-search-wrap.compact .client-search {
  width: 220px;
  height: 38px;
}

.client-table-wrap {
  overflow-x: hidden;
}

.client-directory-table {
  table-layout: fixed;
}

.client-directory-table th,
.client-directory-table td {
  height: 44px;
  padding: 8px 12px;
  font-size: 12px;
  vertical-align: middle;
}

.client-directory-table th:nth-child(1),
.client-directory-table td:nth-child(1) { width: 16%; }
.client-directory-table th:nth-child(2),
.client-directory-table td:nth-child(2) { width: 8%; }
.client-directory-table th:nth-child(3),
.client-directory-table td:nth-child(3) { width: 10%; text-align: center; }
.client-directory-table th:nth-child(4),
.client-directory-table td:nth-child(4) { width: 10%; text-align: center; }
.client-directory-table th:nth-child(5),
.client-directory-table td:nth-child(5) { width: 10%; text-align: center; }
.client-directory-table th:nth-child(6),
.client-directory-table td:nth-child(6) { width: 11%; }
.client-directory-table th:nth-child(7),
.client-directory-table td:nth-child(7) { width: 14%; }
.client-directory-table th:nth-child(8),
.client-directory-table td:nth-child(8) { width: 9%; }
.client-directory-table th:nth-child(9),
.client-directory-table td:nth-child(9) { width: 8%; }
.client-directory-table th:nth-child(10),
.client-directory-table td:nth-child(10) { width: 4%; text-align: center; }

.client-directory-table td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.client-directory-table td:first-child strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-row {
  cursor: pointer;
}

.client-row:hover {
  background: rgba(255,255,255,.03);
}

.client-directory-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 13px;
}

.pagination-controls {
  display: flex;
  gap: 8px;
}

.active-page {
  border-color: var(--orange);
  color: var(--orange);
}

@media (max-width: 1300px) {
  .client-portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .distribution-layout {
    grid-template-columns: .8fr .9fr 1.2fr;
  }
}

@media (max-width: 980px) {
  .clients-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .clients-actions {
    width: 100%;
  }

  .client-search-wrap {
    flex: 1;
  }

  .client-search {
    width: 100%;
  }

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

  .distribution-layout {
    grid-template-columns: 1fr;
  }

  .distribution-donut {
    border: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
  }
}


/* =====================================
   CLIENT PROFILE PAGE
===================================== */

.client-profile-page {
  overflow-x: hidden;
}

.client-profile-page .main {
  min-width: 0;
  overflow-x: hidden;
}

.client-profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

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

.client-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.client-title-row h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.client-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.client-profile-meta span:not(:last-child) {
  padding-right: 10px;
  border-right: 1px solid var(--border-strong);
}

.client-profile-meta strong {
  color: var(--text-main);
  font-weight: 500;
}

.client-profile-kpis {
  margin-bottom: 18px;
}

.client-profile-kpis .kpi-content p,
.client-profile-kpis .kpi-content small {
  white-space: normal;
}

.client-profile-kpis .kpi-content h2 {
  font-size: 31px;
}

.client-info-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.client-profile-panel {
  min-height: 360px;
  padding: 18px;
}

.client-profile-panel h3,
.client-facilities-performance-panel h3,
.client-performance-panel h3,
.billing-summary-panel h3,
.client-action-center-panel h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
}

.client-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 18px;
}

.client-info-list div,
.billing-metric-row div,
.performance-metric-grid div {
  min-width: 0;
}

.client-info-list span,
.billing-metric-row span,
.performance-metric-grid span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  margin-bottom: 5px;
}

.client-info-list strong,
.billing-metric-row strong,
.performance-metric-grid strong {
  display: block;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.client-info-list .span-row {
  grid-column: 1 / -1;
}

.representative-list,
.service-location-list {
  display: grid;
  gap: 12px;
}

.rep-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.rep-card strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.rep-card small {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

.rep-card em {
  color: #60a5fa;
  background: rgba(96,165,250,.14);
  border-radius: 7px;
  padding: 5px 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
}

.service-location-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.service-location-list strong,
.service-location-list span {
  font-size: 13px;
}

.service-location-list span {
  color: var(--text-soft);
}

.client-management-grid {
  display: grid;
  grid-template-columns: .9fr 1.35fr;
  gap: 14px;
  margin-bottom: 14px;
}

.client-profile-distribution {
  display: grid;
  grid-template-columns: .78fr .9fr 1.45fr;
  gap: 18px;
  align-items: center;
}

.client-facilities-performance-panel,
.client-performance-panel,
.billing-summary-panel {
  min-height: auto;
  padding: 18px;
  margin-bottom: 14px;
}

.client-facilities-performance-table {
  table-layout: fixed;
}

.client-facilities-performance-table th,
.client-facilities-performance-table td {
  height: 42px;
  padding: 8px 12px;
  font-size: 12px;
}

.client-facilities-performance-table th:not(:first-child),
.client-facilities-performance-table td:not(:first-child) {
  text-align: center;
}

.client-facilities-performance-table tbody tr {
  cursor: pointer;
}

.client-facilities-performance-table tbody tr:hover {
  background: rgba(255,255,255,.03);
}

.distribution-fixed-label {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: var(--text-main);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.client-finance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.performance-metric-grid,
.billing-metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.performance-metric-grid em {
  font-style: normal;
  font-size: 11px;
}

.payment-history-table th,
.payment-history-table td {
  height: 42px;
  padding: 8px 12px;
  font-size: 12px;
}

.payment-history-title {
  margin: 8px 0 10px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.client-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: start;
}

.client-notes-panel {
  min-height: 420px;
}

.pinned-note {
  border-left: 3px solid var(--orange);
  padding-left: 12px;
}

.client-note-tag {
  display: inline-flex;
  margin-right: 6px;
  color: #60a5fa;
  font-weight: 700;
}

.client-action-center-panel {
  min-height: auto;
  padding: 18px;
}

.client-action-center-panel .action-btn {
  justify-content: center !important;
  min-height: 44px;
  font-size: 13px;
}

.client-action-center-panel .action-icon {
  filter: brightness(0) invert(1);
}

@media (max-width: 1200px) {
  .client-info-grid,
  .client-management-grid,
  .client-finance-grid,
  .client-bottom-grid {
    grid-template-columns: 1fr;
  }

  .client-profile-distribution {
    grid-template-columns: 1fr;
  }

  .performance-metric-grid,
  .billing-metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =====================================
   REPORTS PAGE
===================================== */

.reports-page {
  overflow-x: hidden;
}

.reports-page .main {
  min-width: 0;
  overflow-x: hidden;
}

.reports-actions {
  flex-wrap: nowrap;
}

.reports-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.report-kpi-card {
  min-height: 170px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.report-kpi-card .kpi-layout {
  align-items: flex-start;
}

.report-kpi-card .kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.report-kpi-card .kpi-content p,
.report-kpi-card .kpi-content small {
  white-space: normal;
  line-height: 1.25;
}

.report-kpi-card .kpi-content h2 {
  font-size: 30px;
  white-space: nowrap;
  letter-spacing: -0.6px;
}

.report-blue { background: rgba(14, 165, 233, .16); color: #0ea5e9; }
.report-green { background: rgba(34, 197, 94, .16); color: var(--green); }
.report-purple { background: rgba(139, 92, 246, .16); color: var(--purple); }
.report-orange { background: rgba(242, 96, 14, .16); color: var(--orange); }
.report-yellow { background: rgba(250, 204, 21, .16); color: var(--yellow); }

.report-mini-chart {
  width: 100%;
  height: 40px;
  display: block;
  margin-top: 12px;
  overflow: visible;
}

.report-mini-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-mini-chart.blue { color: #0ea5e9; }
.report-mini-chart.green { color: var(--green); }
.report-mini-chart.purple { color: var(--purple); }
.report-mini-chart.orange { color: var(--orange); }
.report-mini-chart.yellow { color: var(--yellow); }

.report-builder-panel {
  min-height: auto;
  margin-bottom: 18px;
  padding: 28px;
}

.report-builder-heading {
  text-align: center;
  margin-bottom: 24px;
}

.report-builder-heading h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.report-builder-heading p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.report-builder-form {
  width: min(900px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
  align-items: end;
}

.report-builder-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.report-builder-form label span {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
}

.report-builder-form select,
.report-builder-form input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: var(--text-main);
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.report-builder-form select:focus,
.report-builder-form input:focus {
  border-color: rgba(242, 96, 14, .72);
  box-shadow: 0 0 0 3px rgba(242, 96, 14, .12);
}

.report-builder-form .wide-field {
  grid-column: span 2;
}

.report-builder-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 2px;
}

.report-builder-actions .primary-btn,
.report-builder-actions .secondary-btn {
  min-width: 150px;
  min-height: 46px;
}

.report-categories-panel {
  min-height: auto;
  padding: 22px;
}

.report-categories-panel > h3 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 600;
}

.report-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.report-category-card {
  min-height: 185px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  padding: 20px;
}

.report-category-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.report-category-icon img {
  width: 23px;
  height: 23px;
  filter: brightness(0) invert(1);
}

.report-category-icon.operations {
  background: rgba(14, 165, 233, .18);
}

.report-category-icon.financial {
  background: rgba(34, 197, 94, .18);
  color: var(--green);
}

.report-category-icon.facility {
  background: rgba(139, 92, 246, .18);
}

.report-category-card h4 {
  margin: 2px 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.report-category-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.report-category-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.report-category-footer strong {
  font-size: 14px;
}

.report-category-footer .text-link-btn {
  color: var(--orange);
}

@media (max-width: 1180px) {
  .reports-kpis {
    grid-template-columns: repeat(5, minmax(165px, 1fr));
  }

  .report-kpi-card .kpi-content h2 {
    font-size: 25px;
  }

  .report-builder-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-builder-form .wide-field {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .reports-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .reports-actions {
    width: 100%;
  }

  .reports-kpis,
  .report-category-grid {
    grid-template-columns: 1fr;
  }

  .report-builder-form {
    grid-template-columns: 1fr;
  }
}

/* =====================================
   SETTINGS PAGE
===================================== */
.settings-page {
  overflow-x: hidden;
}

.settings-page .main {
  min-width: 0;
  overflow-x: hidden;
}

.settings-actions {
  flex-wrap: nowrap;
}

.settings-notification-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.settings-notification-btn img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.settings-notification-btn span {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.settings-profile-btn {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: var(--text-main);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.settings-profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(96,165,250,.2);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
}

.settings-profile-btn b {
  color: var(--text-soft);
  font-size: 10px;
}

.settings-overview-panel,
.settings-categories-panel,
.settings-recent-panel {
  min-height: auto;
  padding: 18px;
  margin-bottom: 16px;
}

.settings-overview-panel h3,
.settings-categories-panel h3,
.settings-recent-panel h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
}

.settings-overview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.settings-kpi-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  padding: 14px;
  overflow: hidden;
}

.settings-kpi-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 12px;
}

.settings-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--orange-soft);
  color: var(--orange);
}

.settings-kpi-icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.settings-kpi-main strong {
  display: block;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  overflow-wrap: anywhere;
}

.settings-kpi-main p {
  margin: 5px 0 0;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.25;
}

.settings-kpi-card small {
  display: block;
  min-height: 15px;
  margin-bottom: 8px;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.settings-mini-chart {
  width: 100%;
  height: 34px;
  display: block;
  color: var(--orange);
  overflow: visible;
}

.settings-mini-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.settings-category-card {
  min-height: 170px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  padding: 16px;
  color: var(--text-main);
  text-decoration: none;
  overflow: hidden;
}

.settings-category-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--orange-soft);
  color: var(--orange);
}

.settings-category-icon img {
  width: 22px;
  height: 22px;
}

.settings-category-icon span {
  font-size: 22px;
  font-weight: 700;
}

.settings-category-card h4 {
  margin: 0 0 7px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.settings-category-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.settings-category-card small {
  grid-column: 1 / -1;
  color: var(--text-soft);
  font-size: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.settings-category-card button {
  grid-column: 1 / -1;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.settings-category-card button span {
  color: var(--orange);
}

.settings-category-card:hover {
  border-color: rgba(242,96,14,.45);
  background: rgba(242,96,14,.06);
}

.settings-recent-table {
  table-layout: fixed;
}

.settings-recent-table th,
.settings-recent-table td {
  height: 42px;
  padding: 8px 12px;
  font-size: 12px;
  vertical-align: middle;
}

.settings-recent-table th:nth-child(1),
.settings-recent-table td:nth-child(1) { width: 20%; }

.settings-recent-table th:nth-child(2),
.settings-recent-table td:nth-child(2) { width: 18%; }

.settings-recent-table th:nth-child(3),
.settings-recent-table td:nth-child(3) { width: 18%; }

.settings-recent-table th:nth-child(4),
.settings-recent-table td:nth-child(4) { width: 24%; }

.settings-recent-table th:nth-child(5),
.settings-recent-table td:nth-child(5) { width: 20%; }

@media (max-width: 1300px) {
  .settings-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .settings-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-actions {
    width: 100%;
  }

  .settings-overview-grid,
  .settings-category-grid {
    grid-template-columns: 1fr;
  }
}

/* Reports KPI overflow guard */
.report-kpi-card,
.report-kpi-card .kpi-layout,
.report-kpi-card .kpi-content {
  min-width: 0;
}

.report-kpi-card .kpi-content {
  overflow: hidden;
}

.report-kpi-card .kpi-content h2 {
  max-width: 100%;
  font-size: clamp(24px, 2.1vw, 30px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  line-height: 1.05;
}

.report-kpi-card .kpi-content small {
  max-width: 100%;
  overflow-wrap: normal;
}

/* =====================================
   EXECUTIVE GLASS REFRESH
   Visual polish only. No layout changes.
===================================== */

:root {
  --glass-surface: rgba(255, 255, 255, 0.035);
  --glass-surface-strong: rgba(255, 255, 255, 0.052);
  --glass-border: rgba(255, 255, 255, 0.085);
  --glass-border-strong: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  --glass-shadow-deep: 0 18px 58px rgba(0, 0, 0, 0.28);
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(242, 96, 14, 0.095), transparent 27%),
    radial-gradient(circle at 88% 10%, rgba(45, 120, 255, 0.055), transparent 28%),
    radial-gradient(circle at 48% 115%, rgba(255, 255, 255, 0.035), transparent 34%),
    linear-gradient(135deg, #050b11 0%, #08131d 45%, #04080d 100%);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
    rgba(5, 11, 17, 0.9);
  border-right-color: var(--glass-border);
  box-shadow: 10px 0 36px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-item {
  border-color: transparent;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.nav-item:hover,
.nav-item.active {
  background:
    linear-gradient(180deg, rgba(242, 96, 14, 0.17), rgba(242, 96, 14, 0.095));
  border-color: rgba(242, 96, 14, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 10px 26px rgba(242, 96, 14, 0.08);
}

.nav-svg {
  filter: drop-shadow(0 4px 12px rgba(242, 96, 14, 0.18));
}

.topbar h1,
.settings-topbar h1 {
  font-weight: 700;
  letter-spacing: -0.25px;
}

.topbar p,
.settings-topbar p,
.panel p,
.kpi-card p,
.settings-category-card p {
  color: rgba(214, 220, 231, 0.68);
}

.panel,
.kpi-card,
.workflow-panel,
.job-info-panel,
.workflow-notes-panel,
.job-summary-panel,
.actions-panel,
.recon-queue-panel,
.recon-scope-panel,
.recon-detail-panel,
.financial-card,
.settings-category-card,
.settings-overview-card,
.client-portfolio-panel,
.client-portfolio-card,
.client-action-panel,
.client-distribution-panel,
.client-directory-panel,
.client-profile-panel,
.facility-profile-panel,
.report-builder-panel,
.report-categories-panel,
.report-category-card {
  border-color: var(--glass-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.018)),
    rgba(13, 24, 34, 0.82);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.panel:hover,
.kpi-card:hover,
.client-portfolio-card:hover,
.settings-category-card:hover,
.report-category-card:hover {
  border-color: var(--glass-border-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.024)),
    rgba(13, 24, 34, 0.86);
  box-shadow: var(--glass-shadow-deep);
}

.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.055), transparent 22%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 44%);
}

.kpi-card > *,
.panel > * {
  position: relative;
}

.kpi-icon,
.settings-kpi-icon,
.report-category-icon,
.settings-category-icon {
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    var(--orange-soft);
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), 0 0 24px rgba(242, 96, 14, 0.08);
}

.kpi-content h2,
.settings-kpi-main strong,
.panel-count,
.queue-value,
.summary-row strong,
.financial-card .summary-row strong,
.recon-detail-panel .summary-row strong {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.panel h3,
.queue-header h3,
.recon-scope-panel h3,
.recon-detail-panel h3,
.actions-panel h3,
.workflow-notes-panel h3,
.job-info-panel h3,
.settings-section-title,
.report-builder-panel h3,
.report-categories-panel h3 {
  font-weight: 700;
  letter-spacing: -0.1px;
}

.primary-btn,
.secondary-btn,
.icon-btn,
.status-select,
.login-submit,
.settings-category-card button,
.text-link-btn {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.primary-btn,
.login-submit,
.status-select {
  background:
    linear-gradient(180deg, rgba(255, 139, 46, 0.98), rgba(242, 96, 14, 0.94));
  border-color: rgba(255, 149, 76, 0.76);
  box-shadow: 0 12px 30px rgba(242, 96, 14, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.primary-btn:hover,
.login-submit:hover,
.status-select:hover {
  box-shadow: 0 16px 38px rgba(242, 96, 14, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.secondary-btn,
.icon-btn,
.settings-category-card button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-color: var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.secondary-btn:hover,
.icon-btn:hover,
.settings-category-card button:hover {
  border-color: rgba(242, 96, 14, 0.42);
  background:
    linear-gradient(180deg, rgba(242, 96, 14, 0.09), rgba(255, 255, 255, 0.024));
  box-shadow: 0 10px 24px rgba(242, 96, 14, 0.09);
}

.status-badge,
.priority-badge,
.summary-status-badge,
.client-status,
.facility-status,
.badge {
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065), 0 8px 22px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.status-badge.approved,
.summary-status-badge,
.priority-badge.retail-ready,
.client-status.active,
.facility-status.approved {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065), 0 0 20px rgba(34, 197, 94, 0.11);
}

.status-badge.onboarding,
.client-status.onboarding,
.facility-status.onboarding {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065), 0 0 20px rgba(45, 120, 255, 0.12);
}

.status-badge.review,
.facility-status.review,
.status-badge.approval {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065), 0 0 20px rgba(250, 204, 21, 0.1);
}

.status-badge.denied,
.facility-status.denied,
.danger-btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 0 20px rgba(239, 68, 68, 0.1);
}

table th,
.recon-table th,
.settings-recent-table th {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.05));
  color: rgba(214, 220, 231, 0.72);
}

table td,
.recon-table td,
.settings-recent-table td {
  border-bottom-color: rgba(255, 255, 255, 0.075);
}

tbody tr,
.recon-row,
.facility-row,
.client-row,
.vehicle-row,
.client-action-row {
  transition: background-color .16s ease, box-shadow .16s ease;
}

tbody tr:hover,
.recon-row:hover,
.facility-row:hover,
.client-row:hover,
.vehicle-row:hover,
.client-action-row:hover,
.client-facilities-performance-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 3px 0 0 rgba(242, 96, 14, 0.48);
}

input,
select,
textarea {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border-color: var(--glass-border);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(242, 96, 14, 0.62);
  box-shadow: 0 0 0 3px rgba(242, 96, 14, 0.11);
}


/* =====================================
   STRUCTURE + TYPOGRAPHY STABILIZATION
   Keeps desktop layouts intact when browser width is reduced.
===================================== */

:root {
  --desktop-shell-min: 1440px;
  --desktop-main-min: 1180px;
}

html,
body {
  min-width: 0;
}

body {
  overflow-x: auto;
}

.app-shell {
  min-width: var(--desktop-shell-min);
  grid-template-columns: 240px minmax(var(--desktop-main-min), 1fr);
  overflow-x: visible;
}

.main {
  min-width: var(--desktop-main-min);
  overflow-x: visible;
}

.recon-page,
.settings-page,
.mobile-ops-page,
.job-profile-shell,
.recon-profile-page,
.facilities-page,
.facility-profile-page,
.clients-page,
.client-profile-page,
.reports-page {
  overflow-x: visible;
}

.recon-page .main,
.settings-page .main,
.mobile-ops-page .main,
.job-profile-shell .main,
.recon-profile-page .main,
.facilities-page .main,
.facility-profile-page .main,
.clients-page .main,
.client-profile-page .main,
.reports-page .main {
  min-width: var(--desktop-main-min);
  overflow-x: visible;
}

.topbar h1,
.settings-topbar h1 {
  font-size: clamp(28px, 2vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.2px;
}

.topbar p,
.settings-topbar p {
  font-size: 15px;
  line-height: 1.35;
}

.panel h3,
.queue-header h3,
.recon-scope-panel h3,
.recon-detail-panel h3,
.actions-panel h3,
.workflow-notes-panel h3,
.job-info-panel h3,
.settings-section-title,
.report-builder-panel h3,
.report-categories-panel h3,
.client-profile-panel h3,
.facility-profile-panel h3 {
  font-size: clamp(18px, 1.25vw, 21px);
  line-height: 1.18;
}

.kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.kpi-card {
  min-height: 126px;
  padding: 16px 18px;
}

.kpi-layout {
  align-items: center;
  gap: 14px;
}

.kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
}

.kpi-svg {
  width: 22px;
  height: 22px;
}

.kpi-content p {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.24;
  font-weight: 600;
}

.kpi-content h2 {
  margin-bottom: 6px;
  font-size: clamp(26px, 1.65vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.kpi-content small {
  font-size: 12px;
  line-height: 1.25;
}

.mobile-kpis .kpi-card,
.facilities-kpis .kpi-card,
.facility-profile-kpis .kpi-card,
.client-profile-kpis .kpi-card,
.reports-kpis .kpi-card {
  min-height: 118px;
  padding: 15px 17px;
}

.mobile-kpis .kpi-content h2,
.facilities-kpis .kpi-content h2,
.facility-profile-kpis .kpi-content h2,
.client-profile-kpis .kpi-content h2,
.report-kpi-card .kpi-content h2 {
  font-size: clamp(24px, 1.45vw, 31px);
  letter-spacing: -0.15px;
}

.reports-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-kpi-card .kpi-layout {
  align-items: center;
  gap: 13px;
}

.report-kpi-card .kpi-content p {
  white-space: normal;
}

.settings-overview-grid {
  grid-template-columns: repeat(6, minmax(160px, 1fr));
}

.settings-kpi-card {
  min-height: 128px;
  padding: 14px;
}

.settings-kpi-main {
  align-items: center;
  gap: 12px;
}

.settings-kpi-main > div {
  min-width: 0;
}

.settings-kpi-main strong {
  font-size: clamp(22px, 1.45vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.15px;
  overflow-wrap: normal;
  word-break: normal;
}

.settings-kpi-main p,
.settings-kpi-card small {
  font-size: 12px;
  line-height: 1.26;
}

.settings-kpi-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

table th,
table td,
.recon-table th,
.recon-table td,
.settings-recent-table th,
.settings-recent-table td {
  font-size: 13px;
  line-height: 1.35;
}

.status-badge,
.priority-badge,
.facility-status,
.client-status,
.summary-status-badge {
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.recon-tabs,
.job-tabs,
.queue-tabs,
.workflow-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.recon-tabs button,
.job-tabs button,
.queue-tabs button,
.workflow-tabs button,
.workflow-label {
  white-space: nowrap;
}

.workflow-notes-panel,
.recon-notes-panel {
  overflow: hidden;
}

.note-entry,
.feed-item {
  min-width: 0;
}

.note-content,
.feed-content {
  min-width: 0;
}

.note-content p,
.feed-content p {
  font-size: 13px;
  line-height: 1.45;
}

.note-meta strong,
.feed-meta strong {
  font-size: 15px;
  line-height: 1.2;
}

.note-meta span,
.feed-meta span {
  font-size: 12px;
}

.note-photos,
.feed-photos,
.photo-strip {
  flex-wrap: wrap;
}

.recon-profile-layout {
  grid-template-columns: minmax(620px, 1.5fr) minmax(430px, 0.95fr) minmax(220px, 0.65fr);
  min-width: 1280px;
}

.financial-summary-panel {
  min-width: 430px;
}

.financial-card {
  min-width: 0;
}

.financial-card .summary-row,
.recon-detail-panel .summary-row,
.summary-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.financial-card .summary-row span,
.recon-detail-panel .summary-row span,
.summary-row span {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.financial-card .summary-row strong,
.recon-detail-panel .summary-row strong,
.summary-row strong {
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.job-profile-shell .profile-grid,
.facility-profile-grid,
.client-profile-grid {
  min-width: 0;
}

.action-btn,
.danger-btn,
.primary-btn,
.secondary-btn {
  font-size: 13px;
}


/* =====================================
   LOW-GLARE WORK MODE
   Keeps the glass depth but removes distracting glow from numbers/icons.
===================================== */

.kpi-icon,
.settings-kpi-icon,
.report-category-icon,
.settings-category-icon {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 18px rgba(0, 0, 0, 0.14);
}

.kpi-content h2,
.settings-kpi-main strong,
.panel-count,
.queue-value,
.summary-row strong,
.financial-card .summary-row strong,
.recon-detail-panel .summary-row strong {
  text-shadow: none;
}

.kpi-svg,
.settings-kpi-icon img,
.report-category-icon img,
.settings-category-icon img,
.nav-svg {
  filter: none;
}

.primary-btn {
  box-shadow: 0 8px 20px rgba(242, 96, 14, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.primary-btn:hover {
  box-shadow: 0 10px 24px rgba(242, 96, 14, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

tbody tr:hover,
.recon-row:hover,
.facility-row:hover,
.client-row:hover,
.vehicle-row:hover,
.client-action-row:hover,
.client-facilities-performance-table tbody tr:hover {
  box-shadow: inset 2px 0 0 rgba(242, 96, 14, 0.32);
}


/* =====================================
   NO-GLASS WORK MODE
   Removes glass blur/transparency while preserving the approved layout.
===================================== */

.sidebar,
.panel,
.kpi-card,
.workflow-panel,
.job-info-panel,
.workflow-notes-panel,
.job-summary-panel,
.actions-panel,
.recon-queue-panel,
.recon-scope-panel,
.recon-detail-panel,
.financial-card,
.settings-category-card,
.settings-overview-card,
.client-portfolio-panel,
.client-portfolio-card,
.client-action-panel,
.client-distribution-panel,
.client-directory-panel,
.client-profile-panel,
.facility-profile-panel,
.report-builder-panel,
.report-categories-panel,
.report-category-card,
input,
select,
textarea {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.panel,
.kpi-card,
.workflow-panel,
.job-info-panel,
.workflow-notes-panel,
.job-summary-panel,
.actions-panel,
.recon-queue-panel,
.recon-scope-panel,
.recon-detail-panel,
.financial-card,
.settings-category-card,
.settings-overview-card,
.client-portfolio-panel,
.client-portfolio-card,
.client-action-panel,
.client-distribution-panel,
.client-directory-panel,
.client-profile-panel,
.facility-profile-panel,
.report-builder-panel,
.report-categories-panel,
.report-category-card {
  border-color: rgba(48, 62, 76, 0.95);
  background:
    linear-gradient(180deg, rgba(25, 38, 50, 0.98), rgba(16, 27, 38, 0.98));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.panel:hover,
.kpi-card:hover,
.client-portfolio-card:hover,
.settings-category-card:hover,
.report-category-card:hover {
  border-color: rgba(62, 78, 94, 0.95);
  background:
    linear-gradient(180deg, rgba(27, 41, 54, 0.99), rgba(17, 29, 40, 0.99));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.kpi-card::before {
  display: none;
}

.kpi-icon,
.settings-kpi-icon,
.report-category-icon,
.settings-category-icon {
  background: rgba(242, 96, 14, 0.14);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.primary-btn,
.primary-btn:hover,
.secondary-btn,
.secondary-btn:hover {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


/* =====================================
   EXECUTIVE COMMAND CENTER CHART TONE
===================================== */

.kpi-content small.positive {
  color: #6fca83;
}

.dashboard-grid .panel.large {
  display: flex;
  flex-direction: column;
  min-height: 330px;
}

.dashboard-grid .panel.large h3 {
  font-size: 19px;
  letter-spacing: -0.05px;
}

.donut-placeholder {
  width: 220px;
  height: 220px;
  margin: 22px auto 18px;
  font-size: 32px;
  font-weight: 650;
  color: #f5f7fa;
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 18px rgba(5, 12, 18, 0.14), 0 16px 34px rgba(0, 0, 0, 0.16);
  background:
    radial-gradient(circle, #071018 0 43%, transparent 44%),
    conic-gradient(
      #2d5f9f 0 30%,
      #a85b24 30% 55%,
      #b69a35 55% 72%,
      #6d55a7 72% 88%,
      #3d8a57 88% 100%
    );
}

.donut-placeholder::after {
  content: "";
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.donut-placeholder span {
  top: 57%;
  font-size: 12px;
  font-weight: 500;
  color: rgba(214, 220, 231, 0.62);
}

.dashboard-grid .panel.large .panel-link {
  margin-top: auto;
  align-self: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 247, 250, 0.86);
}


/* =====================================
   EXECUTIVE EARTH-TONE DASHBOARD
   Uses muted UAS orange/blue/tan/yellow tones instead of playful brights.
===================================== */

.dashboard-grid .panel.large {
  background:
    linear-gradient(180deg, rgba(24, 36, 46, 0.99), rgba(15, 25, 34, 0.99));
}

.donut-placeholder {
  width: 205px;
  height: 205px;
  margin: 24px auto 18px;
  font-size: 30px;
  color: #f4f1ea;
  border-color: rgba(178, 158, 122, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 0 0 20px rgba(4, 10, 15, 0.16),
    0 14px 28px rgba(0, 0, 0, 0.18);
  background:
    radial-gradient(circle, #071018 0 44%, transparent 45%),
    conic-gradient(
      #365f7a 0 30%,
      #a3562b 30% 55%,
      #b89a50 55% 72%,
      #88755a 72% 88%,
      #5f775c 88% 100%
    );
}

.donut-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 4deg,
      rgba(255, 255, 255, 0.018) 0deg 2deg,
      transparent 2deg 8deg
    );
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.donut-placeholder::after {
  inset: 35%;
  border-color: rgba(178, 158, 122, 0.12);
}

.donut-placeholder span {
  color: rgba(220, 214, 202, 0.64);
  letter-spacing: 0;
}

.dashboard-grid .panel ul li {
  font-size: 15px;
  line-height: 1.45;
  color: rgba(245, 247, 250, 0.9);
}

.dashboard-grid .panel ul li span {
  color: rgba(214, 220, 231, 0.56);
  font-size: 13px;
}


/* =====================================
   OPERATIONS SNAPSHOT ALIGNMENT
===================================== */

.dashboard-grid .panel.large {
  align-items: center;
  justify-content: flex-start;
  padding: 20px 24px 24px;
}

.dashboard-grid .panel.large h3 {
  align-self: stretch;
  margin: 0 0 24px;
  text-align: left;
}

.donut-placeholder {
  width: 190px;
  height: 190px;
  margin: 4px auto 22px;
  font-size: 28px;
  background:
    radial-gradient(circle, #071018 0 44%, transparent 45%),
    conic-gradient(
      #3f6f8f 0 30%,
      #b8612f 30% 55%,
      #bea35c 55% 72%,
      #7b8190 72% 88%,
      #718a6c 88% 100%
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 0 0 18px rgba(4, 10, 15, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.16);
}

.donut-placeholder::before {
  display: none;
}

.donut-placeholder::after {
  inset: 35.5%;
  border-color: rgba(190, 163, 92, 0.1);
}

.donut-placeholder span {
  top: 58%;
}

.dashboard-grid .panel.large .panel-link {
  margin: 4px auto 0;
  align-self: center;
  text-align: center;
}


/* =====================================
   PHASE 3B OPERATIONAL MODALS
===================================== */

.uas-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
}

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

.uas-modal {
  width: min(720px, 92vw);
  border: 1px solid rgba(48, 62, 76, 0.95);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(25, 38, 50, 0.99), rgba(16, 27, 38, 0.99));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  padding: 20px;
}

.uas-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.uas-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  cursor: pointer;
}

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

.uas-modal-grid label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.uas-modal-grid input,
.uas-modal-grid select,
.uas-modal-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  font: inherit;
}

.uas-modal-grid textarea {
  resize: vertical;
}

.uas-modal-grid .uas-modal-full {
  grid-column: 1 / -1;
}

.uas-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.uas-empty-state {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 150px;
  padding: 24px;
  color: var(--text-soft);
  text-align: center;
  font-weight: 700;
}
