/* BookFlow Admin — Styles (Light + Dark Sidebar) */

@import url('../dash/css/variables.css');

:root {
  --admin-sidebar-bg:    #1a1d27;
  --admin-sidebar-text:  #e8eaed;
  --admin-sidebar-hover: #2a2d3a;
  --admin-sidebar-muted: #5f6368;
  --admin-sidebar-border:#3c4043;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); background: var(--bg-secondary, #f8f9fa); color: #1a1a2e; line-height: 1.6; }

/* === Admin Sidebar === */
.admin-sidebar {
  position: fixed; top: 0; left: 0;
  width: 240px; height: 100vh;
  background: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-sidebar-border);
  display: flex; flex-direction: column;
  z-index: 100;
}

.admin-sidebar-header {
  height: 56px;
  display: flex; align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--admin-sidebar-border);
  gap: 8px;
}

.admin-sidebar-logo {
  width: 28px; height: 28px;
  background: #667eea; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 16px;
}

.admin-sidebar-brand {
  font-size: 16px; font-weight: 700;
  color: var(--admin-sidebar-text);
}

.admin-nav-item {
  display: flex; align-items: center;
  padding: 0 20px; height: 40px;
  color: #9aa0a6; cursor: pointer;
  transition: all 150ms ease;
  border-left: 3px solid transparent;
  gap: 12px; text-decoration: none;
}

.admin-nav-item:hover {
  color: var(--admin-sidebar-text);
  background: var(--admin-sidebar-hover);
}

.admin-nav-item.active {
  color: var(--admin-sidebar-text);
  background: var(--admin-sidebar-hover);
  border-left-color: #667eea;
}

.admin-nav-icon { font-size: 16px; width: 20px; text-align: center; }

/* === Admin Topbar === */
.admin-topbar {
  position: fixed; top: 0; left: 240px; right: 0;
  height: 56px;
  background: white;
  border-bottom: 1px solid #e8eaed;
  display: flex; align-items: center;
  padding: 0 24px;
  z-index: 90;
}

.admin-topbar h1 { font-size: 16px; font-weight: 600; }

/* === Admin Content === */
.admin-content {
  margin-left: 240px; margin-top: 56px;
  padding: 24px;
  min-height: calc(100vh - 56px);
}

/* === Admin Components === */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: white;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 20px;
}

.admin-stat-label {
  font-size: 13px; color: #5f6368; margin-bottom: 4px;
}

.admin-stat-value {
  font-size: 32px; font-weight: 700; line-height: 1.2;
}

.admin-stat-change {
  font-size: 12px; margin-top: 4px;
}
.admin-stat-change.up { color: #34a853; }
.admin-stat-change.down { color: #ea4335; }

.admin-card {
  background: white;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.admin-card-title {
  font-size: 16px; font-weight: 600;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}

.admin-list-row {
  display: flex; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e8eaed;
  gap: 12px;
}

.admin-list-row:last-child { border-bottom: none; }

/* === Admin Badges === */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 500;
}
.badge-success { background: rgba(52,168,83,0.08); color: #34a853; }
.badge-error   { background: rgba(234,67,53,0.08); color: #ea4335; }
.badge-warning { background: rgba(251,188,4,0.08); color: #e6a700; }
.badge-info    { background: rgba(66,133,244,0.08); color: #4285f4; }
.badge-muted   { background: #f1f3f4; color: #5f6368; }
.badge-accent  { background: rgba(102,126,234,0.08); color: #667eea; }

/* === Admin Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: none; font-family: inherit;
  transition: all 150ms ease;
}
.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5a6fd6; }
.btn-outline { background: none; border: 1px solid #dadce0; color: #1a1a2e; }
.btn-outline:hover { background: #f1f3f4; }
.btn-sm { padding: 3px 8px; font-size: 12px; height: 28px; border: 1px solid #e8eaed; background: none; border-radius: 4px; color: #5f6368; }
.btn-sm:hover { background: #f1f3f4; }

/* === Utility === */
.text-muted { color: #5f6368; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-mono { font-family: "JetBrains Mono", "Fira Code", monospace; }
.mt-lg { margin-top: 24px; }
