/* ==================== GHOST TEXT (AI Autocomplete) ==================== */
.ghost-text-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.ghost-text-wrapper>input {
    position: relative;
    z-index: 2;
    background: transparent !important;
}

.ghost-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    /* filter-input ile birebir aynı font metriği */
    padding: 6px 8px;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    white-space: nowrap;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 4px;
    box-sizing: border-box;
    height: 30px;
}

.ghost-text-invisible {
    visibility: hidden;
    white-space: pre;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    font-style: inherit;
    letter-spacing: inherit;
}

.ghost-text-hint {
    color: #818cf8;
    opacity: 0.55;
    white-space: pre;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    font-style: normal;
    letter-spacing: inherit;
}

/* Dark mode */
body.dark-mode .ghost-text-hint {
    color: #a5b4fc;
    opacity: 0.5;
}

/* Ghost text aktifken input'a ince mavi alt çizgi */
.ghost-text-wrapper.has-ghost-prediction>input {
    border-bottom: 1.5px solid #818cf8;
}

body.dark-mode .ghost-text-wrapper.has-ghost-prediction>input {
    border-bottom: 1.5px solid #6366f1;
}

/* Ghost text ipucu rozeti */
.ghost-text-wrapper.has-ghost-prediction::after {
    content: 'Tab ⇥';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    font-size: 8px;
    color: #818cf8;
    background: rgba(129, 140, 248, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    pointer-events: none;
    font-family: Arial, Helvetica, sans-serif;
    opacity: 0.7;
}

body.dark-mode .ghost-text-wrapper.has-ghost-prediction::after {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.15);
}

.vehicle-ac-wrapper {
    position: relative;
}

.vehicle-ac-wrapper input.vehicle-ac-input {
    width: 100%;
    padding: 6px 28px 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    height: 30px;
    box-sizing: border-box;
    color: #374151;
    background: white;
    transition: border-color 0.2s;
}

.vehicle-ac-wrapper input.vehicle-ac-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.vehicle-ac-wrapper input.vehicle-ac-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.vehicle-ac-wrapper .vehicle-ac-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    color: #94a3b8;
    cursor: pointer;
}

.vehicle-ac-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 999;
    display: none;
}

.vehicle-ac-list.show {
    display: block;
}

.vehicle-ac-item {
    padding: 7px 10px;
    font-size: 11px;
    color: #374151;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid #f1f5f9;
}

.vehicle-ac-item:last-child {
    border-bottom: none;
}

.vehicle-ac-item:hover,
.vehicle-ac-item.active {
    background: #eef2ff;
    color: var(--primary);
}

.vehicle-ac-item .ac-match {
    font-weight: 700;
    color: var(--primary);
}

.vehicle-ac-item .ac-year {
    font-size: 10px;
    color: #94a3b8;
    margin-left: 4px;
}

.vehicle-ac-year {
    color: #6366f1;
    font-size: 10px;
    font-weight: 600;
    margin-left: 2px;
}

.vehicle-ac-empty {
    padding: 12px 10px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    font-style: italic;
    cursor: default;
}

.vehicle-ac-item mark {
    background: transparent;
    font-weight: 700;
    color: var(--primary);
}

.vehicle-year-row {
    display: flex;
    gap: 6px;
}

.vehicle-year-row input {
    flex: 1;
    min-width: 0;
}

/* Arama Input Wrapper ve Alan Seçici */
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.search-input-wrapper .search-input {
    flex: 1;
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.search-fields-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-left: none;
    border-radius: 0 4px 4px 0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-fields-btn:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.search-fields-btn.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Arama Geçmişi Butonu */
.search-history-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-left: none;
    border-radius: 0 4px 4px 0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
}

.search-history-btn:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.search-history-btn.active {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

/* Sliders butonu: ortada ise köşeleri düz */
.search-input-wrapper .search-fields-btn {
    border-radius: 0;
}

/* ============ Arama Geçmişi Modal ============ */
.search-history-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.search-history-overlay.show {
    display: flex;
}

.search-history-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    width: 520px;
    max-width: 90vw;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: shModalSlide 0.25s ease-out;
}

@keyframes shModalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.search-history-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.search-history-header .sh-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-history-header .sh-header-left i {
    font-size: 16px;
}

.search-history-count {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.25);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.search-history-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.15s;
    margin-left: 12px;
}

.search-history-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.search-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.search-history-list::-webkit-scrollbar {
    width: 6px;
}

.search-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.search-history-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.search-history-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.15s;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.search-history-item:last-child {
    border-bottom: none;
}

.search-history-item:hover {
    background: #fffbeb;
}

.search-history-item:active {
    background: #fef3c7;
}

.search-history-item .history-icon {
    color: #f59e0b;
    font-size: 13px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.search-history-item .history-term {
    flex: 1;
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-history-item .history-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.search-history-item .history-field-badge {
    font-size: 10px;
    background: #e0f2fe;
    color: #0284c7;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

.search-history-item .history-freq {
    font-size: 10px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 500;
}

.search-history-item .history-date {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.search-history-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.search-history-empty i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.35;
}

.search-history-empty p {
    font-size: 13px;
}

.search-fields-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 4px;
    max-height: 320px;
    overflow: hidden;
}

.search-fields-dropdown.show {
    display: block;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-fields-header {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.search-fields-header span {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.search-fields-select-all {
    font-size: 10px;
    color: #6366f1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.search-fields-select-all:hover {
    background: #e0e7ff;
}

.search-fields-list {
    padding: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.search-field-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
    transition: all 0.15s;
}

.search-field-item:hover {
    background: #f1f5f9;
}

.search-field-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #6366f1;
    cursor: pointer;
}

.search-fields-footer {
    padding: 8px 12px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.search-fields-count {
    font-size: 10px;
    color: #64748b;
}

/* Select için özel stil - Kategoriler ile aynı */
select.filter-input {
    padding: 6px 24px 6px 8px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center !important;
    background-size: 10px !important;
    cursor: pointer;
    color: #374151 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11px !important;
    height: 30px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

select.filter-input:hover {
    border-color: #6366f1 !important;
    background-color: #f8fafc !important;
}

select.filter-input option {
    font-size: 11px;
    padding: 6px 8px;
    color: #374151;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.filter-input::placeholder {
    color: #94a3b8;
    font-size: 10px;
}

/* Text input alanları için */
input.filter-input:hover {
    border-color: #6366f1;
    background: #f8fafc;
}

/* Kompakt filtre row - 2 kolon */
.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 6px;
}

.filter-row .filter-section {
    margin-bottom: 0;
    min-width: 0;
    /* Grid item overflow için */
}

.filter-actions {
    padding: 8px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.filter-btn {
    width: 100%;
    padding: 8px;
    border: none;
    font-size: 11px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.filter-btn.primary {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
}

.filter-btn.primary:hover {
    background: linear-gradient(135deg, #5558e8, #6366f1);
    transform: translateY(-1px);
}

.filter-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.filter-btn.secondary:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Özel Alan Filtre Sekmesi */
.custom-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.custom-filter-tab {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 500;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-filter-tab:hover {
    background: #e2e8f0;
}

.custom-filter-tab.active {
    background: var(--primary);
    color: white;
}

.custom-filter-section {
    padding: 8px;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 8px;
}

.custom-filter-section .filter-label {
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
    display: block;
}

/* Tarih ve saat girişleri için özel stiller */
.custom-filter-section input[type="date"],
.custom-filter-section input[type="time"] {
    font-size: 11px !important;
    padding: 6px 4px !important;
    min-width: 0 !important;
}

.custom-filter-section input[type="date"]::-webkit-calendar-picker-indicator,
.custom-filter-section input[type="time"]::-webkit-calendar-picker-indicator {
    font-size: 10px;
    padding: 0;
    margin: 0;
}

/* ===== Tarih Input DD.MM.YYYY Format Overlay ===== */
.date-input-wrapper {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
}

/* Native tarih metnini tamamen gizle - overlay ile gösterilecek */
.date-input-wrapper input[type="date"]::-webkit-datetime-edit {
    opacity: 0;
}

.date-format-overlay {
    position: absolute;
    left: 1px;
    top: 1px;
    bottom: 1px;
    right: 1px;
    display: flex;
    align-items: center;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    z-index: 2;
    background: transparent;
    color: #1e293b;
}

.date-format-overlay.is-placeholder {
    color: #94a3b8;
}

body.dark-mode .date-format-overlay {
    color: var(--text-primary, #e2e8f0);
}

body.dark-mode .date-format-overlay.is-placeholder {
    color: #64748b;
}

/* Çoktan seçmeli filtre scrollbar */
.multiselect-filter-container {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f5f9;
}

.multiselect-filter-container::-webkit-scrollbar {
    width: 6px;
}

.multiselect-filter-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.multiselect-filter-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.multiselect-filter-item:hover {
    background: #f8fafc;
    border-radius: 4px;
}

/* Boolean filter butonları */
.boolean-filter-btn:hover {
    background: #f1f5f9 !important;
}

/* Tree Menu (Kısayol Çubuğu) */
.tree-menu {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    user-select: none;
}

.tree-search {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-light);
}

.tree-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    font-size: 12px;
    background: white;
}

.tree-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.tree-root {
    padding: 4px 0;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--dark);
    transition: background 0.1s;
    white-space: nowrap;
}

.tree-item:hover {
    background: #e8f0fe;
}

.tree-item.selected {
    background: #1a73e8;
    color: white;
}

.tree-item .tree-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    font-size: 10px;
    color: #666;
}

.tree-item.selected .tree-icon {
    color: white;
}

.tree-item .tree-expand {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2px;
    font-size: 8px;
    color: #666;
    transition: transform 0.2s;
}

.tree-item.expanded .tree-expand {
    transform: rotate(90deg);
}

.tree-item .tree-label {
    flex: 1;
}

.tree-children {
    display: none;
    padding-left: 16px;
}

.tree-children.open {
    display: block;
}

.tree-module {
    padding: 3px 8px 3px 24px;
    cursor: pointer;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.1s;
}

.ai-module-badge {
    font-size: 9px;
    color: #8b5cf6;
    margin-left: auto;
    opacity: 0.8;
    animation: aiPulse 2.5s ease-in-out infinite;
}

@keyframes aiPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.tree-module:hover {
    background: #e8f0fe;
}

.tree-module.selected {
    background: #1a73e8;
    color: white;
}

.tree-module i {
    font-size: 12px;
    width: 16px;
    text-align: center;
}

/* Legacy module grid (hidden) */
.module-grid {
    display: none;
}

.module-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--dark);
}

.module-item:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.module-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.module-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.module-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.module-icon.purple {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.module-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.module-icon.cyan {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.module-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* Filter Sidebar */
.filter-section {
    margin-bottom: 20px;
}

.filter-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group {
    margin-bottom: 12px;
}

.filter-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-dark);
    margin-bottom: 6px;
    display: block;
}

.filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.primary {
    background: var(--primary);
    color: white;
}

.filter-btn.secondary {
    background: var(--light);
    color: var(--gray-dark);
    border: 1px solid var(--gray-light);
}

.filter-btn:hover {
    transform: translateY(-1px);
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-title h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.content-title p {
    font-size: 13px;
    color: var(--gray);
    margin: 0;
}

.content-actions {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 1px solid var(--gray-light);
}

.btn-secondary:hover {
    background: var(--light);
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid var(--gray-light);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--light);
    border-radius: 10px;
    flex: 1;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-icon.purple {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.stat-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.stat-info span {
    font-size: 12px;
    color: var(--gray);
}

/* Table Container */
.table-container {
    flex: 1;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Yatay scroll için wrapper */
.table-scroll-wrapper {
    overflow-x: scroll;
    overflow-y: visible;
    width: 100%;
    flex: 1;
    /* Firefox için scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #64748b #f1f5f9;
    /* Scroll bar'ın her zaman görünür olması için */
    scrollbar-gutter: stable;
    /* Scroll bar için padding */
    padding-bottom: 2px;
}

.table-scroll-wrapper::-webkit-scrollbar {
    height: 14px;
    display: block;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 7px;
    margin: 2px 0;
    border: 1px solid #cbd5e1;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #64748b, #475569);
    border-radius: 7px;
    border: 2px solid #e2e8f0;
    min-width: 50px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to right, #475569, #334155);
    border-color: #cbd5e1;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb:active {
    background: linear-gradient(to right, #334155, #1e293b);
}

/* Scroll bar'ın daha belirgin görünmesi için */
.table-scroll-wrapper:not(:hover)::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #94a3b8, #64748b);
}

/* Skeleton Loader */
.skeleton-row td {
    padding: 14px 16px;
}

.skeleton-cell {
    height: 16px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

body.dark-mode .skeleton-cell {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.cache-indicator {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    background: #f59e0b;
    color: white;
    border-radius: 4px;
    margin-left: 8px;
    animation: pulse-fade 2s ease-out forwards;
}

/* Vehicle Compat Hover Popup */
.vehicle-compat-popup {
    position: fixed;
    z-index: 10000;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 16px;
    min-width: 280px;
    max-width: 420px;
    max-height: 400px;
    overflow-y: auto;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s;
    visibility: hidden;
}

.vehicle-compat-popup.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.vehicle-compat-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.vehicle-compat-popup-header i {
    color: #0ea5e9;
    font-size: 16px;
}

.vehicle-compat-popup-header span {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.vehicle-compat-popup-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
}

.vehicle-compat-popup-item:last-child {
    margin-bottom: 0;
}

.vehicle-compat-popup-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.vehicle-compat-popup-info {
    flex: 1;
}

.vehicle-compat-popup-brand {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
}

.vehicle-compat-popup-details {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}

.vehicle-compat-popup-year {
    display: inline-block;
    background: #eef2ff;
    color: #6366f1;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 6px;
}

body.dark-mode .vehicle-compat-popup {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .vehicle-compat-popup-header span {
    color: #f1f5f9;
}

body.dark-mode .vehicle-compat-popup-item {
    background: linear-gradient(135deg, #334155, #475569);
    border-color: #475569;
}

body.dark-mode .vehicle-compat-popup-brand {
    color: #f1f5f9;
}

body.dark-mode .vehicle-compat-popup-details {
    color: #94a3b8;
}

/* Kaydet Uyarı Modal */
.save-changes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.save-changes-modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.save-changes-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.save-changes-modal-icon i {
    font-size: 28px;
    color: #f59e0b;
}

.save-changes-modal h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
}

.save-changes-modal p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px;
}

.save-changes-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.save-changes-modal-buttons button {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-save-yes {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.btn-save-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.btn-save-no {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-save-no:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-save-cancel {
    background: #e2e8f0;
    color: #475569;
}

.btn-save-cancel:hover {
    background: #cbd5e1;
}

body.dark-mode .save-changes-modal {
    background: #1e293b;
}

body.dark-mode .save-changes-modal h3 {
    color: #f1f5f9;
}

body.dark-mode .save-changes-modal p {
    color: #94a3b8;
}

body.dark-mode .btn-save-cancel {
    background: #334155;
    color: #e2e8f0;
}

@keyframes pulse-fade {
    0% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

.data-table {
    width: max-content;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table th {
    background: var(--light);
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
    white-space: nowrap;
}

.data-table th:hover {
    color: var(--primary);
}

.data-table td {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.3;
    border-bottom: 1px solid var(--gray-light);
    background: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hb-data-table td,
.invoice-data-table td,
.stock-data-table td,
.customer-data-table td {
    padding: 1px 6px !important;
    line-height: 1.1;
}

.stock-data-table .product-name-cell {
    gap: 1px;
}

.stock-data-table .oem-codes-row,
.stock-data-table .alt-codes-row {
    gap: 2px;
}

.stock-data-table .oem-badge {
    padding: 0px 5px;
    font-size: 9px;
    gap: 2px;
    line-height: 14px;
}

.stock-data-table .oem-more-badge {
    padding: 0px 5px;
    font-size: 9px;
    line-height: 14px;
}

.data-table tr.row-proforma td {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.data-table tr.row-fiyat-farki td {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.12) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.data-table tr.row-efatura-sent td {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.data-table tr.row-deleted td {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
    color: #ef4444;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

.data-table tr.selected td {
    background: rgba(99, 102, 241, 0.15) !important;
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}

.data-table tr.selected td:first-child {
    border-left: 3px solid #6366f1;
}

.data-table td:last-child {
    overflow: visible;
    /* Actions için */
}

/* AG Grid benzeri stiller */
.data-table.ag-style .ag-header {
    background: #f8fafc;
}

.data-table.ag-style .ag-header-cell {
    background: #f1f5f9;
    border-right: 1px solid #e2e8f0;
    padding: 0;
    vertical-align: top;
    position: relative;
    user-select: none;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.data-table.ag-style .ag-header-cell:last-child {
    border-right: none;
}

/* ====== Sütun Sürükle-Bırak Sistemi ====== */

body.col-dragging-active {
    cursor: grabbing !important;
    -webkit-user-select: none;
    user-select: none;
}

body.col-dragging-active * {
    cursor: grabbing !important;
}

.data-table.ag-style .ag-header-cell {
    cursor: grab;
}

.data-table.ag-style .ag-header-cell[data-col-id="actions"] {
    cursor: default;
}

.data-table.ag-style .ag-header-cell .ag-filter-container,
.data-table.ag-style .ag-header-cell .ag-filter-input {
    cursor: text;
}

/* ── Kaynak sütun: tutulup kaldırılan yer ── */
.data-table.ag-style .ag-header-cell.col-drag-source {
    position: relative;
    background: rgba(99, 102, 241, 0.06) !important;
}

.data-table.ag-style .ag-header-cell.col-drag-source .ag-header-content,
.data-table.ag-style .ag-header-cell.col-drag-source .ag-filter-container {
    opacity: 0.15;
}

.data-table.ag-style .ag-header-cell.col-drag-source::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 2px dashed rgba(99, 102, 241, 0.4);
    border-radius: 4px;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 5px,
        rgba(99, 102, 241, 0.05) 5px,
        rgba(99, 102, 241, 0.05) 10px
    );
    pointer-events: none;
    z-index: 1;
}

/* ── Tablo body kaynak sütun hücreleri ── */
.data-table.ag-style td.col-drag-source-cell {
    opacity: 0.18 !important;
    transition: opacity 0.2s ease;
}

/* ── Drop İndikatörü: hedef sütunun SOL kenarına bırakma çizgisi ── */
.data-table.ag-style .ag-header-cell.drag-over-left {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.10) 0%, transparent 40%) !important;
}

.data-table.ag-style .ag-header-cell.drag-over-left::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #6366f1;
    border-radius: 0 2px 2px 0;
    z-index: 10;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.6), 3px 0 10px rgba(99, 102, 241, 0.15);
    animation: dropLinePulse 1.2s ease-in-out infinite;
}

/* ── Drop İndikatörü: hedef sütunun SAĞ kenarına bırakma çizgisi ── */
.data-table.ag-style .ag-header-cell.drag-over-right {
    background: linear-gradient(270deg, rgba(99, 102, 241, 0.10) 0%, transparent 40%) !important;
}

.data-table.ag-style .ag-header-cell.drag-over-right::before {
    content: '';
    position: absolute;
    right: -1px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #6366f1;
    border-radius: 2px 0 0 2px;
    z-index: 10;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.6), -3px 0 10px rgba(99, 102, 241, 0.15);
    animation: dropLinePulse 1.2s ease-in-out infinite;
}

@keyframes dropLinePulse {
    0%, 100% { opacity: 0.8; box-shadow: 0 0 5px rgba(99, 102, 241, 0.5); }
    50% { opacity: 1; box-shadow: 0 0 10px rgba(99, 102, 241, 0.8), 0 0 20px rgba(99, 102, 241, 0.2); }
}

/* ── Body hücreleri: bırakma çizgisi (sol) ── */
.data-table.ag-style td.drag-over-left {
    box-shadow: inset 3px 0 0 0 rgba(99, 102, 241, 0.45) !important;
}

/* ── Body hücreleri: bırakma çizgisi (sağ) ── */
.data-table.ag-style td.drag-over-right {
    box-shadow: inset -3px 0 0 0 rgba(99, 102, 241, 0.45) !important;
}

/* ── Ghost: gerçek sütun klonu ── */
.col-drag-ghost {
    position: fixed;
    z-index: 100000;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
    border-radius: 8px;
    overflow: hidden;
    outline: 2.5px solid rgba(99, 102, 241, 0.7);
    outline-offset: 0px;
    box-shadow:
        0 20px 50px rgba(99, 102, 241, 0.28),
        0 8px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.col-drag-ghost-visible {
    opacity: 0.96;
    transform: rotate(2deg) scale(1.06);
}

.col-drag-ghost-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    min-height: 30px;
    border-bottom: 2px solid rgba(255,255,255,0.15);
}

.col-drag-ghost-grip {
    font-size: 10px;
    opacity: 0.5;
}

.col-drag-ghost-body {
    background: #fff;
}

.col-drag-ghost-row {
    padding: 4px 12px;
    font-size: 10px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 24px;
    line-height: 16px;
    background: #fff;
}

.col-drag-ghost-row:nth-child(even) {
    background: #fafbfc;
}

.col-drag-ghost-row:last-child {
    border-bottom: none;
}

.col-drag-ghost-fade {
    height: 16px;
    background: linear-gradient(to bottom, #fff 0%, rgba(255,255,255,0) 100%);
}

/* ── Overlay ── */
.col-drag-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(15, 23, 42, 0.06);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.col-drag-overlay-visible {
    opacity: 1;
}

/* ── Bırakma başarı efekti ── */
@keyframes colDropFlash {
    0% {
        background: rgba(99, 102, 241, 0.22) !important;
        box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.5);
    }
    100% {
        background: transparent !important;
        box-shadow: inset 0 0 0 2px transparent;
    }
}

.data-table.ag-style .ag-header-cell.col-drop-success {
    animation: colDropFlash 0.7s ease-out;
}

.data-table.ag-style td.col-drop-success-cell {
    animation: colDropCellFlash 0.7s ease-out;
}

@keyframes colDropCellFlash {
    0% { background: rgba(99, 102, 241, 0.10) !important; }
    100% { background: transparent !important; }
}

/* Sütun Boyutlandırma Çubuğu */
.column-resizer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    background: transparent;
    z-index: 20;
    transition: background 0.15s;
}

.column-resizer:hover {
    background: rgba(99, 102, 241, 0.4);
}

.column-resizer.resizing {
    background: rgba(99, 102, 241, 0.7);
}

/* Ödeme tablosu sütun sürükle-bırak stilleri */
#paymentsTable th[draggable="true"]:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
}

#paymentsTable th.dragging {
    opacity: 0.5;
    background: #dbeafe !important;
}

#paymentsTable th.drag-over {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    box-shadow: inset 0 0 0 2px #3b82f6;
}

/* Sürükleme sırasında cursor tüm sayfada col-resize olsun */
body.col-resizing {
    cursor: col-resize !important;
}

body.col-resizing * {
    cursor: col-resize !important;
}

.ag-header-content {
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
    min-width: 0;
}

.ag-header-content:hover {
    background: #e2e8f0;
}

.ag-header-label {
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-sort-icon {
    color: #94a3b8;
    font-size: 10px;
}

.ag-sort-icon.active {
    color: #6366f1;
}

.ag-filter-container {
    padding: 2px 4px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.ag-filter-input {
    flex: 1;
    min-width: 0;
    padding: 3px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 10px;
    background: white;
    color: #1e293b;
}

.ag-filter-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.ag-filter-input::placeholder {
    color: #94a3b8;
}

.ag-filter-input.has-operator {
    border-color: #a5b4fc;
    background: #f5f3ff;
}

/* Operatör Butonu */
.ag-filter-op-btn {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: white;
    color: #94a3b8;
    font-size: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s;
    line-height: 1;
    font-weight: 700;
    font-family: monospace;
}

.ag-filter-op-btn:hover {
    background: #eef2ff;
    border-color: #6366f1;
    color: #6366f1;
}

.ag-filter-op-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

/* Operatör Menüsü */
.ag-filter-op-menu {
    position: fixed;
    min-width: 150px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    padding: 4px 0;
    font-size: 11px;
}

.ag-filter-op-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    cursor: pointer;
    color: #475569;
    transition: background 0.1s;
    white-space: nowrap;
}

.ag-filter-op-item:hover {
    background: #eef2ff;
    color: #4338ca;
}

.ag-filter-op-item.selected {
    background: #e0e7ff;
    color: #4338ca;
    font-weight: 600;
}

.ag-filter-op-item .op-symbol {
    width: 18px;
    text-align: center;
    font-weight: 700;
    font-size: 10px;
    font-family: monospace;
    color: #6366f1;
}

.ag-filter-op-separator {
    height: 1px;
    background: #e2e8f0;
    margin: 3px 0;
}

/* Ödeme alt satırları (Cari Hareket Raporu) */
.chr-payment-subrow {
    transition: background 0.15s;
}

.chr-payment-subrow:hover {
    background: #eef2ff !important;
}

.chr-payment-subrow .chr-payment-cell {
    border-bottom: 1px solid #e2e8f0;
}

.chr-payment-subrow:last-of-type .chr-payment-cell {
    border-bottom: 1px solid #c7d2fe;
}

.chr-expand-btn:hover {
    background: #6366f1 !important;
    color: white !important;
    border-color: #6366f1 !important;
}

/* Sütun ayarları modal */
.column-settings-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    min-width: 350px;
    max-width: 450px;
    max-height: 70vh;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.column-settings-modal.show {
    display: block;
}

.column-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #334155;
}

.column-settings-title {
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.column-settings-list {
    max-height: 400px;
    overflow-y: auto;
}

.column-settings-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #0f172a;
    border-radius: 8px;
    margin-bottom: 6px;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.column-settings-item:hover {
    background: #334155;
}

.column-settings-list {
    padding: 0 !important;
}

.column-settings-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

.column-settings-item label {
    color: #e2e8f0;
    font-size: 13px;
    flex: 1;
    cursor: pointer;
}

.column-settings-item .custom-badge {
    background: #6366f1;
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-thumb {
    width: 36px;
    height: 36px;
    background: var(--light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.product-info h4 {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 2px 0;
}

.product-info span {
    font-size: 11px;
    color: var(--gray);
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.badge.inactive {
    background: rgba(100, 116, 139, 0.1);
    color: var(--gray);
}

.badge.low {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge.out {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.stock-value {
    font-weight: 600;
}

.stock-value.normal {
    color: #16a34a;
}

.stock-value.low {
    color: #d97706;
}

.stock-value.out {
    color: #dc2626;
}

/* OEM Badge Stilleri */
.oem-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f8fafc;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.oem-badge:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.oem-badge i {
    font-size: 8px;
    opacity: 0.6;
}

.oem-badge.copied {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
}

.oem-badge.copied i {
    opacity: 1;
}

/* Ürün adı altında OEM kodları */
.product-name-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name-cell .oem-codes-row {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

/* Özel Kod Badge Stilleri */
.alt-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    font-family: monospace;
    letter-spacing: 0.3px;
    border: 1px solid #c4b5fd;
    cursor: pointer;
    transition: all 0.15s ease;
}

.alt-code-badge:hover {
    background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
    border-color: #a78bfa;
}

.alt-code-badge i {
    font-size: 8px;
    opacity: 0.6;
}

.alt-code-badge.copied {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
}

.alt-code-badge.copied i {
    opacity: 1;
}

.product-name-cell .alt-codes-row {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

/* OEM More Badge - "+X daha" için */
.oem-more-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.oem-more-badge:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: scale(1.05);
}

/* OEM Popup Container */
.oem-popup {
    position: fixed;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 12px;
    z-index: 99999;
    display: none;
    max-width: 400px;
    min-width: 200px;
}

.oem-popup.show {
    display: block;
    animation: oemPopupFadeIn 0.15s ease;
}

@keyframes oemPopupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.oem-popup-header {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.oem-popup-content {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.oem-popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    color: #475569;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.oem-popup-badge:hover {
    background: #e0e7ff;
    border-color: #6366f1;
    color: #4338ca;
}

.oem-popup-badge i {
    font-size: 9px;
    opacity: 0.6;
}

.oem-popup-badge.copied {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
}

.price-cell {
    font-weight: 600;
    color: var(--dark);
}

.action-btns {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: var(--light);
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary);
    color: white;
}

.action-btn.edit:hover {
    background: #3b82f6;
}

.action-btn.delete:hover {
    background: #ef4444;
}

/* Table Footer */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: white;
    border-top: 1px solid var(--gray-light);
}

.table-info {
    font-size: 13px;
    color: var(--gray);
}

.pagination {
    display: flex;
    gap: 4px;
}

.page-btn {
    min-width: 32px;
    height: 32px;
    border: 1px solid var(--gray-light);
    background: white;
    color: var(--dark);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--light);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== DATA GRID MANAGER v2 ==================== */

/* ─── Sort Indicators ─── */

th[data-dgm-sortable] .ag-header-content {
    cursor: pointer;
    user-select: none;
}

.dgm-sort-indicator {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 3px;
    vertical-align: middle;
}

.dgm-sort-arrow {
    color: #94a3b8;
    font-size: 10px;
    transition: color 0.15s;
}

.dgm-sort-arrow.active {
    font-size: 11px;
}

.dgm-sort-badge {
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    min-width: 10px;
    text-align: center;
}

/* ─── Filter Row (AG-Grid Tarzı) ─── */

.dgm-filter-row {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 4px;
    background: #f8fafc;
    min-width: 0;
}

.dgm-operator-select {
    flex-shrink: 0;
    width: 30px;
    height: 20px;
    padding: 0 1px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #f1f5f9;
    color: #6366f1;
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    text-align-last: center;
}

.dgm-operator-select:hover {
    background: #eef2ff;
    border-color: #6366f1;
}

.dgm-operator-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.dgm-filter-input {
    flex: 1;
    min-width: 0;
    padding: 2px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 10px;
    background: white;
    height: 20px;
    box-sizing: border-box;
}

.dgm-filter-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.dgm-filter-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* ─── Resizer Handle ─── */

.dgm-resizer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    z-index: 2;
    transition: background 0.1s;
}

.dgm-resizer:hover,
.dgm-resizer.resizing {
    background: rgba(99, 102, 241, 0.35);
}

body.dgm-resizing {
    cursor: col-resize !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.dgm-resizing * {
    cursor: col-resize !important;
}

/* ─── Context Menu ─── */

.dgm-context-menu {
    min-width: 230px;
    backdrop-filter: blur(12px);
}

.dgm-context-menu .context-menu-item i.fa-eraser {
    color: #6366f1;
}

.dgm-context-menu .context-menu-item i.fa-filter {
    color: #0ea5e9;
}

