/* --- PENGRAF ADMIN THEME (MOBILE HAMBURGER MENU) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-body: #FAFAFA;
    --primary-yellow: #F5D300;
    --text-dark: #1D1D1F;
    --text-gray: #86868B;
    --card-bg: #FFFFFF;
    --danger: #FF3B30;
    --success: #34C759;
    --radius-lg: 20px;
    --shadow-apple: 0 20px 40px rgba(0,0,0,0.08);
    --border-light: 1px solid #E5E5E5;
}

* { box-sizing: border-box; }

body { 
    margin: 0; 
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-body); 
    color: var(--text-dark); 
    height: 100vh;
    overflow-y: scroll; 
    overflow-x: hidden;
}

/* --- RESPONSIVE NAVBAR --- */
.navbar { 
    height: 70px; 
    background: rgba(255,255,255,0.98); 
    border-bottom: var(--border-light); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center; 
    position: sticky; top: 0; z-index: 1000;
}

.nav-content { 
    width: 100%; max-width: 1200px; padding: 0 20px; 
    display: flex; justify-content: space-between; align-items: center; 
}

.logo-img-wrapper img { height: 36px; display: block; }

/* Masaüstü Linkleri */
.nav-links { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; align-items: center; }
.nav-links a { 
    text-decoration: none; color: var(--text-gray); font-size: 14px; font-weight: 500; 
    transition: 0.2s; white-space: nowrap; 
}
.nav-links a:hover, .nav-links a.active { color: var(--primary-yellow); }
.btn-nav-logout { color: var(--danger) !important; font-weight: 600 !important; cursor: pointer; }

/* Hamburger Butonu (Varsayılan Gizli) */
.menu-toggle { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: #1D1D1F; border-radius: 3px; }

/* --- 2. GİRİŞ EKRANI --- */
.login-container { height: calc(100vh - 70px); display: flex; justify-content: center; align-items: center; background: #F2F2F7; padding: 20px; }
.login-box { width: 100%; max-width: 400px; background: #fff; padding: 40px; border-radius: 24px; box-shadow: var(--shadow-apple); text-align: center; }
.login-header h2 { margin: 15px 0 5px 0; color: #1D1D1F; font-size: 24px; }
.input-group { margin-bottom: 15px; }
.form-control { width: 100%; padding: 16px; border: 1px solid #D1D1D6; border-radius: 12px; font-size: 15px; outline: none; transition: 0.2s; }
.form-control:focus { border-color: var(--primary-yellow); }

/* --- 3. PANEL DÜZENİ --- */
.dashboard-wrapper { display: flex; height: calc(100vh - 70px); width: 100%; overflow: hidden; }

.glass-sidebar { width: 280px; min-width: 280px; background: #fff; border-right: var(--border-light); display: flex; flex-direction: column; padding: 25px 20px; overflow-y: auto; }
.sidebar-header { margin-bottom: 20px; padding-bottom: 20px; border-bottom: var(--border-light); }
.new-project-box { display: flex; gap: 5px; }
.sidebar-input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 8px; outline: none; }
.btn-icon-add { background: var(--text-dark); color: var(--primary-yellow); border: none; border-radius: 8px; width: 40px; cursor: pointer; }

.project-list { list-style: none; padding: 0; margin: 0; }
.project-item { padding: 12px 14px; border-radius: 10px; margin-bottom: 6px; cursor: pointer; border: 1px solid transparent; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
.project-item:hover { background: #F5F5F5; }
.project-item.active { background: #FFFBE6; border-color: var(--primary-yellow); }
.p-title { font-weight: 600; font-size: 14px; color: #111; }
.p-date { font-size: 11px; color: #999; }
.btn-delete-project { background: none; border: none; color: #ddd; cursor: pointer; }
.btn-delete-project:hover { color: var(--danger); }

.main-content { flex: 1; padding: 40px; overflow-y: auto; background: var(--bg-body); }
.welcome-screen { text-align: center; margin-top: 10vh; color: var(--text-gray); }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
#detailTitle { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -1px; }

.content-grid { display: grid; grid-template-columns: 360px 1fr; gap: 30px; align-items: start; }
.card { background: #fff; border-radius: var(--radius-lg); padding: 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); border: 1px solid #fff; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
.card-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text-gray); text-transform: uppercase; }
.card-header .material-icons-round { color: var(--primary-yellow); font-size: 24px; }

.finance-split-container { display: flex; flex-direction: column; gap: 15px; }
.finance-group { background: #FAFAFA; border: 1px solid #E5E5E5; border-radius: 12px; padding: 15px; }
.f-title { margin: 0 0 10px 0; font-size: 11px; font-weight: 800; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.vault-section { background: #1D1D1F; color: white; border: none; }
.vault-section .f-title { border-color: rgba(255,255,255,0.2); }
.vault-section .d-item { color: white; border: none; }
.d-item { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #eee; font-size: 13px; }
.d-item b { font-weight: 600; }
.price-box { background: var(--text-dark); color: var(--primary-yellow); padding: 20px; border-radius: 12px; text-align: center; margin-bottom: 20px; }
.price-box .price { font-size: 32px; font-weight: 800; }

.form-row { display: flex; gap: 10px; margin-bottom: 15px; }
.form-group { flex: 1; }
.checkbox-wrapper { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

.btn-save, .btn-apple, .btn-upload { width: 100%; padding: 14px; background: var(--primary-yellow); color: #1D1D1F; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; margin-top: 10px; transition: 0.2s; }
.btn-upload { background: var(--text-dark); color: white; width: auto; font-size: 13px; padding: 10px 25px; }
.btn-upload:disabled { background: #ccc; }

.upload-container { border: 2px dashed #E0E0E0; border-radius: 16px; padding: 20px; text-align: center; background: #FAFAFA; }
.file-input { display: none !important; }
.file-label { background: #fff; border: 1px solid #ddd; padding: 10px 20px; border-radius: 30px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-block; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 20px; }
.img-card { aspect-ratio: 1; border-radius: 12px; overflow: hidden; position: relative; }
.img-card img { width: 100%; height: 100%; object-fit: cover; }
.gallery-btn { position: absolute; width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-del-img { top: 5px; right: 5px; background: rgba(255, 59, 48, 0.9); color: white; }
.btn-down-img { bottom: 5px; right: 5px; background: rgba(52, 199, 89, 0.9); color: white; }

/* --- MOBİL GÖRÜNÜM (SAĞDAN AÇILAN MENÜ) --- */
/* --- MOBİL GÖRÜNÜM (SAĞ ÜSTTEN AŞAĞI AÇILAN DROPDOWN) --- */
@media (max-width: 900px) {
    .menu-toggle { display: block; }

    .nav-links {
        position: fixed;
        top: 70px; /* Navbar'ın hemen altı */
        right: 0;  /* Sağ kenara yapışık */
        left: auto; /* Solu serbest bırak */
        
        width: 280px; /* Çok geniş olmasın, sağda dursun */
        height: auto; /* İçerik kadar uzasın */
        
        background: rgba(255, 255, 255, 0.98);
        border-bottom-left-radius: 20px; /* Sol alt köşe oval, şık durur */
        border-left: 1px solid #eee;
        border-bottom: 1px solid #eee;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        gap: 25px;
        
        /* Animasyon: Yukarıdan aşağı süzülme */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px); /* Hafif yukarıda başla */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    /* Menü Aktifken */
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0); /* Yerine otur */
    }

    .nav-links a { font-size: 16px; font-weight: 600; color: #1D1D1F; }

    /* Hamburger Animasyon */
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Sayfa İçi Mobil Düzeltmeleri (Admin, Home, Customer için ortak) */
    .nav-content { padding: 0 15px; }
    .logo-img-wrapper img { height: 28px; }
    
    /* Admin/Customer Özel Düzeltmeler */
    .dashboard-wrapper { flex-direction: column; height: auto; overflow: visible; }
    .glass-sidebar { width: 100%; min-width: 100%; height: auto; border-right: none; border-bottom: 1px solid #eee; padding: 15px; }
    .project-list { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 5px; }
    .project-item { min-width: 220px; border: 1px solid #eee; }
    .content-grid { grid-template-columns: 1fr; }
    .main-content { padding: 20px; }
    .form-row { flex-direction: column; }
    .login-box { width: 90%; padding: 30px 20px; }
    .calc-card { padding: 30px 20px; }
    .price-tag { font-size: 42px; }
    .row-gif { width: 70px; }
    
    /* Home Özel Düzeltmeler */
    .hero-content h1 { font-size: 42px; }
    .about-grid, .tech-grid, .steps-grid, .prod-grid { grid-template-columns: 1fr; gap: 40px; }
    .tech-grid { display: flex; flex-direction: column-reverse; }
    .section { padding: 60px 20px; }
    .gallery-grid { grid-template-columns: 1fr; }
}

/* --- YÜKLEME ÖNİZLEME (PREVIEW) AYARI --- */
/* Dosya seçilince çıkan o devasa resmi kutuya sığdırır */
.upload-container img {
    max-width: 100%;       /* Genişlik kutuyu asla geçmesin */
    max-height: 300px;     /* Yükseklik en fazla 300px olsun (Ekranı kaplamasın) */
    object-fit: contain;   /* Resmi sündürmeden orantılı sığdır */
    border-radius: 12px;   /* Köşeleri oval yap */
    margin-top: 20px;      /* Yazıdan biraz uzaklaşsın */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Şık bir gölge ver */
    display: block;        /* Ortalamak için blok yap */
    margin-left: auto;     
    margin-right: auto;
}

/* admin.css en alta ekle */
.val-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-input {
    width: 80px;
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: right;
    background: #fff;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.mini-input:focus {
    border-color: #F5D300;
    background: #FFFBE6;
}

/* Koyu renkli bölüm (Kasa) için input ayarı */
.dark-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}
.dark-input:focus {
    background: rgba(255,255,255,0.2);
    border-color: #F5D300;
}