/* Premium SaaS light theme. No dark-mode selectors are defined in this file. */
html.theme-light,
html.theme-light body {
  color-scheme: light;
  background: #F5F7FA !important;
  color: #111827 !important;
}

html.theme-light body {
  --theme-light-page: #F5F7FA;
  --theme-light-secondary: #F8FAFC;
  --theme-light-card: #FFFFFF;
  --theme-light-hover: #F1F5F9;
  --theme-light-text: #111827;
  --theme-light-secondary-text: #475569;
  --theme-light-muted: #64748B;
  --theme-light-disabled: #94A3B8;
  --theme-light-primary: #111827;
  --theme-light-primary-hover: #374151;
  --theme-light-accent: #B08D57;
  --theme-light-selected: #F6F0E5;
  --theme-light-border: #E5E7EB;
  --theme-light-shadow: 0 4px 12px rgba(15,23,42,.05);
}

html.theme-light body::before,
html.theme-light body::after { display: none !important; }

html.theme-light body,
html.theme-light body main,
html.theme-light body .content,
html.theme-light body .planning-layout {
  background: var(--theme-light-page) !important;
  color: var(--theme-light-text) !important;
}

html.theme-light body header,
html.theme-light body nav,
html.theme-light body .company-nav,
html.theme-light body .nav-header,
html.theme-light body .nav-sidebar,
html.theme-light body .toolbar,
html.theme-light body .calendar-toolbar,
html.theme-light body .planner-toolbar {
  background: var(--theme-light-secondary) !important;
  color: var(--theme-light-text) !important;
  border-color: var(--theme-light-border) !important;
}

html.theme-light body .card,
html.theme-light body .panel,
html.theme-light body .modal-content,
html.theme-light body .modal-card,
html.theme-light body .profile-card,
html.theme-light body .module-card,
html.theme-light body .stat-card,
html.theme-light body .table-wrap,
html.theme-light body .table-container,
html.theme-light body .planner-panel,
html.theme-light body .planner-menu-section,
html.theme-light body .resource-section,
html.theme-light body .timeline-item-card,
html.theme-light body .timeline-time,
html.theme-light body .timeline-dropzone,
html.theme-light body .fc {
  background: var(--theme-light-card) !important;
  color: var(--theme-light-text) !important;
  border-color: var(--theme-light-border) !important;
  box-shadow: var(--theme-light-shadow) !important;
  background-image: none !important;
}

html.theme-light body h1,
html.theme-light body h2,
html.theme-light body h3,
html.theme-light body h4,
html.theme-light body h5,
html.theme-light body strong,
html.theme-light body .company-brand,
html.theme-light body .hero-title,
html.theme-light body .value,
html.theme-light body .timeline-item-title,
html.theme-light body .timeline-time strong {
  color: var(--theme-light-text) !important;
}

html.theme-light body p,
html.theme-light body label,
html.theme-light body .mut,
html.theme-light body .muted,
html.theme-light body .small,
html.theme-light body .sub,
html.theme-light body .company-name,
html.theme-light body .hero-text,
html.theme-light body .resource-meta,
html.theme-light body .timeline-item-meta,
html.theme-light body .timeline-time span,
html.theme-light body .profile-form-grid label span {
  color: var(--theme-light-muted) !important;
}

html.theme-light body input,
html.theme-light body select,
html.theme-light body textarea,
html.theme-light body .list-cell-input,
html.theme-light body .list-cell-select,
html.theme-light body .project-picker select {
  color-scheme: light;
  background: #FFFFFF !important;
  color: var(--theme-light-text) !important;
  border: 1px solid var(--theme-light-border) !important;
  box-shadow: none !important;
}

html.theme-light body input::placeholder,
html.theme-light body textarea::placeholder {
  color: var(--theme-light-muted) !important;
  opacity: 1;
}

html.theme-light body input:focus,
html.theme-light body select:focus,
html.theme-light body textarea:focus,
html.theme-light body button:focus,
html.theme-light body a:focus {
  outline: 2px solid var(--theme-light-accent) !important;
  outline-offset: 2px;
  border-color: var(--theme-light-accent) !important;
}

html.theme-light body input[type="date"],
html.theme-light body input[type="time"],
html.theme-light body input[type="datetime-local"] {
  color: var(--theme-light-text) !important;
  color-scheme: light;
}
html.theme-light body input[type="date"]::-webkit-calendar-picker-indicator,
html.theme-light body input[type="time"]::-webkit-calendar-picker-indicator,
html.theme-light body input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: .7;
}
html.theme-light body option { background: #FFFFFF; color: var(--theme-light-text); }

html.theme-light body button,
html.theme-light body .btn,
html.theme-light body .link-btn,
html.theme-light body .company-nav-btn {
  background: #FFFFFF !important;
  color: var(--theme-light-text) !important;
  border: 1px solid var(--theme-light-border) !important;
  box-shadow: none !important;
  background-image: none !important;
}
html.theme-light body button:hover,
html.theme-light body .btn:hover,
html.theme-light body .company-nav-btn:hover {
  background: var(--theme-light-hover) !important;
  color: var(--theme-light-text) !important;
  border-color: var(--theme-light-border) !important;
}
html.theme-light body button.primary,
html.theme-light body .primary,
html.theme-light body .primary-action,
html.theme-light body .btn-primary,
html.theme-light body .theme-toggle button.active,
html.theme-light body .company-nav-btn.active {
  background: var(--theme-light-primary) !important;
  color: #FFFFFF !important;
  border-color: var(--theme-light-primary) !important;
}
html.theme-light body button.primary:hover,
html.theme-light body .primary:hover,
html.theme-light body .primary-action:hover,
html.theme-light body .btn-primary:hover {
  background: var(--theme-light-primary-hover) !important;
  color: #FFFFFF !important;
  border-color: var(--theme-light-primary-hover) !important;
}
html.theme-light body a,
html.theme-light body .breadcrumb-link { color: var(--theme-light-primary) !important; }
html.theme-light body a:hover { color: var(--theme-light-primary-hover) !important; }

html.theme-light body table th {
  background: var(--theme-light-secondary) !important;
  color: var(--theme-light-muted) !important;
  border-color: var(--theme-light-border) !important;
}
html.theme-light body table td,
html.theme-light body table tr {
  color: var(--theme-light-text) !important;
  border-color: var(--theme-light-border) !important;
}
html.theme-light body table tr:hover td { background: var(--theme-light-hover) !important; }

html.theme-light body .hero-panel,
html.theme-light body .hero,
html.theme-light body .hero-card {
  background: var(--theme-light-secondary) !important;
  border-color: var(--theme-light-border) !important;
  background-image: none !important;
}
html.theme-light body .hero-panel *,
html.theme-light body .hero *,
html.theme-light body .hero-card * { color: var(--theme-light-text) !important; }

/* Homepage-specific surfaces override the legacy admin wow dashboard skin. */
html.theme-light body.admin-wow#index .home-hero,
html.theme-light body.admin-wow#index .home-section,
html.theme-light body.admin-wow#index .crm-stats,
html.theme-light body.admin-wow#index .home-focus-card,
html.theme-light body.admin-wow#index .home-weather-widget,
html.theme-light body.admin-wow#index .home-agenda-widget,
html.theme-light body.admin-wow#index .home-info-widget,
html.theme-light body.admin-wow#index .home-module-grid .card {
  background: #FFFFFF !important;
  background-image: none !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
  color: #111827 !important;
}
html.theme-light body.admin-wow#index .home-hero::before,
html.theme-light body.admin-wow#index .home-hero::after,
html.theme-light body.admin-wow#index .home-section::before,
html.theme-light body.admin-wow#index .home-section::after,
html.theme-light body.admin-wow#index .crm-stats::before,
html.theme-light body.admin-wow#index .crm-stats::after,
html.theme-light body.admin-wow#index .home-focus-card::before,
html.theme-light body.admin-wow#index .home-focus-card::after,
html.theme-light body.admin-wow#index .home-weather-widget::before,
html.theme-light body.admin-wow#index .home-info-widget::before {
  display: none !important;
}
html.theme-light body.admin-wow#index .home-title-row h2,
html.theme-light body.admin-wow#index .home-title-row p,
html.theme-light body.admin-wow#index .home-section-head h3,
html.theme-light body.admin-wow#index .home-section-head p,
html.theme-light body.admin-wow#index .home-info-value,
html.theme-light body.admin-wow#index .home-info-kicker,
html.theme-light body.admin-wow#index .home-info-sub,
html.theme-light body.admin-wow#index .home-agenda-kicker,
html.theme-light body.admin-wow#index .home-agenda-date,
html.theme-light body.admin-wow#index .home-agenda-title,
html.theme-light body.admin-wow#index .home-agenda-sub,
html.theme-light body.admin-wow#index .home-focus-value,
html.theme-light body.admin-wow#index .home-focus-label,
html.theme-light body.admin-wow#index .home-focus-note,
html.theme-light body.admin-wow#index .home-module-grid .card h3,
html.theme-light body.admin-wow#index .home-module-grid .card p,
html.theme-light body.admin-wow#index .crm-stats h3 {
  color: #111827 !important;
}
html.theme-light body.admin-wow#index .home-title-row p,
html.theme-light body.admin-wow#index .home-section-head p,
html.theme-light body.admin-wow#index .home-info-sub,
html.theme-light body.admin-wow#index .home-agenda-sub,
html.theme-light body.admin-wow#index .home-focus-note,
html.theme-light body.admin-wow#index .home-module-grid .card p {
  color: #64748B !important;
}
html.theme-light body.admin-wow#index .home-search-btn,
html.theme-light body.admin-wow#index .home-hero-btn,
html.theme-light body.admin-wow#index .home-action-dock .quick-action-btn {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #111827 !important;
  border: 1px solid #E5E7EB !important;
  box-shadow: none !important;
}
html.theme-light body.admin-wow#index .home-hero-btn.primary,
html.theme-light body.admin-wow#index .home-action-dock .quick-action-btn:first-child {
  background: #111827 !important;
  color: #FFFFFF !important;
  border-color: #111827 !important;
}
html.theme-light body.admin-wow#index .home-search-btn:hover,
html.theme-light body.admin-wow#index .home-hero-btn:hover,
html.theme-light body.admin-wow#index .home-action-dock .quick-action-btn:hover {
  background: #F1F5F9 !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body.admin-wow#index .home-hero-btn.primary:hover,
html.theme-light body.admin-wow#index .home-action-dock .quick-action-btn:first-child:hover {
  background: #374151 !important;
  color: #FFFFFF !important;
  border-color: #374151 !important;
}
html.theme-light body.admin-wow#index .home-weather-slot,
html.theme-light body.admin-wow#index .home-weather-empty,
html.theme-light body.admin-wow#index .home-agenda-item,
html.theme-light body.admin-wow#index .home-badge,
html.theme-light body.admin-wow#index .home-focus-icon,
html.theme-light body.admin-wow#index .home-module-grid .card .icon {
  background: #F8FAFC !important;
  background-image: none !important;
  color: #334155 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body.admin-wow#index .home-weather-slot-label,
html.theme-light body.admin-wow#index .home-weather-slot-temp,
html.theme-light body.admin-wow#index .home-weather-slot-time,
html.theme-light body.admin-wow#index .home-weather-slot-extra,
html.theme-light body.admin-wow#index .home-weather-empty-title,
html.theme-light body.admin-wow#index .home-weather-empty-text,
html.theme-light body.admin-wow#index .home-agenda-time,
html.theme-light body.admin-wow#index .home-agenda-meta,
html.theme-light body.admin-wow#index .home-badge {
  color: #475569 !important;
}
html.theme-light body.admin-wow#index .home-agenda-time,
html.theme-light body.admin-wow#index .stat-number {
  color: #B08D57 !important;
}

/* Shared navigation: no dark dropdowns or low-contrast text in light mode. */
html.theme-light {
  --nav-bg: #F8FAFC;
  --nav-border: #E5E7EB;
  --nav-hover: #F1F5F9;
  --nav-active: #111827;
  --nav-text: #111827;
  --nav-muted: #475569;
}
html.theme-light body .nav-header {
  background: #F8FAFC !important;
  border-bottom-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}
html.theme-light body .nav-logo,
html.theme-light body .nav-link,
html.theme-light body .nav-user-btn,
html.theme-light body .nav-action-btn,
html.theme-light body .nav-mobile-btn {
  color: #334155 !important;
  background: transparent !important;
  border-color: #E5E7EB !important;
}
html.theme-light body .nav-logo:hover,
html.theme-light body .nav-link:hover,
html.theme-light body .nav-user-btn:hover,
html.theme-light body .nav-action-btn:hover,
html.theme-light body .nav-mobile-btn:hover {
  background: #F1F5F9 !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body .nav-link.active,
html.theme-light body .nav-dropdown.open > .nav-link {
  background: #F6F0E5 !important;
  color: #111827 !important;
  border-color: #D6C29A !important;
}

html.theme-light body.admin-wow .nav-header .nav-link.active,
html.theme-light body.admin-wow .nav-header .nav-dropdown.open > .nav-link {
  color: #111827 !important;
}

html.theme-light body .nav-link.active > *,
html.theme-light body .nav-dropdown.open > .nav-link > * {
  color: #111827 !important;
}
html.theme-light body .nav-dropdown-menu,
html.theme-light body .nav-user-dropdown,
html.theme-light body .quick-actions-menu,
html.theme-light body .context-menu {
  background: #FFFFFF !important;
  background-image: none !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}
html.theme-light body .nav-dropdown-section,
html.theme-light body .nav-user-info .role {
  color: #64748B !important;
}
html.theme-light body .nav-dropdown-section:not(:first-child),
html.theme-light body .nav-user-info {
  border-color: #E5E7EB !important;
}
html.theme-light body .nav-dropdown-item,
html.theme-light body .nav-user-dropdown-item,
html.theme-light body .quick-action-item,
html.theme-light body .context-menu-item {
  color: #334155 !important;
  background: transparent !important;
}
html.theme-light body .nav-dropdown-item:hover,
html.theme-light body .nav-dropdown-item.active,
html.theme-light body .nav-user-dropdown-item:hover,
html.theme-light body .quick-action-item:hover,
html.theme-light body .context-menu-item:hover {
  background: #F1F5F9 !important;
  color: #111827 !important;
}
html.theme-light body .nav-dropdown-item.active { color: #111827 !important; }
html.theme-light body .nav-user-info .name { color: #111827 !important; }
html.theme-light body .nav-dropdown-item .badge {
  background: #F6F0E5 !important;
  color: #111827 !important;
}
html.theme-light body .quick-actions-btn {
  background: #111827 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}
html.theme-light body .nav-link.dummy,
html.theme-light body .nav-dropdown-item.dummy,
html.theme-light body .nav-mobile-item.dummy { color: #94A3B8 !important; }
html.theme-light body .nav-mobile-drawer {
  background: #FFFFFF !important;
  border-color: #E5E7EB !important;
}
html.theme-light body .nav-mobile-section { color: #64748B !important; }
html.theme-light body .nav-mobile-section:not(:first-child) { border-color: #E5E7EB !important; }
html.theme-light body .nav-mobile-item { color: #334155 !important; }
html.theme-light body .nav-mobile-item:hover,
html.theme-light body .nav-mobile-item.active { background: #F6F0E5 !important; color: #111827 !important; }
html.theme-light body .context-menu-separator { background: #E5E7EB !important; }

html.theme-light body .accent,
html.theme-light body .badge,
html.theme-light body .chip,
html.theme-light body .tag,
html.theme-light body .status-chip {
  background: var(--theme-light-selected) !important;
  color: #111827 !important;
  border-color: #D6C29A !important;
}

html.theme-light body .timeline-item-card.selected,
html.theme-light body .resource-item.active,
html.theme-light body .planner-phase-chip.active {
  background: var(--theme-light-selected) !important;
  color: var(--theme-light-text) !important;
  border-color: var(--theme-light-accent) !important;
}
html.theme-light body .fc-col-header-cell,
html.theme-light body .fc-multimonth-month,
html.theme-light body .fc-multimonth-header {
  background: var(--theme-light-secondary) !important;
  color: var(--theme-light-text) !important;
  border-color: var(--theme-light-border) !important;
}
html.theme-light body .fc-daygrid-day-number,
html.theme-light body .fc-timegrid-slot-label-cushion,
html.theme-light body .fc-toolbar-title { color: var(--theme-light-text) !important; }
html.theme-light body .fc-timegrid-col.fc-day-today,
html.theme-light body .fc-daygrid-day.fc-day-today { background: #F8FAFC !important; }
html.theme-light body .fc-timegrid-now-indicator-line { border-color: var(--theme-light-primary) !important; }

html.theme-light body ::-webkit-scrollbar-track { background: #F1F5F9 !important; }
html.theme-light body ::-webkit-scrollbar-thumb { background: #CBD5E1 !important; border-color: #F1F5F9 !important; }
html.theme-light body ::-webkit-scrollbar-thumb:hover { background: #94A3B8 !important; }
html.theme-light body { scrollbar-color: #CBD5E1 #F1F5F9 !important; }

.portal-theme-choice-grid { display:flex; gap:10px; flex-wrap:wrap; }
.portal-theme-choice { min-width:150px; }
html.theme-light body .portal-theme-choice.is-active {
  background: var(--theme-light-selected) !important;
  color: #111827 !important;
  border-color: #D6C29A !important;
}

/* Legacy admin pages: replace page-owned dark surfaces only while light mode is active. */
html.theme-light body > header,
html.theme-light body > main,
html.theme-light body .page-header,
html.theme-light body .tasks-layout,
html.theme-light body .calendar-layout,
html.theme-light body .calendar-container,
html.theme-light body .calendar-wrapper,
html.theme-light body .sidebar,
html.theme-light body .card,
html.theme-light body .panel,
html.theme-light body .stats,
html.theme-light body .stats-grid,
html.theme-light body .stat,
html.theme-light body .stat-card,
html.theme-light body .filter-section,
html.theme-light body .filter-controls,
html.theme-light body .toolbar,
html.theme-light body .kanban-board,
html.theme-light body .kanban-column,
html.theme-light body .kanban-add,
html.theme-light body .board-archive,
html.theme-light body .brand-grid,
html.theme-light body .brand-card,
html.theme-light body .filter-bar,
html.theme-light body .workspace,
html.theme-light body .modal-content,
html.theme-light body .modal-card,
html.theme-light body .detail-block,
html.theme-light body .timeline-item,
html.theme-light body .document-item,
html.theme-light body .template-link,
html.theme-light body .fs-drop-card,
html.theme-light body .upload-zone,
html.theme-light body .asset-item,
html.theme-light body .usage-role-item {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}

html.theme-light body .page-title,
html.theme-light body .page-header h1,
html.theme-light body .section-title h2,
html.theme-light body .section-title h3,
html.theme-light body .brand-name,
html.theme-light body .empty-state-title,
html.theme-light body .task-title,
html.theme-light body .task-subtitle,
html.theme-light body .task-item,
html.theme-light body .kanban-column,
html.theme-light body .calendar-container,
html.theme-light body .calendar-container * {
  color: #111827 !important;
}

html.theme-light body .page-subtitle,
html.theme-light body .brand-description,
html.theme-light body .brand-meta,
html.theme-light body .brand-meta-item,
html.theme-light body .workspace-subtitle,
html.theme-light body .filter-section h4,
html.theme-light body .filter-section-title,
html.theme-light body .stat-label,
html.theme-light body .mut,
html.theme-light body .muted,
html.theme-light body .task-meta,
html.theme-light body .task-inline-note,
html.theme-light body .empty-state,
html.theme-light body .empty-state-text,
html.theme-light body .calendar-container .mut,
html.theme-light body .calendar-container small {
  color: #64748B !important;
}

html.theme-light body .filter-btn,
html.theme-light body .view-toggle,
html.theme-light body .view-toggle-row,
html.theme-light body .toggle-box,
html.theme-light body .pill,
html.theme-light body .kanban-count,
html.theme-light body .task-source,
html.theme-light body .task-color-btn,
html.theme-light body .task-color-option,
html.theme-light body .section-btn,
html.theme-light body .weekday-btn,
html.theme-light body .calendar-context-menu,
html.theme-light body .calendar-context-menu-item {
  background: #F8FAFC !important;
  background-image: none !important;
  color: #334155 !important;
  border-color: #E5E7EB !important;
}

html.theme-light body .filter-btn:hover,
html.theme-light body .filter-btn.active,
html.theme-light body .view-toggle:hover,
html.theme-light body .view-toggle.active,
html.theme-light body .section-btn:hover,
html.theme-light body .section-btn.active,
html.theme-light body .calendar-context-menu-item:hover {
  background: #F6F0E5 !important;
  color: #111827 !important;
  border-color: #D6C29A !important;
}

html.theme-light body .kanban-add,
html.theme-light body .board-archive,
html.theme-light body .task-item,
html.theme-light body .calendar-container .filter-section-content,
html.theme-light body .calendar-container .sidebar-section {
  background: #F8FAFC !important;
  border-color: #E5E7EB !important;
}

html.theme-light body .task-item,
html.theme-light body .task-item.completed,
html.theme-light body .task-item.priority-low,
html.theme-light body .task-item.priority-normal,
html.theme-light body .task-item.priority-high,
html.theme-light body .task-item.priority-urgent {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
}

html.theme-light body .task-priority,
html.theme-light body .task-deadline,
html.theme-light body .priority-low,
html.theme-light body .status-count {
  color: #475569 !important;
}

html.theme-light body .primary,
html.theme-light body button.primary,
html.theme-light body .toolbar .primary,
html.theme-light body .filter-bar button.primary {
  background: #111827 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  border-color: #111827 !important;
}
html.theme-light body .primary:hover,
html.theme-light body button.primary:hover,
html.theme-light body .toolbar .primary:hover,
html.theme-light body .filter-bar button.primary:hover {
  background: #374151 !important;
  color: #FFFFFF !important;
  border-color: #374151 !important;
}

html.theme-light body .stat-number,
html.theme-light body .stat .value,
html.theme-light body .calendar-container .count,
html.theme-light body .calendar-container .active {
  color: #B08D57 !important;
}

html.theme-light body .brand-status,
html.theme-light body .brand-version,
html.theme-light body .asset-chip,
html.theme-light body .badge,
html.theme-light body .chip,
html.theme-light body .tag {
  background: #F6F0E5 !important;
  color: #111827 !important;
  border-color: #D6C29A !important;
}

html.theme-light body .brand-card:hover,
html.theme-light body .task-item:hover,
html.theme-light body .filter-btn:hover {
  border-color: #D6C29A !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}

html.theme-light body .modal,
html.theme-light body .modal-backdrop,
html.theme-light body .overlay {
  background: rgba(15,23,42,.18) !important;
  background-image: none !important;
}

html.theme-light body .modal[data-modal-ux="shared-form"] {
  background: rgba(255,255,255,.38) !important;
  background-image: none !important;
  backdrop-filter: blur(14px) saturate(108%);
  -webkit-backdrop-filter: blur(14px) saturate(108%);
}

html.theme-light body .modal-content,
html.theme-light body .modal-card {
  color: #111827 !important;
}

/* Remove decorative blue/purple gradients from legacy light-mode surfaces. */
html.theme-light body .hero,
html.theme-light body .hero-panel,
html.theme-light body .hero-card,
html.theme-light body .page-header,
html.theme-light body .brand-card,
html.theme-light body .kanban-column,
html.theme-light body .board-archive,
html.theme-light body .calendar-container,
html.theme-light body .calendar-wrapper,
html.theme-light body .calendar-toolbar,
html.theme-light body .filter-section,
html.theme-light body .card,
html.theme-light body .panel {
  background-image: none !important;
}

html.theme-light body .page-head,
html.theme-light body .company-grid,
html.theme-light body .company-card,
html.theme-light body .search-card,
html.theme-light body .kv,
html.theme-light body .text-block,
html.theme-light body .agreement-section,
html.theme-light body .modal-dialog,
html.theme-light body .check,
html.theme-light body details.advanced,
html.theme-light body .signature-preview,
html.theme-light body .signature-item,
html.theme-light body .signature-list-empty,
html.theme-light body .company-chip,
html.theme-light body .empty-tip {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}

html.theme-light body .page-head h1,
html.theme-light body .company-card h3,
html.theme-light body .company-card strong,
html.theme-light body .kv .v,
html.theme-light body .text-block h4,
html.theme-light body .text-block p,
html.theme-light body .agreement-section h4,
html.theme-light body details.advanced summary,
html.theme-light body .signature-item strong {
  color: #111827 !important;
}

html.theme-light body .page-head p,
html.theme-light body .company-card .mut,
html.theme-light body .company-card .meta,
html.theme-light body .kv .k,
html.theme-light body .inline-note,
html.theme-light body .agreement-note,
html.theme-light body .company-chip,
html.theme-light body .empty-tip,
html.theme-light body .search-meta {
  color: #64748B !important;
}

html.theme-light body .company-card:hover,
html.theme-light body .company-card.active {
  background: #F8FAFC !important;
  border-color: #D6C29A !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}

html.theme-light body .company-card,
html.theme-light body .company-card.success,
html.theme-light body .company-card.warn,
html.theme-light body .company-card.danger,
html.theme-light body .company-card.muted {
  border-left-color: #D6C29A !important;
}

html.theme-light body .stat-card,
html.theme-light body .stat-card.success,
html.theme-light body .stat-card.warn,
html.theme-light body .stat-card::before,
html.theme-light body .stat-card.success::before,
html.theme-light body .stat-card.warn::before {
  background: #FFFFFF !important;
  background-image: none !important;
  border-color: #E5E7EB !important;
}
html.theme-light body .stat-card::before,
html.theme-light body .stat-card.success::before,
html.theme-light body .stat-card.warn::before {
  background: #D6C29A !important;
}

html.theme-light body .badge-status-draft,
html.theme-light body .badge-status-legal_review,
html.theme-light body .badge-status-management_approval,
html.theme-light body .badge-status-active,
html.theme-light body .badge-status-on_hold,
html.theme-light body .badge-status-completed,
html.theme-light body .badge-status-cancelled,
html.theme-light body .badge-type,
html.theme-light body .badge-doc,
html.theme-light body .badge-ok,
html.theme-light body .badge-warn,
html.theme-light body .company-chip.total,
html.theme-light body .company-chip.active,
html.theme-light body .company-chip.review,
html.theme-light body .company-chip.due {
  background: #F6F0E5 !important;
  color: #475569 !important;
  border-color: #D6C29A !important;
}

/* Strict light-mode normalization for legacy Finance, Email, Travel, Tools and System pages. */
html.theme-light body * {
  background-image: none !important;
  border-color: #E5E7EB !important;
  color: #111827 !important;
}

html.theme-light body :is(
  [class*="card"], [class*="panel"], [class*="container"], [class*="wrapper"],
  [class*="wrap"], [class*="toolbar"], [class*="section"], [class*="grid"],
  [class*="table"], [class*="list"], [class*="box"], [class*="content"],
  [class*="workspace"], [class*="drawer"], [class*="details"], [class*="summary"],
  [class*="filter"], [class*="form"], [class*="editor"], [class*="preview"],
  [class*="search"], [class*="stats"], [class*="stat"]
):not(.nav-header):not(.nav-dropdown-menu):not(.nav-user-dropdown):not(.status-badge):not(.status-pill):not(.ledger-status):not(.accounting-highlight):not(.signal-chip):not(.vat-rate-pill):not(.filter-btn):not(.section-btn) {
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}

html.theme-light body :is(
  [class*="card"] *, [class*="panel"] *, [class*="container"] *,
  [class*="wrapper"] *, [class*="wrap"] *, [class*="toolbar"] *,
  [class*="section"] *, [class*="grid"] *, [class*="table"] *,
  [class*="list"] *, [class*="box"] *, [class*="content"] *,
  [class*="workspace"] *, [class*="drawer"] *, [class*="details"] *,
  [class*="summary"] *, [class*="filter"] *, [class*="form"] *,
  [class*="editor"] *, [class*="preview"] *, [class*="search"] *,
  [class*="stats"] *, [class*="stat"] *
) {
  color: #111827 !important;
}

html.theme-light body :is(
  [class*="muted"], [class*="meta"], [class*="hint"], [class*="subtitle"],
  [class*="description"], [class*="help"], [class*="label"], [class*="note"],
  [class*="caption"], [class*="secondary-text"]
) {
  color: #64748B !important;
}

html.theme-light body :is(
  [class*="active"], [class*="selected"], [aria-selected="true"], [aria-current="page"]
) {
  background-color: #F6F0E5 !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #D6C29A !important;
}

html.theme-light body :is(
  [class*="primary"], [class*="submit"], [class*="save"], [class*="create"],
  [class*="add"]
):is(button, a, input[type="submit"], input[type="button"], .btn) {
  background: #111827 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  border-color: #111827 !important;
}

html.theme-light body :is(
  [class*="primary"], [class*="submit"], [class*="save"], [class*="create"],
  [class*="add"]
):is(button, a, input[type="submit"], input[type="button"], .btn):hover {
  background: #374151 !important;
  color: #FFFFFF !important;
  border-color: #374151 !important;
}

html.theme-light body :is(
  .finance-card, .finance-panel, .accounting-panel, .accounting-kpi,
  .accounting-summary-card, .balance-detail-panel, .balance-detail-item,
  .chart-card, .chart-variant-card, .chart-canvas-wrap, .kpi,
  .period-item, .checkpoint-item, .report-table, .report-table-wrap,
  .ledger-card, .booking-card, .booking-row, .invoice-card, .vat-card,
  .profit-loss-card, .email-card, .email-panel, .mail-card, .mail-panel,
  .credential-card, .credential-panel, .travel-card, .trip-card,
  .trip-route, .trip-stat, .expense-card, .expense-panel,
  .monitor-card, .chart-container, .webhook-card, .endpoint-card,
  .hardware-card, .binding-card, .trigger-card, .system-card, .tool-card
) {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}

html.theme-light body :is(
  .finance-hero, .finance-hero-link, .accounting-pill, .trend-legend-pill,
  .chart-legend-pill, .route-map-shell, .metric, .smart-callout,
  .gps-quick-info, .mobile-live-hero, .metric-card, .travel-topbar,
  .toast, .live-indicator, .filters, .session-item, .endpoint-status,
  .details-row, .tab.active
) {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}

html.theme-light body :is(.accounting-pill, .trend-legend-pill, .chart-legend-pill) {
  background: #F6F0E5 !important;
  color: #475569 !important;
  border-color: #D6C29A !important;
}

html.theme-light body :is(.route-map-shell, .metric, .smart-callout, .metric-card) * {
  color: #111827 !important;
}

html.theme-light body .finance-hero-link:hover,
html.theme-light body .accounting-pill:hover,
html.theme-light body .trend-legend-pill:hover {
  background: #F1F5F9 !important;
  color: #111827 !important;
}

html.theme-light body .trend-legend-pill::before,
html.theme-light body .chart-legend-pill::before,
html.theme-light body .accounting-summary-card::before {
  background: #B08D57 !important;
  background-image: none !important;
}

html.theme-light body :is(h3, h4)::before {
  background: #B08D57 !important;
  background-image: none !important;
}

html.theme-light body :is(.status, .badge, .status-pill, .status-box, .success, .online, .toast-success) {
  background: #ECFDF5 !important;
  color: #166534 !important;
  border-color: #BBF7D0 !important;
}
html.theme-light body :is(.warning, .warn, .pending, .review, .toast-warning) {
  background: #FFFBEB !important;
  color: #92400E !important;
  border-color: #FDE68A !important;
}
html.theme-light body :is(.error, .danger, .critical, .toast-error) {
  background: #FEF2F2 !important;
  color: #991B1B !important;
  border-color: #FECACA !important;
}
html.theme-light body :is(button, a).danger,
html.theme-light body button.error {
  background: #991B1B !important;
  color: #FFFFFF !important;
  border-color: #991B1B !important;
}

html.theme-light body .redirect-notice,
html.theme-light body .receipt-preview-shell,
html.theme-light body .receipt-side-card,
html.theme-light body .receipt-preview-empty,
html.theme-light body .note-card,
html.theme-light body .upload-item,
html.theme-light body [style*="background:#0e1330"],
html.theme-light body [style*="background: #0e1330"],
html.theme-light body [style*="background:#151a2c"],
html.theme-light body [style*="background: #151a2c"],
html.theme-light body [style*="background:#0f1730"],
html.theme-light body [style*="background: #0f1730"] {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}

html.theme-light body .redirect-notice p,
html.theme-light body .redirect-notice small,
html.theme-light body .receipt-preview-badge,
html.theme-light body .receipt-side-head,
html.theme-light body .receipt-side-actions,
html.theme-light body .receipt-preview-shell * {
  color: #64748B !important;
}

html.theme-light body :is(
  .finance-card *, .finance-panel *, .accounting-panel *, .accounting-kpi *,
  .accounting-summary-card *, .balance-detail-panel *, .balance-detail-item *,
  .chart-card *, .chart-variant-card *, .chart-canvas-wrap *, .kpi *,
  .period-item *, .checkpoint-item *, .report-table *, .ledger-card *,
  .booking-card *, .booking-row *, .invoice-card *, .vat-card *,
  .profit-loss-card *, .email-card *, .email-panel *, .mail-card *,
  .mail-panel *, .credential-card *, .credential-panel *, .travel-card *,
  .trip-card *, .trip-route *, .trip-stat *, .expense-card *, .expense-panel *,
  .monitor-card *, .chart-container *, .webhook-card *, .endpoint-card *,
  .hardware-card *, .binding-card *, .trigger-card *, .system-card *, .tool-card *
) {
  color: #111827 !important;
}

html.theme-light body :is(
  .trend-canvas-wrap, .chart-canvas-wrap, .map-container, .map-wrapper,
  .editor-preview, .code-preview, .terminal, pre, code
) {
  background: #F8FAFC !important;
  color: #334155 !important;
  border-color: #E5E7EB !important;
}

html.theme-light body :is(
  table, thead, tbody, tr, th, td, [role="table"], [role="row"], [role="cell"]
) {
  background-color: #FFFFFF !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body :is(th, [role="columnheader"]) {
  background-color: #F8FAFC !important;
  color: #475569 !important;
}
html.theme-light body :is(tr:hover, [role="row"]:hover) {
  background-color: #F1F5F9 !important;
}

html.theme-light body #breadcrumbs {
  background: #F8FAFC !important;
  color: #64748B !important;
  border-color: #E5E7EB !important;
  box-shadow: none !important;
}
html.theme-light body #breadcrumbs .breadcrumb-current,
html.theme-light body #breadcrumbs .breadcrumb-separator,
html.theme-light body #breadcrumbs .breadcrumb-link {
  color: #475569 !important;
}

html.theme-light body .calendar-container .filter-section,
html.theme-light body .calendar-container .filter-section-header,
html.theme-light body .calendar-container .filter-section-content,
html.theme-light body .calendar-container .filter-item,
html.theme-light body .calendar-container .filter-btn,
html.theme-light body .calendar-container .section-btn,
html.theme-light body .calendar-container .count,
html.theme-light body .calendar-container .view-toggle,
html.theme-light body .calendar-container .view-toggle button,
html.theme-light body .calendar-container .person-badge,
html.theme-light body .calendar-container .multi-person-select,
html.theme-light body .calendar-container .weekday-btn span {
  background: #F8FAFC !important;
  background-image: none !important;
  color: #334155 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body .calendar-container .filter-section-title,
html.theme-light body .calendar-container .filter-section-toggle,
html.theme-light body .calendar-container .filter-item .name,
html.theme-light body .calendar-container .filter-item .count,
html.theme-light body .calendar-container .filter-btn,
html.theme-light body .calendar-container .section-btn,
html.theme-light body .calendar-container .fc-toolbar-title,
html.theme-light body .calendar-container .fc-col-header-cell-cushion,
html.theme-light body .calendar-container .fc-timegrid-slot-label-cushion {
  color: #475569 !important;
}
html.theme-light body .calendar-container .filter-item.active,
html.theme-light body .calendar-container .filter-item.solo,
html.theme-light body .calendar-container .filter-btn.solo-active,
html.theme-light body .calendar-container .view-toggle button.active,
html.theme-light body .calendar-container .weekday-btn input:checked + span {
  background: #F6F0E5 !important;
  color: #111827 !important;
  border-color: #D6C29A !important;
}
html.theme-light body .calendar-container .fc,
html.theme-light body .calendar-container .fc-list,
html.theme-light body .calendar-container .fc-list-table,
html.theme-light body .calendar-container .fc-list-event,
html.theme-light body .calendar-container .fc-list-empty,
html.theme-light body .calendar-container .fc-col-header-cell,
html.theme-light body .calendar-container .fc-list-day-cushion {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body .calendar-container .fc-theme-standard td,
html.theme-light body .calendar-container .fc-theme-standard th,
html.theme-light body .calendar-container .fc-theme-standard .fc-scrollgrid,
html.theme-light body .calendar-container .fc-timegrid-slot,
html.theme-light body .calendar-container .fc-timegrid-col,
html.theme-light body .calendar-container .fc-timegrid-slot-lane {
  border-color: #E5E7EB !important;
}

html.theme-light body .calendar-container .fc-event,
html.theme-light body .calendar-container .event-task,
html.theme-light body .calendar-container .event-appointment,
html.theme-light body .calendar-container .event-project,
html.theme-light body .calendar-container .event-event_link,
html.theme-light body .calendar-container .event-meeting,
html.theme-light body .calendar-container .event-deadline,
html.theme-light body .calendar-container .event-reminder {
  background: #F8FAFC !important;
  background-image: none !important;
  color: #111827 !important;
  border: 1px solid #D6C29A !important;
  border-left: 3px solid #B08D57 !important;
  box-shadow: none !important;
}
html.theme-light body .calendar-container .fc-event * {
  color: #111827 !important;
}

/* Theme switches belong in profile settings, not in every work surface. */
html body .page-theme-toggle,
html body .local-theme-toggle { display: none !important; }

/* Finance status colors: semantic accents add clarity without dark containers. */
html.theme-light body .status-paid.status-paid,
html.theme-light body .payment-paid,
html.theme-light body .status-approved.status-approved,
html.theme-light body .status-reimbursed.status-reimbursed,
html.theme-light body .status-pill.matched.matched,
html.theme-light body .status-pill.checked.checked,
html.theme-light body .ledger-status.matched.matched,
html.theme-light body .signal-chip.good,
html.theme-light body .signal-chip.filed {
  background: #DCFCE7 !important;
  background-image: none !important;
  color: #166534 !important;
  border-color: #86EFAC !important;
}

html.theme-light body .payment-unpaid,
html.theme-light body .payment-partial,
html.theme-light body .status-planned.status-planned,
html.theme-light body .status-pending.status-pending,
html.theme-light body .status-review.status-review,
html.theme-light body .status-pill.review.review,
html.theme-light body .ledger-status.review.review,
html.theme-light body .accounting-highlight.review.review,
html.theme-light body .signal-chip.warn,
html.theme-light body .vat-rate-pill.mixed {
  background: #FEF3C7 !important;
  background-image: none !important;
  color: #92400E !important;
  border-color: #FCD34D !important;
}

html.theme-light body .status-overdue.status-overdue,
html.theme-light body .status-rejected.status-rejected,
html.theme-light body .payment-refunded,
html.theme-light body .status-review.status-review.needs-review,
html.theme-light body .needs-review,
html.theme-light body .status-pill.unmatched.unmatched,
html.theme-light body .ledger-status.unmatched.unmatched,
html.theme-light body .accounting-highlight.unmatched.unmatched,
html.theme-light body .accounting-highlight.overdue.overdue {
  background: #FEE2E2 !important;
  background-image: none !important;
  color: #991B1B !important;
  border-color: #FCA5A5 !important;
}

html.theme-light body .status-draft.status-draft,
html.theme-light body .status-sent.status-sent,
html.theme-light body .vat-rate-pill.zero,
html.theme-light body .vat-rate-pill.unknown,
html.theme-light body .signal-chip.neutral,
html.theme-light body .accounting-highlight.unchecked {
  background: #F1F5F9 !important;
  background-image: none !important;
  color: #475569 !important;
  border-color: #CBD5E1 !important;
}

/* Keep finance summary cards calm while making their meaning visible at a glance. */
html.theme-light body .finance-page .stat-card.paid,
html.theme-light body .finance-page .stat-card.approved,
html.theme-light body .finance-page .stat-card.success,
html.theme-light body .finance-page [class*="stat"].paid,
html.theme-light body .finance-page [class*="stat"].approved {
  background: #F0FDF4 !important;
  border-left: 3px solid #22C55E !important;
}
html.theme-light body .finance-page .stat-card.overdue,
html.theme-light body .finance-page .stat-card.danger,
html.theme-light body .finance-page .stat-card.error,
html.theme-light body .finance-page [class*="stat"].overdue {
  background: #FFF7F7 !important;
  border-left: 3px solid #EF4444 !important;
}
html.theme-light body .finance-page .stat-card.pending,
html.theme-light body .finance-page .stat-card.warning,
html.theme-light body .finance-page [class*="stat"].pending,
html.theme-light body .finance-page [class*="stat"].warning {
  background: #FFFBEB !important;
  border-left: 3px solid #F59E0B !important;
}

html.theme-light body .vat-rate-pill.low {
  background: #F0FDF4 !important;
  color: #166534 !important;
  border-color: #86EFAC !important;
}

/* Agenda: readable filter counts and calm color-coded event fields. */
html.theme-light body .calendar-container .filter-item,
html.theme-light body .calendar-container .filter-item .name,
html.theme-light body .calendar-container .filter-item .icon,
html.theme-light body .calendar-container .filter-item .count,
html.theme-light body .calendar-container .filter-section-title,
html.theme-light body .calendar-container .filter-section-toggle,
html.theme-light body .calendar-container .filter-btn,
html.theme-light body .calendar-container .view-toggle button,
html.theme-light body .calendar-container .weekday-btn span {
  color: #334155 !important;
}

html.theme-light body .calendar-container .filter-item .count,
html.theme-light body .calendar-container .count {
  background: #111827 !important;
  color: #FFFFFF !important;
  border: 1px solid #111827 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

html.theme-light body .calendar-container span.count.count {
  background-color: #111827 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  text-shadow: none !important;
  border-color: #111827 !important;
}

html.theme-light body .calendar-container .filter-item > span.count,
html.theme-light body .calendar-container .filter-item > span.count * {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

html.theme-light body .calendar-container .filter-controls .filter-btn,
html.theme-light body .calendar-container .section-controls .section-btn {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #334155 !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}

html.theme-light body .calendar-container .filter-controls .filter-btn:hover,
html.theme-light body .calendar-container .section-controls .section-btn:hover {
  background: #F6F0E5 !important;
  color: #111827 !important;
  border-color: #B08D57 !important;
}

html.theme-light body .calendar-container .filter-controls .filter-btn.solo-active {
  background-color: #F6F0E5 !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #B08D57 !important;
}

html.theme-light body .calendar-container .filter-controls .filter-btn.mute-active {
  background-color: #FEE2E2 !important;
  background-image: none !important;
  color: #991B1B !important;
  border-color: #FCA5A5 !important;
}

html.theme-light body .calendar-container .filter-item.active,
html.theme-light body .calendar-container .filter-item.solo,
html.theme-light body .calendar-container .filter-btn.solo-active {
  background: #F6F0E5 !important;
  color: #111827 !important;
  border-color: #D6C29A !important;
}

html.theme-light body .calendar-container .filter-item.active .name,
html.theme-light body .calendar-container .filter-item.solo .name,
html.theme-light body .calendar-container .filter-item.active .count,
html.theme-light body .calendar-container .filter-item.solo .count {
  color: #111827 !important;
}

html.theme-light body .calendar-container .fc-event,
html.theme-light body .calendar-container .event-task,
html.theme-light body .calendar-container .event-appointment,
html.theme-light body .calendar-container .event-project,
html.theme-light body .calendar-container .event-event_link,
html.theme-light body .calendar-container .event-meeting,
html.theme-light body .calendar-container .event-deadline,
html.theme-light body .calendar-container .event-reminder {
  background-image: none !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
  font-weight: 600 !important;
}

html.theme-light body .calendar-container .fc-event {
  background: #E2E8F0 !important;
  background-image: none !important;
  color: #1F2937 !important;
  border-color: #94A3B8 !important;
}

html.theme-light body .calendar-container .event-task {
  background: #E0F2FE !important;
  color: #0C4A6E !important;
  border-color: #7DD3FC !important;
}
html.theme-light body .calendar-container .event-appointment {
  background: #FEF3C7 !important;
  color: #78350F !important;
  border-color: #FCD34D !important;
}
html.theme-light body .calendar-container .event-project {
  background: #EDE9FE !important;
  color: #4C1D95 !important;
  border-color: #C4B5FD !important;
}
html.theme-light body .calendar-container .event-event_link {
  background: #FCE7F3 !important;
  color: #831843 !important;
  border-color: #F9A8D4 !important;
}
html.theme-light body .calendar-container .event-meeting {
  background: #DCFCE7 !important;
  color: #14532D !important;
  border-color: #86EFAC !important;
}
html.theme-light body .calendar-container .event-deadline {
  background: #FEE2E2 !important;
  color: #7F1D1D !important;
  border-color: #FCA5A5 !important;
}
html.theme-light body .calendar-container .event-reminder {
  background: #F3E8FF !important;
  color: #581C87 !important;
  border-color: #D8B4FE !important;
}

html.theme-light body .calendar-container .fc-event * {
  color: inherit !important;
  text-shadow: none !important;
}

/* Bank statements: a high-contrast light ledger surface, scoped to light mode. */
html.theme-light body.bank-page {
  --bank-light-page: #eef3f8;
  --bank-light-card: #ffffff;
  --bank-light-card-soft: #f8fafc;
  --bank-light-ink: #172033;
  --bank-light-muted: #526175;
  --bank-light-border: #cbd5e1;
  --bank-light-navy: #1e3a5f;
  background:
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, .11), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, var(--bank-light-page) 100%) !important;
  color: var(--bank-light-ink) !important;
}

html.theme-light body.bank-page header {
  background: linear-gradient(135deg, #ffffff 0%, #f3f7fb 100%) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 16px 34px rgba(30, 58, 95, .10) !important;
}

html.theme-light body.bank-page header h1 {
  background: linear-gradient(110deg, #172033 0%, #1e3a5f 58%, #2563eb 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  text-shadow: none !important;
}

html.theme-light body.bank-page .card,
html.theme-light body.bank-page .modal-card,
html.theme-light body.bank-page #matchingModal > div > div,
html.theme-light body.bank-page #manualLinkModal > div > div {
  background: var(--bank-light-card) !important;
  background-image: none !important;
  border: 1px solid var(--bank-light-border) !important;
  box-shadow: 0 14px 32px rgba(30, 58, 95, .09), 0 2px 6px rgba(15, 23, 42, .04) !important;
  color: var(--bank-light-ink) !important;
}

html.theme-light body.bank-page h2,
html.theme-light body.bank-page h3,
html.theme-light body.bank-page strong,
html.theme-light body.bank-page .counterparty,
html.theme-light body.bank-page .statement-counterparty {
  color: var(--bank-light-ink) !important;
}

html.theme-light body.bank-page .mut,
html.theme-light body.bank-page .stat-label,
html.theme-light body.bank-page .statement-date,
html.theme-light body.bank-page .statement-description,
html.theme-light body.bank-page .statement-balance,
html.theme-light body.bank-page .reference,
html.theme-light body.bank-page .loading,
html.theme-light body.bank-page .empty {
  color: var(--bank-light-muted) !important;
}

html.theme-light body.bank-page .stat-card {
  background: linear-gradient(145deg, #ffffff 0%, #f5f8fc 100%) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 8px 20px rgba(30, 58, 95, .07) !important;
}

html.theme-light body.bank-page .stat-card:nth-child(1) {
  background: linear-gradient(145deg, #eef6ff 0%, #ffffff 100%) !important;
  border-color: #93c5fd !important;
}

html.theme-light body.bank-page .stat-card:nth-child(2) {
  background: linear-gradient(145deg, #ecfdf5 0%, #ffffff 100%) !important;
  border-color: #86efac !important;
}

html.theme-light body.bank-page .stat-card:nth-child(3) {
  background: linear-gradient(145deg, #fff7ed 0%, #ffffff 100%) !important;
  border-color: #fdba74 !important;
}

html.theme-light body.bank-page .stat-card:nth-child(4) {
  background: linear-gradient(145deg, #f5f3ff 0%, #ffffff 100%) !important;
  border-color: #c4b5fd !important;
}

html.theme-light body.bank-page .stat-value,
html.theme-light body.bank-page .statement-date-day {
  color: #172033 !important;
}

html.theme-light body.bank-page .amount-positive { color: #047857 !important; }
html.theme-light body.bank-page .amount-negative { color: #c2410c !important; }
html.theme-light body.bank-page .amount-neutral { color: #475569 !important; }

html.theme-light body.bank-page input,
html.theme-light body.bank-page select,
html.theme-light body.bank-page textarea,
html.theme-light body.bank-page .search-bar input {
  background: #ffffff !important;
  color: #172033 !important;
  border: 1px solid #94a3b8 !important;
  box-shadow: 0 2px 7px rgba(30, 58, 95, .05) !important;
}

html.theme-light body.bank-page input::placeholder { color: #64748b !important; }
html.theme-light body.bank-page input:focus,
html.theme-light body.bank-page select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16) !important;
}

html.theme-light body.bank-page .bank-selector {
  padding: 4px;
  background: #e8eef5;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
}

html.theme-light body.bank-page .bank-btn,
html.theme-light body.bank-page .view-toggle button {
  background: #ffffff !important;
  color: #334155 !important;
  border-color: #b8c4d3 !important;
  box-shadow: 0 2px 5px rgba(30, 58, 95, .06) !important;
}

html.theme-light body.bank-page .bank-btn:hover,
html.theme-light body.bank-page .view-toggle button:hover {
  background: #eff6ff !important;
  border-color: #60a5fa !important;
}

html.theme-light body.bank-page .bank-btn.active,
html.theme-light body.bank-page .view-toggle button.active {
  background: #1e3a5f !important;
  color: #ffffff !important;
  border-color: #1e3a5f !important;
  box-shadow: 0 6px 14px rgba(30, 58, 95, .22) !important;
}

html.theme-light body.bank-page .bank-btn.archived::after { color: #64748b !important; }

html.theme-light body.bank-page .status-executed { background: #dcfce7 !important; color: #166534 !important; border: 1px solid #86efac !important; }
html.theme-light body.bank-page .status-pending { background: #fef3c7 !important; color: #92400e !important; border: 1px solid #fcd34d !important; }
html.theme-light body.bank-page .status-cancelled { background: #fee2e2 !important; color: #991b1b !important; border: 1px solid #fca5a5 !important; }
html.theme-light body.bank-page .matched-badge { background: #dbeafe !important; color: #1d4ed8 !important; border: 1px solid #93c5fd !important; }

html.theme-light body.bank-page .statement-list {
  background: #dbe4ef !important;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  overflow: hidden;
  gap: 1px;
}

html.theme-light body.bank-page .statement-item {
  background: #ffffff !important;
  color: var(--bank-light-ink) !important;
  border-left-width: 5px !important;
  border-bottom: 1px solid #e2e8f0;
}

html.theme-light body.bank-page .statement-item.income { background: #f7fffb !important; border-left-color: #10b981 !important; }
html.theme-light body.bank-page .statement-item.expense { background: #fffaf7 !important; border-left-color: #f97316 !important; }
html.theme-light body.bank-page .statement-item:hover { background: #eff6ff !important; border-left-color: #2563eb !important; }
html.theme-light body.bank-page .statement-date-day,
html.theme-light body.bank-page .statement-counterparty { color: #172033 !important; }
html.theme-light body.bank-page .statement-description { color: #475569 !important; }
html.theme-light body.bank-page .statement-account { color: #64748b !important; }

html.theme-light body.bank-page table { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 12px; overflow: hidden; }
html.theme-light body.bank-page th { background: #1e3a5f !important; color: #ffffff !important; border-color: #1e3a5f !important; }
html.theme-light body.bank-page td { background: #ffffff !important; color: #334155 !important; border-color: #e2e8f0 !important; }
html.theme-light body.bank-page tbody tr:nth-child(even) td { background: #f8fafc !important; }
html.theme-light body.bank-page tbody tr:hover td { background: #eff6ff !important; }

html.theme-light body.bank-page .manual-item {
  background: #f8fafc !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 7px rgba(30, 58, 95, .05) !important;
}

html.theme-light body.bank-page .mt940-import-summary {
  background: #eff6ff !important;
  color: #1e3a5f !important;
  border-color: #93c5fd !important;
}
html.theme-light body.bank-page .mt940-import-summary.empty { background: #f8fafc !important; color: #64748b !important; }
html.theme-light body.bank-page .mt940-import-summary strong { color: #172033 !important; }

html.theme-light body.bank-page #matchingModal,
html.theme-light body.bank-page #manualLinkModal {
  background: rgba(15, 23, 42, .34) !important;
  backdrop-filter: blur(8px);
}

@media (max-width: 760px) {
  html.theme-light body.bank-page .statement-item { grid-template-columns: 58px 1fr; gap: 10px; }
  html.theme-light body.bank-page .statement-amount-col { grid-column: 2; align-items: flex-start; }
  html.theme-light body.bank-page .manual-item { grid-template-columns: 1fr; }
  html.theme-light body.bank-page .mt940-import-grid { grid-template-columns: 1fr; }
}
html.theme-light body .calendar-container .fc-event-time,
html.theme-light body .calendar-container .fc-event-title,
html.theme-light body .calendar-container .fc-timegrid-slot-label-cushion,
html.theme-light body .calendar-container .fc-col-header-cell-cushion,
html.theme-light body .calendar-container .fc-toolbar-title {
  color: #334155 !important;
  opacity: 1 !important;
}

html.theme-light body .calendar-container .fc .fc-button,
html.theme-light body .calendar-container .fc .fc-prev-button,
html.theme-light body .calendar-container .fc .fc-next-button,
html.theme-light body .calendar-container .fc .fc-today-button {
  color: #FFFFFF !important;
  background: #111827 !important;
  background-image: none !important;
  border-color: #111827 !important;
  --fc-button-text-color: #FFFFFF !important;
}

html.theme-light body .calendar-container .fc .fc-button .fc-icon,
html.theme-light body .calendar-container .fc .fc-prev-button .fc-icon,
html.theme-light body .calendar-container .fc .fc-next-button .fc-icon {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

html.theme-light body .calendar-container .fc .fc-button:hover,
html.theme-light body .calendar-container .fc .fc-button:focus {
  color: #FFFFFF !important;
  background: #374151 !important;
  border-color: #374151 !important;
}

/* Final bank light-mode overrides: keep these after the generic light theme. */
html.theme-light body.bank-page {
  background: radial-gradient(circle at 8% 0%, rgba(59,130,246,.11), transparent 30%), linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%) !important;
  color: #172033 !important;
}
html.theme-light body.bank-page header,
html.theme-light body.bank-page .card,
html.theme-light body.bank-page .modal-card,
html.theme-light body.bank-page #matchingModal > div > div,
html.theme-light body.bank-page #manualLinkModal > div > div {
  background: #ffffff !important;
  background-image: none !important;
  border-color: #cbd5e1 !important;
  color: #172033 !important;
  box-shadow: 0 14px 32px rgba(30,58,95,.09), 0 2px 6px rgba(15,23,42,.04) !important;
}
html.theme-light body.bank-page header { background: linear-gradient(135deg, #ffffff, #f3f7fb) !important; }
html.theme-light body.bank-page header h1 { background: linear-gradient(110deg, #172033, #1e3a5f 58%, #2563eb) !important; -webkit-background-clip: text !important; background-clip: text !important; text-shadow: none !important; }
html.theme-light body.bank-page h2,
html.theme-light body.bank-page h3,
html.theme-light body.bank-page strong,
html.theme-light body.bank-page .counterparty,
html.theme-light body.bank-page .statement-counterparty,
html.theme-light body.bank-page .stat-value { color: #172033 !important; }
html.theme-light body.bank-page .mut,
html.theme-light body.bank-page .stat-label,
html.theme-light body.bank-page .statement-date,
html.theme-light body.bank-page .statement-description,
html.theme-light body.bank-page .statement-account,
html.theme-light body.bank-page .statement-balance,
html.theme-light body.bank-page .reference,
html.theme-light body.bank-page .loading,
html.theme-light body.bank-page .empty { color: #526175 !important; }
html.theme-light body.bank-page .stat-card { background: linear-gradient(145deg, #ffffff, #f5f8fc) !important; border-color: #cbd5e1 !important; box-shadow: 0 8px 20px rgba(30,58,95,.07) !important; }
html.theme-light body.bank-page .stat-card:nth-child(1) { background: linear-gradient(145deg, #eef6ff, #ffffff) !important; border-color: #93c5fd !important; }
html.theme-light body.bank-page .stat-card:nth-child(2) { background: linear-gradient(145deg, #ecfdf5, #ffffff) !important; border-color: #86efac !important; }
html.theme-light body.bank-page .stat-card:nth-child(3) { background: linear-gradient(145deg, #fff7ed, #ffffff) !important; border-color: #fdba74 !important; }
html.theme-light body.bank-page .stat-card:nth-child(4) { background: linear-gradient(145deg, #f5f3ff, #ffffff) !important; border-color: #c4b5fd !important; }
html.theme-light body.bank-page .amount-positive { color: #047857 !important; }
html.theme-light body.bank-page .amount-negative { color: #c2410c !important; }
html.theme-light body.bank-page .amount-neutral { color: #475569 !important; }
html.theme-light body.bank-page input,
html.theme-light body.bank-page select,
html.theme-light body.bank-page textarea,
html.theme-light body.bank-page .search-bar input { background: #ffffff !important; color: #172033 !important; border-color: #94a3b8 !important; box-shadow: 0 2px 7px rgba(30,58,95,.05) !important; }
html.theme-light body.bank-page input::placeholder { color: #64748b !important; }
html.theme-light body.bank-page .bank-selector { background: #e8eef5 !important; border: 1px solid #cbd5e1 !important; border-radius: 14px; padding: 4px; }
html.theme-light body.bank-page .bank-btn,
html.theme-light body.bank-page .view-toggle button { background: #ffffff !important; color: #334155 !important; border-color: #b8c4d3 !important; box-shadow: 0 2px 5px rgba(30,58,95,.06) !important; }
html.theme-light body.bank-page .bank-btn.active,
html.theme-light body.bank-page .view-toggle button.active { background: #1e3a5f !important; color: #ffffff !important; border-color: #1e3a5f !important; }
html.theme-light body.bank-page .status-executed { background: #dcfce7 !important; color: #166534 !important; border: 1px solid #86efac !important; }
html.theme-light body.bank-page .status-pending { background: #fef3c7 !important; color: #92400e !important; border: 1px solid #fcd34d !important; }
html.theme-light body.bank-page .status-cancelled { background: #fee2e2 !important; color: #991b1b !important; border: 1px solid #fca5a5 !important; }
html.theme-light body.bank-page .matched-badge { background: #dbeafe !important; color: #1d4ed8 !important; border: 1px solid #93c5fd !important; }
html.theme-light body.bank-page .statement-list { background: #dbe4ef !important; border: 1px solid #cbd5e1 !important; border-radius: 14px; overflow: hidden; gap: 1px; }
html.theme-light body.bank-page .statement-item { background: #ffffff !important; color: #172033 !important; border-left-width: 5px !important; border-bottom: 1px solid #e2e8f0 !important; }
html.theme-light body.bank-page .statement-item.income { background: #f7fffb !important; border-left-color: #10b981 !important; }
html.theme-light body.bank-page .statement-item.expense { background: #fffaf7 !important; border-left-color: #f97316 !important; }
html.theme-light body.bank-page .statement-item:hover { background: #eff6ff !important; border-left-color: #2563eb !important; }
html.theme-light body.bank-page table { background: #ffffff !important; border: 1px solid #cbd5e1 !important; }
html.theme-light body.bank-page th { background: #1e3a5f !important; color: #ffffff !important; border-color: #1e3a5f !important; }
html.theme-light body.bank-page td { background: #ffffff !important; color: #334155 !important; border-color: #e2e8f0 !important; }
html.theme-light body.bank-page tbody tr:nth-child(even) td { background: #f8fafc !important; }
html.theme-light body.bank-page tbody tr:hover td { background: #eff6ff !important; }
html.theme-light body.bank-page .manual-item { background: #f8fafc !important; color: #334155 !important; border-color: #cbd5e1 !important; box-shadow: 0 2px 7px rgba(30,58,95,.05) !important; }
html.theme-light body.bank-page .mt940-import-summary { background: #eff6ff !important; color: #1e3a5f !important; border-color: #93c5fd !important; }
html.theme-light body.bank-page .mt940-import-summary.empty { background: #f8fafc !important; color: #64748b !important; }
html.theme-light body.bank-page #matchingModal,
html.theme-light body.bank-page #manualLinkModal { background: rgba(15,23,42,.34) !important; backdrop-filter: blur(8px); }

@media (max-width: 760px) {
  html.theme-light body.bank-page .statement-item { grid-template-columns: 58px 1fr !important; gap: 10px; }
  html.theme-light body.bank-page .statement-amount-col { grid-column: 2; align-items: flex-start; }
  html.theme-light body.bank-page .manual-item,
  html.theme-light body.bank-page .mt940-import-grid { grid-template-columns: 1fr; }
}

/* Higher specificity wins over the shared premium-shell light defaults. */
html.theme-light body.admin-wow.premium-shell-page.bank-page .card,
html.theme-light body.admin-wow.premium-shell-page.bank-page .modal-card,
html.theme-light body.admin-wow.premium-shell-page.bank-page #matchingModal > div > div,
html.theme-light body.admin-wow.premium-shell-page.bank-page #manualLinkModal > div > div {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #cbd5e1 !important;
  color: #172033 !important;
  box-shadow: 0 14px 32px rgba(30,58,95,.09), 0 2px 6px rgba(15,23,42,.04) !important;
}

/* File Storage: the folder rail is not a .card, so its page-owned dark
   background otherwise survives the shared light-theme conversion. */
html.theme-light body.file-storage-page .folder-sidebar {
  background: #ffffff !important;
  color: #172033 !important;
  border-color: #dbe3ec !important;
  box-shadow: 0 8px 22px rgba(30,58,95,.06) !important;
}
html.theme-light body.file-storage-page .folder-sidebar > div:first-child {
  border-bottom-color: #dbe3ec !important;
}
html.theme-light body.file-storage-page .folder-item {
  color: #334155 !important;
}
html.theme-light body.file-storage-page .folder-item:hover {
  background: #f1f5f9 !important;
}
html.theme-light body.file-storage-page .folder-item.active {
  background: #f6f0e5 !important;
  color: #172033 !important;
}
html.theme-light body.file-storage-page .folder-item.system {
  color: #64748b !important;
}
html.theme-light body.file-storage-page .folder-item .count {
  background: #eef2f7 !important;
  color: #475569 !important;
}
html.theme-light body.file-storage-page .folder-children {
  border-left-color: #dbe3ec !important;
}
html.theme-light body.admin-wow.premium-shell-page.bank-page .stat-card { background-image: linear-gradient(145deg, #ffffff, #f5f8fc) !important; }
html.theme-light body.admin-wow.premium-shell-page.bank-page .stat-card:nth-child(1) { background-image: linear-gradient(145deg, #eef6ff, #ffffff) !important; }
html.theme-light body.admin-wow.premium-shell-page.bank-page .stat-card:nth-child(2) { background-image: linear-gradient(145deg, #ecfdf5, #ffffff) !important; }
html.theme-light body.admin-wow.premium-shell-page.bank-page .stat-card:nth-child(3) { background-image: linear-gradient(145deg, #fff7ed, #ffffff) !important; }
html.theme-light body.admin-wow.premium-shell-page.bank-page .stat-card:nth-child(4) { background-image: linear-gradient(145deg, #f5f3ff, #ffffff) !important; }
html.theme-light body.admin-wow.premium-shell-page.bank-page .statement-list { background-color: #dbe4ef !important; background-image: none !important; }
html.theme-light body.admin-wow.premium-shell-page.bank-page .statement-item.income { background-color: #f7fffb !important; background-image: none !important; }
html.theme-light body.admin-wow.premium-shell-page.bank-page .statement-item.expense { background-color: #fffaf7 !important; background-image: none !important; }
html.theme-light body.admin-wow.premium-shell-page.bank-page .statement-item { border-bottom-color: #e2e8f0 !important; }

/* Module-wide light pass: several legacy pages use page-specific navy classes
   that are not covered by the generic .card rules above. Keep this block
   strictly scoped to light mode so dark mode is untouched. */
html.theme-light body .file-main,
html.theme-light body .file-toolbar,
html.theme-light body .breadcrumb-nav,
html.theme-light body .bulk-actions-toolbar,
html.theme-light body .file-content,
html.theme-light body .stats-section,
html.theme-light body .stats-section > .card,
html.theme-light body .stats-grid,
html.theme-light body .stat-box,
html.theme-light body .file-grid-item,
html.theme-light body .folder-grid-item,
html.theme-light body .folder-list-item,
html.theme-light body .file-list-item,
html.theme-light body .file-grid-item .thumb,
html.theme-light body .file-list-item .thumb,
html.theme-light body .selected-file-info,
html.theme-light body .token-result {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1F2937 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body .file-toolbar button,
html.theme-light body .file-toolbar select,
html.theme-light body .file-toolbar input,
html.theme-light body .bulk-actions-toolbar button,
html.theme-light body .file-grid-item .actions button,
html.theme-light body .sidebar-toggle {
  background: #FFFFFF !important;
  color: #334155 !important;
  border-color: #D8C9B5 !important;
}
html.theme-light body .file-toolbar button.active,
html.theme-light body .file-list-item.selected,
html.theme-light body .file-grid-item.selected {
  background: #F6F0E5 !important;
  color: #4F3B20 !important;
  border-color: #B08D57 !important;
}
html.theme-light body .folder-grid-item .name,
html.theme-light body .folder-list-item .name,
html.theme-light body .file-grid-item .name,
html.theme-light body .file-list-item .name,
html.theme-light body .file-grid-item .meta,
html.theme-light body .file-list-item .meta,
html.theme-light body .file-list-item .size,
html.theme-light body .file-list-item .date,
html.theme-light body .stat-box .lbl {
  color: #64748B !important;
}
html.theme-light body .folder-grid-item .name,
html.theme-light body .folder-list-item .name { color: #806333 !important; }

html.theme-light body .sidebar,
html.theme-light body .channel-list,
html.theme-light body .sidebar-header,
html.theme-light body .sidebar-search,
html.theme-light body .chat-container,
html.theme-light body .chat-header,
html.theme-light body .messages-container,
html.theme-light body .input-container,
html.theme-light body .channel-item,
html.theme-light body .channel-icon,
html.theme-light body .reply-context,
html.theme-light body .mention-dropdown,
html.theme-light body .attachment-preview,
html.theme-light body .emoji-picker,
html.theme-light body .reaction-picker {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1F2937 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body .channel-item:hover,
html.theme-light body .channel-item.active,
html.theme-light body .channel-item.active .channel-icon {
  background: #F6F0E5 !important;
  color: #1F2937 !important;
  border-color: #D6C29A !important;
}
html.theme-light body .channel-item.active .channel-last,
html.theme-light body .channel-item.active .channel-time { color: #64748B !important; }
html.theme-light body .channel-name,
html.theme-light body .chat-title,
html.theme-light body .message-content,
html.theme-light body .channel-last { color: #1F2937 !important; }
html.theme-light body .channel-time,
html.theme-light body .channel-meta,
html.theme-light body .chat-subtitle { color: #64748B !important; }

html.theme-light body.identity-page .brand-card,
html.theme-light body.identity-page .stat-card,
html.theme-light body.identity-page .filter-bar,
html.theme-light body.identity-page .filter-bar input,
html.theme-light body.identity-page .filter-bar select,
html.theme-light body.identity-page .form-group input,
html.theme-light body.identity-page .form-group select,
html.theme-light body.identity-page .form-group textarea,
html.theme-light body.identity-page .style-preview,
html.theme-light body.identity-page .fs-drop-card,
html.theme-light body.identity-page .asset-item,
html.theme-light body.identity-page .usage-role-item {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1F2937 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body.identity-page .brand-name,
html.theme-light body.identity-page .empty-state-title,
html.theme-light body.identity-page .form-group label,
html.theme-light body.identity-page .asset-name { color: #1F2937 !important; }

/* Inline legacy declarations cannot be changed from the page stylesheet,
   therefore neutralize only the known navy color tokens while light mode is active. */
html.theme-light body [style*="#0b1020"],
html.theme-light body [style*="#0b1128"],
html.theme-light body [style*="#0e1330"],
html.theme-light body [style*="#101a35"],
html.theme-light body [style*="#111731"],
html.theme-light body [style*="#1b2242"],
html.theme-light body [style*="#1a1f3d"],
html.theme-light body [style*="#121a31"] {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1F2937 !important;
  border-color: #E5E7EB !important;
}

/* Companies detail page: its KPI and service panels use legacy navy IDs and
   inline colors, so give them an explicit light treatment. */
html.theme-light body #companyProfileSection,
html.theme-light body #portalAccessSection,
html.theme-light body #financialOverviewSec,
html.theme-light body #companyDocumentsSec,
html.theme-light body #billablesOverviewSec,
html.theme-light body #companyConsumablesSec,
html.theme-light body #companyDepartmentsSec,
html.theme-light body #contactsSection,
html.theme-light body #companyCommunicationSec,
html.theme-light body #eventsSec,
html.theme-light body .hero-card,
html.theme-light body .hero-kv,
html.theme-light body .doc-metric,
html.theme-light body .profile-block,
html.theme-light body .department-card,
html.theme-light body .department-row,
html.theme-light body .inline-panel,
html.theme-light body .company-edit-section,
html.theme-light body .product-access-card,
html.theme-light body .billable-type-group,
html.theme-light body .section-fold,
html.theme-light body .subsection-card,
html.theme-light body .comm-panel,
html.theme-light body .comm-kpi,
html.theme-light body .comm-table-wrap,
html.theme-light body .modal-panel {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1F2937 !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}
html.theme-light body #financialOverviewSec .stat-card,
html.theme-light body #billablesOverviewSec > div > div,
html.theme-light body #companyConsumablesSec > div > div {
  background: #F8FAFC !important;
  background-image: none !important;
  color: #1F2937 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body #financialOverviewSec .stat-value,
html.theme-light body #financialOverviewSec .stat-label,
html.theme-light body .doc-metric .k,
html.theme-light body .doc-metric .v,
html.theme-light body .department-card .k,
html.theme-light body .department-card .v,
html.theme-light body .comm-kpi .k,
html.theme-light body .comm-kpi .v,
html.theme-light body .product-access-card,
html.theme-light body .hero-kv,
html.theme-light body .hero-kv * {
  color: #1F2937 !important;
}
html.theme-light body #financialOverviewSec .stat-label,
html.theme-light body .doc-metric .k,
html.theme-light body .department-card .k,
html.theme-light body .comm-kpi .k,
html.theme-light body .comm-muted,
html.theme-light body .company-detail-muted {
  color: #64748B !important;
}
html.theme-light body.company-detail-page table,
html.theme-light body.company-detail-page main table,
html.theme-light body.company-detail-page main thead th,
html.theme-light body.company-detail-page main tbody td {
  background: #FFFFFF !important;
  color: #334155 !important;
  border-color: #E5E7EB !important;
}

/* Finance workspace: override the page's premium navy skin only in light mode. */
html.theme-light body.finance-page .finance-hero,
html.theme-light body.finance-page .stats-overview,
html.theme-light body.finance-page .stats-block-head,
html.theme-light body.finance-page .accounting-panel,
html.theme-light body.finance-page .accounting-summary-card,
html.theme-light body.finance-page .accounting-kpi,
html.theme-light body.finance-page .accounting-attention-card,
html.theme-light body.finance-page .accounting-action-item,
html.theme-light body.finance-page .accounting-quick-link,
html.theme-light body.finance-page .accounting-booking-detail-card,
html.theme-light body.finance-page .table-wrap,
html.theme-light body.finance-page .balance-table-wrap,
html.theme-light body.finance-page .trend-canvas-wrap,
html.theme-light body.finance-page .modal-card,
html.theme-light body.finance-page .tabs,
html.theme-light body.finance-page .tab,
html.theme-light body.finance-page .doc-toolbar,
html.theme-light body.finance-page .balance-toolbar,
html.theme-light body.finance-page .trend-toolbar,
html.theme-light body.finance-page .accounting-toolbar,
html.theme-light body.finance-page .accounting-card-toolbar {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #1F2937 !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.05) !important;
}
html.theme-light body.finance-page .stats-grid--primary .stat-card,
html.theme-light body.finance-page .stats-grid--secondary .stat-card,
html.theme-light body.finance-page .stat-card,
html.theme-light body.finance-page .accounting-summary-card,
html.theme-light body.finance-page .accounting-kpi,
html.theme-light body.finance-page .accounting-action-item,
html.theme-light body.finance-page .accounting-quick-link,
html.theme-light body.finance-page .accounting-booking-detail-card,
html.theme-light body.finance-page .accounting-attention-card {
  background: #F8FAFC !important;
  background-image: none !important;
  color: #1F2937 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body.finance-page .stat-label,
html.theme-light body.finance-page .accounting-card-eyebrow,
html.theme-light body.finance-page .accounting-summary-note,
html.theme-light body.finance-page .accounting-attention-label,
html.theme-light body.finance-page .accounting-attention-sub,
html.theme-light body.finance-page .accounting-empty,
html.theme-light body.finance-page .accounting-pill,
html.theme-light body.finance-page .mut,
html.theme-light body.finance-page .small {
  color: #64748B !important;
}
html.theme-light body.finance-page .stat-value,
html.theme-light body.finance-page .accounting-summary-value,
html.theme-light body.finance-page .accounting-card-title,
html.theme-light body.finance-page .accounting-attention-value,
html.theme-light body.finance-page .accounting-mini-row,
html.theme-light body.finance-page .accounting-mini-row strong,
html.theme-light body.finance-page .accounting-quick-link,
html.theme-light body.finance-page .accounting-kpi * {
  color: #1F2937 !important;
}
html.theme-light body.finance-page .accounting-pill,
html.theme-light body.finance-page .trend-legend-pill,
html.theme-light body.finance-page .accounting-link-btn,
html.theme-light body.finance-page .accounting-toolbar input,
html.theme-light body.finance-page .accounting-toolbar select,
html.theme-light body.finance-page .trend-toolbar select,
html.theme-light body.finance-page .doc-toolbar button,
html.theme-light body.finance-page .balance-toolbar button,
html.theme-light body.finance-page .balance-toolbar select,
html.theme-light body.finance-page .doc-toolbar select {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #4F463D !important;
  border-color: #D8C9B5 !important;
}
html.theme-light body.finance-page .accounting-link-btn,
html.theme-light body.finance-page .doc-toolbar button.primary,
html.theme-light body.finance-page .balance-toolbar button.primary {
  background: #B08D57 !important;
  color: #FFFFFF !important;
  border-color: #967443 !important;
}
html.theme-light body.finance-page table,
html.theme-light body.finance-page .balance-table,
html.theme-light body.finance-page .accounting-booking-main td,
html.theme-light body.finance-page .accounting-booking-detail td {
  background: #FFFFFF !important;
  color: #334155 !important;
  border-color: #E5E7EB !important;
}
html.theme-light body.finance-page table th,
html.theme-light body.finance-page .balance-table th,
html.theme-light body.finance-page .balance-table tr.group td {
  background: #F8FAFC !important;
  color: #475569 !important;
  border-color: #E5E7EB !important;
}
