/* ============================================================
   BLOG ADMIN CSS — blog-admin.css
   Tüm sınıflar ba- prefix'li, mevcut layout CSS'ini ezmez.
   public/css/blog-admin.css olarak kopyalayın.
   ============================================================ */

.blog-admin-wrap {
  max-width: 1300px;
  font-family: inherit;
}

/* ── Sayfa Başlığı ──────────────────────────────────────── */
.ba-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.ba-page-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a120b;
  margin: 0;
}
.ba-page-sub {
  font-size: 13px;
  color: #6b5e50;
  margin: 4px 0 0;
}

/* ── İstatistik satırı ──────────────────────────────────── */
.ba-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ba-stat {
  background: #fff;
  border: 1px solid #ddd5c8;
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
}
.ba-stat-val { font-size: 22px; font-weight: 700; color: #1a120b; }
.ba-stat-lbl { font-size: 12px; color: #6b5e50; }

/* ── Alt Navigasyon ─────────────────────────────────────── */
.ba-sub-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  border-bottom: 2px solid #ede8e0;
  padding-bottom: 0;
}
.ba-sub-nav-item {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #6b5e50;
  text-decoration: none;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  transition: all .2s;
  margin-bottom: -2px;
}
.ba-sub-nav-item:hover { color: #1a3a2e; background: #f9f5ef; }
.ba-sub-nav-item.active {
  color: #1a3a2e;
  background: #fff;
  border-color: #ddd5c8;
  border-bottom-color: #fff;
  font-weight: 600;
}

/* ── Alert ──────────────────────────────────────────────── */
.ba-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.ba-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.ba-alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Butonlar ───────────────────────────────────────────── */
.ba-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a3a2e;
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
}
.ba-btn-primary:hover { background: #2d6349; color: #fff; }
.ba-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ede8e0;
  color: #3d3228;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
}
.ba-btn-secondary:hover { background: #ddd5c8; }
.ba-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #6b5e50;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid #ddd5c8;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.ba-btn-ghost:hover { background: #f9f5ef; color: #3d3228; }
.ba-w-full { width: 100%; justify-content: center; }

/* ── Filtre Barı ────────────────────────────────────────── */
.ba-filter-bar { margin-bottom: 16px; }
.ba-filter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ba-filter-input,
.ba-filter-select {
  padding: 8px 12px;
  border: 1px solid #ddd5c8;
  border-radius: 8px;
  font-size: 13.5px;
  color: #3d3228;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.ba-filter-input { min-width: 220px; }
.ba-filter-input:focus,
.ba-filter-select:focus { border-color: #2d6349; }

/* ── Tablo ──────────────────────────────────────────────── */
.ba-table-wrap {
  background: #fff;
  border: 1px solid #ddd5c8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(26,58,46,.07);
}
.ba-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.ba-table thead th {
  background: #f9f5ef;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #6b5e50;
  border-bottom: 1px solid #ddd5c8;
  white-space: nowrap;
}
.ba-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #ede8e0;
  vertical-align: middle;
}
.ba-table tbody tr:last-child td { border-bottom: none; }
.ba-table tbody tr:hover td { background: #fdfbf8; }
.ba-table-link { color: #1a3a2e; font-weight: 600; text-decoration: none; }
.ba-table-link:hover { color: #b8960c; }
.ba-text-muted { color: #6b5e50 !important; font-size: 13px; }
.ba-empty-row { text-align: center; padding: 40px !important; color: #6b5e50; font-style: italic; }

.ba-post-title-cell { display: flex; align-items: center; gap: 10px; }
.ba-post-emoji { font-size: 22px; flex-shrink: 0; }

/* Kategori chip */
.ba-cat-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}

/* Durum badge */
.ba-status-btn {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.ba-status-published { background: #dcfce7; color: #166534; }
.ba-status-draft     { background: #fef9c3; color: #854d0e; }
.ba-status-archived  { background: #f1f5f9; color: #475569; }
.ba-status-btn.ba-status-published:hover { background: #bbf7d0; }
.ba-status-btn.ba-status-draft:hover     { background: #fef08a; }

/* Aksiyon butonları */
.ba-action-btns { display: flex; align-items: center; gap: 4px; }
.ba-icon-btn {
  width: 30px; height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background .15s;
  text-decoration: none;
}
.ba-icon-btn:hover { background: #ede8e0; }
.ba-icon-btn.ba-icon-danger:hover { background: #fee2e2; }

/* Sayfalandırma */
.ba-pagination {
  padding: 16px;
  border-top: 1px solid #ede8e0;
}

/* ── Kart ────────────────────────────────────────────────── */
.ba-card {
  background: #fff;
  border: 1px solid #ddd5c8;
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(26,58,46,.06);
}
.ba-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a120b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ede8e0;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ── Form Elemanları ────────────────────────────────────── */
.ba-form-group { margin-bottom: 14px; }
.ba-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #3d3228;
  margin-bottom: 6px;
}
.ba-req { color: #dc2626; }
.ba-char-count { font-size: 12px; color: #6b5e50; font-weight: 400; }
.ba-input,
.ba-select,
.ba-textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #ddd5c8;
  border-radius: 8px;
  font-size: 14px;
  color: #1a120b;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.ba-input:focus,
.ba-select:focus,
.ba-textarea:focus {
  border-color: #2d6349;
  box-shadow: 0 0 0 3px rgba(45,99,73,.1);
}
.ba-textarea { resize: vertical; min-height: 80px; }
.ba-file-input {
  display: block;
  width: 100%;
  font-size: 13px;
  color: #3d3228;
  padding: 8px 0;
}
.ba-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: #3d3228;
}
.ba-check input { width: 16px; height: 16px; cursor: pointer; accent-color: #1a3a2e; }

/* ── Form Layout (create/edit) ──────────────────────────── */
.ba-form-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.ba-form-main {}
.ba-form-side {}

/* ── Etiket Listesi ─────────────────────────────────────── */
.ba-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 160px;
  overflow-y: auto;
  padding: 4px;
}
.ba-tag-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #f9f5ef;
  border: 1px solid #ddd5c8;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.ba-tag-item:hover { background: #ede8e0; }
.ba-tag-item input[type="checkbox"] { width: 13px; height: 13px; accent-color: #1a3a2e; }
.ba-tag-add { display: flex; gap: 8px; }
.ba-tag-add .ba-input { flex: 1; }

/* ── Mevcut görsel ──────────────────────────────────────── */
.ba-current-img img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  max-height: 140px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .ba-form-layout { grid-template-columns: 1fr; }
  .ba-form-side   { order: -1; }
}
@media (max-width: 600px) {
  .ba-filter-form { flex-direction: column; align-items: stretch; }
  .ba-filter-input, .ba-filter-select { width: 100%; }
  .ba-table { font-size: 12px; }
  .ba-table thead th, .ba-table tbody td { padding: 8px 10px; }
}
