#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

:root {
    font-size: var(--rz-root-font-size);
    --rz-white: #ffffff;
    --rz-black: #000000;
    --rz-base-50: #ffffff;
    --rz-base-100: #f3f5f7;
    --rz-base-200: #ebeef2;
    --rz-base-300: #d9e1ea;
    --rz-base-400: #87a4c4;
    --rz-base-500: #466791;
    --rz-base-600: #3f618d;
    --rz-base-700: #395374;
    --rz-base-800: #30445f;
    --rz-base-900: #2b3a50;
    --rz-primary: #a9352d;
    --rz-primary-light: #b34d46;
    --rz-primary-lighter: rgba(169, 53, 45, 0.16);
    --rz-primary-dark: #9b3129;
    --rz-primary-darker: #7f2822;
    --rz-secondary: #005fad;
    --rz-secondary-light: #1f72b7;
    --rz-secondary-lighter: rgba(0, 95, 173, 0.2);
    --rz-secondary-dark: #00579f;
    --rz-secondary-darker: #004782;
    --rz-info: #026969;
    --rz-info-light: #2a8181;
    --rz-info-lighter: rgba(2, 105, 105, 0.2);
    --rz-info-dark: #025858;
    --rz-info-darker: #024f4f;
    --rz-success: #0f6c23;
    --rz-success-light: #358446;
    --rz-success-lighter: rgba(15, 108, 35, 0.16);
    --rz-success-dark: #0d5b1d;
    --rz-success-darker: #0b511a;
    --rz-warning: #fac152;
    --rz-warning-light: #fbcb6e;
    --rz-warning-lighter: rgba(250, 193, 82, 0.2);
    --rz-warning-dark: #d2a245;
    --rz-warning-darker: #bc913e;
    --rz-danger: #b2242e;
    --rz-danger-light: #be474f;
    --rz-danger-lighter: rgba(178, 36, 46, 0.2);
    --rz-danger-dark: #961e27;
    --rz-danger-darker: #861b23;
    --rz-on-primary: #ffffff;
    --rz-on-primary-light: #ffffff;
    --rz-on-primary-lighter: #a9352d;
    --rz-on-primary-dark: #ffffff;
    --rz-on-primary-darker: #ffffff;
    --rz-on-secondary: #ffffff;
    --rz-on-secondary-light: #ffffff;
    --rz-on-secondary-lighter: #005fad;
    --rz-on-secondary-dark: #ffffff;
    --rz-on-secondary-darker: #ffffff;
    --rz-on-info: #ffffff;
    --rz-on-info-light: #ffffff;
    --rz-on-info-lighter: #026969;
    --rz-on-info-dark: #ffffff;
    --rz-on-info-darker: #ffffff;
    --rz-on-success: #ffffff;
    --rz-on-success-light: #ffffff;
    --rz-on-success-lighter: #0f6c23;
    --rz-on-success-dark: #ffffff;
    --rz-on-success-darker: #ffffff;
    --rz-on-warning: #000000;
    --rz-on-warning-light: #000000;
    --rz-on-warning-lighter: #fac152;
    --rz-on-warning-dark: #000000;
    --rz-on-warning-darker: #000000;
    --rz-on-danger: #ffffff;
    --rz-on-danger-light: #ffffff;
    --rz-on-danger-lighter: #b2242e;
    --rz-on-danger-dark: #ffffff;
    --rz-on-danger-darker: #ffffff;
    --rz-series-1: #f0eb75;
    --rz-series-2: #99f075;
    --rz-series-3: #75f0ad;
    --rz-series-4: #75d6f0;
    --rz-series-5: #757af0;
    --rz-series-6: #cc75f0;
    --rz-series-7: #f075b8;
    --rz-series-8: #f08f75;
    --rz-series-9: #ebe447;
    --rz-series-10: #77eb47;
    --rz-series-11: #47eb92;
    --rz-series-12: #47c9eb;
    --rz-series-13: #474eeb;
    --rz-series-14: #bb47eb;
    --rz-series-15: #eb47a0;
    --rz-series-16: #eb6947;
    --rz-series-17: #b8b33d;
    --rz-series-18: #61b83d;
    --rz-series-19: #3db875;
    --rz-series-20: #3d9eb8;
    --rz-series-21: #3d42b8;
    --rz-series-22: #943db8;
    --rz-series-23: #b83d80;
    --rz-series-24: #b8573d;
}

/* ===== Satır renk sınıfları ===== */
.row-red, .cell-red {
    background-color: #fee2e2 !important;
}

.row-green, .cell-green {
    background-color: #dcfce7 !important;
}

/* ===== DARK THEME ===== */
body.dark-theme {
    --rz-white: #1e293b;
    --rz-black: #e2e8f0;
    --rz-base-50: #0f172a;
    --rz-base-100: #1e293b;
    --rz-base-200: #334155;
    --rz-base-300: #475569;
    --rz-base-400: #64748b;
    --rz-base-500: #94a3b8;
    --rz-base-600: #cbd5e1;
    --rz-base-700: #e2e8f0;
    --rz-base-800: #f1f5f9;
    --rz-base-900: #f8fafc;
    --rz-primary: #dc4a42;
    --rz-primary-light: #e8706a;
    --rz-primary-lighter: rgba(220, 74, 66, 0.2);
    --rz-primary-dark: #c43a32;
    --rz-primary-darker: #a9352d;
    --rz-secondary: #3b82f6;
    --rz-secondary-light: #60a5fa;
    --rz-secondary-lighter: rgba(59, 130, 246, 0.2);
    --rz-secondary-dark: #2563eb;
    --rz-secondary-darker: #1d4ed8;
    --rz-info: #06b6d4;
    --rz-info-light: #22d3ee;
    --rz-info-lighter: rgba(6, 182, 212, 0.2);
    --rz-info-dark: #0891b2;
    --rz-info-darker: #0e7490;
    --rz-success: #22c55e;
    --rz-success-light: #4ade80;
    --rz-success-lighter: rgba(34, 197, 94, 0.2);
    --rz-success-dark: #16a34a;
    --rz-success-darker: #15803d;
    --rz-warning: #f59e0b;
    --rz-warning-light: #fbbf24;
    --rz-warning-lighter: rgba(245, 158, 11, 0.2);
    --rz-warning-dark: #d97706;
    --rz-warning-darker: #b45309;
    --rz-danger: #ef4444;
    --rz-danger-light: #f87171;
    --rz-danger-lighter: rgba(239, 68, 68, 0.2);
    --rz-danger-dark: #dc2626;
    --rz-danger-darker: #b91c1c;
    --rz-on-primary: #ffffff;
    --rz-on-primary-lighter: #dc4a42;
    --rz-on-secondary: #ffffff;
    --rz-on-secondary-lighter: #3b82f6;
    --rz-on-info: #ffffff;
    --rz-on-info-lighter: #06b6d4;
    --rz-on-success: #ffffff;
    --rz-on-success-lighter: #22c55e;
    --rz-on-warning: #000000;
    --rz-on-warning-lighter: #f59e0b;
    --rz-on-danger: #ffffff;
    --rz-on-danger-lighter: #ef4444;
    --rz-text-color: #e2e8f0;
    --rz-text-secondary-color: #94a3b8;
    --rz-text-tertiary-color: #64748b;
    --rz-text-disabled-color: #475569;
    --rz-body-background-color: #0f172a;
    --rz-base-background-color: #1e293b;
    --rz-link-color: #60a5fa;
    --rz-link-hover-color: #93bbfd;
    --rz-border-color: #334155;
    --rz-border-200: #334155;
    --rz-input-background-color: #1e293b;
    --rz-input-border-color: #475569;
    --rz-input-color: #e2e8f0;
    --rz-input-filled-background-color: #1e293b;
    --rz-panel-background-color: #1e293b;
    --rz-panel-menu-item-color: #cbd5e1;
    --rz-panel-menu-item-hover-background-color: rgba(255,255,255,0.06);
    --rz-panel-menu-item-selected-background-color: rgba(220, 74, 66, 0.15);
    --rz-panel-menu-item-selected-color: #dc4a42;
    --rz-header-background-color: #1e293b;
    --rz-header-color: #e2e8f0;
    --rz-sidebar-background-color: #0f172a;
    --rz-sidebar-color: #cbd5e1;
    --rz-grid-header-background-color: #1e293b;
    --rz-grid-header-color: #e2e8f0;
    --rz-grid-row-background-color: #0f172a;
    --rz-grid-row-color: #e2e8f0;
    --rz-grid-row-hover-background-color: rgba(255,255,255,0.04);
    --rz-grid-alt-row-background-color: #162032;
    --rz-grid-cell-border-color: #334155;
    --rz-dialog-background-color: #1e293b;
    --rz-dialog-color: #e2e8f0;
    --rz-dialog-titlebar-background-color: #1e293b;
    --rz-dialog-titlebar-color: #e2e8f0;
    --rz-card-background-color: #1e293b;
    --rz-card-color: #e2e8f0;
    --rz-dropdown-background-color: #1e293b;
    --rz-dropdown-item-hover-background-color: rgba(255,255,255,0.06);
    --rz-button-background-color: #334155;
    --rz-button-color: #e2e8f0;
    --rz-tooltip-background-color: #334155;
    --rz-tooltip-color: #e2e8f0;
    --rz-scheduler-background-color: #0f172a;
    --rz-badge-background-color: #334155;
    --rz-badge-color: #e2e8f0;
    color-scheme: dark;
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-datatable-scrollable-body,
body.dark-theme .rz-datatable-scrollable-header {
    background-color: #0f172a !important;
}

body.dark-theme .rz-grid-table > tbody > tr {
    border-color: #334155 !important;
}

body.dark-theme .rz-sidebar {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
}

body.dark-theme .rz-header {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-bottom-color: #334155 !important;
}

body.dark-theme .rz-body {
    background-color: #0f172a !important;
}

body.dark-theme .rz-body,
body.dark-theme .rz-body * {
    color: #e2e8f0 !important;
}

/* Main content area */
body.dark-theme main,
body.dark-theme .rz-page,
body.dark-theme .rz-content {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

/* Ensure all child elements in dark theme body have correct colors */
body.dark-theme {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-panel-menu-item {
    color: #cbd5e1 !important;
}

body.dark-theme .rz-panel-menu-item:hover {
    background-color: rgba(255,255,255,0.06) !important;
}

body.dark-theme .rz-navigation-item-active .rz-panel-menu-item {
    color: #dc4a42 !important;
    background-color: rgba(220, 74, 66, 0.15) !important;
}

body.dark-theme .rz-datatable,
body.dark-theme .rz-data-grid {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

/* Datatable başlıkları */
body.dark-theme .rz-datatable-head,
body.dark-theme .rz-datatable-scrollable-header,
body.dark-theme .rz-datatable thead th,
body.dark-theme .rz-datatable thead .rz-state-default {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-datatable-head .rz-cell,
body.dark-theme .rz-datatable thead .rz-cell {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}

/* Datatable hücreleri */
body.dark-theme .rz-datatable-scrollable-body,
body.dark-theme .rz-datatable tbody .rz-state-default {
    background-color: #0f172a !important;
}

body.dark-theme .rz-datatable tbody .rz-cell,
body.dark-theme .rz-datatable tbody tr .rz-cell {
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    background-color: transparent !important;
}

body.dark-theme .rz-datatable tbody tr,
body.dark-theme .rz-datatable tbody .rz-data-row {
    background-color: #0f172a !important;
}

body.dark-theme .rz-datatable tbody tr:nth-child(even),
body.dark-theme .rz-datatable tbody .rz-data-row:nth-child(even) {
    background-color: #162032 !important;
}

body.dark-theme .rz-datatable tbody tr:hover {
    background-color: rgba(255,255,255,0.06) !important;
}

/* Datatable ve DataGrid tüm hücreler */
body.dark-theme .rz-datatable .rz-row,
body.dark-theme .rz-datatable td,
body.dark-theme .rz-datatable .rz-datatable-row {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-datatable .rz-row:nth-child(even),
body.dark-theme .rz-datatable tbody tr:nth-child(even) {
    background-color: #162032 !important;
}

/* Grid tabloları */
body.dark-theme .rz-grid-table thead th {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-grid-table tbody td {
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    background-color: #0f172a !important;
}

body.dark-theme .rz-grid-table tbody tr {
    background-color: #0f172a !important;
}

body.dark-theme .rz-grid-table tbody tr:nth-child(even) {
    background-color: #162032 !important;
}

body.dark-theme .rz-grid-table tbody tr:hover {
    background-color: rgba(255,255,255,0.06) !important;
}

/* Bootstrap table override */
body.dark-theme table td,
body.dark-theme table th,
body.dark-theme .table td,
body.dark-theme .table th {
    background-color: transparent !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme table tbody tr,
body.dark-theme .table tbody tr {
    background-color: #0f172a !important;
}

body.dark-theme table tbody tr:nth-child(even),
body.dark-theme .table tbody tr:nth-child(even) {
    background-color: #162032 !important;
}

/* Datatable butonları ve kontroller */
body.dark-theme .rz-datatable .rz-row-action-button,
body.dark-theme .rz-datatable .rz-data-grid-toolbar {
    background-color: #1e293b !important;
}

body.dark-theme .rz-datatable .rz-cell-editor input,
body.dark-theme .rz-datatable .rz-cell-editor .rz-textbox {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

/* Filter/arama kutusu */
body.dark-theme .rz-datatable-filter,
body.dark-theme .rz-datatable-filter .rz-textbox,
body.dark-theme input[type="search"],
body.dark-theme input.rz-textbox,
body.dark-theme .rz-data-grid-filter .rz-textbox,
body.dark-theme .rz-data-grid-pager-input input {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

body.dark-theme .rz-datatable-filter .rz-textbox::placeholder,
body.dark-theme input[type="search"]::placeholder {
    color: #64748b !important;
}

/* Checkbox ve radio buttons */
body.dark-theme .rz-chkbox:not(:checked) .rz-chkbox-box,
body.dark-theme .rz-radiobutton:not(:checked) .rz-radiobutton-box {
    background-color: #1e293b !important;
    border-color: #475569 !important;
}

body.dark-theme .rz-chkbox input:checked + .rz-chkbox-box,
body.dark-theme .rz-radiobutton input:checked + .rz-radiobutton-box {
    background-color: #dc4a42 !important;
    border-color: #dc4a42 !important;
}

/* Checkbox seçim kutuları */
body.dark-theme .rz-datatable .rz-chkbox,
body.dark-theme .rz-data-grid .rz-chkbox {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-datatable .rz-chkbox:checked,
body.dark-theme .rz-data-grid .rz-chkbox:checked {
    background-color: #dc4a42 !important;
    border-color: #dc4a42 !important;
}

/* Datatable toolbar ve butonları */
body.dark-theme .rz-data-grid-toolbar {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-data-grid-toolbar .rz-button,
body.dark-theme .rz-datatable .rz-toolbarseparator + .rz-button {
    background-color: #dc4a42 !important;
    color: #ffffff !important;
    border-color: #dc4a42 !important;
}

body.dark-theme .rz-data-grid-toolbar .rz-button:hover {
    background-color: #e8706a !important;
    border-color: #e8706a !important;
}

/* Sıralama ve filter ikonları */
body.dark-theme .rz-datatable .rz-sortable-column-icon,
body.dark-theme .rz-datatable .rz-sort-icon,
body.dark-theme .rz-datatable thead .rz-icon,
body.dark-theme .rz-grid-table thead .rz-icon {
    color: #cbd5e1 !important;
}

/* Datatable header alanı */
body.dark-theme .rz-datatable .rz-datatable-scrollable-header tbody tr,
body.dark-theme .rz-datatable .rz-sortable-column {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-dialog-wrapper .rz-dialog {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-dialog-titlebar {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-bottom-color: #334155 !important;
}

body.dark-theme .rz-textbox,
body.dark-theme .rz-inputtext,
body.dark-theme .rz-textarea,
body.dark-theme .rz-spinner .rz-inputtext {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

body.dark-theme .rz-dropdown {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

body.dark-theme .rz-dropdown-panel {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-dropdown-item:hover {
    background-color: rgba(255,255,255,0.06) !important;
}

body.dark-theme .rz-form-field-label {
    color: #94a3b8 !important;
}

/* Radzen validation error messages */
body.dark-theme .rz-form-field-error {
    color: #f87171 !important;
}

body.dark-theme .rz-validation-message,
body.dark-theme .rz-validation,
body.dark-theme .rz-error-message {
    color: #f87171 !important;
}

body.dark-theme .rz-card {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-profile-menu-button {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-pager {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-paginator .rz-paginator-page {
    color: #cbd5e1 !important;
}

body.dark-theme h1, body.dark-theme h2,
body.dark-theme h3, body.dark-theme h4,
body.dark-theme h5, body.dark-theme h6 {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-panel-menu {
    border-color: #334155 !important;
}

body.dark-theme .rz-panel-menu-header {
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-panel-menu-header:hover {
    background-color: rgba(255,255,255,0.06) !important;
}

body.dark-theme .rz-alert {
    border-color: #334155 !important;
}

body.dark-theme .rz-form-field.rz-variant-filled .rz-form-field-content {
    background-color: #1e293b !important;
    border-color: #475569 !important;
}

body.dark-theme .rz-chkbox-box {
    background-color: #1e293b !important;
    border-color: #475569 !important;
}

/* Dark tema - genel metin orunabilirliği */
body.dark-theme,
body.dark-theme p,
body.dark-theme span,
body.dark-theme div,
body.dark-theme label,
body.dark-theme strong,
body.dark-theme b,
body.dark-theme li,
body.dark-theme td,
body.dark-theme th,
body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    color: #e2e8f0 !important;
}

/* Tüm input ve textarea'lara dark theme uygula */
body.dark-theme input:not([type="button"]):not([type="submit"]):not([type="reset"]),
body.dark-theme textarea,
body.dark-theme select {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

/* Dark tema - grid hücre metinleri (yüksek specificity) */
body.dark-theme .rz-grid-table tbody td,
body.dark-theme .rz-grid-table tbody td span,
body.dark-theme .rz-grid-table tbody td div,
body.dark-theme .rz-grid-table tbody td a,
body.dark-theme .rz-grid-table tbody td label,
body.dark-theme .rz-datatable tbody td,
body.dark-theme .rz-datatable tbody td span,
body.dark-theme .rz-datatable tbody td div,
body.dark-theme .rz-datatable tbody td a {
    color: #e2e8f0 !important;
}

/* Dark tema - kendi rengini koruması gereken elemanlar */
body.dark-theme .rz-button .rz-button-text,
body.dark-theme .rz-button .rz-button-icon-left,
body.dark-theme .rz-button .rz-button-icon-right {
    color: inherit !important;
}

body.dark-theme .rz-navigation-item-active .rz-panel-menu-item span {
    color: #dc4a42 !important;
}

body.dark-theme .rz-panel-menu-item span {
    color: #cbd5e1 !important;
}

body.dark-theme a {
    color: var(--rz-link-color, #60a5fa) !important;
}

/* Dark tema - popup, dropdown panel, profil menü */
body.dark-theme .rz-popup,
body.dark-theme .rz-overlaypanel,
body.dark-theme .rz-profile-menu .rz-popup,
body.dark-theme .rz-contextmenu {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-popup a,
body.dark-theme .rz-popup span,
body.dark-theme .rz-popup div,
body.dark-theme .rz-overlaypanel a,
body.dark-theme .rz-overlaypanel span,
body.dark-theme .rz-overlaypanel div,
body.dark-theme .rz-contextmenu a,
body.dark-theme .rz-contextmenu span {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-menuitem-link:hover,
body.dark-theme .rz-popup .rz-navigation-item-wrapper:hover {
    background-color: rgba(255,255,255,0.06) !important;
}

/* Dark tema - Radzen section/card/panel arka planları */
body.dark-theme .rz-card,
body.dark-theme .rz-fieldset,
body.dark-theme .rz-panel {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-datalist,
body.dark-theme .rz-datalist-content,
body.dark-theme .rz-datalist-data,
body.dark-theme .rz-datalist-data div,
body.dark-theme .rz-datalist-data span,
body.dark-theme .rz-datalist-data strong {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-data-list .rz-g > div {
    background-color: transparent !important;
}

/* Dark tema - rapor section kartları (inline style override) */
body.dark-theme section,
body.dark-theme .section-card,
body.dark-theme .gr-wrap .section-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* Dark tema - chart arka planları */
body.dark-theme .rz-chart svg {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-chart text {
    fill: #94a3b8 !important;
}

/* Dark tema - Anasayfa KPI kartları */
body.dark-theme .kp-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-text,
body.dark-theme .rz-label {
    color: #e2e8f0 !important;
}

body.dark-theme .muted,
body.dark-theme .kpi-label,
body.dark-theme .kpi-sub,
body.dark-theme .t-caption,
body.dark-theme .stat .cap,
body.dark-theme .gr-sub,
body.dark-theme .hs-sub,
body.dark-theme .pay-time,
body.dark-theme .pay-sub,
body.dark-theme .mini-kpi-cap,
body.dark-theme .stat-label {
    color: #94a3b8 !important;
}

body.dark-theme .kpi-value {
    color: #e2e8f0 !important;
}

body.dark-theme .kpi-card.primary .kpi-value {
    color: #60a5fa !important;
}

body.dark-theme .kpi-card.success .kpi-value {
    color: #4ade80 !important;
}

body.dark-theme .kpi-card.warning .kpi-value {
    color: #fbbf24 !important;
}

body.dark-theme .kpi-card.info .kpi-value {
    color: #22d3ee !important;
}

body.dark-theme .danger-text {
    color: #ef4444 !important;
}

/* Dark tema - LoginLayout form elements */
body.dark-theme .login-form-side {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-theme .login-form-side .rz-textbox,
body.dark-theme .login-form-side .rz-inputtext,
body.dark-theme .login-form-side .rz-dropdown,
body.dark-theme .login-form-side input[type="text"],
body.dark-theme .login-form-side input[type="password"],
body.dark-theme .login-form-side input[type="email"],
body.dark-theme .login-form-side input[type="checkbox"],
body.dark-theme .login-form-side input[type="radio"] {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .login-form-side input::placeholder {
    color: #64748b !important;
}

body.dark-theme .login-form-side .rz-form-field-label,
body.dark-theme .login-form-side label,
body.dark-theme .login-form-side .rz-form-field-label span {
    color: #cbd5e1 !important;
}

body.dark-theme .login-form-side .rz-button {
    background-color: #dc4a42 !important;
    color: #ffffff !important;
}

body.dark-theme .login-form-side .rz-button:hover {
    background-color: #e8706a !important;
}

body.dark-theme .login-form-side .rz-form-field.rz-variant-filled .rz-form-field-content {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}
    color: #f87171 !important;
}

body.dark-theme .stat .val.success {
    color: #4ade80 !important;
}

body.dark-theme .stat .val.danger {
    color: #f87171 !important;
}

body.dark-theme .stat-value.fiyat {
    color: #4ade80 !important;
}

body.dark-theme .stat-value.kalan {
    color: #f87171 !important;
}

body.dark-theme .summary-value.kalan {
    color: #f87171 !important;
}

/* Dark tema - KPI kart arka planları */
body.dark-theme .kpi-card {
    background: linear-gradient(180deg, #1e293b, #162032) !important;
    border-color: #334155 !important;
}

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

body.dark-theme .tile {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .stat {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .hissedar-item,
body.dark-theme .hitem {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .amount-box {
    background: #1e293b !important;
    border-color: #475569 !important;
}

body.dark-theme .panel {
    border-color: #334155 !important;
    background: #0f172a !important;
}

body.dark-theme .panel-head {
    border-color: #334155 !important;
}

body.dark-theme .mini-kpi {
    border-color: #334155 !important;
    background: #1e293b !important;
}

body.dark-theme .pay-item {
    border-color: #334155 !important;
}

body.dark-theme .sticky-actions {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .form-actions {
    border-color: #334155 !important;
}

/* Dark tema - satır renkleri (bakiye durumu) */
body.dark-theme .row-red,
body.dark-theme .cell-red,
body.dark-theme tr.row-red td,
body.dark-theme td.cell-red {
    background-color: rgba(239, 68, 68, 0.25) !important;
}

body.dark-theme .row-green,
body.dark-theme .cell-green,
body.dark-theme tr.row-green td,
body.dark-theme td.cell-green {
    background-color: rgba(34, 197, 94, 0.20) !important;
}

/* Dark tema - Radzen ek bileşen düzeltmeleri */
body.dark-theme .rz-tabview-nav {
    border-color: #334155 !important;
}

body.dark-theme .rz-tabview-nav li a {
    color: #94a3b8 !important;
}

body.dark-theme .rz-tabview-nav li.rz-tabview-selected a {
    color: #dc4a42 !important;
}

body.dark-theme .rz-button.rz-variant-flat {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-button.rz-variant-flat:hover {
    background-color: rgba(255,255,255,0.08) !important;
}

body.dark-theme .rz-numeric .rz-inputtext,
body.dark-theme .rz-spinner .rz-inputtext {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

body.dark-theme .rz-form-field .rz-form-field-label {
    color: #94a3b8 !important;
}

body.dark-theme .rz-dialog-content {
    color: #e2e8f0 !important;
}

body.dark-theme hr {
    border-color: #334155 !important;
}

body.dark-theme .rz-splitbutton {
    border-color: #475569 !important;
}

body.dark-theme .rz-datepicker-calendar td span {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-state-highlight {
    background-color: #dc4a42 !important;
    color: #fff !important;
}

body.dark-theme .rz-profile-menu {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-profile-menu .rz-navigation-item-wrapper .rz-menuitem-link {
    color: #e2e8f0 !important;
}

/* Dark tema - Login sayfasını hariç tut */
body.dark-theme .login-page,
body.dark-theme .login-page * {
    color: initial;
}

body.dark-theme .login-form-side {
    background: #fff !important;
}

body.dark-theme .login-form-side .rz-textbox,
body.dark-theme .login-form-side .rz-inputtext,
body.dark-theme .login-form-side .rz-textarea,
body.dark-theme .login-form-side .rz-spinner .rz-inputtext,
body.dark-theme .login-form-side .rz-numeric .rz-inputtext {
    background-color: #fff !important;
    color: #1e293b !important;
    border-color: #d1d5db !important;
}

body.dark-theme .login-form-side .rz-dropdown {
    background-color: #fff !important;
    color: #1e293b !important;
    border-color: #d1d5db !important;
}

body.dark-theme .login-form-side .rz-form-field-label,
body.dark-theme .login-form-side .rz-form-field .rz-form-field-label {
    color: #64748b !important;
}

body.dark-theme .login-form-side .rz-form-field.rz-variant-filled .rz-form-field-content {
    background-color: #f8fafc !important;
    border-color: #d1d5db !important;
}

body.dark-theme .login-form-side label,
body.dark-theme .login-form-side span,
body.dark-theme .login-form-side div,
body.dark-theme .login-form-side p {
    color: inherit;
}

body.dark-theme .login-form-side .rz-chkbox-box {
    background-color: #fff !important;
    border-color: #d1d5db !important;
}

body.dark-theme .login-title {
    color: #1e293b !important;
}

body.dark-theme .login-desc {
    color: #94a3b8 !important;
}

/* Tema toggle butonu */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rz-header-color, #333);
    transition: background-color 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: rgba(0,0,0,0.08);
}

body.dark-theme .theme-toggle-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.theme-toggle-btn .material-icons {
    font-size: 22px;
}

body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background-color: var(--rz-body-background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.rz-body {
    --rz-body-padding: 0;
}

a {
    color: var(--rz-link-color);
}

a:hover,
a:focus {
    color: var(--rz-link-hover-color);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}
@media (max-width: 768px) {
    .rz-p-12 {
        padding: 1rem !important;
    }

    .login-logo {
        width: 200px !important;
        height: 200px !important;
    }

    .rz-mx-auto {
        padding: 0 !important;
    }

    .rz-shadow-3 {
        box-shadow: none !important;
    }
}

@media (max-width: 480px) {
    .login-logo {
        width: 150px !important;
        height: 150px !important;
    }

    .rz-p-12 {
        padding: 0.5rem !important;
    }
}

/* ===== ULTIMATE DARK THEME OVERRIDES ===== */
/* Tüm table ve grid elementleri için final override */

body.dark-theme table,
body.dark-theme .rz-datatable,
body.dark-theme .rz-data-grid,
body.dark-theme .rz-grid-table {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme table th,
body.dark-theme table thead th,
body.dark-theme .rz-datatable thead th,
body.dark-theme .rz-datatable thead .rz-cell,
body.dark-theme .rz-grid-table thead th {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme table td,
body.dark-theme table tbody td,
body.dark-theme .rz-datatable tbody td,
body.dark-theme .rz-datatable tbody .rz-cell,
body.dark-theme .rz-grid-table tbody td {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme table tr,
body.dark-theme table tbody tr,
body.dark-theme .rz-datatable tbody tr,
body.dark-theme .rz-grid-table tbody tr {
    background-color: #0f172a !important;
}

body.dark-theme table tbody tr:nth-child(even),
body.dark-theme .rz-datatable tbody tr:nth-child(even),
body.dark-theme .rz-grid-table tbody tr:nth-child(even) {
    background-color: #162032 !important;
}

body.dark-theme table tbody tr:hover,
body.dark-theme .rz-datatable tbody tr:hover,
body.dark-theme .rz-grid-table tbody tr:hover {
    background-color: rgba(255,255,255,0.06) !important;
}

/* Strong/Bold text in tables */
body.dark-theme table strong,
body.dark-theme .rz-datatable strong,
body.dark-theme .rz-grid-table strong {
    color: #e2e8f0 !important;
}

/* Links in tables */
body.dark-theme table a,
body.dark-theme .rz-datatable a,
body.dark-theme .rz-grid-table a {
    color: #60a5fa !important;
}

body.dark-theme table a:hover,
body.dark-theme .rz-datatable a:hover,
body.dark-theme .rz-grid-table a:hover {
    color: #93bbfd !important;
}

/* Radzen-specific dark theme fixes */
body.dark-theme .rz-state-default {
    background-color: transparent !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-datatable-row,
body.dark-theme .rz-data-row {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-datatable-row:nth-child(even),
body.dark-theme .rz-data-row:nth-child(even) {
    background-color: #162032 !important;
}

body.dark-theme .rz-cell {
    background-color: transparent !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme th.rz-cell,
body.dark-theme .rz-cell[role="columnheader"] {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}

/* Radzen Grid specific */
body.dark-theme .rz-g-header {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-g-body {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

/* ===== MENU VE DROPDOWN DARK THEME ===== */

/* Sidebar menü */
body.dark-theme .rz-panel-menu,
body.dark-theme .rz-accordion,
body.dark-theme .rz-accordion-header {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-panel-menu-item,
body.dark-theme .rz-panel-menu-item-text,
body.dark-theme .rz-accordion-label {
    color: #cbd5e1 !important;
    background-color: transparent !important;
}

body.dark-theme .rz-panel-menu-item:hover,
body.dark-theme .rz-panel-menu-item.rz-state-hover,
body.dark-theme .rz-accordion-label:hover {
    background-color: rgba(255,255,255,0.06) !important;
}

body.dark-theme .rz-navigation-item-active .rz-panel-menu-item,
body.dark-theme .rz-navigation-item-active .rz-panel-menu-item-text,
body.dark-theme .rz-navigation-item-active .rz-panel-menu-item span {
    background-color: rgba(220, 74, 66, 0.1) !important;
    color: #dc4a42 !important;
}

/* Dropdown menü */
body.dark-theme .rz-dropdown-panel,
body.dark-theme .rz-dropdown .rz-popup {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-dropdown-item,
body.dark-theme .rz-dropdown-item-text,
body.dark-theme .rz-dropdown-item-content {
    background-color: transparent !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-dropdown-item:hover,
body.dark-theme .rz-dropdown-item.rz-state-hover {
    background-color: rgba(255,255,255,0.1) !important;
}

body.dark-theme .rz-dropdown-item.rz-selected,
body.dark-theme .rz-dropdown-item.rz-state-selected {
    background-color: rgba(220, 74, 66, 0.15) !important;
    color: #dc4a42 !important;
}

/* Context Menu */
body.dark-theme .rz-contextmenu,
body.dark-theme .rz-contextmenu .rz-popup {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .rz-contextmenu-item,
body.dark-theme .rz-contextmenu-item-text {
    color: #e2e8f0 !important;
    background-color: transparent !important;
}

body.dark-theme .rz-contextmenu-item:hover {
    background-color: rgba(255,255,255,0.1) !important;
}

/* Profile Menu */
body.dark-theme .rz-profile-menu,
body.dark-theme .rz-profile-menu .rz-popup {
    background-color: #1e293b !important;
}

body.dark-theme .rz-profile-menu-button {
    color: #e2e8f0 !important;
}

body.dark-theme .rz-profile-menu-item {
    background-color: transparent !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-profile-menu-item:hover,
body.dark-theme .rz-profile-menu-item.rz-state-hover {
    background-color: rgba(255,255,255,0.1) !important;
}

body.dark-theme .rz-profile-menu-item .rz-icon {
    color: #cbd5e1 !important;
}

/* Navigation items */
body.dark-theme .rz-navigation-item,
body.dark-theme .rz-navigation-item-wrapper {
    background-color: transparent !important;
    color: #cbd5e1 !important;
}

body.dark-theme .rz-navigation-item-wrapper:hover,
body.dark-theme .rz-navigation-item.rz-state-hover .rz-navigation-item-wrapper {
    background-color: rgba(255,255,255,0.06) !important;
}

body.dark-theme .rz-navigation-item-active .rz-navigation-item-wrapper {
    background-color: rgba(220, 74, 66, 0.1) !important;
    color: #dc4a42 !important;
}

/* Menu separator */
body.dark-theme .rz-menu-separator,
body.dark-theme .rz-menu-divider {
    border-color: #334155 !important;
}

/* ===== FINAL COMPREHENSIVE DARK THEME OVERRIDE ===== */
/* Bu son kural tüm diğer CSS'leri override eder */

body.dark-theme {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

/* Tüm text content elements */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme p,
body.dark-theme span,
body.dark-theme div,
body.dark-theme label,
body.dark-theme li,
body.dark-theme td,
body.dark-theme th,
body.dark-theme button,
body.dark-theme a,
body.dark-theme strong,
body.dark-theme b,
body.dark-theme i,
body.dark-theme em {
    color: #e2e8f0 !important;
}

/* Links */
body.dark-theme a {
    color: #60a5fa !important;
}

body.dark-theme a:hover {
    color: #93bbfd !important;
}

/* Radiator theme override - CSS variables */
html[data-theme="dark"] {
    --rz-text-color: #e2e8f0 !important;
    --rz-text-secondary-color: #cbd5e1 !important;
    --rz-text-tertiary-color: #94a3b8 !important;
    --rz-body-background-color: #0f172a !important;
    --rz-base-background-color: #1e293b !important;
}

body.dark-theme {
    --rz-text-color: #e2e8f0 !important;
    --rz-text-secondary-color: #cbd5e1 !important;
    --rz-text-tertiary-color: #94a3b8 !important;
    --rz-body-background-color: #0f172a !important;
    --rz-base-background-color: #1e293b !important;
}

/* Force all Radzen components */
body.dark-theme .rz-text,
body.dark-theme .rz-body .rz-text {
    color: #e2e8f0 !important;
}

/* Table cells final override */
body.dark-theme table td,
body.dark-theme table th,
body.dark-theme td,
body.dark-theme th {
    color: #e2e8f0 !important;
    background-color: transparent !important;
    border-color: #334155 !important;
}

/* Labels ve inputs */
body.dark-theme label {
    color: #cbd5e1 !important;
}

body.dark-theme input[type="text"],
body.dark-theme input[type="password"],
body.dark-theme input[type="email"],
body.dark-theme textarea,
body.dark-theme select,
body.dark-theme .rz-textbox,
body.dark-theme .rz-inputtext {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

/* Buttons */
body.dark-theme button,
body.dark-theme .rz-button {
    background-color: inherit !important;
    color: #e2e8f0 !important;
}

body.dark-theme .rz-button[style*="background"] {
    background-color: #dc4a42 !important;
    color: #fff !important;
}
