:root { 
    --primary: #1e40af; --secondary: #3b82f6; --bg: #f1f5f9; 
    --sidebar: #1e293b; --text: #334155; --text-light: #94a3b8;
    --danger: #ef4444; --success: #10b981; --warning: #f59e0b;
}
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg); color: var(--text); margin: 0; display: flex; height: 100vh; overflow: hidden; }
.hidden { display: none !important; }

/* GİRİŞ EKRANI */
#login-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100vh; background: #e2e8f0; }
.login-box { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); width: 100%; max-width: 400px; }
.login-box h1 { text-align: center; color: var(--sidebar); margin-bottom: 20px; font-size: 24px; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #cbd5e1; border-radius: 6px; box-sizing: border-box; }
.login-box button { width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 16px; }

/* ANA UYGULAMA DÜZENİ */
#app-screen { display: flex; width: 100%; height: 100%; }

/* SIDEBAR */
.sidebar { width: 250px; background-color: var(--sidebar); color: white; display: flex; flex-direction: column; }
.sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid #334155; }
.sidebar-header h2 { margin: 0; font-size: 20px; color: #f8fafc; }
.sidebar-menu { list-style: none; padding: 0; margin: 0; flex-grow: 1; }
.sidebar-menu li { padding: 15px 20px; cursor: pointer; border-bottom: 1px solid #334155; display: flex; align-items: center; gap: 10px; color: #cbd5e1; transition: 0.2s; }
.sidebar-menu li:hover, .sidebar-menu li.active { background-color: var(--primary); color: white; border-left: 4px solid var(--secondary); }
.sidebar-footer { padding: 15px; border-top: 1px solid #334155; }

/* MAIN CONTENT */
.main-content { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; background-color: var(--bg); }
.topbar { background: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.topbar h2 { margin: 0; font-size: 18px; color: var(--text); }
.content-area { padding: 30px; }

/* İSTATİSTİK KARTLARI */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: white; padding: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 4px rgba(0,0,0,0.02); border-bottom: 4px solid #cbd5e1; }
.stat-card.blue { border-color: var(--secondary); }
.stat-card.red { border-color: var(--danger); }
.stat-card.green { border-color: var(--success); }
.stat-card.orange { border-color: var(--warning); }
.stat-info h3 { margin: 0; font-size: 24px; color: #1e293b; }
.stat-info p { margin: 5px 0 0 0; font-size: 13px; color: var(--text-light); font-weight: 600; }
.stat-icon { font-size: 28px; color: #94a3b8; }

/* KARTLAR VE LİSTELER */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.service-card { background: white; border: 1px solid #e2e8f0; border-radius: 10px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.service-card.urgent { border-left: 4px solid var(--danger); }
.service-card.normal { border-left: 4px solid var(--secondary); }
.service-card h3 { margin: 0 0 15px 0; color: var(--sidebar); font-size: 18px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }
.service-card p { margin: 8px 0; font-size: 14px; display: flex; justify-content: space-between; }
.card-actions { display: flex; gap: 10px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #f1f5f9; }

/* TABLO VE FORMLAR */
.card-panel { background: white; padding: 25px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); margin-bottom: 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-light); margin-bottom: 5px; }
.form-group input, .form-group select { width: 100%; padding: 10px; border: 1px solid #e2e8f0; border-radius: 6px; box-sizing: border-box; font-family: inherit; }

.btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.2s; display: inline-flex; align-items: center; gap: 5px; justify-content: center; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #1e3a8a; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: #000; }
.btn-secondary { background: #64748b; color: white; }
.search-box { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; margin-bottom: 20px; font-size: 15px; }

/* MODAL */
.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: white; padding: 30px; border-radius: 12px; width: 95%; max-width: 650px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; }

.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 15px;}
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.checkbox-item input { width: auto; margin:0; width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer;}

.data-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.data-table th, .data-table td { padding: 12px; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: 14px; }
.data-table th { background-color: #f8fafc; color: var(--text-light); font-weight: 600; }

/* MOBİL MENÜ (HAMBURGER) BUTONU - varsayılan olarak masaüstünde gizli */
.menu-toggle-btn { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); padding: 4px 8px; }

/* SIDEBAR ARKA PLAN KARARTMASI (mobilde menü açıkken) */
.sidebar-backdrop { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.45); z-index: 1999; }
.sidebar-backdrop.show { display: block; }

/* ===================== MOBİL UYUM (TELEFON EKRANLARI) ===================== */
@media (max-width: 768px) {
    html, body { height: 100%; overflow-x: hidden; }
    body { overflow: hidden; }

    #app-screen { position: relative; }

    .sidebar {
        position: fixed; top: 0; left: 0; height: 100%; width: 250px; max-width: 80vw;
        z-index: 2000; transform: translateX(-100%); transition: transform 0.25s ease;
        box-shadow: 4px 0 15px rgba(0,0,0,0.25);
    }
    .sidebar.sidebar-open { transform: translateX(0); }

    .main-content { width: 100%; }

    .menu-toggle-btn { display: inline-flex; }

    .topbar { padding: 12px 15px; }
    .topbar h2 { font-size: 15px; }
    #user-display { font-size: 13px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .content-area { padding: 15px; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 14px; }
    .stat-info h3 { font-size: 19px; }
    .stat-icon { font-size: 22px; }

    .dashboard-grid { grid-template-columns: 1fr; gap: 15px; }

    .form-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: 1fr; }

    .modal-box { padding: 18px; width: 92%; max-height: 85vh; }
    .modal-header h3 { font-size: 16px; }

    .card-panel { padding: 15px; overflow-x: auto; }
    .data-table { min-width: 560px; }

    .service-card { padding: 15px; }
}

@media (max-width: 380px) {
    .stats-grid { grid-template-columns: 1fr; }
}