/**
 * GradualPlus — light / dark tokens sampled from the logo
 * Navy #081840 · Red #C82028. No cyan neon.
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --gp-navy: #081840;
  --gp-red: #C82028;
  --gp-font-display: 'Space Grotesk', 'IBM Plex Sans', system-ui, sans-serif;
  --gp-font: 'IBM Plex Sans', system-ui, sans-serif;
}

html.gp-theme-dark,
html.dark {
  --gp-accent: #C82028;
  --gp-accent-soft: rgba(200, 32, 40, 0.16);
  --gp-accent-strong: #A01A20;
  --gp-accent-gradient: #C82028;
  --gp-neon-gradient: #C82028;
  --gp-glass-bg: #0E2458;
  --gp-glass-border: rgba(244, 246, 250, 0.12);
  --gp-glow-sm: 0 8px 24px rgba(8, 24, 64, 0.35);
  --gp-glow-md: 0 16px 40px rgba(8, 24, 64, 0.45);

  --gp-body-bg: #081840;
  --gp-topbar-bg: #0B1C4A;
  --gp-topbar-border: rgba(244, 246, 250, 0.1);
  --gp-surface-input: #0B1C4A;
  --gp-surface-muted: #0B1C4A;
  --gp-surface-elevated: #0E2458;
  --gp-surface-chip: #0B1C4A;
  --gp-surface-hover: rgba(200, 32, 40, 0.12);
  --gp-surface-hover-strong: rgba(200, 32, 40, 0.18);
  --gp-card-bg: #0E2458;
  --gp-card-ghost-bg: #0E2458;
  --gp-card-solid: #10285E;
  --gp-card-border: rgba(244, 246, 250, 0.12);
  --gp-border-subtle: rgba(244, 246, 250, 0.08);
  --gp-border-medium: rgba(244, 246, 250, 0.16);
  --gp-dropdown-bg: #0E2458;
  --gp-icon-btn-bg: #0B1C4A;
  --gp-kpi-value: #F4F6FA;
  --gp-text-main: #F4F6FA;
  --gp-text-muted: #B8C0D4;
  --gp-text-soft: #8A93AB;
  --gp-shadow-subtle: 0 8px 28px rgba(4, 10, 28, 0.4);
  --gp-shadow-soft: 0 16px 40px rgba(4, 10, 28, 0.5);
  --gp-sidebar-bg: #061230;
  --gp-sidebar-border: rgba(244, 246, 250, 0.08);
  --gp-sidebar-text: #B8C0D4;
  --gp-sidebar-text-active: #FFFFFF;
  --gp-sidebar-hover-bg: rgba(244, 246, 250, 0.06);
  --gp-sidebar-active-bg: rgba(200, 32, 40, 0.22);
  --gp-table-stripe: rgba(8, 24, 64, 0.45);
  --gp-surface-inset: #061230;
  --gp-surface-tile: #0E2458;
  --gp-control-bg: #0B1C4A;
  --gp-control-border: rgba(244, 246, 250, 0.14);
  --gp-table-row-bg: transparent;
  --gp-table-hover-bg: rgba(200, 32, 40, 0.1);
  --gp-table-wrap-bg: #061230;
  --gp-kpi-value-gradient: #F4F6FA;
}

html.gp-theme-light {
  --gp-accent: #C82028;
  --gp-accent-soft: rgba(200, 32, 40, 0.1);
  --gp-accent-strong: #A01A20;
  --gp-accent-gradient: #C82028;
  --gp-neon-gradient: #C82028;
  --gp-glass-bg: #FFFFFF;
  --gp-glass-border: rgba(8, 24, 64, 0.1);
  --gp-glow-sm: 0 4px 16px rgba(8, 24, 64, 0.06);
  --gp-glow-md: 0 10px 28px rgba(8, 24, 64, 0.08);
  --gp-body-bg: #F4F6FA;
  --gp-topbar-bg: #FFFFFF;
  --gp-topbar-border: rgba(8, 24, 64, 0.08);
  --gp-surface-input: #FFFFFF;
  --gp-surface-muted: #EEF1F6;
  --gp-surface-elevated: #F8F9FC;
  --gp-surface-chip: #EEF1F6;
  --gp-surface-hover: rgba(8, 24, 64, 0.05);
  --gp-surface-hover-strong: rgba(200, 32, 40, 0.08);
  --gp-card-bg: #FFFFFF;
  --gp-card-ghost-bg: #FFFFFF;
  --gp-card-solid: #FFFFFF;
  --gp-card-border: rgba(8, 24, 64, 0.1);
  --gp-border-subtle: rgba(8, 24, 64, 0.07);
  --gp-border-medium: rgba(8, 24, 64, 0.14);
  --gp-dropdown-bg: #FFFFFF;
  --gp-icon-btn-bg: #FFFFFF;
  --gp-kpi-value: #081840;
  --gp-text-main: #081840;
  --gp-text-muted: #3D4A66;
  --gp-text-soft: #5C6B86;
  --gp-shadow-subtle: 0 4px 16px rgba(8, 24, 64, 0.06);
  --gp-shadow-soft: 0 10px 28px rgba(8, 24, 64, 0.08);
  --gp-sidebar-bg: #FFFFFF;
  --gp-sidebar-border: rgba(8, 24, 64, 0.08);
  --gp-sidebar-text: #3D4A66;
  --gp-sidebar-text-active: #081840;
  --gp-sidebar-hover-bg: rgba(8, 24, 64, 0.05);
  --gp-sidebar-active-bg: rgba(200, 32, 40, 0.1);
  --gp-table-stripe: #F8F9FC;
  --gp-surface-inset: #F4F6FA;
  --gp-surface-tile: #FFFFFF;
  --gp-control-bg: #FFFFFF;
  --gp-control-border: rgba(8, 24, 64, 0.14);
  --gp-table-row-bg: #FFFFFF;
  --gp-table-hover-bg: #F4F6FA;
  --gp-table-wrap-bg: #FFFFFF;
  --gp-kpi-value-gradient: #081840;
}

/* Light theme — settings theme picker cards */
html.gp-theme-light body.gp-app .thememenu-sy .theme-box .theme-img {
  border-color: rgba(148, 163, 184, 0.25);
  background: #fff;
}

html.gp-theme-light body.gp-app .tabs-custom .nav-tabs {
  border-bottom-color: var(--gp-border-subtle) !important;
}

html.gp-theme-light body.gp-app .tabs-custom .nav-tabs > li > a {
  color: var(--gp-text-soft) !important;
}

html.gp-theme-light body.gp-app .tabs-custom .nav-tabs > li.active > a {
  color: var(--gp-text-main) !important;
  background: var(--gp-surface-muted) !important;
}

html.gp-theme-light body.gp-app .tabs-custom .tab-content {
  background: var(--gp-card-solid) !important;
  color: var(--gp-text-main) !important;
}

/* Light theme — modals & legacy white-popup */
html.gp-theme-light body.gp-app .modal-content,
html.gp-theme-light body.gp-app .white-popup-block {
  background: #ffffff !important;
  color: var(--gp-text-main) !important;
  border-color: var(--gp-border-medium) !important;
}

html.gp-theme-light body.gp-app .modal-header,
html.gp-theme-light body.gp-app .modal-footer {
  border-color: var(--gp-border-subtle) !important;
  background: var(--gp-surface-muted) !important;
}

/* Dark theme — ensure html.dark legacy hooks stay aligned */
html.gp-theme-dark body.gp-app,
html.dark body.gp-app {
  color: var(--gp-text-main);
}

html.gp-theme-light body.gp-app {
  color: var(--gp-text-main);
}

html.gp-theme-light body.gp-app .gp-topbar__breadcrumb,
html.gp-theme-light body.gp-app .gp-topbar__title,
html.gp-theme-light body.gp-app .gp-page-header__title {
  color: var(--gp-text-main);
}

html.gp-theme-light body.gp-app .dataTables_wrapper .dataTables_info,
html.gp-theme-light body.gp-app .dataTables_wrapper .dataTables_length,
html.gp-theme-light body.gp-app .dataTables_wrapper .dataTables_filter {
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .pagination > li > a,
html.gp-theme-light body.gp-app .pagination > li > span {
  background: var(--gp-surface-input) !important;
  border-color: var(--gp-border-medium) !important;
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .pagination > .active > a,
html.gp-theme-light body.gp-app .pagination > .active > span {
  background: var(--gp-accent) !important;
  border-color: var(--gp-accent) !important;
  color: #0f172a !important;
}

/* ── Light theme — fix grey-on-white conflicts ── */
html.gp-theme-light body.gp-app .dt-buttons .btn,
html.gp-theme-light body.gp-app .dt-buttons .dt-button {
  background: var(--gp-control-bg) !important;
  border-color: var(--gp-control-border) !important;
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .dt-buttons .btn:hover,
html.gp-theme-light body.gp-app .dt-buttons .dt-button:hover {
  background: var(--gp-surface-hover-strong) !important;
  border-color: var(--gp-accent) !important;
  color: var(--gp-accent) !important;
}

html.gp-theme-light body.gp-app .dataTables_filter input,
html.gp-theme-light body.gp-app .dataTables_length select {
  background: var(--gp-control-bg) !important;
  border-color: var(--gp-control-border) !important;
  color: var(--gp-text-main) !important;
}

html.gp-theme-light body.gp-app .dataTables_wrapper .pagination > li > a,
html.gp-theme-light body.gp-app .dataTables_wrapper .pagination > li > span {
  background: var(--gp-control-bg) !important;
  border-color: var(--gp-control-border) !important;
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .dataTables_wrapper .pagination > .active > a {
  background: rgba(34, 211, 238, 0.15) !important;
  border-color: var(--gp-accent) !important;
  color: var(--gp-accent) !important;
}

html.gp-theme-light body.gp-app .table > tbody > tr > td,
html.gp-theme-light body.gp-app .table > tbody > tr > th,
html.gp-theme-light body.gp-app table.dataTable tbody td,
html.gp-theme-light body.gp-app table.dataTable tbody th {
  background: var(--gp-table-row-bg) !important;
}

html.gp-theme-light body.gp-app .table-striped > tbody > tr:nth-of-type(odd) > td,
html.gp-theme-light body.gp-app .table-striped > tbody > tr:nth-of-type(odd) > th {
  background: var(--gp-table-stripe) !important;
}

html.gp-theme-light body.gp-app .table-striped > tbody > tr:nth-of-type(even) > td,
html.gp-theme-light body.gp-app .table-striped > tbody > tr:nth-of-type(even) > th {
  background: var(--gp-table-row-bg) !important;
}

html.gp-theme-light body.gp-app table.dataTable.display tbody tr.odd > td,
html.gp-theme-light body.gp-app table.dataTable.stripe tbody tr.odd > td,
html.gp-theme-light body.gp-app table.dataTable.order-column tbody tr > .sorting_1,
html.gp-theme-light body.gp-app table.dataTable.display tbody tr > .sorting_1 {
  background: var(--gp-table-stripe) !important;
}

html.gp-theme-light body.gp-app table.dataTable.display tbody tr.even > td,
html.gp-theme-light body.gp-app table.dataTable.stripe tbody tr.even > td {
  background: var(--gp-table-row-bg) !important;
}

html.gp-theme-light body.gp-app table.dataTable.display tbody tr:hover > td,
html.gp-theme-light body.gp-app table.dataTable.hover tbody tr:hover > td {
  background: var(--gp-table-hover-bg) !important;
}

html.gp-theme-light body.gp-app .table-responsive {
  background: var(--gp-table-wrap-bg) !important;
  border-color: var(--gp-border-subtle) !important;
}

html.gp-theme-light body.gp-app .table .action a,
html.gp-theme-light body.gp-app .table td.action a,
html.gp-theme-light body.gp-app .table .actions a {
  background: var(--gp-control-bg) !important;
  border-color: var(--gp-control-border) !important;
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .btn-circle {
  background: var(--gp-control-bg) !important;
  border-color: var(--gp-control-border) !important;
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .gp-cashflow-stat {
  background: var(--gp-surface-tile) !important;
  border-color: var(--gp-border-subtle) !important;
}

html.gp-theme-light body.gp-app .gp-cashflow__chart-wrap {
  background: var(--gp-surface-inset) !important;
  border-color: var(--gp-border-subtle) !important;
}

html.gp-theme-light body.gp-app .gp-cashflow-empty__ring {
  border-color: rgba(148, 163, 184, 0.22) !important;
  box-shadow: inset 0 0 12px rgba(148, 163, 184, 0.08) !important;
}

html.gp-theme-light body.gp-app .gp-kpi__value {
  background: var(--gp-kpi-value-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html.gp-theme-light body.gp-app .gp-card--kpi {
  background: var(--gp-surface-inset) !important;
}

html.gp-theme-light body.gp-app .gp-birthday-item,
html.gp-theme-light body.gp-app .gp-birthday-empty {
  background: #ffffff !important;
  border-color: var(--gp-border-subtle) !important;
}

html.gp-theme-light body.gp-app .gp-birthday-empty {
  border-style: dashed !important;
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .gp-birthday-group__sub {
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .gp-birthday-widget__footer {
  background: var(--gp-surface-inset) !important;
  border-color: var(--gp-border-subtle) !important;
}

html.gp-theme-light body.gp-app .gp-calendar .fc-button,
html.gp-theme-light body.gp-app #event_calendar.gp-calendar .fc-toolbar .fc-button {
  background: var(--gp-control-bg) !important;
  border-color: var(--gp-control-border) !important;
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .gp-calendar .fc-button.fc-state-active,
html.gp-theme-light body.gp-app #event_calendar.gp-calendar .fc-toolbar .fc-button.fc-state-active {
  background: rgba(34, 211, 238, 0.12) !important;
  border-color: rgba(34, 211, 238, 0.35) !important;
  color: #0891b2 !important;
}

html.gp-theme-light body.gp-app .gp-calendar .fc-day-header {
  background: var(--gp-surface-inset) !important;
}

html.gp-theme-light body.gp-app .gp-calendar .fc-day {
  background: var(--gp-table-row-bg) !important;
}

html.gp-theme-light body.gp-app .gp-calendar .fc-day-number {
  color: var(--gp-text-main) !important;
}

html.gp-theme-light body.gp-app .gp-calendar .fc-other-month .fc-day-number {
  color: var(--gp-text-soft) !important;
  opacity: 0.55;
}

html.gp-theme-light body.gp-app .modal-content,
html.gp-theme-light body.gp-app .modal-block .panel {
  background: var(--gp-card-solid) !important;
  border-color: var(--gp-border-medium) !important;
  color: var(--gp-text-main) !important;
}

html.gp-theme-light body.gp-app .modal-header,
html.gp-theme-light body.gp-app .modal-footer {
  background: var(--gp-surface-muted) !important;
  border-color: var(--gp-border-subtle) !important;
}

html.gp-theme-light body.gp-app .progress {
  background: var(--gp-surface-muted) !important;
}

html.gp-theme-light body.gp-app .panel-custom,
html.gp-theme-light body.gp-app .panel-sp-custom {
  background: var(--gp-card-solid) !important;
  border-color: var(--gp-border-medium) !important;
}

html.gp-theme-light body.gp-app .swal2-popup {
  background: #ffffff !important;
  color: var(--gp-text-main) !important;
  border-color: var(--gp-border-medium) !important;
}

html.gp-theme-light body.gp-app .swal2-title {
  color: var(--gp-text-main) !important;
}

html.gp-theme-light body.gp-app .swal2-content,
html.gp-theme-light body.gp-app .swal2-html-container {
  color: var(--gp-text-muted) !important;
}

html.gp-theme-light body.gp-app .datepicker {
  background: #ffffff !important;
  border-color: var(--gp-control-border) !important;
  color: var(--gp-text-main) !important;
}

html.gp-theme-light body.gp-app .alert-success {
  color: #15803d !important;
}

html.gp-theme-light body.gp-app .alert-danger,
html.gp-theme-light body.gp-app .alert-error {
  color: #b91c1c !important;
}

html.gp-theme-light body.gp-app .alert-warning {
  color: #a16207 !important;
}

html.gp-theme-light body.gp-app .alert-info {
  color: #0e7490 !important;
}
