/* BKP Admin Panel CSS */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f0f2f5;
  color: #333;
  font-size: 14px;
}

/* ── Layout ────────────────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────── */
.sidebar {
  width: 240px;
  background: #1a2332;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform .25s;
}
.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo .logo-badge {
  width: 38px; height: 38px;
  background: #c0392b;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem; color: #fff; flex-shrink: 0;
}
.sidebar-logo .logo-text { line-height: 1.2; }
.sidebar-logo .logo-text strong { font-size: .85rem; display: block; }
.sidebar-logo .logo-text span { font-size: .72rem; color: #8899aa; }

.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-section-title {
  padding: 14px 20px 6px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #556677;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #99aabb;
  text-decoration: none;
  font-size: .85rem;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { background: rgba(192,57,43,.15); color: #fff; border-left-color: #c0392b; }
.nav-item i { width: 18px; text-align: center; font-size: .9rem; }
.nav-badge {
  margin-left: auto;
  background: #c0392b;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .78rem;
  color: #556677;
}

/* ── Main Content ────────────────────────────────────── */
.main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; }

.topbar {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 1rem; font-weight: 700; color: #1a2332; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user { font-size: .83rem; color: #555; }
.topbar-user strong { color: #1a2332; }
.btn-logout {
  font-size: .78rem; color: #c0392b; text-decoration: none;
  border: 1px solid #c0392b; border-radius: 6px; padding: 5px 12px;
  transition: .15s;
}
.btn-logout:hover { background: #c0392b; color: #fff; }

.content { padding: 28px; flex: 1; }

/* ── Cards ────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.stat-icon.red   { background: rgba(192,57,43,.1); color: #c0392b; }
.stat-icon.blue  { background: rgba(41,128,185,.1); color: #2980b9; }
.stat-icon.green { background: rgba(39,174,96,.1);  color: #27ae60; }
.stat-icon.gold  { background: rgba(212,168,67,.1); color: #d4a843; }
.stat-num { font-size: 1.8rem; font-weight: 800; line-height: 1; color: #1a2332; }
.stat-label { font-size: .78rem; color: #999; margin-top: 3px; }

/* ── Panel Box ────────────────────────────────────── */
.panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 16px 22px;
  border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-head h2 {
  font-size: .95rem;
  font-weight: 700;
  color: #1a2332;
  display: flex; align-items: center; gap: 8px;
}
.panel-head h2 i { color: #c0392b; }
.panel-body { padding: 22px; }

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .83rem; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: .15s;
}
.btn-primary { background: #c0392b; color: #fff; }
.btn-primary:hover { background: #96281b; }
.btn-secondary { background: #f0f2f5; color: #444; }
.btn-secondary:hover { background: #e0e2e5; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #1e8449; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #d68910; }
.btn-sm { padding: 5px 12px; font-size: .78rem; border-radius: 6px; }
.btn-outline { background: transparent; border: 1.5px solid #c0392b; color: #c0392b; }
.btn-outline:hover { background: #c0392b; color: #fff; }

/* ── Table ────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.admin-table th {
  background: #f8f9fa;
  padding: 11px 14px;
  text-align: left;
  font-weight: 700;
  color: #555;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid #e8e8e8;
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }

/* ── Forms ────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: .8rem; font-weight: 700; color: #444; }
.form-label span { color: #c0392b; }
.form-control {
  padding: 10px 14px;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  font-size: .88rem;
  color: #333;
  transition: border-color .15s;
  outline: none;
  font-family: inherit;
  width: 100%;
}
.form-control:focus { border-color: #c0392b; }
select.form-control { background: #fff; cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── Alerts ────────────────────────────────────── */
.alert {
  padding: 13px 18px;
  border-radius: 8px;
  font-size: .87rem;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info     { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ── Badges ────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger  { background: #f8d7da; color: #721c24; }
.badge-info    { background: #d1ecf1; color: #0c5460; }
.badge-secondary { background: #e8e8e8; color: #666; }

/* ── Pagination ────────────────────────────────────── */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.pagination a, .pagination span {
  padding: 7px 12px;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: .15s;
}
.pagination a { background: #fff; color: #333; border: 1px solid #e8e8e8; }
.pagination a:hover { background: #f0f0f0; }
.pagination span { background: #c0392b; color: #fff; border: 1px solid #c0392b; }

/* ── Tabs ────────────────────────────────────── */
.admin-tabs { display: flex; border-bottom: 2px solid #e8e8e8; margin-bottom: 22px; }
.admin-tab-btn {
  padding: 11px 20px;
  font-size: .85rem; font-weight: 600;
  color: #777;
  cursor: pointer;
  border: none; background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: .15s;
}
.admin-tab-btn.active { color: #c0392b; border-bottom-color: #c0392b; }
.admin-tab-pane { display: none; }
.admin-tab-pane.active { display: block; }

/* ── Search bar ────────────────────────────────────── */
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.search-bar input { flex: 1; }

/* ── Gorsel preview ────────────────────────────────────── */
.img-preview { max-width: 120px; max-height: 80px; border-radius: 6px; object-fit: cover; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}
