:root {
  --qp-ink: #060708;
  --qp-carbon: #0E1114;
  --qp-carbon-2: #13171C;
  --qp-carbon-3: #171C22;
  --qp-line: rgba(30, 36, 43, 0.65);
  --qp-line-2: rgba(42, 50, 59, 0.7);
  --qp-mint: #00D7BD;
  --qp-mint-hi: #37F0D6;
  --qp-mint-deep: #04A28C;
  --qp-paper: #EEF3F2;
  --qp-mute: #97A1AA;
  --qp-mute-2: #5C656F;
  --qp-radius: 14px;
  --qp-radius-sm: 8px;
  --qp-font: 'Inter', system-ui, sans-serif;
  --qp-panel-bg: rgba(14, 17, 20, 0.72);
  --qp-panel-bg-2: rgba(19, 23, 28, 0.68);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  background: transparent !important;
  background-color: rgba(0, 0, 0, 0) !important;
  font-family: var(--qp-font);
  color: var(--qp-paper);
  overflow: hidden;
  pointer-events: none;
}

.hidden { display: none !important; }

.qp-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background: var(--qp-panel-bg);
  border: 1px solid rgba(0, 215, 189, 0.28);
  border-radius: var(--qp-radius);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 16px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.qp-panel--admin {
  width: min(480px, calc(100vw - 48px));
  max-height: min(88vh, 760px);
}

.qp-panel--pump {
  width: min(380px, calc(100vw - 48px));
  max-height: min(90vh, 720px);
}

.qp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--qp-line);
  background: var(--qp-panel-bg-2);
}

.qp-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.qp-logo-img {
  width: 160px;
  height: auto;
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.qp-brand-sub {
  font-size: 0.72rem;
  color: var(--qp-mute);
}

.qp-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--qp-line-2);
  border-radius: var(--qp-radius-sm);
  background: rgba(23, 28, 34, 0.55);
  color: var(--qp-paper);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.qp-close:hover {
  border-color: var(--qp-mint);
  color: var(--qp-mint);
}

.qp-live {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--qp-line);
}

.qp-live-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qp-live-item .label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--qp-mute-2);
}

.qp-live-item strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.qp-live-fuel {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qp-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(30, 36, 43, 0.8);
  overflow: hidden;
}

.qp-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--qp-mint-deep), var(--qp-mint-hi));
  transition: width 0.35s ease;
}

.qp-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 18px 0;
}

.qp-tab {
  flex: 1;
  padding: 8px 8px;
  border: 1px solid var(--qp-line);
  border-bottom: none;
  border-radius: var(--qp-radius-sm) var(--qp-radius-sm) 0 0;
  background: rgba(23, 28, 34, 0.5);
  color: var(--qp-mute);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.qp-tab.is-active {
  color: #04120F;
  background: var(--qp-mint);
  border-color: var(--qp-mint);
}

.qp-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  border-top: 1px solid var(--qp-line);
}

.qp-pane { display: none; }
.qp-pane.is-active { display: block; }

.qp-desc {
  font-size: 0.78rem;
  color: var(--qp-mute);
  line-height: 1.5;
  margin-bottom: 12px;
}

.qp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.qp-field span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--qp-mute);
}

.qp-field input,
.qp-field textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--qp-radius-sm);
  border: 1px solid var(--qp-line-2);
  background: rgba(6, 7, 8, 0.4);
  color: var(--qp-paper);
  font: inherit;
  font-size: 0.82rem;
  outline: none;
}

.qp-field input:focus,
.qp-field textarea:focus {
  border-color: rgba(0, 215, 189, 0.55);
}

.qp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qp-class-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qp-class-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--qp-line);
  border-radius: var(--qp-radius-sm);
  background: rgba(23, 28, 34, 0.35);
}

.qp-class-row input {
  width: 100%;
  padding: 7px 8px;
  border-radius: 6px;
  border: 1px solid var(--qp-line-2);
  background: rgba(6, 7, 8, 0.4);
  color: var(--qp-paper);
  font: inherit;
  font-size: 0.8rem;
  text-align: center;
}

.qp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--qp-line);
  background: var(--qp-panel-bg-2);
}

.qp-hint {
  font-size: 0.65rem;
  color: var(--qp-mute-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qp-btn {
  padding: 9px 16px;
  border-radius: var(--qp-radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.qp-btn--primary {
  background: var(--qp-mint);
  color: #04120F;
}

.qp-btn--primary:hover {
  background: var(--qp-mint-hi);
}

.qp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qp-btn--ghost {
  background: rgba(23, 28, 34, 0.45);
  color: var(--qp-paper);
  border-color: var(--qp-line-2);
}

.qp-header--compact {
  padding: 16px 18px 12px;
}

.qp-header--compact h1 {
  font-size: 1rem;
  font-weight: 700;
}

.qp-header--compact p {
  font-size: 0.75rem;
  color: var(--qp-mute);
  margin-top: 2px;
}

.qp-pump-body {
  padding: 16px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: min(52vh, 440px);
}

.qp-pump-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--qp-line);
  border-radius: var(--qp-radius-sm);
  background: rgba(23, 28, 34, 0.35);
}

.qp-pump-stat span {
  font-size: 0.75rem;
  color: var(--qp-mute);
}

.qp-pump-stat strong {
  font-size: 0.95rem;
  color: var(--qp-mint-hi);
}

.qp-pump-value {
  text-align: center;
}

.qp-pump-value strong {
  font-size: 1.2rem;
}

.qp-pump-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.qp-pump-total strong {
  font-size: 1.35rem;
  color: var(--qp-mint);
}

.qp-pump-rate {
  text-align: center;
  font-size: 0.75rem;
  color: var(--qp-mute-2);
}

.qp-payment {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--qp-line);
}

.qp-payment-label {
  font-size: 0.72rem;
  color: var(--qp-mute);
  font-weight: 500;
}

.qp-payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qp-pay-opt {
  padding: 8px 10px;
  border-radius: var(--qp-radius-sm);
  border: 1px solid var(--qp-line-2);
  background: rgba(23, 28, 34, 0.45);
  color: var(--qp-paper);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.qp-pay-opt.is-active {
  background: rgba(0, 215, 189, 0.18);
  border-color: var(--qp-mint);
  color: var(--qp-mint-hi);
}

.qp-payment-balances {
  font-size: 0.68rem;
  color: var(--qp-mute-2);
  text-align: center;
}

#pump-liters, #jerry-liters, #live-fuel-slider {
  width: 100%;
  accent-color: var(--qp-mint);
}

.qp-content::-webkit-scrollbar { width: 5px; }
.qp-content::-webkit-scrollbar-thumb {
  background: var(--qp-line-2);
  border-radius: 999px;
}
