/* ============================================================
   BIKINWEBSITE — Admin Panel styles
   ============================================================ */
:root {
  --admin-side: 256px;
}

.admin-body { display: flex; min-height: 100vh; background: var(--c-bg); }

/* ---------- Sidebar ---------- */
.side {
  width: var(--admin-side); flex-shrink: 0;
  background: var(--c-surface); border-right: 1px solid var(--c-border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  transition: transform .28s var(--ease);
  z-index: 60;
}
.side__brand { padding: 1.25rem 1.25rem; display: flex; align-items: center; gap: .6rem; font-weight: 800; border-bottom: 1px solid var(--c-border); }
.side__nav { padding: .75rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.side__group { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--c-muted); padding: 1rem .9rem .35rem; font-weight: 700; }
.side__link {
  display: flex; align-items: center; gap: .7rem; padding: .65rem .9rem; border-radius: 10px;
  color: var(--c-text-soft); font-weight: 600; font-size: .92rem; transition: background .15s, color .15s;
}
.side__link:hover { background: var(--c-surface-2); color: var(--c-text); }
.side__link.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(91,75,255,.3); }
.side__link .ic { width: 20px; text-align: center; }

/* ---------- Main ---------- */
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: clamp(1rem, 3vw, 1.75rem); position: sticky; top: 0; z-index: 50;
}
.topbar__title { font-weight: 800; font-size: 1.05rem; }
.admin-content { padding: clamp(1rem, 3vw, 1.75rem); flex: 1; }

.admin-menu-btn { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--c-border); background: var(--c-surface); cursor: pointer; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
}
.stat__label { color: var(--c-muted); font-size: .82rem; font-weight: 600; }
.stat__value { font-size: 1.8rem; font-weight: 800; margin-top: .25rem; }
.stat__delta { font-size: .8rem; font-weight: 700; }
.stat__delta.up { color: var(--c-success); } .stat__delta.down { color: var(--c-danger); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
table.tbl th, table.tbl td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--c-border); font-size: .9rem; }
table.tbl th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); background: var(--c-surface-2); }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: var(--c-surface-2); }

/* ---------- Auth (login) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background:
  radial-gradient(60% 60% at 80% 0%, rgba(139,92,246,.18), transparent 60%),
  radial-gradient(50% 60% at 0% 100%, rgba(6,182,212,.16), transparent 60%), var(--c-bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(1.5rem, 4vw, 2.5rem); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .side { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .admin-menu-btn { display: grid; place-items: center; }
  .side__backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
}
