/**
 * Company dark mode — ytor & kontrastfixar
 * Ladda EFTER dark-mode-global.css på allowlistade company-sidor.
 */

/* ---------- Header ---------- */
body.dark-mode .header-modern {
  background: var(--header-bg, #0f172a) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .header-plan-free,
body.dark-mode .header-plan-trial,
body.dark-mode .header-plan-basic,
body.dark-mode .header-plan-pro,
body.dark-mode .header-plan-enterprise,
body.dark-mode .header-plan-value {
  background: rgba(15, 23, 42, 0.9) !important;
  color: #f8fafc !important;
  border-color: rgba(248, 250, 252, 0.25) !important;
}

body.dark-mode .dashboard-header--hero-bg .plan-badge span,
body.dark-mode .plan-badge .badge-enterprise,
body.dark-mode .plan-badge .badge-pro,
body.dark-mode .plan-badge .badge-basic,
body.dark-mode .plan-badge .badge-trial,
body.dark-mode .plan-badge .badge-free {
  background: rgba(15, 23, 42, 0.88) !important;
  color: #f8fafc !important;
  border-color: rgba(248, 250, 252, 0.28) !important;
  backdrop-filter: blur(6px);
}

/* ---------- CTA: Skapa offert (ljus knappyta + mörk text i dark) ---------- */
body.dark-mode .quick-action-item[data-feature="quote"]:not(.locked) {
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

body.dark-mode .quick-action-item[data-feature="quote"]:not(.locked) i,
body.dark-mode .quick-action-item[data-feature="quote"]:not(.locked) span {
  color: #0f172a !important;
}

body.dark-mode .quick-action-item[data-feature="quote"]:not(.locked):hover {
  background: #f8fafc !important;
  border-color: #f8fafc !important;
  color: #0f172a !important;
}

body.dark-mode .quick-action-item[data-feature]:not([data-feature="quote"]):not(.locked):not(.coming-soon) {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .quick-action-item.coming-soon {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

/* ---------- Partnerkampanjer ---------- */
body.dark-mode #sponsorCampaignsSection.partner-campaigns {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode #sponsorCampaignsSection.partner-campaigns::before {
  opacity: 0.35;
}

body.dark-mode .partner-campaigns__title,
body.dark-mode .partner-campaigns__subtitle,
body.dark-mode .partner-campaigns__benefit {
  color: #f8fafc !important;
}

body.dark-mode .partner-campaigns__subtitle,
body.dark-mode .partner-campaigns__benefit {
  color: #cbd5e1 !important;
}

body.dark-mode .partner-campaigns__pill {
  background: rgba(248, 250, 252, 0.08) !important;
  border-color: rgba(248, 250, 252, 0.16) !important;
  color: #f8fafc !important;
}

body.dark-mode .partner-campaign-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode .partner-campaign-card__cta {
  background: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

body.dark-mode .partner-campaign-card__cta:hover {
  background: #475569 !important;
}

/* ---------- Knappar / sekundära actions ---------- */
body.dark-mode .btn-secondary,
body.dark-mode .btn-outline,
body.dark-mode .btn-ghost,
body.dark-mode a.btn-secondary,
body.dark-mode button.btn-secondary {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

body.dark-mode .btn-secondary:hover,
body.dark-mode .btn-outline:hover,
body.dark-mode .btn-ghost:hover {
  background: #475569 !important;
  color: #ffffff !important;
}

body.dark-mode .btn-primary,
body.dark-mode button.btn-primary,
body.dark-mode a.btn-primary {
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

body.dark-mode .btn-primary:hover {
  background: #f8fafc !important;
  border-color: #f8fafc !important;
  color: #0f172a !important;
}

/* Dashboard projekt-actions (ofta white + vit text via global) */
body.dark-mode .quote-card-actions .btn-secondary,
body.dark-mode .project-actions-row .btn-secondary,
body.dark-mode .project-actions-row a.btn-secondary,
body.dark-mode .quote-actions button:not(.primary):not(.btn-primary):not(.btn-danger) {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

body.dark-mode .quote-actions button.primary,
body.dark-mode .quote-actions button.btn-primary {
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* ---------- Sektioner / kort ---------- */
body.dark-mode .dashboard-section,
body.dark-mode .section-card,
body.dark-mode .profile-card,
body.dark-mode .stats-card,
body.dark-mode .kpi-card,
body.dark-mode .analytics-card,
body.dark-mode .team-member-card,
body.dark-mode .team-stat-card,
body.dark-mode .mobile-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc;
}

body.dark-mode .quote-card,
body.dark-mode .project-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .quote-card-body,
body.dark-mode .project-card-body,
body.dark-mode .project-card-content {
  background: transparent !important;
  color: #e2e8f0;
}

/* Filter / selects */
body.dark-mode select,
body.dark-mode input[type="text"],
body.dark-mode input[type="search"],
body.dark-mode input[type="email"],
body.dark-mode input[type="tel"],
body.dark-mode input[type="number"],
body.dark-mode textarea,
body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .search-input {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode select option {
  background: #1e293b;
  color: #f8fafc;
}

/* ---------- Profil-tabs ---------- */
body.dark-mode .profile-tabs {
  background: #1e293b !important;
  background-color: rgba(30, 41, 59, 0.98) !important;
  border-color: #334155 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* ---------- Quotes-sida ---------- */
body.dark-mode .page-container,
body.dark-mode .quotes-page,
body.dark-mode .page-header:not(.quotes-page-hero) {
  background-color: transparent;
}

body.dark-mode .page-header:not(.quotes-page-hero) {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .quotes-tabs,
body.dark-mode .filter-bar,
body.dark-mode .search-bar,
body.dark-mode .view-switcher {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .quotes-tab:not(.active),
body.dark-mode .view-switcher button:not(.active):not(.is-active) {
  background: #0f172a;
  color: #cbd5e1;
  border-color: #334155;
}

/* ---------- Nearby jobs ---------- */
body.dark-mode .job-card,
body.dark-mode .project-list-card,
body.dark-mode .nearby-job-card,
body.dark-mode .filter-panel,
body.dark-mode .search-filters {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc;
}

body.dark-mode .job-card-body,
body.dark-mode .nearby-job-card__body,
body.dark-mode .project-list-card .card-body {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

/* ---------- Analytics / Team ---------- */
body.dark-mode .analytics-page,
body.dark-mode .team-page,
body.dark-mode .chart-card,
body.dark-mode .member-row,
body.dark-mode .team-list-item {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

/* ---------- Quote generator ---------- */
body.dark-mode .quote-generator-main,
body.dark-mode .generator-content,
body.dark-mode .step-content,
body.dark-mode .step-panel,
body.dark-mode .form-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc;
}

body.dark-mode .alert-success,
body.dark-mode .success-banner {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

/* ---------- Broadcast / pilot ---------- */
body.dark-mode .broadcast-banner {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .broadcast-banner__title,
body.dark-mode .broadcast-banner__message,
body.dark-mode .broadcast-banner__eyebrow {
  color: #e2e8f0 !important;
}

body.dark-mode .broadcast-banner__close {
  color: #f8fafc !important;
}

/* ---------- Help center (company) ---------- */
body.dark-mode .help-card,
body.dark-mode .popular-card,
body.dark-mode .help-topic-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* ---------- Generell Tailwind-ljushetsfix på company-sidor ---------- */
body.dark-mode.company-page .bg-white,
body.company-page.dark-mode .bg-white {
  background-color: #1e293b !important;
}

body.dark-mode.company-page .text-gray-900,
body.dark-mode.company-page .text-slate-900,
body.dark-mode.company-page .text-gray-800 {
  color: #f8fafc !important;
}

body.dark-mode.company-page .border-gray-200,
body.dark-mode.company-page .border-slate-200 {
  border-color: #334155 !important;
}

/* ---------- Extra page surfaces (högre specificitet) ---------- */
body.dark-mode .quote-main {
  background: #0f172a !important;
  color: #f8fafc;
}

body.dark-mode .steps-container,
body.dark-mode .step-content {
  background: #1e293b !important;
  color: #f8fafc !important;
  box-shadow: none;
}

body.dark-mode .job-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .job-card h3,
body.dark-mode .job-card p,
body.dark-mode .job-card .job-meta {
  color: #e2e8f0 !important;
}

body.dark-mode .team-member,
body.dark-mode .stat-card,
body.dark-mode .analytics-page,
body.dark-mode .team-page,
body.dark-mode .filter-chips,
body.dark-mode .team-tabs,
body.dark-mode .period-selector {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc;
}

body.dark-mode .analytics-hero h1,
body.dark-mode .analytics-hero p,
body.dark-mode .team-member-name,
body.dark-mode .team-member-meta {
  color: #f8fafc !important;
}

body.dark-mode .help-center-container,
body.dark-mode .help-hero,
body.dark-mode .help-section {
  background: transparent;
  color: #f8fafc;
}

body.dark-mode .help-topic-card,
body.dark-mode .help-card,
body.dark-mode [class*="popular"] .card,
body.dark-mode .help-center-container .bg-white,
body.dark-mode .help-grid-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* Quotes management body override */
body.dark-mode.company-page,
body.dark-mode {
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #f8fafc;
}

body.dark-mode .page-container {
  background: transparent !important;
}

/* =========================================================
   KONTRASTFIX v2 — vita ytor + ljus text = trasigt
   ========================================================= */

/* Nearby jobs — filter & kort */
body.dark-mode .filters {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
  color: #f8fafc !important;
}

body.dark-mode .filters label,
body.dark-mode .filter-group label,
body.dark-mode .filters .filter-group,
body.dark-mode .filters span {
  color: #e2e8f0 !important;
}

body.dark-mode .job-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .job-content {
  background: #1e293b !important;
  background-image: none !important;
  color: #f8fafc !important;
}

body.dark-mode .job-card h3,
body.dark-mode .job-content h3,
body.dark-mode .job-content p,
body.dark-mode .job-content span,
body.dark-mode .job-meta,
body.dark-mode .job-location,
body.dark-mode .job-date {
  color: #f1f5f9 !important;
}

/* Quotes — filter/stats/kort */
body.dark-mode .filters-bar-sticky,
body.dark-mode .quotes-stats-strip,
body.dark-mode .kpi-dashboard.quotes-stats-strip,
body.dark-mode .active-filters-bar {
  background: var(--company-bg, #1A201C) !important;
  border-color: var(--company-border, rgba(199, 204, 209, 0.18)) !important;
  color: var(--company-text, #F2EFE9) !important;
  box-shadow: none !important;
}

body.dark-mode .quotes-stats-strip-inner {
  background: var(--company-bg, #1A201C) !important;
  border-color: var(--company-border, rgba(199, 204, 209, 0.18)) !important;
  color: var(--company-text-muted, #A8B0AA) !important;
}

body.dark-mode .filters-bar-sticky label,
body.dark-mode .filters-bar-sticky span,
body.dark-mode .quotes-stats-strip span,
body.dark-mode .quotes-stats-strip strong,
body.dark-mode .quotes-stats-item,
body.dark-mode .quotes-stats-item strong {
  color: var(--company-text, #F2EFE9) !important;
}

body.dark-mode .quotes-stats-item--muted,
body.dark-mode .quotes-stats-item--muted strong {
  color: var(--company-text-muted, #A8B0AA) !important;
}

body.dark-mode .quotes-stats-item--won strong {
  color: var(--company-success, #4ADE80) !important;
}

body.dark-mode .quotes-stats-item--followup,
body.dark-mode .quotes-stats-item--followup strong {
  color: #FDBA74 !important;
}

body.dark-mode .quote-card,
body.dark-mode .quote-card-modern {
  background: var(--company-bg, #1A201C) !important;
  border-color: var(--company-border, rgba(199, 204, 209, 0.18)) !important;
  color: var(--company-text, #F2EFE9) !important;
  box-shadow: none !important;
}

body.dark-mode .quote-card h3,
body.dark-mode .quote-title h3,
body.dark-mode .quote-card-modern h3,
body.dark-mode .card-title,
body.dark-mode .quote-meta span,
body.dark-mode .quote-card p,
body.dark-mode .meta-item,
body.dark-mode .quote-card span:not(.status-badge):not([class*="badge"]):not(.value-discount) {
  color: var(--company-text, #F2EFE9) !important;
}

body.dark-mode .card-details-summary,
body.dark-mode .card-financials,
body.dark-mode .quote-financials,
body.dark-mode .quote-card-modern .card-body,
body.dark-mode .quote-details {
  background: #121614 !important;
  border: 1px solid var(--company-border, rgba(199, 204, 209, 0.18));
  color: var(--company-text, #F2EFE9) !important;
}

body.dark-mode .card-financials label,
body.dark-mode .financial-item label {
  color: var(--company-text-muted, #A8B0AA) !important;
}

body.dark-mode .card-financials value,
body.dark-mode .financial-item value,
body.dark-mode .value-large {
  color: var(--company-text, #F2EFE9) !important;
}

body.dark-mode .value-discount {
  color: var(--company-success, #4ADE80) !important;
}

body.dark-mode .financial-total {
  border-bottom-color: var(--company-border, rgba(199, 204, 209, 0.18)) !important;
}

body.dark-mode .card-quick-actions {
  border-top-color: var(--company-border, rgba(199, 204, 209, 0.18)) !important;
}

body.dark-mode .quote-card .btn-secondary,
body.dark-mode .quote-card-modern .btn-secondary,
body.dark-mode .card-quick-actions .btn-sm,
body.dark-mode .card-quick-actions button:not(.btn-primary),
body.dark-mode .btn-quick-action {
  background: #243028 !important;
  border-color: var(--company-border, rgba(199, 204, 209, 0.18)) !important;
  color: var(--company-text, #F2EFE9) !important;
}

body.dark-mode .card-quick-actions .quote-actions-more-menu {
  background: #1A201C !important;
  border-color: var(--company-border, rgba(199, 204, 209, 0.18)) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}

body.dark-mode .btn-filter,
body.dark-mode .filter-btn,
body.dark-mode .btn-filters-toggle,
body.dark-mode #btnFilter,
body.dark-mode button.filter-toggle {
  background: #243028 !important;
  border-color: var(--company-border, rgba(199, 204, 209, 0.18)) !important;
  color: var(--company-text, #F2EFE9) !important;
}

body.dark-mode .btn-filters-toggle:hover,
body.dark-mode .btn-filters-toggle.active {
  background: #2A322E !important;
  color: #F2EFE9 !important;
}

body.dark-mode .btn-filters-toggle svg {
  stroke: currentColor !important;
  color: inherit !important;
}

body.dark-mode .search-input-wrapper input {
  background: #121614 !important;
  border-color: var(--company-border, rgba(199, 204, 209, 0.18)) !important;
  color: var(--company-text, #F2EFE9) !important;
}

body.dark-mode .quote-followup-chip,
body.dark-mode .quote-validity-chip {
  background: rgba(251, 191, 36, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  color: #FBBF24 !important;
}

body.dark-mode .quote-external-badge {
  background: rgba(199, 204, 209, 0.12) !important;
  color: #E8EBEE !important;
}

body.dark-mode .filter-chip-followup.active {
  background: rgba(251, 191, 36, 0.14) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #FBBF24 !important;
}

body.dark-mode .ata-confirm-modal {
  background: #1A201C !important;
  color: #F2EFE9 !important;
}

body.dark-mode .ata-confirm-modal p {
  color: #A8B0AA !important;
}

body.dark-mode .ata-confirm-note {
  background: rgba(251, 191, 36, 0.1) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  color: #F2EFE9 !important;
}

/* Quote generator — sidebar + inputs */
body.dark-mode .quote-sidebar {
  background: #0f172a !important;
  border-right-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .sidebar-steps,
body.dark-mode .step-item,
body.dark-mode .step-item .step-label,
body.dark-mode .step-item span,
body.dark-mode .step-item p {
  color: #e2e8f0 !important;
}

body.dark-mode .step-item {
  background: transparent !important;
}

body.dark-mode .step-item.active {
  background: rgba(148, 163, 184, 0.14) !important;
}

body.dark-mode .steps-container,
body.dark-mode .step-content,
body.dark-mode .form-card {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea,
body.dark-mode .steps-container input,
body.dark-mode .steps-container textarea,
body.dark-mode .steps-container select {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1;
}

body.dark-mode label,
body.dark-mode .form-label {
  color: #cbd5e1 !important;
}

/* Analytics chart empty */
body.dark-mode .chart-empty {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #cbd5e1 !important;
}

body.dark-mode .chart-empty strong {
  color: #f8fafc !important;
}

body.dark-mode .chart-container,
body.dark-mode .chart-card,
body.dark-mode .analytics-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Team modal */
body.dark-mode .team-modal-panel,
body.dark-mode .team-modal-panel.contract-panel {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .team-modal-header,
body.dark-mode .team-modal-body,
body.dark-mode .team-modal-header h2 {
  background: transparent !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

body.dark-mode .team-modal-body,
body.dark-mode .team-modal-body p,
body.dark-mode .team-modal-body span,
body.dark-mode .team-modal-body dd,
body.dark-mode .team-modal-body dt,
body.dark-mode .team-modal-body strong,
body.dark-mode .team-modal-body h3,
body.dark-mode .team-modal-body h4 {
  color: #e2e8f0 !important;
}

body.dark-mode .team-modal-body a {
  color: #cbd5e1 !important;
}

/* Help center */
body.dark-mode .help-hero {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .help-hero::before {
  background-color: #0f172a !important;
  filter: grayscale(100%) brightness(0.55) !important;
}

body.dark-mode .help-hero::after {
  background: linear-gradient(
    105deg,
    rgba(15, 23, 42, 0.94) 0%,
    rgba(15, 23, 42, 0.78) 38%,
    rgba(15, 23, 42, 0.4) 62%,
    rgba(15, 23, 42, 0.15) 100%
  ) !important;
}

body.dark-mode .help-hero-title,
body.dark-mode .help-hero-subtitle {
  color: #f8fafc !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

body.dark-mode .company-quickstart,
body.dark-mode .company-quickstart-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .company-quickstart-header h2,
body.dark-mode .company-quickstart-header p,
body.dark-mode .company-quickstart-card p,
body.dark-mode .company-quickstart-card h3,
body.dark-mode .company-quickstart-card span {
  color: #e2e8f0 !important;
}

body.dark-mode .company-quickstart-header h2 i {
  color: #94a3b8 !important;
}

body.dark-mode .popular-topic-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* Tips / callouts — ljus bg + ljus text */
body.dark-mode .doc-tip,
body.dark-mode .support-tip,
body.dark-mode [class*="tip-box"],
body.dark-mode .tip-callout,
body.dark-mode .info-tip,
body.dark-mode .article-tip {
  background: rgba(148, 163, 184, 0.14) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
  color: #e2e8f0 !important;
}

body.dark-mode .doc-tip,
body.dark-mode .doc-tip *,
body.dark-mode .support-tip,
body.dark-mode .support-tip * {
  color: #e2e8f0 !important;
}

body.dark-mode .doc-tip a,
body.dark-mode .support-tip a {
  color: #e2e8f0 !important;
}

/* Generella modaler */
body.dark-mode .modal-dialog,
body.dark-mode .modal-body,
body.dark-mode .modal-header,
body.dark-mode .modal-footer,
body.dark-mode [role="dialog"],
body.dark-mode .dialog-panel {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .modal-content h1,
body.dark-mode .modal-content h2,
body.dark-mode .modal-content h3,
body.dark-mode .modal-content p,
body.dark-mode .modal-content span,
body.dark-mode .modal-content label,
body.dark-mode [role="dialog"] h2,
body.dark-mode [role="dialog"] p,
body.dark-mode [role="dialog"] span {
  color: #e2e8f0 !important;
}

/* Help doc-cards + tips (säkerställ kontrast) */
body.dark-mode .doc-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .doc-card-header h3,
body.dark-mode .doc-card-body,
body.dark-mode .doc-card-body p,
body.dark-mode .doc-card-body li {
  color: #e2e8f0 !important;
}

body.dark-mode .doc-tip {
  background: rgba(148, 163, 184, 0.14) !important;
  border-left-color: #cbd5e1 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .doc-tip strong,
body.dark-mode .doc-tip a {
  color: #e2e8f0 !important;
}

/* Quote modern card inner surfaces */
body.dark-mode .quote-card-modern,
body.dark-mode .quote-card-modern .card-body,
body.dark-mode .quote-details,
body.dark-mode .quote-financials,
body.dark-mode .card-financials,
body.dark-mode .card-details-summary {
  background: #121614 !important;
  color: #f8fafc !important;
}

body.dark-mode .quote-title h3 {
  color: #f8fafc !important;
}

body.dark-mode .quote-title .quote-meta span {
  color: #94a3b8 !important;
}

/* View mode toggle på offerter */
body.dark-mode .view-mode-toggle {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode .view-mode:not(.active) {
  color: #cbd5e1 !important;
}

body.dark-mode .view-mode:not(.active) svg {
  stroke: #cbd5e1 !important;
  color: #cbd5e1 !important;
}

/* =========================================================
   Hero-bilder — mörkare i dark mode (läsbar vit text)
   ========================================================= */
body.dark-mode .nearby-jobs-hero,
body.dark-mode .page-header.quotes-page-hero,
body.dark-mode .page-header.my-projects-page-hero,
body.dark-mode .dashboard-header--hero-bg,
body.dark-mode .profile-header--hero-bg,
body.dark-mode .help-hero {
  border-color: #334155 !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .nearby-jobs-hero::before,
body.dark-mode .page-header.quotes-page-hero::before,
body.dark-mode .page-header.my-projects-page-hero::before,
body.dark-mode .dashboard-header--hero-bg::before,
body.dark-mode .profile-header--hero-bg::before,
body.dark-mode .help-hero::before {
  background-color: #0f172a !important;
  filter: grayscale(100%) brightness(0.42) contrast(1.05) !important;
}

body.dark-mode .nearby-jobs-hero::after,
body.dark-mode .page-header.quotes-page-hero::after,
body.dark-mode .page-header.my-projects-page-hero::after,
body.dark-mode .dashboard-header--hero-bg::after,
body.dark-mode .profile-header--hero-bg::after,
body.dark-mode .help-hero::after {
  background: linear-gradient(
    105deg,
    rgba(15, 23, 42, 0.94) 0%,
    rgba(15, 23, 42, 0.82) 36%,
    rgba(15, 23, 42, 0.5) 62%,
    rgba(15, 23, 42, 0.22) 100%
  ) !important;
}

body.dark-mode .nearby-jobs-hero h1,
body.dark-mode .nearby-jobs-hero p,
body.dark-mode .nearby-jobs-hero .text-gray-900,
body.dark-mode .nearby-jobs-hero .text-gray-600,
body.dark-mode .nearby-jobs-hero .text-slate-900,
body.dark-mode .page-header.quotes-page-hero h1,
body.dark-mode .page-header.quotes-page-hero p,
body.dark-mode .page-header.my-projects-page-hero .page-title,
body.dark-mode .page-header.my-projects-page-hero .page-subtitle,
body.dark-mode .help-hero-title,
body.dark-mode .help-hero-subtitle {
  color: #f8fafc !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55) !important;
}

body.dark-mode .nearby-jobs-hero p,
body.dark-mode .page-header.quotes-page-hero p,
body.dark-mode .help-hero-subtitle {
  color: #cbd5e1 !important;
}

/* Offertgenerator — ingen ljusblå; neutral slate */
body.dark-mode .sidebar-header,
body.dark-mode .sidebar-footer,
body.dark-mode .sidebar-summary,
body.dark-mode .quote-sidebar .sidebar-header,
body.dark-mode .quote-sidebar .sidebar-footer,
body.dark-mode .quote-sidebar .sidebar-summary {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .sidebar-summary .summary-label,
body.dark-mode .sidebar-summary .summary-amount,
body.dark-mode .sidebar-summary .summary-details {
  color: #f8fafc !important;
  opacity: 1 !important;
}

body.dark-mode .sidebar-summary .summary-details {
  color: #cbd5e1 !important;
}

/* Behåll röd/grön i sidebar även i dark mode */
body.dark-mode .sidebar-summary .sidebar-rot-total,
body.dark-mode .sidebar-summary .sidebar-rot-total span {
  color: rgba(255, 255, 255, 0.85) !important;
}

body.dark-mode .sidebar-summary .sidebar-rot-discount,
body.dark-mode .sidebar-summary .sidebar-rot-discount span,
html.dark-mode .sidebar-summary .sidebar-rot-discount,
html.dark-mode .sidebar-summary .sidebar-rot-discount span {
  color: #ff6b6b !important;
}

body.dark-mode .sidebar-summary .sidebar-customer-pays,
body.dark-mode .sidebar-summary .sidebar-customer-pays span,
html.dark-mode .sidebar-summary .sidebar-customer-pays,
html.dark-mode .sidebar-summary .sidebar-customer-pays span {
  color: #51cf66 !important;
}

body.dark-mode .step-item.active {
  border-left-color: #e2e8f0 !important;
  background: rgba(226, 232, 240, 0.08) !important;
}

body.dark-mode .step-item.active .step-icon {
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

body.dark-mode .step-item.completed .step-icon {
  background: #10b981 !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
}

body.dark-mode .btn-next,
body.dark-mode .action-btn-next,
body.dark-mode .floating-action-bar .btn-primary,
body.dark-mode .floating-action-bar button.btn-next,
body.dark-mode button.btn-next {
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

body.dark-mode .btn-next:hover,
body.dark-mode .floating-action-bar .btn-primary:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

body.dark-mode .team-modal-body a {
  color: #cbd5e1 !important;
  text-decoration: underline;
}

body.dark-mode .doc-tip {
  background: rgba(148, 163, 184, 0.14) !important;
  border-left-color: #94a3b8 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .doc-tip strong,
body.dark-mode .doc-tip a {
  color: #f1f5f9 !important;
}

body.dark-mode #nextBtn.btn-primary,
body.dark-mode .fab-btn-primary,
body.dark-mode .floating-action-bar .btn.btn-primary {
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

body.dark-mode #nextBtn.btn-primary:hover,
body.dark-mode .fab-btn-primary:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

body.dark-mode .btn-primary,
body.dark-mode .btn.btn-primary {
  color: #0f172a !important;
}

/* Offertgenerator statusbanner — dämpad i dark */
body.dark-mode .company-info-status {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #a7f3d0 !important;
}

body.dark-mode .company-info-status strong,
body.dark-mode .company-info-status i {
  color: #6ee7b7 !important;
}

/* Nästa — mindre bländande än nästan-vit */
body.dark-mode #nextBtn.btn-primary,
body.dark-mode .fab-btn-primary,
body.dark-mode .floating-action-bar .btn.btn-primary,
body.dark-mode .btn-primary,
body.dark-mode .btn.btn-primary {
  background: #cbd5e1 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.dark-mode #nextBtn.btn-primary:hover,
body.dark-mode .fab-btn-primary:hover,
body.dark-mode .btn-primary:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Aktiv steg-ikon — mjukare grå, inte bländvit */
body.dark-mode .step-item.active .step-icon {
  background: #cbd5e1 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Kontaktbok-picker (offertgenerator steg 2) */
body.dark-mode .contact-picker-modal,
body.dark-mode .contact-picker-overlay .modal-content,
body.dark-mode .contact-picker-overlay .modal {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .contact-picker-header {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
}

body.dark-mode .contact-picker-header h3 {
  color: #f8fafc !important;
}

body.dark-mode .contact-picker-close {
  color: #94a3b8 !important;
}

body.dark-mode .contact-picker-close:hover {
  color: #f8fafc !important;
}

body.dark-mode .contact-picker-body {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

body.dark-mode .contact-picker-search {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

body.dark-mode .contact-picker-search::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

body.dark-mode .contact-picker-item {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .contact-picker-item:hover,
body.dark-mode .contact-picker-item:active {
  background: #334155 !important;
  border-color: #475569 !important;
}

body.dark-mode .contact-picker-item-name {
  color: #f8fafc !important;
}

body.dark-mode .contact-picker-item-contact {
  color: #94a3b8 !important;
}

body.dark-mode .contact-picker-item-badge {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .contact-picker-item-badge.hdh {
  background: rgba(148, 163, 184, 0.25) !important;
  color: #e2e8f0 !important;
}

body.dark-mode .contact-picker-item-badge.manual {
  background: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-mode .contact-picker-item-badge.company {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
}

body.dark-mode .contact-picker-empty,
body.dark-mode .contact-picker-error,
body.dark-mode .contact-picker-loading {
  color: #94a3b8 !important;
}

body.dark-mode .btn-pick-from-contact-book {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .btn-pick-from-contact-book:hover {
  background: #334155 !important;
  border-color: #64748b !important;
  color: #f8fafc !important;
}

body.dark-mode .contact-picker-filled-hint {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #a7f3d0 !important;
}

/* Modal-footer i contact picker om den finns */
body.dark-mode .contact-picker-modal .modal-footer,
body.dark-mode .contact-picker-overlay .modal-footer {
  background: #0f172a !important;
  border-top-color: #334155 !important;
}

/* Autofill — Chrome färgar fält ljusblå + blek text */
body.dark-mode input:-webkit-autofill,
body.dark-mode input:-webkit-autofill:hover,
body.dark-mode input:-webkit-autofill:focus,
body.dark-mode input:-webkit-autofill:active,
body.dark-mode textarea:-webkit-autofill,
body.dark-mode textarea:-webkit-autofill:hover,
body.dark-mode textarea:-webkit-autofill:focus,
body.dark-mode select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
  box-shadow: 0 0 0 1000px #0f172a inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc !important;
  border-color: #475569 !important;
  transition: background-color 99999s ease-out 0s;
}

body.dark-mode #customerProjectName,
body.dark-mode #projectName,
body.dark-mode #quoteProjectLabel,
body.dark-mode .steps-container input[type="text"],
body.dark-mode .steps-container input[type="email"],
body.dark-mode .steps-container input[type="tel"],
body.dark-mode .steps-container input[type="number"] {
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  border-color: #475569 !important;
}

/* Hjälptext under fält — för mörk mot dark bg */
body.dark-mode .help-text,
body.dark-mode .help-text i,
body.dark-mode small.help-text,
body.dark-mode .form-help,
body.dark-mode .form-group small {
  color: #94a3b8 !important;
}

/* ========== Quote generator: steg 3–7 (vita kort → dark) ========== */
body.dark-mode .form-section-card,
body.dark-mode .form-section,
body.dark-mode .quote-preview,
body.dark-mode .quote-preview-content,
body.dark-mode .final-quote-preview,
body.dark-mode .quote-summary,
body.dark-mode .cost-summary-detailed,
body.dark-mode .summary-calculations,
body.dark-mode .summary-item,
body.dark-mode .markup-settings,
body.dark-mode .markup-item,
body.dark-mode .articles-table,
body.dark-mode .step4-import-bar,
body.dark-mode .manual-entry-toggle,
body.dark-mode .article-entry-section,
body.dark-mode .quote-header-section,
body.dark-mode .image-preview-item,
body.dark-mode .sales-review-info {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}

body.dark-mode .step4-import-bar {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-color: #475569 !important;
}

body.dark-mode .form-section-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
  transform: none;
}

body.dark-mode .card-header {
  border-bottom-color: #334155 !important;
}

body.dark-mode .card-title-wrapper h3,
body.dark-mode .card-title-wrapper h3 *,
body.dark-mode .form-section > h4,
body.dark-mode .form-section h4,
body.dark-mode .form-section h4 i,
body.dark-mode .cost-summary-detailed h4,
body.dark-mode .cost-summary-detailed h5,
body.dark-mode .summary-section h5,
body.dark-mode .step4-import-bar__text h4,
body.dark-mode .step4-import-bar__text h4 i,
body.dark-mode .quote-section h5,
body.dark-mode .quote-section h5 i,
body.dark-mode .final-quote-preview .quote-header-section h4,
body.dark-mode .final-quote-preview .quote-header-section h4 i,
body.dark-mode .quote-subtitle,
body.dark-mode .manual-entry-toggle__text strong,
body.dark-mode .manual-entry-toggle__text span,
body.dark-mode .sales-review-info h5,
body.dark-mode .sales-review-info li,
body.dark-mode .sales-review-info p {
  color: #f1f5f9 !important;
}

body.dark-mode .step4-import-bar__text p,
body.dark-mode .manual-entry-toggle__text span,
body.dark-mode .help-text,
body.dark-mode .form-section .help-text {
  color: #94a3b8 !important;
}

body.dark-mode .card-icon {
  background: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .form-section-card .card-icon[style*="background"],
body.dark-mode #articlesFooterPanel .card-icon {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

/* Labels på mörka kort */
body.dark-mode .form-section-card label,
body.dark-mode .form-section label,
body.dark-mode .form-section-card .form-label,
body.dark-mode .form-section .form-label,
body.dark-mode .cost-summary-detailed label,
body.dark-mode .markup-item label,
body.dark-mode .markup-item small {
  color: #cbd5e1 !important;
}

body.dark-mode .summary-label,
body.dark-mode .summary-row,
body.dark-mode .summary-row span,
body.dark-mode .summary-item span,
body.dark-mode .summary-item span:first-child,
body.dark-mode .summary-value,
body.dark-mode .summary-item span:last-child,
body.dark-mode .calc-summary-row,
body.dark-mode .calc-row {
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

body.dark-mode .summary-row.total,
body.dark-mode .calc-summary-row.total,
body.dark-mode .calc-row.total strong,
body.dark-mode .summary-row.total-row {
  color: #f8fafc !important;
  border-color: #64748b !important;
}

/* ROT-ruta: mörk grön istället för ljus */
body.dark-mode .cost-summary {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
  color: #a7f3d0 !important;
}

body.dark-mode .cost-summary h5,
body.dark-mode .cost-summary .summary-item,
body.dark-mode .cost-summary .summary-item span,
body.dark-mode #rotRutCalculation .summary-item span,
body.dark-mode #rotRutCalculation .summary-value {
  color: #d1fae5 !important;
  background: transparent !important;
  border-color: rgba(52, 211, 153, 0.25) !important;
}

/* Checkbox / ROT-val — ingen ljusblå markering */
body.dark-mode .checkbox-label,
body.dark-mode .radio-option {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .checkbox-label:hover,
body.dark-mode .radio-option:hover {
  background: #1e293b !important;
  border-color: #64748b !important;
}

body.dark-mode .checkbox-label:has(input[type="checkbox"]:checked),
body.dark-mode .radio-option:has(input[type="radio"]:checked) {
  background: #334155 !important;
  border-color: #94a3b8 !important;
  box-shadow: inset 3px 0 0 #cbd5e1 !important;
}

body.dark-mode .checkbox-text strong,
body.dark-mode .radio-option-content strong {
  color: #f1f5f9 !important;
}

body.dark-mode .checkbox-text small,
body.dark-mode .radio-option-content small {
  color: #94a3b8 !important;
}

body.dark-mode .checkbox-custom {
  background: #0f172a !important;
  border-color: #64748b !important;
}

body.dark-mode .checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: #64748b !important;
  border-color: #94a3b8 !important;
}

/* Påslag-banners: slate, inte ljusblå */
body.dark-mode .markup-amount,
body.dark-mode .price-type-badge {
  background: #334155 !important;
  border-color: #64748b !important;
  color: #e2e8f0 !important;
}

body.dark-mode .price-type-badge strong,
body.dark-mode .price-type-badge span,
body.dark-mode .price-type-badge i {
  color: #f1f5f9 !important;
}

/* Arbetsbeskrivning + fri text */
body.dark-mode .article-work-description {
  background: #0f172a !important;
  border-color: #475569 !important;
}

body.dark-mode .article-work-description__label {
  color: #94a3b8 !important;
}

body.dark-mode .article-work-description__input,
body.dark-mode .article-work-description__body,
body.dark-mode .article-text-row-input,
body.dark-mode .article-text-row-input--heading,
body.dark-mode .article-text-row-input--context,
body.dark-mode .article-text-row-input--internal-note,
body.dark-mode .article-item--calc-header .article-text-row-input {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
  -webkit-text-fill-color: #e2e8f0 !important;
}

body.dark-mode .article-text-row-input::placeholder,
body.dark-mode .article-work-description__input::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1;
}

body.dark-mode .article-item--text,
body.dark-mode .article-item--calc-header {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .manual-entry-toggle:hover {
  background: #334155 !important;
}

@media (max-width: 768px) {
  body.dark-mode button.manual-entry-toggle {
    background: #1e293b !important;
    color: #e2e8f0 !important;
  }
}

/* Förhandsvisning / granskning */
body.dark-mode .quote-details,
body.dark-mode .quote-details p,
body.dark-mode .quote-details strong,
body.dark-mode .quote-cost-breakdown-box,
body.dark-mode .quote-cost-breakdown-box > p:not(.rot-rut-basis-box),
body.dark-mode .quote-cost-breakdown-box > .summary-row,
body.dark-mode .quote-cost-breakdown-box > h6,
body.dark-mode .final-quote-preview h5,
body.dark-mode .final-quote-preview h6,
body.dark-mode .final-quote-preview p:not(.rot-rut-basis-box),
body.dark-mode .final-quote-preview span,
body.dark-mode .final-quote-preview strong,
body.dark-mode .final-quote-preview th,
body.dark-mode .final-quote-preview td,
body.dark-mode .amount {
  color: #e2e8f0 !important;
}

body.dark-mode .quote-cost-breakdown-box,
body.dark-mode .final-quote-preview .cost-breakdown,
body.dark-mode .final-quote-preview [style*="background: #f8f9fa"],
body.dark-mode .final-quote-preview [style*="background: white"],
body.dark-mode .final-quote-preview [style*="background:#f8f9fa"],
body.dark-mode .final-quote-preview [style*="background:white"],
body.dark-mode .quote-preview-content [style*="background: #f8f9fa"],
body.dark-mode .quote-preview-content [style*="background: white"],
body.dark-mode .quote-preview-content [style*="background:#f8f9fa"],
body.dark-mode .quote-preview-content [style*="background:white"] {
  background: #0f172a !important;
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode .final-quote-preview thead tr,
body.dark-mode .final-quote-preview tr[style*="background: #f8f9fa"],
body.dark-mode .final-quote-preview tr[style*="background:#f8f9fa"] {
  background: #334155 !important;
}

body.dark-mode .discount {
  color: #86efac !important;
}

/* Steg 7 info-boxar — ingen ljusblå */
body.dark-mode #step7ExternalCustomerInfo,
body.dark-mode #step7HdhCustomerInfo {
  background: #1e293b !important;
  border-left-color: #94a3b8 !important;
}

body.dark-mode #step7ExternalCustomerInfo p,
body.dark-mode #step7ExternalCustomerInfo strong,
body.dark-mode #step7ExternalCustomerInfo i,
body.dark-mode #step7HdhCustomerInfo p,
body.dark-mode #step7HdhCustomerInfo strong,
body.dark-mode #step7HdhCustomerInfo i {
  color: #e2e8f0 !important;
}

body.dark-mode #step7UpdateNoEmailNote {
  background: rgba(16, 185, 129, 0.12) !important;
  border-left-color: #34d399 !important;
}

body.dark-mode #step7UpdateNoEmailNote p,
body.dark-mode #step7UpdateNoEmailNote strong,
body.dark-mode #step7UpdateNoEmailNote small {
  color: #a7f3d0 !important;
}

body.dark-mode #step7ExternalEmailWarning {
  background: rgba(239, 68, 68, 0.12) !important;
  border-left-color: #f87171 !important;
}

body.dark-mode #step7ExternalEmailWarning p,
body.dark-mode #step7ExternalEmailWarning strong {
  color: #fecaca !important;
}

/* Final actions / knappar i steg 7 */
body.dark-mode .final-actions .btn-secondary,
body.dark-mode .final-actions button.btn-secondary {
  background: #334155 !important;
  color: #f8fafc !important;
  border-color: #64748b !important;
}

body.dark-mode .article-action-btn.edit {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .article-action-btn.save {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

/* Artikellista border */
body.dark-mode .articles-table {
  border-color: #334155 !important;
}

body.dark-mode .articles-list-toolbar .btn-secondary {
  background: #334155 !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

/* Selected files / övriga ljusa paneler */
body.dark-mode #selectedFilesList {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

body.dark-mode #selectedFilesList strong,
body.dark-mode #selectedFilesList ul {
  color: #cbd5e1 !important;
}

body.dark-mode .quote-cost-breakdown-box,
body.dark-mode .final-quote-articles-wrap {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode .quote-breakdown-heading,
body.dark-mode .final-quote-section-title,
body.dark-mode .final-quote-articles-head th,
body.dark-mode .quote-breakdown-total,
body.dark-mode .quote-breakdown-total strong {
  color: #f1f5f9 !important;
}

body.dark-mode .final-quote-articles-head {
  background: #334155 !important;
}

body.dark-mode .final-quote-articles-wrap th,
body.dark-mode .final-quote-articles-wrap td {
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

/* Steg 5: kostnadssammanfattning (JS-genererad) */
body.dark-mode .cost-summary-display {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}

body.dark-mode .cost-summary-display__title,
body.dark-mode .cost-summary-display__title i,
body.dark-mode .cost-summary-display__subtitle,
body.dark-mode .cost-summary-display__grid,
body.dark-mode .cost-summary-display__grid > div,
body.dark-mode .cost-summary-display__total {
  color: #e2e8f0 !important;
}

body.dark-mode .cost-summary-display__panel {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode .cost-summary-display__accent {
  color: #cbd5e1 !important;
}

/* Light-mode defaults for cost-summary-display (JS removed hardcoded bg) */
.cost-summary-display {
  background: #f8f9fa;
}
.cost-summary-display__title { color: #495057; }
.cost-summary-display__title i { color: #64748b; }
.cost-summary-display__subtitle { color: #6c757d; }
.cost-summary-display__panel { background: #fff; }
.cost-summary-display__grid > div { color: #495057; }
.cost-summary-display__grid > div[style*="font-weight: 600"] { color: #212529; }
.cost-summary-display__accent { color: #475569; }
.cost-summary-display__total { color: #0f172a; }
.quote-cost-breakdown-box { background: #f8f9fa; }
.final-quote-articles-wrap { background: #fff; }
.final-quote-articles-head { background: #f8f9fa; }
.final-quote-section-title,
.quote-breakdown-heading { color: #495057; }
.quote-breakdown-total { color: #0f172a; }

/* Omslagsbild-förhandsvisning */
body.dark-mode .cover-image-preview,
body.dark-mode .cover-image-preview-grid,
body.dark-mode .image-preview-container {
  background: transparent !important;
}

body.dark-mode .image-preview-item,
body.dark-mode .cover-image-preview-grid .image-preview-item {
  background: #0f172a !important;
  border-color: #475569 !important;
}

body.dark-mode .cover-image-preview-grid .image-preview-item .cover-image-caption,
body.dark-mode .cover-image-caption {
  background: #1e293b !important;
  border-top-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-mode .cover-image-change-btn {
  color: #e2e8f0 !important;
}

body.dark-mode .cover-image-change-btn:hover {
  color: #f8fafc !important;
}

/* Artikellista — draft-rad (vit gradient-botten) + Lägg till-knapp */
body.dark-mode .article-item--draft,
body.dark-mode .article-item--mobile.article-item--draft {
  background: linear-gradient(180deg, #14532d 0%, #0f172a 100%) !important;
  border-color: #166534 !important;
}

body.dark-mode .article-item--draft:hover,
body.dark-mode .article-item--mobile.article-item--draft:hover {
  background: linear-gradient(180deg, #166534 0%, #1e293b 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.25) !important;
}

body.dark-mode .articles-table-body-scroll,
body.dark-mode .articles-body {
  background: #1e293b !important;
}

body.dark-mode .draft-add-btn,
body.dark-mode .article-action-btn.draft-add-btn {
  background: #334155 !important;
  color: #f8fafc !important;
  border: 1px solid #64748b !important;
}

body.dark-mode .draft-add-btn:hover,
body.dark-mode .article-action-btn.draft-add-btn:hover {
  background: #475569 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .draft-add-btn i,
body.dark-mode .draft-add-btn span {
  color: #f8fafc !important;
}

/* ROT/RUT underlagsruta — alltid ljus mint (ändras INTE av dark mode) */
.rot-rut-basis-box,
p.rot-rut-basis-box {
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #f0fdf4 !important;
  background-color: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #166534 !important;
  -webkit-text-fill-color: #166534 !important;
}

.rot-rut-basis-box__title {
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: #166534 !important;
  -webkit-text-fill-color: #166534 !important;
}

.rot-rut-basis-box__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #166534 !important;
}

.rot-rut-basis-box__row span,
.rot-rut-basis-box__row strong,
.rot-rut-basis-box span,
.rot-rut-basis-box strong,
.rot-rut-basis-box * {
  color: #166534 !important;
  -webkit-text-fill-color: #166534 !important;
  background: transparent !important;
}

html.dark-mode .rot-rut-basis-box,
html.dark-mode p.rot-rut-basis-box,
html.dark-mode .rot-rut-basis-box *,
html.dark-mode .cost-summary-display .rot-rut-basis-box,
html.dark-mode .cost-summary-display .rot-rut-basis-box *,
html.dark-mode .final-quote-preview .rot-rut-basis-box,
html.dark-mode .final-quote-preview .rot-rut-basis-box *,
html.dark-mode .quote-preview-content .rot-rut-basis-box,
html.dark-mode .quote-preview-content .rot-rut-basis-box *,
html.dark-mode #pdf-content .rot-rut-basis-box,
html.dark-mode #pdf-content .rot-rut-basis-box *,
body.dark-mode .rot-rut-basis-box,
body.dark-mode p.rot-rut-basis-box,
body.dark-mode .rot-rut-basis-box *,
body.dark-mode .cost-summary-display .rot-rut-basis-box,
body.dark-mode .cost-summary-display .rot-rut-basis-box *,
body.dark-mode .final-quote-preview .rot-rut-basis-box,
body.dark-mode .final-quote-preview .rot-rut-basis-box *,
body.dark-mode .quote-preview-content .rot-rut-basis-box,
body.dark-mode .quote-preview-content .rot-rut-basis-box *,
body.dark-mode #pdf-content .rot-rut-basis-box,
body.dark-mode #pdf-content .rot-rut-basis-box * {
  background: #f0fdf4 !important;
  background-color: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
  color: #166534 !important;
  -webkit-text-fill-color: #166534 !important;
}

html.dark-mode .rot-rut-basis-box,
html.dark-mode p.rot-rut-basis-box,
body.dark-mode .rot-rut-basis-box,
body.dark-mode p.rot-rut-basis-box,
html.dark-mode .final-quote-preview .rot-rut-basis-box,
html.dark-mode .quote-preview-content .rot-rut-basis-box,
html.dark-mode #pdf-content .rot-rut-basis-box,
body.dark-mode .final-quote-preview .rot-rut-basis-box,
body.dark-mode .quote-preview-content .rot-rut-basis-box,
body.dark-mode #pdf-content .rot-rut-basis-box {
  background: #f0fdf4 !important;
  background-color: #f0fdf4 !important;
}

/* Säljare / grossist-val (steg 6) */
body.dark-mode .supplier-card,
body.dark-mode .salesperson-card {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .supplier-card:hover,
body.dark-mode .salesperson-card:hover {
  background: #334155 !important;
  border-color: #64748b !important;
}

body.dark-mode .supplier-card-icon {
  background: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .supplier-card-body strong,
body.dark-mode .salesperson-card-label strong,
body.dark-mode .salesperson-card label strong {
  color: #f1f5f9 !important;
}

body.dark-mode .supplier-card-body small,
body.dark-mode .salesperson-card-label small,
body.dark-mode .salesperson-card label small,
body.dark-mode .supplier-card-arrow,
body.dark-mode .sales-selection-step-label {
  color: #94a3b8 !important;
}

body.dark-mode .salesperson-card.is-selected {
  background: #334155 !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.25) !important;
}

body.dark-mode .salesperson-check {
  background: #0f172a !important;
  border-color: #64748b !important;
}

body.dark-mode .salesperson-card.is-selected .salesperson-check {
  background: #64748b !important;
  border-color: #94a3b8 !important;
  color: #f8fafc !important;
}

body.dark-mode .btn-add-seller-quick {
  background: #334155 !important;
  color: #f8fafc !important;
  border: 1px solid #64748b !important;
}

body.dark-mode .btn-add-seller-quick i {
  color: #f8fafc !important;
}

body.dark-mode .btn-add-seller-quick:hover {
  background: #475569 !important;
  color: #ffffff !important;
  filter: none;
}

body.dark-mode .btn-back-supplier {
  color: #cbd5e1 !important;
}

body.dark-mode .btn-back-supplier:hover {
  color: #f8fafc !important;
}

body.dark-mode .sales-attachments-input,
body.dark-mode #salesAttachments {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .sales-attachments-input::file-selector-button,
body.dark-mode #salesAttachments::file-selector-button,
body.dark-mode .sales-attachments-input::-webkit-file-upload-button,
body.dark-mode #salesAttachments::-webkit-file-upload-button {
  background: #334155 !important;
  color: #f8fafc !important;
  border: 1px solid #64748b !important;
}

body.dark-mode .salesperson-selection {
  color: #94a3b8 !important;
}

/* ========== Offert-dokument: ALDRIG dark mode (PDF + slutgiltig förhandsvisning) ========== */
html.dark-mode #pdf-container,
html.dark-mode #pdf-content,
html.dark-mode .final-quote-preview,
html.dark-mode .preview-paper,
html.dark-mode .quote-preview-content,
body.dark-mode #pdf-container,
body.dark-mode #pdf-content,
body.dark-mode .final-quote-preview,
body.dark-mode .preview-paper,
body.dark-mode .quote-preview-content {
  color-scheme: light !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border-color: #e5e7eb !important;
  -webkit-text-fill-color: #1f2937 !important;
}

html.dark-mode #pdf-content *,
html.dark-mode .final-quote-preview *:not(button):not(input):not(textarea):not(select),
html.dark-mode .preview-paper *:not(button),
html.dark-mode .quote-preview-content *:not(button):not(input):not(textarea):not(select),
body.dark-mode #pdf-content *,
body.dark-mode .final-quote-preview *:not(button):not(input):not(textarea):not(select),
body.dark-mode .preview-paper *:not(button),
body.dark-mode .quote-preview-content *:not(button):not(input):not(textarea):not(select) {
  color: inherit;
}

html.dark-mode #pdf-content,
html.dark-mode #pdf-content table,
html.dark-mode #pdf-content thead,
html.dark-mode #pdf-content tbody,
html.dark-mode #pdf-content tr,
html.dark-mode #pdf-content th,
html.dark-mode #pdf-content td,
html.dark-mode .final-quote-preview table,
html.dark-mode .final-quote-preview thead,
html.dark-mode .final-quote-preview tbody,
html.dark-mode .final-quote-preview tr,
html.dark-mode .final-quote-preview th,
html.dark-mode .final-quote-preview td,
html.dark-mode .final-quote-articles-wrap,
html.dark-mode .final-quote-articles-head,
html.dark-mode .quote-summary,
html.dark-mode .quote-cost-breakdown-box,
html.dark-mode .cost-breakdown,
html.dark-mode .quote-header-section,
body.dark-mode #pdf-content,
body.dark-mode #pdf-content table,
body.dark-mode #pdf-content thead,
body.dark-mode #pdf-content tbody,
body.dark-mode #pdf-content tr,
body.dark-mode #pdf-content th,
body.dark-mode #pdf-content td,
body.dark-mode .final-quote-preview table,
body.dark-mode .final-quote-preview thead,
body.dark-mode .final-quote-preview tbody,
body.dark-mode .final-quote-preview tr,
body.dark-mode .final-quote-preview th,
body.dark-mode .final-quote-preview td,
body.dark-mode .final-quote-articles-wrap,
body.dark-mode .final-quote-articles-head,
body.dark-mode .quote-summary,
body.dark-mode .quote-cost-breakdown-box,
body.dark-mode .cost-breakdown,
body.dark-mode .quote-header-section {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border-color: #e5e7eb !important;
  -webkit-text-fill-color: #1f2937 !important;
}

html.dark-mode #pdf-content thead tr,
html.dark-mode #pdf-content th,
html.dark-mode .final-quote-preview thead tr,
html.dark-mode .final-quote-articles-head,
html.dark-mode .final-quote-articles-head th,
body.dark-mode #pdf-content thead tr,
body.dark-mode #pdf-content th,
body.dark-mode .final-quote-preview thead tr,
body.dark-mode .final-quote-articles-head,
body.dark-mode .final-quote-articles-head th {
  background: #f8f9fa !important;
  background-color: #f8f9fa !important;
  color: #495057 !important;
  -webkit-text-fill-color: #495057 !important;
}

html.dark-mode .final-quote-preview h4,
html.dark-mode .final-quote-preview h5,
html.dark-mode .final-quote-preview h6,
html.dark-mode .final-quote-section-title,
html.dark-mode .quote-breakdown-heading,
html.dark-mode .quote-subtitle,
html.dark-mode .quote-details,
html.dark-mode .quote-details p,
html.dark-mode .quote-details strong,
html.dark-mode .summary-row,
html.dark-mode .summary-row span,
html.dark-mode .amount,
body.dark-mode .final-quote-preview h4,
body.dark-mode .final-quote-preview h5,
body.dark-mode .final-quote-preview h6,
body.dark-mode .final-quote-section-title,
body.dark-mode .quote-breakdown-heading,
body.dark-mode .quote-subtitle,
body.dark-mode .quote-details,
body.dark-mode .quote-details p,
body.dark-mode .quote-details strong,
body.dark-mode .summary-row,
body.dark-mode .summary-row span,
body.dark-mode .amount {
  color: #1f2937 !important;
  -webkit-text-fill-color: #1f2937 !important;
  background: transparent !important;
}

/* ROT/RUT i dokumentvy — behåll ljus mint även i dark mode */
.final-quote-preview .rot-rut-basis-box,
.quote-preview-content .rot-rut-basis-box,
#pdf-content .rot-rut-basis-box,
html.dark-mode .final-quote-preview .rot-rut-basis-box,
html.dark-mode .quote-preview-content .rot-rut-basis-box,
html.dark-mode #pdf-content .rot-rut-basis-box,
body.dark-mode .final-quote-preview .rot-rut-basis-box,
body.dark-mode .quote-preview-content .rot-rut-basis-box,
body.dark-mode #pdf-content .rot-rut-basis-box {
  background: #f0fdf4 !important;
  background-color: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #166534 !important;
  -webkit-text-fill-color: #166534 !important;
}

.final-quote-preview .rot-rut-basis-box *,
.quote-preview-content .rot-rut-basis-box *,
#pdf-content .rot-rut-basis-box *,
html.dark-mode .final-quote-preview .rot-rut-basis-box *,
html.dark-mode .quote-preview-content .rot-rut-basis-box *,
html.dark-mode #pdf-content .rot-rut-basis-box *,
body.dark-mode .final-quote-preview .rot-rut-basis-box *,
body.dark-mode .quote-preview-content .rot-rut-basis-box *,
body.dark-mode #pdf-content .rot-rut-basis-box * {
  color: #166534 !important;
  -webkit-text-fill-color: #166534 !important;
  background: transparent !important;
}
