/* Finance: static rendering and complete light-theme compatibility. */
#view-finance,
#view-finance *,
#view-finance *::before,
#view-finance *::after {
  animation: none !important;
  transition: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
  filter: none !important;
}

#view-finance button:hover,
#view-finance [role="button"]:hover {
  transform: none !important;
}

/* Finance uses the full viewport width instead of inheriting the centered dashboard gutter. */
#view-finance {
  position: relative !important;
  left: 50% !important;
  width: 100vw !important;
  max-width: none !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  overflow-x: clip !important;
}

#view-finance > .w-full {
  width: 100% !important;
  max-width: none !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

@media (max-width: 700px) {
  #view-finance > .w-full {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* Match Booking's true edge layout while Finance is the visible workspace. */
html body:has(#view-finance:not(.hidden)) {
  padding: 0 !important;
}

html body:has(#view-finance:not(.hidden)) #app-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body:has(#view-finance:not(.hidden)) #superNavbar {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  border-left-width: 0 !important;
  border-right-width: 0 !important;
  border-radius: 0 !important;
}

html body:has(#view-finance:not(.hidden)) #global-loader-container {
  margin-top: 0 !important;
}

html body:has(#view-finance:not(.hidden)) #view-finance {
  left: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body:has(#view-finance:not(.hidden)) #view-finance > .w-full {
  width: 100% !important;
  max-width: 100% !important;
  padding: 4px !important;
  border-left-width: 0 !important;
  border-right-width: 0 !important;
  border-radius: 0 !important;
}

body.s79-theme-light #view-finance,
body.s79-theme-light #view-finance > .w-full {
  background: #f4f7fb !important;
  color: #26364b !important;
  color-scheme: light !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

body.s79-theme-light #view-finance [class*="bg-[#0c101b]"],
body.s79-theme-light #view-finance [class*="bg-[#0d1727]"],
body.s79-theme-light #view-finance [class*="bg-slate-900"],
body.s79-theme-light #view-finance [class*="bg-slate-950"],
body.s79-theme-light #view-finance [class*="bg-gradient-to-"],
body.s79-theme-light #view-finance .fm-panel,
body.s79-theme-light #view-finance .fm-kpi,
body.s79-theme-light #view-finance .fc-panel,
body.s79-theme-light #view-finance .fc-card,
body.s79-theme-light #view-finance .fc-kpis > div,
body.s79-theme-light #view-finance .fc-check,
body.s79-theme-light #view-finance .fc-aging,
body.s79-theme-light #view-finance .fc-ledger-wrap {
  background: #ffffff !important;
  background-image: none !important;
  border-color: #9fb1c7 !important;
  color: #172033 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .10) !important;
}

/* Legacy OPEX cards use gradient/background utilities that can outrank the generic palette. */
body.s79-theme-light #view-finance div:has(> #breakeven-container),
body.s79-theme-light #view-finance div:has(> #ai-dynamic-insights-container) {
  background: #ffffff !important;
  background-image: none !important;
  border-color: #9fb1c7 !important;
  color: #172033 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .10) !important;
}

body.s79-theme-light #view-finance p,
body.s79-theme-light #view-finance span,
body.s79-theme-light #view-finance label,
body.s79-theme-light #view-finance td,
body.s79-theme-light #view-finance th {
  opacity: 1 !important;
}

body.s79-theme-light #view-finance h2 {
  font-size: 26px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: -.02em !important;
}

body.s79-theme-light #view-finance h3 {
  font-size: 15px !important;
  line-height: 1.3 !important;
  font-weight: 900 !important;
}

body.s79-theme-light #view-finance [class*="text-[8px]"],
body.s79-theme-light #view-finance [class*="text-[9px]"],
body.s79-theme-light #view-finance [class*="text-[10px]"] {
  font-size: 11px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}

body.s79-theme-light #view-finance [class*="text-[11px]"],
body.s79-theme-light #view-finance [class*="text-xs"] {
  font-size: 12px !important;
  line-height: 1.4 !important;
  font-weight: 750 !important;
}

body.s79-theme-light #view-finance .fm-kpi,
body.s79-theme-light #view-finance #opex-command-kpis > div,
body.s79-theme-light #view-finance #cost-cards-container > div,
body.s79-theme-light #view-finance .fc-card,
body.s79-theme-light #view-finance .fc-kpis > div,
body.s79-theme-light #view-finance .fc-check,
body.s79-theme-light #view-finance .fc-aging {
  border-width: 1.5px !important;
  border-color: #8fa5bf !important;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .11) !important;
}

body.s79-theme-light #view-finance .fm-kpi strong,
body.s79-theme-light #view-finance #opex-command-kpis [class*="text-2xl"],
body.s79-theme-light #view-finance .fc-kpis h2,
body.s79-theme-light #view-finance .fc-card strong {
  font-size: 25px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
  letter-spacing: -.025em !important;
}

body.s79-theme-light #view-finance input,
body.s79-theme-light #view-finance select,
body.s79-theme-light #view-finance textarea {
  background: #ffffff !important;
  color: #172033 !important;
  border-color: #aebed1 !important;
  box-shadow: none !important;
  color-scheme: light !important;
}

body.s79-theme-light #view-finance input:focus,
body.s79-theme-light #view-finance select:focus,
body.s79-theme-light #view-finance textarea:focus {
  border-color: #2563eb !important;
  outline: 2px solid rgba(37, 99, 235, .18) !important;
  outline-offset: 1px !important;
}

body.s79-theme-light #view-finance h2,
body.s79-theme-light #view-finance h3,
body.s79-theme-light #view-finance strong,
body.s79-theme-light #view-finance b,
body.s79-theme-light #view-finance .text-white,
body.s79-theme-light #view-finance .text-slate-100,
body.s79-theme-light #view-finance .text-slate-200,
body.s79-theme-light #view-finance .text-slate-300 {
  color: #101c2e !important;
}

body.s79-theme-light #view-finance .text-slate-400,
body.s79-theme-light #view-finance .text-slate-500,
body.s79-theme-light #view-finance .text-slate-600,
body.s79-theme-light #view-finance small,
body.s79-theme-light #view-finance .fm-title p,
body.s79-theme-light #view-finance .fm-kpi small,
body.s79-theme-light #view-finance .fm-table-foot,
body.s79-theme-light #view-finance .fc-check small {
  color: #52647a !important;
  opacity: 1 !important;
}

body.s79-theme-light #view-finance [class*="border-slate-"] {
  border-color: #cbd7e5 !important;
}

body.s79-theme-light #view-finance button,
body.s79-theme-light #view-finance .fm-btn,
body.s79-theme-light #view-finance .fc-btn,
body.s79-theme-light #view-finance .fc-debt-filters button,
body.s79-theme-light #view-finance .fm-month-switch button {
  background: #eef4fb !important;
  color: #174f9c !important;
  border-color: #aac2df !important;
  box-shadow: none !important;
  font-weight: 850 !important;
}

body.s79-theme-light #view-finance button:hover,
body.s79-theme-light #view-finance .fm-btn:hover,
body.s79-theme-light #view-finance .fc-btn:hover {
  background: #e2edf9 !important;
  color: #123f7e !important;
  border-color: #7ca4d2 !important;
}

body.s79-theme-light #view-finance #saveBudgetBtn,
body.s79-theme-light #view-finance .bg-blue-600,
body.s79-theme-light #view-finance .fc-btn.green,
body.s79-theme-light #view-finance .fm-btn.green {
  background: #1769d2 !important;
  color: #ffffff !important;
  border-color: #145ab7 !important;
}

body.s79-theme-light #view-finance .finance-source-legend span {
  background: #ffffff !important;
  border-color: #c7d4e3 !important;
  box-shadow: none !important;
}

body.s79-theme-light #view-finance .finance-source-legend .real { color: #175fc0 !important; }
body.s79-theme-light #view-finance .finance-source-legend .estimate { color: #7041b5 !important; }
body.s79-theme-light #view-finance .finance-source-legend .target { color: #9a5b00 !important; }
body.s79-theme-light #view-finance .finance-source-legend .onbook { color: #b54708 !important; }

body.s79-theme-light #view-finance .fm-head,
body.s79-theme-light #view-finance .fm-ai,
body.s79-theme-light #view-finance .fc-ai {
  background: #ffffff !important;
  background-image: none !important;
  border-color: #b9cce2 !important;
  color: #26364b !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06) !important;
}

body.s79-theme-light #view-finance .fm-title i { color: #047857 !important; }
body.s79-theme-light #view-finance .fm-title h3 { color: #101c2e !important; }
body.s79-theme-light #view-finance .fm-month-switch,
body.s79-theme-light #view-finance .fc-toggle {
  background: #f1f5f9 !important;
  border-color: #b8c6d8 !important;
}
body.s79-theme-light #view-finance .fm-month-switch select { color: #172033 !important; }

body.s79-theme-light #view-finance .fm-kpi.actual { background:#eef6ff !important; border-color:#8db9e8 !important; }
body.s79-theme-light #view-finance .fm-kpi.plan { background:#fff8e7 !important; border-color:#e7c46c !important; }
body.s79-theme-light #view-finance .fm-kpi.forecast { background:#f5f0ff !important; border-color:#b9a3e7 !important; }
body.s79-theme-light #view-finance .fm-kpi.danger { background:#fff1f2 !important; border-color:#f2a2ae !important; }
body.s79-theme-light #view-finance .fm-kpi.profit { background:#ecfdf5 !important; border-color:#7bcbae !important; }
body.s79-theme-light #view-finance .fm-kpi strong { color:#101c2e !important; }
body.s79-theme-light #view-finance .fm-kpi span {
  color:#334155 !important;
  font-size:13px !important;
  font-weight:900 !important;
}
body.s79-theme-light #view-finance .fm-kpi small {
  color:#43566e !important;
  font-size:11px !important;
  font-weight:750 !important;
}
body.s79-theme-light #view-finance .fm-ai p,
body.s79-theme-light #view-finance #finance-opex-history-status {
  color:#42556d !important;
  font-weight:750 !important;
}
body.s79-theme-light #view-finance .fm-kpi.danger strong { color:#be123c !important; }
body.s79-theme-light #view-finance .fm-kpi.profit strong { color:#047857 !important; }

body.s79-theme-light #view-finance .fm-table-wrap,
body.s79-theme-light #view-finance .fc-debt-table-wrap,
body.s79-theme-light #view-finance .fc-compact-ledger {
  background: #ffffff !important;
  border-color: #b9c7d8 !important;
  scrollbar-color: #9aabc0 #edf2f7 !important;
}

body.s79-theme-light #view-finance table,
body.s79-theme-light #view-finance table tbody,
body.s79-theme-light #view-finance table tr,
body.s79-theme-light #view-finance table td {
  background-color: #ffffff !important;
  color: #26364b !important;
  border-color: #d7e0ea !important;
}

body.s79-theme-light #view-finance table thead,
body.s79-theme-light #view-finance table thead tr,
body.s79-theme-light #view-finance table thead th {
  background: #e8eef6 !important;
  color: #34465c !important;
  border-color: #c2cfdd !important;
}

body.s79-theme-light #view-finance .fm-table th:first-child,
body.s79-theme-light #view-finance .fm-table td:first-child {
  background: #f4f7fb !important;
  box-shadow: 3px 0 0 #d5dee9 !important;
}

body.s79-theme-light #view-finance .fm-table .fm-group td {
  background: #eaf0f7 !important;
  color: #334155 !important;
}

body.s79-theme-light #view-finance .fm-current {
  background: #e8f2ff !important;
  box-shadow: inset 2px 0 #3b82f6, inset -2px 0 #3b82f6 !important;
}

body.s79-theme-light #view-finance .fm-value.actual { color:#175fc0 !important; }
body.s79-theme-light #view-finance .fm-value.plan { color:#9a5b00 !important; }
body.s79-theme-light #view-finance .fm-value.forecast { color:#7041b5 !important; }
body.s79-theme-light #view-finance .fm-value.profit { color:#047857 !important; }
body.s79-theme-light #view-finance .fm-value.danger { color:#be123c !important; }

body.s79-theme-light #view-finance .fc-status.warn { color:#8a5200 !important; background:#fff7df !important; border-color:#deb75c !important; }
body.s79-theme-light #view-finance .fc-status.risk { color:#b4233e !important; background:#fff1f3 !important; border-color:#e99aaa !important; }
body.s79-theme-light #view-finance .fc-status.info { color:#175fc0 !important; background:#eef6ff !important; border-color:#8db9e8 !important; }

body.s79-theme-light #view-finance .fc-bar,
body.s79-theme-light #view-finance .fm-progress { background:#dbe4ee !important; }

@media (prefers-reduced-motion: reduce) {
  #view-finance,
  #view-finance *,
  #view-finance *::before,
  #view-finance *::after {
    scroll-behavior: auto !important;
  }
}
