/* ==========================================================================
   🏛️ DEUTSCHE BANK NİZAMI - MOBİL MENÜSÜ %100 SOLA HİZALI MASTER CSS AMK
   ========================================================================== */

:root {
    --bg-main: #f4f6f9;
    --bg-card: #ffffff;
    --text-main: #0a192f;
    --text-muted: #4a5568;
    --border-color: #cbd5e1;
    --primary: #0a192f;
    --accent-gold: #b38f4d;
    --gelir-dark: #0f5132;
    --gider-dark: #842029;
    --kalan-dark: #0a58ca;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    padding-bottom: 50px;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* 🏛️ ELİT JİLET GİBİ NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a192f;
    padding: 14px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(10,25,47,0.12);
    margin-bottom: 10px;
    position: relative;
}
.navbar h2 { font-size: 1.4rem; font-weight: 900; color: #ffffff; letter-spacing: 1px; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-link {
    text-decoration: none; color: #a0aec0; font-weight: 700; font-size: 0.85rem;
    padding: 10px 18px; border-radius: 4px; transition: all 0.2s ease;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.nav-link:hover { color: #ffffff; background: rgba(255,255,255,0.05); }
.nav-link.active { background: #b38f4d; color: #ffffff; box-shadow: 0 2px 8px rgba(179, 143, 77, 0.4); }

/* 🏛️ ASİL MOBİL SAYFA İZLEME ŞERİDİ */
.page-tracker {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.page-tracker span { color: #b38f4d; }

/* 🍔 HAMBURGER BUTONU */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.hamburger-btn .bar {
    width: 22px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* 👑 MASAÜSTÜNDE AÇILIR MENÜYÜ GİZLEYEN MUTLAK KURAL */
.mobile-nav-select { display: none !important; }

/* 📐 GRID MİMARİSİ */
.row { display: flex; flex-wrap: wrap; margin: 0 -12px; width: calc(100% + 24px); }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 12px; box-sizing: border-box; }
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 12px; box-sizing: border-box; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; padding: 0 12px; box-sizing: border-box; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; box-sizing: border-box; }

/* 🏦 BANKACILIK TIPI SIKI KARTLAR */
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 4px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.02); margin-bottom: 24px; width: 100%; }
.card-header { font-weight: 800; font-size: 0.88rem; color: #0a192f; margin-bottom: 15px; border-bottom: 2px solid #0a192f; padding-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

/* 🏛️ BORSA PANORAMASI ŞERİTLERİ */
.bg-gelir { border-top: 4px solid #10b981; background: #e8f5e9; color: var(--gelir-dark); }
.bg-gider { border-top: 4px solid #ef4444; background: #ffebee; color: var(--gider-dark); }
.bg-kalan { border-top: 4px solid #3b82f6; background: #e3f2fd; color: var(--kalan-dark); }

.card[class*="bg-"] span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.85; }
.card[class*="bg-"] h3 { font-size: 1.6rem; font-weight: 900; margin-top: 4px; letter-spacing: -0.5px; }
.card[class*="bg-"] small { font-size: 0.78rem; font-weight: 700; display: block; margin-top: 5px; opacity: 0.9; }

/* 📝 FORMLAR */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 800; color: #0a192f; margin-bottom: 6px; text-transform: uppercase; }
.form-control, .form-select { width: 100%; padding: 11px 12px; font-size: 0.9rem; background-color: #f8fafc; color: #0a192f; border: 1px solid var(--border-color); border-radius: 4px; outline: none; font-weight: 600; }
.form-control:focus, .form-select:focus { border-color: #b38f4d; box-shadow: 0 0 0 3px rgba(179,143,77,0.1); }

/* BUTTONS */
.btn-primary { background: #0a192f; color: #fff; border: none; border-radius: 4px; padding: 12px; font-weight: 800; font-size: 0.9rem; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; width: 100%; }
.btn-primary:hover { background: #1c2d42; }
.btn-danger { background: #842029; color: #fff; text-decoration: none; font-size: 0.75rem; font-weight: 700; padding: 6px 12px; border-radius: 4px; }
.btn-sm { padding: 5px 10px; font-size: 0.75rem; border-radius: 4px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; transition: all 0.2s; }
.btn-warning { background: #b38f4d; color: #fff; }

/* 📊 PASTA VE DONUT GRAFİĞİ */
.pie-chart-wrapper { display: flex; flex-direction: column; align-items: center; width: 100%; }
.pure-pie { border-radius: 50% !important; box-shadow: inset 0 0 0 16px var(--bg-card); transition: transform 0.2s ease; }
.legend-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 0.75rem; font-weight: 700; width: 100%; margin-top: 15px; }
.legend-color { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; display: inline-block; }

/* TABLES */
.table-responsive { width: 100%; overflow-x: auto; border-radius: 4px; border: 1px solid var(--border-color); }
.custom-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.85rem; background: #fff; }
.custom-table th { background: #0a192f; color: #ffffff; font-weight: 800; padding: 12px; text-transform: uppercase; font-size: 0.75rem; }
.custom-table td { padding: 12px; border-bottom: 1px solid var(--border-color); font-weight: 600; }
.custom-table tr:hover { background: #f8fafc; }

.badge { border-radius: 4px; padding: 3px 8px; font-size: 0.72rem; font-weight: 800; display: inline-block; text-transform: uppercase; }
.badge-gelir { background: #c1e7c4; color: #0f5132; }
.badge-gider { background: #f8d7da; color: #842029; }

/* 🏛️ MOTH-BOX GRID SİSTEMİ */
.matrix-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; width: 100%; margin-bottom: 15px; }
.month-box { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 4px; padding: 10px 4px; text-align: center; transition: all 0.2s ease; }
.month-box:hover { transform: translateY(-2px); border-color: #b38f4d; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.month-name { font-size: 0.72rem; font-weight: 800; color: #0a192f; border-bottom: 1px solid var(--border-color); padding-bottom: 4px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.matrix-value { font-size: 0.78rem; font-weight: 700; margin: 3px 0; }

/* 📱 TELEFON MOBİL UYUMLULUK KİLİT KIRICI */
@media (max-width: 768px) {
    .row { width: 100%; margin: 0; }
    .col-4, .col-6, .col-8 { flex: 0 0 100%; max-width: 100%; padding: 0; }
    
    .hamburger-btn { display: flex !important; }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #0a192f;
        padding: 12px 0; /* İç boşluklar kurumsal nizam için sıfırlandı amk */
        border-radius: 0 0 4px 4px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.25);
        z-index: 9999;
        gap: 2px; /* Linkler arası boşluk daraltıldı amk */
    }
    .nav-menu.active-menu { display: flex !important; }
    
    /* 👑 REKTİFİYE ALANI: Mobildeki o çirkin ortalama silindi, tam SOLA yaslandı amk! */
    .nav-link { 
        width: 100%; 
        text-align: left !important; /* Jilet gibi sola yaslama komutu amk amk */
        padding: 12px 24px !important; /* Ekran kenarına yapışmasın diye asil sol boşluk */
        border-radius: 0; /* Liste gibi jilet gibi dursun amk */
    }
    
    .matrix-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

/* FINANZ İkonsuz Kurumsal Dropdown Mimarisi */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #112240; /* Kurumsal lüks gece mavisi kart rengi */
    min-width: 200px;
    box-shadow: 0px 12px 24px 0px rgba(0,0,0,0.6);
    border: 1px solid #b38f4d; /* Asil altın sarısı ince çerçeve */
    border-radius: 4px;
    z-index: 9999;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: #8892b0 !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.82rem;
    font-weight: 700; /* Yazılar dik ve net */
    text-transform: uppercase; /* Tamamı büyük harf kurumsal duruş */
    border-bottom: 1px solid #233554;
    transition: all 0.2s ease-in-out;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(179, 143, 77, 0.15) !important;
    color: #fff !important;
    padding-left: 22px; /* Hafif yana kayma efekti lüks hissi verir */
}

/* Mouse ile üzerine gelince menüyü pürüzsüz aç */
.nav-dropdown:hover .dropdown-content {
    display: block;
}

/* Mobil Hamburger Menü İçin Çakışma Önleyici */
@media (max-width: 768px) {
    .dropdown-content {
        position: relative;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 15px;
        min-width: 100%;
    }
    .dropdown-content a {
        border-bottom: none;
        padding: 10px 0;
    }
    .nav-dropdown:hover .dropdown-content {
        display: block;
    }
}
