/* =========================================
   1. GENEL AYARLAR (Dark Theme)
   ========================================= */
:root {
    --bg-color: #0f172a;       /* Ana Arka Plan (Gece Mavisi) */
    --card-bg: #1e293b;        /* Kart Rengi */
    --sidebar-bg: #020617;     /* Menü Rengi */
    --text-main: #f1f5f9;      /* Ana Yazı Rengi */
    --text-muted: #94a3b8;     /* Sönük Yazı */
    --accent: #6366f1;         /* Ana Vurgu (Neon Mor) */
    --accent-hover: #4f46e5;
    --success: #10b981;        /* Yeşil (Online/Başarılı) */
    --danger: #ef4444;         /* Kırmızı (Sil/Hata) */
    --warning: #f59e0b;        /* Turuncu (Uyarı) */
    --border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Scrollbar Tasarımı */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; transition: 0.2s; }




.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(8px);
    z-index: 1500;
}

/* Sidebar animasyon */
.sidebar {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

.sidebar-user-info{
    padding-left: 5%;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-overlay.active {
    display: block;
}

.desktop-header {
    height: 64px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(148,163,184,0.12);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #e5e7eb;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #e5e7eb;
    cursor: pointer;
}

.profile-menu {
    position: absolute;
    right: 0;
    top: 120%;
    min-width: 220px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    display: none;
    flex-direction: column;
    gap: 6px;
}

.profile-menu .user-email {
    font-size: 0.85rem;
    color: #e5e7eb;
}

.profile-menu .uid {
    font-size: 0.75rem;
    color: #94a3b8;
}

.profile-menu .divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 6px 0;
}

.profile-menu {
    display: none;
}

.profile-menu.open {
    display: flex;
    animation: fadeSlide 0.18s ease;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.app-header {
    height: 64px;
    background: linear-gradient(180deg, #0f172a, #0f172a);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 36px;
}

.app-title {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-box {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.user-box .uid {
    font-family: monospace;
    opacity: 0.7;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo h1 {
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.apk-btn { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid var(--success); }
.apk-btn:hover { background: var(--success); color: white; }

.premium-btn { background: linear-gradient(135deg, #f59e0b, #d97706); color: #000; box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
.premium-btn:hover { transform: scale(1.05); }

.logout-btn { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid var(--danger); }
.logout-btn:hover { background: var(--danger); color: white; }

.hamburger-btn { display: none; background: none; color: white; font-size: 1.5rem; }

/* =========================================
   3. GİRİŞ EKRANI (Login)
   ========================================= */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-box {
    background: var(--card-bg);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.15);
    border: 1px solid var(--border);
    text-align: center;
}

.auth-input {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    background: var(--bg-color);
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    box-sizing: border-box;
}
.auth-input:focus { outline: none; border-color: var(--accent); }

.auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 15px;
}
.auth-btn:hover { background: var(--accent-hover); }

.toggle-text { margin-top: 20px; color: var(--accent); cursor: pointer; }
.toggle-text:hover { text-decoration: underline; }

.pricing-trigger-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
}
.pricing-trigger-btn:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================
   4. DASHBOARD & CİHAZLAR
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.info-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.device-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
}
.device-card:hover { transform: translateY(-5px); border-color: var(--accent); }

.device-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.device-icon { font-size: 1.5rem; }
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }

.btn-manage {
    width: 100%;
    padding: 10px;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: 600;
}

/* =========================================
   5. KONTROL PANELİ (Detay Sayfası)
   ========================================= */
.view-section { display: none; }
.view-section.active { display: block; }

.top-bar { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.btn-back { background: var(--card-bg); color: var(--text-main); padding: 8px 15px; border-radius: 6px; border: 1px solid var(--border); }

.control-panel {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.control-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: 0.2s;
}
.control-btn i { font-size: 1.5rem; margin-bottom: 5px; }
.control-btn:hover { background: var(--accent); border-color: var(--accent); }

.danger-zone { border-color: var(--danger); color: var(--danger); }
.danger-zone:hover { background: var(--danger); color: white; }

.log-box {
    background: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    padding: 15px;
    height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #333;
    font-size: 0.85rem;
}

/* =========================================
   6. MODALLAR (Pop-up)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    color: var(--text-main);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.close-btn, .close-sidebar {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}
.close-btn:hover { color: white; }

/* =========================================
   7. ABONELİK PLANLARI (Pricing)
   ========================================= */
.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.pricing-card {
    background: var(--bg-color);
    padding: 25px;
    border-radius: 12px;
    flex: 1;
    min-width: 250px;
    border: 1px solid var(--border);
    text-align: left;
}

.pricing-card h4 { font-size: 1.2rem; margin: 0 0 10px 0; color: var(--text-muted); }
.pricing-card .price { font-size: 1.8rem; font-weight: bold; margin: 10px 0; color: white; }
.pricing-card ul { padding: 0; list-style: none; color: var(--text-muted); font-size: 0.9rem; }
.pricing-card li { margin-bottom: 8px; }

/* Önerilen (Standart) */
.pricing-card.recommended {
    border: 2px solid var(--accent);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}
.pricing-card.recommended h4 { color: var(--accent); }

/* ES Pro (Gold) */
.pricing-card.pro-gold {
    background: linear-gradient(145deg, #1e1b4b, #312e81);
    border: 2px solid #f59e0b;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}
.pricing-card.pro-gold h4 { color: #f59e0b; }

/* =========================================
   8. MOBİL UYUMLULUK
   ========================================= */
@media (max-width: 768px) {
    .desktop-menu { display: none !important; }
    .header-actions { display: none !important; }
    .profile-dropdown { display: none !important; }
    .profile-menu { display: none !important; }
    .hamburger-btn { display: block; }
    .control-panel { grid-template-columns: 1fr; }
    .panel-sidebar { order: 2; }
    .panel-content { order: 1; margin-bottom: 20px; }
}

/* Sidebar (Mobil Menü) */
.sidebar {
    height: 100%; width: 250px; position: fixed; z-index: 2000; top: 0; right: -250px;
    background-color: var(--sidebar-bg);
    transition: 0.3s; padding-top: 20px; border-left: 1px solid var(--border);
}
.sidebar.active { right: 0; }
.sidebar-header { padding: 0 20px; margin-bottom: 30px; }
.sidebar-item { padding: 15px 20px; border-bottom: 1px solid var(--border); display: block; color: var(--text-main); }
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1500; }
.sidebar-overlay.active { display: block; }

/* =========================================
   9. VERİ LİSTELEME TASARIMI (SMS/Arama)
   ========================================= */

/* Mesaj Kutusu (Kartı) */
.data-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent); /* Sol tarafta mor çizgi */
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
    transition: 0.2s;
}

.data-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Gönderen ve Tarih Kısmı */
.data-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: bold;
}

/* Mesajın Kendisi */
.data-body {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Gelen/Giden Okları İçin Renkler */
.icon-in { color: var(--success); margin-right:5px; } /* Gelen (Yeşil) */
.icon-out { color: var(--warning); margin-right:5px; } /* Giden (Turuncu) */
.icon-missed { color: var(--danger); margin-right:5px; } /* Cevapsız (Kırmızı) */