:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  font-synthesis: none;
  color: #f4f2ff;
  background-color: #080b15;
  --panel: rgba(17, 22, 36, 0.88);
  --panel-deep: rgba(11, 16, 29, 0.9);
  --ink-muted: #a8aec4;
  --line: #283049;
  --accent: #b3a5ff;
  --focus: #b3a5ff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
}
html::before {
  content: "";
  position: fixed;
  inset: -30px;
  z-index: -2;
  background: url('/assets/background.jpg') center center / cover no-repeat;
  filter: blur(14px) brightness(0.32) saturate(1.2);
  transform: scale(1.05);
  pointer-events: none;
}
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 20%, rgba(13, 16, 35, 0.45) 0%, rgba(7, 9, 18, 0.88) 85%);
  pointer-events: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent !important;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

:is(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.site-header {
  background: rgba(11, 14, 25, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #20253a;
}

.header-content, .main-content {
  width: min(1720px, calc(100% - 32px));
  margin-inline: auto;
}

.header-content {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #14102a;
  background: linear-gradient(140deg, #c8bbff, #8f7cf9);
  border-radius: 9px;
  font-weight: 900;
}

.brand-accent { color: var(--accent); }
.brand-domain { color: #939ab3; font-size: .82em; margin-left: 2px; }
.main-content { padding-block: clamp(44px, 7vw, 88px) 80px; }
.page-heading { margin-bottom: 32px; }

h1, h2, p { margin: 0; }
h1 {
  margin-bottom: 12px;
  font-size: clamp(1.78rem, 4vw, 2.85rem);
  letter-spacing: -.04em;
  line-height: 1.15;
}
h2 { font-size: 1.19rem; line-height: 1.3; }
.page-heading p, .order-count { color: var(--ink-muted); }
.page-heading p { line-height: 1.6; }

.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 50px #05061055;
}

.login-panel { width: min(440px, 100%); padding: clamp(22px, 4vw, 32px); }
.login-panel form { display: grid; gap: 12px; margin-top: 22px; }
.login-panel label { font-size: .9rem; font-weight: 650; }

input, select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-deep);
  color: inherit;
}

input { min-width: 0; padding: 10px 12px; }
select { padding-inline: 10px; }

.button {
  display: inline-flex;
  min-height: 40px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 13px;
  font-size: .88rem;
  line-height: 1.25;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.button-primary { color: #121026; background: #aa99ff; }
.button-primary:is(:hover, :focus-visible):not(:disabled) { background: #c1b4ff; }
.button-secondary { border-color: var(--line); background: var(--panel-deep); }
.button-secondary:is(:hover, :focus-visible):not(:disabled) { background: #1d2440; border-color: #46466f; }
.button-danger {
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.45);
  border: 1px solid #7f1d1d;
  transition: all 0.16s ease;
}
.button-danger:is(:hover, :focus-visible):not(:disabled) {
  background: #dc2626;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}
.button:disabled { cursor: default; opacity: .58; }
.login-panel .button { margin-top: 6px; }

.panel-header {
  padding: 23px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.order-count { font-size: .87rem; margin-top: 5px; }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.feedback { font-size: .9rem; line-height: 1.5; color: var(--ink-muted); overflow-wrap: anywhere; }
.feedback:empty { margin: 0; }
.login-panel .feedback:empty { margin-top: -12px; }
.feedback.is-error { color: #ffaebd; }
.orders-feedback { margin: 0 24px 17px; }
.empty-state { padding: 35px 24px; text-align: center; color: var(--ink-muted); border-top: 1px solid var(--line); }
.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: clamp(380px, 58vh, 620px);
  border-top: 1px solid var(--line);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #6d58c7 #0a0d18;
}
.table-wrap::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
.table-wrap::-webkit-scrollbar-track {
  background: #0a0d18;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #554488;
  border-radius: 4px;
  border: 1px solid #283049;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #8b5cf6;
}
.table-wrap:focus-visible { outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; text-align: left; }
thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0d1222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  color: var(--ink-muted);
}

/* Cố định cột Mã đơn (Sticky) để khi cuộn ngang không bao giờ bị che khuất */
thead th:first-child {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 15;
  background: #0d1222;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.5);
}
tbody tr > th:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #0e1324;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.5);
}

th, td { padding: 9px 10px; white-space: nowrap; }
thead th { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
tr > :first-child {
  padding-left: 14px;
  padding-right: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.77rem;
  letter-spacing: -0.015em;
  color: #f1f5f9;
  cursor: pointer;
  white-space: nowrap;
}
tr > :last-child { padding-right: 14px; }
tbody tr + tr { border-top: 1px solid var(--line); }
tbody th { font-variant-numeric: tabular-nums; }
tbody td { vertical-align: middle; }
tbody td[data-label="UID"] { font-family: ui-monospace, monospace; font-size: 0.8rem; color: #cbd5e1; }
.time-label { display: block; color: var(--ink-muted); font-size: .72rem; line-height: 1.35; }
.time-label + .time-label { margin-top: 1px; }
.status {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 6px;
  background: #242942;
  color: #d3d7ea;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.status[data-status="pending"] { color: #ffe1a1; background: #3b2d21; }
.status[data-status="processing"] { color: #d9c8ff; background: #302551; }
.status[data-status="completed"] { color: #97e9cb; background: #173b38; }
.status[data-status="cancelled"] { color: #ffc0c9; background: #48293a; }
.update-controls { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.update-controls label { display: grid; gap: 1px; font-size: .68rem; color: var(--ink-muted); }
.update-controls input { width: 75px; min-height: 32px; padding: 4px 6px; font-size: 0.78rem; }
.update-controls select { min-height: 32px; padding: 4px 6px; font-size: 0.78rem; }
.update-controls .button { min-height: 32px; padding: 4px 10px; font-size: 0.78rem; }
.admin-nav { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-nav [aria-current="page"] { color: #e3d8ff; border-color: #8f76ed; background: #292044; }
.admin-nav #logout { margin-inline-start: auto; }
.users-panel { padding: clamp(16px, 3vw, 25px); }
.user-search { display: grid; gap: 6px; margin: 16px 0 12px; }
.user-search label { color: var(--ink-muted); font-size: 13px; }
.user-search > div { display: flex; gap: 8px; }
.user-search input { width: min(100%, 380px); min-width: 0; }
.users-list { display: grid; gap: 8px; margin: 12px 0; list-style: none; padding: 0; }
.user-row { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.user-row p { font-size: 13px; color: var(--ink-muted); margin-top: 3px; overflow-wrap: anywhere; }
.user-row strong { overflow-wrap: anywhere; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.btn-add-good { color: #4ade80 !important; border-color: #22c55e55 !important; font-weight: 650; }
.btn-add-good:hover { background: #14532d55 !important; border-color: #4ade80 !important; }
.btn-sub-good { color: #f87171 !important; border-color: #ef444455 !important; font-weight: 650; }
.btn-sub-good:hover { background: #7f1d1d55 !important; border-color: #f87171 !important; }

/* Realtime Badge */
.realtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #0f231e;
  color: #34d399;
  border: 1px solid #05966955;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-live 1.6s infinite ease-in-out;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Account Column in Table */
.account-col {
  vertical-align: middle;
  min-width: 110px;
  max-width: 170px;
  white-space: normal;
}
.admin-account-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.account-primary {
  color: #c4b5fd;
  font-weight: 650;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.account-secondary {
  color: var(--ink-muted);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.guest-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-size: 0.72rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

/* Progress Column in Table */
.progress-col {
  min-width: 220px;
  max-width: none;
  vertical-align: middle;
  white-space: normal;
}
.progress-text {
  display: grid;
  gap: 6px;
  font-size: 0.76rem;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.progress-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.profile-likes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; color: #a8aec4; font-size: 11px; line-height: 1.5; }
.profile-likes-grid > span { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.profile-likes-grid strong { color: #a8d0ff; }
.progress-text strong {
  color: #f1f5f9;
}
.percent-badge {
  font-size: 0.7rem;
  font-weight: 750;
  padding: 1px 6px;
  border-radius: 8px;
  background: #22293f;
  color: #94a3b8;
}
.percent-badge[data-status="processing"] {
  background: #1e1b4b;
  color: #a5b4fc;
  border: 1px solid #4338ca55;
}
.percent-badge[data-status="completed"] {
  background: #064e3b;
  color: #6ee7b7;
}
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #161c2d;
  border: 1px solid #283049;
  border-radius: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.35s ease;
  background: #475569;
}
.progress-bar-fill[data-status="processing"] {
  background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981);
  background-size: 200% 100%;
  animation: gradient-flow 2s linear infinite;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}
.progress-bar-fill[data-status="completed"] {
  background: #10b981;
}
.progress-bar-fill[data-status="cancelled"] {
  background: #ef4444;
}
@keyframes gradient-flow {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
/* Live Activity Console in Admin */
.live-console-wrap {
  border-top: 1px solid var(--line);
  background: #080c16;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}
.console-header {
  padding: 10px 18px;
  background: #0d1222;
  border-bottom: 1px solid #1a2238;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.console-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #e2e8f0;
}
.log-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: #1e293b;
  color: #94a3b8;
  font-weight: 700;
}
.console-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}
.console-select {
  min-height: 30px !important;
  padding: 2px 8px !important;
  font-size: 0.78rem !important;
  background: #13192b !important;
  border-color: #2a3450 !important;
  border-radius: 6px !important;
}
.console-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--ink-muted);
  user-select: none;
}
.button-xs {
  min-height: 28px !important;
  padding: 3px 10px !important;
  font-size: 0.78rem !important;
}
.terminal-body {
  height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 16px;
  background: #060912;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: #3b2d60 #070a14;
}
.terminal-full {
  height: 65vh;
  min-height: 400px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.terminal-body::-webkit-scrollbar {
  width: 6px;
}
.terminal-body::-webkit-scrollbar-track {
  background: #070a14;
}
.terminal-body::-webkit-scrollbar-thumb {
  background: #3b2d60;
  border-radius: 3px;
}
.terminal-line {
  margin-bottom: 3px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  word-break: break-word;
}
.terminal-line .log-time {
  color: #64748b;
  flex: none;
  font-size: 0.73rem;
}
.terminal-line .log-lvl {
  font-weight: 700;
  flex: none;
  font-size: 0.73rem;
  padding: 1px 4px;
  border-radius: 4px;
}
.terminal-line .log-src {
  color: #a78bfa;
  flex: none;
  font-size: 0.73rem;
}
.terminal-line .log-text {
  color: #e2e8f0;
}
.terminal-line.log-SUCCESS .log-lvl { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.terminal-line.log-SUCCESS .log-text { color: #86efac; }
.terminal-line.log-INFO .log-lvl { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.terminal-line.log-INFO .log-text { color: #cbd5e1; }
.terminal-line.log-WARNING .log-lvl { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.terminal-line.log-WARNING .log-text { color: #fde68a; }
.terminal-line.log-ERROR .log-lvl { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.terminal-line.log-ERROR .log-text { color: #fca5a5; font-weight: 600; }

/* ==========================================================================
   IP Security & Whitelist Styling
   ========================================================================== */
.ip-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink-muted);
}
.ip-status-badge.ip-allowed {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.ip-status-badge.ip-allowed strong {
  color: #a7f3d0;
  font-family: ui-monospace, monospace;
}
.ip-status-badge.ip-blocked {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  display: block;
  line-height: 1.5;
}
.ip-status-badge.ip-blocked strong {
  color: #fee2e2;
  font-family: ui-monospace, monospace;
}

.security-current-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(26, 33, 56, 0.55);
  border: 1px solid rgba(99, 102, 241, 0.28);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.current-ip-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.security-shield-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.current-ip-title {
  font-size: 0.95rem;
  color: #e2e8f0;
}
.current-ip-title strong {
  color: #38bdf8;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 1.05rem;
  margin-left: 4px;
}
.current-ip-desc {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 3px;
}

.security-add-form-wrap {
  background: rgba(13, 18, 32, 0.75);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
}
.security-add-form-wrap h3, .security-list-wrap h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 14px;
}
.security-form .form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.security-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
}
.security-form label {
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.security-form input {
  height: 38px;
  font-size: 0.84rem;
}

.whitelist-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.whitelist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(13, 17, 30, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  gap: 16px;
  flex-wrap: wrap;
}
.whitelist-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.whitelist-ip-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.whitelist-ip-title strong {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.92rem;
  color: #a5b4fc;
  letter-spacing: -0.01em;
}
.current-ip-badge {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.whitelist-note {
  font-size: 0.8rem;
  color: #cbd5e1;
}
.whitelist-time {
  font-size: 0.72rem;
  color: var(--ink-muted);
}
.whitelist-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 600px) {
  .user-row { grid-template-columns: minmax(0, 1fr) auto; }
  .user-row > :first-child { grid-column: 1 / -1; }
  .admin-nav #logout { margin-inline-start: 0; }
}

@media (max-width: 760px) {
  .table-wrap { overflow-x: hidden; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 16px; }
  tbody tr > :is(th, td) { display: block; padding: 0; white-space: normal; overflow-wrap: anywhere; }
  tbody tr > :first-child, tbody tr > :last-child { grid-column: 1 / -1; }
  tbody td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--ink-muted); font-size: .76rem; }
  .update-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  .update-controls input, .update-controls select { width: 100%; font-size: 16px; }
  .update-controls .button { grid-column: 1 / -1; }
  .login-panel input { font-size: 16px; }
  .button { min-height: 44px; }
}

@media (max-width: 560px) {
  .header-content, .main-content { width: calc(100% - 32px); }
  .header-content { min-height: 62px; }
  .panel-header { padding-inline: 18px; }
  .orders-feedback { margin-inline: 18px; }
  tr > :first-child { padding-left: 18px; }
  tr > :last-child { padding-right: 18px; }
}
/* Keep each order field inside its own column at desktop widths. */
@media (min-width: 761px) {
  #orders-table, .table-wrap table { table-layout: fixed; min-width: 1480px; }
  .table-wrap table th, .table-wrap table td { vertical-align: middle; padding: 14px 12px; }
  .table-wrap table tr > :nth-child(1) { width: 245px; white-space: normal; overflow-wrap: anywhere; }
  .table-wrap table tr > :nth-child(2) { width: 190px; }
  .table-wrap table tr > :nth-child(3) { width: 190px; white-space: normal; overflow-wrap: anywhere; }
  .table-wrap table tr > :nth-child(4) { width: 225px; }
  .table-wrap table tr > :nth-child(5) { width: 155px; }
  .table-wrap table tr > :nth-child(6) { width: 120px; }
  .table-wrap table tr > :nth-child(7) { width: 320px; }
  .update-controls { align-items: end; gap: 7px; }
  .update-controls input { width: 88px; }
  .update-controls select { max-width: 110px; }
}
@media (max-width: 760px) {
  .table-wrap table { min-width: 0; }
  tbody tr > th:first-child { position: static; box-shadow: none; background: transparent; }
  .progress-col, .account-col { min-width: 0; max-width: none; }
  .progress-col { grid-column: 1 / -1; }
  .update-controls { gap: 10px; }
  .time-label { white-space: normal; }
  .panel-actions { width: 100%; }
  .terminal-controls { flex-wrap: wrap; }
}

.order-eta { display: block; margin: 7px 0 0; color: #c7b8ff; font-size: 12px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }

.main-content:has(> .orders-panel:not([hidden])) { width: calc(100% - clamp(24px, 3vw, 56px)); max-width: none; }

/* Keep the order controls and more rows in the same viewport. */
.main-content:has(> .orders-panel:not([hidden])) { padding-block: 16px; }
.main-content:has(> .orders-panel:not([hidden])) .page-heading { margin-bottom: 10px; }
.main-content:has(> .orders-panel:not([hidden])) .page-heading h1 { font-size: clamp(22px, 2vw, 30px); margin-bottom: 0; }
.main-content:has(> .orders-panel:not([hidden])) .page-heading p { display: none; }
.orders-panel .panel-header { padding-block: 10px; }
.orders-panel .orders-feedback:empty { display: none; }
.orders-panel .table-wrap { max-height: max(300px, calc(100dvh - 180px)); }
@media (min-width: 761px) {
  .orders-panel .table-wrap table :is(th, td) { padding-block: 6px; }
  .orders-panel .progress-text { gap: 2px; margin-bottom: 2px; }
  .orders-panel .profile-likes-grid { line-height: 1.3; }
  .orders-panel .profile-likes-grid > span { display: flex; flex-wrap: wrap; gap: 3px; }
  .orders-panel .order-eta { margin-top: 2px; font-size: 11px; line-height: 1.25; }
}

#pricing-workspace{max-width:1100px;margin-inline:auto}#pricing-workspace p{line-height:1.7;color:#bcb8ce}#pricing-form table{width:100%;min-width:560px}#pricing-form input{width:150px;max-width:100%;font-size:16px;padding:10px 12px;color:#f5f2ff;background:#111323;border:1px solid #625078;border-radius:8px}#pricing-form .panel-actions{justify-content:flex-start;gap:12px;margin-top:20px}#pricing-feedback{min-height:24px}

#pricing-workspace{padding:26px;box-sizing:border-box}#pricing-workspace h2{margin:0 0 10px}#pricing-form .table-wrap{margin-top:20px}@media(max-width:600px){#pricing-workspace{padding:18px}}

.user-row.user-has-topup{grid-template-columns:minmax(0,1.4fr) minmax(110px,.75fr) minmax(120px,.75fr) auto}.user-topup-total strong{color:#cbb0ff}.user-topup-total p{font-size:12px;margin:0 0 5px}@media(max-width:1000px){.user-row.user-has-topup{grid-template-columns:minmax(0,1.4fr) minmax(110px,1fr) minmax(120px,1fr)}.user-has-topup .user-actions{grid-column:1/-1}}@media(max-width:600px){.user-row.user-has-topup{grid-template-columns:1fr 1fr}.user-row.user-has-topup>:first-child{grid-column:1/-1}}
