/* --- GENEL AYARLAR --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%; /* Beyaz boşluğu önlemek için */
}

/* Renk Değişkenleri */
:root {
    --primary: #c20000;
    --primary-light: #ff4d4d;
    --text-dark: #333;
    --text-gray: #666;
    --bg-light: #f4f6f8;
    --white: #ffffff;
    --card-bg: #ffffff;
    --input-bg: #f9f9f9;
    --nav-bg: #ffffff;
    --positive-green: #2ecc71; 
    --negative-red: #e10514;
    --gold: #ffd700;
    --menu-bg: #f4f6f8;
    --border-color: #ddd;
    --text-contrast: #000;
}

/* Karanlık Mod Değişkenleri */
body.dark-mode {
    --text-dark: #eee;
    --text-gray: #aaa;
    --bg-light: #121212;
    --white: #1e1e1e;
    --card-bg: #222222;
    --input-bg: #333;
    --nav-bg: #1a1a1a;
    --menu-bg: #1a1a1a;
    --border-color: #444;
    --text-contrast: #fff;
}

/* --- TEMEL GÖVDE --- */
body {
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* --- DASHBOARD ARKA PLAN (GÜNCELLENDİ - DAHA KOYU) --- */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.dashboard-ui.creative-gradient-bg {
    /* Çok daha koyu ve derin renkler (Dark Navy, Deep Purple, Dark Red) */
    background: linear-gradient(-45deg, #0a0a2e, #2a0833, #4a0000, #000000) !important;
    background-size: 400% 400% !important;
    animation: gradientAnimation 15s ease infinite !important;
    background-attachment: fixed !important;
    min-height: 100vh;
    color: white; 
}

/* --- MOBİL DÜZENLEMELERİ --- */
.container { 
    width: 92%; 
    max-width: 1200px; 
    margin: 0 auto; 
}
.container-mobile { 
    width: 100%; 
    max-width: 500px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

/* --- KART VE YAZI OKUNABİLİRLİK AYARLARI --- */
.card {
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card.text-contrast-fix, .payment-row, .market-detail-row {
    transition: background 0.3s, color 0.3s;
}

body:not(.dark-mode) .card.text-contrast-fix {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #ddd;
}

body.dark-mode .card.text-contrast-fix {
    background: rgba(30, 30, 30, 0.9) !important;
    color: #ffffff !important;
    border: 1px solid #444;
}

.card.text-contrast-fix input {
    width: 100%; 
    padding: 12px; 
    border-radius: 10px; 
    margin-bottom: 15px; 
    border: 1px solid #ccc;
}

body:not(.dark-mode) .card.text-contrast-fix input {
    background: #f9f9f9;
    color: #333;
}

body.dark-mode .card.text-contrast-fix input {
    background: #222;
    color: #fff;
    border-color: #555;
}

.btn.primary-mobile { 
    flex: 1; padding: 12px; border-radius: 12px; border: none; font-weight: 700; background: var(--primary); color: white;
}

.btn.secondary-mobile { 
    flex: 1; padding: 12px; border-radius: 12px; font-weight: 600; 
}

body:not(.dark-mode) .btn-text-fix {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}
body.dark-mode .btn-text-fix {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.payment-row, .market-detail-row {
    display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid rgba(128,128,128,0.2);
}
.payment-icon, .market-icon {
    width:40px; height:40px; border-radius:8px; display:flex; align-items:center; justify-content:center; margin-right:10px; font-size: 1.1rem;
}
.gold { background:rgba(255,215,0,0.2); color:#ffd700; }
.usd { background:rgba(46,204,113,0.2); color:#2ecc71; }
.eur { background:rgba(52,152,219,0.2); color:#3498db; }

.error-msg {
    color: var(--negative-red);
    font-size: 0.8em;
    margin-top: 5px;
    display: none;
    font-weight: 600;
}

/* --- TELEFON INPUT STİLLERİ --- */
.phone-input-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.phone-prefix {
    background: var(--input-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-right: none;
    padding: 12px;
    border-radius: 10px 0 0 10px;
    margin-top: 5px;
    height: 43px; 
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}
.phone-input-container input {
    border-radius: 0 10px 10px 0 !important;
    border-left: none !important;
    margin-bottom: 0 !important; 
}

/* --- SLIDER (GÜNCELLENDİ: 2 SLIDE İÇİN ANIMASYON) --- */
.slider-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2; background-color: #0f0f13;
}
.slide-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    /* Animasyon süresi 2 slide için 12s olarak ayarlandı */
    opacity: 0; animation: slideShowBank 12s infinite linear;
    filter: brightness(0.4);
}
/* Sadece 2 slide kaldığı için delayler ayarlandı */
.slide-bg:nth-child(1) { animation-delay: 0s; }
.slide-bg:nth-child(2) { animation-delay: 6s; }

@keyframes slideShowBank {
    /* 2 Slide döngüsü için animasyon mantığı */
    0% { opacity: 0; transform: scale(1); z-index: 1; }
    5% { opacity: 1; }
    45% { opacity: 1; transform: scale(1.05); z-index: 1; }
    50% { opacity: 0; transform: scale(1.1); z-index: 0; }
    100% { opacity: 0; z-index: 0; }
}
.global-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: -1;
}

/* --- HEADER --- */
.header {
    background: var(--nav-bg); position: sticky; top: 0; z-index: 1000;
    padding: 15px 0; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo-img { height: 90px; object-fit: contain; }

.nav-menu { display: flex; gap: 15px; align-items: center; }
.nav-item-link { text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: color 0.3s;}
.nav-item-link:hover { color: var(--primary); }
.btn-signup-header {
    background: var(--primary); color: white; border: none; padding: 8px 16px;
    border-radius: 20px; font-weight: 700; cursor: pointer;
}

/* --- SAYFALAR --- */
.page { display: none; width: 100%; animation: fadeIn 0.4s ease; padding-bottom: 80px; }
.page.active { display: block; }
@keyframes fadeIn { from {opacity:0; transform:translateY(5px);} to {opacity:1; transform:translateY(0);} }

/* Hero Section */
.hero-text-section { text-align: center; color: white; margin-top: 15vh; }
.hero-content h1 { font-size: 2.5rem; margin-bottom: 1rem; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
.btn {
    padding: 12px 24px; border-radius: 50px; border: none;
    font-weight: 700; cursor: pointer; margin: 5px; transition: transform 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--primary); color: white; }
.btn.secondary { background: transparent; color: white; border:1px solid white; }
.btn.full { width: 100%; margin: 10px 0; }
.btn.small { padding: 8px 16px; font-size: 0.8rem; }

/* --- UZMAN KADRO DÜZENLEMESİ --- */
.card-grid {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 20px;
}

.card-grid .staff-card {
    flex: 1 1 250px; 
    max-width: 400px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.staff-img-container { 
    width: 150px; 
    height: 150px; 
    margin: 0 auto 15px auto; 
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid rgba(194, 0, 0, 0.2);
}
.staff-profile-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* About Grid */
.about-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.about-card { padding: 20px; background: var(--card-bg); color: var(--text-dark); border-radius: 15px; }
.about-card.full-width { grid-column: span 2; }
.card-icon { font-size: 2.5rem; margin-bottom: 15px; display: block; }
.card-title-text { color: var(--primary); margin-bottom: 10px; }

/* Formlar */
.auth .section {
    background: var(--card-bg); padding: 2rem; border-radius: 1.5rem;
    margin-top: 5vh; max-width: 400px; margin-left: auto; margin-right: auto;
    border: 1px solid var(--border-color); color: var(--text-dark);
}
.form-logo { height: 50px; width: auto; object-fit: contain; }
.form label { display: block; margin-bottom: 15px; font-size: 0.85rem; color: var(--text-gray); }
.form input {
    width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--border-color);
    background: var(--input-bg); margin-top: 5px; color: var(--text-dark); outline: none;
}
.form input:focus { border-color: var(--primary); }

/* --- DASHBOARD HEADER YENİ DÜZEN --- */
.dash-header-mobile {
    background: transparent; padding: 15px; color: white;
    position: sticky; top: 0; z-index: 100;
}
.dash-header { background: transparent; padding: 20px; text-align: center; }

.header-logo-small { height: 60px; width: auto; display: block; margin: 0 auto 5px auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); }

.header-title-page { color: white; border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 5px; font-weight: 700; font-size: 1.1rem; }

.top-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.username-mobile { font-weight: 700; font-size: 1rem; letter-spacing: 0.5px; }

/* Header İkonları */
.header-icons-right {
    display: flex;
    gap: 15px;
}
.icon-btn-header {
    position: relative;
    font-size: 1.3rem;
    cursor: pointer;
    background: rgba(255,255,255,0.15);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.notif-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--negative-red);
    border-radius: 50%;
    border: 1px solid white;
}

/* --- TOAST / NOTIFICATION CONTAINER --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99999;
    pointer-events: none; /* allow clicks through container except on toasts */
}

.toast {
    pointer-events: auto;
    min-width: 260px;
    max-width: 380px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 1;
    transition: transform 0.15s ease, opacity 0.2s ease;
}
.toast.info { background: rgba(0,0,0,0.75); }
.toast.success { background: var(--positive-green); color: #052a12; }
.toast.error { background: var(--negative-red); }

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-6px); }
}

/* Sekmeler */
.tab-header { display: flex; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.3); }

.tab-item { padding: 10px 20px; color: rgba(255,255,255,0.6); cursor: pointer; font-weight: 600; font-size: 0.9rem; transition: 0.3s; }
.tab-item.active { color: white; border-bottom: 3px solid var(--primary); }

.tab-content { display: none; animation: fadeIn 0.3s; }
.tab-content.active { display: block; }

/* Hesap Kartı */
.account-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    padding: 20px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px;
    backdrop-filter: blur(10px); box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    color: white; 
}

.branch-info { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8;}
.account-number { font-size: 1rem; display: block; margin-bottom: 15px; font-family: monospace; }
.iban-line { 
    display: flex; justify-content: space-between; align-items: center; 
    background: rgba(0,0,0,0.2); padding: 8px 12px; border-radius: 8px; margin-bottom: 15px;
}
.iban-text-mobile { font-size: 0.75rem; font-family: monospace; }
.share-icon { cursor: pointer; }

.balance-area { margin-bottom: 20px; }
.balance-label { font-size: 0.8rem; opacity: 0.8; }
.balance-amount-mobile { font-size: 1.8rem; font-weight: 700; }

.account-actions { display: flex; gap: 15px; margin-top: 10px; }

/* Kredi Kartı */
.credit-card-visual {
    background: linear-gradient(135deg, #111, #333);
    color: white; border-radius: 15px; padding: 25px;
    position: relative; box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    min-height: 200px; display: flex; flex-direction: column; justify-content: space-between;
    border: 1px solid #444;
}
.card-chip { font-size: 2rem; color: #f1c40f; display: flex; align-items: center; }
.card-number { font-size: 1.4rem; letter-spacing: 2px; font-family: monospace; text-shadow: 0 2px 2px rgba(0,0,0,0.5); }
.card-details { display: flex; justify-content: space-between; font-size: 0.8rem; }
.card-holder span, .card-date span { font-size: 0.6rem; opacity: 0.7; display: block; }
.card-logo { position: absolute; top: 20px; right: 25px; font-weight: 900; font-style: italic; font-size: 1.5rem; opacity: 0.8; }

/* Hızlı Linkler */
.quick-links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-top: 15px; }
.quick-link-item {
    background: rgba(255,255,255,0.1); padding: 20px; border-radius: 15px;
    text-align: center; cursor: pointer; color: white; font-size: 0.85rem;
    transition: 0.2s; border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}
.quick-link-item i { font-size: 1.5rem; margin-bottom: 10px; display: block; }

/* Liste Hesapları */
.acc-item {
    color:white; background:rgba(255,255,255,0.1); padding:15px; border-radius:10px; margin-bottom:10px;
    backdrop-filter: blur(5px);
}

/* Alt Navigasyon */
.bottom-nav.ziraat-style {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 70px;
    background: var(--nav-bg); 
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-around; align-items: center; z-index: 999;
}
.bottom-nav .nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--text-gray); font-size: 0.7rem; cursor: pointer; width: 25%; height: 100%;
    transition: 0.3s;
}
.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item.active i { transform: translateY(-3px); }
.bottom-nav .nav-item i { font-size: 1.3rem; margin-bottom: 5px; transition: 0.3s; }

/* Hareketler Listesi */
.trans-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 10px; border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}
.positive { color: var(--positive-green); }
.negative { color: var(--negative-red); }

/* --- SIDEBAR MENÜ STİLLERİ (GÜNCELLENDİ: SOLDAN AÇILIR) --- */
.sidebar-menu {
    position: fixed;
    top: 0;
    /* GÜNCELLEME: Menü SOLDAN geleceği için right yerine left kullanıyoruz */
    left: -100%; /* Başlangıçta ekranın SOLUNDA gizli */
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: #f4f4f4;
    z-index: 2000;
    transition: left 0.3s ease-in-out; /* Animasyon Left üzerinde olacak */
    box-shadow: 5px 0 15px rgba(0,0,0,0.2); /* Gölgeyi sağ tarafa verdik */
    overflow-y: auto;
    color: #333;
}

.sidebar-menu.active {
    left: 0; /* Ekrana kaydır */
}

/* Sidebar açıldığında arkadaki karartma */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none; /* Başlangıçta gizli */
    backdrop-filter: blur(3px);
}

.sidebar-overlay.active {
    display: block;
}

/* Sidebar içindeki scroll alanı */
.sidebar-scroll-content {
    height: calc(100% - 70px); /* Header yüksekliğini çıkar */
    overflow-y: auto;
    padding-bottom: 20px;
}

/* --- TOGGLE SWITCH --- */
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-round {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; border-radius: 34px;
}
.slider-round:before {
    position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider-round { background-color: var(--primary); }
input:checked + .slider-round:before { transform: translateX(24px); }

/* Mobil için Header Düzenlemesi */
@media (max-width: 768px) {
    .header { padding: 10px 0; }
    .header-flex { flex-direction: column; gap: 15px; align-items: center; }
    .logo-container { justify-content: center; }
    .logo-img { height: 40px !important; width: auto; }
    .header-flex h2 { font-size: 1.2rem; }
    .nav-menu { flex-direction: column; gap: 10px; width: 100%; align-items: center; }
    .nav-links { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
    .nav-item-link { font-size: 0.9rem; }
    .header-right { display: flex; justify-content: center; gap: 10px; width: 100%; margin-left: 0 !important; margin-top: 5px; }
}

/* YENİ LİSTE GÖRÜNÜMÜ STİLLERİ */
.list-view-container {
    background: #fff; border-radius: 15px; overflow: hidden; padding-bottom: 10px;
}
body.dark-mode .list-view-container { background: #1e1e1e; }

.list-section-title {
    padding: 15px 20px; font-size: 0.9rem; font-weight: 700; color: var(--text-gray); background: rgba(0,0,0,0.03);
}
body.dark-mode .list-section-title { background: rgba(255,255,255,0.05); }

.list-view-item {
    display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid rgba(128,128,128,0.1); cursor: pointer; transition: background 0.2s; color: var(--text-dark);
}
.list-view-item:last-child { border-bottom: none; }
.list-view-item:active { background: rgba(0,0,0,0.05); }

.item-icon {
    font-size: 1.2rem; color: var(--primary); width: 30px; text-align: center; margin-right: 15px;
}
.item-text { flex: 1; font-weight: 500; font-size: 0.95rem; }
.item-arrow { color: #ccc; font-size: 0.8rem; }

.badge-new {
    background: var(--primary); color: white; font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; margin-right: 10px; font-weight: 700;
}

/* Hızlı İşlem Satırı */
.quick-action-row {
    display: flex; gap: 10px; padding: 15px 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; scrollbar-width: none;
}
.quick-action-row::-webkit-scrollbar { display: none; }

.quick-action-item {
    min-width: 100px; height: 80px; background: rgba(0,0,0,0.03); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; color: var(--text-dark); font-size: 0.8rem; padding: 5px; position: relative; flex-shrink: 0;
}
body.dark-mode .quick-action-item { background: rgba(255,255,255,0.1); }
.quick-action-item i { font-size: 1.5rem; color: var(--primary); margin-bottom: 8px; }

/* Profil Butonu */
.profile-edit-btn {
    width: 30px; height: 30px; background: #000000; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); color: white; font-size: 0.8rem; transition: transform 0.2s;
}
.profile-edit-btn:active { transform: scale(0.9); }

/* Global loader */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loader-spinner {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 6px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary, #2a9df4);
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Menü Liste Öğeleri */
.menu-list-item {
    display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid #f0f0f0; cursor: pointer; color: #333; font-weight: 500; font-size: 0.95rem;
}
.menu-list-item:last-child { border-bottom: none; }
.menu-list-item i { width: 30px; font-size: 1.1rem; margin-right: 10px; text-align: center; }
.menu-list-item:hover { background-color: #fafafa; }