@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --nav-height: 65px;
    --sidebar-width: 260px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); }

.app-container { display: flex; height: 100vh; overflow: hidden; }

/* Yan Menü */
.sidebar { width: var(--sidebar-width); background-color: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 10; }
.sidebar-brand { padding: 20px; font-size: 1.5rem; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); margin-bottom: 15px; }
.sidebar-brand i { color: var(--primary); }
.nav-item { padding: 12px 20px; text-decoration: none; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 12px; transition: all 0.3s ease; margin: 4px 12px; border-radius: 8px; }
.nav-item:hover, .nav-item.active { background-color: #e0e7ff; color: var(--primary); }

/* Ana İçerik */
.main-content { flex: 1; overflow-y: auto; padding: 30px; }
.top-header { margin-bottom: 30px; }
.header-title h1 { font-size: 1.5rem; color: var(--dark); font-weight: 600; }
.header-title p { color: var(--text-muted); font-size: 0.95rem; margin-top: 5px; }

/* İstatistikler */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: var(--bg-card); padding: 20px; border-radius: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); display: flex; align-items: center; gap: 15px; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.stat-info h3 { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.stat-info p { font-size: 1.5rem; font-weight: 600; color: var(--dark); margin-top: 2px; }

/* Grid & Kartlar */
.content-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }
.card { background: var(--bg-card); border-radius: 12px; box-shadow: var(--shadow-md); border: 1px solid var(--border); overflow: hidden; }
.card-header { padding: 20px; border-bottom: 1px solid var(--border); background: #fdfdfd; }
.card-header h2 { font-size: 1.1rem; color: var(--dark); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }

/* Form */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.9rem; color: var(--dark); }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper i { position: absolute; left: 15px; color: var(--text-muted); }
.input-wrapper input, .input-wrapper select { width: 100%; padding: 12px 12px 12px 40px; border: 1px solid var(--border); border-radius: 8px; outline: none; font-size: 0.95rem; transition: all 0.3s; background: #fff; }
.input-wrapper input:focus, .input-wrapper select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }

/* Butonlar */
.button-group { display: flex; gap: 10px; }
.btn { padding: 10px 18px; border: none; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; transition: all 0.2s; color: white; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { background-color: var(--primary); }
.btn-secondary { background-color: var(--text-muted); }
.btn-info { background-color: #0ea5e9; }
.btn-warning { background-color: var(--warning); color: #fff; }
.btn-danger { background-color: var(--danger); }
.btn-small { padding: 6px 12px; font-size: 0.85rem; border-radius: 6px; }

/* Liste */
.data-list { list-style: none; }
.list-item { display: flex; align-items: center; justify-content: space-between; padding: 16px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; transition: background 0.2s; }
.list-item:hover { background: #f8fafc; }
.item-info strong { display: block; font-size: 1rem; color: var(--dark); margin-bottom: 4px; }
.item-info span { font-size: 0.85rem; color: var(--text-muted); }
.badge { padding: 4px 8px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; margin-right: 8px; }
.badge.aktif { background: #dcfce7; color: #16a34a; }
.badge.pasif { background: #fee2e2; color: #dc2626; }
.item-actions { display: flex; gap: 8px; }

/* Mobil Görünüm */
@media (max-width: 992px) { .content-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    .main-content { padding: 15px; padding-bottom: calc(var(--nav-height) + 20px); }
    .sidebar-brand { display: none; }
    .sidebar { position: fixed; bottom: 0; left: 0; width: 100%; height: var(--nav-height); flex-direction: row; border-right: none; border-top: 1px solid var(--border); padding: 0; background: var(--bg-card); box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
    .nav-item { flex: 1; flex-direction: column; gap: 4px; margin: 0; border-radius: 0; padding: 8px 0; font-size: 0.75rem; justify-content: center; }
    .nav-item i { font-size: 1.2rem; }
    .list-item { flex-direction: column; align-items: flex-start; gap: 15px; }
    .item-actions { width: 100%; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 12px; }
}

/* Adres alanını (textarea) inputlar ile eşitle */
.input-wrapper textarea.custom-textarea {
    width: 100%;
    padding: 12px 12px 12px 40px !important; /* Metni sağa it, ikonun üzerine binmesin */
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    display: block;
    background: #fff;
    transition: all 0.3s;
}

/* Odaklanınca border rengini değiştir (diğerleri gibi) */
.input-wrapper textarea.custom-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* İkonun dikey yerleşimi (3 satıra göre ortala veya yukarı çek) */
.form-group:has(textarea) .input-wrapper i {
    top: 15px; /* İkonu tepeden 15px aşağı indir */
    transform: none; /* Dikey ortalamayı devre dışı bırak */
}