/* ===================================================== */
/* ATSTIX Admin Styles                                   */
/* ===================================================== */

/* ============ LOGIN ============ */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 440px;
  width: 100%;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.login-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, var(--violet), transparent 30%, transparent 70%, var(--pink));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 24px;
  font-weight: 800;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.login-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.login-back {
  display: block;
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.login-back:hover { color: var(--text); }

/* ============ ADMIN LAYOUT ============ */
.admin-view {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ============ SIDEBAR ============ */
.sidebar {
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px;
  font-weight: 800;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 0 12px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  text-align: left;
  margin-bottom: 2px;
  font-family: inherit;
}

.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text);
}

.sidebar-link.active {
  background: var(--bg-card-hover);
  color: var(--text);
  position: relative;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--gradient-primary);
  border-radius: 0 4px 4px 0;
}

.sidebar-link > span:first-child {
  font-size: 16px;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--gradient-primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  min-width: 22px;
  text-align: center;
}

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

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 100px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

.admin-info { flex: 1; min-width: 0; }

.admin-name {
  font-size: 13px;
  font-weight: 600;
}

.admin-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-link.logout { color: var(--text-dim); }
.sidebar-link.logout:hover { color: #f87171; background: rgba(248, 113, 113, 0.1); }

/* ============ MAIN ============ */
.main {
  padding: 24px 32px 60px;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.topbar-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.topbar-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

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

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #34d399;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.7); }
}

/* ============ STATS ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(20px);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  opacity: 0.1;
  border-radius: 50%;
  filter: blur(20px);
}

.stat-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-value {
  font-family: 'Space Grotesk', monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--accent);
}

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

.stat-trend {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ============ DASHBOARD GRID ============ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(20px);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.panel-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.link-btn {
  color: var(--violet);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  font-family: inherit;
  transition: opacity 0.2s;
}

.link-btn:hover { opacity: 0.8; }

/* Recent orders */
.recent-order {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: padding 0.2s;
}

.recent-order:last-child { border-bottom: none; }
.recent-order:hover { padding-left: 4px; }

.recent-order-info { flex: 1; min-width: 0; }

.recent-order-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-order-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.recent-order-amount {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  font-size: 14px;
}

/* Status bars */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.status-bar-label {
  font-size: 13px;
  width: 110px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.status-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 100px;
  overflow: hidden;
}

.status-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s var(--ease-out);
}

.status-bar-value {
  font-family: 'Space Grotesk', monospace;
  font-size: 13px;
  font-weight: 600;
  min-width: 30px;
  text-align: right;
}

/* ============ ORDERS TABLE ============ */
.orders-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--violet);
  background: var(--bg-card-hover);
}

.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  font-family: inherit;
}

.filter-pill:hover { color: var(--text); }
.filter-pill.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

.orders-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.orders-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.orders-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.orders-table tr {
  transition: background 0.15s;
}

.orders-table tr:hover { background: var(--bg-card-hover); }
.orders-table tbody tr { cursor: pointer; }

.order-number-cell {
  font-family: 'Space Grotesk', monospace;
  font-weight: 600;
  color: var(--violet);
}

.order-date {
  font-size: 13px;
  color: var(--text-muted);
}

.order-customer {
  font-weight: 600;
  margin-bottom: 2px;
}

.order-customer-email {
  font-size: 12px;
  color: var(--text-muted);
}

.order-items-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
}

.order-items-preview {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: 'Space Grotesk', monospace;
}

.item-row-pack {
  font-size: 11px;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 2px;
}

/* ============ STOCK TAB ============ */
.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.stock-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.stock-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.stock-categories {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.stock-category-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  margin-bottom: 14px;
  font-weight: 700;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.stock-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  transition: all 0.25s var(--ease-out);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.stock-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--violet);
}

.stock-card.stock-ok::before  { background: linear-gradient(180deg, #10b981, #06b6d4); }
.stock-card.stock-low::before { background: linear-gradient(180deg, #fbbf24, #f97316); }
.stock-card.stock-oos::before { background: linear-gradient(180deg, #ef4444, #b91c1c); }

.stock-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.stock-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.stock-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.stock-emoji {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stock-info { flex: 1; min-width: 0; }

.stock-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-id {
  font-family: 'Space Grotesk', monospace;
  font-size: 10px;
  color: var(--text-dim);
}

.stock-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.stock-btn {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.stock-btn:hover {
  background: var(--violet);
  border-color: transparent;
  color: white;
}

.stock-input {
  flex: 1;
  height: 36px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  -moz-appearance: textfield;
}

.stock-input::-webkit-outer-spin-button,
.stock-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stock-input:focus {
  outline: none;
  border-color: var(--violet);
  background: var(--bg-card-hover);
}

.stock-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}

.stock-pill-ok  { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.stock-pill-low { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.stock-pill-oos { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.stock-updated {
  font-size: 10px;
  color: var(--text-dim);
}

/* ============ CARDS TAB ============ */
.cards-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.cards-filters .search-input { flex: 1; min-width: 240px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.poke-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(20px);
  position: relative;
}

.poke-card:hover {
  transform: translateY(-4px);
  border-color: var(--violet);
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.25);
}

.poke-card.inactive { opacity: 0.6; }
.poke-card.oos      { opacity: 0.7; }

.poke-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 5/7;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.05));
  overflow: hidden;
}

.poke-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s var(--ease-out);
}

.poke-card:hover .poke-card-image { transform: scale(1.04); }

.poke-card-condition {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cond-nm { background: rgba(16, 185, 129, 0.85); color: white; }
.cond-ex { background: rgba(6, 182, 212, 0.85);  color: white; }
.cond-lp { background: rgba(251, 191, 36, 0.85); color: #18181b; }
.cond-pl { background: rgba(249, 115, 22, 0.85); color: white; }

.poke-card-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 6px;
  border: 2px solid white;
  backdrop-filter: blur(4px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.poke-card-overlay.oos {
  background: rgba(239, 68, 68, 0.9);
}

.poke-card-body {
  padding: 12px;
}

.poke-card-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poke-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poke-card-rarity {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(249, 115, 22, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  margin-bottom: 8px;
}

.poke-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.poke-card-price {
  font-family: 'Space Grotesk', monospace;
  font-weight: 800;
  font-size: 17px;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.poke-card-stock {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============ CARD FORM ============ */
.card-form-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
}

.card-form-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-preview-frame {
  width: 100%;
  aspect-ratio: 5/7;
  background: var(--bg);
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-preview-placeholder {
  text-align: center;
  color: var(--text-dim);
}

.card-preview-placeholder span {
  font-size: 48px;
  display: block;
  margin-bottom: 6px;
  opacity: 0.5;
}

.card-preview-placeholder p {
  font-size: 12px;
  margin: 0;
}

.card-form-fields {
  min-width: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--violet);
  cursor: pointer;
}

@media (max-width: 700px) {
  .card-form-layout { grid-template-columns: 1fr; }
  .card-form-preview { max-width: 240px; margin: 0 auto; }
}

.order-total {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pending    { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-processing { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.status-shipped    { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.status-delivered  { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-cancelled  { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.row-actions { text-align: right; }

.action-btn {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.action-btn:hover { background: var(--violet); border-color: transparent; }

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

/* ============ ORDER DETAIL MODAL ============ */
.order-detail-section {
  margin-bottom: 24px;
}

.order-detail-title {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.detail-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

.items-list {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

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

.item-row-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.item-row-emoji {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.item-row-info { flex: 1; }

.item-row-name {
  font-weight: 600;
  font-size: 14px;
}

.item-row-qty {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-row-price {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
}

.totals-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.total-row.grand {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 18px;
  font-weight: 700;
}

.total-row.grand .gradient {
  font-family: 'Space Grotesk', monospace;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Status changer */
.status-changer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-option {
  flex: 1;
  min-width: 110px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s var(--ease-spring);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.status-option:hover {
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.status-option.active.pending    { background: rgba(245, 158, 11, 0.2); border-color: #f59e0b; color: #fbbf24; }
.status-option.active.processing { background: rgba(6, 182, 212, 0.2); border-color: #06b6d4; color: #22d3ee; }
.status-option.active.shipped    { background: rgba(139, 92, 246, 0.2); border-color: #8b5cf6; color: #a78bfa; }
.status-option.active.delivered  { background: rgba(16, 185, 129, 0.2); border-color: #10b981; color: #34d399; }
.status-option.active.cancelled  { background: rgba(239, 68, 68, 0.2); border-color: #ef4444; color: #f87171; }

/* New order pulse animation */
@keyframes new-order-pulse {
  0%   { background: rgba(139, 92, 246, 0.2); }
  100% { background: transparent; }
}

.orders-table tr.new-order { animation: new-order-pulse 3s ease-out; }

/* Responsive */
@media (max-width: 1024px) {
  .admin-view {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-logo {
    padding: 0 12px 0 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
    margin-bottom: 0;
    margin-right: 12px;
  }
  .sidebar-section {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
  }
  .sidebar-section .sidebar-label { display: none; }
  .sidebar-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .admin-user { padding: 4px 8px; }
  .admin-info { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main { padding: 16px; }
  .orders-table {
    font-size: 12px;
  }
  .orders-table th,
  .orders-table td { padding: 10px 8px; }
  .order-customer-email,
  .order-date { display: none; }
}
