@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@600;700;800;900&family=JetBrains+Mono:wght@600;700;800&display=swap');

/* ==========================================================================
   NICKS ADMIN DASHBOARD - NEON CYBERPUNK CONSOLE THEME
   Restored Original Functional Architecture with Modern Neon UI Color Palette
   ========================================================================== */

:root {
  --admin-bg: #060913;
  --admin-sidebar-bg: #090d18;
  --admin-card-bg: #0d1220;
  --admin-card-hover: #13192c;
  --admin-input-bg: #090e1a;

  --admin-border: rgba(0, 240, 255, 0.12);
  --admin-border-focus: #00f0ff;

  --neon-cyan: #00f0ff;
  --neon-cyan-glow: rgba(0, 240, 255, 0.35);
  --neon-purple: #a855f7;
  --neon-purple-glow: rgba(168, 85, 247, 0.35);
  --neon-pink: #ec4899;
  --neon-pink-glow: rgba(236, 72, 153, 0.35);
  --neon-red: #ef4444;
  --neon-red-glow: rgba(239, 68, 68, 0.35);
  --neon-emerald: #10b981;
  --neon-emerald-glow: rgba(16, 185, 129, 0.35);
  --neon-amber: #f59e0b;
  --neon-amber-glow: rgba(245, 158, 11, 0.35);

  --admin-primary: #00f0ff;
  --admin-primary-dark: #0284c7;
  --admin-primary-glow: rgba(0, 240, 255, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

body.admin-body {
  background-color: var(--admin-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(0, 240, 255, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 25%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(239, 68, 68, 0.05) 0%, transparent 50%);
}

/* ---------------- Layout Structure ---------------- */
.admin-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ---------------- Sidebar Navigation ---------------- */
.admin-sidebar {
  width: 280px;
  background: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--admin-border);
  text-decoration: none;
}

.brand-badge {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #00f0ff, #0284c7);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #020617;
  box-shadow: 0 0 18px var(--neon-cyan-glow);
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.brand-title span {
  color: var(--neon-cyan);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
  flex: 1;
}

.nav-group-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item-icon {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: rgba(0, 240, 255, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
  font-weight: 700;
}

.nav-pill-badge {
  background: rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--admin-border);
}

.admin-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--admin-border);
  padding: 10px 12px;
  border-radius: 14px;
}

.user-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f0ff, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #020617;
  font-weight: 900;
  font-size: 0.8rem;
  box-shadow: 0 0 12px var(--neon-cyan-glow);
}

.user-name {
  font-weight: 700;
  font-size: 0.84rem;
  color: #ffffff;
}

.user-role {
  font-size: 0.72rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}

.role-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* ---------------- Workspace Main Content ---------------- */
.admin-workspace {
  flex: 1;
  padding: 30px 36px;
  overflow-y: auto;
  max-width: 1400px;
}

/* Top Header Bar */
.top-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.breadcrumbs {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.page-headline {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.3px;
  margin: 0;
}

.header-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--neon-cyan);
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.pulse-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Action Buttons */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.2s ease;
  border: none;
}

.btn-action-primary {
  background: linear-gradient(135deg, #00f0ff, #0284c7);
  color: #020617;
  box-shadow: 0 0 16px var(--neon-cyan-glow);
}

.btn-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.6);
}

.btn-action-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: #e2e8f0;
}

.btn-action-secondary:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.5);
  color: #ffffff;
}

/* Quick Launchpad Strip */
.quick-action-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.quick-action-btn {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.quick-action-btn:hover {
  background: var(--admin-card-hover);
  border-color: rgba(0, 240, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.act-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* ---------------- Metric Cards Grid ---------------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.metric-card:hover {
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.15);
  transform: translateY(-2px);
}

.metric-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.metric-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
}

.metric-val {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 8px;
}

.metric-trend {
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trend-up {
  color: #10b981;
}

.trend-amber {
  color: #fbbf24;
}

.trend-cyan {
  color: #38bdf8;
}

/* ---------------- Admin Cards & Sections ---------------- */
.admin-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.card-headline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
}

/* ---------------- Tables & Data Grids ---------------- */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.admin-table th {
  background: rgba(0, 240, 255, 0.05);
  color: var(--text-dim);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: rgba(0, 240, 255, 0.03);
}

.table-code {
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.status-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.status-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.status-info {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Stock Meter */
.stock-meter-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.stock-meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Inputs & Controls */
.admin-input, .admin-select {
  background: var(--admin-input-bg);
  border: 1px solid var(--admin-border);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.admin-input:focus, .admin-select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan-glow);
}

/* Toast Notifications */
.admin-toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-toast {
  background: #0f1524;
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-sidebar {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .admin-shell {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .admin-workspace {
    padding: 20px 14px;
  }
}
