/* Mert Yapı Dekorasyon — Yönetim Paneli Stillereri */
:root {
  --navy-950: #070d1b;
  --navy-900: #0b1220;
  --navy-800: #101a2e;
  --navy-700: #16233c;
  --navy-600: #1d2d4d;
  --amber: #f59e0b;
  --amber-dark: #e8890c;
  --wa: #25d366;
  --light: #f2f5f9;
  --light-2: #e9edf4;
  --line: #e1e7f0;
  --text: #1d2739;
  --muted: #66718a;
  --danger: #dc3545;
  --ok: #1e9e56;
  --radius: 14px;
  --font: 'Inter', 'Segoe UI', system-ui, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--light); color: var(--text); font-size: 15px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
svg { vertical-align: -0.22em; }

/* ---------- Shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-content { padding: 28px 30px 60px; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 250px; background: var(--navy-900); color: #c3cddd; flex: 0 0 250px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-brand { display: flex; gap: 12px; align-items: center; padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.side-mark {
  width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--amber), #e8590c);
  color: #fff; font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(232,137,12,.35);
}
.side-brand strong { color: #fff; font-size: .95rem; display: block; line-height: 1.25; }
.side-brand small { color: var(--amber); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.side-nav { padding: 16px 12px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px;
  font-weight: 600; font-size: .9rem; margin-bottom: 3px; color: #b7c2d6; position: relative; transition: background .18s, color .18s;
}
.side-nav a svg { width: 18px; height: 18px; opacity: .85; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(245,158,11,.16); color: #ffd28a; }
.side-nav a.active svg { opacity: 1; }
.side-nav a.logout { color: #f87171; }
.side-nav a.logout:hover { background: rgba(239,68,68,.12); color: #fca5a5; }
.side-sep { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #61708c; padding: 16px 14px 8px; }
.badge-dot {
  margin-left: auto; background: var(--amber); color: #fff; font-style: normal; font-size: .68rem; font-weight: 800;
  min-width: 20px; text-align: center; padding: 2px 7px; border-radius: 999px;
}
.side-foot { padding: 16px 20px; font-size: .72rem; color: #5b6a86; border-top: 1px solid rgba(255,255,255,.07); }

/* ---------- Topbar ---------- */
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--line); padding: 14px 30px;
  display: flex; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 50;
}
.topbar-title h1 { font-size: 1.15rem; font-weight: 700; color: var(--navy-900); }
.topbar-title p { font-size: .82rem; color: var(--muted); }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.u-info b { display: block; font-size: .88rem; line-height: 1.2; }
.u-info small { color: var(--muted); font-size: .75rem; }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; align-items: center; justify-content: center; color: var(--navy-800); }

/* ---------- Kartlar ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 22px; box-shadow: 0 1px 3px rgba(13,22,40,.05);
}
.card h3 { font-size: 1.02rem; margin-bottom: 14px; color: var(--navy-900); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { margin-bottom: 0; }
.muted { color: var(--muted); }

/* ---------- Stat kartları ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px;
  display: flex; flex-direction: column; gap: 4px; transition: transform .18s, box-shadow .18s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(13,22,40,.1); }
.stat-card .s-ico {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(245,158,11,.12); color: var(--amber-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.stat-card b { font-size: 1.45rem; font-weight: 800; color: var(--navy-900); line-height: 1; }
.stat-card span { font-size: .78rem; color: var(--muted); font-weight: 600; }

/* ---------- Tablo ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); font-weight: 700;
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .9rem; }
.table tr:last-child td { border-bottom: 0; }
.table tr.unread td { background: rgba(245,158,11,.05); }
.table tbody tr:hover td { background: var(--light); }
.table .thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--light-2); color: var(--muted); }
.pill-warn { background: rgba(245,158,11,.15); color: var(--amber-dark); }
.pill-ok { background: rgba(30,158,86,.12); color: var(--ok); }
.pill-danger { background: rgba(220,53,69,.12); color: var(--danger); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 11px;
  font-weight: 600; font-size: .88rem; cursor: pointer; border: 1.6px solid transparent; transition: all .18s;
  font-family: var(--font);
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(96deg, var(--amber), var(--amber-dark)); color: #fff; box-shadow: 0 6px 16px rgba(232,137,12,.3); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--navy-700); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); }
.btn-ghost { background: none; color: var(--amber-dark); font-weight: 700; font-size: .85rem; }
.btn-ghost:hover { text-decoration: underline; }
.btn-mini {
  display: inline-block; padding: 5px 12px; border-radius: 8px; background: var(--light-2);
  font-size: .78rem; font-weight: 700; color: var(--text);
}
.btn-mini:hover { background: var(--line); }
.btn-sm { padding: 7px 13px; font-size: .8rem; }
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Formlar ---------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=password], .field input[type=email], .field input[type=tel],
.field input[type=number], .field input[type=url], .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1.6px solid var(--line); border-radius: 11px;
  font-family: var(--font); font-size: .92rem; outline: none; background: #fbfcfe; transition: border-color .18s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--amber); background: #fff; }
.field .hint { font-size: .76rem; color: var(--muted); margin-top: 4px; }
.field-inline { display: flex; gap: 12px; }
.field-inline .field { flex: 1; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.checkbox-row { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: .88rem; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--amber); }

/* görsel yükleme alanı */
.img-picker { display: flex; gap: 16px; align-items: center; }
.img-preview {
  width: 130px; height: 90px; border-radius: 11px; border: 1.6px dashed var(--line); background: var(--light);
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; color: var(--muted);
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview svg { width: 22px; height: 22px; }
.file-label {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
  border: 1.6px solid var(--line); background: #fff; font-weight: 600; font-size: .84rem; cursor: pointer;
}
.file-label input { display: none; }
.file-label svg { width: 16px; height: 16px; color: var(--amber-dark); }

/* ---------- Tablar ---------- */
.tab-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 2px solid var(--line); padding-bottom: 0; }
.tab-nav a, .tab-nav button {
  padding: 11px 18px; font-weight: 600; font-size: .88rem; color: var(--muted); background: none; border: 0;
  border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; font-family: var(--font);
}
.tab-nav a.active, .tab-nav button.active { color: var(--navy-900); border-bottom-color: var(--amber); }

/* ---------- Alert ---------- */
.alert { padding: 13px 17px; border-radius: 11px; font-size: .9rem; font-weight: 500; margin-bottom: 18px; }
.alert-success { background: #e7f7ee; color: #157347; border: 1px solid #b7e4c7; }
.alert-error { background: #fdebec; color: #b02a37; border: 1px solid #f5c2c7; }
.alert-warn { background: #fff6e5; color: #996c00; border: 1px solid #ffe08a; }

/* ---------- Todo listesi ---------- */
.todo-list li { padding: 10px 0 10px 26px; border-bottom: 1px dashed var(--line); position: relative; font-size: .92rem; }
.todo-list li:last-child { border-bottom: 0; }
.todo-list li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 12px; height: 12px; border-radius: 50%; border: 2.6px solid var(--amber); }
.todo-list a { color: var(--amber-dark); font-weight: 600; }
.todo-list a:hover { text-decoration: underline; }

/* ---------- Galeri (proje görselleri) ---------- */
.gallery-manage { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.gallery-item { position: relative; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item form { position: absolute; top: 7px; right: 7px; }
.gallery-item button {
  width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(11,18,32,.75); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.gallery-item button svg { width: 14px; height: 14px; }

/* ---------- Mesaj detayı ---------- */
.msg-meta { display: grid; grid-template-columns: 150px 1fr; row-gap: 10px; background: var(--light); padding: 18px 20px; border-radius: 11px; margin-bottom: 18px; font-size: .9rem; }
.msg-meta dt { color: var(--muted); font-weight: 600; }
.msg-body { font-size: .98rem; white-space: pre-wrap; }

/* ---------- Login ---------- */
.login-body {
  background: radial-gradient(800px 500px at 85% -10%, rgba(245,158,11,.25), transparent 55%), var(--navy-900);
  display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--navy-800); border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px; padding: 36px 32px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.login-brand strong { color: #fff; display: block; font-size: 1.05rem; }
.login-brand small { color: var(--amber); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.login-card .field label { color: #c3cddd; }
.login-card .field input {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff;
}
.login-card .field input:focus { border-color: var(--amber); background: rgba(255,255,255,.09); }
.btn-login {
  width: 100%; margin-top: 8px; padding: 13px; border: 0; border-radius: 11px; cursor: pointer;
  background: linear-gradient(96deg, var(--amber), var(--amber-dark)); color: #fff; font-weight: 700; font-size: .95rem;
}
.btn-login:disabled { opacity: .6; cursor: not-allowed; }
.login-back { display: block; text-align: center; margin-top: 18px; color: #93a0b8; font-size: .84rem; }
.login-back:hover { color: #fff; }
.login-card .alert { margin-bottom: 18px; }

/* ---------- Sayfalama yok: tablo uzunsa scroll ---------- */
.table-wrap { overflow-x: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-manage { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; z-index: 200; transition: left .25s; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .sidebar.open { left: 0; }
  .burger { display: flex; }
  .admin-content { padding: 20px 18px 50px; }
  .form-grid2, .form-grid3, .field-inline { grid-template-columns: 1fr; display: grid; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
