:root {
  --suite-accent-600: #1d4ed8;
  --suite-accent-500: #2563eb;
  --suite-accent-100: #dbeafe;
  --suite-success-600: #15803d;
  --suite-warning-600: #b45309;
  --suite-danger-600: #b91c1c;
  --suite-text-900: #0f172a;
  --suite-text-700: #334155;
  --suite-text-500: #64748b;
  --suite-surface-0: #ffffff;
  --suite-surface-50: #f8fafc;
  --suite-surface-100: #f1f5f9;
  --suite-border: #dbe4f0;
  --suite-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

html[data-bs-theme='dark'] {
  --suite-text-900: #e6edf7;
  --suite-text-700: #bfd0e3;
  --suite-text-500: #93a8be;
  --suite-surface-0: #081423;
  --suite-surface-50: #0d1b2d;
  --suite-surface-100: #132338;
  --suite-border: rgba(120, 156, 197, 0.28);
  --suite-shadow: 0 16px 32px rgba(1, 6, 16, 0.34);
}

/* In dark mode, keep card body copy readable even if templates set inline dark text. */
html[data-bs-theme='dark'] .card,
html[data-bs-theme='dark'] .stat-card,
html[data-bs-theme='dark'] .feature-card,
html[data-bs-theme='dark'] .tenant-card,
html[data-bs-theme='dark'] .glass-panel,
html[data-bs-theme='dark'] .panel,
html[data-bs-theme='dark'] .th-signal-board,
html[data-bs-theme='dark'] .exec-mini-console {
  color: var(--suite-text-900) !important;
}

html[data-bs-theme='dark'] .card .text-muted,
html[data-bs-theme='dark'] .stat-card .text-muted,
html[data-bs-theme='dark'] .feature-card .text-muted,
html[data-bs-theme='dark'] .tenant-card .text-muted,
html[data-bs-theme='dark'] .glass-panel .text-muted,
html[data-bs-theme='dark'] .panel .text-muted {
  color: var(--suite-text-500) !important;
}

/* Professional surface treatment without overriding all text tags globally. */
.card,
.stat-card,
.feature-card,
.tenant-card,
.glass-panel,
.panel,
.th-signal-board,
.exec-mini-console {
  border: 1px solid var(--suite-border) !important;
  background: linear-gradient(180deg, var(--suite-surface-0), var(--suite-surface-50)) !important;
  box-shadow: var(--suite-shadow) !important;
}

.card::before,
.stat-card::before,
.feature-card::before,
.tenant-card::before,
.panel::before {
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.55), transparent) !important;
}

.btn-primary,
.link-btn {
  background: linear-gradient(135deg, var(--suite-accent-600), var(--suite-accent-500)) !important;
  border-color: var(--suite-accent-500) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.link-btn:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8) !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.72) !important;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.18) !important;
}

.badge.bg-primary,
.badge.text-bg-primary {
  background: linear-gradient(135deg, var(--suite-accent-600), var(--suite-accent-500)) !important;
  color: #ffffff !important;
}

html[data-bs-theme='light'] .badge.bg-danger,
html[data-bs-theme='light'] .badge.text-bg-danger {
  background-color: #fee2e2 !important;
  color: var(--suite-danger-600) !important;
}

html[data-bs-theme='light'] .badge.bg-success,
html[data-bs-theme='light'] .badge.text-bg-success {
  background-color: #dcfce7 !important;
  color: var(--suite-success-600) !important;
}

html[data-bs-theme='light'] .badge.bg-warning,
html[data-bs-theme='light'] .badge.text-bg-warning {
  background-color: #fef3c7 !important;
  color: var(--suite-warning-600) !important;
}

html[data-bs-theme='light'] .dropdown-menu {
  background: #ffffff !important;
  border-color: var(--suite-border) !important;
}

html[data-bs-theme='light'] .dropdown-item {
  color: var(--suite-text-900) !important;
}

html[data-bs-theme='light'] .dropdown-item:hover {
  background-color: var(--suite-surface-100) !important;
  color: var(--suite-text-900) !important;
}

html[data-bs-theme='light'] .table,
html[data-bs-theme='light'] .table th,
html[data-bs-theme='light'] .table td,
html[data-bs-theme='light'] .list-group-item,
html[data-bs-theme='light'] .alert,
html[data-bs-theme='light'] .modal-content,
html[data-bs-theme='light'] .popover,
html[data-bs-theme='light'] .accordion-button,
html[data-bs-theme='light'] .breadcrumb-item,
html[data-bs-theme='light'] .breadcrumb-item.active,
html[data-bs-theme='light'] .text-white,
html[data-bs-theme='light'] .text-light,
html[data-bs-theme='light'] .text-white-50 {
  color: var(--suite-text-900) !important;
}

html[data-bs-theme='light'] .text-muted,
html[data-bs-theme='light'] .text-secondary,
html[data-bs-theme='light'] .small,
html[data-bs-theme='light'] .hint,
html[data-bs-theme='light'] .subtitle {
  color: var(--suite-text-500) !important;
}

html[data-bs-theme='light'] .card,
html[data-bs-theme='light'] .stat-card,
html[data-bs-theme='light'] .feature-card,
html[data-bs-theme='light'] .tenant-card,
html[data-bs-theme='light'] .glass-panel,
html[data-bs-theme='light'] .panel,
html[data-bs-theme='light'] .th-signal-board,
html[data-bs-theme='light'] .exec-mini-console,
html[data-bs-theme='light'] .list-group-item,
html[data-bs-theme='light'] .modal-content,
html[data-bs-theme='light'] .popover {
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
  border-color: var(--suite-border) !important;
}

html[data-bs-theme='light'] .form-control,
html[data-bs-theme='light'] .form-select,
html[data-bs-theme='light'] input[type='text'],
html[data-bs-theme='light'] input[type='email'],
html[data-bs-theme='light'] input[type='password'],
html[data-bs-theme='light'] textarea {
  background-color: #ffffff !important;
  color: var(--suite-text-900) !important;
  border-color: var(--suite-border) !important;
}

html[data-bs-theme='light'] .form-control::placeholder,
html[data-bs-theme='light'] .form-select::placeholder {
  color: var(--suite-text-500) !important;
}

html[data-bs-theme='light'] .nav-link {
  color: #334155 !important;
}

html[data-bs-theme='light'] .nav-link:hover,
html[data-bs-theme='light'] .nav-link.active {
  color: #0f172a !important;
}
