/* admin.css - Admin Panel specific styles */

.admin-body {
  background-color: #080b11;
}

.admin-app-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-logo {
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-logo .brand-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-block;
  vertical-align: middle;
}

.badge-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 2px 8px;
  border-radius: 6px;
}

.session-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald-primary);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--emerald-border);
  padding: 3px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-primary);
  box-shadow: 0 0 8px var(--emerald-primary);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-icon-label.active {
  border-color: var(--emerald-border);
  color: var(--emerald-primary);
  background: rgba(16, 185, 129, 0.08);
}

.btn-ghost-sm {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-ghost-sm:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ADMIN TABS */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.count-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  color: #fff;
}

.bg-rose { background: var(--rose-primary); }
.bg-emerald { background: var(--emerald-primary); }

/* TAB PANES */
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.pane-header h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.pane-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* TABLES */
.orders-table-wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

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

.admin-table th {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

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

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

.order-id-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-primary);
}

.utr-tag {
  font-family: var(--font-mono);
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  color: #38bdf8;
  font-size: 12px;
}

.btn-review-approve {
  background: linear-gradient(135deg, var(--emerald-primary), #059669);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-review-approve:hover {
  transform: translateY(-1px);
}

.empty-orders-card {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--emerald-primary);
}

/* INVENTORY STATS */
.inventory-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.inv-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.inv-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.inv-stat-val {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.text-emerald { color: var(--emerald-primary); }
.text-rose { color: var(--rose-primary); }
.text-blue { color: var(--blue-primary); }
.text-purple { color: var(--purple-primary); }

/* ADMIN INVENTORY GRID */
.admin-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.admin-tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-tool-title {
  font-size: 16px;
  font-weight: 800;
}

.admin-tool-price-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--emerald-primary);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-stock-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.admin-stock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
}

.admin-stock-val {
  font-family: var(--font-mono);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-tick-sold {
  background: rgba(244, 63, 94, 0.1);
  color: var(--rose-primary);
  border: 1px solid var(--rose-border);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-tick-sold:hover {
  background: var(--rose-primary);
  color: #fff;
}

/* SOLD ITEMS SECTION (AT BOTTOM) */
.admin-sold-section {
  margin-top: 40px;
  background: var(--bg-secondary);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.sold-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.bg-rose-light {
  background: var(--rose-bg);
  color: var(--rose-primary);
  border: 1px solid var(--rose-border);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.sold-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sold-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-input);
  border-left: 3px solid var(--rose-primary);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-restock-sm {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-primary);
  border: 1px solid var(--emerald-border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-restock-sm:hover {
  background: var(--emerald-primary);
  color: #fff;
}

/* REVIEW MODAL */
.order-customer-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 13px;
}

.code-textarea {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 12px;
  width: 100%;
}

.stock-item-pill {
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-primary);
  padding: 2px 8px;
  border-radius: 10px;
}

/* SETTINGS CARD */
.settings-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 650px;
}

/* ADMIN LOGIN OVERLAY */
.admin-login-overlay {
  position: fixed;
  inset: 0;
  background: #080b11;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header .brand-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
}

.login-header .brand-logo .brand-logo-img {
  width: 36px;
  height: 36px;
}

.login-header h2 {
  font-size: 22px;
  font-weight: 800;
}

.login-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.session-notice {
  font-size: 12px;
  color: var(--emerald-primary);
  margin-top: 8px;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

.glow-btn {
  box-shadow: 0 4px 14px var(--accent-glow);
}

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

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-tool-desc {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-tool-desc:hover {
  background: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  border-color: #6366f1;
}
