/* ============ BabyMall — Yönetim Paneli ============ */
:root {
  --ink: #14284a;
  --navy: #14284a;
  --bg: #f2f4f9;
  --card: #fff;
  --line: #e4e8f1;
  --muted: #64708a;
  --gold: #ec008c;
  --gold-2: #ff3ba7;
  --gold-grad: linear-gradient(135deg, #ff3ba7, #ec008c);
  --danger: #e5484d;
  --font-head: 'Sora', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); }
.muted { color: var(--muted); font-size: 13.5px; }

.ico { width: 20px; height: 20px; flex-shrink: 0; display: inline-block; vertical-align: -4px; }
.ico-xs { width: 14px; height: 14px; vertical-align: -2px; }
.ico-sm { width: 17px; height: 17px; vertical-align: -3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-head); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 11px; border: 2px solid transparent;
  cursor: pointer; transition: transform .13s, box-shadow .13s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn-gold { background: var(--gold-grad); color: #fff; box-shadow: 0 4px 14px rgba(236,0,140,.3); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-danger { background: #fdecec; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost-dark { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-block { width: 100%; }

/* ---------- Giriş ---------- */
.login-body {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(800px 400px at 80% -10%, rgba(236,0,140,.25), transparent 60%),
    linear-gradient(160deg, #0d1424, #16233f);
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 22px;
  padding: 40px 36px; box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.login-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 19px; margin-bottom: 6px; }
.login-card h1 { font-size: 24px; margin-bottom: 22px; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.login-card input {
  padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: var(--font-body); font-size: 15px;
}
.login-card input:focus { outline: none; border-color: var(--gold); }
.login-back { display: block; text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.login-back:hover { color: var(--gold); }

.brand-mark { display: block; width: 36px; height: 36px; flex-shrink: 0; }
.brand-img { width: 100%; height: 100%; display: block; }

/* ---------- Kabuk ---------- */
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(175deg, #0d1424, #131e36); color: #aeb8cd;
  display: flex; flex-direction: column; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 18px; padding: 8px 10px 24px; }
.side-brand .brand-text { color: #ffffff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.brand-x { color: var(--gold-2); }
.login-brand .brand-x { color: var(--gold); }
.stat-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 560px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 14.5px; transition: background .12s, color .12s; }
.side-nav a .ico { opacity: .75; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.on { background: var(--gold-grad); color: #fff; }
.side-nav a.on .ico { opacity: 1; }
.side-foot { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }
.side-foot a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }
.side-foot a:hover { background: rgba(255,255,255,.07); color: #fff; }

.admin-main { padding: 30px 36px 60px; max-width: 1100px; }
.admin-head { margin-bottom: 24px; }
.admin-head h1 { font-size: 26px; font-weight: 800; }

/* ---------- İstatistik ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; display: flex; align-items: center; gap: 14px;
}
.stat-hot { border-color: rgba(236,0,140,.5); background: linear-gradient(140deg, #fff0f7, #fff); }
.stat-ico {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(140deg, rgba(236,0,140,.16), rgba(236,0,140,.06));
  border: 1px solid rgba(236,0,140,.28); color: var(--gold);
}
.stat-card strong { display: block; font-family: var(--font-head); font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat-card span { font-size: 13px; color: var(--muted); }

/* ---------- Panel kartı ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 28px; margin-bottom: 26px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.panel-head h2 .ico { color: var(--gold); }
.panel > .muted { margin-bottom: 16px; }

/* ---------- Tablo ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-family: var(--font-head); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  padding: 10px 12px; border-bottom: 2px solid var(--line);
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fafbfe; }
.td-img img { width: 64px; height: 46px; object-fit: contain; background: #eef1f8; border-radius: 9px; padding: 4px; }
.td-actions { display: flex; gap: 8px; align-items: center; }
.td-actions form { display: inline; }

.badge {
  display: inline-block; font-family: var(--font-head); font-size: 11.5px; font-weight: 700;
  padding: 4px 11px; border-radius: 100px;
}
.st-yeni { background: #fff3d6; color: #9a6b00; }
.st-onaylandi { background: #e5f7ec; color: #157347; }
.st-kargoda { background: #e3edff; color: #1d4ed8; }
.st-tamamlandi { background: #e9e9f9; color: #4338ca; }
.st-iptal { background: #fdecec; color: var(--danger); }
.st-featured { background: var(--gold-grad); color: #fff; }

.status-select {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 7px 10px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
}

/* ---------- Ana kapatma çubuğu ---------- */
.lockbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 20px; margin-bottom: 22px;
}
.lockbar-on { background: #fff5fa; border-color: rgba(236,0,140,.4); }
.lockbar-info { display: flex; align-items: center; gap: 14px; }
.lockbar-info > .ico { width: 30px; height: 30px; color: var(--success); }
.lockbar-on .lockbar-info > .ico { color: var(--gold); }
.lockbar-info div { display: flex; flex-direction: column; line-height: 1.35; }
.lockbar-info strong { font-family: var(--font-head); font-size: 15px; }
.lockbar-info span { font-size: 12.5px; color: var(--muted); }

/* ---------- Uyarı kartları ---------- */
.warn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.warn-card {
  display: flex; align-items: center; gap: 13px;
  background: #fff5fa; border: 1px solid rgba(236,0,140,.3); border-radius: 14px;
  padding: 15px 17px; transition: transform .13s, box-shadow .13s;
}
.warn-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(236,0,140,.14); }
.warn-card > .ico { color: var(--gold); width: 25px; height: 25px; }
.warn-card div { display: flex; flex-direction: column; line-height: 1.3; }
.warn-card strong { font-size: 13.5px; }
.warn-card span { font-size: 12px; color: var(--muted); }

/* ---------- Filtre çubuğu ---------- */
.admin-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-filter input[type=search] {
  flex: 1; min-width: 200px; padding: 9px 13px; border: 1.5px solid var(--line);
  border-radius: 10px; font-family: var(--font-body); font-size: 13.5px; background: #fbfcfe;
}
.admin-filter input[type=search]:focus { outline: none; border-color: var(--gold); }
.admin-filter select {
  padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; background: #fff; cursor: pointer;
}

/* ---------- Sekmeler ---------- */
.tab-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab {
  padding: 8px 14px; border-radius: 100px; border: 1.5px solid var(--line);
  font-weight: 600; font-size: 13px; color: #414d66; transition: all .12s;
}
.tab:hover { border-color: var(--gold); color: var(--gold); }
.tab-on { background: var(--gold-grad); border-color: transparent; color: #fff; }
.tab-on:hover { color: #fff; }

/* ---------- Hızlı değiştirme ---------- */
.toggle {
  font-family: var(--font-head); font-size: 12px; font-weight: 700; cursor: pointer;
  padding: 6px 13px; border-radius: 100px; border: 1.5px solid var(--line);
  background: #f4f5f8; color: var(--muted); transition: all .12s;
}
.toggle:hover { border-color: var(--gold); color: var(--gold); }
.toggle-on { background: #e5f7ec; border-color: #12a150; color: #12a150; }
.toggle-on:hover { border-color: #12a150; color: #0d7a3c; }

.row-tags { display: flex; gap: 8px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.tag-mini { background: #f0f2f7; color: #414d66; }
.status-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.status-chips .badge { cursor: pointer; }

/* ---------- Hızlı linkler ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.quick {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--card); border: 1.5px dashed var(--line); border-radius: 14px;
  padding: 18px; font-weight: 600; font-size: 14.5px; text-align: center; transition: all .15s;
}
.quick:hover { border-color: var(--gold); color: var(--gold); background: #fff5fa; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; flex: 1; }
.form label.grow { flex: 2; }
.form input, .form select, .form textarea {
  padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 11px;
  font-family: var(--font-body); font-size: 14.5px; background: #fbfcfe;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
.form-row { display: flex; gap: 16px; }
.form-section { font-size: 15px; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-checks { display: flex; gap: 24px; flex-wrap: wrap; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--gold); }
.form-foot { display: flex; gap: 12px; margin-top: 6px; }
.form-img-preview { width: 200px; background: #eef1f8; border-radius: 12px; padding: 12px; }

/* dinamik satırlar (telefon / iban) */
.dyn-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.dyn-row input, .dyn-row select {
  padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: 14px; background: #fbfcfe;
}
.dyn-row input:focus { outline: none; border-color: var(--gold); }
.dyn-row input[name="phone_label"], .dyn-row input[name="iban_bank"] { width: 190px; }
.dyn-row input[name="phone_number"], .dyn-row input[name="iban_holder"] { width: 210px; }
.iban-input { flex: 1; min-width: 280px; letter-spacing: .4px; }

/* ---------- Mesajlar ---------- */
.msg-list { display: flex; flex-direction: column; gap: 14px; }
.msg { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.msg-unread { border-color: rgba(236,0,140,.6); background: #fff5fa; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.msg-meta { display: flex; gap: 16px; font-size: 13.5px; margin-bottom: 8px; }
.msg-meta a { display: inline-flex; align-items: center; gap: 6px; color: #1d4ed8; }
.msg p { font-size: 14.5px; margin-bottom: 12px; }
.msg-actions { display: flex; gap: 10px; }

.alert { display: flex; align-items: center; gap: 10px; padding: 13px 17px; border-radius: 12px; font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.alert-ok { background: #e5f7ec; color: #157347; }
.alert-err { background: #fdecec; color: var(--danger); }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .side-brand { padding: 0 8px 0 0; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot { flex-direction: row; border: 0; padding: 0; }
  .admin-main { padding: 22px 18px 50px; }
  .stat-grid, .quick-grid, .warn-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { flex-direction: column; }
  .table { display: block; overflow-x: auto; }
}
