/* Özel kaydırma çubuğu */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #27272a;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #3f3f46;
}

/* Kaydırma çubuğunu gizleme sınıfı */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    /* IE ve Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Kartların üzerine gelince büyüme ve gölge efektleri */
.dashboard-card {
    border-radius: 1rem;
    border-width: 1px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
    border-color: #3f3f46;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

/* Tablo satır stilleri */
.table-row {
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.table-row:hover {
    background-color: #27272a;
    /* surfaceHover */
    border-left: 2px solid #f4f4f5;
    /* sol tarafta belirgin beyaz işaretçi */
}

.table-row:hover td {
    color: #f4f4f5;
    /* Üzerine gelince metni hafifçe parlat */
}

/* Yan menü (sidebar) aktif ve hover durumları için sol işaretçi */
.sidebar-link::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    height: 0;
    width: 3px;
    background-color: #f4f4f5;
    /* textMain */
    border-radius: 0 4px 4px 0;
    transition: height 0.2s ease;
}

.sidebar-link.active::before,
.sidebar-link:hover::before {
    height: 60%;
}

.sidebar-link.active {
    background-color: #27272a;
    /* surfaceHover */
    color: #f4f4f5;
}

.sidebar-link.active i {
    color: #f4f4f5;
}

/* Özel Checkbox (Animasyonlu) */
.checkbox-btn {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 36px;
    margin-bottom: 0px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Varsayılan checkbox'ı gizle */
.checkbox-btn input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Özel checkbox kutusu */
.checkmark {
    position: absolute;
    top: 50%;
    margin-top: -11px;
    left: 0;
    height: 22px;
    width: 22px;
    border: 2px solid #52525b;
    /* zinc-600, projenin tonuyla uyumlu gri */
    border-radius: 6px;
    /* Eklenen yuvarlak kenarlar */
    transition: .2s linear;
}

.checkbox-btn input:checked~.checkmark {
    background-color: transparent;
}

/* Seçildiğinde görünen check işareti */
.checkmark:after {
    content: "";
    position: absolute;
    visibility: hidden;
    opacity: 0;
    left: 50%;
    top: 40%;
    width: 8px;
    height: 14px;
    border: 2px solid #10b981;
    /* Dashboard ile uyumlu yeşil zümrüt rengi */
    filter: drop-shadow(0px 0px 8px #10b981);
    border-width: 0 2.5px 2.5px 0;
    transition: .2s linear;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.2);
}

.checkbox-btn input:checked~.checkmark:after {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    animation: pulse 1s ease-in;
}

.checkbox-btn input:checked~.checkmark {
    transform: rotate(45deg);
    border: none;
    margin-top: -15px;
    /* döndüğünde ortalamayı dengelemek için */
    margin-left: 4px;
    /* döndüğünde ortalamayı dengelemek için */
}

/* Modern İşlem Listesi Öğesi */
.transaction-item {
    background: rgba(24, 24, 27, 0.4);
    /* surface with opacity */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.transaction-item:hover {
    background: rgba(39, 39, 42, 0.6);
    /* surfaceHover with opacity */
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.6);
}

.transaction-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02));
    pointer-events: none;
}

.transaction-icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.transaction-item:hover .transaction-icon-box {
    transform: scale(1.1) rotate(5deg);
}

/* Filtreleme Chip'leri */
.filter-chip {
    color: #a1a1aa;
    /* textMuted */
}

.filter-chip.active {
    background-color: #27272a;
    /* surfaceHover */
    color: #f4f4f5;
    /* textMain */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Arama Kutusu Odaklanma */
#transactionSearch:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Varlık Listesi Özel Satır Tasarımı (Custom Asset Row) */
.asset-item-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    border-radius: 1rem;
    /* rounded-2xl hissiyatı */
    background: #18181b;
    /* surface arka plan */
    position: relative;
    overflow: hidden;
}

.asset-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #27272a;
    transition: all 0.3s ease;
}

.asset-item-card:hover {
    background-color: #27272a;
    /* surfaceHover */
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    border-color: #3f3f46;
}

.asset-item-card:hover::before {
    background: #f4f4f5;
    /* textMain */
}

/* Kâr/Zarar durumlarına göre özel sol çizgi renkleri hoverda */
.asset-item-card.is-profit:hover::before {
    background: #10b981;
    /* emerald-500 */
}

.asset-item-card.is-loss:hover::before {
    background: #f43f5e;
    /* rose-500 */
}

.asset-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.asset-item-card:hover .asset-icon-box {
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(5deg) scale(1.05);
    border-color: rgba(255, 255, 255, 0.15);
}

/* =========================================
   KULLANICI POPUP MENÜSÜ
   ========================================= */

.user-menu-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #18181b;
    border: 1px solid #3f3f46;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    z-index: 200;
    transform-origin: bottom center;
    transform: scale(0.95) translateY(6px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-menu-popup.show {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #a1a1aa;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    text-align: left;
    text-decoration: none;
    background: transparent;
    border: none;
    font-family: inherit;
}

.user-menu-item:hover {
    background: #27272a;
    color: #f4f4f5;
}

.user-menu-item.danger {
    color: #f87171;
}

.user-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.user-menu-divider {
    height: 1px;
    background: #27272a;
    margin: 4px 2px;
}

.user-menu-header {
    padding: 8px 10px 6px;
}

/* Light tema popup */
[data-theme="light"] .user-menu-popup {
    background: #ffffff !important;
    border-color: #e4e4e7 !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .user-menu-item {
    color: #71717a !important;
}

[data-theme="light"] .user-menu-item:hover {
    background: #f4f4f5 !important;
    color: #18181b !important;
}

[data-theme="light"] .user-menu-item.danger {
    color: #ef4444 !important;
}

[data-theme="light"] .user-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.08) !important;
}

[data-theme="light"] .user-menu-divider {
    background: #e4e4e7 !important;
}

/* =========================================
   MOBİL İÇİN ALT NAVİGASYON (GLASSMORPHISM)
   ========================================= */

.bottom-nav-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: none;
    /* Masaüstünde gizli */
    width: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.bottom-nav-container.hidden-nav {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, 20px) !important;
}

/* Glass Tasarım */
.bottom-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(24, 24, 27, 0.85);
    /* surface rengine (zinc-900) uyumlu koyu cam */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 20px;
    border-radius: 9999px;
    /* tam yuvarlak köşeler */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Aşağı kaydırıldığında küçülme (Shrink) efekti */
.bottom-nav.shrunk {
    padding: 6px 14px;
    transform: scale(0.9);
    background: rgba(24, 24, 27, 0.65);
    gap: 8px;
}

/* Navigasyon İkonları */
.nav-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #a1a1aa;
    /* textMuted */
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item-mobile:active {
    transform: scale(0.9);
}

.nav-item-mobile.active {
    color: #f4f4f5;
    /* textMain */
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.nav-item-mobile svg {
    transition: all 0.2s ease;
}

.bottom-nav.shrunk .nav-item-mobile {
    width: 38px;
    height: 38px;
}

.bottom-nav.shrunk .nav-item-mobile svg {
    width: 18px;
    height: 18px;
}

/* Mobil Görünüm Aktivasyonu */
@media (max-width: 1024px) {
    .bottom-nav-container {
        display: block;
        animation: slideUpNav 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes slideUpNav {
        from {
            transform: translate(-50%, 150%);
            opacity: 0;
        }

        to {
            transform: translate(-50%, 0);
            opacity: 1;
        }
    }
}

/* =========================================
   TEMA DEĞİŞTİR BUTONU (MİNİMALİST)
   ========================================= */

.theme-toggle-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9000;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #3f3f46;
    background: #18181b;
    color: #71717a;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.theme-toggle-btn:hover {
    color: #f4f4f5;
    border-color: #71717a;
    background: #27272a;
    transform: scale(1.08);
}

.theme-toggle-btn svg {
    width: 15px;
    height: 15px;
}

/* =========================================
   AÇIK TEMA (LIGHT THEME) OVERRIDEleri
   ========================================= */

[data-theme="light"] body {
    background-color: #f8f8f8 !important;
    color: #18181b !important;
}

[data-theme="light"] .bg-base {
    background-color: #f8f8f8 !important;
}

[data-theme="light"] .bg-surface {
    background-color: #ffffff !important;
}

[data-theme="light"] .bg-surfaceHover {
    background-color: #f0f0f1 !important;
}

[data-theme="light"] .border-border {
    border-color: #e4e4e7 !important;
}

[data-theme="light"] .text-textMain {
    color: #18181b !important;
}

[data-theme="light"] .text-textMuted {
    color: #71717a !important;
}


/* Sidebar */
[data-theme="light"] #sidebar {
    background-color: #ffffff !important;
    border-color: #e4e4e7 !important;
}

[data-theme="light"] .sidebar-link.active {
    background-color: #f0f0f1 !important;
    color: #18181b !important;
}

[data-theme="light"] .sidebar-link::before {
    background-color: #18181b !important;
}

[data-theme="light"] .border-t,
[data-theme="light"] .border-b,
[data-theme="light"] .border-r {
    border-color: #e4e4e7 !important;
}

/* Hızlı Ekle ve tüm primary butonlar — koyu bg üzerine beyaz yazı */
[data-theme="light"] button.bg-textMain,
[data-theme="light"] a.bg-textMain,
[data-theme="light"] .bg-textMain {
    background-color: #18181b !important;
    color: #ffffff !important;
}

/* Buton içindeki span ve icon'lar da beyaz */
[data-theme="light"] .bg-textMain span,
[data-theme="light"] .bg-textMain i,
[data-theme="light"] .bg-textMain svg {
    color: #ffffff !important;
}

/* hover:bg-white durumunda metin koyu olsun */
[data-theme="light"] .bg-textMain:hover {
    background-color: #27272a !important;
    color: #ffffff !important;
}

/* Ayarlar save-btn, rapor oluştur vb. */
[data-theme="light"] .save-btn {
    color: #ffffff !important;
}

/* Kartlar */
[data-theme="light"] .dashboard-card {
    background-color: #ffffff !important;
    border-color: #e4e4e7 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .dashboard-card:hover {
    border-color: #d1d1d6 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09) !important;
}

/* Input / Select */
[data-theme="light"] input:not([type="checkbox"]):not([type="date"]):not([type="range"]):not([type="submit"]),
[data-theme="light"] select,
[data-theme="light"] textarea {
    background-color: #f4f4f5 !important;
    border-color: #e4e4e7 !important;
    color: #18181b !important;
}

[data-theme="light"] input::placeholder {
    color: #a1a1aa !important;
}

/* Transaction items */
[data-theme="light"] .transaction-item {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .transaction-item:hover {
    background: rgba(240, 240, 241, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .transaction-item::after {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.01)) !important;
}

/* Asset items */
[data-theme="light"] .asset-item-card {
    background: #ffffff !important;
    border-color: #e4e4e7 !important;
}

[data-theme="light"] .asset-item-card::before {
    background: #e4e4e7 !important;
}

[data-theme="light"] .asset-item-card:hover {
    background-color: #f4f4f5 !important;
    border-color: #d1d1d6 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .asset-icon-box {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.07) !important;
}

/* Filter chips */
[data-theme="light"] .filter-chip {
    color: #71717a;
}

[data-theme="light"] .filter-chip.active,
[data-theme="light"] .tx-filter.active {
    background-color: #e4e4e7 !important;
    color: #18181b !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Bottom Nav */
[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .nav-item-mobile {
    color: #71717a !important;
}

[data-theme="light"] .nav-item-mobile.active {
    color: #18181b !important;
    background: rgba(0, 0, 0, 0.06) !important;
}

/* Tema butonu — light modda */
[data-theme="light"] .theme-toggle-btn {
    background: #ffffff !important;
    border-color: #e4e4e7 !important;
    color: #71717a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .theme-toggle-btn:hover {
    color: #18181b !important;
    border-color: #a1a1aa !important;
    background: #f4f4f5 !important;
}

/* Sidebar overlay */
[data-theme="light"] #sidebarOverlay {
    background: rgba(0, 0, 0, 0.25) !important;
}

/* Scrollbar */
[data-theme="light"] .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #d4d4d8 !important;
}

/* Table */
[data-theme="light"] .report-table th {
    color: #71717a;
    border-color: #e4e4e7;
}

[data-theme="light"] .report-table td {
    border-color: rgba(228, 228, 231, 0.6);
}

[data-theme="light"] .report-table tbody tr:hover {
    background: rgba(240, 240, 241, 0.6);
}

/* AI insight cards */
[data-theme="light"] .ai-insight-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .ai-insight-card:hover {
    background: rgba(244, 244, 245, 1) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Gauge ring */
[data-theme="light"] .score-ring-bg {
    stroke: #e4e4e7 !important;
}

/* Surfaces with opacity hacks */
[data-theme="light"] .bg-zinc-800\/20 {
    background-color: rgba(160, 160, 160, 0.1) !important;
}

[data-theme="light"] .bg-zinc-800\/10 {
    background-color: rgba(160, 160, 160, 0.08) !important;
}

[data-theme="light"] .bg-zinc-900\/10 {
    background-color: rgba(160, 160, 160, 0.06) !important;
}

[data-theme="light"] .bg-base\/30 {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* Arka plan blur glow efektleri kaldır */
[data-theme="light"] .blur-\[120px\] {
    opacity: 0.3 !important;
}

[data-theme="light"] .blur-\[150px\] {
    opacity: 0.2 !important;
}

/* Cancel button text override */
[data-theme=light] .cancel-btn:hover {
    color: #ffffff !important;
}

/* Sidebar Profile Hover Override */
[data-theme="light"] #userProfileBtn:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* =========================================
   AI CHAT WIDGET LIGHT THEME
   ========================================= */
[data-theme="light"] #chatPanel {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04) inset !important;
}

[data-theme="light"] .chat-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.05)) !important;
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .chat-header p {
    color: #18181b !important;
}

[data-theme="light"] .chat-bubble.user {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(29, 78, 216, 0.1)) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #18181b !important;
}

[data-theme="light"] .chat-bubble.ai {
    background: rgba(244, 244, 245, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #18181b !important;
}

[data-theme="light"] .chat-bubble.ai strong {
    color: #000000 !important;
}

[data-theme="light"] .chat-bubble.ai code {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #18181b !important;
}

[data-theme="light"] .chat-input-area {
    background: rgba(255, 255, 255, 0.8) !important;
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] #chatInput {
    background: rgba(244, 244, 245, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #18181b !important;
}

[data-theme="light"] #chatInput::placeholder {
    color: #71717a !important;
}

[data-theme="light"] .quick-btn,
[data-theme="light"] .prompt-chip {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #1d4ed8 !important;
}

[data-theme="light"] .quick-btn:hover,
[data-theme="light"] .prompt-chip:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}