@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-body: #F8F9FA;
    --bg-card: #FFFFFF;
    --primary: #1A1A1A;
    --accent: #0066FF;
    --border: #E9ECEF;
    --text-main: #2D3436;
    --text-muted: #6C757D;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding-bottom: 50px;
}

.container { max-width: 1100px; margin: 0 auto; }

/* --- Fixed Modern Header --- */
.main-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 15px;
    z-index: 1000;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.main-header h1 { font-size: 1.2rem; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.main-header h1 a { color: var(--primary); text-decoration: none; }
.main-header h1 span { color: var(--accent); }

.header-search { flex-grow: 1; max-width: 450px; margin: 0 20px; position: relative; }
.header-search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #F1F3F5;
    font-size: 0.9rem;
}

/* --- Navigation & Buttons --- */
nav { display: flex; align-items: center; gap: 10px; }
.button {
    padding: 9px 16px;
    border-radius: 11px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1;
}
.button-primary { background: var(--primary); color: white; }
.button-secondary { background: white; color: var(--text-main); border: 1px solid var(--border); }
.button-danger { background: #fee2e2; color: #dc2626; }

/* --- Admin Tabs --- */
.admin-nav-tabs {
    display: inline-flex;
    background: #E9ECEF;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    gap: 4px;
}
.tab-link {
    padding: 8px 18px;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
}
.tab-link.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* --- Form Tasarımı (Hizalama Düzeltildi) --- */
.form-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 1.5rem;
}
.form-group { display: flex; flex-direction: column; }
.form-group label { margin-bottom: 8px; font-weight: 600; font-size: 0.85rem; color: var(--text-main); }

/* Şifre alanı dahil tüm inputlar burada eşitlendi */
input[type="text"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    height: 42px; /* Kesin yükseklik */
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #F8F9FA;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    color: var(--text-main);
    display: block;
}

input:focus, select:focus {
    background: #FFF;
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.05);
}

/* --- Tables --- */
.table-wrapper {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; }
th { background: #F8F9FA; padding: 14px; font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); text-align: left; border-bottom: 1px solid var(--border); letter-spacing: 0.5px; }
td { padding: 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--text-main); vertical-align: middle; }
.text-right { text-align: right; }

/* --- Mesajlar --- */
.message { padding: 12px 16px; border-radius: 10px; margin-bottom: 1.5rem; font-size: 0.9rem; font-weight: 500; }
.error-message { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.success-message { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }

/* --- BLUR EFEKTİ --- */
.purchase-price-col { transition: filter 0.3s ease, opacity 0.3s ease; }
.purchase-price-col.blurred {
    filter: blur(6px) !important;
    opacity: 0.3;
    user-select: none;
}

@media (max-width: 768px) {
    .main-header { flex-direction: column; padding: 12px; border-radius: 0; }
    .header-search { width: 100%; margin: 10px 0; }
    .form-grid { grid-template-columns: 1fr; }
}

/* admin.php ile aynı input ve buton standartları */
input[type="password"] {
    width: 100%;
    height: 42px;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #F8F9FA;
    font-family: inherit;
    font-size: 0.95rem;
}

.badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 8px;
    background: #eee;
    border-radius: 6px;
    color: var(--text-muted);
}
