/* =========================================
   style.css - MODERN LIGHT & MOBİL UYUMLU
   ========================================= */
:root {
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    
    --primary: #4f46e5;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --accent-purple: #8b5cf6;

    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
    --radius: 20px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px; /* Masaüstü boşlukları */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    box-sizing: border-box;
}

/* --- ANA KONTEYNER --- */
.container {
    background-color: transparent;
    width: 100%;
    max-width: 1100px;
    margin-bottom: 80px;
}

/* Başlık Alanı */
.header-area {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    border-bottom: 4px solid var(--primary);
}

h1 { margin: 0; font-size: 1.8em; color: var(--text-main); font-weight: 700; }
.user-badge { background: #eef2ff; color: var(--primary); padding: 8px 15px; border-radius: 30px; font-weight: 600; font-size: 0.9em; }

/* --- İSTATİSTİK KARTLARI (ÜST) --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.dash-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}
.dash-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 6px;
    background: linear-gradient(90deg, var(--primary), transparent);
}
.dash-card:hover { transform: translateY(-7px); }
.dash-number { display: block; font-size: 3em; font-weight: 800; margin-bottom: 5px; }
.dash-title { font-size: 0.9em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; letter-spacing: 1px; }

/* --- MENÜ KUTULARI --- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.menu-button {
    background: var(--bg-card);
    padding: 35px 25px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
    transition: 0.3s;
    border-left: 8px solid transparent;
}
.btn-black { border-left-color: #1f2937; }
.btn-green { border-left-color: var(--accent-green); }
.btn-blue { border-left-color: var(--primary); }
.btn-purple { border-left-color: var(--accent-purple); }
.btn-orange { border-left-color: var(--accent-orange); }
.btn-red { border-left-color: var(--accent-red); }

.menu-button:hover { transform: scale(1.02); background: #fff; }

/* --- GENEL BUTONLAR VE TABLOLAR --- */
.back-link { background: #1f2937; color: white; padding: 10px 25px; border-radius: 50px; text-decoration: none; font-weight: bold; font-size: 0.9em; }
.logout-btn { color: var(--accent-red); font-weight: bold; text-decoration: none; border: 2px solid rgba(239, 68, 68, 0.1); padding: 8px 20px; border-radius: 30px; }

/* Hata Bildir (Sağ Alt) */
.bug-report-button {
    position: fixed; bottom: 30px; right: 30px;
    background: linear-gradient(135deg, var(--accent-red), #c0392b);
    color: white; width: 60px; height: 60px; border-radius: 50%;
    border: none; font-size: 24px; font-weight: bold; cursor: pointer;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
    z-index: 9999;
}

/* Tablo Alanı */
.container-table { background: white; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow-soft); width:100%; margin:0 auto;}
table { width: 100%; border-collapse: collapse; margin-top:20px; min-width: 600px;} /* Min-width tablo kaydırma için */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; } /* Mobilde kaydırma */
th { background: #f9fafb; color: #6b7280; padding: 15px; text-align: left; font-size: 0.85em; text-transform: uppercase; }
td { padding: 15px; border-bottom: 1px solid #f3f4f6; color: #374151; }

/* Formlar */
input, select, textarea { width: 100%; padding: 15px; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 12px; font-size: 1em; box-sizing: border-box; margin-bottom: 15px;}
button[type="submit"] { background: var(--primary); color: white; padding: 18px; border-radius: 12px; width: 100%; font-weight: bold; border:none; cursor: pointer; font-size: 1.1em;}

.success { background: #dcfce7; color: #166534; padding: 15px; border-radius: 12px; margin-bottom: 20px; text-align: center; border: 1px solid #bbf7d0;}
.error { background: #fee2e2; color: #991b1b; padding: 15px; border-radius: 12px; margin-bottom: 20px; text-align: center; border: 1px solid #fecaca;}

/* Modal */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 10000; justify-content: center; align-items: center; }
.modal-content { background: white; padding: 30px; border-radius: 20px; width: 90%; max-width: 400px; position: relative; }
.modal-close { position: absolute; top: 15px; right: 20px; font-size: 30px; cursor: pointer; color: #aaa; }

/* =======================================================
   MOBİL İÇİN ÖZEL AYARLAR (ANDROID / IOS)
   ======================================================= */
/* =======================================================
   MOBİL İÇİN ÖZEL AYARLAR (GÜNCELLENDİ: 2 SÜTUNLU YAPI)
   ======================================================= */
@media (max-width: 768px) {
    body {
        padding: 15px; /* Kenar boşluklarını daralt */
    }
    
    .header-area {
        flex-direction: column; 
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    h1 { font-size: 1.5em; }
    
    /* ÖNEMLİ: İstatistikler ve Menü mobilde de YAN YANA (2'li) olsun */
    .dashboard-grid, .menu-grid {
        grid-template-columns: 1fr 1fr; /* Ekranı 2'ye böl */
        gap: 10px; /* Aralarındaki boşluğu azalt */
    }
    
    /* Kartların içindeki yazıları mobile göre küçült */
    .dash-card { padding: 15px; }
    .dash-number { font-size: 2em; margin-bottom: 0; }
    .dash-title { font-size: 0.7em; }
    
    /* Menü Butonlarını mobilde daha derli toplu yap */
    .menu-button {
        padding: 20px 10px; /* İç boşluğu azalt */
        font-size: 0.9em;   /* Yazıyı biraz küçült */
        flex-direction: column; /* İkon ve yazıyı alt alta al */
        text-align: center;
        justify-content: center;
        gap: 8px;
        min-height: 100px; /* Kutuların boyunu eşitle */
    }
    
    /* Mobilde butonlardaki sağ ok işaretini gizle (yer kaplamasın) */
    .menu-button::after { display: none; }

    /* Tablo sayfası */
    .container-table { padding: 15px; }
    th, td { padding: 10px; font-size: 0.8em; }
    
    /* Hata butonunu biraz küçült */
    .bug-report-button {
        width: 50px; height: 50px; font-size: 20px; bottom: 20px; right: 20px;
    }
}