/* NotusFlow Custom Theme */
/* Brand Colors: Primary #1E2A78, Dark #171640, Accent #FFB347 */

:root {
    --nf-primary: #1E2A78;
    --nf-primary-dark: #171640;
    --nf-accent: #c4f55a;
    --nf-light: #f8f9fa;
    --nf-text-light: #d7d7d7;
    --nf-white: #ffffff;
}

html,
body {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a,
.btn-link {
    color: var(--nf-primary);
}

a:hover,
.btn-link:hover {
    color: var(--nf-primary-dark);
}

.btn-primary {
    color: var(--nf-white);
    background-color: var(--nf-primary);
    border-color: var(--nf-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--nf-primary-dark);
    border-color: var(--nf-primary-dark);
}

.btn-warning,
.btn-accent {
    color: var(--nf-primary-dark);
    background-color: var(--nf-accent);
    border-color: var(--nf-accent);
}

.btn-warning:hover,
.btn-accent:hover {
    background-color: #b0e050;
    border-color: #b0e050;
}

.btn-outline-primary {
    color: var(--nf-primary);
    border-color: var(--nf-primary);
}

.btn-outline-primary:hover {
    background-color: var(--nf-primary);
    color: var(--nf-white);
}

/* Cards with brand styling */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(23, 22, 64, 0.1);
}

.card-header {
    background-color: var(--nf-light);
    border-bottom: 2px solid var(--nf-accent);
}

/* Table improvements */
.table-light {
    background-color: var(--nf-light);
}

.table thead th {
    border-bottom: 2px solid var(--nf-accent);
    color: var(--nf-primary-dark);
    font-weight: 600;
}

/* Badge colors */
.badge.bg-primary {
    background-color: var(--nf-primary) !important;
}

.badge.bg-warning {
    background-color: var(--nf-accent) !important;
    color: var(--nf-primary-dark) !important;
}

/* Modal styling */
.modal-header {
    border-bottom: 2px solid var(--nf-accent);
}

.modal-header.bg-danger {
    background-color: #dc3545 !important;
}

.modal-header.bg-warning {
    background-color: var(--nf-accent) !important;
}

/* Alert improvements */
.alert-success {
    border-left: 4px solid #198754;
}

.alert-danger {
    border-left: 4px solid #dc3545;
}

.alert-info {
    border-left: 4px solid var(--nf-primary);
}

/* Progress bar */
.progress-bar {
    background-color: var(--nf-primary);
}

/* Active states */
.list-group-item.active {
    background-color: var(--nf-primary);
    border-color: var(--nf-primary);
}

/* Nav tabs */
.nav-tabs .nav-link.active {
    border-bottom: 3px solid var(--nf-accent);
    color: var(--nf-primary);
    font-weight: 600;
}

.nav-tabs .nav-link {
    color: var(--nf-primary-dark);
}

.nav-tabs .nav-link:hover {
    border-bottom: 3px solid rgba(196, 245, 90, 0.5);
}

/* Custom NavLink and Table adjustments without overriding Theme Colors */
.mud-navmenu {
    padding: 8px;
}

.mud-nav-link {
    border-radius: 10px;
    margin: 4px 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mud-paper {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.mud-input-control>.mud-input-control-input-container>.mud-input-root {
    border-radius: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.mud-button-root {
    border-radius: 10px;
    text-transform: none;
    font-weight: 600;
}

.nf-page-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nf-page-title {
    font-weight: 700;
}

.nf-page-subtitle {
    opacity: 0.7;
}

.nf-card {
    border-radius: 14px;
}

.nf-table {
    border-radius: 14px;
    overflow: hidden;
}

.nf-stat-card {
    border-radius: 14px;
    border: 0;
}

.nf-stat-card .mud-typography,
.nf-stat-card .mud-icon-root {
    color: #ffffff !important;
}

.nf-stat-card-accent .mud-typography,
.nf-stat-card-accent .mud-icon-root {
    color: #171640 !important;
}



.nf-stat-card-primary {
    background: linear-gradient(135deg, #1e2a78 0%, #171640 100%);
}

.nf-stat-card-success {
    background: linear-gradient(135deg, #198754 0%, #11623d 100%);
}

.nf-stat-card-accent {
    color: #171640;
    background: linear-gradient(135deg, #c4f55a 0%, #b0e050 100%);
}

.nf-state-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #667092;
    text-align: center;
}

@media (max-width: 900px) {
    .nf-page-header {
        gap: 4px;
    }

    .mud-card-content {
        padding: 16px !important;
    }
}

/* Theme Adaptive Sidebar Link Hovers */
.nf-theme-light .mud-nav-link:hover .mud-nav-link-text,
.nf-theme-light .mud-nav-link:hover .mud-icon-root {
    color: var(--nf-primary) !important;
}

.nf-theme-dark .mud-nav-link:hover .mud-nav-link-text,
.nf-theme-dark .mud-nav-link:hover .mud-icon-root {
    color: var(--nf-accent) !important;
}

/* --- Stitch Kinetic Redesign Styles --- */

:root {
    /* Stitch Dark Palette (Mapped from Tailwind Config) */
    --stitch-background: #0e0d38;
    --stitch-surface: #171640;
    --stitch-surface-bright: #353560;
    --stitch-primary: #d1ef64;
    --stitch-on-surface: #e2dfff;
    --stitch-on-surface-variant: #c6c8b1;
    
    /* Stitch Light Palette (High Contrast) */
    --stitch-light-background: #f8f9fa;
    --stitch-light-surface: #ffffff;
    --stitch-light-primary: #658100;
    --stitch-light-on-surface: #0a0a20;
    --stitch-light-on-surface-variant: #44463a;
}

.nf-theme-dark {
    /* Kinetic Observatory Dark - Refined for depth */
    --nf-primary: #ffffff;
    --nf-on-primary: #2a3400;
    --nf-primary-container: #d1ef64;
    --nf-on-primary-container: #586c00;
    --nf-secondary: #bcc3ff;
    --nf-on-secondary: #1b2775;
    --nf-secondary-container: #343f8d;
    --nf-on-secondary-container: #a5b0ff;
    --nf-tertiary: #ffffff;
    --nf-on-tertiary: #003544;
    --nf-tertiary-container: #bce9fc;
    --nf-on-tertiary-container: #3f6a7a;
    --nf-error: #ffb4ab;
    --nf-on-error: #690005;
    --nf-error-container: #93000a;
    --nf-on-error-container: #ffdad6;
    --nf-background: #0e0d38;
    --nf-on-background: #e2dfff;
    --nf-surface: #141344;
    --nf-on-surface: #e2dfff;
    --nf-surface-variant: #31305b;
    --nf-on-surface-variant: #c6c8b1;
    --nf-outline: #90937e;
    --nf-outline-variant: #454837;
    --nf-surface-bright: #26254f;
    --nf-surface-dim: #0e0d38;
    --nf-surface-container: #1b1a44;
    --nf-surface-container-low: #171640;
    --nf-surface-container-high: #26254f;
    --nf-surface-container-highest: #31305b;
    --nf-surface-container-lowest: #0c0b3d;
    --nf-accent: #d1ef64;
    
    --glass-bg: rgba(20, 19, 68, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

.nf-theme-light {
    /* Engineering Core Light */
    --nf-primary: #536600;
    --nf-on-primary: #ffffff;
    --nf-primary-container: #d4f266;
    --nf-on-primary-container: #5a6e00;
    --nf-secondary: #58632f;
    --nf-on-secondary: #ffffff;
    --nf-secondary-container: #d9e6a5;
    --nf-on-secondary-container: #5c6833;
    --nf-tertiary: #386474;
    --nf-on-tertiary: #ffffff;
    --nf-tertiary-container: #bfecff;
    --nf-on-tertiary-container: #406c7c;
    --nf-error: #ba1a1a;
    --nf-on-error: #ffffff;
    --nf-error-container: #ffdad6;
    --nf-on-error-container: #93000a;
    --nf-background: #f8f9fa;
    --nf-on-background: #191c1d;
    --nf-surface: #f8f9fa;
    --nf-on-surface: #191c1d;
    --nf-surface-variant: #e1e3e4;
    --nf-on-surface-variant: #454837;
    --nf-outline: #767965;
    --nf-outline-variant: #c6c8b1;
    --nf-surface-bright: #f8f9fa;
    --nf-surface-dim: #d9dadb;
    --nf-surface-container: #edeeef;
    --nf-surface-container-low: #f3f4f5;
    --nf-surface-container-high: #e7e8e9;
    --nf-surface-container-highest: #e1e3e4;
    --nf-surface-container-lowest: #ffffff;
    --nf-accent: #536600;

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
}

.glass-panel {
    background-color: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

/* Stitch Select Override */
.stitch-select .mud-input-slot {
    background-color: rgba(var(--mud-palette-surface-container-highest), 0.1) !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-size: 0.875rem !important;
    color: var(--mud-palette-on-surface) !important;
}

.stitch-select .mud-input-outlined-border {
    border-color: rgba(var(--mud-palette-outline-variant), 0.1) !important;
    border-radius: 12px !important;
}

.stitch-select:hover .mud-input-outlined-border {
    border-color: rgba(var(--mud-palette-outline-variant), 0.3) !important;
}

.stitch-select.mud-input-focus .mud-input-outlined-border {
    border-color: var(--mud-palette-primary-container) !important;
    border-width: 1px !important;
}

/* Scrollbar Hide */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.neon-glow {
    box-shadow: 0 0 15px rgba(209, 239, 100, 0.3);
}

.nf-theme-light .neon-glow {
    box-shadow: 0 4px 12px rgba(138, 176, 0, 0.15);
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Layout Specifics */
.sidebar-docked {
    width: 80px;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-docked:hover {
    width: 256px;
}

/* Ensure sidebar text is always visible on dark background */
/* Ensure sidebar icons and text are theme-aware */
.sidebar-docked .material-symbols-outlined {
    color: inherit;
}

.sidebar-docked span,
.sidebar-docked a {
    transition: color 0.3s ease;
}

/* Visibility Control for Sidebar Content */
.sidebar-link-text, 
.sidebar-text-content {
    opacity: 0;
    visibility: hidden;
    width: 0;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-docked:hover .sidebar-link-text, 
.sidebar-docked:hover .sidebar-text-content {
    opacity: 1;
    visibility: visible;
    width: auto; /* Or a fixed width like 180px if needed */
}

.main-content-transition {
    transition: margin-left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Premium MudTabs Custom Overrides --- */
.mud-tabs {
    background-color: transparent !important;
}

.mud-tabs-tabbar {
    background-color: rgba(var(--mud-palette-surface-container-low), 0.5) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(var(--mud-palette-outline-variant), 0.1) !important;
    padding: 4px 12px 0 12px !important;
}

.mud-tab {
    color: var(--mud-palette-text-secondary) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    min-height: 48px !important;
    padding: 0 20px !important;
    margin: 0 4px !important;
    border-radius: 8px 8px 0 0 !important;
    opacity: 0.7;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mud-tab:hover {
    color: var(--mud-palette-text-primary) !important;
    background-color: rgba(var(--mud-palette-surface-container-highest), 0.1) !important;
    opacity: 1;
}

.mud-tab-active {
    color: var(--mud-palette-primary) !important;
    opacity: 1;
}

.nf-theme-dark .mud-tab-active {
    color: var(--nf-accent) !important;
}

.mud-tab-slider {
    background-color: var(--mud-palette-primary) !important;
    height: 3px !important;
    border-radius: 9999px !important;
}

.nf-theme-dark .mud-tab-slider {
    background-color: var(--nf-accent) !important;
}

.mud-tabpanel {
    transition: opacity 0.3s ease-in-out;
}

/* --- Premium Glassmorphic MudBlazor Snackbar (Toasts) Override --- */

/* The snackbar container position/z-index */
.mud-snackbar-container {
    z-index: 99999 !important;
}

/* Base Snackbar styling */
.mud-snackbar {
    background: #ffffff !important; /* Safe solid light background for light mode */
    color: #0f172a !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.1) !important;
    padding: 0 !important; /* Reset padding to style the inner alert perfectly */
    overflow: hidden !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.nf-theme-dark .mud-snackbar {
    background: #15143a !important; /* Match deep navy background */
    color: #e2dfff !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Inner alert design */
.mud-snackbar .mud-alert {
    background-color: transparent !important; /* Render transparent to let the premium background shine through */
    color: inherit !important;
    padding: 14px 20px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    border: none !important;
}

/* Style the icon size and alignment */
.mud-snackbar .mud-alert-icon {
    margin-right: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mud-snackbar .mud-alert-icon .mud-icon-root {
    width: 22px !important;
    height: 22px !important;
    opacity: 1 !important;
}

/* Content typography */
.mud-snackbar-content-text,
.mud-snackbar .mud-alert-message {
    font-size: 0.8rem !important;
    font-weight: 600 !important; /* Semi-bold for high readability */
    letter-spacing: 0.015em !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
}

.nf-theme-dark .mud-snackbar-content-text,
.nf-theme-dark .mud-snackbar .mud-alert-message {
    color: #e2dfff !important;
}

/* Close button style */
.mud-snackbar .mud-alert-close {
    margin-left: auto !important;
    padding-left: 12px !important;
}

.mud-snackbar .mud-alert-close .mud-icon-button {
    color: inherit !important;
    opacity: 0.5 !important;
    transition: opacity 0.2s ease !important;
}

.mud-snackbar .mud-alert-close .mud-icon-button:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.04) !important;
}

.nf-theme-dark .mud-snackbar .mud-alert-close .mud-icon-button:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

/* --- Dynamic Severity Variants --- */

/* 1. Success Toast */
.mud-snackbar.mud-alert-filled-success {
    border-left: 6px solid #22c55e !important; /* Beautiful green side band */
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(255, 255, 255, 0) 100%), #ffffff !important;
}

.nf-theme-dark .mud-snackbar.mud-alert-filled-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(21, 20, 58, 0) 100%), #15143a !important;
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.15) !important; /* Soft green neon glow shadow */
    border: 1px solid rgba(34, 197, 94, 0.15) !important;
    border-left: 6px solid #22c55e !important;
}

.mud-snackbar.mud-alert-filled-success .mud-alert-icon {
    color: #22c55e !important;
}

/* 2. Error / Danger Toast */
.mud-snackbar.mud-alert-filled-error {
    border-left: 6px solid #ef4444 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(255, 255, 255, 0) 100%), #ffffff !important;
}

.nf-theme-dark .mud-snackbar.mud-alert-filled-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(21, 20, 58, 0) 100%), #15143a !important;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.15) !important; /* Soft red neon glow shadow */
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
    border-left: 6px solid #ef4444 !important;
}

.mud-snackbar.mud-alert-filled-error .mud-alert-icon {
    color: #ef4444 !important;
}

/* 3. Warning Toast */
.mud-snackbar.mud-alert-filled-warning {
    border-left: 6px solid #f59e0b !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(255, 255, 255, 0) 100%), #ffffff !important;
}

.nf-theme-dark .mud-snackbar.mud-alert-filled-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(21, 20, 58, 0) 100%), #15143a !important;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15) !important; /* Soft gold neon glow shadow */
    border: 1px solid rgba(245, 158, 11, 0.15) !important;
    border-left: 6px solid #f59e0b !important;
}

.mud-snackbar.mud-alert-filled-warning .mud-alert-icon {
    color: #f59e0b !important;
}

/* 4. Info Toast */
.mud-snackbar.mud-alert-filled-info {
    border-left: 6px solid #3b82f6 !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(255, 255, 255, 0) 100%), #ffffff !important;
}

.nf-theme-dark .mud-snackbar.mud-alert-filled-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(21, 20, 58, 0) 100%), #15143a !important;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.15) !important; /* Soft blue neon glow shadow */
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
    border-left: 6px solid #3b82f6 !important;
}

.mud-snackbar.mud-alert-filled-info .mud-alert-icon {
    color: #3b82f6 !important;
}

/* --- Premium Solid Confirm Dialog Style --- */
.mud-dialog.nf-confirm-dialog {
    background-color: #ffffff !important;
    color: #191c1d !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25) !important;
}

.nf-theme-dark .mud-dialog.nf-confirm-dialog {
    background-color: #15143a !important; /* Premium deep navy background for maximum readability */
    color: #e2dfff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Make sure the typography inside confirmation dialog pops out */
.nf-confirm-dialog h3,
.nf-confirm-dialog p {
    color: inherit !important;
}

/* --- Premium Backdrop Blur for MudBlazor Dialog Overlays --- */
.mud-dialog-container {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    background-color: rgba(10, 10, 32, 0.45) !important; /* Soft dark elegant screen overlay */
}

/* --- High-Contrast & Premium Checkbox (Onay Kutusu) & Switch (Anahtar) Overrides --- */

/* 1. Global Checkbox Override */
.mud-checkbox {
    opacity: 1 !important;
}

/* Unchecked Checkbox SVG & Button Container */
.mud-checkbox .mud-button-root.mud-icon-button {
    opacity: 1 !important;
    color: #64748b !important; /* Solid Slate gray for light mode */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nf-theme-dark .mud-checkbox .mud-button-root.mud-icon-button {
    color: #94a3b8 !important; /* Solid medium slate-gray for dark mode unchecked state */
}

/* Checked Checkbox Icon - Default success checkmark */
.mud-checkbox .mud-button-root.mud-icon-button.mud-checked {
    opacity: 1 !important;
    color: #22c55e !important;
}

/* Brand Primary Checked Overrides */
.nf-theme-light .mud-checkbox .mud-button-root.mud-icon-button.mud-checked.mud-primary-text {
    color: var(--nf-primary) !important; /* Light theme primary brand checkmark */
}

.nf-theme-dark .mud-checkbox .mud-button-root.mud-icon-button.mud-checked.mud-primary-text {
    color: var(--nf-accent) !important; /* Neon accent checkmark for premium dark theme contrast */
}

/* Respect other standard colors in MudBlazor checked states */
.mud-checkbox .mud-button-root.mud-icon-button.mud-checked.mud-success-text {
    color: #22c55e !important;
}
.mud-checkbox .mud-button-root.mud-icon-button.mud-checked.mud-error-text {
    color: #ef4444 !important;
}
.mud-checkbox .mud-button-root.mud-icon-button.mud-checked.mud-warning-text {
    color: #f59e0b !important;
}
.mud-checkbox .mud-button-root.mud-icon-button.mud-checked.mud-info-text {
    color: #3b82f6 !important;
}
.mud-checkbox .mud-button-root.mud-icon-button.mud-checked.mud-secondary-text {
    color: #8b5cf6 !important;
}

/* Hover effects for checkbox buttons */
.mud-checkbox:hover .mud-button-root.mud-icon-button {
    background-color: rgba(71, 85, 105, 0.08) !important;
}

.nf-theme-dark .mud-checkbox:hover .mud-button-root.mud-icon-button {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.mud-checkbox:hover .mud-button-root.mud-icon-button.mud-checked {
    background-color: rgba(34, 197, 94, 0.08) !important;
}

.nf-theme-light .mud-checkbox:hover .mud-button-root.mud-icon-button.mud-checked.mud-primary-text {
    background-color: rgba(var(--mud-palette-primary-rgb), 0.08) !important;
}

.nf-theme-dark .mud-checkbox:hover .mud-button-root.mud-icon-button.mud-checked.mud-primary-text {
    background-color: rgba(209, 239, 100, 0.12) !important;
}

/* Checkbox Label Text */
.mud-checkbox-typography {
    color: #0f172a !important; /* Slate-900 for absolute contrast */
    font-weight: 600 !important; /* Semi-bold for exceptional readability */
    opacity: 1 !important;
}

.nf-theme-dark .mud-checkbox-typography {
    color: var(--nf-on-surface) !important;
}

/* Ensure checkbox icon paths inside SVGs are crisp and sharp */
.mud-checkbox .mud-svg-icon {
    width: 24px !important;
    height: 24px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)) !important;
}

.nf-theme-dark .mud-checkbox .mud-svg-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)) !important;
}


/* 2. Global Switch (Anahtar) Override */
.mud-switch {
    opacity: 1 !important;
}

/* Unchecked Switch Track */
.mud-switch .mud-switch-track {
    background-color: #cbd5e1 !important; /* Solid light gray track in light mode */
    opacity: 1 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    transition: background-color 0.2s ease !important;
}

.nf-theme-dark .mud-switch .mud-switch-track {
    background-color: #353560 !important; /* Premium visible background in dark mode */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Unchecked Switch Thumb (Button) */
.mud-switch .mud-switch-thumb {
    background-color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

.nf-theme-dark .mud-switch .mud-switch-thumb {
    background-color: #e2dfff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* Checked Switch Track */
.mud-switch.mud-checked .mud-switch-track {
    background-color: #22c55e !important; /* Solid success green track in light mode */
    opacity: 1 !important;
    border-color: #166534 !important;
}

.nf-theme-dark .mud-switch.mud-checked .mud-switch-track {
    background-color: #d1ef64 !important; /* Accent neon track in dark mode */
    opacity: 1 !important;
    border-color: #586c00 !important;
}

/* Checked Switch Thumb */
.mud-switch.mud-checked .mud-switch-thumb {
    background-color: #ffffff !important;
}

.nf-theme-dark .mud-switch.mud-checked .mud-switch-thumb {
    background-color: #171640 !important; /* Contrast navy thumb on neon track */
}

/* Switch Typography Label */
.mud-switch .mud-typography {
    color: #0f172a !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

.nf-theme-dark .mud-switch .mud-typography {
    color: var(--nf-on-surface) !important;
}


/* 3. Dropdown Popover and Selection Checkbox Alignment */
.mud-list-item .mud-checkbox {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 4. Native Checkbox fallback (just in case any native inputs exist) */
input[type="checkbox"] {
    accent-color: var(--nf-primary) !important;
    border-radius: 4px !important;
    border: 2px solid #475569 !important;
}

.nf-theme-dark input[type="checkbox"] {
    accent-color: var(--nf-accent) !important;
    border-color: #ffffff !important;
}

/* --- Premium Glassmorphic & Neon Glowing Badge System --- */

/* Base Badge class */
.nf-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 10px !important;
    font-size: 0.65rem !important;
    font-weight: 750 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    border-radius: 9999px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

/* Global mappings for existing Tailwind / inline badges */

/* Success Badges (e.g. Completed, Login, Active) */
.bg-success\/10.text-success.border-success\/20,
.bg-success\/10.text-success.border,
.nf-badge-success {
    background-color: rgba(34, 197, 94, 0.08) !important;
    color: #166534 !important;
    border: 1px solid rgba(34, 197, 94, 0.2) !important;
    font-size: 0.65rem !important;
    font-weight: 750 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    border-radius: 9999px !important;
    padding: 3px 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
}

.nf-theme-dark .bg-success\/10.text-success.border-success\/20,
.nf-theme-dark .bg-success\/10.text-success.border,
.nf-theme-dark .nf-badge-success {
    background-color: rgba(34, 197, 94, 0.1) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.25) !important;
    text-shadow: 0 0 6px rgba(74, 222, 128, 0.3) !important;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.1) !important;
}

/* Blue / Running / Info Badges */
.bg-blue-500\/10.text-blue-500.border-blue-500\/20,
.bg-blue-500\/10.text-blue-500.border,
.bg-info\/10.text-info.border-info\/20,
.bg-info\/10.text-info.border,
.nf-badge-info,
.nf-badge-blue {
    background-color: rgba(59, 130, 246, 0.08) !important;
    color: #1e40af !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    font-size: 0.65rem !important;
    font-weight: 750 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    border-radius: 9999px !important;
    padding: 3px 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
}

.nf-theme-dark .bg-blue-500\/10.text-blue-500.border-blue-500\/20,
.nf-theme-dark .bg-blue-500\/10.text-blue-500.border,
.nf-theme-dark .bg-info\/10.text-info.border-info\/20,
.nf-theme-dark .bg-info\/10.text-info.border,
.nf-theme-dark .nf-badge-info,
.nf-theme-dark .nf-badge-blue {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
    text-shadow: 0 0 6px rgba(96, 165, 250, 0.3) !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1) !important;
}

/* Warning / Pending Badges */
.bg-warning\/10.text-warning.border-warning\/20,
.bg-warning\/10.text-warning.border,
.nf-badge-warning {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #92400e !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    font-size: 0.65rem !important;
    font-weight: 750 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    border-radius: 9999px !important;
    padding: 3px 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
}

.nf-theme-dark .bg-warning\/10.text-warning.border-warning\/20,
.nf-theme-dark .bg-warning\/10.text-warning.border,
.nf-theme-dark .nf-badge-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.3) !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1) !important;
}

/* Error / Failed Badges */
.bg-error\/10.text-error.border-error\/20,
.bg-error\/10.text-error.border,
.nf-badge-danger,
.nf-badge-error {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #991b1b !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    font-size: 0.65rem !important;
    font-weight: 750 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    border-radius: 9999px !important;
    padding: 3px 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
}

.nf-theme-dark .bg-error\/10.text-error.border-error\/20,
.nf-theme-dark .bg-error\/10.text-error.border,
.nf-theme-dark .nf-badge-danger,
.nf-theme-dark .nf-badge-error {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    text-shadow: 0 0 6px rgba(248, 113, 113, 0.3) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1) !important;
}

/* Primary / Brand Badges (e.g. Version labels, custom categories) */
.bg-primary\/10.text-primary.border-primary\/20,
.bg-primary\/10.text-primary.border,
.nf-badge-primary {
    background-color: rgba(30, 42, 120, 0.08) !important;
    color: var(--nf-primary) !important;
    border: 1px solid rgba(30, 42, 120, 0.18) !important;
    font-size: 0.65rem !important;
    font-weight: 750 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    border-radius: 9999px !important;
    padding: 3px 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
}

.nf-theme-dark .bg-primary\/10.text-primary.border-primary\/20,
.nf-theme-dark .bg-primary\/10.text-primary.border,
.nf-theme-dark .nf-badge-primary {
    background-color: rgba(209, 239, 100, 0.08) !important;
    color: var(--nf-accent) !important;
    border: 1px solid rgba(209, 239, 100, 0.25) !important;
    text-shadow: 0 0 6px rgba(209, 239, 100, 0.3) !important;
    box-shadow: 0 0 10px rgba(209, 239, 100, 0.1) !important;
}

/* Extra hover-glow effect for premium interactivity */
.nf-badge:hover,
.bg-success\/10.text-success.border:hover,
.bg-blue-500\/10.text-blue-500.border:hover,
.bg-warning\/10.text-warning.border:hover,
.bg-error\/10.text-error.border:hover,
.bg-primary\/10.text-primary.border:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.nf-theme-dark .nf-badge:hover,
.nf-theme-dark .bg-success\/10.text-success.border:hover,
.nf-theme-dark .bg-blue-500\/10.text-blue-500.border:hover,
.nf-theme-dark .bg-warning\/10.text-warning.border:hover,
.nf-theme-dark .bg-error\/10.text-error.border:hover,
.nf-theme-dark .bg-primary\/10.text-primary.border:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05) !important;
}