/* ── Admin Panel Styles ───────────────────────────────────────────────── */
:root {
  --adm-sidebar: #0f172a;
  --adm-sidebar-hover: rgba(255,255,255,0.08);
  --adm-sidebar-active: #1a56db;
  --adm-header: #ffffff;
  --adm-bg: #f1f5f9;
  --adm-card: #ffffff;
  --adm-border: #e2e8f0;
  --adm-text: #1e293b;
  --adm-muted: #64748b;
  --adm-primary: #1a56db;
  --adm-success: #10b981;
  --adm-danger: #ef4444;
  --adm-warning: #f59e0b;
  --adm-radius: 12px;
  --adm-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter',sans-serif; background: var(--adm-bg); color: var(--adm-text); display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.adm-sidebar {
  width: 248px; background: var(--adm-sidebar); position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; z-index: 50; display: flex; flex-direction: column; transition: transform .3s;
}
.adm-sidebar-logo {
  padding: 20px 20px 16px; display: flex; align-items: center; gap: 10px;
  font-family:'Baloo Thambi 2',sans-serif; font-size:18px; font-weight:800; color:#fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.adm-sidebar-logo .logo-icon { width:34px;height:34px;background:linear-gradient(135deg,#1a56db,#f59e0b);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:16px; }
.adm-nav-section { padding: 16px 12px 4px; font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .1em; }
.adm-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin: 2px 8px;
  border-radius: 8px; cursor: pointer; color: rgba(255,255,255,.62); font-size: 13.5px; font-weight: 500;
  transition: all .18s; text-decoration: none;
}
.adm-nav-item:hover  { background: var(--adm-sidebar-hover); color: #fff; }
.adm-nav-item.active { background: var(--adm-sidebar-active); color: #fff; }
.adm-nav-item .icon  { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.adm-nav-item .badge { margin-left:auto; background:#ef4444; color:#fff; font-size:11px; font-weight:700; padding:2px 7px; border-radius:999px; }
.adm-sidebar-bottom { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }

/* ── MAIN ── */
.adm-main { margin-left: 248px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── TOP BAR ── */
.adm-topbar {
  background: var(--adm-header); border-bottom: 1px solid var(--adm-border);
  padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.adm-topbar-title { font-size: 17px; font-weight: 700; }
.adm-topbar-right { display: flex; align-items: center; gap: 14px; }
.adm-user-badge { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--adm-muted); }
.adm-user-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#1a56db,#f59e0b); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; }

/* ── CONTENT ── */
.adm-content { padding: 28px; flex: 1; }

/* ── STAT CARDS ── */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; margin-bottom: 28px; }
.adm-stat-card {
  background: var(--adm-card); border-radius: var(--adm-radius); padding: 20px 22px;
  box-shadow: var(--adm-shadow); border: 1px solid var(--adm-border); display: flex; align-items: center; gap: 16px;
}
.adm-stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.adm-stat-num  { font-size: 26px; font-weight: 800; font-family:'Baloo Thambi 2',sans-serif; }
.adm-stat-lbl  { font-size: 13px; color: var(--adm-muted); margin-top: 2px; }

/* ── TABLE ── */
.adm-table-wrap { background: var(--adm-card); border-radius: var(--adm-radius); box-shadow: var(--adm-shadow); border: 1px solid var(--adm-border); overflow: hidden; }
.adm-table-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--adm-border); flex-wrap: wrap; gap: 10px; }
.adm-table-title { font-size: 15px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: #f8fafc; }
th { padding: 11px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--adm-muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--adm-border); white-space: nowrap; }
td { padding: 13px 16px; font-size: 13.5px; border-bottom: 1px solid var(--adm-border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
.adm-actions { display: flex; gap: 6px; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge-success  { background: #f0fdf4; color: #166534; }
.badge-danger   { background: #fef2f2; color: #991b1b; }
.badge-warning  { background: #fffbeb; color: #92400e; }
.badge-primary  { background: #eff6ff; color: #1e40af; }
.badge-muted    { background: #f1f5f9; color: #475569; }

/* ── CARD ── */
.adm-card { background: var(--adm-card); border-radius: var(--adm-radius); padding: 24px; box-shadow: var(--adm-shadow); border: 1px solid var(--adm-border); margin-bottom: 20px; }
.adm-card-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--adm-border); }

/* ── BUTTONS ── */
.adm-btn { display:inline-flex;align-items:center;gap:5px;padding:8px 16px;border-radius:8px;font-size:13.5px;font-weight:600;cursor:pointer;border:none;transition:all .18s;text-decoration:none; }
.adm-btn-primary { background:var(--adm-primary);color:#fff; }
.adm-btn-primary:hover { background:#1240a8; }
.adm-btn-success { background:var(--adm-success);color:#fff; }
.adm-btn-danger  { background:var(--adm-danger);color:#fff; }
.adm-btn-warning { background:var(--adm-warning);color:#fff; }
.adm-btn-ghost   { background:#f1f5f9;color:var(--adm-text); }
.adm-btn-ghost:hover { background:#e2e8f0; }
.adm-btn-sm { padding:5px 11px;font-size:12.5px; }

/* ── FORM ── */
.adm-form-group { margin-bottom: 16px; }
.adm-label { display:block;font-size:13.5px;font-weight:600;margin-bottom:5px;color:var(--adm-text); }
.adm-input {
  width:100%;padding:9px 13px;border:1.5px solid var(--adm-border);border-radius:8px;
  font-size:13.5px;font-family:'Inter',sans-serif;background:#fff;color:var(--adm-text);outline:none;transition:border .18s;
}
.adm-input:focus { border-color:var(--adm-primary);box-shadow:0 0 0 3px rgba(26,86,219,.08); }
.adm-select { appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:32px; }
textarea.adm-input { resize:vertical;min-height:80px; }
.adm-form-row { display:grid;grid-template-columns:1fr 1fr;gap:14px; }
.adm-form-hint { font-size:12px;color:var(--adm-muted);margin-top:3px; }

/* ── SEARCH IN TABLE ── */
.adm-search { display:flex;align-items:center;gap:8px;background:#f8fafc;border:1.5px solid var(--adm-border);border-radius:8px;padding:7px 12px;min-width:220px; }
.adm-search input { border:none;outline:none;font-size:13.5px;background:transparent;width:100%; }

/* ── FLASH ── */
.adm-flash { padding:12px 18px;border-left:4px solid;border-radius:0 8px 8px 0;font-size:13.5px;font-weight:500;margin-bottom:18px; }
.adm-flash-success { background:#f0fdf4;border-color:#10b981;color:#166534; }
.adm-flash-error   { background:#fef2f2;border-color:#ef4444;color:#991b1b; }

/* ── CHART PLACEHOLDER ── */
.adm-chart-placeholder { background: linear-gradient(135deg,#eff6ff,#f0f4ff); border-radius: 10px; padding: 24px; text-align: center; color: var(--adm-muted); font-size: 14px; }

/* ── MOBILE ── */
@media (max-width: 900px) {
  .adm-sidebar { transform: translateX(-100%); }
  .adm-sidebar.open { transform: translateX(0); }
  .adm-main { margin-left: 0; }
  .adm-content { padding: 16px; }
  .adm-form-row { grid-template-columns: 1fr; }
  .adm-stats { grid-template-columns: repeat(2,1fr); }
}
