/* public/css/style.css - Dual Theme Engine (Light Mode Default + Dark Mode Switchable) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ========================================================
   LIGHT THEME TOKENS (VARSAYILAN / DEFAULT)
   ======================================================== */
:root,
[data-theme="light"] {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0;
    --border-glow: rgba(37, 99, 235, 0.15);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.25);
    
    --success: #059669;
    --success-hover: #047857;
    --success-glow: rgba(5, 150, 105, 0.2);
    
    --danger: #e11d48;
    --danger-hover: #be123c;
    --danger-glow: rgba(225, 29, 72, 0.2);
    
    --warning: #d97706;
    --warning-hover: #b45309;
    --warning-glow: rgba(217, 119, 6, 0.2);

    --purple: #7c3aed;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --input-color: #0f172a;
    --topbar-bg: rgba(255, 255, 255, 0.94);
    --sidebar-bg: #ffffff;
    --table-th-bg: #f8fafc;
    --table-th-color: #475569;
    --table-row-hover: #f8fafc;
}

/* ========================================================
   DARK THEME TOKENS (KARANLIK MOD)
   ======================================================== */
[data-theme="dark"] {
    --bg-main: #0b0f19;
    --bg-card: rgba(22, 28, 45, 0.7);
    --bg-glass: rgba(17, 24, 39, 0.55);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(59, 130, 246, 0.2);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.4);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.3);
    
    --danger: #f43f5e;
    --danger-hover: #e11d48;
    --danger-glow: rgba(244, 63, 94, 0.3);
    
    --warning: #fbbf24;
    --warning-hover: #d97706;
    --warning-glow: rgba(251, 191, 36, 0.3);

    --purple: #8b5cf6;

    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-card-hover: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
    --input-bg: rgba(17, 24, 39, 0.75);
    --input-border: rgba(255, 255, 255, 0.08);
    --input-color: #f3f4f6;
    --topbar-bg: rgba(11, 15, 25, 0.8);
    --sidebar-bg: rgba(22, 28, 45, 0.7);
    --table-th-bg: transparent;
    --table-th-color: #9ca3af;
    --table-row-hover: rgba(255, 255, 255, 0.01);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
}

.text-nowrap {
    white-space: nowrap !important;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="dark"] body,
body[data-theme="dark"] {
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--text-primary);
}

/* Layout container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Layout */
.sidebar {
    width: 280px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--primary-glow);
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
}

.logo-text {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 1rem;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.nav-menu::-webkit-scrollbar {
    width: 4px;
}
.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}
.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.nav-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}


.nav-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item a:hover, .nav-item.active a {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
}

.nav-item.active a {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.05);
}

/* Sidebar Nav Accordion / Dropdown Groups */
.nav-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.25rem;
}

.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    user-select: none;
}

.nav-group-header:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
}

.nav-group.open .nav-group-header,
.nav-group.active-parent .nav-group-header {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

.nav-group-header .group-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nav-group-header .chevron-icon {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
    color: var(--text-muted);
}

.nav-group.open .nav-group-header .chevron-icon {
    transform: rotate(180deg);
    color: #93c5fd;
}

.nav-group-items {
    list-style: none;
    padding-left: 0.85rem;
    margin-top: 0.25rem;
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    border-left: 2px solid rgba(59, 130, 246, 0.25);
    margin-left: 1.35rem;
}

.nav-group.open .nav-group-items {
    display: flex;
}

.nav-subitem a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s ease;
    text-decoration: none;
}

.nav-subitem a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-subitem.active a {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.15);
    font-weight: 600;
}

.user-profile {
    margin-top: auto;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-profile-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.85rem;
    border-radius: 8px;
    background: rgba(244, 63, 94, 0.1);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
    margin-top: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Main Content Layout */
.main-wrapper {
    margin-left: 280px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - 280px);
    max-width: calc(100% - 280px);
    min-width: 0;
}

.top-bar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.branch-indicator {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 0.35rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.branch-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.content-body {
    padding: 2rem;
    flex-grow: 1;
}

/* Cards & Containers */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    max-width: 100%;
    overflow-x: hidden;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon.rose {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.stat-icon.amber {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Forms & UI Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control, .form-select, .form-textarea,
input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
    width: 100%;
    box-sizing: border-box !important;
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Standart Metin ve Sayı Inputları */
.form-control,
input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="date"], input[type="datetime-local"], input[type="search"] {
    height: 42px !important;
    min-height: 42px !important;
    line-height: 40px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    vertical-align: middle;
}

/* TÜM AÇILIR LİSTELER (STANDART TEK SATIRLIK SELECT / DROPDOWN) */
select:not([size]),
select[size="1"],
.form-select:not([size]),
.form-select[size="1"],
select.form-control:not([size]),
select.form-control[size="1"],
select.form-select:not([size]),
select.form-select[size="1"] {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    line-height: normal !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0.85rem;
    padding-right: 2.5rem !important;
    background-color: #111827 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 1rem 1rem !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
    display: block !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #f3f4f6 !important;
    vertical-align: middle !important;
}

/* ========================================================
   SİSTEM GENELİ İKONLU INPUT VE SELECT ELEMANLARI (FIX)
   İkonların metin / placeholder üzerine binmesini önleyen küresel çözüm
   ======================================================== */

/* 1. Solunda FontAwesome ikonu bulunan input ve select elemanları için otomatik sol boşluk */
div:has(> i[class*="fa-"]:not(.fa-eye):not(.fa-eye-slash):not([id*="clear"]):not([class*="right"]):first-child) > input:not([type="hidden"]):not([style*="padding-left: 3"]):not([style*="padding-left:3"]):not([style*="padding-left: 4"]):not([style*="padding-left:4"]),
div:has(> i[class*="fa-"]:not(.fa-eye):not(.fa-eye-slash):not([id*="clear"]):not([class*="right"]):first-child) > select,
.has-icon-left > input,
.has-icon-left > select,
.input-icon-left > input,
.input-icon-left > select,
.input-with-icon > input,
.input-with-icon > select,
.input-icon-wrapper > input,
.input-icon-wrapper > select,
.input-wrapper > input,
.input-wrapper > select {
    padding-left: 2.75rem !important;
}

/* Küçük boyutlu ikonlu inputlar için sol boşluk */
div:has(> i[class*="fa-"]:not(.fa-eye):not(.fa-eye-slash):first-child) > input.form-control-sm,
div:has(> i[class*="fa-"]:not(.fa-eye):not(.fa-eye-slash):first-child) > select.form-control-sm,
div:has(> i[class*="fa-"]:not(.fa-eye):not(.fa-eye-slash):first-child) > select.form-select-sm,
.form-control-sm.has-icon-left,
.input-icon-left > input.form-control-sm {
    padding-left: 2.3rem !important;
}

/* 2. Sağında ikon (şifre göster/gizle gözü, temizleme x'i vb.) olan inputlar için sağ boşluk */
div:has(> i.fa-eye) > input,
div:has(> i.fa-eye-slash) > input,
div:has(> #toggle-password-btn) > input,
div:has(> [id*="toggle-pass"]) > input,
div:has(> [id*="togglePass"]) > input,
div:has(> [id*="togglePassword"]) > input,
div:has(> [id*="clear"]) > input,
div:has(> [class*="fa-circle-xmark"]) > input,
.has-icon-right > input,
.input-icon-right > input,
.input-wrapper:has(> .toggle-password-btn) > input {
    padding-right: 2.75rem !important;
}

/* 3. Hem solunda hem sağında ikon olan inputlar (örn: login şifre alanı) */
div:has(> i[class*="fa-"]:first-child):has(> i.fa-eye, > i.fa-eye-slash, > #toggle-password-btn, > [id*="toggle-pass"], > [id*="togglePass"], > [id*="togglePassword"], > [id*="clear"], > .toggle-password-btn) > input,
.input-wrapper:has(> .toggle-password-btn) > input {
    padding-left: 2.75rem !important;
    padding-right: 2.75rem !important;
}

/* 4. Sol ikonların kusursuz dikey ortalanması ve input odağı sağlaması */
div[style*="position: relative"]:has(> input:not([type="hidden"]), > select) > i[class*="fa-"]:first-child:not([style*="right"]):not([class*="right"]):not(.fa-eye):not(.fa-eye-slash),
div[style*="position:relative"]:has(> input:not([type="hidden"]), > select) > i[class*="fa-"]:first-child:not([style*="right"]):not([class*="right"]):not(.fa-eye):not(.fa-eye-slash),
div.position-relative:has(> input:not([type="hidden"]), > select) > i[class*="fa-"]:first-child:not([style*="right"]):not([class*="right"]):not(.fa-eye):not(.fa-eye-slash),
.input-icon-wrapper > i:first-child,
.input-with-icon > i:first-child,
.input-wrapper > .input-icon,
.input-wrapper > i:first-child {
    position: absolute !important;
    left: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 4 !important;
    pointer-events: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* Küçük boyutlu inputlardaki sol ikonların konumu */
div:has(> input.form-control-sm, > select.form-control-sm, > select.form-select-sm) > i[class*="fa-"]:first-child {
    left: 0.8rem !important;
    font-size: 0.85rem !important;
}

/* 5. Sağdaki etkileşimli ikonların (göz simgesi, arama temizleme vb.) dikey ortalanması ve tıklanabilir kalması */
div:has(> input) > i.fa-eye,
div:has(> input) > i.fa-eye-slash,
div:has(> input) > #toggle-password-btn,
div:has(> input) > [id*="toggle-pass"],
div:has(> input) > [id*="togglePass"],
div:has(> input) > [id*="togglePassword"],
div:has(> input) > [id*="clear"],
div:has(> input) > [class*="fa-circle-xmark"] {
    position: absolute !important;
    right: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* ÇOK SATIRLI LİSTE KUTULARI (SELECT WITH SIZE > 1 VEYA MULTIPLE) */
select[size]:not([size="1"]),
select[multiple],
.form-select[size]:not([size="1"]),
.form-select[multiple] {
    height: auto !important;
    min-height: 160px !important;
    max-height: 320px !important;
    line-height: 1.5 !important;
    padding: 0.4rem !important;
    background-color: #111827 !important;
    background-image: none !important;
    -webkit-appearance: listbox !important;
    -moz-appearance: listbox !important;
    appearance: listbox !important;
    cursor: default !important;
    display: block !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #f3f4f6 !important;
    overflow-y: auto !important;
    border-radius: 10px !important;
}

/* Açılır Liste Seçenekleri (Options / Optgroups) */
select option,
select optgroup,
.form-select option,
.form-select optgroup {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

select optgroup {
    font-weight: 700 !important;
    color: #93c5fd !important;
    background-color: #1e293b !important;
    font-style: normal !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Odaklanma (Focus) Durumları */
.form-control:focus, 
.form-select:focus, 
input:focus, 
select:focus, 
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    background-color: rgba(17, 24, 39, 0.95);
}

/* Tablo İçi ve Modal İçi Form Elemanları (Sıkışmayı Önleyen Ferah Kurallar) */
.custom-table .form-control,
.custom-table input[type="text"],
.custom-table input[type="number"],
.po-item-row .form-control,
.po-item-row input[type="text"],
.po-item-row input[type="number"] {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 36px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    font-size: 0.88rem !important;
    box-sizing: border-box !important;
}

.custom-table select,
.custom-table .form-select,
.po-item-row select,
.po-item-row .form-select {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: normal !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0.6rem;
    padding-right: 1.45rem !important;
    background-position: right 0.4rem center !important;
    background-size: 0.75rem 0.75rem !important;
    font-size: 0.88rem !important;
    box-sizing: border-box !important;
}

/* Küçük Boyutlu Input & Select Elemanları */
.form-control-sm,
.form-select-sm,
select.form-control-sm,
select.form-select-sm,
input.form-control-sm {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    font-size: 0.82rem !important;
    padding-left: 0.65rem;
    padding-right: 2rem !important;
}

/* Modal Başlık İçi Hap (Pill) Select Stili */
select.select-inline-pill,
.select-inline-pill {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    line-height: normal !important;
    padding: 0 1.6rem 0 0.4rem !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    background-color: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23c084fc'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.2rem center !important;
    background-size: 0.85rem 0.85rem !important;
}

/* Modal Sekme Çubukları Scrollbar Gizleme & Kaymayı Önleme */
.mdl-tab-bar,
.modal-tabs,
.tab-scroll-container,
[style*="overflow-x: auto"] {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.mdl-tab-bar::-webkit-scrollbar,
.modal-tabs::-webkit-scrollbar,
.tab-scroll-container::-webkit-scrollbar,
[style*="overflow-x: auto"]::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Metin Alanı (Textarea) */
.form-textarea,
textarea.form-control {
    min-height: 90px !important;
    height: auto !important;
    line-height: 1.5 !important;
    padding: 0.65rem 0.85rem !important;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 12px var(--success-glow);
}
.btn-success:hover {
    background: var(--success-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px var(--danger-glow);
}
.btn-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: #000;
    box-shadow: 0 4px 12px var(--warning-glow);
}
.btn-warning:hover {
    background: var(--warning-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
}

.badge.pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge.approved {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.rejected {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Table Style */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    word-break: normal;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.custom-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Production Timeline and Workflow Cards */
.production-pipeline {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.pipeline-stage {
    min-width: 250px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.stage-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stage-count {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}

.pipeline-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pipeline-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fda4af;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active, .tab-btn:hover {
    color: var(--text-primary);
    border-bottom-color: var(--primary);
}

/* Mobile-Specific Menu and Responsive Adjustments */
.mobile-header {
    display: none;
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 110;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.hamburger {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Barcode Card */
.barcode-box {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: black;
    margin: 1rem 0;
    border: 2px dashed #ccc;
    max-width: 300px;
}

.barcode-stripes {
    letter-spacing: 0.3em;
    font-family: monospace;
    font-size: 2.5rem;
    font-weight: 100;
}

@media (max-width: 1024px) {
    .sidebar {
        left: -280px;
        z-index: 9999;
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.6);
    }
    .sidebar.open {
        left: 0;
    }
    .main-wrapper {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
    .mobile-header {
        display: flex;
    }
    .top-bar {
        display: none; /* Mobile header takes its place */
    }
    .content-body {
        margin-top: 60px;
        padding: 1.25rem;
    }
}

/* Boss Cost Dashboard Styling */
.metric-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.05);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.country-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.country-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.chart-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.badge.repairing {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulseBorderRed 2s infinite;
}

@keyframes pulseBorderRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- Tooltip / Info Bubble --- */
.info-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: help;
    margin-left: 0.4rem;
    position: relative;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.info-bubble:hover {
    background-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.info-bubble::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: normal;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 1000;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.info-bubble::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.info-bubble:hover::after,
.info-bubble:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   📄 PRINT / PDF Export Stilleri
   window.print() veya Ctrl+P ile tetiklenir
   ═══════════════════════════════════════════════════════════════ */
@media print {
    /* Baskıda gizle */
    .sidebar,
    .mobile-header,
    .top-bar,
    .btn,
    .btn-outline,
    .btn-primary,
    .btn-danger,
    .btn-logout,
    .no-print,
    form,
    .feedback-btn,
    nav,
    [data-no-print] {
        display: none !important;
    }

    /* Layout sıfırla */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
        margin: 0;
    }

    .app-container {
        display: block !important;
    }

    .main-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .content-body {
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* Kart ve cam görünümünü temizle */
    .glass-card,
    .stat-card,
    .card {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        page-break-inside: avoid;
        margin-bottom: 12pt;
    }

    /* Tablo baskı görünümü */
    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 10pt;
    }

    th, td {
        border: 1px solid #aaa !important;
        padding: 4pt 6pt !important;
        color: #000 !important;
        background: transparent !important;
    }

    th {
        background: #f0f0f0 !important;
        font-weight: 700;
    }

    tr:nth-child(even) td {
        background: #fafafa !important;
    }

    /* Renkli badge/durum etiketleri */
    .badge, [class*="badge"] {
        border: 1px solid #999 !important;
        color: #000 !important;
        background: transparent !important;
    }

    /* Sayfa kenar boşlukları */
    @page {
        margin: 15mm 15mm 15mm 15mm;
        size: A4 portrait;
    }

    /* Tablolar sayfa kırılmaları */
    thead { display: table-header-group; }
    tfoot { display: table-footer-group; }
    tr    { page-break-inside: avoid; }

    /* H1/H2 başlıktan önce sayfa kırma */
    h1 { page-break-before: always; }
    h1:first-child { page-break-before: avoid; }

    /* Link'leri plain text göster */
    a { color: #000 !important; text-decoration: none !important; }

    /* Baskıda görünür olmasını istediğin öğe */
    .print-only { display: block !important; }
}

/* Baskı butonu yardımcı sınıfı */
.print-only {
    display: none;
}
.btn-print {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}
.btn-print:hover {
    background: rgba(255,255,255,0.14);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.2);
}

/* ========================================================
   ERP GLOBAL MODAL & UI UTILITIES (Saf CSS / Glassmorphic)
   ======================================================== */
.erp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 15, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2.5rem 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.erp-modal-overlay.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 1;
}

.erp-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    margin: 1rem auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px var(--primary-glow);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.96);
    transition: transform 0.2s ease;
}

.erp-modal-box form {
    display: block;
    width: 100%;
    margin: 0;
}

.erp-modal-box.modal-lg {
    max-width: 800px;
}

.erp-modal-box.modal-sm {
    max-width: 420px;
}

.erp-modal-overlay.show .erp-modal-box {
    transform: scale(1);
}

.erp-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.erp-modal-header h4 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.erp-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.erp-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.erp-modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

.erp-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

/* Badge Renk Varyantları */
.badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge.purple {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge.neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.po-row {
    transition: background 0.15s ease;
}

.po-row:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

/* ========================================================
   🌓 THEME TOGGLE BUTTON & DUAL THEME COMPONENT STYLES
   ======================================================== */

.theme-toggle-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    font-size: 1.05rem;
}

.theme-toggle-btn:hover {
    transform: rotate(15deg) scale(1.08);
    color: var(--primary);
    box-shadow: 0 4px 12px var(--border-glow);
}

[data-theme="light"] .theme-toggle-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .theme-toggle-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fbbf24;
}

/* ========================================================
   ☀️ LIGHT MODE SPECIAL COMPONENT OVERRIDES
   Executive, Crisp, Modern Slate Theme
   ======================================================== */

/* Sidebar in Light Mode */
[data-theme="light"] .sidebar {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .logo-text {
    background: linear-gradient(135deg, #0f172a, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .logo-badge {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

[data-theme="light"] .nav-item a {
    color: #475569;
}

[data-theme="light"] .nav-item a:hover {
    color: #0f172a;
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .nav-item.active a {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

[data-theme="light"] .nav-group-header {
    color: #475569;
}

[data-theme="light"] .nav-group-header:hover {
    color: #0f172a;
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .nav-group.open .nav-group-header,
[data-theme="light"] .nav-group.active-parent .nav-group-header {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

[data-theme="light"] .nav-group.open .nav-group-header .chevron-icon {
    color: #1d4ed8;
}

[data-theme="light"] .nav-group-items {
    border-left: 2px solid #93c5fd;
}

[data-theme="light"] .nav-subitem a {
    color: #64748b;
}

[data-theme="light"] .nav-subitem a:hover {
    color: #0f172a;
    background: #f8fafc;
}

[data-theme="light"] .nav-subitem.active a {
    color: #1d4ed8;
    background: #eff6ff;
    font-weight: 600;
}

[data-theme="light"] .user-profile {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

[data-theme="light"] .user-name {
    color: #0f172a;
}

[data-theme="light"] .user-role {
    color: #64748b;
}

[data-theme="light"] .btn-logout {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
}

[data-theme="light"] .btn-logout:hover {
    background: #e11d48;
    color: #ffffff;
}

/* Topbar & Mobile Header in Light Mode */
[data-theme="light"] .top-bar,
[data-theme="light"] .mobile-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .page-title {
    color: #0f172a;
}

[data-theme="light"] .branch-indicator {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

[data-theme="light"] .hamburger {
    color: #0f172a;
}

/* Cards & Glass Containers in Light Mode */
[data-theme="light"] .glass-card,
[data-theme="light"] .card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .glass-card:hover,
[data-theme="light"] .card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .stat-info h3 {
    background: linear-gradient(135deg, #0f172a, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .stat-info p {
    color: #64748b;
}

/* Forms, Inputs, Selects & Textareas in Light Mode */
[data-theme="light"] .form-label {
    color: #475569;
}

[data-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="datetime-local"],
[data-theme="light"] input[type="search"],
[data-theme="light"] select,
[data-theme="light"] textarea {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control::placeholder,
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #94a3b8 !important;
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    background-color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

[data-theme="light"] select:not([size]),
[data-theme="light"] select[size="1"],
[data-theme="light"] .form-select:not([size]),
[data-theme="light"] .form-select[size="1"],
[data-theme="light"] select.form-control:not([size]),
[data-theme="light"] select.form-control[size="1"],
[data-theme="light"] select.form-select:not([size]),
[data-theme="light"] select.form-select[size="1"] {
    background-color: #ffffff !important;
    color: #0f172a !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
}

[data-theme="light"] select[size]:not([size="1"]),
[data-theme="light"] select[multiple],
[data-theme="light"] .form-select[size]:not([size="1"]),
[data-theme="light"] .form-select[multiple] {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] select option,
[data-theme="light"] select optgroup,
[data-theme="light"] .form-select option,
[data-theme="light"] .form-select optgroup {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

[data-theme="light"] select optgroup {
    background-color: #f1f5f9 !important;
    color: #1e40af !important;
}

/* Tables in Light Mode */
[data-theme="light"] .custom-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
}

[data-theme="light"] .custom-table td {
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
}

[data-theme="light"] .custom-table tr:hover td {
    background-color: #f8fafc;
}

[data-theme="light"] .po-row:hover {
    background: rgba(37, 99, 235, 0.05) !important;
}

/* Buttons in Light Mode */
[data-theme="light"] .btn-outline {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

[data-theme="light"] .btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Badges in Light Mode */
[data-theme="light"] .badge.pending {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

[data-theme="light"] .badge.approved {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

[data-theme="light"] .badge.rejected {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

[data-theme="light"] .badge.info {
    background: #e0f2fe;
    color: #075985;
    border-color: #bae6fd;
}

[data-theme="light"] .badge.warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

[data-theme="light"] .badge.purple {
    background: #ede9fe;
    color: #5b21b6;
    border-color: #ddd6fe;
}

[data-theme="light"] .badge.neutral {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

/* Stat Icons in Light Mode */
[data-theme="light"] .stat-icon.blue {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

[data-theme="light"] .stat-icon.green {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

[data-theme="light"] .stat-icon.rose {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
}

[data-theme="light"] .stat-icon.amber {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}

/* Alerts in Light Mode */
[data-theme="light"] .alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

[data-theme="light"] .alert-error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
}

/* Modals in Light Mode */
[data-theme="light"] .erp-modal-overlay {
    background: rgba(15, 23, 42, 0.45);
}

[data-theme="light"] .erp-modal-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.15), 0 0 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .erp-modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .erp-modal-header h4 {
    color: #0f172a;
}

[data-theme="light"] .erp-modal-close {
    color: #64748b;
}

[data-theme="light"] .erp-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

[data-theme="light"] .erp-modal-body {
    color: #0f172a;
}

[data-theme="light"] .erp-modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Notification Hub in Light Mode */
[data-theme="light"] .notif-dropdown {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .notif-dropdown > div:first-child,
[data-theme="light"] .notif-dropdown > div:last-child {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .notif-toast {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}

[data-theme="light"] .notif-dropdown-item:hover {
    background: #f8fafc !important;
}

[data-theme="light"] .notif-dropdown-item.is-unread {
    background: #eff6ff !important;
}

/* Tabs & Pipeline in Light Mode */
[data-theme="light"] .tabs {
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .tab-btn {
    color: #64748b;
}

[data-theme="light"] .tab-btn.active,
[data-theme="light"] .tab-btn:hover {
    color: #0f172a;
    border-bottom-color: var(--primary);
}

[data-theme="light"] .pipeline-stage {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .stage-header {
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .stage-title {
    color: #475569;
}

[data-theme="light"] .pipeline-item {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .country-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .country-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Breadcrumbs & Navigation Bar in Light Mode */
[data-theme="light"] .erp-breadcrumb-nav,
[data-theme="light"] nav[style*="background: rgba(255,255,255,0.02)"] {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Feedback Modal in Light Mode */
[data-theme="light"] .fb-modal-box {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .fb-modal-body {
    color: #0f172a !important;
}

[data-theme="light"] .fb-form-control {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .fb-btn-cancel {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

[data-theme="light"] .fb-btn-cancel:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Scrollbars in Light Mode */
[data-theme="light"] .nav-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .nav-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ========================================================
   ☀️ UNIVERSAL INLINE WHITE-TEXT & CONTRAST ENGINE (LIGHT MODE)
   Solves white-on-white text issues comprehensively across all pages,
   tables, cards, modals, headers, and dynamic widgets.
   ======================================================== */

/* 1. All Headings, Titles, Sections and Labels */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .page-title,
[data-theme="light"] .modal-title,
[data-theme="light"] .card-title,
[data-theme="light"] .stat-title,
[data-theme="light"] .section-title,
[data-theme="light"] .group-title,
[data-theme="light"] .group-title span,
[data-theme="light"] label,
[data-theme="light"] .form-label,
[data-theme="light"] legend {
    color: #0f172a !important;
}

/* 2. All Table Elements, Cells, Headers and Rows */
[data-theme="light"] table,
[data-theme="light"] .table,
[data-theme="light"] .custom-table {
    color: #0f172a !important;
}
[data-theme="light"] table th,
[data-theme="light"] .table th,
[data-theme="light"] .custom-table th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}
[data-theme="light"] table td,
[data-theme="light"] .table td,
[data-theme="light"] .custom-table td {
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}
[data-theme="light"] table tr,
[data-theme="light"] .table tr {
    border-color: #e2e8f0 !important;
}
[data-theme="light"] table tr:hover,
[data-theme="light"] .table tr:hover {
    background-color: #f8fafc !important;
}
[data-theme="light"] table strong,
[data-theme="light"] table b,
[data-theme="light"] table span:not(.badge):not(.badge *):not(.btn):not(.btn *):not([style*="background"]) {
    color: #0f172a !important;
}

/* 3. Stat Cards & Number Values */
[data-theme="light"] .stat-info h3,
[data-theme="light"] .stat-info div,
[data-theme="light"] .stat-card strong,
[data-theme="light"] .stat-card div:not(.stat-icon),
[data-theme="light"] [class*="metric"] strong,
[data-theme="light"] [class*="metric"] div:not([class*="icon"]) {
    color: #0f172a !important;
    background: none !important;
    -webkit-text-fill-color: #0f172a !important;
}

/* 4. Strong & Bold Elements across all containers */
[data-theme="light"] .glass-card strong:not(.btn *):not(.badge *):not([class*="badge"]),
[data-theme="light"] .card strong:not(.btn *):not(.badge *):not([class*="badge"]),
[data-theme="light"] .content-body strong:not(.btn *):not(.badge *):not([class*="badge"]),
[data-theme="light"] .main-wrapper strong:not(.btn *):not(.badge *):not([class*="badge"]),
[data-theme="light"] .glass-card b:not(.btn *):not(.badge *):not([class*="badge"]),
[data-theme="light"] .card b:not(.btn *):not(.badge *):not([class*="badge"]),
[data-theme="light"] .content-body b:not(.btn *):not(.badge *):not([class*="badge"]),
[data-theme="light"] .main-wrapper b:not(.btn *):not(.badge *):not([class*="badge"]) {
    color: #0f172a !important;
}

/* 5. Inputs, Selects, and Textareas in Light Mode */
[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not(.btn),
[data-theme="light"] select,
[data-theme="light"] textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}
[data-theme="light"] select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #94a3b8 !important;
}

/* 6. Modals in Light Mode */
[data-theme="light"] .modal-content,
[data-theme="light"] .erp-modal-box,
[data-theme="light"] .modal-box,
[data-theme="light"] .fb-modal-box {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}
[data-theme="light"] .modal-header,
[data-theme="light"] .modal-body,
[data-theme="light"] .modal-footer {
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* 7. Invert ALL Inline White, Off-White, Tailwind Gray & Slate Colors (Case-Insensitive) */
[data-theme="light"] [style*="color: #ffffff" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]):not([style*="background: linear-gradient" i]):not([style*="background:#" i]):not([style*="background-color:#" i]),
[data-theme="light"] [style*="color:#ffffff" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]):not([style*="background: linear-gradient" i]):not([style*="background:#" i]):not([style*="background-color:#" i]),
[data-theme="light"] [style*="color: #fff" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]):not([style*="background: linear-gradient" i]):not([style*="background:#" i]):not([style*="background-color:#" i]),
[data-theme="light"] [style*="color:#fff" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]):not([style*="background: linear-gradient" i]):not([style*="background:#" i]):not([style*="background-color:#" i]),
[data-theme="light"] [style*="color: white" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]):not([style*="background: linear-gradient" i]):not([style*="background:#" i]):not([style*="background-color:#" i]),
[data-theme="light"] [style*="color:white" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]):not([style*="background: linear-gradient" i]):not([style*="background:#" i]):not([style*="background-color:#" i]),
[data-theme="light"] [style*="color: #f8fafc" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color:#f8fafc" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color: #f3f4f6" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color:#f3f4f6" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color: #f1f5f9" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color:#f1f5f9" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color: #e5e7eb" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color:#e5e7eb" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color: #e2e8f0" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color:#e2e8f0" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color: #cbd5e1" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color:#cbd5e1" i]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.avatar):not(.avatar *):not(.logo-icon):not(.logo-icon *):not(.badge-live):not(.badge-live *):not([class*="btn-"]):not([class*="badge-"]):not([style*="background: #" i]):not([style*="background-color: #" i]),
[data-theme="light"] [style*="color: #d1d5db" i]:not(.btn):not(.btn *):not(.badge):not(.badge *),
[data-theme="light"] [style*="color:#d1d5db" i]:not(.btn):not(.btn *):not(.badge):not(.badge *),
[data-theme="light"] [style*="color: rgba(255, 255, 255," i]:not(.btn *):not(.badge *):not([style*="background"]),
[data-theme="light"] [style*="color:rgba(255,255,255," i]:not(.btn *):not(.badge *):not([style*="background"]),
[data-theme="light"] [style*="color: rgba(255,255,255," i]:not(.btn *):not(.badge *):not([style*="background"]),
[data-theme="light"] [style*="color: rgb(255" i]:not(.btn *):not(.badge *):not([style*="background"]),
[data-theme="light"] [style*="color:rgb(255" i]:not(.btn *):not(.badge *):not([style*="background"]),
[data-theme="light"] .text-white,
[data-theme="light"] .text-light {
    color: #0f172a !important;
}

/* 8. High-Contrast Equivalents for Pastel Colors in Light Mode */
[data-theme="light"] [style*="color: #93c5fd" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#93c5fd" i]:not(.btn *):not(.badge *) {
    color: #1d4ed8 !important;
}
[data-theme="light"] [style*="color: #60a5fa" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#60a5fa" i]:not(.btn *):not(.badge *) {
    color: #2563eb !important;
}
[data-theme="light"] [style*="color: #38bdf8" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#38bdf8" i]:not(.btn *):not(.badge *) {
    color: #0284c7 !important;
}
[data-theme="light"] [style*="color: #34d399" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#34d399" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color: #86efac" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#86efac" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color: #6ee7b7" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#6ee7b7" i]:not(.btn *):not(.badge *) {
    color: #059669 !important;
}
[data-theme="light"] [style*="color: #f87171" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#f87171" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color: #fca5a5" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#fca5a5" i]:not(.btn *):not(.badge *) {
    color: #dc2626 !important;
}
[data-theme="light"] [style*="color: #fbbf24" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#fbbf24" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color: #fcd34d" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#fcd34d" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color: #facc15" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#facc15" i]:not(.btn *):not(.badge *) {
    color: #b45309 !important;
}
[data-theme="light"] [style*="color: #c084fc" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#c084fc" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color: #a78bfa" i]:not(.btn *):not(.badge *),
[data-theme="light"] [style*="color:#a78bfa" i]:not(.btn *):not(.badge *) {
    color: #7c3aed !important;
}

/* 9. Dark Translucent Containers & Cards to Crisp White in Light Mode */
[data-theme="light"] [style*="background: rgba(0,0,0,0." i]:not(.btn):not(.badge):not(.avatar):not(.erp-modal-overlay),
[data-theme="light"] [style*="background: rgba(0, 0, 0, 0." i]:not(.btn):not(.badge):not(.avatar):not(.erp-modal-overlay),
[data-theme="light"] [style*="background:rgba(0,0,0,0." i]:not(.btn):not(.badge):not(.avatar):not(.erp-modal-overlay),
[data-theme="light"] [style*="background: rgba(15, 23, 42" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background: rgba(15,23,42" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background:rgba(15,23,42" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background: rgba(17, 24, 39" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background: rgba(17,24,39" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background:rgba(17,24,39" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background: rgba(11, 15, 25" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background: rgba(18, 24, 38" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background: rgba(22, 28, 45" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background: rgba(255,255,255,0.0" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.0" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] [style*="background:rgba(255,255,255,0.0" i]:not(.btn):not(.badge):not(.avatar),
[data-theme="light"] .force-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* 10. Elements That MUST Keep White Text (Buttons, Badges, Solid Colored Chips) */
[data-theme="light"] .btn:not(.btn-outline):not(.btn-link):not(.fb-btn-cancel),
[data-theme="light"] .btn:not(.btn-outline):not(.btn-link):not(.fb-btn-cancel) *,
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-primary *,
[data-theme="light"] .btn-danger,
[data-theme="light"] .btn-danger *,
[data-theme="light"] .btn-success,
[data-theme="light"] .btn-success *,
[data-theme="light"] .btn-warning,
[data-theme="light"] .btn-glow-primary,
[data-theme="light"] .btn-glow-primary *,
[data-theme="light"] .btn-glow-purple,
[data-theme="light"] .btn-glow-purple *,
[data-theme="light"] .avatar,
[data-theme="light"] .avatar *,
[data-theme="light"] .logo-icon,
[data-theme="light"] .logo-icon *,
[data-theme="light"] .badge-live,
[data-theme="light"] .badge-live *,
[data-theme="light"] .bg-primary,
[data-theme="light"] .bg-danger,
[data-theme="light"] .bg-success,
[data-theme="light"] [style*="background: #ef4444" i],
[data-theme="light"] [style*="background: #ef4444" i] *,
[data-theme="light"] [style*="background:#ef4444" i],
[data-theme="light"] [style*="background:#ef4444" i] *,
[data-theme="light"] [style*="background: #dc2626" i],
[data-theme="light"] [style*="background: #dc2626" i] *,
[data-theme="light"] [style*="background:#dc2626" i],
[data-theme="light"] [style*="background:#dc2626" i] *,
[data-theme="light"] [style*="background: #b91c1c" i],
[data-theme="light"] [style*="background:#b91c1c" i],
[data-theme="light"] [style*="background: #2563eb" i],
[data-theme="light"] [style*="background: #2563eb" i] *,
[data-theme="light"] [style*="background:#2563eb" i],
[data-theme="light"] [style*="background:#2563eb" i] *,
[data-theme="light"] [style*="background: #1d4ed8" i],
[data-theme="light"] [style*="background:#1d4ed8" i],
[data-theme="light"] [style*="background: #3b82f6" i],
[data-theme="light"] [style*="background: #3b82f6" i] *,
[data-theme="light"] [style*="background:#3b82f6" i],
[data-theme="light"] [style*="background:#3b82f6" i] *,
[data-theme="light"] [style*="background: #0ea5e9" i],
[data-theme="light"] [style*="background:#0ea5e9" i],
[data-theme="light"] [style*="background: #10b981" i],
[data-theme="light"] [style*="background: #10b981" i] *,
[data-theme="light"] [style*="background:#10b981" i],
[data-theme="light"] [style*="background:#10b981" i] *,
[data-theme="light"] [style*="background: #059669" i],
[data-theme="light"] [style*="background:#059669" i],
[data-theme="light"] [style*="background: linear-gradient" i]:not(.stat-info h3):not(.logo-text),
[data-theme="light"] [style*="background:linear-gradient" i]:not(.stat-info h3):not(.logo-text),
[data-theme="light"] [style*="background-color: #ef4444" i],
[data-theme="light"] [style*="background-color:#ef4444" i],
[data-theme="light"] [style*="background-color: #2563eb" i],
[data-theme="light"] [style*="background-color:#2563eb" i],
[data-theme="light"] [style*="background-color: #10b981" i],
[data-theme="light"] [style*="background-color:#10b981" i] {
    color: #ffffff !important;
}



