/* Theme Toggle Styles */

/* Theme Toggle Button */
.theme-toggle-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(99, 102, 241, 0.6);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Theme toggle button - positioned at left side of navbar */
.navbar-header-container .theme-toggle-btn {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    margin: 0;
}

.theme-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.9);
}

.navbar-header-container .theme-toggle-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

.theme-toggle-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
    transition: all 0.3s ease;
}

.theme-toggle-btn .sun-icon {
    display: none;
}

.theme-toggle-btn .moon-icon {
    display: block;
}

/* Light Theme Variables */
:root {
    --bg-primary: #31363f;
    --bg-secondary: #222831;
    --bg-card: #1e293b;
    --bg-hover: rgba(99, 102, 241, 0.1);
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-light: #f1f5f9;
    --text-gold: #ffd700;
    --border-color: #475569;
    --accent-primary: rgba(99, 102, 241, 0.6);
    --accent-hover: rgba(99, 102, 241, 0.9);
    --success-color: rgba(16, 185, 129, 0.6);
    --success-hover: rgba(16, 185, 129, 0.9);
    --warning-color: rgba(245, 158, 11, 0.6);
    --warning-hover: rgba(245, 158, 11, 0.9);
    --danger-color: rgba(239, 68, 68, 0.6);
    --danger-hover: rgba(239, 68, 68, 0.9);
    --info-color: rgba(59, 130, 246, 0.6);
    --info-hover: rgba(59, 130, 246, 0.9);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* Default Body Styles - Dark Theme */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-gold) !important;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.body-content {
    background: var(--bg-primary) !important;
    min-height: 100vh;
}

.container-fluid.body-content {
    background: var(--bg-primary) !important;
}

/* Light Theme */
body.light-theme {
    --bg-primary: #e2e8f0 !important;
    --bg-secondary: #f1f5f9 !important;
    --bg-card: #f1f5f9 !important;
    --bg-hover: rgba(99, 102, 241, 0.05) !important;
    --text-primary: #0f172a !important;
    --text-secondary: #334155 !important;
    --text-light: #1e293b !important;
    --text-gold: #d97706 !important;
    --border-color: #cbd5e1 !important;
    --accent-primary: rgba(99, 102, 241, 0.8) !important;
    --accent-hover: rgba(99, 102, 241, 1) !important;
    --success-color: rgba(16, 185, 129, 0.8) !important;
    --success-hover: rgba(16, 185, 129, 1) !important;
    --warning-color: rgba(245, 158, 11, 0.8) !important;
    --warning-hover: rgba(245, 158, 11, 1) !important;
    --danger-color: rgba(239, 68, 68, 0.8) !important;
    --danger-hover: rgba(239, 68, 68, 1) !important;
    --info-color: rgba(59, 130, 246, 0.8) !important;
    --info-hover: rgba(59, 130, 246, 1) !important;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
}

body.light-theme {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

body.light-theme .body-content {
    background: var(--bg-primary) !important;
}

body.light-theme .container-fluid.body-content {
    background: var(--bg-primary) !important;
}

body.light-theme .theme-toggle-btn .sun-icon {
    display: block;
}

body.light-theme .theme-toggle-btn .moon-icon {
    display: none;
}

/* Apply theme colors to components */
body.light-theme .navbar-header-container {
    background: var(--bg-secondary) !important;
    box-shadow: var(--shadow-sm) !important;
    border-bottom: 2px solid var(--border-color) !important;
}

body.light-theme .search-card,
body.light-theme .modern-table-container {
    background: var(--bg-card) !important;
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--border-color) !important;
}

body.light-theme .modern-page-header h2 {
    color: var(--text-primary) !important;
}

body.light-theme .search-card h4,
body.light-theme label {
    color: var(--text-secondary) !important;
}

body.light-theme .form-control-modern,
body.light-theme select.form-control-modern,
body.light-theme input.form-control-modern,
body.light-theme textarea.form-control-modern {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.light-theme .modern-table {
    background: transparent !important;
}

body.light-theme .modern-table thead tr {
    background: var(--bg-primary) !important;
}

body.light-theme .modern-table th,
body.light-theme .modern-table td {
    color: #020617 !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-weight: 600 !important;
}

body.light-theme .modern-table tbody tr:hover {
    background: var(--bg-hover) !important;
}

body.light-theme .topnav a {
    background: var(--accent-primary) !important;
    color: white !important;
}

body.light-theme .topnav a:hover {
    background: var(--accent-hover) !important;
}

body.light-theme .topnav a.active {
    background: var(--success-color) !important;
}

body.light-theme .topnav a.active:hover {
    background: var(--success-hover) !important;
}

body.light-theme .header-menu-btn {
    background: var(--accent-primary) !important;
    color: white !important;
}

body.light-theme .header-menu-btn:hover {
    background: var(--accent-hover) !important;
}

/* Create Order Button - Dark Theme (Night) */
.header-menu-row a.create-order-btn,
.topnav a.create-order-btn,
a.header-menu-btn.create-order-btn {
    background: #10b981 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

.header-menu-row a.create-order-btn:hover,
.topnav a.create-order-btn:hover,
a.header-menu-btn.create-order-btn:hover {
    background: #10b981e6 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Create Order Button - Light Theme (Day) */
body.light-theme .header-menu-row a.create-order-btn,
body.light-theme .topnav a.create-order-btn,
body.light-theme a.header-menu-btn.create-order-btn {
    background: #10b981e0 !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

body.light-theme .header-menu-row a.create-order-btn:hover,
body.light-theme .topnav a.create-order-btn:hover,
body.light-theme a.header-menu-btn.create-order-btn:hover {
    background: #09b179 !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .dropdown-content {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-md) !important;
}

body.light-theme .dropdown-content a {
    color: var(--text-primary) !important;
}

body.light-theme .dropdown-content a:hover {
    background: var(--bg-hover) !important;
}

/* Filter Chips Container - Light Theme */
body.light-theme .filter-chips-container {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
}

body.light-theme .filter-chip {
    background: var(--accent-primary) !important;
    color: white !important;
    border-color: transparent !important;
}

body.light-theme .filter-chip:hover {
    background: var(--accent-hover) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

/* Filter Chip Variants - Light Theme */
body.light-theme .chip-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}

body.light-theme .chip-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
}

body.light-theme .chip-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
}

body.light-theme .chip-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
}

body.light-theme .chip-light {
    background: linear-gradient(135deg, #94a3b8, #64748b) !important;
    color: white !important;
}

body.light-theme .chip-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    color: white !important;
}

body.light-theme .filter-btn-uniform {
    background: var(--accent-primary) !important;
    color: white !important;
}

body.light-theme .filter-btn-uniform:hover {
    background: var(--accent-hover) !important;
}

body.light-theme .modern-btn {
    color: white !important;
}

body.light-theme .modern-btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

body.light-theme .modern-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

body.light-theme .modern-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

body.light-theme .modern-btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

body.light-theme .modern-btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
}

body.light-theme .page-btn {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--border-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

body.light-theme .page-btn:hover {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border-color: #6366f1 !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3) !important;
    transform: translateY(-2px) !important;
}

body.light-theme .page-btn.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border-color: #6366f1 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
    font-weight: 700 !important;
}

/* Results Info - Light Theme */
body.light-theme .results-info {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-sm) !important;
}

body.light-theme .results-info .results-count,
body.light-theme .results-info .display-count-selector {
    color: var(--text-primary) !important;
}

body.light-theme .results-info .display-count-selector label {
    color: var(--text-secondary) !important;
}

body.light-theme .results-info select,
body.light-theme .display-count-selector select {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    /* Dropdown arrow - dark color for light theme, positioned on right for RTL */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%230f172a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px 12px !important;
    padding-right: 2.5rem !important;
    padding-left: 0.75rem !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

body.light-theme .results-info select option,
body.light-theme .display-count-selector select option {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    padding: 0.5rem !important;
}

body.light-theme .results-info select option:hover,
body.light-theme .display-count-selector select option:hover {
    background-color: var(--bg-hover) !important;
}

body.light-theme .results-info select option:checked,
body.light-theme .display-count-selector select option:checked {
    background-color: var(--accent-primary) !important;
    color: white !important;
}

body.light-theme .empty-state-text {
    color: var(--text-secondary) !important;
}

/* Cities Selection Box - Light Theme */
body.light-theme #citiesSelectionBox {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

body.light-theme #citiesSelectionBox[style*="background"],
body.light-theme #citiesSelectionBox[style*="border"] {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

body.light-theme #citiesSelectionBox select.form-control-modern,
body.light-theme #citiesSelectionBox #provinceFilter {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.light-theme #citiesSelectionBox #citySearchInput {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.light-theme #citiesSelectionBox #citiesList label {
    color: var(--text-primary) !important;
}

body.light-theme #citiesSelectionBox #citiesList > div {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
}

body.light-theme #citiesSelectionBox #citiesList > div[style*="background"] {
    background: var(--bg-primary) !important;
}

body.light-theme #citiesSelectionBox #citiesList > div:hover {
    background: var(--bg-hover) !important;
    border-color: var(--accent-primary) !important;
}

body.light-theme #citiesSelectionBox #citiesList label[style*="color"] {
    color: var(--text-primary) !important;
}

body.light-theme #citiesSelectionBox input[type="checkbox"].city-checkbox {
    accent-color: var(--accent-primary) !important;
}

body.light-theme #citiesSelectionBox input[type="checkbox"].city-checkbox[style*="accent-color"] {
    accent-color: var(--accent-primary) !important;
}

/* Selected Cities Display - Light Theme */
body.light-theme #selectedCitiesDisplay {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.light-theme #selectedCitiesDisplay[style*="background"],
body.light-theme #selectedCitiesDisplay[style*="border"],
body.light-theme #selectedCitiesDisplay[style*="color"] {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Override all text colors inside selectedCitiesDisplay for light theme */
body.light-theme #selectedCitiesDisplay div,
body.light-theme #selectedCitiesDisplay div[style*="color"],
body.light-theme #selectedCitiesDisplay > div {
    color: var(--text-primary) !important;
}

/* Title "شهرهای انتخاب شده:" */
body.light-theme #selectedCitiesDisplay > div:first-child,
body.light-theme #selectedCitiesDisplay > div:first-child[style*="color"] {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

/* City items with province names */
body.light-theme #selectedCitiesDisplay > div:not(:first-child),
body.light-theme #selectedCitiesDisplay > div:not(:first-child)[style*="color"] {
    color: var(--text-secondary) !important;
}

/* Province names (strong tags) */
body.light-theme #selectedCitiesDisplay strong,
body.light-theme #selectedCitiesDisplay strong[style*="color"] {
    color: var(--accent-primary) !important;
    font-weight: 700 !important;
}

/* All spans inside selectedCitiesDisplay */
body.light-theme #selectedCitiesDisplay span {
    color: var(--text-secondary) !important;
}

body.light-theme #selectedCitiesDisplay span[style*="color"] {
    color: var(--text-secondary) !important;
}

/* Override specific inline color values for better contrast */
body.light-theme #selectedCitiesDisplay[style*="rgb(226, 232, 240)"],
body.light-theme #selectedCitiesDisplay[style*="#e2e8f0"],
body.light-theme #selectedCitiesDisplay[style*="#cbd5e1"] {
    color: var(--text-primary) !important;
}

body.light-theme #selectedCitiesDisplay div[style*="rgb(226, 232, 240)"],
body.light-theme #selectedCitiesDisplay div[style*="#e2e8f0"],
body.light-theme #selectedCitiesDisplay div[style*="#cbd5e1"] {
    color: var(--text-primary) !important;
}

body.light-theme #selectedCitiesDisplay > div:not(:first-child)[style*="rgb(226, 232, 240)"],
body.light-theme #selectedCitiesDisplay > div:not(:first-child)[style*="#e2e8f0"],
body.light-theme #selectedCitiesDisplay > div:not(:first-child)[style*="#cbd5e1"] {
    color: var(--text-secondary) !important;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .theme-toggle-btn {
        width: 40px;
        height: 40px;
    }
    
    .theme-toggle-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Theme toggle button on mobile - keep at left */
    .navbar-header-container .theme-toggle-btn {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Additional Light Theme Styles */
body.light-theme .btn-search {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: white !important;
}

body.light-theme .btn-search:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
}

body.light-theme .action-buttons-container a {
    color: white !important;
}

body.light-theme .modal-content {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

body.light-theme .modal-header,
body.light-theme .modal-body,
body.light-theme .modal-footer {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

body.light-theme select,
body.light-theme input,
body.light-theme textarea {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.light-theme a {
    color: var(--accent-primary) !important;
}

body.light-theme .table-action-btns a {
    color: white !important;
}

/* Table action buttons - Light Theme with better contrast */
body.light-theme .table-btn,
body.light-theme .table-action-btns .table-btn,
body.light-theme .table-action-btns a.table-btn {
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
}

body.light-theme .table-btn.modern-btn-success,
body.light-theme .table-action-btns .modern-btn-success,
body.light-theme .table-action-btns a.modern-btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

body.light-theme .table-btn.modern-btn-success:hover,
body.light-theme .table-action-btns .modern-btn-success:hover,
body.light-theme .table-action-btns a.modern-btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

body.light-theme .table-btn.modern-btn-danger,
body.light-theme .table-action-btns .modern-btn-danger,
body.light-theme .table-action-btns a.modern-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

body.light-theme .table-btn.modern-btn-danger:hover,
body.light-theme .table-action-btns .modern-btn-danger:hover,
body.light-theme .table-action-btns a.modern-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

body.light-theme .table-btn.modern-btn-warning,
body.light-theme .table-action-btns .modern-btn-warning,
body.light-theme .table-action-btns a.modern-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

body.light-theme .table-btn.modern-btn-warning:hover,
body.light-theme .table-action-btns .modern-btn-warning:hover,
body.light-theme .table-action-btns a.modern-btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

body.light-theme .table-btn.modern-btn-info,
body.light-theme .table-action-btns .modern-btn-info,
body.light-theme .table-action-btns a.modern-btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

body.light-theme .table-btn.modern-btn-info:hover,
body.light-theme .table-action-btns .modern-btn-info:hover,
body.light-theme .table-action-btns a.modern-btn-info:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

body.light-theme .table-btn.modern-btn-primary,
body.light-theme .table-action-btns .modern-btn-primary,
body.light-theme .table-action-btns a.modern-btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3) !important;
}

body.light-theme .table-btn.modern-btn-primary:hover,
body.light-theme .table-action-btns .modern-btn-primary:hover,
body.light-theme .table-action-btns a.modern-btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

body.light-theme .btn {
    color: white !important;
}

body.light-theme .btn,
body.light-theme a.btn {
    transition: all 0.3s ease !important;
}

body.light-theme .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

body.light-theme .btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

body.light-theme .btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

body.light-theme .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

body.light-theme .btn-info:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3) !important;
}

body.light-theme .btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-secondary {
    background: linear-gradient(135deg, #64748b, #475569) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3) !important;
}

body.light-theme .btn-secondary:hover {
    background: linear-gradient(135deg, #475569, #334155) !important;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Override inline gradient styles for buttons in light theme */
body.light-theme .btn[style*="linear-gradient"],
body.light-theme a.btn[style*="linear-gradient"] {
    color: white !important;
    border: none !important;
}

/* Specific overrides for each button type with inline gradients */
body.light-theme .btn-warning[style*="linear-gradient"],
body.light-theme a.btn-warning[style*="linear-gradient"] {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

body.light-theme .btn-info[style*="linear-gradient"],
body.light-theme a.btn-info[style*="linear-gradient"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

body.light-theme .btn-secondary[style*="linear-gradient"],
body.light-theme a.btn-secondary[style*="linear-gradient"] {
    background: linear-gradient(135deg, #64748b, #475569) !important;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3) !important;
}

body.light-theme .btn-danger[style*="linear-gradient"],
body.light-theme a.btn-danger[style*="linear-gradient"] {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

body.light-theme .btn-success[style*="linear-gradient"],
body.light-theme a.btn-success[style*="linear-gradient"] {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

body.light-theme .btn-primary[style*="linear-gradient"],
body.light-theme a.btn-primary[style*="linear-gradient"] {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3) !important;
}

/* Hover states for buttons with inline gradients */
body.light-theme .btn-warning[style*="linear-gradient"]:hover,
body.light-theme a.btn-warning[style*="linear-gradient"]:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-info[style*="linear-gradient"]:hover,
body.light-theme a.btn-info[style*="linear-gradient"]:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-secondary[style*="linear-gradient"]:hover,
body.light-theme a.btn-secondary[style*="linear-gradient"]:hover {
    background: linear-gradient(135deg, #475569, #334155) !important;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-danger[style*="linear-gradient"]:hover,
body.light-theme a.btn-danger[style*="linear-gradient"]:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-success[style*="linear-gradient"]:hover,
body.light-theme a.btn-success[style*="linear-gradient"]:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-primary[style*="linear-gradient"]:hover,
body.light-theme a.btn-primary[style*="linear-gradient"]:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .btn-light {
    background-color: #e2e8f0 !important;
    color: var(--text-primary) !important;
}

/* Action buttons in teknesiyans index - Light Theme */
body.light-theme .action-btn-uniform.btn-success,
body.light-theme a.action-btn-uniform.btn-success {
    color: white !important;
}

body.light-theme .action-btn-uniform.btn-danger,
body.light-theme a.action-btn-uniform.btn-danger {
    color: white !important;
}

body.light-theme a.action-btn-uniform[style*="background-color: #3f00ff"],
body.light-theme a.action-btn-uniform[style*="#3f00ff"] {
    color: white !important;
}

body.light-theme a.action-btn-uniform[style*="background-color: #d8c700"],
body.light-theme a.action-btn-uniform[style*="#d8c700"],
body.light-theme a.action-btn-uniform[style*="color: black"] {
    color: white !important;
}

/* Chip styles are defined above in the Filter Chip Variants section */

body.light-theme #searchToggleIcon {
    color: var(--text-primary) !important;
}

body.light-theme .alert {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.light-theme .logo-container img {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

/* Search Form - Light Theme */
body.light-theme .search-form {
    background: transparent !important;
}

body.light-theme .search-form .form-group-modern label {
    color: var(--text-secondary) !important;
}

/* Light theme form controls - highest specificity */
body.light-theme .search-form .form-control-modern,
body.light-theme .search-form div.form-control-modern,
body.light-theme div.form-control-modern,
body.light-theme .form-control-modern,
body.light-theme .light-theme-form-control,
body.light-theme .form-control-modern.light-theme-form-control {
    background-color: var(--bg-primary) !important;
    background-image: none !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Force override any remaining inline styles */
body.light-theme .form-control-modern[style],
body.light-theme div.form-control-modern[style] {
    background-color: var(--bg-primary) !important;
    background-image: none !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Specific input fields in Details.cshtml - Override inline styles */
body.light-theme #meghdar,
body.light-theme input#meghdar,
body.light-theme input#meghdar.form-control-modern,
body.light-theme #meghdar.form-control-modern,
body.light-theme #meghdar.light-theme-form-control {
    background-color: var(--bg-primary) !important;
    background-image: none !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    max-width: 300px !important;
}

/* Override any inline styles on #meghdar */
body.light-theme #meghdar[style] {
    background-color: var(--bg-primary) !important;
    background-image: none !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.light-theme .search-form .form-control-modern:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

body.light-theme .search-form select.form-control-modern,
body.light-theme select.form-control-modern {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    /* Dropdown arrow - dark color for light theme, positioned on right for RTL */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%230f172a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px 12px !important;
    padding-right: 2.5rem !important;
    padding-left: 0.75rem !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

body.light-theme .search-form select.form-control-modern option,
body.light-theme select.form-control-modern option {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    padding: 0.5rem !important;
}

body.light-theme .search-form select.form-control-modern option:hover,
body.light-theme select.form-control-modern option:hover {
    background-color: var(--bg-hover) !important;
}

body.light-theme .search-form select.form-control-modern option:checked,
body.light-theme select.form-control-modern option:checked {
    background-color: var(--accent-primary) !important;
    color: white !important;
}

/* Override inline styles in Details.cshtml for search-form - All form-control-modern elements */
body.light-theme .search-form .form-control-modern[style*="background"],
body.light-theme .search-form .form-control-modern[style*="background-color"],
body.light-theme .search-form div.form-control-modern[style*="background"],
body.light-theme .search-form div.form-control-modern[style*="background-color"],
body.light-theme div.form-control-modern[style*="background"],
body.light-theme div.form-control-modern[style*="background-color"],
body.light-theme .form-control-modern[style*="background"],
body.light-theme .form-control-modern[style*="background-color"] {
    background-color: var(--bg-primary) !important;
    background-image: none !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Override border-color in inline styles */
body.light-theme .search-form .form-control-modern[style*="border-color"],
body.light-theme .search-form div.form-control-modern[style*="border-color"],
body.light-theme div.form-control-modern[style*="border-color"],
body.light-theme .form-control-modern[style*="border-color"] {
    border-color: var(--border-color) !important;
}

/* Override color in inline styles */
body.light-theme .search-form .form-control-modern[style*="color"],
body.light-theme .search-form div.form-control-modern[style*="color"],
body.light-theme div.form-control-modern[style*="color"],
body.light-theme .form-control-modern[style*="color"] {
    color: var(--text-primary) !important;
}

/* Specific override for rgb colors that JavaScript might set */
body.light-theme .search-form .form-control-modern[style*="rgb(49, 54, 63)"],
body.light-theme .search-form div.form-control-modern[style*="rgb(49, 54, 63)"],
body.light-theme div.form-control-modern[style*="rgb(49, 54, 63)"],
body.light-theme .form-control-modern[style*="rgb(49, 54, 63)"] {
    background-color: var(--bg-primary) !important;
    background-image: none !important;
}

body.light-theme .search-form .form-control-modern[style*="rgb(51, 65, 85)"],
body.light-theme .search-form div.form-control-modern[style*="rgb(51, 65, 85)"],
body.light-theme div.form-control-modern[style*="rgb(51, 65, 85)"],
body.light-theme .form-control-modern[style*="rgb(51, 65, 85)"] {
    border-color: var(--border-color) !important;
}

body.light-theme .search-form .form-control-modern[style*="rgb(226, 232, 240)"],
body.light-theme .search-form div.form-control-modern[style*="rgb(226, 232, 240)"],
body.light-theme div.form-control-modern[style*="rgb(226, 232, 240)"],
body.light-theme .form-control-modern[style*="rgb(226, 232, 240)"] {
    color: var(--text-primary) !important;
}

/* Searchable Select Arrow - Light Theme */
body.light-theme .searchable-select-wrapper::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
}

/* Searchable Select Items - Light Theme */
body.light-theme .searchable-select-wrapper .option-item,
body.light-theme .searchable-select-wrapper .option-item[style*="color"] {
    color: #000000 !important;
}

body.light-theme .searchable-select-wrapper .search-input,
body.light-theme .searchable-select-wrapper .search-input[style*="color"] {
    color: #000000 !important;
}

body.light-theme .searchable-select-wrapper .dropdown-content {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

body.light-theme .searchable-dropdown-content {
    background: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

body.light-theme .searchable-select-wrapper .search-input {
    background: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: #000000 !important;
}

