:root {
  --bg-primary: #070913;
  --bg-secondary: #0d1124;
  --bg-card: rgba(18, 24, 48, 0.7);
  --bg-card-hover: rgba(28, 36, 70, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.4);
  
  --accent-primary: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --accent-green: #10b981;
  --accent-blue: #3b82f6;
  --accent-orange: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.admin-body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* LOGIN OVERLAY */
.login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.15), var(--bg-primary) 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.login-brand h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-badge {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.login-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.input-group {
  text-align: left;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: white;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

.input-group input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: white;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px var(--accent-glow);
}

.login-error {
  margin-top: 14px;
  color: var(--accent-red);
  font-size: 13px;
}

/* ADMIN LAYOUT */
.admin-layout {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 280px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.brand-text h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
}

.badge-status {
  font-size: 11px;
  color: var(--accent-green);
  font-weight: 600;
}

.sidebar-menu {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.nav-btn i {
  font-size: 16px;
  width: 20px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
  color: white;
  border: 1px solid var(--border-active);
}

.menu-badge {
  margin-left: auto;
  background: var(--accent-purple);
  color: white;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-view-store, .btn-logout {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.btn-view-store {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* MAIN CONTENT */
.admin-main {
  flex-grow: 1;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.topbar {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: rgba(13, 17, 36, 0.6);
  backdrop-filter: blur(10px);
}

.topbar-title h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
}

.topbar-title p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-indicator {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-indicator i {
  font-size: 8px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.btn-refresh {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-body {
  padding: 32px;
  flex-grow: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.icon-green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.icon-orange { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-info h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  margin: 2px 0;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-dim);
}

/* TABLES */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* SECTION TOOLBAR */
.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-toolbar h2 {
  font-family: var(--font-heading);
  font-size: 20px;
}

.section-toolbar p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.filter-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-size: 13px;
  color: var(--text-muted);
}

.filter-group select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  outline: none;
}

/* SETTINGS FORM & GRIDS */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.card-head i {
  font-size: 20px;
  color: var(--accent-primary);
}

.card-head h3 {
  font-size: 16px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group small {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-primary);
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-row .form-group {
  flex: 1;
}

.code-font {
  font-family: var(--font-code);
  font-size: 12px;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
  overflow: hidden;
}

.modal-lg {
  max-width: 680px;
}

.modal-head {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.modal-head h3 {
  font-size: 18px;
  font-family: var(--font-heading);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mode-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.btn-tab {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.btn-tab.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* BADGES */
.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.status-badge.available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.status-badge.sold {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.action-btn-del {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
}

.action-btn-del:hover {
  background: var(--accent-red);
  color: white;
}

/* PRODUCT ADMIN CARDS */
.products-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.prod-admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.prod-admin-card .head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.prod-admin-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(0,0,0,0.3);
  padding: 6px;
}

.prod-admin-card .price {
  font-size: 22px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 8px;
}

.prod-admin-card .stock-tag {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.prod-admin-card .stock-tag span {
  font-weight: 700;
  color: var(--text-main);
}

.prod-admin-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.btn-edit-prod, .btn-del-prod {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.btn-edit-prod {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.btn-del-prod {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}



/* Cyber Neon Admin Enhancement */
:root {
  --primary: #00D2FF;
  --accent: #FF2E93;
  --bg-dark: #070913;
  --bg-card: rgba(16, 22, 42, 0.85);
  --border: rgba(0, 210, 255, 0.25);
}

.admin-sidebar {
  background: #090d1a !important;
  border-right: 1px solid rgba(0, 210, 255, 0.2) !important;
}

.stat-card {
  background: rgba(16, 22, 42, 0.85) !important;
  border: 1px solid rgba(0, 210, 255, 0.2) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6) !important;
}

.btn-primary {
  background: linear-gradient(135deg, #00D2FF, #9D4EDD) !important;
  border: none !important;
  font-weight: bold !important;
}
