:root {
  /* Ultra-Clean Backend / Operator Dark Theme */
  --bg-hud: #090c12;
  --bg-primary: #0b0e17;
  --bg-panel: #111522;
  --bg-panel-alt: #161b2c;
  --bg-card: #192033;
  --bg-card-hover: #202942;
  --bg-row-hover: #1c2338;
  --bg-terminal: #07090e;
  
  --border-subtle: #1c2438;
  --border-medium: #27324d;
  --border-active: #ff7a00;
  
  --text-main: #f1f5f9;
  --text-muted: #8e9bb0;
  --text-dark: #58657d;
  
  /* Orange / Fiery Glow Suite */
  --color-orange: #ff7a00;
  --color-orange-bright: #ff9100;
  --color-orange-glow: rgba(255, 122, 0, 0.28);
  --color-amber: #f59e0b;
  --color-gold: #fbbf24;
  
  /* Status Accents */
  --color-green: #10b981;
  --color-green-glow: rgba(16, 185, 129, 0.25);
  --color-kbank: #00a950;
  --color-red: #f43f5e;
  --color-cyan: #38bdf8;
  
  --font-sans: 'Prompt', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Chakra Petch', monospace, monospace;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body.operator-theme {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.45;
  overflow-x: hidden;
  letter-spacing: 0.2px;
  padding-bottom: 70px;
}

/* Utilities */
.mono-text { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-orange { color: var(--color-orange-bright); }
.text-gold { color: var(--color-gold); }
.text-green { color: var(--color-green); }
.text-muted { color: var(--text-muted); }
.text-dark { color: var(--text-dark); }
.flex-align { display: flex; align-items: center; }
.gap-8 { gap: 8px; }

/* ============ Top Operator HUD ============ */
.operator-hud {
  background: var(--bg-hud);
  border-bottom: 1px solid var(--border-medium);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

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

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.brand-badge:hover {
  background: rgba(255, 122, 0, 0.1);
}

.brand-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #ff7a00, #d95300);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  box-shadow: 0 0 12px var(--color-orange-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-version {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-orange-bright);
}

.api-status-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--color-green);
}

.pulse-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 8px var(--color-green);
}

.pulse-led.pulse {
  animation: ledPulse 1.8s infinite;
}

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

.hud-metrics {
  display: flex;
  gap: 20px;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.metric-val {
  font-size: 0.95rem;
  font-weight: 700;
}

.hud-actions {
  display: flex;
  gap: 10px;
}

.hud-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.hud-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-orange);
  color: #fff;
}

.hud-btn.highlight {
  background: linear-gradient(135deg, #ff7a00, #d95300);
  border-color: #ff7a00;
  color: #fff;
  box-shadow: 0 2px 10px var(--color-orange-glow);
}

.hud-btn.highlight:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ============ Workspace Layout ============ */
.operator-workspace {
  max-width: 1440px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}

.operator-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

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

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

.panel-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 122, 0, 0.15);
  color: var(--color-orange-bright);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 122, 0, 0.3);
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.panel-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-copy-all {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-copy-all:hover {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.btn-copy-qr {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-copy-qr:hover {
  background: #059669;
  color: #fff;
  border-color: #34d399;
  box-shadow: 0 0 10px var(--color-green-glow);
}

.btn-inline-edit {
  background: rgba(255, 122, 0, 0.15);
  border: 1px solid var(--color-orange);
  color: var(--color-orange-bright);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-inline-edit:hover {
  background: var(--color-orange);
  color: #fff;
  box-shadow: 0 0 10px var(--color-orange-glow);
}

.btn-inline-edit.active {
  background: var(--color-green);
  border-color: var(--color-green);
  color: #000;
  box-shadow: 0 0 12px var(--color-green-glow);
}

.cat-filters {
  display: flex;
  gap: 6px;
}

.filter-chip {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-chip:hover {
  color: #fff;
  border-color: var(--color-orange);
}

.filter-chip.active {
  background: var(--color-orange);
  color: #fff;
  border-color: var(--color-orange);
  box-shadow: 0 0 10px var(--color-orange-glow);
}

/* ============ Gateway Endpoint & Search Bar ============ */
.gateway-banner {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.gw-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.method-tag {
  background: #10b981;
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

.endpoint-url {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

.gw-quick-search {
  flex: 1;
  min-width: 200px;
}

.mono-input {
  width: 100%;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  outline: none;
  transition: border-color var(--transition);
}

.mono-input:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 1px var(--color-orange);
}

/* ============ Horizontal Data Table ============ */
.packages-table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-panel-alt);
  margin-bottom: 24px;
  user-select: text;
}

.packages-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  user-select: text;
}

.packages-data-table th {
  background: var(--bg-terminal);
  color: var(--text-muted);
  font-weight: 700;
  padding: 10px 16px;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-medium);
  user-select: none;
}

.packages-data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  user-select: text;
}

.pkg-data-row {
  transition: background var(--transition);
}

.pkg-data-row:hover {
  background: var(--bg-row-hover);
}

.pkg-data-row:last-child td {
  border-bottom: none;
}

.pkg-row-name {
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: text;
}

.pkg-badge-inline {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.pkg-badge-inline.hot {
  background: rgba(234, 88, 12, 0.2);
  color: #ff7a00;
  border: 1px solid rgba(234, 88, 12, 0.4);
}

.pkg-badge-inline.best {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(217, 119, 6, 0.4);
}

.pkg-badge-inline.bonus {
  background: rgba(255, 122, 0, 0.2);
  color: #ff9d42;
  border: 1px solid rgba(255, 122, 0, 0.4);
}

.pkg-row-price {
  text-align: right;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-orange-bright);
  user-select: text;
}

.pkg-orig-striked {
  font-size: 0.75rem;
  color: var(--text-dark);
  text-decoration: line-through;
  margin-right: 6px;
  font-weight: normal;
}

.pkg-row-currency {
  text-align: center;
  color: var(--text-muted);
  font-weight: 500;
  user-select: text;
}

.pkg-row-action {
  text-align: right;
}

.btn-row-copy {
  background: rgba(255, 122, 0, 0.12);
  border: 1px solid rgba(255, 122, 0, 0.35);
  color: var(--color-orange-bright);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.btn-row-copy:hover {
  background: var(--color-orange);
  color: #fff;
  border-color: var(--color-orange);
  box-shadow: 0 0 8px var(--color-orange-glow);
}

/* Inline Edit Controls in Table */
.inline-input-table {
  background: #090c13;
  border: 1px solid var(--border-medium);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  outline: none;
  width: 100%;
}

.inline-input-table:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 1px var(--color-orange);
  background: #111522;
}

.table-footer-actions {
  background: var(--bg-hud);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-row-del {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.btn-row-del:hover {
  background: var(--color-red);
  color: #fff;
}

/* ============ Direct Manual Top-up Dispatcher Bar ============ */
.direct-inject-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.inject-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}

.inject-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.input-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 130px;
}

.input-wrap.flex-2 {
  flex: 2;
  min-width: 200px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-inject {
  background: linear-gradient(135deg, #ff7a00, #d95300);
  border: 1px solid #ff7a00;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  height: 35px;
}

.btn-inject:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 12px var(--color-orange-glow);
}

/* ============ Bank Card & QR Widget ============ */
.bank-card-block {
  border-left: 3px solid #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(22, 27, 44, 0.95));
}

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

.btn-copy-acc-no {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-copy-acc-no:hover {
  background: #10b981;
  color: #000;
}

.bank-details-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bank-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bank-row {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
}

.bank-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.bank-val {
  font-size: 0.88rem;
  user-select: text;
}

.bank-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.btn-bank-action {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
}

.btn-bank-action:hover {
  border-color: var(--color-green);
  color: #34d399;
}

.bank-qr-col {
  width: 95px;
  height: 95px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.qr-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform var(--transition);
}

.qr-thumbnail-img:hover {
  transform: scale(1.05);
}

/* ============ Telemetry & Live Stream ============ */
.telemetry-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.telemetry-block {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.75rem;
}

.block-title {
  font-weight: 700;
  color: #fff;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--color-orange);
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 6px var(--color-orange);
}

.order-feed-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stream-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--color-orange);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.stream-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.stream-uid {
  color: #e2e8f0;
}

.stream-status {
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 2px;
}

.stream-status.processing {
  background: rgba(255, 122, 0, 0.2);
  color: var(--color-orange-bright);
}

.stream-status.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-green);
}

.stream-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.stream-price {
  color: var(--color-orange-bright);
  font-weight: 700;
}

.operator-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}

.op-link-row {
  display: flex;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
}

/* ============ Terminal Drawer ============ */
.operator-terminal-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-terminal);
  border-top: 2px solid var(--border-medium);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.7);
  z-index: 990;
  display: flex;
  flex-direction: column;
  transition: height var(--transition);
  height: 220px;
}

.operator-terminal-drawer.collapsed {
  height: 38px;
  overflow: hidden;
}

.operator-terminal-drawer.expanded {
  height: 480px;
}

.terminal-header {
  background: var(--bg-hud);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.terminal-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.terminal-tab {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-orange-bright);
}

.terminal-badge {
  font-size: 0.65rem;
  color: var(--text-dark);
}

.terminal-controls {
  display: flex;
  gap: 6px;
}

.term-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 2px;
  cursor: pointer;
}

.term-btn:hover {
  color: #fff;
  border-color: var(--color-orange);
}

.term-btn.close {
  font-size: 1rem;
  line-height: 1;
}

.terminal-body {
  flex: 1;
  padding: 10px 16px;
  overflow-y: auto;
  font-size: 0.78rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #06080d;
}

.term-line {
  word-break: break-all;
}

.term-line.info { color: #94a3b8; }
.term-line.success { color: #34d399; }
.term-line.warn { color: #fbbf24; }
.term-line.error { color: #f87171; }
.term-line.cmd { color: var(--color-orange-bright); }

.terminal-input-bar {
  background: var(--bg-hud);
  border-top: 1px solid var(--border-subtle);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prompt-symbol {
  font-size: 0.78rem;
  color: var(--color-orange-bright);
  font-weight: 700;
  white-space: nowrap;
}

.terminal-input {
  border: none;
  background: transparent;
  padding: 4px;
}

.terminal-input:focus {
  border: none;
  box-shadow: none;
}

/* ============ Modals ============ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-card.modal-lg {
  max-width: 820px;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close:hover { color: #fff; }

.modal-body {
  padding: 18px;
  overflow-y: auto;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.admin-tab-btn {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  white-space: nowrap;
}

.admin-tab-btn.active {
  background: rgba(255, 122, 0, 0.18);
  border-color: var(--color-orange);
  color: var(--color-orange-bright);
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

.api-notice-box {
  background: rgba(255, 122, 0, 0.08);
  border-left: 3px solid var(--color-orange);
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  margin-bottom: 14px;
  line-height: 1.4;
}

.secret-input-wrap {
  display: flex;
  gap: 6px;
}

.btn-toggle-secret {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.btn-toggle-secret:hover {
  color: #fff;
  border-color: var(--color-orange);
}

.api-test-card {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 12px;
  margin-top: 14px;
}

.test-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.api-test-output {
  background: #05070a;
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  border-radius: 3px;
  font-size: 0.74rem;
  color: #a5f3fc;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.backup-section {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 14px;
}

.backup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, #ff7a00, #d95300);
  color: #fff;
  border-color: #ff7a00;
  box-shadow: 0 2px 10px var(--color-orange-glow);
}

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

.btn-secondary {
  background: var(--bg-panel-alt);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--color-orange);
  color: #fff;
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: var(--color-red);
  color: #fff;
}

.btn-sm {
  padding: 3px 8px;
  font-size: 0.75rem;
}

/* ============ Toast ============ */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10000;
}

.toast {
  background: var(--bg-panel-alt);
  border-left: 3px solid var(--color-orange);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: slideInToast 0.2s ease-out;
  color: #fff;
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .operator-workspace {
    grid-template-columns: 1fr;
  }
  .hud-metrics {
    gap: 12px;
  }
  .hide-mobile {
    display: none;
  }
}

@media (max-width: 640px) {
  .operator-hud {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .hud-metrics {
    width: 100%;
    justify-content: space-between;
  }
  .hud-actions {
    width: 100%;
    justify-content: space-between;
  }
  .inject-form {
    flex-direction: column;
    align-items: stretch;
  }
  .packages-data-table th:nth-child(3),
  .packages-data-table td:nth-child(3) {
    display: none;
  }
}
