/*
  =========================================
  MitraBooks ERP - Theme Enhancement CSS
  =========================================
  Enhances app-shell.css with theme tokens for dark/light mode support.
  PWA-safe: zero external dependencies, works with existing HTML structure.
*/

/* ============================================
   THEME AWARE OVERRIDES FOR EXISTING CLASSES
   ============================================ */

/* Dark theme (default) - override app-shell.css hardcoded colors */
html[data-theme="dark"] {
  --bg: var(--bg-primary, #090c14);
  --panel: var(--bg-secondary, #0f1424);
  --panel-2: var(--bg-card, rgba(18, 25, 47, 0.65));
  --text: var(--text-primary, #f8fafc);
  --muted: var(--text-secondary, #94a3b8);
  --border: var(--border-color, rgba(255, 255, 255, 0.08));
  --accent: var(--accent-color, #3b82f6);
  --success: var(--success-color, #10b981);
  --warning: var(--warning-color, #f59e0b);
  --danger: var(--danger-color, #ef4444);
}

/* Light theme - override for light mode */
html[data-theme="light"] {
  --bg: var(--bg-primary, #f8fafc);
  --panel: var(--bg-secondary, #ffffff);
  --panel-2: var(--bg-card, rgba(255, 255, 255, 0.85));
  --text: var(--text-primary, #0f172a);
  --muted: var(--text-secondary, #475569);
  --border: var(--border-color, rgba(0, 0, 0, 0.08));
  --accent: var(--accent-color, #2563eb);
  --success: var(--success-color, #059669);
  --warning: var(--warning-color, #d97706);
  --danger: var(--danger-color, #dc2626);
}

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   ENHANCE EXISTING SIDEBAR
   ============================================ */

.sidebar {
  transition: background-color 0.3s ease, color 0.3s ease;
}

html[data-theme="dark"] .sidebar {
  background: var(--bg-sidebar, #0a0d18) !important;
  border-color: var(--border-color, rgba(255, 255, 255, 0.08)) !important;
}

html[data-theme="light"] .sidebar {
  background: var(--bg-secondary, #ffffff) !important;
  border-color: var(--border-color, rgba(0, 0, 0, 0.08)) !important;
}

/* ============================================
   ENHANCE BRAND SECTION
   ============================================ */

.brand {
  position: relative;
}

html[data-theme="dark"] .brand {
  color: #e2e8f0;
}

html[data-theme="dark"] .brand h1 {
  color: #e2e8f0;
}

html[data-theme="dark"] .brand p {
  color: #94a3b8;
}

/* ============================================
   ENHANCE NAVIGATION
   ============================================ */

.nav a,
.nav button {
  transition: var(--transition-smooth, all 0.25s ease);
}

html[data-theme="dark"] .nav a,
html[data-theme="dark"] .nav button {
  color: #94a3b8;
}

html[data-theme="dark"] .nav a:hover,
html[data-theme="dark"] .nav button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

html[data-theme="dark"] .nav a.active,
html[data-theme="dark"] .nav button.active {
  background: rgba(var(--accent-rgb, 59, 130, 246), 0.1);
  color: var(--accent-color, #3b82f6);
}

html[data-theme="light"] .nav a:hover,
html[data-theme="light"] .nav button:hover {
  background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .nav a.active,
html[data-theme="light"] .nav button.active {
  color: var(--accent-color, #2563eb);
}

/* ============================================
   ENHANCE TOPBAR/HEADER
   ============================================ */

.topbar {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

html[data-theme="dark"] .topbar {
  background: var(--bg-secondary, #0f1424) !important;
  border-color: var(--border-color, rgba(255, 255, 255, 0.08)) !important;
}

html[data-theme="light"] .topbar {
  background: var(--bg-secondary, #ffffff) !important;
  border-color: var(--border-color, rgba(0, 0, 0, 0.08)) !important;
}

/* ============================================
   ENHANCE BUTTONS
   ============================================ */

.secondary {
  transition: var(--transition-smooth, all 0.25s ease);
}

html[data-theme="dark"] .secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .secondary:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* ============================================
   HEALTH/PILL WIDGET
   ============================================ */

.pill {
  transition: var(--transition-smooth, all 0.25s ease);
}

html[data-theme="dark"] .pill {
  background: rgba(var(--accent-rgb, 59, 130, 246), 0.1);
  border-color: rgba(var(--accent-rgb, 59, 130, 246), 0.2);
  color: var(--accent-color, #3b82f6);
}

html[data-theme="light"] .pill {
  background: rgba(var(--accent-rgb, 37, 99, 235), 0.08);
  border-color: rgba(var(--accent-rgb, 37, 99, 235), 0.15);
  color: var(--accent-color, #2563eb);
}

/* ============================================
   CONTENT AREA
   ============================================ */

.content {
  transition: background-color 0.3s ease, color 0.3s ease;
}

html[data-theme="dark"] .content {
  background: var(--bg-primary, #090c14) !important;
}

html[data-theme="light"] .content {
  background: var(--bg-primary, #f8fafc) !important;
}

/* ============================================
   CARD STYLING
   ============================================ */

.card {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

html[data-theme="dark"] .card {
  background: var(--bg-card, rgba(18, 25, 47, 0.65)) !important;
  border-color: var(--border-color, rgba(255, 255, 255, 0.08)) !important;
  color: var(--text-primary, #f8fafc);
}

html[data-theme="light"] .card {
  background: var(--bg-card, rgba(255, 255, 255, 0.85)) !important;
  border-color: var(--border-color, rgba(0, 0, 0, 0.08)) !important;
  color: var(--text-primary, #0f172a);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

input,
textarea,
select {
  transition: var(--transition-smooth, all 0.25s ease);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: var(--bg-input, #12182e) !important;
  color: var(--text-primary, #f8fafc) !important;
  border-color: var(--border-color, rgba(255, 255, 255, 0.08)) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: var(--text-muted, #475569) !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  border-color: var(--border-color-focus, rgba(59, 130, 246, 0.5)) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 59, 130, 246), 0.1) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background: var(--bg-input, #f1f5f9) !important;
  color: var(--text-primary, #0f172a) !important;
  border-color: var(--border-color, rgba(0, 0, 0, 0.08)) !important;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus {
  border-color: var(--border-color-focus, rgba(37, 99, 235, 0.5)) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 37, 99, 235), 0.08) !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-slide-down {
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in {
  animation: fadeIn 0.3s ease;
}

/* ============================================
   MITRABOOKS ERP REDESIGNED SHELL
   ============================================ */

.erp-sidebar {
  background: var(--bg-sidebar, #0a0d18);
  border-right: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100vh;
  padding: 18px 16px;
  position: sticky;
  top: 0;
}

.erp-brand {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 44px 1fr;
  isolation: isolate;
  min-height: 60px;
}

.brand-mark {
  background: var(--accent-color, #3b82f6);
  border-radius: 8px;
  filter: blur(12px);
  height: 42px;
  opacity: 0.25;
  position: absolute;
  width: 42px;
  z-index: -1;
}

.erp-brand .brand-logo {
  border-radius: 8px;
  height: 44px;
  object-fit: contain;
  width: 44px;
}

.brand-text h1 {
  color: var(--text-primary, #f8fafc);
  font-size: 18px;
  line-height: 1.15;
  margin: 0;
}

.brand-text p {
  color: var(--text-secondary, #94a3b8);
  font-size: 12px;
  line-height: 1.35;
  margin: 2px 0 0;
}

.org-selector,
.fy-selector {
  position: relative;
}

.selected-org,
.fy-badge,
.theme-btn,
.user-profile-tile,
.pwa-status-widget {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-primary, #f8fafc);
}

.selected-org {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.context-dot {
  background: var(--accent-color, #3b82f6);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--accent-color, #3b82f6);
  flex: 0 0 10px;
  height: 10px;
  width: 10px;
}

.muted-dot {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.context-copy,
.user-details,
.pwa-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.context-copy span,
.context-copy small,
.user-details strong,
.user-details span,
.pwa-details span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-copy span,
.org-option strong,
.user-details strong,
.pwa-details strong {
  font-size: 12px;
  font-weight: 700;
}

.context-copy small,
.org-option small,
.fy-selector,
.user-details span,
.pwa-details span {
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
}

.chevron-icon {
  color: var(--text-secondary, #94a3b8);
  flex: 0 0 14px;
  height: 14px;
  transition: transform 0.2s ease;
  width: 14px;
}

.org-selector.open .chevron-icon {
  transform: rotate(180deg);
}

.org-dropdown,
.fy-dropdown {
  background: var(--bg-secondary, #0f1424);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  left: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
}

.org-dropdown[hidden],
.fy-dropdown[hidden] {
  display: none;
}

.org-option,
.fy-option {
  cursor: pointer;
  display: flex;
  gap: 12px;
  padding: 11px 12px;
}

.org-option > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.org-option strong,
.org-option small {
  display: block;
  line-height: 1.25;
}

.org-option:not(:last-child),
.fy-option:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.org-option:hover,
.fy-option:hover,
.org-option.active,
.fy-option.active {
  background: rgba(var(--accent-rgb, 59, 130, 246), 0.1);
}

.fy-selector {
  align-items: center;
  display: flex;
  gap: 8px;
  padding: 2px 0;
}

.fy-badge {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  padding: 6px 10px;
}

.fy-badge svg {
  height: 10px;
  width: 10px;
}

.fy-dropdown {
  left: 0;
  min-width: 148px;
  right: auto;
}

.fy-option {
  color: var(--text-primary, #f8fafc);
  display: block;
  font-size: 12px;
}

.fy-option small {
  color: var(--text-secondary, #94a3b8);
}

.erp-sidebar .nav {
  align-content: start;
  display: grid;
  gap: 6px;
}

.nav-group-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: space-between;
  min-height: 28px;
  padding: 8px 4px 4px;
  text-transform: none;
}

.nav-group-toggle span:last-child {
  color: var(--text-muted, #64748b);
  font-size: 11px;
  transition: transform 0.16s ease;
}

.nav-group-toggle[aria-expanded="false"] span:last-child {
  transform: rotate(-90deg);
}

.nav-group-items {
  display: grid;
  gap: 4px;
}

.nav-group-items[hidden] {
  display: none;
}

.erp-sidebar .nav a.erp-nav-link {
  border-color: transparent;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 38px;
  padding: 7px 10px;
}

.erp-sidebar .nav a.erp-nav-link::before {
  content: none;
}

.nav-icon {
  align-items: center;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 6px;
  color: #93c5fd;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  align-self: center;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 999px;
  color: #86efac;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
}

.erp-sidebar .nav a.erp-nav-link.locked {
  opacity: 0.62;
}

.erp-sidebar .nav a.erp-nav-link.locked .nav-icon {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
}

.app:not(.mandir-theme):not(.gruha-theme):not(.legal-theme):not(.invest-theme) .erp-sidebar .nav a.erp-nav-link.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #111827;
}

.erp-sidebar .nav a.erp-nav-link.active .nav-icon {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.sidebar-footer {
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.pwa-status-widget,
.user-profile-tile {
  align-items: center;
  display: flex;
  gap: 10px;
  padding: 10px;
}

.pwa-dot {
  background: var(--success-color, #10b981);
  border-radius: 999px;
  box-shadow: 0 0 6px var(--success-color, #10b981);
  height: 8px;
  width: 8px;
}

.theme-switcher {
  display: flex;
  gap: 8px;
}

.theme-btn {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  flex: 1;
  justify-content: center;
  min-height: 34px;
}

.theme-btn.active {
  border-color: rgba(var(--accent-rgb, 59, 130, 246), 0.45);
  color: var(--accent-color, #3b82f6);
}

.theme-btn svg {
  height: 15px;
  width: 15px;
}

.avatar {
  align-items: center;
  background: var(--accent-color, #3b82f6);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 12px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.erp-topbar {
  align-items: center;
  align-self: start;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, auto) minmax(180px, auto);
  gap: 20px;
  grid-row: 1;
  justify-content: space-between;
  min-height: 78px;
  padding: 16px 24px;
  position: static;
  top: auto;
  width: 100%;
  z-index: auto;
}

.page-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.breadcrumb {
  align-items: center;
  color: var(--text-secondary, #94a3b8);
  display: flex;
  font-size: 12px;
  gap: 8px;
}

.breadcrumb strong,
.page-title-block h1 {
  color: var(--text-primary, #f8fafc);
}

.page-title-block h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.topbar-control-strip {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
}

.health-score-widget {
  align-items: center;
  background: rgba(var(--warning-rgb, 245, 158, 11), 0.08);
  border: 1px solid rgba(var(--warning-rgb, 245, 158, 11), 0.22);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-width: 150px;
  padding: 8px 10px;
}

.health-score-widget.ok {
  background: rgba(var(--success-rgb, 16, 185, 129), 0.08);
  border-color: rgba(var(--success-rgb, 16, 185, 129), 0.25);
}

.health-score-widget.pending {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.18);
}

.circular-chart {
  flex: 0 0 40px;
  height: 40px;
  width: 40px;
}

.circle-bg,
.circle {
  fill: none;
  stroke-width: 2;
}

.circle-bg {
  stroke: rgba(148, 163, 184, 0.25);
}

.circle {
  stroke: var(--warning-color, #f59e0b);
  stroke-linecap: round;
  transition: stroke-dasharray 0.25s ease;
}

.health-score-widget.ok .circle {
  stroke: var(--success-color, #10b981);
}

.health-score-widget.pending .circle {
  stroke: var(--text-secondary, #94a3b8);
}

.percentage {
  fill: currentColor;
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
}

.health-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.health-text strong {
  color: var(--text-primary, #f8fafc);
  font-size: 12px;
}

.health-text span {
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
}

.action-buttons {
  align-items: center;
  display: flex;
  gap: 10px;
}

.btn {
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 14px;
}

.btn-primary {
  background: var(--accent-color, #3b82f6);
  border: 1px solid var(--accent-color, #3b82f6);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #f8fafc);
}

.btn:hover,
.theme-btn:hover,
.selected-org:hover,
.fy-badge:hover {
  filter: brightness(1.08);
}

.advanced-connection,
.technical-context[hidden] {
  display: none !important;
}

.app.signed-out {
  display: block;
  min-height: 100vh;
}

.app.signed-out .erp-sidebar,
.app.signed-out .erp-topbar,
.app.signed-out #context-cards,
.app.signed-out #legacy-strip,
.app.signed-out #dashboard-preview,
.app.signed-out .technical-context {
  display: none !important;
}

.app.signed-out .main {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

/* Hide legacy dashboard styles - but keep new clean version visible */
.legacy-dashboard:not(.business-dashboard-clean):not(.platform-dashboard):not(.mandir-dashboard):not(.gruha-dashboard) {
  display: none !important;
}

.platform-dashboard {
  display: grid;
  gap: 20px;
  color: var(--text-primary, #f8fafc);
}

.platform-dashboard .preview-heading {
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 20px;
}

.platform-dashboard .preview-heading h3 {
  color: var(--text-primary, #f8fafc);
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 6px;
}

.platform-dashboard .preview-heading p {
  color: var(--text-secondary, #94a3b8);
  margin: 0;
  max-width: 760px;
}

.platform-dashboard .pill {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: #93c5fd;
  white-space: nowrap;
}

.platform-dashboard .metric-grid {
  display: grid;
  gap: 16px;
}

.platform-dashboard .metric-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-dashboard .metric-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.platform-dashboard .metric-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.platform-dashboard .metric-card,
.platform-dashboard .dashboard-main-grid > article,
.platform-dashboard > article {
  background: var(--bg-card, rgba(18, 25, 47, 0.72));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  color: var(--text-primary, #f8fafc);
  padding: 20px;
}

.platform-dashboard .metric-card {
  gap: 8px;
}

.platform-dashboard .metric-label {
  color: var(--text-secondary, #94a3b8);
}

.platform-dashboard .metric-value {
  color: var(--accent-color, #3b82f6);
}

.platform-dashboard .metric-sub,
.platform-dashboard .muted {
  color: var(--text-secondary, #94a3b8);
}

.platform-dashboard h4 {
  color: var(--text-primary, #f8fafc);
  font-size: 16px;
  margin: 0 0 12px;
}

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

.platform-dashboard .table-preview {
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  overflow-x: auto;
}

.platform-dashboard .table-preview table {
  border-collapse: collapse;
  color: var(--text-primary, #f8fafc);
  min-width: 760px;
  width: 100%;
}

.platform-dashboard .table-preview th,
.platform-dashboard .table-preview td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  padding: 12px 14px;
  text-align: left;
}

.platform-dashboard .table-preview th {
  background: rgba(148, 163, 184, 0.10);
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.platform-dashboard .table-preview td {
  color: var(--text-primary, #e2e8f0);
}

.platform-dashboard .table-preview tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

.platform-dashboard .status-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.platform-dashboard .status-list li {
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.platform-dashboard .status-list strong {
  color: var(--text-primary, #f8fafc);
}

.platform-dashboard .status-list span {
  color: var(--text-secondary, #94a3b8);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .platform-dashboard .metric-grid.four,
  .platform-dashboard .metric-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-dashboard .dashboard-main-grid.platform-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .platform-dashboard .preview-heading {
    flex-direction: column;
  }

  .platform-dashboard .metric-grid.two,
  .platform-dashboard .metric-grid.three,
  .platform-dashboard .metric-grid.four {
    grid-template-columns: 1fr;
  }
}

.app.signed-out .content {
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(16, 185, 129, 0.08)),
    var(--bg-primary, #090c14) !important;
  display: grid;
  min-height: 100vh;
  padding: 28px;
  place-items: center;
  width: 100%;
}

.app.signed-out #access-panel {
  max-width: 760px;
  width: min(760px, 100%);
}

.app.signed-in:not(.mandir-domain) #access-panel {
  display: none;
}

.app.signed-in:not(.mandir-domain) #context-cards {
  display: none;
}

.app.signed-in:not(.mandir-domain) .main {
  display: grid;
  flex-direction: column;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  min-width: 0;
}

.app.signed-in:not(.mandir-domain) .content {
  grid-row: 2;
  min-width: 0;
  overflow-x: hidden;
  padding-bottom: 32px;
  scroll-padding-top: 120px;
}

.app.signed-in:not(.mandir-domain) #legacy-strip {
  display: none;
}

.module-switch[hidden],
.mandir-login-links[hidden] {
  display: none !important;
}

.business-context-cards .card {
  min-height: 148px;
}

.business-context-cards h3 {
  margin-bottom: 10px;
}

.dashboard-command-card,
.ceo-insight-card {
  display: grid;
  gap: 16px;
}

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

.mini-kpi-row span {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 8px;
  color: var(--text-secondary, #94a3b8);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.mini-kpi-row strong {
  color: var(--text-primary, #f8fafc);
  font-size: 18px;
}

.business-dashboard {
  display: grid;
  gap: 18px;
}

.business-dashboard .preview-heading {
  align-items: start;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(var(--accent-rgb, 59, 130, 246), 0.22);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.business-dashboard .preview-heading h3 {
  font-size: 24px;
  margin: 0 0 6px;
}

.business-dashboard .preview-heading p {
  max-width: 760px;
}

.business-kpi-grid {
  margin-top: -2px;
}

.erp-workbench-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-workbench-card {
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 188px;
  padding: 16px;
}

.erp-workbench-card h4 {
  color: var(--text-primary, #f8fafc);
  font-size: 17px;
  margin: 0;
}

.erp-workbench-card strong {
  color: var(--text-primary, #f8fafc);
  font-size: 30px;
  line-height: 1;
}

.erp-workbench-card p {
  color: var(--text-secondary, #94a3b8);
  margin: 0;
}

.erp-workbench-card button {
  align-self: end;
  justify-self: start;
}

.planned-org-workspace {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.planned-org-hero {
  align-items: start;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.planned-org-hero h3 {
  color: var(--text-primary, #f8fafc);
  font-size: 24px;
  margin: 6px 0 8px;
}

.planned-org-hero p,
.planned-org-note span,
.planned-org-module-grid p {
  color: var(--text-secondary, #94a3b8);
  margin: 0;
}

.planned-org-kpis,
.planned-org-module-grid {
  display: grid;
  gap: 14px;
}

.planned-org-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planned-org-module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planned-org-kpis article,
.planned-org-module-grid article,
.planned-org-note {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 16px;
}

.planned-org-kpis article {
  display: grid;
  gap: 6px;
}

.planned-org-kpis span {
  color: var(--text-secondary, #94a3b8);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.planned-org-kpis strong {
  color: var(--text-primary, #f8fafc);
  font-size: 28px;
  line-height: 1;
}

.planned-org-kpis small {
  color: var(--text-secondary, #94a3b8);
}

.planned-org-module-grid article {
  display: grid;
  gap: 12px;
}

.planned-org-module-grid article > div {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.planned-org-module-grid h4,
.planned-org-note strong {
  color: var(--text-primary, #f8fafc);
  margin: 0;
}

.planned-org-note {
  display: grid;
  gap: 6px;
}

.ca-document-intake {
  display: grid;
  gap: 14px;
}

.ca-document-upload-card {
  align-items: stretch;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.44fr);
  padding: 16px;
}

.ca-document-upload-card form {
  display: grid;
  gap: 0;
}

.ca-document-upload-card h4 {
  color: var(--text-primary, #f8fafc);
  font-size: 20px;
  margin: 6px 0 8px;
}

.ca-document-upload-card p {
  color: var(--text-secondary, #94a3b8);
  margin: 0;
}

.ca-upload-field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.ca-upload-field-grid label {
  display: grid;
  gap: 6px;
}

.ca-upload-field-grid span {
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ca-upload-field-grid input,
.ca-upload-field-grid select {
  background: rgba(12, 18, 35, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  color: var(--text-primary, #f8fafc);
  font-size: 13px;
  min-height: 40px;
  padding: 0 12px;
}

.ca-upload-field-grid .ca-checkbox-field {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 40px;
}

.ca-upload-field-grid .ca-checkbox-field input {
  min-height: auto;
  width: auto;
}

.ca-upload-field-grid .ca-checkbox-field span {
  text-transform: none;
}

.ca-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ca-document-actions button {
  min-height: 38px;
}

.ca-upload-placeholder {
  align-items: center;
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(96, 165, 250, 0.42);
  border-radius: 8px;
  color: var(--text-secondary, #94a3b8);
  display: grid;
  gap: 5px;
  justify-items: center;
  min-height: 128px;
  padding: 18px;
  text-align: center;
}

.ca-upload-placeholder strong {
  color: var(--text-primary, #f8fafc);
  font-size: 18px;
}

.ca-upload-placeholder span,
.ca-upload-placeholder small {
  color: var(--text-secondary, #94a3b8);
}

.ca-upload-placeholder input {
  display: none;
}

.ca-document-workflow {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 12px;
}

.ca-document-workflow span {
  align-items: center;
  background: rgba(30, 41, 59, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 7px;
  color: var(--text-secondary, #94a3b8);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  text-align: center;
}

.ca-document-workflow span.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.48);
  color: var(--accent-primary, #60a5fa);
}

.ca-document-status-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ca-document-status-grid article {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.ca-document-status-grid span {
  color: var(--text-secondary, #94a3b8);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ca-document-status-grid strong {
  color: var(--text-primary, #f8fafc);
  font-size: 26px;
  line-height: 1;
}

.ca-document-status-grid small {
  color: var(--text-secondary, #94a3b8);
}

.ca-practice-filter-panel {
  align-items: end;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  padding: 12px;
}

.ca-practice-filter-panel label {
  display: grid;
  gap: 6px;
}

.ca-practice-filter-panel span,
.ca-practice-operations-grid span {
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ca-practice-filter-panel input,
.ca-practice-filter-panel select {
  background: rgba(12, 18, 35, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  color: var(--text-primary, #f8fafc);
  min-height: 38px;
  padding: 0 10px;
}

.ca-practice-filter-actions {
  display: flex;
  gap: 8px;
}

.ca-practice-operations-grid,
.ca-practice-workload-grid {
  display: grid;
  gap: 14px;
}

.ca-practice-operations-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ca-practice-workload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ca-practice-operations-grid article,
.ca-practice-workload-grid section {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 14px;
}

.ca-practice-operations-grid article {
  display: grid;
  gap: 6px;
}

.ca-practice-operations-grid strong {
  color: var(--text-primary, #f8fafc);
  font-size: 24px;
}

.ca-practice-operations-grid small,
.ca-practice-workload-grid h5 {
  color: var(--text-secondary, #94a3b8);
}

.ca-practice-workload-grid h5 {
  font-size: 13px;
  margin: 0 0 10px;
}

.ca-practice-row {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  justify-content: space-between;
  min-height: 34px;
}

.ca-practice-row:first-of-type {
  border-top: 0;
}

.ca-practice-row span {
  color: var(--text-primary, #f8fafc);
}

.ca-practice-row strong {
  color: var(--accent-primary, #60a5fa);
}

.ca-document-status-table {
  margin: 0;
}

.ca-document-note {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  color: var(--text-secondary, #94a3b8);
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 14px;
}

.executive-dashboard {
  display: grid;
  gap: 16px;
}

.executive-hero,
.finance-chart-card,
.ceo-panel {
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
}

.executive-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.96fr) minmax(360px, 1.04fr);
  padding: 18px;
}

.executive-hero h3 {
  color: var(--text-primary, #f8fafc);
  font-size: 24px;
  margin: 6px 0 8px;
}

.executive-hero p,
.ceo-panel p,
.finance-chart-card p {
  color: var(--text-secondary, #94a3b8);
  margin: 0;
  max-width: 58ch;
}

.executive-kpi-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.executive-kpi-strip article {
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 14px;
}

.executive-kpi-strip span,
.executive-kpi-strip small {
  color: var(--text-secondary, #94a3b8);
}

.executive-kpi-strip strong {
  color: var(--text-primary, #f8fafc);
  font-size: 25px;
  line-height: 1.1;
}

.finance-dashboard-grid {
  display: grid;
  gap: 16px;
  align-items: start;
  grid-template-columns: minmax(460px, 1.3fr) minmax(320px, 0.7fr);
}

.finance-chart-card,
.ceo-panel {
  padding: 16px;
}

.finance-chart {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, minmax(44px, 1fr));
  min-height: 152px;
  padding: 18px 4px 6px;
}

.finance-bar-group {
  align-items: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.finance-bars {
  align-items: end;
  display: flex;
  gap: 7px;
  height: 104px;
}

.finance-bars span {
  border-radius: 999px 999px 4px 4px;
  display: block;
  width: 16px;
}

.income-bar {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.expense-bar {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.finance-bar-group small,
.chart-legend {
  color: var(--text-secondary, #94a3b8);
}

.chart-legend {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}

.chart-legend span {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.chart-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.income-dot {
  background: #22c55e;
}

.expense-dot {
  background: #38bdf8;
}

.ceo-panel {
  background:
    radial-gradient(circle at 14% 10%, rgba(168, 85, 247, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(18, 25, 47, 0.92), rgba(20, 24, 54, 0.82));
  overflow: hidden;
}

.ceo-title-block {
  column-gap: 10px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  row-gap: 2px;
}

.ceo-title-block h4 {
  margin: 0;
}

.ceo-title-block p {
  grid-column: 1 / -1;
}

.ceo-orbit {
  align-self: center;
  border: 2px solid rgba(168, 85, 247, 0.7);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
  height: 16px;
  position: relative;
  width: 16px;
}

.ceo-orbit::after {
  background: #c084fc;
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
}

.ai-badge {
  align-self: center;
  background: rgba(126, 34, 206, 0.58);
  border: 1px solid rgba(168, 85, 247, 0.42);
  border-radius: 999px;
  color: #d8b4fe;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 10px;
  width: max-content;
}

.ceo-insight-list {
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-bottom: 16px;
}

.ceo-insight-row {
  align-items: start;
  color: var(--text-primary, #f8fafc);
  display: grid;
  gap: 10px;
  grid-template-columns: 14px minmax(0, 1fr);
  line-height: 1.45;
}

.ceo-insight-copy {
  display: grid;
  gap: 4px;
}

.ceo-insight-copy strong {
  color: var(--text-primary, #f8fafc);
  font-size: 18px;
  line-height: 1.25;
}

.ceo-insight-copy span {
  color: var(--text-secondary, #cbd5e1);
  font-size: 14px;
}

.insight-spark {
  align-self: start;
  height: 14px;
  margin-top: 4px;
  position: relative;
  width: 14px;
}

.insight-spark::before {
  background: #c084fc;
  clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
  content: "";
  display: block;
  height: 14px;
  width: 14px;
}

.ceo-ask-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin-top: 18px;
}

.ceo-ask-row input {
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: var(--text-primary, #f8fafc);
  min-height: 44px;
  min-width: 0;
  padding: 0 14px;
}

.ceo-ask-row input::placeholder {
  color: rgba(148, 163, 184, 0.72);
}

.ceo-ask-row button {
  background: #3b82f6;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 800;
  min-height: 44px;
  padding: 0 18px;
}

.ceo-footnote {
  color: var(--text-secondary, #94a3b8);
  font-size: 12px;
  margin-top: 12px;
}

/* ============================================
   DASHBOARD WIDGET CONTROLS (Phase 2C.2-2C.3)
   Collapsible and Customizable Widgets
   ============================================ */

.dashboard-widget {
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 16px;
  position: relative;
  transition: all 0.3s ease;
}

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

.widget-header h4 {
  color: var(--text-primary, #f8fafc);
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
  padding: 0;
}

.widget-header-controls {
  align-items: center;
  display: flex;
  gap: 8px;
}

.widget-collapse-btn {
  background: transparent;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  font-size: 16px;
  min-width: 36px;
  padding: 6px 8px;
  transition: all 0.2s ease;
}

.widget-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary, #94a3b8);
  color: var(--text-primary, #f8fafc);
}

.widget-content {
  max-height: 999px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Collapsed state: hide content with smooth animation */
.dashboard-widget.collapsed .widget-content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Hidden widgets (Phase 2C.3) */
.dashboard-widget.hidden {
  display: none;
}

/* Dashboard toolbar (Phase 2C.3) */
.dashboard-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.dashboard-customize-btn {
  background: transparent;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: 6px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.55));
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.dashboard-customize-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary, #fff);
}

/* Widget settings overlay (Phase 2C.3) */
.widget-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 60px 24px 0;
  pointer-events: none;
}

.widget-settings-panel {
  background: var(--bg-card, #141c35);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  min-width: 280px;
  max-width: 340px;
  pointer-events: all;
  width: 100%;
}

.widget-settings-header {
  align-items: center;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.widget-settings-header h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.widget-settings-close {
  background: transparent;
  border: none;
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 6px;
  transition: color 0.15s;
}

.widget-settings-close:hover {
  color: var(--text-primary, #fff);
}

.widget-settings-hint {
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
  font-size: 11px;
  margin: 0;
  padding: 10px 16px 6px;
}

.widget-settings-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 16px 10px;
}

.widget-settings-row {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
}

.widget-settings-row:last-child {
  border-bottom: none;
}

.widget-settings-label {
  color: var(--text-primary, rgba(255, 255, 255, 0.85));
  font-size: 12px;
  flex: 1;
}

/* Toggle switch (Phase 2C.3) */
.widget-settings-toggle {
  display: none;
}

.widget-settings-switch {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  cursor: pointer;
  display: inline-block;
  flex-shrink: 0;
  height: 20px;
  position: relative;
  transition: background 0.2s;
  width: 36px;
}

.widget-settings-switch::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 14px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: left 0.2s;
  width: 14px;
}

.widget-settings-toggle:checked + .widget-settings-switch {
  background: #4f7cff;
}

.widget-settings-toggle:checked + .widget-settings-switch::after {
  left: 19px;
}

.widget-settings-footer {
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  padding: 12px 16px;
}

.widget-settings-footer .secondary {
  font-size: 12px;
  width: 100%;
}

/* Grid wrapper for side-by-side widgets */
.finance-dashboard-grid-wrapper {
  display: grid;
  gap: 16px;
  align-items: start;
  grid-template-columns: minmax(460px, 1.3fr) minmax(320px, 0.7fr);
}

/* Responsive: Stack on smaller screens */
@media (max-width: 1024px) {
  .finance-dashboard-grid-wrapper {
    grid-template-columns: 1fr;
  }

  .widget-header {
    flex-wrap: wrap;
  }

  .widget-header h4 {
    flex: 1;
    min-width: 200px;
  }
}

.business-overview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.business-overview-main,
.business-overview-side {
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.business-overview-side {
  align-content: start;
}

.business-recent-table table td strong {
  color: var(--text-primary, #f8fafc);
  display: block;
  font-size: 13px;
}

.business-recent-table .row-subtext {
  color: var(--text-secondary, #94a3b8);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

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

.business-focus-list {
  grid-template-columns: 1fr;
}

.business-overview-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 0 2px;
}

.inline-summary {
  color: var(--text-secondary, #94a3b8);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

.inline-summary strong {
  color: var(--text-primary, #f8fafc);
  margin-right: 4px;
}

.workbench-kicker {
  color: var(--accent-color, #3b82f6);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-tile,
.dashboard-main-grid > article,
.verification-panel,
.erp-health-panel,
.accounting-drilldown-panel,
.trend-panel,
.table-preview,
.entry-panel {
  border-radius: 8px;
}

.app:not(.mandir-domain) .erp-workspace-panel,
.app:not(.mandir-domain) .verification-panel {
  background: var(--bg-card, rgba(18, 25, 47, 0.72));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  color: var(--text-primary, #f8fafc);
}

.app:not(.mandir-domain) .erp-table {
  background: var(--bg-card, rgba(18, 25, 47, 0.72));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  overflow-x: auto;
}

.app:not(.mandir-domain) .erp-table table {
  color: var(--text-primary, #f8fafc);
  min-width: 760px;
}

.app:not(.mandir-domain) .erp-table th,
.app:not(.mandir-domain) .erp-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  padding: 12px 14px;
}

.app:not(.mandir-domain) .erp-table th {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.app:not(.mandir-domain) .erp-table td {
  color: var(--text-primary, #f8fafc);
}

.app:not(.mandir-domain) .erp-table tbody tr {
  background: rgba(15, 20, 36, 0.74);
}

.app:not(.mandir-domain) .erp-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

.app:not(.mandir-domain) .table-preview {
  background: rgba(18, 25, 47, 0.72) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  color: var(--text-primary, #f8fafc) !important;
  overflow-x: auto;
}

.app:not(.mandir-domain) .table-preview table {
  background: transparent !important;
  color: var(--text-primary, #f8fafc) !important;
}

.app:not(.mandir-domain) .table-preview th,
.app:not(.mandir-domain) .table-preview td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
}

.app:not(.mandir-domain) .table-preview th {
  background: rgba(148, 163, 184, 0.1) !important;
  color: var(--text-secondary, #94a3b8) !important;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.app:not(.mandir-domain) .table-preview td {
  background: transparent !important;
  color: var(--text-primary, #f8fafc) !important;
}

.app:not(.mandir-domain) .table-preview tbody tr {
  background: rgba(15, 20, 36, 0.74) !important;
}

.app:not(.mandir-domain) .table-preview tbody tr:hover {
  background: rgba(59, 130, 246, 0.08) !important;
}

.app:not(.mandir-domain) .erp-workspace-panel .table-preview,
.app:not(.mandir-domain) .verification-panel .table-preview {
  box-shadow: none !important;
}

.app:not(.mandir-domain) .table-preview button.secondary,
.app:not(.mandir-domain) .table-preview a,
.app:not(.mandir-domain) .table-preview [data-business-action] {
  color: #cbd5e1 !important;
}

.erp-workspace-panel .table-preview,
.verification-panel .table-preview {
  background: rgba(18, 25, 47, 0.72) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  color: #f8fafc !important;
}

.erp-workspace-panel .table-preview table,
.verification-panel .table-preview table,
.erp-workspace-panel .erp-table table,
.verification-panel .erp-table table {
  background: transparent !important;
  color: #f8fafc !important;
}

.erp-workspace-panel .table-preview thead,
.verification-panel .table-preview thead,
.erp-workspace-panel .erp-table thead,
.verification-panel .erp-table thead {
  background: transparent !important;
}

.erp-workspace-panel .table-preview th,
.verification-panel .table-preview th,
.erp-workspace-panel .erp-table th,
.verification-panel .erp-table th {
  background: rgba(148, 163, 184, 0.1) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
  color: #94a3b8 !important;
}

.erp-workspace-panel .table-preview tbody,
.verification-panel .table-preview tbody,
.erp-workspace-panel .erp-table tbody,
.verification-panel .erp-table tbody {
  background: rgba(15, 20, 36, 0.74) !important;
}

.erp-workspace-panel .table-preview tr,
.verification-panel .table-preview tr,
.erp-workspace-panel .erp-table tr,
.verification-panel .erp-table tr {
  background: rgba(15, 20, 36, 0.74) !important;
}

.erp-workspace-panel .table-preview td,
.verification-panel .table-preview td,
.erp-workspace-panel .erp-table td,
.verification-panel .erp-table td {
  background: transparent !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
  color: #f8fafc !important;
}

.erp-workspace-panel .table-preview button,
.verification-panel .table-preview button,
.erp-workspace-panel .erp-table button,
.verification-panel .erp-table button {
  color: #cbd5e1 !important;
}

.erp-workspace-panel .empty-state,
.verification-panel .empty-state {
  background: rgba(18, 25, 47, 0.72) !important;
  border: 1px dashed rgba(148, 163, 184, 0.28) !important;
  color: #94a3b8 !important;
}

.app:not(.mandir-domain) .empty-state {
  background: rgba(18, 25, 47, 0.72) !important;
  border: 1px dashed rgba(148, 163, 184, 0.28) !important;
  color: var(--text-secondary, #94a3b8) !important;
  min-height: 96px;
  padding: 22px;
}

.app:not(.mandir-domain) .empty-state strong {
  color: var(--text-primary, #f8fafc) !important;
}

.app:not(.mandir-domain) .empty-state span,
.app:not(.mandir-domain) .empty-state p {
  color: var(--text-secondary, #94a3b8) !important;
}

.app:not(.mandir-domain) .list-filter-panel {
  color: var(--text-primary, #f8fafc);
}

.app:not(.mandir-domain) .list-filter-panel .field span {
  color: var(--text-secondary, #94a3b8);
}

.app:not(.mandir-domain) .list-filter-panel input,
.app:not(.mandir-domain) .list-filter-panel select {
  background: #11182d;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
  color: #f8fafc;
}

.app:not(.mandir-domain) .list-filter-panel input::placeholder {
  color: #64748b;
  opacity: 1;
}

.app:not(.mandir-domain) .list-filter-panel input:focus,
.app:not(.mandir-domain) .list-filter-panel select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  outline: none;
}

.app:not(.mandir-domain) .erp-table td strong {
  color: var(--text-primary, #f8fafc);
  display: block;
  font-weight: 800;
}

.app:not(.mandir-domain) .erp-table .row-subtext {
  color: var(--text-secondary, #94a3b8);
  margin-top: 4px;
}

.app:not(.mandir-domain) .erp-table .type-chip {
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.26);
  color: #93c5fd;
}

.app:not(.mandir-domain) .erp-table .pill.ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #6ee7b7;
}

.app:not(.mandir-domain) .erp-table .action-row {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.app:not(.mandir-domain) .erp-table .action-row button {
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.app:not(.mandir-domain) .audit-table {
  background: rgba(18, 25, 47, 0.72);
  box-shadow: none;
}

.app:not(.mandir-domain) .audit-table table {
  min-width: 860px;
}

.app:not(.mandir-domain) .audit-table .pill {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.26);
  color: #93c5fd;
}

.app:not(.mandir-domain) .audit-table .secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.app:not(.mandir-domain) .list-filter-panel[data-business-list="audit"] {
  background: transparent;
  color: var(--text-primary, #f8fafc);
}

.app:not(.mandir-domain) .list-filter-panel[data-business-list="audit"] .field span {
  color: var(--text-secondary, #94a3b8);
}

.app:not(.mandir-domain) .list-filter-panel[data-business-list="audit"] input,
.app:not(.mandir-domain) .list-filter-panel[data-business-list="audit"] select {
  background: #11182d;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
  color: #f8fafc;
  min-height: 42px;
  padding: 9px 12px;
}

.app:not(.mandir-domain) .list-filter-panel[data-business-list="audit"] input:focus,
.app:not(.mandir-domain) .list-filter-panel[data-business-list="audit"] select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  outline: none;
}

.app:not(.mandir-domain) .list-filter-panel[data-business-list="audit"] button {
  min-height: 42px;
}

html[data-theme="light"] .erp-sidebar .brand-text h1,
html[data-theme="light"] .erp-sidebar .brand-text p,
html[data-theme="light"] .erp-sidebar .context-copy span,
html[data-theme="light"] .erp-sidebar .user-details strong,
html[data-theme="light"] .erp-sidebar .pwa-details strong {
  color: var(--text-primary, #0f172a);
}

html[data-theme="light"] .erp-sidebar .context-copy small,
html[data-theme="light"] .erp-sidebar .user-details span,
html[data-theme="light"] .erp-sidebar .pwa-details span,
html[data-theme="light"] .fy-selector {
  color: var(--text-secondary, #475569);
}

html[data-theme="light"] .erp-sidebar {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #0f172a;
}

html[data-theme="light"] .erp-sidebar .nav-group-title,
html[data-theme="light"] .erp-sidebar .nav-section-title,
html[data-theme="light"] .erp-sidebar .nav-group-toggle,
html[data-theme="light"] .erp-sidebar .nav a,
html[data-theme="light"] .erp-sidebar .nav button,
html[data-theme="light"] .erp-sidebar .erp-nav-link {
  color: #334155 !important;
}

html[data-theme="light"] .erp-sidebar .nav a:hover,
html[data-theme="light"] .erp-sidebar .nav button:hover,
html[data-theme="light"] .erp-sidebar .erp-nav-link:hover {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] .erp-sidebar .nav a.active,
html[data-theme="light"] .erp-sidebar .nav button.active,
html[data-theme="light"] .erp-sidebar .erp-nav-link.active {
  background: #eff6ff !important;
  color: #1e3a8a !important;
}

html[data-theme="light"] .erp-sidebar .erp-nav-link[aria-disabled="true"],
html[data-theme="light"] .erp-sidebar .nav a[aria-disabled="true"],
html[data-theme="light"] .erp-sidebar .nav button[aria-disabled="true"] {
  color: #64748b !important;
  opacity: 0.72;
}

html[data-theme="light"] .erp-sidebar .context-card,
html[data-theme="light"] .erp-sidebar .fy-selector,
html[data-theme="light"] .erp-sidebar .pwa-card,
html[data-theme="light"] .erp-sidebar .sidebar-user-card,
html[data-theme="light"] .erp-sidebar .theme-btn {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

/* ============================================
   CLEAN BUSINESS DASHBOARD
   ============================================ */

.business-dashboard-clean {
  display: grid;
  gap: 24px;
  padding: 0;
  width: 100%;
  min-height: auto;
}

.financial-health-workspace {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.financial-health-status-grid,
.financial-health-grid {
  display: grid;
  gap: 14px;
}

.financial-health-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.financial-health-status-grid article,
.financial-health-grid article,
.financial-health-roadmap {
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  padding: 14px;
}

.financial-health-status-grid span {
  color: #93c5fd;
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.financial-health-status-grid strong,
.financial-health-grid h5,
.financial-health-roadmap h5 {
  color: var(--text-primary, #f8fafc);
  display: block;
  font-size: 15px;
  margin: 0 0 8px;
}

.financial-health-status-grid p,
.financial-health-roadmap p {
  color: var(--text-secondary, #94a3b8);
  margin: 0;
}

.financial-health-grid ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.financial-health-grid li {
  display: grid;
  gap: 3px;
}

.financial-health-grid li strong {
  color: var(--text-primary, #f8fafc);
  font-size: 13px;
}

.financial-health-grid li span,
.financial-health-roadmap li {
  color: var(--text-secondary, #94a3b8);
  font-size: 13px;
}

.financial-health-roadmap ol {
  display: grid;
  gap: 8px;
  margin: 0 0 12px 18px;
  padding: 0;
}

@media (max-width: 980px) {
  .financial-health-status-grid,
  .financial-health-grid {
    grid-template-columns: 1fr;
  }
}

/* Financial Health — live CFO Insight (KPIs, alerts, charts) */
.fh-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.fh-kpi {
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 3px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.fh-kpi-label {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.fh-kpi-value {
  color: var(--text-primary, #f8fafc);
  font-size: 18px;
}

.fh-kpi-hint {
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
}

.fh-tone-good { border-left-color: #22c55e; }
.fh-tone-warn { border-left-color: #f59e0b; }
.fh-tone-bad { border-left-color: #ef4444; }
.fh-tone-good .fh-kpi-value { color: #4ade80; }
.fh-tone-bad .fh-kpi-value { color: #f87171; }

.fh-section-title {
  color: var(--text-primary, #f8fafc);
  font-size: 14px;
  margin: 4px 0 10px;
}

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

.fh-alert {
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 3px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  padding: 10px 14px;
  display: grid;
  gap: 2px;
}

.fh-alert strong { color: var(--text-primary, #f8fafc); font-size: 13px; }
.fh-alert span { color: var(--text-secondary, #94a3b8); font-size: 13px; }
.fh-alert-danger { border-left-color: #ef4444; }
.fh-alert-warning { border-left-color: #f59e0b; }
.fh-alert-info { border-left-color: #38bdf8; }

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

.fh-chart-card {
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  padding: 14px;
}

.fh-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fh-chart-head h5 { color: var(--text-primary, #f8fafc); font-size: 14px; margin: 0; }
.fh-unit { color: var(--text-secondary, #94a3b8); font-size: 11px; }

.fh-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 140px;
  padding-top: 8px;
}

.fh-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.fh-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 124px;
}

.fh-bar {
  width: 14px;
  border-radius: 3px 3px 0 0;
  display: block;
}

.fh-bar-a { background: #38bdf8; }
.fh-bar-b { background: #f59e0b; }
.fh-bar-neg { background: #ef4444; opacity: 0.85; }
.fh-bar-group small { color: var(--text-secondary, #94a3b8); font-size: 11px; }

.fh-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
}

.fh-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.fh-narrative {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.42));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  padding: 14px 16px;
}

.fh-narrative-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.fh-narrative-head small { color: var(--text-secondary, #94a3b8); font-size: 11px; }

.fh-narrative-body p {
  color: var(--text-primary, #e2e8f0);
  font-size: 13px;
  margin: 0 0 8px;
  line-height: 1.5;
}

.fh-narrative-body ul { margin: 0 0 8px 18px; padding: 0; }
.fh-narrative-body li { color: var(--text-primary, #e2e8f0); font-size: 13px; line-height: 1.5; }

.fh-footnote {
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
  margin: 4px 0 0;
}

@media (max-width: 980px) {
  .fh-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fh-charts-grid { grid-template-columns: 1fr; }
}

/* Executive Dashboard Section */
.business-dashboard-clean .executive-dashboard {
  gap: 20px;
}

.executive-dashboard .executive-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
}

.executive-dashboard .kpi-widget-hero {
  background: transparent;
  border: 0;
  gap: 0;
  margin: 0;
  padding: 0;
}

.executive-dashboard #widget-kpi-strip .kpi-widget-hero > div:not(.executive-kpi-strip) {
  display: none !important;
}

.executive-hero h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  color: var(--text-primary, #f8fafc);
}

.executive-hero p {
  display: none; /* Hide descriptive text */
}

.executive-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.executive-kpi-strip article {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--bg-secondary, #0f1424);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
}

.executive-kpi-strip span {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.executive-kpi-strip strong {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-color, #3b82f6);
}

.executive-kpi-strip small {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
}

/* Finance Dashboard Grid (Chart + CEO Insights) */
.finance-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1200px) {
  .finance-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.finance-chart-card {
  padding: 20px;
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finance-chart-card h4 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary, #f8fafc);
}

.finance-chart-card p {
  display: none; /* Hide descriptive text */
}

.preview-heading.compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
  border: none;
}

.preview-heading.compact .pill {
  display: none; /* Hide diagnostic pills */
}

/* MIS KPI Contracts — match top executive widgets (override app-shell #fff cards) */
.executive-dashboard .metric-grid {
  gap: 16px;
  margin: 12px 0 16px;
}

.executive-dashboard .metric-tile {
  background: var(--bg-secondary, #0f1424);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  box-shadow: none;
  color: var(--text-primary, #f8fafc);
}

.executive-dashboard .metric-tile span,
.executive-dashboard .metric-tile small {
  color: var(--text-secondary, #94a3b8);
}

.executive-dashboard .metric-tile strong {
  color: var(--accent-color, #3b82f6);
  font-size: 22px;
}

.executive-dashboard .dashboard-main-grid {
  gap: 16px;
}

.executive-dashboard .dashboard-main-grid > article {
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  box-shadow: none;
  color: var(--text-primary, #f8fafc);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.executive-dashboard .dashboard-main-grid > article h4 {
  color: var(--text-primary, #f8fafc);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.executive-dashboard .dashboard-main-grid > article .table-preview {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* CEO Panel Refinements */
.ceo-panel {
  padding: 20px;
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ceo-panel h4 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary, #f8fafc);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #86efac;
  padding: 4px 8px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 4px;
}

.ceo-insight-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ceo-insight-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
}

.ceo-insight-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
}

.ceo-insight-copy strong {
  font-size: 14px;
  color: var(--accent-color, #3b82f6);
}

.ceo-insight-copy span {
  font-size: 13px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.4;
  word-break: break-word;
}

.ceo-footnote {
  display: none; /* Hide scaffolding footnote */
}

.ceo-ask-row {
  display: none; /* Hide AI input for now */
}

/* Quick Actions - Moved Below CEO Insights */
.business-quick-actions-clean {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 0;
  margin-bottom: 48px;
}

/* Bottom Metrics - Improved Visual Hierarchy */
.business-bottom-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding: 0;
  margin-bottom: 32px;
}

.metric-item {
  padding: 24px;
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.metric-item:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.metric-card {
  padding: 20px;
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.3);
}

.metric-label {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  line-height: 1.2;
}

.metric-sub {
  font-size: 13px;
  color: var(--text-secondary, #94a3b8);
  font-weight: 400;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 16px;
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  color: var(--text-primary, #f8fafc);
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  min-height: 100px;
}

.quick-action-btn:hover {
  transform: translateY(-2px);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--accent-color, #3b82f6);
}

.quick-icon {
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Recent Activity */
.business-recent-activity-clean {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--bg-card, rgba(18, 25, 47, 0.65));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
}

.business-recent-activity-clean h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-list li {
  font-size: 13px;
  color: var(--text-secondary, #94a3b8);
  padding-left: 20px;
  position: relative;
}

.activity-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color, #3b82f6);
  font-weight: bold;
}

/* Finance Chart */
.finance-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  height: 200px;
  padding: 16px 0;
}

.finance-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.finance-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 160px;
}

.finance-bars span {
  width: 20px;
  border-radius: 4px;
}

.income-bar {
  background: linear-gradient(180deg, #10b981, #059669);
}

.expense-bar {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.finance-bar-group small {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.income-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 2px;
}

.expense-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 2px;
}

/* Hide Executive Dashboard Section Headers */
.executive-hero .workbench-kicker {
  display: none;
}

.ceo-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ceo-orbit {
  display: none; /* Hide decorative orbit icon */
}

/* Insight Spark Styling */
.insight-spark {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-color, #3b82f6);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

/* ============================================
   USER PROFILE & CREDENTIALS
   ============================================ */

.topbar-actions {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 16px;
  margin-left: auto;
  min-width: 0;
}

.user-credentials-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding-right: 12px;
  border-right: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.credential-label {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.credential-email {
  font-size: 13px;
  color: var(--text-primary, #f8fafc);
  font-weight: 600;
  word-break: break-all;
  max-width: 200px;
  text-align: right;
}

.account-menu {
  position: relative;
}

.account-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  color: var(--text-primary, #f8fafc);
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 13px;
  font-weight: 600;
  max-width: 180px;
}

.account-menu-trigger .topbar-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.account-menu-trigger[aria-expanded="true"] {
  background: var(--accent-color, #3b82f6);
  border-color: var(--accent-color, #3b82f6);
  color: #ffffff;
}

.topbar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent-color, #3b82f6);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.account-menu-trigger[aria-expanded="true"] .topbar-avatar {
  background: rgba(255, 255, 255, 0.2);
}

.account-menu-trigger svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.account-menu-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary, #0f1424);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  min-width: 220px;
  z-index: 100;
  padding: 12px 0;
}

.account-menu-panel[hidden] {
  display: none !important;
}

.menu-section {
  padding: 12px 16px;
}

.menu-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.menu-item-info:last-child {
  margin-bottom: 0;
}

.menu-label {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.menu-value {
  font-size: 13px;
  color: var(--text-primary, #f8fafc);
  word-break: break-all;
}

.menu-divider {
  height: 1px;
  background: var(--border-color, rgba(255, 255, 255, 0.08));
  margin: 8px 0;
}

.menu-action-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--text-primary, #f8fafc);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.menu-action-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-color, #3b82f6);
}

.menu-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

/* Change Password Dialog */
#change-password-dialog {
  min-width: 400px;
  background: #0f1424;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  color: #f8fafc;
}

#change-password-dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
}

#change-password-dialog .dialog-head {
  margin-bottom: 20px;
}

#change-password-dialog h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

#change-password-dialog .field {
  margin-bottom: 16px;
}

#change-password-dialog label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
}

#change-password-dialog input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input, #12182e);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  color: var(--text-primary, #f8fafc);
  font-size: 13px;
  box-sizing: border-box;
}

#change-password-dialog input:focus {
  outline: none;
  border-color: var(--accent-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#change-password-dialog .dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

.dialog-actions button {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.dialog-actions .secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #f8fafc);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.dialog-actions .secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

#business-party-create-dialog,
#business-party-edit-dialog,
#audit-event-detail-dialog,
#business-voucher-create-dialog {
  background: #0f1424;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  color: #f8fafc;
  max-height: min(88vh, 820px);
  overflow-y: auto;
  width: min(92vw, 720px);
}

#business-party-create-dialog::backdrop,
#business-party-edit-dialog::backdrop,
#audit-event-detail-dialog::backdrop,
#business-voucher-create-dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
}

#business-party-create-dialog .dialog-head,
#business-party-edit-dialog .dialog-head,
#audit-event-detail-dialog .dialog-head,
#business-voucher-create-dialog .dialog-head {
  align-items: flex-start;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

#business-party-create-dialog h3,
#business-party-edit-dialog h3,
#audit-event-detail-dialog h3,
#business-voucher-create-dialog h3 {
  color: #f8fafc;
  font-size: 20px;
  margin: 0 0 4px;
}

#business-party-create-dialog .muted,
#business-party-edit-dialog .muted,
#audit-event-detail-dialog .muted,
#business-voucher-create-dialog .muted {
  color: #94a3b8;
}

#business-party-create-dialog .field,
#business-party-edit-dialog .field,
#business-voucher-create-dialog .field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

#business-party-create-dialog label,
#business-party-edit-dialog label,
#business-voucher-create-dialog label,
#business-voucher-create-dialog .voucher-lines-panel h4,
#business-voucher-create-dialog .voucher-balance-panel strong {
  color: #cbd5e1;
}

#business-party-create-dialog input,
#business-party-create-dialog select,
#business-party-edit-dialog input,
#business-party-edit-dialog select,
#business-voucher-create-dialog input,
#business-voucher-create-dialog select,
#business-voucher-create-dialog textarea {
  background: #11182d;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 7px;
  color: #f8fafc;
  min-height: 42px;
  padding: 10px 12px;
}

#business-party-create-dialog input::placeholder,
#business-party-edit-dialog input::placeholder,
#business-voucher-create-dialog input::placeholder,
#business-voucher-create-dialog textarea::placeholder {
  color: #64748b;
  opacity: 1;
}

#business-party-create-dialog input:focus,
#business-party-create-dialog select:focus,
#business-party-edit-dialog input:focus,
#business-party-edit-dialog select:focus,
#business-voucher-create-dialog input:focus,
#business-voucher-create-dialog select:focus,
#business-voucher-create-dialog textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  outline: none;
}

#business-party-create-dialog .dialog-actions,
#business-party-edit-dialog .dialog-actions,
#audit-event-detail-dialog .dialog-actions,
#business-voucher-create-dialog .dialog-actions {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
}

#audit-event-detail-dialog {
  min-width: min(500px, 92vw);
}

#audit-event-detail-dialog .secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}

.audit-event-summary {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  margin: 16px 0;
  padding: 12px;
}

.audit-event-summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audit-event-summary strong,
.audit-event-payload-panel strong {
  color: #cbd5e1;
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0;
  margin-bottom: 6px;
}

.audit-event-summary span {
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.audit-event-payload-panel {
  margin-bottom: 16px;
}

#audit-event-payload {
  background: #11182d;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
  color: #dbeafe;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.55;
  margin: 0;
  max-height: 300px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 560px) {
  .audit-event-summary-grid {
    grid-template-columns: 1fr;
  }
}

#change-password-submit {
  background: var(--accent-color, #3b82f6);
  color: #ffffff;
  border: 1px solid var(--accent-color, #3b82f6);
}

#change-password-submit:hover {
  background: #2563eb;
  border-color: #2563eb;
}

#password-error-field {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  padding: 12px;
}

/* ============================================
   LOGIN FORM ENHANCEMENTS
   ============================================ */

.password-field-wrapper {
  display: flex;
  gap: 0;
  position: relative;
  width: 100%;
}

.password-field-wrapper input {
  border-radius: 6px 0 0 6px !important;
  padding-right: 40px !important;
  width: 100%;
}

.toggle-password-btn {
  background: var(--bg-input, #12182e);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-left: none;
  border-radius: 0 6px 6px 0;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  position: relative;
  transition: all 0.25s ease;
  width: 44px;
  flex-shrink: 0;
}

.toggle-password-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #f8fafc);
}

.toggle-password-btn svg {
  height: 18px;
  width: 18px;
}

.toggle-password-btn[aria-pressed="true"] {
  color: var(--accent-color, #3b82f6);
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

#login-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

#login-form label {
  color: var(--text-primary, #f8fafc);
  font-size: 13px;
  font-weight: 600;
}

#login-form input[type="email"],
#login-form input[type="password"],
#login-form input[type="text"] {
  border-radius: 6px;
  font-size: 14px;
  padding: 10px 12px;
}

#login-form input:focus {
  outline: none;
}

#login-form button {
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 42px;
  padding: 10px 16px;
  transition: all 0.25s ease;
}

#login-form button[type="submit"] {
  background: var(--accent-color, #3b82f6);
  border: 1px solid var(--accent-color, #3b82f6);
  color: #ffffff;
  width: 100%;
}

#login-form button[type="submit"]:hover:not(:disabled) {
  background: #2563eb;
  border-color: #2563eb;
  filter: brightness(1.08);
}

#login-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#login-form .secondary,
#login-form .danger {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #f8fafc);
  flex: 1;
}

#login-form .danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

#login-form .link-button {
  background: transparent;
  border: none;
  color: var(--accent-color, #3b82f6);
  min-height: 32px;
  padding: 4px 8px;
  text-align: center;
}

#login-form .link-button:hover {
  color: #93c5fd;
  text-decoration: underline;
}

#login-form .secondary:hover,
#login-form .danger:hover {
  filter: brightness(1.08);
}

#login-error-field,
#forgot-error-field,
#reset-error-field {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  margin: 0 !important;
  padding: 12px;
}

#login-error-field[hidden],
#forgot-error-field[hidden],
#reset-error-field[hidden],
#login-form[hidden],
.auth-reset-panel[hidden],
.app.signed-out .access-panel #login-form[hidden],
.app.signed-out .access-panel .auth-reset-panel[hidden] {
  display: none !important;
}

#login-error-message,
#forgot-error-message,
#reset-error-message {
  color: #fca5a5 !important;
  font-size: 14px;
  margin: 0 !important;
}

.auth-reset-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.auth-reset-panel .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.auth-reset-panel input {
  border-radius: 6px;
  font-size: 14px;
  padding: 10px 12px;
}

.auth-help-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.auth-reset-panel button {
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 42px;
  padding: 10px 16px;
}

@media (max-width: 980px) {
  .app {
    display: block;
  }

  .erp-sidebar {
    min-height: auto;
    position: static;
  }

  .erp-topbar,
  .topbar-control-strip,
  .action-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .erp-topbar {
    position: static;
  }

  .topbar-control-strip {
    margin-left: 0;
    min-width: 0;
    width: 100%;
  }

  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
    width: 100%;
  }

  .user-credentials-display {
    align-items: flex-start;
    border-right: 0;
    padding-right: 0;
  }

  .health-score-widget,
  .action-buttons .btn {
    width: 100%;
  }

  .erp-workbench-grid {
    grid-template-columns: 1fr;
  }

  .planned-org-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .planned-org-kpis,
  .planned-org-module-grid,
  .ca-document-upload-card,
  .ca-upload-field-grid,
  .ca-document-workflow,
  .ca-document-status-grid,
  .ca-practice-filter-panel,
  .ca-practice-operations-grid,
  .ca-practice-workload-grid {
    grid-template-columns: 1fr;
  }

  .ca-practice-filter-actions {
    flex-direction: column;
  }

  .mini-kpi-row,
  .executive-hero,
  .executive-kpi-strip,
  .finance-dashboard-grid,
  .business-overview-grid,
  .business-quick-grid {
    grid-template-columns: 1fr;
  }

  .finance-chart {
    gap: 8px;
    grid-template-columns: repeat(3, minmax(52px, 1fr));
  }

  .business-overview-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ============================================
   ACCOUNT SELECTOR COMPONENT (SEARCHABLE)
   ============================================ */

.account-selector-component {
  position: relative;
  width: 100%;
}

.account-selector-caption {
  color: #93c5fd;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.account-selector-note {
  color: #fbbf24;
  font-size: 12px;
  margin: 8px 0 0;
}

.account-input-wrapper {
  position: relative;
  display: grid;
  gap: 8px;
}

.account-search-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.account-picker-select {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 12px;
}

#business-voucher-create-dialog .account-picker-select {
  background: #11182d;
  border-color: rgba(148, 163, 184, 0.26);
  color: #f8fafc;
  font-weight: 700;
  min-height: 46px;
}

.voucher-posting-map {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 16px;
}

.voucher-posting-map > div {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 8px;
  padding: 10px 12px;
}

.voucher-posting-map span {
  color: #93c5fd;
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.voucher-posting-map strong {
  color: #f8fafc;
  display: block;
  font-size: 13px;
}

.voucher-entry-lines {
  display: grid;
  gap: 12px;
  margin: 4px 0 16px;
}

.voucher-entry-line {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.voucher-entry-line > div:first-child {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.voucher-entry-line span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.voucher-entry-line strong {
  color: #f8fafc;
  font-size: 13px;
}

.voucher-entry-line.debit-line {
  border-left: 4px solid #22c55e;
}

.voucher-entry-line.debit-line span {
  color: #86efac;
}

.voucher-entry-line.credit-line {
  border-left: 4px solid #60a5fa;
}

.voucher-entry-line.credit-line span {
  color: #93c5fd;
}

.voucher-balance-panel {
  align-items: center;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: space-between;
  margin: 8px 0 16px;
  padding: 12px;
}

.voucher-balance-status {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.voucher-balance-status span {
  color: #cbd5e1;
  font-weight: 700;
}

.voucher-balance-status strong {
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 8px;
}

.voucher-balance-status.balanced strong {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.voucher-balance-status.imbalanced strong {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

@media (max-width: 640px) {
  .voucher-posting-map {
    grid-template-columns: 1fr;
  }

  .voucher-balance-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

html[data-theme="dark"] .account-search-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .account-search-input {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.1);
}

.account-search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel-2);
}

.account-id-input {
  display: none;
}

.account-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  list-style: none;
  margin: 4px 0 0 0;
  padding: 4px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

html[data-theme="dark"] .account-suggestions {
  background: #1a2332;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .account-suggestions {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.account-suggestions[hidden] {
  display: none;
}

.account-suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: background-color 0.15s ease;
}

html[data-theme="dark"] .account-suggestion-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .account-suggestion-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.account-suggestion-item strong {
  color: var(--accent);
  min-width: 60px;
  font-family: monospace;
  font-size: 12px;
}

.account-suggestion-item span {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-suggestion-empty {
  color: #fbbf24;
  font-size: 13px;
  padding: 9px 12px;
}

.account-suggestion-item:hover span {
  color: var(--text);
}

/* ============================================
   VOUCHER LINE ITEMS LAYOUT
   ============================================ */

.voucher-line-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-2);
}

.voucher-account-field {
  display: flex;
  flex-direction: column;
}

.voucher-amount-field {
  display: flex;
  flex-direction: column;
}

.voucher-action-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.voucher-account-field label,
.voucher-amount-field label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.voucher-line-grid input[type="number"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-family: monospace;
  text-align: right;
}

.voucher-line-grid input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel-2);
}

@media (max-width: 768px) {
  .voucher-line-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .voucher-action-field {
    justify-content: flex-start;
  }
}

@media (max-width: 1260px) {
  .ceo-insight-row {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .ceo-ask-row {
    grid-template-columns: 1fr;
  }
}

/* Final MitraBooks shell guard: keep workspaces dark even when the light toggle is active. */
html[data-theme="light"] .app.signed-in:not(.mandir-domain) {
  --bg: #090c14;
  --panel: #0f1424;
  --panel-2: rgba(18, 25, 47, 0.72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.16);
}

html[data-theme="light"] .app.signed-in:not(.mandir-domain) .content,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .main,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-topbar,
.app.signed-in:not(.mandir-domain) .verification-panel,
.app.signed-in:not(.mandir-domain) .erp-workspace-panel {
  background: #090c14 !important;
  color: #f8fafc !important;
}

html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-topbar,
.app.signed-in:not(.mandir-domain) .verification-panel,
.app.signed-in:not(.mandir-domain) .erp-workspace-panel {
  border-color: rgba(148, 163, 184, 0.16) !important;
}

html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar .nav a,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar .nav button,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar .erp-nav-link {
  color: #cbd5e1 !important;
}

html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar .nav a.active,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar .nav button.active,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar .erp-nav-link.active,
.app.signed-in:not(.mandir-domain) .erp-sidebar .nav a.erp-nav-link.active {
  background: rgba(59, 130, 246, 0.16) !important;
  border-color: rgba(96, 165, 250, 0.28) !important;
  color: #f8fafc !important;
}

html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar .nav a.active .nav-icon,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar .nav button.active .nav-icon,
html[data-theme="light"] .app.signed-in:not(.mandir-domain) .erp-sidebar .erp-nav-link.active .nav-icon,
.app.signed-in:not(.mandir-domain) .erp-sidebar .nav a.erp-nav-link.active .nav-icon {
  background: rgba(59, 130, 246, 0.2) !important;
  border-color: rgba(96, 165, 250, 0.36) !important;
  color: #93c5fd !important;
}

.app.signed-in:not(.mandir-domain) .table-preview,
.app.signed-in:not(.mandir-domain) .erp-table,
.app.signed-in:not(.mandir-domain) .audit-table,
.app.signed-in:not(.mandir-domain) .empty-state {
  background: rgba(18, 25, 47, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

.app.signed-in:not(.mandir-domain) .table-preview table,
.app.signed-in:not(.mandir-domain) .erp-table table,
.app.signed-in:not(.mandir-domain) .audit-table table,
.app.signed-in:not(.mandir-domain) .table-preview thead,
.app.signed-in:not(.mandir-domain) .erp-table thead,
.app.signed-in:not(.mandir-domain) .audit-table thead,
.app.signed-in:not(.mandir-domain) .table-preview tbody,
.app.signed-in:not(.mandir-domain) .erp-table tbody,
.app.signed-in:not(.mandir-domain) .audit-table tbody,
.app.signed-in:not(.mandir-domain) .table-preview tr,
.app.signed-in:not(.mandir-domain) .erp-table tr,
.app.signed-in:not(.mandir-domain) .audit-table tr {
  background: transparent !important;
  color: #f8fafc !important;
}

.app.signed-in:not(.mandir-domain) .table-preview th,
.app.signed-in:not(.mandir-domain) .erp-table th,
.app.signed-in:not(.mandir-domain) .audit-table th {
  background: rgba(148, 163, 184, 0.12) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  color: #cbd5e1 !important;
}

.app.signed-in:not(.mandir-domain) .table-preview td,
.app.signed-in:not(.mandir-domain) .erp-table td,
.app.signed-in:not(.mandir-domain) .audit-table td {
  background: rgba(15, 20, 36, 0.54) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
  color: #f8fafc !important;
}

.app.signed-in:not(.mandir-domain) .table-preview button,
.app.signed-in:not(.mandir-domain) .erp-table button,
.app.signed-in:not(.mandir-domain) .audit-table button {
  color: #cbd5e1 !important;
}

/* Financial Reports workspace */
.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.25));
  padding-bottom: 12px;
}

.report-tab {
  background: transparent;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.3));
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted, #94a3b8);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.report-tab:hover {
  border-color: var(--accent, #3b82f6);
  color: var(--text, #e2e8f0);
}

.report-tab.active {
  background: var(--accent, #3b82f6);
  border-color: var(--accent, #3b82f6);
  color: #ffffff;
}

.report-date-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 12px 0 16px;
}

.report-date-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.report-date-controls input,
.report-date-controls select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.3));
  background: var(--surface, rgba(15, 23, 42, 0.6));
  color: var(--text, #e2e8f0);
  font-size: 13px;
  min-width: 180px;
}

/* Keep report metric tiles and section cards on the dark surface (override the
   light-card defaults from .verification-panel .metric-tile and
   .dashboard-main-grid > article so reports match the rest of the workspace). */
.app:not(.mandir-domain) .erp-workspace-panel .metric-tile,
.app:not(.mandir-domain) .erp-workspace-panel .dashboard-main-grid > article,
.app:not(.mandir-domain) .executive-dashboard .dashboard-main-grid > article {
  background: var(--bg-card, rgba(18, 25, 47, 0.72));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  color: var(--text-primary, #f8fafc);
  box-shadow: none;
}

/* Sales invoice form */
.invoice-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.invoice-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.invoice-form-grid input,
.invoice-form-grid select,
.invoice-notes textarea,
.invoice-lines input,
.invoice-lines select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.3));
  background: var(--surface, rgba(15, 23, 42, 0.6));
  color: var(--text, #e2e8f0);
  font-size: 13px;
}

.invoice-form-grid .invoice-inter-toggle {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  align-self: end;
}

.invoice-form-grid .invoice-inter-toggle input {
  width: auto;
  padding: 0;
}

.invoice-lines input[type="number"] {
  width: 90px;
}

.invoice-lines input[name="description"] {
  min-width: 160px;
  width: 100%;
}

.invoice-lines .line-dimensions {
  min-width: 150px;
}

.invoice-lines .line-dimensions select {
  display: block;
  width: 100%;
  margin-bottom: 4px;
}

.invoice-notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.invoice-notes textarea {
  width: 100%;
  resize: vertical;
}

.invoice-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
  margin-left: auto;
  max-width: 360px;
}

.invoice-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
}

.invoice-totals .invoice-grand {
  border-top: 1px solid var(--border, rgba(148, 163, 184, 0.25));
  padding-top: 8px;
  margin-top: 4px;
  font-size: 15px;
  color: var(--text, #e2e8f0);
}

.invoice-totals .invoice-grand strong {
  color: var(--accent, #3b82f6);
}

.invoice-form-actions,
.invoice-detail-actions {
  display: flex;
  gap: 10px;
}

.invoice-form-actions {
  margin-top: 16px;
}

.settings-section-title {
  margin: 20px 0 4px;
  font-size: 14px;
  color: var(--text, #e2e8f0);
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
}

.inline-check input {
  width: auto;
}

.settings-coming-soon {
  margin-top: 20px;
  font-style: italic;
  opacity: 0.8;
}

.mitrabooks-settings-workspace {
  display: grid;
  gap: 18px;
}

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

.settings-roadmap-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.settings-roadmap-strip article {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.25));
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.settings-roadmap-strip strong {
  color: var(--text, #e2e8f0);
  font-size: 13px;
}

.settings-roadmap-strip span {
  color: var(--accent, #60a5fa);
  font-size: 13px;
  font-weight: 700;
}

.settings-roadmap-strip small {
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

.settings-visibility-strip span,
.settings-boundary-note {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.25));
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.28);
  color: var(--text-muted, #94a3b8);
  padding: 10px 12px;
  font-size: 13px;
}

.settings-visibility-strip strong,
.settings-boundary-note strong {
  color: var(--text, #e2e8f0);
}

.settings-menu-section {
  display: grid;
  gap: 12px;
}

.settings-section-heading h5 {
  margin: 0;
  color: var(--text, #e2e8f0);
  font-size: 16px;
}

.settings-section-heading p {
  margin: 4px 0 0;
  color: var(--text-muted, #94a3b8);
  font-size: 13px;
}

.settings-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.settings-menu-card {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.25));
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.2);
  padding: 14px;
  display: grid;
  gap: 10px;
  min-height: 190px;
}

.settings-card-head,
.settings-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-card-head h5 {
  margin: 0;
  font-size: 14px;
  color: var(--text, #e2e8f0);
}

.settings-menu-card p {
  margin: 0;
  color: var(--text-muted, #94a3b8);
  font-size: 13px;
  line-height: 1.45;
}

.settings-card-meta {
  margin-top: auto;
}

.settings-card-meta span {
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
}

.settings-detail-panel {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.25));
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.settings-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.settings-detail-grid article {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.24);
  padding: 12px;
}

.settings-detail-grid strong {
  display: block;
  color: var(--text, #e2e8f0);
  margin-bottom: 6px;
}

.settings-detail-grid p {
  margin: 0;
  color: var(--text-muted, #94a3b8);
  font-size: 13px;
  line-height: 1.45;
}

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

.pill.neutral {
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-muted, #94a3b8);
}

@media (max-width: 760px) {
  .settings-visibility-strip {
    grid-template-columns: 1fr;
  }

  .settings-card-head,
  .settings-card-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

.erp-workspace-panel code {
  background: rgba(148, 163, 184, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}

/* Platform Owner uses the MitraBooks dark operations shell even when the
   global theme toggle is light. Keep this block last so generic card/table
   rules cannot wash out the dashboard text. */
.app .platform-dashboard {
  color: #f8fafc;
}

.app .platform-dashboard .preview-heading {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.90));
  border-color: rgba(96, 165, 250, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app .platform-dashboard .preview-heading h3,
.app .platform-dashboard h4,
.app .platform-dashboard .metric-tile strong,
.app .platform-dashboard .metric-value,
.app .platform-dashboard .status-list strong {
  color: #f8fafc;
}

.app .platform-dashboard .preview-heading p,
.app .platform-dashboard .metric-tile span,
.app .platform-dashboard .metric-tile small,
.app .platform-dashboard .metric-label,
.app .platform-dashboard .metric-sub,
.app .platform-dashboard .muted,
.app .platform-dashboard .status-list span {
  color: #94a3b8;
}

.app .platform-dashboard .metric-tile,
.app .platform-dashboard .metric-card,
.app .platform-dashboard .dashboard-main-grid > article,
.app .platform-dashboard > article {
  background: rgba(18, 25, 47, 0.86);
  border-color: rgba(148, 163, 184, 0.14);
  color: #f8fafc;
}

.app .platform-dashboard .metric-tile strong,
.app .platform-dashboard .metric-card .metric-value {
  color: #60a5fa;
}

.app .platform-dashboard .table-preview {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.16);
}

.app .platform-dashboard .table-preview table,
.app .platform-dashboard .table-preview td {
  color: #e2e8f0;
}

.app .platform-dashboard .table-preview th {
  background: #1e293b;
  color: #cbd5e1;
}

.app .platform-dashboard .table-preview tbody tr {
  background: #0f172a;
}

.app .platform-dashboard .table-preview tbody tr:hover {
  background: rgba(59, 130, 246, 0.10);
}

.app .platform-dashboard .status-list li {
  background: rgba(30, 41, 59, 0.84);
  border-color: rgba(148, 163, 184, 0.14);
}




