/* ────────────────────────────────────────────────────────────
   Admin panel — custom CSS
   Bootstrap 5 is loaded via CDN; this file only adds layout
   and minor overrides.
──────────────────────────────────────────────────────────── */

/* Variables */
:root {
  --sidebar-width: 240px;
  --sidebar-bg:    #1a1d23;
  --sidebar-text:  #9ca3af;
  --sidebar-active:#3b82f6;
  --topbar-h:      56px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: #f1f5f9;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
}

/* ── Outer wrapper ─────────────────────────────────────── */
.wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid #2d3748;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.sidebar-brand i { font-size: 20px; color: var(--sidebar-active); flex-shrink: 0; }

.sidebar-nav {
  list-style: none;
  padding: 10px 8px;
  margin: 0;
  flex: 1;
}
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
}
.sidebar-nav li a i { font-size: 16px; flex-shrink: 0; }
.sidebar-nav li a:hover  { background: #2d3748; color: #e2e8f0; }
.sidebar-nav li.active a { background: var(--sidebar-active); color: #fff; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid #2d3748;
}
.sidebar-footer a {
  color: var(--sidebar-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.sidebar-footer a:hover { color: #fff; }

/* ── Main content area ──────────────────────────────────── */
#content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Top bar ────────────────────────────────────────────── */
.top-bar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ── Content padding ────────────────────────────────────── */
.content-area { padding: 24px; }

/* ── Cards ──────────────────────────────────────────────── */
.stat-card,
.table-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.table-card .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 12px 12px 0 0 !important;
  padding: 14px 20px;
}
.table-card .card-footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 12px 12px !important;
  padding: 10px 16px;
}

/* ── Stat icon bubble ───────────────────────────────────── */
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* ── Small action buttons ───────────────────────────────── */
.btn-action { padding: 3px 9px; font-size: 13px; }

/* ── Table tweaks ───────────────────────────────────────── */
.table th { font-size: 12px; font-weight: 600; text-transform: uppercase;
            letter-spacing: .04em; color: #64748b; }
.table td { vertical-align: middle; }

/* ── Login page ─────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 380px;
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-card .card-body { padding: 40px 36px; }
