/* ============================================================
   HamadSoft Admin Panel CSS
   ============================================================ */

:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #e3f2fd;
  --sidebar-bg: #0d1117;
  --sidebar-text: #94a3b8;
  --sidebar-hover: #1e293b;
  --sidebar-active: #1565c0;
  --sidebar-width: 240px;
}

* { box-sizing: border-box; }
body.admin-body { font-family: 'Inter', sans-serif; background: #f8fafc; -webkit-font-smoothing: antialiased; }
.fw-600{font-weight:600}.fw-700{font-weight:700}.fw-800{font-weight:800}

/* ─── LAYOUT ─── */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-x: hidden; }
.admin-content { padding: 0 1.5rem 2rem; flex: 1; }

/* ─── SIDEBAR ─── */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 0;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform .3s ease;
}
.admin-main { margin-left: var(--sidebar-width); }

.sidebar-brand {
  padding: 1.25rem 1rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-section-label {
  padding: .75rem 1rem .25rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(148,163,184,.5);
  text-transform: uppercase;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .6rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: all .2s;
  border-radius: 0;
  margin: 1px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.sidebar-link i { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-link:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.sidebar-link.active { background: var(--primary); color: white; }
.sidebar-bottom { margin-top: auto; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.06); }

/* ─── TOPBAR ─── */
.admin-topbar {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ─── CARDS ─── */
.admin-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.admin-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}

/* ─── STAT CARDS ─── */
.stat-card {
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid transparent;
}
.stat-blue { background: #dbeafe; border-color: #bfdbfe; }
.stat-orange { background: #fed7aa; border-color: #fdba74; }
.stat-red { background: #fee2e2; border-color: #fca5a5; }
.stat-green { background: #dcfce7; border-color: #86efac; }
.stat-card-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  background: rgba(255,255,255,.6);
}
.stat-blue .stat-card-icon { color: #1d4ed8; }
.stat-orange .stat-card-icon { color: #c2410c; }
.stat-red .stat-card-icon { color: #dc2626; }
.stat-green .stat-card-icon { color: #16a34a; }
.stat-card-num { font-size: 1.75rem; font-weight: 900; line-height: 1; }
.stat-card-lbl { font-size: .8rem; font-weight: 500; color: #64748b; margin-top: 2px; }

/* ─── BTN XS ─── */
.btn-xs { padding: .2rem .45rem; font-size: .75rem; line-height: 1.3; }

/* ─── TABLE ─── */
.table { font-size: .875rem; }
.table th { font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }

/* ─── SOFT BADGES ─── */
.bg-primary-soft { background: #e3f2fd !important; }
.bg-success-soft { background: #f0fdf4 !important; }
.bg-secondary-soft { background: #f8fafc !important; }

/* ─── FORM ─── */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.15);
}
.richtext { font-family: 'Courier New', monospace; font-size: .85rem; }

/* ─── TABS ─── */
.nav-tabs { border-color: #e2e8f0; }
.nav-tabs .nav-link { color: #64748b; font-weight: 500; font-size: .875rem; border: none; padding: .6rem 1.1rem; border-radius: 8px 8px 0 0; }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom: 2px solid var(--primary); background: transparent; font-weight: 600; }
.nav-tabs .nav-link:hover { color: var(--primary); }

/* ─── RESPONSIVE ─── */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}
