:root {
  --master-tab-height: 48px;
  --header-height: 70px;
  --footer-height: 44px;
  --left-nav-header-gap: 10px;
  --ink: #0f172a;
  --ink-muted: #475569;
  --brand: #2189D0;
  --brand-dark: #1a72b8;
  --surface: #f8fafc;
  --card: #ffffff;
  --accent: #F07F21;
  --input-bg: #ffffff;
  --input-border: #b8d8f0;
}

html {
  min-width: 1024px;
}

body {
  background: url("/images/login_backdrop.jpg") center/cover no-repeat fixed,
    radial-gradient(1200px 500px at 15% 0%, #dbeafe 0%, #f8fafc 50%, #f1f5f9 100%);
  color: var(--ink);
  font-family: "Roboto", "Gill Sans", "Trebuchet MS", sans-serif;
  min-height: 100vh;
  padding-bottom: 4rem;
}

body[data-theme="dark"] {
  --ink: #e2e8f0;
  --ink-muted: #94a3b8;
  --brand: #2189D0;
  --brand-dark: #1a72b8;
  --surface: #0b1220;
  --card: #111827;
  --accent: #F07F21;
  --input-bg: #0b1220;
  --input-border: #1f2937;
  background: url("/images/login_backdrop.jpg") center/cover no-repeat fixed,
    radial-gradient(1200px 500px at 15% 0%, #0b1220 0%, #0f172a 60%, #111827 100%);
  color: var(--ink);
}

body.app-active {
  background: var(--surface);
}

body[data-theme="dark"].app-active {
  background: var(--surface);
}

.hero {
  padding: 1.5rem 1.5rem 2rem;
}

.hero h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero small {
  color: var(--ink-muted);
}

.card-glass {
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.12);
  border-radius: 1.25rem;
  background: var(--card);
}

body[data-theme="dark"] .card-glass {
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.5);
}

.accent-badge {
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
  color: white;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
}

.btn-brand:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-outline-brand {
  /* Override Bootstrap 5 CSS custom properties so .btn renders the border */
  --bs-btn-color: var(--brand);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: var(--brand);
  --bs-btn-hover-bg: rgba(33, 137, 208, 0.1);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand);
  --bs-btn-active-border-color: var(--brand);
  /* Direct property fallback */
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 0.375rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-outline-brand:hover {
  background: rgba(33, 137, 208, 0.1);
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline-brand.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-outline-brand.is-active:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

body[data-theme="dark"] .btn-outline-brand {
  color: #5bbef5;
  border-color: #5bbef5;
}

body[data-theme="dark"] .btn-outline-brand:hover {
  background: rgba(91, 190, 245, 0.12);
}

body[data-theme="dark"] .btn-outline-brand.is-active {
  background: #2189D0;
  color: #fff;
  border-color: #2189D0;
}

/* ── Location Validation header bar ────────────────────────────────────────── */
.val-test-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  background: rgba(33, 137, 208, 0.06);
  border: 1px solid rgba(33, 137, 208, 0.18);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

body[data-theme="dark"] .val-test-header {
  background: rgba(33, 137, 208, 0.08);
  border-color: rgba(33, 137, 208, 0.25);
}

.val-test-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 220px;
}

.val-test-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  white-space: nowrap;
}

.val-test-input {
  flex: 1 1 auto;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(33, 137, 208, 0.3);
  border-radius: 0.375rem;
  font-size: 0.88rem;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.val-test-input:focus {
  border-color: var(--brand);
}

body[data-theme="dark"] .val-test-input {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(33, 137, 208, 0.35);
}

.val-utc-time {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

.val-begin-btn {
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.val-begin-btn.running {
  cursor: not-allowed;
  opacity: 0.75;
}

.token-pill {
  background: var(--surface);
  color: var(--ink);
  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  font-family: "Courier New", Courier, monospace;
  word-break: break-all;
}

.auth-card {
  border: 0;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  background: var(--card);
  color: var(--ink);
  padding: 24px;
}

.auth-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  display: block;
}

.status-logo {
  width: 96px;
  height: 96px;
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.portal-title {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.sign-in-title {
  padding-bottom: 10px;
}

.sign-in-actions {
  padding-bottom: 10px;
}

.forgot-actions {
  padding: 10px 0;
}

.forgot-link {
  color: var(--ink-muted);
  text-decoration: underline;
}

.forgot-link:hover,
.forgot-link:focus {
  color: var(--ink);
}

.remember-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-left: 0;
}

.remember-switch .form-check-input {
  width: 3.1875rem;
  height: 1.875rem;
  margin-top: 0;
  border-radius: 0.9375rem;
}

.remember-switch .form-check-label {
  line-height: 1.875rem;
  padding-left: 0;
}

#login-form.is-disabled {
  pointer-events: none;
  opacity: 0.7;
}

.auth-status {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.status-message {
  text-align: center;
  font-size: calc(1rem + 1px);
}

.error-layout {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-align: left;
}

.error-text {
  flex: 1;
}

#error-modal .status-message {
  text-align: left;
}

#error-modal .d-grid {
  justify-items: center;
}

#error-modal-ok {
  width: 80px;
}

.form-control {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--ink);
}

.form-control:focus {
  background: var(--input-bg);
  border-color: var(--brand);
  color: var(--ink);
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.25);
}

body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-control:focus {
  background-color: var(--input-bg);
  color: var(--ink);
  border-color: var(--input-border);
}

body[data-theme="dark"] .form-select {
  background-color: var(--input-bg);
  color: var(--ink);
  border-color: var(--input-border);
}

body[data-theme="dark"] .text-muted {
  color: var(--ink-muted) !important;
}

.theme-toggle {
  border-radius: 999px;
}

.master-tab-pane {
  display: contents;
}

.master-tab-pane.d-none {
  display: none !important;
}

/* ── Master Portal Tab Bar ─────────────────────────────────────────────── */
body:not(.app-active) #master-tab-bar {
  display: none !important;
}

#master-tab-bar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  height: var(--master-tab-height);
  z-index: 1080;
  display: flex;
  align-items: stretch;
  padding: 0 1rem;
  background: var(--card);
  border-bottom: 2px solid #2189D0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  overflow-x: auto;
}

body[data-theme="dark"] #master-tab-bar {
  background: #111827;
}

.master-tabs {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 1px;
  flex-shrink: 0;
}

.master-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  padding: 0 0.9rem;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  font-family: "Roboto", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.15s, border-bottom-color 0.15s, background 0.15s;
  white-space: nowrap;
  border-radius: 4px 4px 0 0;
}

.master-tab:hover {
  color: var(--ink);
  background: rgba(33, 137, 208, 0.07);
}

.master-tab.active {
  color: #2189D0;
  font-weight: 600;
  background: rgba(33, 137, 208, 0.06);
  border-bottom-color: #2189D0;
}

.master-tab.placeholder {
  color: var(--ink-muted);
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.master-tab.placeholder:hover {
  background: transparent;
  color: var(--ink-muted);
  opacity: 0.65;
}

body[data-theme="dark"] .master-tab.active {
  border-bottom-color: #2189D0;
}

.master-tab i {
  font-size: 0.875rem;
  opacity: 0.8;
}

.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding-top: calc(var(--header-height) + var(--master-tab-height));
  z-index: 1000;
}

#app-shell {
  width: 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 1rem;
}

.partner-layout {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - var(--master-tab-height) - var(--header-height) - var(--footer-height));
}

.partner-left-nav {
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow: visible;
  border-radius: 0;
  border-left: 0;
  position: sticky;
  top: calc(var(--left-nav-header-gap) - 10px);
  height: calc(100vh - var(--master-tab-height) - var(--header-height) - var(--footer-height) - var(--left-nav-header-gap) + 10px);
  align-self: start;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(33, 137, 208, 0.15);
  background: transparent;
  color: var(--ink-muted);
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.4rem 0.2rem;
  width: 100%;
  min-height: 54px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nav-btn:hover {
  background: rgba(33, 137, 208, 0.08);
  border-color: rgba(33, 137, 208, 0.35);
  color: var(--ink);
}

.nav-btn.active {
  border-color: #2189D0;
  background: #2189D0;
  color: #fff;
  box-shadow: 0 2px 8px rgba(33, 137, 208, 0.35);
}

.nav-btn.active:hover {
  background: #1a72b8;
  border-color: #1a72b8;
}

.nav-btn span {
  font-size: 0.72rem;
  line-height: 1;
}

.partner-outline {
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.partner-outline-title {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.dash-outline-search-wrap {
  margin: 0.6rem 0 0.25rem;
}

.dash-outline-search {
  width: 100%;
  max-width: 340px;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(33, 137, 208, 0.3);
  border-radius: 0.4rem;
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.dash-outline-search:focus { border-color: var(--brand); }

body[data-theme="dark"] .dash-outline-search {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(33, 137, 208, 0.4);
}

.partner-outline-tree {
  margin-top: 0.65rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.outline-list {
  list-style: none;
  margin: 0;
  padding-left: 0.9rem;
}

.outline-node {
  margin-bottom: 0.25rem;
}

.outline-node summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--ink);
}

.outline-icon {
  width: 14px;
  color: var(--brand);
}

.outline-location,
.outline-empty-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0;
  color: var(--ink-muted);
}

.outline-empty {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.partner-main-content {
  padding: 1.25rem;
  min-width: 0;
  border-radius: 0;
}

.page-header {
  top: 0;
  bottom: auto;
  height: var(--header-height);
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
}

.page-header-left,
.page-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-header-right {
  margin-left: auto;
}

.header-logo {
  height: 36px;
  width: auto;
}

.header-title {
  font-weight: 600;
  color: var(--ink);
}

.user-name {
  font-weight: 600;
  color: var(--ink);
}

.page-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.35);
  color: var(--ink-muted);
  font-size: 0.9rem;
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  z-index: 1070;
  min-height: var(--footer-height);
}

.page-footer .theme-toggle {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1080;
}

.page-footer .site-version {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

body[data-theme="dark"] .page-footer .theme-toggle {
  border-color: rgba(152, 160, 169, 0.6);
  color: #98a0a9;
}

body[data-theme="dark"] .page-header .btn-outline-dark {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .page-footer {
  background: rgba(15, 23, 42, 0.35);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}


body.overlay-open {
  overflow: hidden;
}

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 1050;
}

.overlay.is-visible {
  display: flex;
}

.overlay-card {
  width: min(520px, 92vw);
}

.modal-overlay-common {
  background: transparent;
  backdrop-filter: none;
}

.modal-card-common {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
}

body[data-theme="dark"] .modal-card-common {
  background: rgba(15, 23, 42, 0.35);
}

.auth-modal-card {
  width: 320px;
}

.totp-modal-card {
  width: min(360px, 92vw);
}

.totp-qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.totp-qr {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  padding: 10px;
}

#status-modal .overlay-card {
  padding: 30px;
}



#busy-modal {
  z-index: 1200;
}

#busy-modal .overlay-card {
  width: 360px;
  height: 360px;
  display: flex;
  flex-direction: column;
  border-radius: 180px;
}

#busy-modal .modal-header {
  padding: 0;
  flex: 1;
}

#busy-modal .auth-header {
  flex: 1;
  justify-content: center;
  margin: 0;
  position: relative;
}

#busy-modal .modal-body {
  display: none;
}

.busy-indicator {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 6px solid rgba(33, 137, 208, 0.25);
  border-top-color: var(--brand);
  border-right-color: var(--accent);
  animation: busy-spin 0.9s linear infinite;
  box-shadow: 0 0 20px rgba(33, 137, 208, 0.25);
}

.busy-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

@keyframes busy-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 600px) {
  .proc-charts-row {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  #app-shell {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

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

  .partner-left-nav {
    max-height: none;
    border-radius: 1.25rem;
    border-left: 1px solid rgba(15, 23, 42, 0.1);
    padding: 0.75rem;
    position: static;
    height: auto;
  }

  .nav-btn {
    flex-direction: row;
    min-height: auto;
    justify-content: flex-start;
    padding: 0.7rem 0.9rem;
  }

  .nav-btn span {
    font-size: 0.95rem;
  }
}

/* Partner outline table */
.outline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-family: "Roboto", "Gill Sans", "Trebuchet MS", sans-serif;
  margin-bottom: calc(var(--footer-height) + 1rem);
}

.outline-table thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #fff;
  background: #2189D0;
  padding: 0.4rem 0.65rem;
  border-bottom: none;
}

.outline-table thead th.outline-table-tags-col {
  text-align: center;
}

body[data-theme="dark"] .outline-table thead th {
  background: #1a6caa;
  color: #e2f0fb;
}

.outline-table td {
  padding: 0.35rem 0.65rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body[data-theme="dark"] .outline-table td {
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.outline-table tbody tr:nth-child(even) td {
  /* removed: alternating stripe competed with hierarchy shading */
}

.outline-table tbody tr:last-child td {
  border-bottom: none;
}

.outline-table tbody tr:hover td {
  background: rgba(33, 137, 208, 0.07);
}

.outline-table-partner {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.outline-table-customer {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.outline-table td.outline-table-customer {
  padding-left: 2rem;
}

.outline-table-location {
  color: var(--ink-muted);
}

.outline-table td.outline-table-location {
  padding-left: 3rem;
}

.outline-table-toggle {
  cursor: pointer;
  user-select: none;
}

.outline-table-toggle:hover {
  opacity: 0.75;
}

.outline-toggle-icon {
  width: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #2189D0;
  margin-right: 0.4rem;
  flex-shrink: 0;
}

.outline-toggle-spacer {
  visibility: hidden;
}

.outline-location-link {
  cursor: pointer;
}

.outline-location-link:hover {
  color: var(--brand);
  text-decoration: underline;
}

.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.outline-header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.outline-sort-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.outline-sort-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-right: 0.15rem;
}

.outline-sort-btn {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--ink-muted);
  border-radius: 4px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.outline-sort-btn:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--ink);
}

.outline-sort-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.outline-location-id,
.outline-partner-id,
.outline-customer-id {
  font-family: "Roboto", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 0.85rem;
  color: inherit;
  margin-right: 0.4rem;
}

.outline-table-empty {
  color: var(--ink-muted);
  font-style: italic;
}

.outline-table-customer-total-row td {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.03);
}

.outline-table-partner-total-row td {
  border-top: 1px solid rgba(15, 23, 42, 0.13);
  border-bottom: 1px solid rgba(15, 23, 42, 0.13);
  background: rgba(15, 23, 42, 0.065);
}

body[data-theme="dark"] .outline-table-customer-total-row td {
  border-top-color: rgba(148, 163, 184, 0.12);
  border-bottom-color: rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .outline-table-partner-total-row td {
  border-top-color: rgba(148, 163, 184, 0.2);
  border-bottom-color: rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.outline-table-subtotal-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  white-space: nowrap;
}

.outline-table-partner-total-label {
  color: var(--ink);
}

.outline-table-customer-total .outline-table-tag-total,
.outline-table-partner-total .outline-table-tag-total {
  font-weight: 700;
}

.outline-table-tags-col {
  text-align: center;
}

.outline-table-tag-count,
.outline-table td.outline-table-tag-count {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.outline-table-tag-total {
  color: var(--ink);
  font-weight: 500;
}

.outline-table-tag-active {
  color: #16a34a;
}

body[data-theme="dark"] .outline-table-tag-active {
  color: #4ade80;
}

.outline-table-tag-down {
  color: #dc2626;
}

body[data-theme="dark"] .outline-table-tag-down {
  color: #f87171;
}

.outline-table-tag-inactive {
  color: var(--ink-muted);
}

.cust-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid rgba(33, 137, 208, 0.15);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin-left: 0;
}

.cust-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  border-radius: 0.4rem 0.4rem 0 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.cust-tab:hover {
  color: var(--ink);
  background: rgba(33, 137, 208, 0.07);
}

.cust-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: rgba(33, 137, 208, 0.07);
}

.cust-tab-panels {
  flex: 1;
}

.cust-tab-panel {
  min-height: 120px;
}

/* Customer combobox */
.comboboxes-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cust-combobox {
  position: relative;
  flex: 1 1 240px;
  min-width: 240px;
  max-width: 320px;
}

.cust-combobox-input {
  width: 100%;
  padding: 0.45rem 4rem 0.45rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.cust-combobox-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(33, 137, 208, 0.18);
}

body[data-theme="dark"] .cust-combobox-input {
  border-color: rgba(148, 163, 184, 0.22);
}

.cust-combobox-chevron {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 2rem;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.75rem;
}

.cust-combobox-chevron:hover {
  color: var(--brand);
}

.cust-combobox-clear {
  position: absolute;
  right: 2rem;
  top: 0;
  height: 100%;
  width: 1.7rem;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.72rem;
}

.cust-combobox-clear.is-visible {
  display: flex;
}

.cust-combobox-clear:hover {
  color: var(--brand);
}

.cust-combobox-list {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid rgba(33, 137, 208, 0.25);
  border-radius: 0.5rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  max-height: 260px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  z-index: 200;
}

.cust-combobox-list.is-open {
  display: block;
}

.cust-combobox-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink);
}

.cust-combobox-item:hover,
.cust-combobox-item.highlighted {
  background: rgba(33, 137, 208, 0.1);
}

.cust-combobox-item-id {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.cust-combobox-item-name {
  font-weight: 500;
  flex: 1;
}

.cust-combobox-item-partner {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-left: auto;
  white-space: nowrap;
}

.cust-combobox-empty {
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* Tag status table */
.tag-status-table-wrap {
  overflow-x: auto;
  margin-bottom: calc(var(--footer-height) + 1rem);
}

.tag-status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  white-space: nowrap;
}

.tag-status-table thead th {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #fff;
  background: #2189D0;
  padding: 0.4rem 0.7rem;
  border-bottom: none;
}

body[data-theme="dark"] .tag-status-table thead th {
  background: #1a6caa;
  color: #e2f0fb;
}

.tag-status-table thead th.sortable-th:hover {
  background: #1a72b8;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.tag-status-table thead th.sort-active {
  color: #fff;
  text-decoration: underline;
}

.tag-status-table thead th .sort-indicator {
  font-size: 0.65rem;
  opacity: 0.75;
}

.tag-status-table thead th.sortable-th {
  white-space: nowrap;
}

.tag-status-table td {
  padding: 0.35rem 0.7rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: middle;
}

.tag-status-table td.tag-status-num-td {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

body[data-theme="dark"] .tag-status-table td {
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.tag-status-table tbody tr:nth-child(even) td {
  background: rgba(33, 137, 208, 0.04);
}

.tag-status-table tbody tr:last-child td {
  border-bottom: none;
}

.tag-status-table tbody tr:hover td {
  background: rgba(33, 137, 208, 0.09);
}

body[data-theme="dark"] .tag-status-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .tag-status-table tbody tr:hover td {
  background: rgba(33, 137, 208, 0.1);
}

.tag-status-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.tag-status-badge-active {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

body[data-theme="dark"] .tag-status-badge-active {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.tag-status-badge-inactive {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

body[data-theme="dark"] .tag-status-badge-inactive {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.tag-status-empty {
  color: var(--ink-muted);
  font-style: italic;
  padding: 1rem 0;
  margin: 0;
}

.tag-status-utc-label {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-right: auto;
}

/* ── Tag status: group header row (legacy, kept for reference) ──────────────── */
.tag-status-group-th {
  background: #2189D0;
  color: #fff;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8rem;
  text-align: center;
}
body[data-theme="dark"] .tag-status-group-th {
  background: #1a6caa;
}
.tag-status-nav-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  font-size: 0.85rem;
  white-space: nowrap;
}
.tag-status-nav-btn:hover {
  opacity: 0.8;
}

/* ── Tag status: detail (hidden) columns ──────────────────────────────────── */
.tag-status-detail-col {
  display: none;
}
.tag-status-table.show-details .tag-status-detail-col {
  display: table-cell;
}

/* ── Tag status: inactive row (positioning tag, inactive) ─────────────────── */
.tag-status-row-inactive td {
  background: #e8e8e8 !important;
  color: #666 !important;
}
body[data-theme="dark"] .tag-status-row-inactive td {
  background: rgba(148, 163, 184, 0.1) !important;
  color: var(--ink-muted) !important;
}

/* ── Tag status: alert cells (stale transaction/heartbeat, low power) ──────── */
.tag-status-cell-alert {
  background: #dc2626 !important;
  color: #fff !important;
  font-weight: 600;
}
body[data-theme="dark"] .tag-status-cell-alert {
  background: #b91c1c !important;
  color: #fff !important;
}

/* ── Tag status: analyze AP button ─────────────────────────────────────────── */
.tag-analyze-btn {
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.tag-perf-alert {
  background: rgba(220, 38, 38, 0.12) !important;
  color: #dc2626;
  font-weight: 600;
}

body[data-theme="dark"] .tag-perf-alert {
  background: rgba(248, 113, 113, 0.15) !important;
  color: #f87171;
}

/* ── Presence Detection modal ────────────────────────────────── */
.pd-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.pd-modal-dialog {
  width: 100%;
  max-width: 440px;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  background: var(--surface);
}

.pd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(33, 137, 208, 0.15);
}

.pd-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.pd-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0 0.25rem;
}

.pd-modal-close:hover { color: var(--ink); }

.pd-modal-body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pd-modal-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.pd-modal-input {
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(33, 137, 208, 0.3);
  border-radius: 0.4rem;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

.pd-modal-input:focus { border-color: var(--brand); }

body[data-theme="dark"] .pd-modal-input {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(33, 137, 208, 0.4);
}

.pd-modal-error {
  font-size: 0.82rem;
  color: #dc2626;
  min-height: 1.1rem;
  margin: 0;
}

.pd-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid rgba(33, 137, 208, 0.1);
}

.btn-primary-sm {
  padding: 0.4rem 1rem;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary-sm:hover { opacity: 0.88; }

.btn-secondary-sm {
  padding: 0.4rem 1rem;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid rgba(33, 137, 208, 0.2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary-sm:hover { border-color: var(--brand); color: var(--ink); }

/* ── Presence Detection result meta bar ─────────────────────── */
.presence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  padding: 0.5rem 0.2rem 0.75rem;
}

.presence-meta strong { color: var(--ink); }

.presence-refresh-spin {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--brand);
  font-weight: 500;
}

.presence-stop-btn {
  margin-left: auto;
  padding: 0.25rem 0.8rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  color: #d9534f;
  border: 1px solid rgba(217, 83, 79, 0.4);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.presence-stop-btn:hover {
  background: #d9534f;
  color: #fff;
}

/* ── Location Validation tab ─────────────────────────────────── */
.val-show-results-btn {
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 0.35rem;
  border: 1px solid rgba(33, 137, 208, 0.35);
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.val-show-results-btn:hover {
  background: var(--brand);
  color: #fff;
}

.val-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  margin: 0.75rem 0.75rem 0.3rem;
}

.val-proc-msg {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0 0.75rem 0.4rem;
  font-style: italic;
}

.val-result-row td.val-result-cell {
  padding: 0;
  background: rgba(33, 137, 208, 0.04);
}

body[data-theme="dark"] .val-result-row td.val-result-cell {
  background: rgba(33, 137, 208, 0.08);
}

.val-result-cell {
  border-top: 2px solid rgba(33, 137, 208, 0.15) !important;
}

/* Center all data cells in the main validation positions table */
.val-main-table td {
  text-align: center;
}

/* Left-align description column for readability */
.val-main-table td.val-td-desc {
  text-align: left;
}

/* Muted style for pre-fetched summary cells while loading */
.val-summary-cell {
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.val-results-subtable {
  margin: 0.5rem 0.75rem 0.75rem;
  width: calc(100% - 1.5rem);
  font-size: 0.82rem;
}

.val-results-subtable td {
  text-align: center;
}

/* ── Dashboard controls ─────────────────────────────────────────────────── */
.dash-header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-seg-ctrl {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-ctrl-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink);
}

.dash-seg-btns,
.dash-filter-chips {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

body[data-theme="dark"] .dash-seg-btns,
body[data-theme="dark"] .dash-filter-chips {
  background: rgba(148, 163, 184, 0.1);
}

.dash-seg-btn,
.dash-filter-chip {
  font-family: "Roboto", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 0.73rem;
  font-weight: 400;
  padding: 0.2rem 0.65rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.5;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.dash-seg-btn:hover,
.dash-filter-chip:hover {
  color: var(--ink);
  background: rgba(33, 137, 208, 0.08);
}

.dash-seg-btn.active,
.dash-filter-chip.active {
  background: #2189D0;
  color: #fff;
  box-shadow: none;
}

body[data-theme="dark"] .dash-seg-btn.active,
body[data-theme="dark"] .dash-filter-chip.active {
  background: #2189D0;
  color: #fff;
}

/* ── Processing Instances charts ────────────────────────────────────────── */
.proc-charts-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.proc-chart-card {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-top: 3px solid #2189D0;
  border-radius: 10px;
  padding: 0.8rem 1rem 0.9rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

body[data-theme="dark"] .proc-chart-card {
  border-color: rgba(148, 163, 184, 0.15);
  border-top-color: #2189D0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.proc-chart-card-title {
  margin: 0 0 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.proc-chart-wrap {
  position: relative;
  height: 120px;
}

/* ── Alerts view ─────────────────────────────────────────────────────────── */

.alerts-status-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.alerts-status-chk-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
}

.alerts-refresh-btn {
  margin-left: 0.5rem;
}

/* Summary boxes */
.alerts-boxes-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.alerts-box {
  flex: 1 1 180px;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
}

.alerts-box-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.alerts-box-summary .alerts-box-title  { color: #7c5fc0; }
.alerts-box-inbound .alerts-box-title  { color: #c07519; }
.alerts-box-processing .alerts-box-title { color: #1560b8; }
.alerts-box-outbound .alerts-box-title  { color: #1a8045; }

.alerts-box-table {
  width: 100%;
  font-size: 0.82rem;
  border-collapse: collapse;
}

.alerts-box-table th {
  text-align: right;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  color: var(--ink-muted);
}

.alerts-box-table td {
  padding: 0.1rem 0.4rem;
  text-align: right;
}

.alerts-box-table td:first-child {
  text-align: left;
  color: var(--ink);
}

.alerts-box-table tbody tr:nth-child(even) td {
  background: rgba(33, 137, 208, 0.04);
}

.alerts-count-critical { color: #c0392b; font-weight: 600; }
.alerts-count-warning  { color: #c07519; font-weight: 600; }

/* Filters row */
.alerts-filters-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.alerts-filter-combo {
  flex: 1 1 220px;
  max-width: 320px;
}

.alerts-assigned-wrap {
  flex: 1 1 200px;
  max-width: 280px;
}

.alerts-assigned-input {
  width: 100%;
  font-size: 0.875rem;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 0.5rem;
  padding: 0.35rem 0.7rem;
  background: var(--card);
  color: var(--ink);
}

body[data-theme="dark"] .alerts-assigned-input {
  border-color: rgba(148, 163, 184, 0.25);
}

/* Alerts table */
.alerts-table-wrap {
  overflow-x: auto;
}

.alerts-table {
  min-width: 900px;
}

.alerts-group-row {
  cursor: pointer;
  user-select: none;
}

.alerts-group-row:hover {
  filter: brightness(0.96);
}

.alerts-partner-row td { background: rgba(15, 23, 42, 0.06); font-weight: 600; }
.alerts-customer-row td { background: rgba(15, 23, 42, 0.03); font-weight: 500; }
.alerts-location-row td { background: transparent; font-style: italic; }

body[data-theme="dark"] .alerts-partner-row td  { background: rgba(148, 163, 184, 0.12); }
body[data-theme="dark"] .alerts-customer-row td { background: rgba(148, 163, 184, 0.06); }

.alerts-group-toggle {
  width: 1.6rem;
  text-align: center;
  color: var(--brand);
}

.alerts-toggle-icon {
  font-size: 0.7rem;
}

.alerts-group-label {
  text-align: left;
  padding-left: 0.5rem;
}

.alerts-group-badge {
  font-size: 0.72rem;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  margin-right: 0.4rem;
}

.alerts-detail-row td {
  font-size: 0.8rem;
}

.alerts-priority-critical { color: #c0392b; font-weight: 600; }
.alerts-priority-warning  { color: #c07519; font-weight: 600; }

/* ── Location Wizard ─────────────────────────────────────────────────────────── */

.loc-wiz-filters-row {
  padding: 0;
  margin-bottom: 0.5rem;
}

.loc-wiz-combo {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 320px;
}

.loc-wiz-add-btn {
  align-self: center;
  white-space: nowrap;
  flex-shrink: 0;
}


.loc-wiz-detail-card {
  margin: 1rem 1.25rem 0;
}

.loc-wiz-detail-title,
.loc-wiz-table-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

.loc-wiz-table-section {
  margin: 1rem 1.25rem 1.5rem;
}

.loc-wiz-table-wrap {
  overflow-x: auto;
}

.loc-wiz-table {
  width: 100%;
  font-size: 0.83rem;
}

.loc-wiz-row {
  cursor: pointer;
}

.loc-wiz-row:hover td {
  background: rgba(33, 137, 208, 0.07);
}

.loc-wiz-loading,
.loc-wiz-empty,
.loc-wiz-error {
  font-size: 0.85rem;
  padding: 0.5rem 0;
  color: var(--text-muted, #6c757d);
}

.loc-wiz-error { color: #c0392b; }

/* Add Location modal */
.loc-wiz-modal-dialog {
  width: min(700px, 96vw);
}

.loc-wiz-modal-body {
  max-height: 65vh;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.loc-wiz-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

@media (max-width: 540px) {
  .loc-wiz-form-grid { grid-template-columns: 1fr; }
}

.loc-wiz-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.loc-wiz-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #6c757d);
}

.loc-wiz-field-input,
.loc-wiz-field-select {
  font-size: 0.85rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 0.3rem;
  background: var(--input-bg, #fff);
  color: var(--text, #212529);
  width: 100%;
}

.loc-wiz-field-input:focus,
.loc-wiz-field-select:focus {
  outline: 2px solid var(--brand, #2189D0);
  outline-offset: -1px;
}

/* Dark mode */
[data-bs-theme="dark"] .loc-wiz-field-input,
[data-bs-theme="dark"] .loc-wiz-field-select {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

[data-bs-theme="dark"] .loc-wiz-row:hover td {
  background: rgba(33, 137, 208, 0.12);
}

.loc-wiz-table-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.loc-wiz-table-title-row .loc-wiz-table-title {
  margin-bottom: 0;
}

/* ── Billing Groups view ───────────────────────────────────────────────────── */

.bg-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.bg-table-wrap .table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  white-space: nowrap;
  /* reset Bootstrap's --bs-table-color so our var(--ink) wins */
  --bs-table-color: var(--ink);
  --bs-table-striped-color: var(--ink);
  --bs-table-hover-color: var(--ink);
  color: var(--ink);
}

/* Light mode */
.bg-table-wrap .table thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-bottom: none;
  background: #2189D0;
  font-family: "Roboto", "Gill Sans", "Trebuchet MS", sans-serif;
}

.bg-table-wrap .table td {
  padding: 0.38rem 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: middle;
  background: transparent;
  color: #0f172a;          /* --ink light */
}

.bg-table-wrap .table tbody tr:last-child td {
  border-bottom: none;
}

.bg-table-wrap .table-striped tbody tr:nth-of-type(odd) td {
  background: rgba(33, 137, 208, 0.03);
  color: #0f172a;
}

.bg-table-wrap .table-hover tbody tr:hover td {
  background: rgba(33, 137, 208, 0.07);
  color: #0f172a;
}

/* Dark mode */
body[data-theme="dark"] .bg-table-wrap .table {
  --bs-table-color: #e2e8f0;
  --bs-table-striped-color: #e2e8f0;
  --bs-table-hover-color: #e2e8f0;
  color: #e2e8f0;          /* --ink dark */
}

body[data-theme="dark"] .bg-table-wrap .table thead th {
  background: #1a6caa;
  color: #e2f0fb;
  border-bottom: none;
}

body[data-theme="dark"] .bg-table-wrap .table td {
  border-bottom-color: rgba(148, 163, 184, 0.1);
  color: #e2e8f0;          /* --ink dark */
}

body[data-theme="dark"] .bg-table-wrap .table-striped tbody tr:nth-of-type(odd) td {
  background: rgba(33, 137, 208, 0.06);
  color: #e2e8f0;
}

body[data-theme="dark"] .bg-table-wrap .table-hover tbody tr:hover td {
  background: rgba(33, 137, 208, 0.14);
  color: #e2e8f0;
}

/* Filter form inside the assign panel */
.bg-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.bg-filter-row .form-label {
  color: #0f172a;          /* --ink light */
}

body[data-theme="dark"] .bg-filter-row .form-label {
  color: #e2e8f0;          /* --ink dark */
}

.bg-filter-row .form-control,
.bg-filter-row .form-select {
  background: var(--input-bg);
  color: var(--ink);
  border-color: var(--input-border);
}

body[data-theme="dark"] .bg-filter-row .form-control,
body[data-theme="dark"] .bg-filter-row .form-select {
  background: var(--input-bg);
  color: #e2e8f0;
  border-color: var(--input-border);
}

.bg-filter-row .form-check-label {
  color: #0f172a;          /* --ink light */
}

body[data-theme="dark"] .bg-filter-row .form-check-label {
  color: #e2e8f0;          /* --ink dark */
}

/* "Add Billing Group" button label */
.bg-view-add-btn {
  color: #ffffff;
}

/* Action buttons in manage table */
.bg-table-wrap .btn-outline-secondary {
  color: #475569;          /* --ink-muted light */
  border-color: #475569;
}

.bg-table-wrap .btn-outline-secondary:hover {
  color: #0f172a;
}

body[data-theme="dark"] .bg-table-wrap .btn-outline-secondary {
  color: #94a3b8;          /* --ink-muted dark */
  border-color: rgba(148, 163, 184, 0.4);
}

body[data-theme="dark"] .bg-table-wrap .btn-outline-secondary:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}

.bg-table-wrap .btn-outline-danger {
  color: #dc2626;
  border-color: #dc2626;
}

body[data-theme="dark"] .bg-table-wrap .btn-outline-danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
}

body[data-theme="dark"] .bg-table-wrap .btn-outline-danger:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

/* Empty / muted messages */
.bg-table-wrap .text-muted,
.bg-empty-msg {
  font-size: 0.9rem;
  color: #475569;          /* --ink-muted light */
}

body[data-theme="dark"] .bg-table-wrap .text-muted,
body[data-theme="dark"] .bg-empty-msg {
  color: #94a3b8;          /* --ink-muted dark */
}

/* ── Configuration view ───────────────────────────────────────────────────── */

.config-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.config-table-wrap .btn-outline-secondary {
  color: #475569;
  border-color: #475569;
}

.config-table-wrap .btn-outline-secondary:hover {
  color: #0f172a;
  background: rgba(71, 85, 105, 0.1);
}

body[data-theme="dark"] .config-table-wrap .btn-outline-secondary {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.4);
}

body[data-theme="dark"] .config-table-wrap .btn-outline-secondary:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}

.config-table-wrap .btn-outline-danger {
  color: #dc2626;
  border-color: #dc2626;
}

body[data-theme="dark"] .config-table-wrap .btn-outline-danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
}

body[data-theme="dark"] .config-table-wrap .btn-outline-danger:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.config-table-wrap .btn-outline-success {
  color: #16a34a;
  border-color: #16a34a;
}

body[data-theme="dark"] .config-table-wrap .btn-outline-success {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.5);
}

body[data-theme="dark"] .config-table-wrap .btn-outline-success:hover {
  background: rgba(74, 222, 128, 0.15);
  color: #86efac;
}

.config-empty-msg {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-style: italic;
}

.config-err-msg {
  font-size: 0.82rem;
  color: #dc2626;
  min-height: 1rem;
  margin: 0;
}

body[data-theme="dark"] .config-err-msg {
  color: #f87171;
}

.config-ok-msg {
  font-size: 0.82rem;
  color: #16a34a;
  min-height: 1rem;
  margin: 0;
}

body[data-theme="dark"] .config-ok-msg {
  color: #4ade80;
}

.config-status-active {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  letter-spacing: 0.03em;
}

body[data-theme="dark"] .config-status-active {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.config-info-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  background: rgba(33, 137, 208, 0.07);
  border: 1px solid rgba(33, 137, 208, 0.2);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.55;
}

body[data-theme="dark"] .config-info-box {
  background: rgba(33, 137, 208, 0.1);
  border-color: rgba(33, 137, 208, 0.3);
}

.config-info-box .fa {
  color: var(--brand);
  font-size: 1.1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.config-filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.config-filter-select {
  max-width: 280px;
  flex: 1 1 200px;
}

/* pd-modal width variant for config modals */
.pd-modal-config-sm  { width: min(400px, 96vw); }
.pd-modal-config-md  { width: min(480px, 96vw); }
.pd-modal-config-lg  { width: min(540px, 96vw); }

/* ── Location Details button ──────────────────────────────────────────────── */
.cust-details-btn {
  align-self: flex-end;
  white-space: nowrap;
  flex-shrink: 0;
  --bs-btn-color: #0f172a;
  --bs-btn-border-color: #0f172a;
  --bs-btn-hover-color: #0f172a;
  --bs-btn-hover-border-color: #0f172a;
  --bs-btn-active-bg: #0f172a;
  --bs-btn-active-border-color: #0f172a;
  color: #0f172a !important;
  border-color: #0f172a !important;
}
.cust-details-btn:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  border-color: #0f172a !important;
  color: #0f172a !important;
}
.loc-instance-field {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.15);
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  flex-shrink: 0;
}
.loc-instance-hidden {
  display: none !important;
}
body[data-theme="dark"] .loc-instance-field {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
}

/* ── Location Details Modal ───────────────────────────────────────────────── */
.loc-details-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1rem;
  z-index: 1200;
}

.loc-details-dialog {
  width: 100%;
  max-width: 860px;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.loc-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(33, 137, 208, 0.15);
  flex-shrink: 0;
}

.loc-details-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.loc-details-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0 0.25rem;
}

.loc-details-close:hover { color: var(--ink); }

.loc-details-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

.loc-details-subhead {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.loc-details-customer { font-weight: 600; color: var(--ink); }
.loc-details-sep { color: var(--ink-muted); }
.loc-details-locname { color: var(--ink); }

.loc-details-error {
  font-size: 0.82rem;
  color: #dc2626;
  min-height: 1.1rem;
  margin: 0 0 0.5rem;
}

.loc-details-section-header {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand);
  padding: 0.6rem 0 0.25rem;
  border-bottom: 1px solid rgba(33, 137, 208, 0.15);
  margin-bottom: 0.25rem;
}

.loc-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem 1.25rem;
}

.loc-details-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.loc-details-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.loc-details-required {
  color: #dc2626;
}

.loc-details-input {
  width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(33, 137, 208, 0.3);
  border-radius: 0.4rem;
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

.loc-details-input:focus { border-color: var(--brand); }

.loc-details-input.loc-details-readonly {
  background: rgba(15, 23, 42, 0.04);
  color: var(--ink-muted);
  border-color: rgba(15, 23, 42, 0.1);
  cursor: default;
}

body[data-theme="dark"] .loc-details-input {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(33, 137, 208, 0.35);
}

body[data-theme="dark"] .loc-details-input.loc-details-readonly {
  background: rgba(30, 41, 59, 0.3);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
}

/* Timezone picker */
.loc-details-tz-wrap {
  position: relative;
}

.loc-details-tz-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid rgba(33, 137, 208, 0.3);
  border-radius: 0 0 0.4rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 10;
  display: none;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}

.loc-details-tz-list.is-open { display: block; }

.loc-details-tz-item {
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--ink);
}

.loc-details-tz-item:hover { background: rgba(33, 137, 208, 0.08); }

.loc-details-tz-empty {
  color: var(--ink-muted);
  cursor: default;
}

.loc-details-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid rgba(33, 137, 208, 0.1);
  flex-shrink: 0;
}

/* ── MFG Analysis Button ─────────────────────────────────────────────────── */
.mfg-analysis-btn {
  align-self: flex-end;
  white-space: nowrap;
  flex-shrink: 0;
  --bs-btn-color: #0f172a;
  --bs-btn-border-color: #0f172a;
  --bs-btn-hover-color: #0f172a;
  --bs-btn-hover-border-color: #0f172a;
  --bs-btn-active-bg: #0f172a;
  --bs-btn-active-border-color: #0f172a;
  color: #0f172a !important;
  border-color: #0f172a !important;
}
.mfg-analysis-btn:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  border-color: #0f172a !important;
  color: #0f172a !important;
}

.cust-refresh-btn {
  align-self: flex-end;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  --bs-btn-color: #0f172a;
  --bs-btn-border-color: #0f172a;
  --bs-btn-hover-color: #0f172a;
  --bs-btn-hover-border-color: #0f172a;
  --bs-btn-active-bg: #0f172a;
  --bs-btn-active-border-color: #0f172a;
  color: #0f172a !important;
  border-color: #0f172a !important;
}
.cust-refresh-btn:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  border-color: #0f172a !important;
  color: #0f172a !important;
}

/* ── MFG Analysis Modal ──────────────────────────────────────────────────── */
.mfg-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1rem;
  z-index: 1200;
}

.mfg-modal-dialog {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  overflow: hidden;
  margin: auto;
}

.mfg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem 0.75rem;
  background: #2189D0;
  flex-shrink: 0;
}

.mfg-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  font-family: "Roboto", "Gill Sans", "Trebuchet MS", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.mfg-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.15s;
}
.mfg-modal-close:hover { color: #fff; }

.mfg-modal-data-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 0.5rem 1.25rem 0;
  min-height: 1.4em;
}

.mfg-modal-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid rgba(33, 137, 208, 0.08);
  flex-shrink: 0;
}

.mfg-ctrl-btn {
  font-size: 0.8rem;
  border: none !important;
  box-shadow: none !important;
}

.mfg-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.75rem 1.25rem 0.5rem;
  max-height: 55vh;
}

.mfg-modal-error {
  color: var(--danger, #dc3545);
  font-size: 0.82rem;
  margin: 0 0 0.5rem;
  min-height: 1.2em;
}

.mfg-modal-table-wrap {
  overflow-x: auto;
}

.mfg-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.mfg-modal-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.4rem 0.6rem;
  border-bottom: none;
  background: #2189D0;
  color: #fff;
  white-space: nowrap;
  font-family: "Roboto", "Gill Sans", "Trebuchet MS", sans-serif;
}

.mfg-modal-table th:last-child { text-align: right; }

.mfg-modal-table td {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid rgba(33, 137, 208, 0.07);
  color: var(--ink);
}

.mfg-modal-table tbody tr:nth-child(even) td {
  background: rgba(33, 137, 208, 0.04);
}

.mfg-modal-table tr:hover td {
  background: rgba(33, 137, 208, 0.09);
}

body[data-theme="dark"] .mfg-modal-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .mfg-modal-table tr:hover td {
  background: rgba(255, 255, 255, 0.08);
}

.mfg-modal-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mfg-modal-loading,
.mfg-modal-empty {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.mfg-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid rgba(33, 137, 208, 0.1);
  flex-shrink: 0;
}

body[data-theme="dark"] .mfg-modal-header { background: #1a6caa; }
body[data-theme="dark"] .mfg-modal-table th { background: #1a6caa; color: #e2f0fb; }

body[data-theme="dark"] .mfg-modal-table td {
  color: var(--ink);
}
body[data-theme="dark"] .mfg-modal-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

/* ── Tag status bulk-edit ─────────────────────────────────────────────────── */

.tag-status-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  min-height: 2rem;
}

.tag-edit-selected-btn {
  font-size: 0.8rem;
}

.tag-status-check-th,
.tag-status-check-td {
  width: 2rem;
  text-align: center;
  padding: 0 0.25rem !important;
}

.tag-status-row-chk,
.tag-status-select-all {
  cursor: pointer;
  accent-color: var(--brand);
}

/* ── Bulk-edit tag modal ──────────────────────────────────────────────────── */

.tag-bulk-edit-dialog {
  width: min(1080px, 96vw);
  max-width: min(1080px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
}

.tag-bulk-edit-body {
  padding: 1rem 1.25rem;
}

.tag-bulk-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem 1.25rem;
}

@media (max-width: 860px) {
  .tag-bulk-edit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .tag-bulk-edit-grid {
    grid-template-columns: 1fr;
  }
}

.tag-bulk-edit-section-label {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #888);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border, #ddd);
  margin-top: 0.25rem;
}

.tag-bulk-edit-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}


/* ── Embedded App Iframe ────────────────────────────────────────────────────── */
.app-iframe-wrap {
  position: fixed;
  top: calc(var(--header-height) + var(--master-tab-height));
  left: 0;
  right: 0;
  bottom: var(--footer-height);
}

.app-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Auth overlay shown while iframe SSO token is being processed ── */
.app-auth-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--body-bg, #f8fafc);
  transition: opacity 0.4s ease;
}

[data-theme="dark"] .app-auth-overlay {
  background: var(--body-bg, #0f172a);
}

.app-auth-overlay.fading {
  opacity: 0;
  pointer-events: none;
}

.app-auth-overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-muted, #64748b);
  font-size: 0.95rem;
  font-weight: 500;
}

.app-auth-overlay-card p {
  margin: 0;
}

/* ── Launch Pane (Device Plotting / Admin Services) ────────────────────────── */
.launch-pane {
  position: fixed;
  top: calc(var(--header-height) + var(--master-tab-height));
  left: 0;
  right: 0;
  bottom: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 2rem;
}

.launch-card {
  max-width: 520px;
  width: 100%;
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.launch-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--brand);
}

.launch-card-header i {
  font-size: 1.6rem;
}

.launch-card-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.launch-card-desc {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0;
}

.launch-msg {
  font-size: 0.9rem;
  min-height: 1.2em;
  margin: 0;
}

.launch-msg-error {
  color: #dc2626;
}

.launch-msg-ok {
  color: #16a34a;
}

body[data-theme="dark"] .launch-msg-ok {
  color: #4ade80;
}
