/* Alcatraz Finans V7 — global, consistent dark theme override */
html.dark-style{
  --ac-bg:#22263a;--ac-bg-deep:#191d2a;--ac-panel:#30354d;--ac-panel-2:#343a55;--ac-panel-3:#3b415e;
  --ac-input:#2c3149;--ac-hover:#3b425f;--ac-border:#4a516e;--ac-text:#f2f3f8;--ac-muted:#aeb3c7;
  --ac-primary:#7567f8;--ac-success:#26d184;--ac-danger:#ff5d6c;--ac-warning:#ffad4d;--ac-info:#26c6da;
  color-scheme:dark;
}
html.dark-style,html.dark-style body{background:var(--ac-bg)!important;color:var(--ac-text)!important}
html.dark-style body{opacity:1!important}
html.dark-style :where(.layout-wrapper,.layout-container,.layout-page,.content-wrapper,.container-xxl,.container-fluid,.ac-page,main){background:var(--ac-bg)!important;color:var(--ac-text)!important}

/* topbar and search */
html.dark-style :where(#layout-navbar,.layout-navbar,.navbar,.ac-topbar){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important}
html.dark-style :where(#layout-navbar,.layout-navbar) :where(.ac-inline-search,.ac-inline-search-box,.navbar-search-wrapper,.navbar-search-suggestion,.search-input-wrapper,.search-box){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important}
html.dark-style :where(#layout-navbar,.layout-navbar) :where(input,.form-control,.search-input){background:transparent!important;border-color:transparent!important;color:var(--ac-text)!important;-webkit-text-fill-color:var(--ac-text)!important}
html.dark-style :where(#layout-navbar,.layout-navbar) input::placeholder{color:#aeb3c7!important;opacity:1!important}
html.dark-style :where(#layout-navbar,.layout-navbar) :where(i,svg,.nav-link,.navbar-nav-right){color:#d9dcea!important;fill:currentColor!important}

/* universal surfaces inside application content */
html.dark-style .content-wrapper :where(.card,.card-body,.card-header,.card-footer,.panel,.box,.widget,.content-box,.page-card,.form-card,.table-card,.filter-card,.list-card,.summary-card,.metric-card,.stat-card,.kpi-card,.dashboard-card,.modal-content,.offcanvas,.accordion-item,.accordion-button,.list-group-item,.dropdown-menu,.popover,.toast,.ac-panel,.ac-summary,.ac-toolbar,.ac-module-head,.v7-card,.v7-kpi,.v7-welcome){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where([class*="summary"],[class*="metric"],[class*="stat-"],[class*="stats-"],[class*="kpi"],[class*="overview"],[class*="filter"],[class*="toolbar"],[class*="list-head"],[class*="section-head"]){border-color:var(--ac-border)!important}

/* override inline white/light surfaces without destroying semantic badges/buttons */
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background:#fff"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background: #fff"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background:white"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background: white"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background-color:#fff"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background-color: #fff"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background-color:white"]{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* headings and text contrast */
html.dark-style .content-wrapper :where(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,.card-title,.panel-title,.section-title,.page-title,strong,b){color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(p,label,.form-label,.col-form-label,.small,small,.text-muted,.help-text,.form-text,.subtitle,.description){color:var(--ac-muted)!important}
html.dark-style .content-wrapper :where(.text-dark,.text-body,.text-black){color:var(--ac-text)!important}

/* forms */
html.dark-style .content-wrapper :where(input:not([type=checkbox]):not([type=radio]),textarea,select,.form-control,.form-select,.input-group-text,.select2-selection,.choices__inner,.form-floating>.form-control){background:var(--ac-input)!important;border-color:#515a79!important;color:var(--ac-text)!important;-webkit-text-fill-color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(input,textarea)::placeholder{color:#9197ad!important;opacity:1!important}
html.dark-style .content-wrapper :where(input,textarea,select,.form-control,.form-select):focus{background:#2e344d!important;border-color:var(--ac-primary)!important;color:#fff!important;box-shadow:0 0 0 3px rgba(117,103,248,.18)!important}
html.dark-style .content-wrapper option{background:#2d3249!important;color:#fff!important}
html.dark-style .content-wrapper .form-floating>label{color:#aeb3c7!important;background:transparent!important}

/* tables */
html.dark-style .content-wrapper :where(.table-responsive,.table-wrap,.dataTables_wrapper,.dt-container){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper table{--bs-table-bg:transparent!important;--bs-table-color:#dde0eb!important;--bs-table-border-color:var(--ac-border)!important;background:var(--ac-panel)!important;color:#dde0eb!important}
html.dark-style .content-wrapper table :where(thead,thead tr,thead th){background:var(--ac-panel-3)!important;color:#fff!important;border-color:#545b79!important}
html.dark-style .content-wrapper table :where(tbody,tbody tr,tbody td){background:var(--ac-panel)!important;color:#dde0eb!important;border-color:var(--ac-border)!important}
html.dark-style .content-wrapper table tbody tr:nth-child(even),html.dark-style .content-wrapper table tbody tr:nth-child(even) td{background:#333951!important}
html.dark-style .content-wrapper table tbody tr:hover,html.dark-style .content-wrapper table tbody tr:hover td{background:var(--ac-hover)!important;color:#fff!important}
html.dark-style .content-wrapper :where(.dataTables_info,.dataTables_length,.dataTables_filter,.dataTables_paginate){color:var(--ac-muted)!important}

/* specific modules that previously remained light */
html.dark-style .content-wrapper :where(.calendar-wrap,.calendar-container,.calendar-card,.calendar-sidebar,.upcoming-events,.calendar-grid,.calendar-header,.calendar-weekdays,.calendar-day,.day-cell,.fc-view-harness,.fc-scrollgrid,.fc-daygrid-day,.fc-list,.fc-list-day-cushion){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.calendar-grid>div,.calendar-weekdays>div,.fc-theme-standard td,.fc-theme-standard th){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.calendar-day.other-month,.day-cell.muted,.fc-day-other){background:#292e43!important;color:#858ba1!important}
html.dark-style .content-wrapper :where(.kanban-board,.kanban-column,.kanban-lane,.task-column,.board-column,.kanban-empty,.empty-state,.empty-box){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.kanban-card,.task-card,.project-card){background:var(--ac-panel-2)!important;border-color:#555d7c!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.backup-card,.backup-panel,.backup-list,.backup-item,.backup-row,.file-row,.notification-item,.activity-item){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* common page-specific classes */
html.dark-style .content-wrapper :where(.stats-grid,.stat-grid,.summary-grid,.project-stats,.debt-summary,.income-summary,.expense-summary)>*{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.list-header,.table-header,.card-title-row,.section-header,.filter-section,.filter-box,.search-filter,.search-panel){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* buttons that were white */
html.dark-style .content-wrapper :where(.btn-light,.btn-white,.btn-outline-light){background:#3b425f!important;border-color:#56607f!important;color:#fff!important}
html.dark-style .content-wrapper :where(.btn-light,.btn-white,.btn-outline-light):hover{background:#46506f!important;color:#fff!important}
html.dark-style .content-wrapper .btn-primary{background:linear-gradient(135deg,#7b6df8,#6758e8)!important;border-color:transparent!important;color:#fff!important}

/* dropdowns, pagination, modal */
html.dark-style :where(.dropdown-menu,.modal-content,.offcanvas,.popover,.toast){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(.dropdown-item,.page-link){background:transparent!important;color:#dfe2ed!important;border-color:var(--ac-border)!important}
html.dark-style :where(.dropdown-item:hover,.dropdown-item:focus,.page-link:hover){background:var(--ac-hover)!important;color:#fff!important}

/* chart text */
html.dark-style :where(.apexcharts-text,.apexcharts-legend-text){fill:#b7bccf!important;color:#b7bccf!important}
html.dark-style .apexcharts-gridline{stroke:#454c68!important}

/* no flash: hide until bootstrap theme class is applied */
html:not(.dark-style):not(.light-style) body{visibility:hidden!important}
html.dark-style body,html.light-style body{visibility:visible!important}

/* =========================================================
   V8 - Screenshot based complete dark-mode corrections
   ========================================================= */
html.dark-style{
  color-scheme:dark;
  --ac-bg:#23283b;
  --ac-panel:#30364f;
  --ac-panel-2:#353c58;
  --ac-panel-3:#414862;
  --ac-border:#505976;
  --ac-text:#f4f5fb;
  --ac-muted:#aeb5ca;
  --ac-input:#2d334c;
  --ac-hover:#3a4260;
}
html.dark-style body,
html.dark-style .layout-wrapper,
html.dark-style .layout-container,
html.dark-style .layout-page,
html.dark-style .content-wrapper,
html.dark-style main,
html.dark-style .main,
html.dark-style .page-content{background:var(--ac-bg)!important;color:var(--ac-text)!important}

/* Navbar and universal search: remove every white layer */
html.dark-style #layout-navbar,
html.dark-style .layout-navbar,
html.dark-style .navbar,
html.dark-style .ac-topbar{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;box-shadow:none!important}
html.dark-style .ac-inline-search,
html.dark-style .ac-inline-search-box,
html.dark-style .navbar-search-wrapper,
html.dark-style .navbar-search-suggestion,
html.dark-style .search-input-wrapper,
html.dark-style #layout-navbar form,
html.dark-style #layout-navbar .input-group{
  background:var(--ac-input)!important;
  border-color:var(--ac-border)!important;
  color:var(--ac-text)!important;
  box-shadow:none!important;
}
html.dark-style .ac-inline-search-box input,
html.dark-style .ac-inline-search input,
html.dark-style #layout-navbar input,
html.dark-style .navbar-search-wrapper input{
  background:transparent!important;border:0!important;color:var(--ac-text)!important;box-shadow:none!important
}
html.dark-style .ac-inline-search-box input::placeholder,
html.dark-style .ac-inline-search input::placeholder,
html.dark-style #layout-navbar input::placeholder{color:#aab2c8!important;opacity:1!important}
html.dark-style .ac-inline-search-box i,
html.dark-style .ac-inline-search-box svg,
html.dark-style #layout-navbar .mdi-magnify{color:#c6cbda!important;fill:currentColor!important}

/* Universal cards, panels and page headers */
html.dark-style :where(.card,.panel,.stat,.stats-card,.stat-card,.summary,.summary-card,.kpi,.kpi-card,.stock-kpi,.top,.hero,.page-hero,.page-header,.section-card,.table-card,.filter-card,.filter-panel,.profile-card,.settings-card,.content-card,.box,.widget,.agenda-card,.cal-card,.note-card,.reminder-card,.backup-card,.modal-box){
  background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important
}
html.dark-style :where(.card-header,.panel-header,.table-card-header,.section-header,.list-header,.modal-head,.modal-foot){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(h1,h2,h3,h4,h5,h6,.title,.headline,.card-title,.panel-title,.section-title,.page-title){color:var(--ac-text)!important}
html.dark-style :where(p,small,.text-muted,.muted,.sub,.subtitle,.page-subtitle,.help-text,.form-text){color:var(--ac-muted)!important}

/* KPI children with hard-coded white backgrounds */
html.dark-style :where(.cards,.stats-grid,.summary,.summary-grid,.kpi-grid,.project-stats,.stock-stats) > *,
html.dark-style :where(.stat,.stock-kpi,.sum,.metric,.metric-card){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(.stat b,.stat strong,.stock-kpi h4,.sum strong,.metric-value,.kpi-value){color:#f4f5fb!important}

/* Every form control */
html.dark-style :where(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea,.form-control,.form-select,.input,.select,.select2-selection){background:var(--ac-input)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important}
html.dark-style :where(input,textarea)::placeholder{color:#9fa7bd!important;opacity:1!important}
html.dark-style :where(label,.form-label,.field label,legend){color:#d7dae6!important}
html.dark-style input[type=file]::file-selector-button{background:#444c69!important;color:#fff!important;border:0!important}

/* DataTables / tables - top and footer toolbars were still white */
html.dark-style :where(.dataTables_wrapper,.dt-container,.table-responsive,.table-wrap){background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}
html.dark-style :where(.dataTables_wrapper>div,.dt-container>div,.dataTables_length,.dataTables_filter,.dataTables_info,.dataTables_paginate,.dt-layout-row,.dt-layout-cell,.table-tools,.table-toolbar,.toolbar){background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}
html.dark-style :where(.dataTables_wrapper .row,.dt-container .row){background:var(--ac-panel)!important}
html.dark-style table,
html.dark-style table thead,
html.dark-style table tbody,
html.dark-style table tfoot{background:var(--ac-panel)!important;color:var(--ac-text)!important}
html.dark-style table th{background:var(--ac-panel-3)!important;color:#fff!important;border-color:var(--ac-border)!important}
html.dark-style table td{background:var(--ac-panel)!important;color:#eef0f7!important;border-color:var(--ac-border)!important}
html.dark-style table tbody tr:nth-child(even) td{background:#333a54!important}
html.dark-style table tbody tr:hover td{background:var(--ac-hover)!important}
html.dark-style table tfoot td,
html.dark-style .dataTables_wrapper .dataTables_info,
html.dark-style .dataTables_wrapper .dataTables_paginate{background:var(--ac-panel)!important;color:var(--ac-muted)!important}
html.dark-style :where(.page-link,.paginate_button){background:#343b56!important;border-color:var(--ac-border)!important;color:#e9ebf5!important}

/* Calendar cells */
html.dark-style :where(.cal-card,.agenda-card,.cal-grid,.cal-head,.cal-day,.calendar-grid,.calendar-day,.day-cell){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(.cal-day,.calendar-day,.day-cell){background:#30364f!important}
html.dark-style :where(.cal-day.muted,.calendar-day.muted,.day-cell.muted){background:#292f45!important;color:#858da5!important}
html.dark-style :where(.cal-day.today,.calendar-day.today){background:#39365b!important}
html.dark-style :where(.day-number,.agenda-name,.agenda-title){color:#f1f3fa!important}

/* Reminder and Telegram history light cards */
html.dark-style :where(.reminder-card,.history-card,.telegram-history,.notification-history,.reminders-grid>*,.history-section){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* Settings/profile/logo white blocks */
html.dark-style :where(.profile-preview,.profile-box,.logo-preview,.upload-preview,.settings-hero,.settings-banner){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* Explicit page-specific leftovers seen in screenshots */
html.dark-style .personeller-page :where(.stat,.panel),
html.dark-style .ac-personnel-page :where(.stat,.panel),
html.dark-style .ac-settings-page :where(.profile-card,.logo-card),
html.dark-style .ac-notes-page :where(.note-card,.empty),
html.dark-style .ac-help .help-card{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(.quote-paper,.white-card,.bg-white,[class*="bg-white"]){background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}

/* Buttons that are intentionally light become dark neutral */
html.dark-style :where(.btn-light,.btn-white,.btn-outline-light,.dt-button){background:#3a425f!important;border-color:#59627f!important;color:#fff!important}
html.dark-style :where(.btn-light,.btn-white,.btn-outline-light,.dt-button):hover{background:#46506e!important;color:#fff!important}

/* Keep status/icon chips readable without turning their pale badge backgrounds into full white cards */
html.dark-style :where(.badge,.status,.type,.type-badge,.badge-role,.stock-ok,.stock-low,.sum-icon,.stat-icon,.avatar){box-shadow:none!important}

/* Prevent first-paint flash: critical base is already active as soon as html.dark-style exists */
html.dark-style body{visibility:visible!important}

/* =========================================================
   V9 - Final remaining white surfaces and default-theme fix
   ========================================================= */
html.dark-style body{background:#23283b!important;color:#f4f5fb!important}

/* Standalone pages often use .main instead of .content-wrapper */
html.dark-style :where(.main,.main-content,.page-content,.content,.layout-page) :where(.top,.page-top,.page-head,.hero,.banner),
html.dark-style :where(.main,.main-content,.page-content,.content,.layout-page) :where(.stat,.panel,.card,.box,.widget,.reminder-card,.history-card,.profile-preview,.logo-preview){
  background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important
}
html.dark-style :where(.main,.main-content,.page-content,.content,.layout-page) :where(h1,h2,h3,h4,h5,h6,strong,b){color:var(--ac-text)!important}
html.dark-style :where(.main,.main-content,.page-content,.content,.layout-page) :where(.text-muted,p,small,.subtitle,.help-text){color:var(--ac-muted)!important}

/* Every navbar/search container, including pages without #layout-navbar */
html.dark-style :where(.navbar,.layout-navbar,.ac-topbar,.topbar,.header-bar,.searchbar,.search-bar,.ac-inline-search,.ac-inline-search-box){
  background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important
}
html.dark-style :where(.navbar,.layout-navbar,.ac-topbar,.topbar,.header-bar,.searchbar,.search-bar,.ac-inline-search,.ac-inline-search-box) :where(input,.form-control){
  background:transparent!important;border-color:transparent!important;color:var(--ac-text)!important;-webkit-text-fill-color:var(--ac-text)!important
}

/* Bootstrap/DataTables white utility rows */
html.dark-style :where(.dataTables_wrapper,.dt-container,.table-responsive,.table-wrap) :where(.row,.col-sm-12,.col-md-5,.col-md-6,.col-md-7,.dt-layout-row,.dt-layout-cell),
html.dark-style :where(.dataTables_wrapper,.dt-container) :where(.dataTables_length,.dataTables_filter,.dataTables_info,.dataTables_paginate),
html.dark-style :where(.table-responsive,.table-wrap) :where(.table-toolbar,.table-tools,.toolbar,.pagination-wrap,.table-footer){
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}
html.dark-style :where(.dataTables_wrapper,.dt-container,.table-responsive,.table-wrap) > :first-child,
html.dark-style :where(.dataTables_wrapper,.dt-container,.table-responsive,.table-wrap) > :last-child{
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}

/* Hard-coded Bootstrap whites */
html.dark-style :where(.bg-white,.bg-light,.card.bg-white,.table-light,.table-responsive.bg-white,.rounded.bg-white){
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}
html.dark-style :where(.table-light)>:not(caption)>*>*{background:var(--ac-panel-3)!important;color:#fff!important;border-color:var(--ac-border)!important}

/* Personnel page */
html.dark-style .main .cards .stat,
html.dark-style .main .panel,
html.dark-style .main .top{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .main .stat b{color:#f4f5fb!important}

/* Reminders and Telegram history */
html.dark-style :where(.reminders-grid,.reminder-grid) > *,
html.dark-style :where(.telegram-history,.history-section,.notification-history,.history-card),
html.dark-style :where(.telegram-history,.history-section,.notification-history) table,
html.dark-style :where(.telegram-history,.history-section,.notification-history) :where(thead,tbody,tr,th,td){
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}

/* Calendar days */
html.dark-style :where(.calendar-grid,.cal-grid) > *,
html.dark-style :where(.calendar-day,.cal-day,.day-cell,.calendar-cell){background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}

/* Settings profile preview */
html.dark-style :where(.profile-preview,.profile-box,.profile-card .user-preview,.logo-preview,.upload-preview){background:var(--ac-input)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}

/* final anti-white catch only for structural containers */
html.dark-style :where(main,.main,.content-wrapper,.page-content) :where(div,section,article,header,footer,form)[style*="background: rgb(255"],
html.dark-style :where(main,.main,.content-wrapper,.page-content) :where(div,section,article,header,footer,form)[style*="background-color: rgb(255"]{
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}


/* V10 - Mobil stabilite ve tema kaybolma koruması */
html.dark-style,html.light-style{max-width:100%;overflow-x:hidden}
html.dark-style body,html.light-style body{max-width:100%;overflow-x:hidden!important;visibility:visible!important}
html.dark-style .layout-wrapper,html.dark-style .layout-container,html.dark-style .layout-page,html.dark-style .content-wrapper,
html.light-style .layout-wrapper,html.light-style .layout-container,html.light-style .layout-page,html.light-style .content-wrapper{max-width:100%;min-width:0}

@media(max-width:767.98px){
  html.dark-style .crm-page,html.light-style .crm-page{width:100%;max-width:100%;overflow-x:hidden;padding-left:12px!important;padding-right:12px!important}
  html.dark-style .crm-toolbar,html.light-style .crm-toolbar{width:100%;max-width:100%;min-width:0}
  html.dark-style .crm-actions,html.light-style .crm-actions{width:100%;max-width:100%;min-width:0}
  html.dark-style .crm-actions>*,html.light-style .crm-actions>*{min-width:0;max-width:100%}
  html.dark-style .crm-hero,html.dark-style .crm-tabs,html.dark-style .crm-card,html.dark-style .crm-kpi,
  html.light-style .crm-hero,html.light-style .crm-tabs,html.light-style .crm-card,html.light-style .crm-kpi{width:100%;max-width:100%;min-width:0}
  html.dark-style .crm-tabs .nav-tabs,html.light-style .crm-tabs .nav-tabs{max-width:100%;overflow-x:auto!important;overflow-y:hidden!important}
  html.dark-style .crm-tab-body,html.light-style .crm-tab-body{max-width:100%;overflow-x:hidden}
  html.dark-style .crm-tab-body .table-responsive,html.light-style .crm-tab-body .table-responsive{max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  html.dark-style .apexcharts-canvas,html.dark-style .apexcharts-svg,
  html.light-style .apexcharts-canvas,html.light-style .apexcharts-svg{max-width:100%!important}
}


/* RESTORED NIGHT MODE LEGACY RULES */
/* Alcatraz Finans V7 — global, consistent dark theme override */
html.dark-style{
  --ac-bg:#22263a;--ac-bg-deep:#191d2a;--ac-panel:#30354d;--ac-panel-2:#343a55;--ac-panel-3:#3b415e;
  --ac-input:#2c3149;--ac-hover:#3b425f;--ac-border:#4a516e;--ac-text:#f2f3f8;--ac-muted:#aeb3c7;
  --ac-primary:#7567f8;--ac-success:#26d184;--ac-danger:#ff5d6c;--ac-warning:#ffad4d;--ac-info:#26c6da;
  color-scheme:dark;
}
html.dark-style,html.dark-style body{background:var(--ac-bg)!important;color:var(--ac-text)!important}
html.dark-style body{opacity:1!important}
html.dark-style :where(.layout-wrapper,.layout-container,.layout-page,.content-wrapper,.container-xxl,.container-fluid,.ac-page,main){background:var(--ac-bg)!important;color:var(--ac-text)!important}

/* topbar and search */
html.dark-style :where(#layout-navbar,.layout-navbar,.navbar,.ac-topbar){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important}
html.dark-style :where(#layout-navbar,.layout-navbar) :where(.ac-inline-search,.ac-inline-search-box,.navbar-search-wrapper,.navbar-search-suggestion,.search-input-wrapper,.search-box){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important}
html.dark-style :where(#layout-navbar,.layout-navbar) :where(input,.form-control,.search-input){background:transparent!important;border-color:transparent!important;color:var(--ac-text)!important;-webkit-text-fill-color:var(--ac-text)!important}
html.dark-style :where(#layout-navbar,.layout-navbar) input::placeholder{color:#aeb3c7!important;opacity:1!important}
html.dark-style :where(#layout-navbar,.layout-navbar) :where(i,svg,.nav-link,.navbar-nav-right){color:#d9dcea!important;fill:currentColor!important}

/* universal surfaces inside application content */
html.dark-style .content-wrapper :where(.card,.card-body,.card-header,.card-footer,.panel,.box,.widget,.content-box,.page-card,.form-card,.table-card,.filter-card,.list-card,.summary-card,.metric-card,.stat-card,.kpi-card,.dashboard-card,.modal-content,.offcanvas,.accordion-item,.accordion-button,.list-group-item,.dropdown-menu,.popover,.toast,.ac-panel,.ac-summary,.ac-toolbar,.ac-module-head,.v7-card,.v7-kpi,.v7-welcome){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where([class*="summary"],[class*="metric"],[class*="stat-"],[class*="stats-"],[class*="kpi"],[class*="overview"],[class*="filter"],[class*="toolbar"],[class*="list-head"],[class*="section-head"]){border-color:var(--ac-border)!important}

/* override inline white/light surfaces without destroying semantic badges/buttons */
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background:#fff"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background: #fff"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background:white"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background: white"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background-color:#fff"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background-color: #fff"],
html.dark-style .content-wrapper :where(div,section,article,header,footer,main,aside,form,fieldset)[style*="background-color:white"]{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* headings and text contrast */
html.dark-style .content-wrapper :where(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,.card-title,.panel-title,.section-title,.page-title,strong,b){color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(p,label,.form-label,.col-form-label,.small,small,.text-muted,.help-text,.form-text,.subtitle,.description){color:var(--ac-muted)!important}
html.dark-style .content-wrapper :where(.text-dark,.text-body,.text-black){color:var(--ac-text)!important}

/* forms */
html.dark-style .content-wrapper :where(input:not([type=checkbox]):not([type=radio]),textarea,select,.form-control,.form-select,.input-group-text,.select2-selection,.choices__inner,.form-floating>.form-control){background:var(--ac-input)!important;border-color:#515a79!important;color:var(--ac-text)!important;-webkit-text-fill-color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(input,textarea)::placeholder{color:#9197ad!important;opacity:1!important}
html.dark-style .content-wrapper :where(input,textarea,select,.form-control,.form-select):focus{background:#2e344d!important;border-color:var(--ac-primary)!important;color:#fff!important;box-shadow:0 0 0 3px rgba(117,103,248,.18)!important}
html.dark-style .content-wrapper option{background:#2d3249!important;color:#fff!important}
html.dark-style .content-wrapper .form-floating>label{color:#aeb3c7!important;background:transparent!important}

/* tables */
html.dark-style .content-wrapper :where(.table-responsive,.table-wrap,.dataTables_wrapper,.dt-container){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper table{--bs-table-bg:transparent!important;--bs-table-color:#dde0eb!important;--bs-table-border-color:var(--ac-border)!important;background:var(--ac-panel)!important;color:#dde0eb!important}
html.dark-style .content-wrapper table :where(thead,thead tr,thead th){background:var(--ac-panel-3)!important;color:#fff!important;border-color:#545b79!important}
html.dark-style .content-wrapper table :where(tbody,tbody tr,tbody td){background:var(--ac-panel)!important;color:#dde0eb!important;border-color:var(--ac-border)!important}
html.dark-style .content-wrapper table tbody tr:nth-child(even),html.dark-style .content-wrapper table tbody tr:nth-child(even) td{background:#333951!important}
html.dark-style .content-wrapper table tbody tr:hover,html.dark-style .content-wrapper table tbody tr:hover td{background:var(--ac-hover)!important;color:#fff!important}
html.dark-style .content-wrapper :where(.dataTables_info,.dataTables_length,.dataTables_filter,.dataTables_paginate){color:var(--ac-muted)!important}

/* specific modules that previously remained light */
html.dark-style .content-wrapper :where(.calendar-wrap,.calendar-container,.calendar-card,.calendar-sidebar,.upcoming-events,.calendar-grid,.calendar-header,.calendar-weekdays,.calendar-day,.day-cell,.fc-view-harness,.fc-scrollgrid,.fc-daygrid-day,.fc-list,.fc-list-day-cushion){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.calendar-grid>div,.calendar-weekdays>div,.fc-theme-standard td,.fc-theme-standard th){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.calendar-day.other-month,.day-cell.muted,.fc-day-other){background:#292e43!important;color:#858ba1!important}
html.dark-style .content-wrapper :where(.kanban-board,.kanban-column,.kanban-lane,.task-column,.board-column,.kanban-empty,.empty-state,.empty-box){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.kanban-card,.task-card,.project-card){background:var(--ac-panel-2)!important;border-color:#555d7c!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.backup-card,.backup-panel,.backup-list,.backup-item,.backup-row,.file-row,.notification-item,.activity-item){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* common page-specific classes */
html.dark-style .content-wrapper :where(.stats-grid,.stat-grid,.summary-grid,.project-stats,.debt-summary,.income-summary,.expense-summary)>*{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .content-wrapper :where(.list-header,.table-header,.card-title-row,.section-header,.filter-section,.filter-box,.search-filter,.search-panel){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* buttons that were white */
html.dark-style .content-wrapper :where(.btn-light,.btn-white,.btn-outline-light){background:#3b425f!important;border-color:#56607f!important;color:#fff!important}
html.dark-style .content-wrapper :where(.btn-light,.btn-white,.btn-outline-light):hover{background:#46506f!important;color:#fff!important}
html.dark-style .content-wrapper .btn-primary{background:linear-gradient(135deg,#7b6df8,#6758e8)!important;border-color:transparent!important;color:#fff!important}

/* dropdowns, pagination, modal */
html.dark-style :where(.dropdown-menu,.modal-content,.offcanvas,.popover,.toast){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(.dropdown-item,.page-link){background:transparent!important;color:#dfe2ed!important;border-color:var(--ac-border)!important}
html.dark-style :where(.dropdown-item:hover,.dropdown-item:focus,.page-link:hover){background:var(--ac-hover)!important;color:#fff!important}

/* chart text */
html.dark-style :where(.apexcharts-text,.apexcharts-legend-text){fill:#b7bccf!important;color:#b7bccf!important}
html.dark-style .apexcharts-gridline{stroke:#454c68!important}

/* no flash: hide until bootstrap theme class is applied */
html:not(.dark-style):not(.light-style) body{visibility:hidden!important}
html.dark-style body,html.light-style body{visibility:visible!important}

/* =========================================================
   V8 - Screenshot based complete dark-mode corrections
   ========================================================= */
html.dark-style{
  color-scheme:dark;
  --ac-bg:#23283b;
  --ac-panel:#30364f;
  --ac-panel-2:#353c58;
  --ac-panel-3:#414862;
  --ac-border:#505976;
  --ac-text:#f4f5fb;
  --ac-muted:#aeb5ca;
  --ac-input:#2d334c;
  --ac-hover:#3a4260;
}
html.dark-style body,
html.dark-style .layout-wrapper,
html.dark-style .layout-container,
html.dark-style .layout-page,
html.dark-style .content-wrapper,
html.dark-style main,
html.dark-style .main,
html.dark-style .page-content{background:var(--ac-bg)!important;color:var(--ac-text)!important}

/* Navbar and universal search: remove every white layer */
html.dark-style #layout-navbar,
html.dark-style .layout-navbar,
html.dark-style .navbar,
html.dark-style .ac-topbar{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;box-shadow:none!important}
html.dark-style .ac-inline-search,
html.dark-style .ac-inline-search-box,
html.dark-style .navbar-search-wrapper,
html.dark-style .navbar-search-suggestion,
html.dark-style .search-input-wrapper,
html.dark-style #layout-navbar form,
html.dark-style #layout-navbar .input-group{
  background:var(--ac-input)!important;
  border-color:var(--ac-border)!important;
  color:var(--ac-text)!important;
  box-shadow:none!important;
}
html.dark-style .ac-inline-search-box input,
html.dark-style .ac-inline-search input,
html.dark-style #layout-navbar input,
html.dark-style .navbar-search-wrapper input{
  background:transparent!important;border:0!important;color:var(--ac-text)!important;box-shadow:none!important
}
html.dark-style .ac-inline-search-box input::placeholder,
html.dark-style .ac-inline-search input::placeholder,
html.dark-style #layout-navbar input::placeholder{color:#aab2c8!important;opacity:1!important}
html.dark-style .ac-inline-search-box i,
html.dark-style .ac-inline-search-box svg,
html.dark-style #layout-navbar .mdi-magnify{color:#c6cbda!important;fill:currentColor!important}

/* Universal cards, panels and page headers */
html.dark-style :where(.card,.panel,.stat,.stats-card,.stat-card,.summary,.summary-card,.kpi,.kpi-card,.stock-kpi,.top,.hero,.page-hero,.page-header,.section-card,.table-card,.filter-card,.filter-panel,.profile-card,.settings-card,.content-card,.box,.widget,.agenda-card,.cal-card,.note-card,.reminder-card,.backup-card,.modal-box){
  background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important
}
html.dark-style :where(.card-header,.panel-header,.table-card-header,.section-header,.list-header,.modal-head,.modal-foot){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(h1,h2,h3,h4,h5,h6,.title,.headline,.card-title,.panel-title,.section-title,.page-title){color:var(--ac-text)!important}
html.dark-style :where(p,small,.text-muted,.muted,.sub,.subtitle,.page-subtitle,.help-text,.form-text){color:var(--ac-muted)!important}

/* KPI children with hard-coded white backgrounds */
html.dark-style :where(.cards,.stats-grid,.summary,.summary-grid,.kpi-grid,.project-stats,.stock-stats) > *,
html.dark-style :where(.stat,.stock-kpi,.sum,.metric,.metric-card){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(.stat b,.stat strong,.stock-kpi h4,.sum strong,.metric-value,.kpi-value){color:#f4f5fb!important}

/* Every form control */
html.dark-style :where(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea,.form-control,.form-select,.input,.select,.select2-selection){background:var(--ac-input)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important}
html.dark-style :where(input,textarea)::placeholder{color:#9fa7bd!important;opacity:1!important}
html.dark-style :where(label,.form-label,.field label,legend){color:#d7dae6!important}
html.dark-style input[type=file]::file-selector-button{background:#444c69!important;color:#fff!important;border:0!important}

/* DataTables / tables - top and footer toolbars were still white */
html.dark-style :where(.dataTables_wrapper,.dt-container,.table-responsive,.table-wrap){background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}
html.dark-style :where(.dataTables_wrapper>div,.dt-container>div,.dataTables_length,.dataTables_filter,.dataTables_info,.dataTables_paginate,.dt-layout-row,.dt-layout-cell,.table-tools,.table-toolbar,.toolbar){background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}
html.dark-style :where(.dataTables_wrapper .row,.dt-container .row){background:var(--ac-panel)!important}
html.dark-style table,
html.dark-style table thead,
html.dark-style table tbody,
html.dark-style table tfoot{background:var(--ac-panel)!important;color:var(--ac-text)!important}
html.dark-style table th{background:var(--ac-panel-3)!important;color:#fff!important;border-color:var(--ac-border)!important}
html.dark-style table td{background:var(--ac-panel)!important;color:#eef0f7!important;border-color:var(--ac-border)!important}
html.dark-style table tbody tr:nth-child(even) td{background:#333a54!important}
html.dark-style table tbody tr:hover td{background:var(--ac-hover)!important}
html.dark-style table tfoot td,
html.dark-style .dataTables_wrapper .dataTables_info,
html.dark-style .dataTables_wrapper .dataTables_paginate{background:var(--ac-panel)!important;color:var(--ac-muted)!important}
html.dark-style :where(.page-link,.paginate_button){background:#343b56!important;border-color:var(--ac-border)!important;color:#e9ebf5!important}

/* Calendar cells */
html.dark-style :where(.cal-card,.agenda-card,.cal-grid,.cal-head,.cal-day,.calendar-grid,.calendar-day,.day-cell){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(.cal-day,.calendar-day,.day-cell){background:#30364f!important}
html.dark-style :where(.cal-day.muted,.calendar-day.muted,.day-cell.muted){background:#292f45!important;color:#858da5!important}
html.dark-style :where(.cal-day.today,.calendar-day.today){background:#39365b!important}
html.dark-style :where(.day-number,.agenda-name,.agenda-title){color:#f1f3fa!important}

/* Reminder and Telegram history light cards */
html.dark-style :where(.reminder-card,.history-card,.telegram-history,.notification-history,.reminders-grid>*,.history-section){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* Settings/profile/logo white blocks */
html.dark-style :where(.profile-preview,.profile-box,.logo-preview,.upload-preview,.settings-hero,.settings-banner){background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}

/* Explicit page-specific leftovers seen in screenshots */
html.dark-style .personeller-page :where(.stat,.panel),
html.dark-style .ac-personnel-page :where(.stat,.panel),
html.dark-style .ac-settings-page :where(.profile-card,.logo-card),
html.dark-style .ac-notes-page :where(.note-card,.empty),
html.dark-style .ac-help .help-card{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style :where(.quote-paper,.white-card,.bg-white,[class*="bg-white"]){background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}

/* Buttons that are intentionally light become dark neutral */
html.dark-style :where(.btn-light,.btn-white,.btn-outline-light,.dt-button){background:#3a425f!important;border-color:#59627f!important;color:#fff!important}
html.dark-style :where(.btn-light,.btn-white,.btn-outline-light,.dt-button):hover{background:#46506e!important;color:#fff!important}

/* Keep status/icon chips readable without turning their pale badge backgrounds into full white cards */
html.dark-style :where(.badge,.status,.type,.type-badge,.badge-role,.stock-ok,.stock-low,.sum-icon,.stat-icon,.avatar){box-shadow:none!important}

/* Prevent first-paint flash: critical base is already active as soon as html.dark-style exists */
html.dark-style body{visibility:visible!important}

/* =========================================================
   V9 - Final remaining white surfaces and default-theme fix
   ========================================================= */
html.dark-style body{background:#23283b!important;color:#f4f5fb!important}

/* Standalone pages often use .main instead of .content-wrapper */
html.dark-style :where(.main,.main-content,.page-content,.content,.layout-page) :where(.top,.page-top,.page-head,.hero,.banner),
html.dark-style :where(.main,.main-content,.page-content,.content,.layout-page) :where(.stat,.panel,.card,.box,.widget,.reminder-card,.history-card,.profile-preview,.logo-preview){
  background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important
}
html.dark-style :where(.main,.main-content,.page-content,.content,.layout-page) :where(h1,h2,h3,h4,h5,h6,strong,b){color:var(--ac-text)!important}
html.dark-style :where(.main,.main-content,.page-content,.content,.layout-page) :where(.text-muted,p,small,.subtitle,.help-text){color:var(--ac-muted)!important}

/* Every navbar/search container, including pages without #layout-navbar */
html.dark-style :where(.navbar,.layout-navbar,.ac-topbar,.topbar,.header-bar,.searchbar,.search-bar,.ac-inline-search,.ac-inline-search-box){
  background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important;box-shadow:none!important
}
html.dark-style :where(.navbar,.layout-navbar,.ac-topbar,.topbar,.header-bar,.searchbar,.search-bar,.ac-inline-search,.ac-inline-search-box) :where(input,.form-control){
  background:transparent!important;border-color:transparent!important;color:var(--ac-text)!important;-webkit-text-fill-color:var(--ac-text)!important
}

/* Bootstrap/DataTables white utility rows */
html.dark-style :where(.dataTables_wrapper,.dt-container,.table-responsive,.table-wrap) :where(.row,.col-sm-12,.col-md-5,.col-md-6,.col-md-7,.dt-layout-row,.dt-layout-cell),
html.dark-style :where(.dataTables_wrapper,.dt-container) :where(.dataTables_length,.dataTables_filter,.dataTables_info,.dataTables_paginate),
html.dark-style :where(.table-responsive,.table-wrap) :where(.table-toolbar,.table-tools,.toolbar,.pagination-wrap,.table-footer){
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}
html.dark-style :where(.dataTables_wrapper,.dt-container,.table-responsive,.table-wrap) > :first-child,
html.dark-style :where(.dataTables_wrapper,.dt-container,.table-responsive,.table-wrap) > :last-child{
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}

/* Hard-coded Bootstrap whites */
html.dark-style :where(.bg-white,.bg-light,.card.bg-white,.table-light,.table-responsive.bg-white,.rounded.bg-white){
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}
html.dark-style :where(.table-light)>:not(caption)>*>*{background:var(--ac-panel-3)!important;color:#fff!important;border-color:var(--ac-border)!important}

/* Personnel page */
html.dark-style .main .cards .stat,
html.dark-style .main .panel,
html.dark-style .main .top{background:var(--ac-panel)!important;border-color:var(--ac-border)!important;color:var(--ac-text)!important}
html.dark-style .main .stat b{color:#f4f5fb!important}

/* Reminders and Telegram history */
html.dark-style :where(.reminders-grid,.reminder-grid) > *,
html.dark-style :where(.telegram-history,.history-section,.notification-history,.history-card),
html.dark-style :where(.telegram-history,.history-section,.notification-history) table,
html.dark-style :where(.telegram-history,.history-section,.notification-history) :where(thead,tbody,tr,th,td){
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}

/* Calendar days */
html.dark-style :where(.calendar-grid,.cal-grid) > *,
html.dark-style :where(.calendar-day,.cal-day,.day-cell,.calendar-cell){background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}

/* Settings profile preview */
html.dark-style :where(.profile-preview,.profile-box,.profile-card .user-preview,.logo-preview,.upload-preview){background:var(--ac-input)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important}

/* final anti-white catch only for structural containers */
html.dark-style :where(main,.main,.content-wrapper,.page-content) :where(div,section,article,header,footer,form)[style*="background: rgb(255"],
html.dark-style :where(main,.main,.content-wrapper,.page-content) :where(div,section,article,header,footer,form)[style*="background-color: rgb(255"]{
  background:var(--ac-panel)!important;color:var(--ac-text)!important;border-color:var(--ac-border)!important
}


/* ===== FINAL DATATABLE FIX ===== */
html.dark-style .dataTables_wrapper .dataTables_length,
html.dark-style .dataTables_wrapper .dataTables_filter,
html.dark-style .dataTables_wrapper .dataTables_info,
html.dark-style .dataTables_wrapper .dataTables_paginate,
html.dark-style .dataTables_wrapper .dt-buttons,
html.dark-style .dataTables_wrapper .top,
html.dark-style .dataTables_wrapper .bottom{
background:var(--ac-panel)!important;
color:var(--ac-text)!important;
border-color:var(--ac-border)!important;
}
html.dark-style .dataTables_wrapper .top *,
html.dark-style .dataTables_wrapper .bottom *{
background:transparent!important;
color:var(--ac-text)!important;
}

/* =========================================================
   V12 - ALCATRAZ SMART TABLE EXACT DARK MODE FIX
   alcatraz-tables-v2.1.js tarafından sonradan üretilen gerçek sınıflar
   ========================================================= */
html.dark-style .alc-table-shell{
  background:#30354d!important;
  border-color:#4a526f!important;
  color:#f3f5ff!important;
  box-shadow:none!important;
}
html.dark-style .alc-table-toolbar,
html.dark-style .alc-table-footer{
  background:#30354d!important;
  background-image:none!important;
  border-color:#4a526f!important;
  color:#f3f5ff!important;
}
html.dark-style .alc-table-tools,
html.dark-style .alc-table-actions,
html.dark-style .alc-pagination,
html.dark-style .alc-table-info{
  background:transparent!important;
  color:#aeb7d0!important;
}
html.dark-style .alc-table-search{
  background:transparent!important;
}
html.dark-style .alc-table-search input,
html.dark-style .alc-page-size{
  background:#252a40!important;
  color:#f3f5ff!important;
  border-color:#4a526f!important;
  -webkit-text-fill-color:#f3f5ff!important;
  box-shadow:none!important;
}
html.dark-style .alc-table-search input::placeholder{
  color:#9da7c2!important;
  opacity:1!important;
}
html.dark-style .alc-table-search i{
  color:#9da7c2!important;
}
html.dark-style .alc-table-btn{
  background:#252a40!important;
  color:#f3f5ff!important;
  border-color:#4a526f!important;
  box-shadow:none!important;
}
html.dark-style .alc-table-btn:hover{
  background:#3a425f!important;
  color:#fff!important;
  border-color:#7367f0!important;
}
html.dark-style .alc-table-wrap,
html.dark-style .alc-smart-table{
  background:#30354d!important;
  color:#f3f5ff!important;
}
html.dark-style .alc-smart-table thead th{
  background:#3a405b!important;
  color:#f5f7ff!important;
  border-color:#505874!important;
}
html.dark-style .alc-smart-table tbody td{
  background:#30354d!important;
  color:#eef1ff!important;
  border-color:#4a526f!important;
}
html.dark-style .alc-smart-table tbody tr:nth-child(even) td{
  background:#333a54!important;
}
html.dark-style .alc-smart-table tbody tr:hover td{
  background:#39405b!important;
}
html.dark-style .alc-page-btn{
  background:#252a40!important;
  color:#dce2f5!important;
  border-color:#4a526f!important;
}
html.dark-style .alc-page-btn:hover:not(:disabled){
  background:#3a425f!important;
  color:#fff!important;
  border-color:#7367f0!important;
}
html.dark-style .alc-page-btn.active{
  background:#7367f0!important;
  color:#fff!important;
  border-color:#7367f0!important;
}
html.dark-style .alc-page-btn:disabled{
  background:#292f45!important;
  color:#737c96!important;
  border-color:#3f4864!important;
}

/* Rapor Merkezi müşteri tablosu: Bootstrap/card miraslarını da ez */
html.dark-style .report-center .report-card .alc-table-shell,
html.dark-style .report-center .report-card .alc-table-toolbar,
html.dark-style .report-center .report-card .alc-table-footer,
html.dark-style .report-center .report-card .alc-table-wrap{
  background:#30354d!important;
  background-image:none!important;
  border-color:#4a526f!important;
}


/* =========================================================
   V14 - GİDERLER TABLOSU SAYFASI: üst/alt akıllı tablo şeritleri
   ========================================================= */
html.dark-style .giderler-page .alc-table-shell,
html.dark-style .giderler-page .alc-table-toolbar,
html.dark-style .giderler-page .alc-table-footer,
html.dark-style .giderler-page .alc-table-wrap{
  background:#30354d!important;
  background-color:#30354d!important;
  background-image:none!important;
  color:#f3f5ff!important;
  border-color:#4a526f!important;
  box-shadow:none!important;
}
html.dark-style .giderler-page .alc-table-toolbar::before,
html.dark-style .giderler-page .alc-table-toolbar::after,
html.dark-style .giderler-page .alc-table-footer::before,
html.dark-style .giderler-page .alc-table-footer::after{
  background:#30354d!important;
  background-image:none!important;
}
html.dark-style .giderler-page .alc-table-toolbar > *,
html.dark-style .giderler-page .alc-table-footer > *{
  background-color:transparent!important;
}
html.dark-style .giderler-page .alc-table-info,
html.dark-style .giderler-page .alc-pagination,
html.dark-style .giderler-page .alc-table-tools,
html.dark-style .giderler-page .alc-table-actions{
  color:#aeb7d0!important;
}
html.dark-style .giderler-page .alc-table-search input,
html.dark-style .giderler-page .alc-page-size{
  background:#252a40!important;
  color:#f3f5ff!important;
  -webkit-text-fill-color:#f3f5ff!important;
  border-color:#4a526f!important;
}
html.dark-style .giderler-page .alc-table-btn{
  background:#252a40!important;
  color:#f3f5ff!important;
  border-color:#4a526f!important;
}
html.dark-style .giderler-page .alc-page-btn{
  background:#252a40!important;
  color:#dce2f5!important;
  border-color:#4a526f!important;
}
html.dark-style .giderler-page .alc-page-btn.active{
  background:#7367f0!important;
  color:#fff!important;
  border-color:#7367f0!important;
}
/* JS sarmalayıcı oluşmadan önceki tablo alanını da koyu tut */
html.dark-style .giderler-page .table-responsive,
html.dark-style .giderler-page .v3-card .card-body,
html.dark-style .giderler-page .v3-actions{
  background:#30354d!important;
  color:#f3f5ff!important;
  border-color:#4a526f!important;
}

/* =========================================================
   V15 - KATEGORİLER SAYFASI / TAM GECE MODU
   ========================================================= */
html.dark-style body.kategoriler-page .alc-table-shell,
html.dark-style body.kategoriler-page .alc-table-wrap,
html.dark-style body.kategoriler-page .alc-table-toolbar,
html.dark-style body.kategoriler-page .alc-table-footer{
  background:#303750 !important;
  background-image:none !important;
  border-color:#4b5575 !important;
  color:#f4f6fb !important;
  box-shadow:none !important;
}

html.dark-style body.kategoriler-page .alc-table-toolbar,
html.dark-style body.kategoriler-page .alc-table-footer{
  display:flex !important;
}

html.dark-style body.kategoriler-page .alc-table-toolbar::before,
html.dark-style body.kategoriler-page .alc-table-toolbar::after,
html.dark-style body.kategoriler-page .alc-table-footer::before,
html.dark-style body.kategoriler-page .alc-table-footer::after{
  background:#303750 !important;
  background-image:none !important;
}

html.dark-style body.kategoriler-page .alc-table-toolbar > *,
html.dark-style body.kategoriler-page .alc-table-footer > *,
html.dark-style body.kategoriler-page .alc-table-info,
html.dark-style body.kategoriler-page .alc-table-tools,
html.dark-style body.kategoriler-page .alc-table-actions,
html.dark-style body.kategoriler-page .alc-pagination{
  background:transparent !important;
  color:#cbd3e7 !important;
}

html.dark-style body.kategoriler-page .alc-table-search,
html.dark-style body.kategoriler-page .alc-table-search input,
html.dark-style body.kategoriler-page .alc-page-size{
  background:#262d45 !important;
  color:#ffffff !important;
  border-color:#515c7a !important;
  box-shadow:none !important;
}

html.dark-style body.kategoriler-page .alc-table-search input::placeholder{
  color:#aab3c8 !important;
  opacity:1 !important;
}

html.dark-style body.kategoriler-page .alc-table-btn{
  background:#303750 !important;
  color:#f7f8fc !important;
  border-color:#596482 !important;
  box-shadow:none !important;
}
html.dark-style body.kategoriler-page .alc-table-btn:hover{
  background:#3a435f !important;
  color:#ffffff !important;
}

html.dark-style body.kategoriler-page .alc-page-btn{
  background:#262d45 !important;
  color:#dce2f0 !important;
  border-color:#515c7a !important;
}
html.dark-style body.kategoriler-page .alc-page-btn.active{
  background:#6c5ce7 !important;
  color:#ffffff !important;
  border-color:#6c5ce7 !important;
}
html.dark-style body.kategoriler-page .alc-page-btn:disabled{
  opacity:.45 !important;
}

html.dark-style body.kategoriler-page .alc-smart-table,
html.dark-style body.kategoriler-page .table{
  background:#303750 !important;
  color:#ffffff !important;
}
html.dark-style body.kategoriler-page .alc-smart-table thead th,
html.dark-style body.kategoriler-page .table thead th{
  background:#3b435f !important;
  color:#ffffff !important;
  border-color:#515c7a !important;
}
html.dark-style body.kategoriler-page .alc-smart-table tbody td,
html.dark-style body.kategoriler-page .table tbody td{
  background:#303750 !important;
  color:#f3f5fb !important;
  border-color:#46506d !important;
}
html.dark-style body.kategoriler-page .alc-smart-table tbody tr:hover td,
html.dark-style body.kategoriler-page .table tbody tr:hover td{
  background:#353d58 !important;
}
