:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --surface-soft: #f1f5f9;
  --surface-hover: #e8eef5;
  --line: #e3e8ef;
  --line-strong: #cfd8e3;
  --text: #172033;
  --text-soft: #334155;
  --muted: #526176;
  --primary: #155eef;
  --primary-light: #155eef;
  --primary-deep: #0b4dd8;
  --blue: #2563eb;
  --green: #12805c;
  --amber: #b76e00;
  --red: #c9364f;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
  --sidebar-width: 252px;
  font-family:
    "Segoe UI Variable Text", Aptos, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
}

body.dialog-open,
body.sidebar-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button {
  border: 0;
}

button:not(:disabled),
a {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-deep);
}

:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.28);
  outline-offset: 3px;
}

::selection {
  color: #fff;
  background: var(--primary);
}

[hidden] {
  display: none !important;
}

[data-view="kyc"], [data-view-link="kyc"], [data-view="admin-kyc"], [data-view-link="admin-kyc"], [data-view="wallet"], [data-view-link="wallet"], #wallet-adjustment-modal { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--primary-deep);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.025);
}

.sidebar-head {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

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

.brand:hover {
  color: var(--primary-deep);
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 2px solid #6f8fff;
  border-radius: 10px;
  overflow: hidden;
  color: transparent;
  background: url('/brand.svg') center / cover no-repeat;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.28), inset 0 0 0 1px rgba(255,255,255,0.22);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: none;
  transform: none;
}

.single-use-card-icon { position: relative; overflow: hidden; }
.single-use-card-icon::before { content: ""; width: 24px; height: 16px; border: 2px solid currentColor; border-radius: 4px; box-shadow: 5px -4px 0 -2px #fff, 5px -4px 0 0 currentColor; }
.single-use-card-icon i { position: absolute; width: 10px; height: 2px; left: 12px; bottom: 11px; background: currentColor; border-radius: 2px; }
.paypal-mark { color: #fff !important; background: linear-gradient(150deg, #003087, #0070e0 62%, #009cde) !important; border-color: #62b5f5 !important; font-size: 1.35rem; font-weight: 900; font-style: italic; text-shadow: 2px 0 #003087; }
.inventory-badge { display: block; margin-bottom: 4px; color: var(--green); font-size: .78rem; font-weight: 800; text-align: right; }
.menu-glyph {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #bfd3f8;
  border-radius: 8px;
  background-color: #eef4ff !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  box-shadow: 0 2px 6px rgba(15, 35, 70, .08);
}
.icon-overview { background-image: url('/icons/overview.svg') !important; }
.icon-card { background-image: url('/icons/card.svg') !important; }
.icon-orders { background-image: url('/icons/orders.svg') !important; }
.icon-users { background-image: url('/icons/users.svg') !important; }
.icon-products { background-image: url('/icons/products.svg') !important; }
.icon-inventory { background-image: url('/icons/inventory.svg') !important; }
.icon-audit { background-image: url('/icons/audit.svg') !important; }
.icon-mail { background-image: url('/icons/mail.svg') !important; }
.icon-chat { background-image: url('/icons/chat.svg') !important; }
.paypal-mark { color: transparent !important; background: #fff url('/icons/paypal.svg') center / 88% no-repeat !important; border-color: #9cccf2 !important; box-shadow: 0 4px 12px rgba(0, 48, 135, .16); font-size: 0; text-shadow: none; }
.admin-order-detail-row td { padding-top: 0; background: var(--surface-raised); }
.admin-order-details { padding: 8px 12px 14px; }
.admin-order-details summary { color: var(--primary); font-weight: 700; cursor: pointer; }

.mail-actions { display: flex; gap: 10px; }
.mail-workspace { display: grid; min-height: 620px; padding: 0; grid-template-columns: 330px minmax(0, 1fr); overflow: hidden; }
.mail-list { border-right: 1px solid var(--line); overflow-y: auto; }
.mail-list-item { display: grid; width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 13px 15px; gap: 4px; color: var(--text-soft); background: transparent; font-size: 13px; text-align: left; cursor: pointer; }
.mail-list-item:hover, .mail-list-item.active { background: #eef4ff; }
.mail-list-item.unread { border-left: 3px solid #155eef; background: #f7faff; }
.mail-list-item.unread::before { content: ""; position: absolute; width: 7px; height: 7px; margin: 5px 0 0 -11px; border-radius: 50%; background: #155eef; box-shadow: 0 0 0 3px rgba(21,94,239,.12); }
.mail-list-item { position: relative; }
.mail-list-item strong { color: #26354d; font-size: 14px; line-height: 1.4; }
.mail-list-item.unread strong { color: var(--text); font-weight: 800; }
.mail-list-item small { overflow: hidden; color: #64748b; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.mail-list-meta { display: flex; justify-content: space-between; gap: 8px; }
.mail-list-heading { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 9px; }
.mail-list-heading strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mail-read-status { display: inline-flex; flex: 0 0 auto; width: fit-content; border-radius: 999px; padding: 2px 7px; font-size: 9px; font-weight: 850; line-height: 1.45; letter-spacing: .035em; text-transform: uppercase; }
.mail-read-status.unread { color: #fff; background: #155eef; box-shadow: 0 2px 7px rgba(21,94,239,.2); }
.mail-read-status.read { color: #64748b; background: #edf1f6; }
.mail-unread-count { min-width: 22px; margin-left: auto; border-radius: 999px; padding: 2px 7px; color: #fff; background: #e11d48; font-size: 11px; font-weight: 800; line-height: 1.5; text-align: center; }
.mail-reader { min-width: 0; padding: 22px 24px; font-size: 14px; }
.mail-reader-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.mail-reader-head > div { min-width: 0; }
.mail-reader-head h3 { margin: 0 0 7px; color: #182236; font-size: 20px; line-height: 1.35; }
.mail-reader-head p { margin: 0; color: #526176; font-size: 12px; }
.mail-message-body { min-height: 360px; color: #334155; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.65; }
.mail-message-body h1 { font-size: 22px; }.mail-message-body h2 { font-size: 19px; }.mail-message-body h3 { font-size: 17px; }
.mail-message-body p { margin: 0 0 12px; }
.mail-message-body img { display: block; max-width: 100%; height: auto; margin: 10px 0; }
.mail-inline-attachment { border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.mail-message-body table { max-width: 100%; font-size: 13px; }
.mail-attachment-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.mail-compose-modal { width: min(920px, calc(100% - 32px)); }
.mail-compose-form { display: grid; gap: 13px; }
.mail-editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; padding: 8px; background: var(--surface-raised); }
.mail-editor-toolbar button { border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; background: #fff; cursor: pointer; }
.mail-editor { min-height: 300px; max-height: 520px; border: 1px solid var(--line); border-radius: 0 0 10px 10px; padding: 16px; overflow-y: auto; color: var(--text); background: #fff; outline: none; }
.mail-editor:empty::before { content: attr(data-placeholder); color: var(--muted); }
.mail-editor img { max-width: min(100%, 720px); height: auto; }
.mail-attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mail-attachment-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; color: var(--text-soft); background: var(--surface-raised); font-size: .78rem; }

@media (max-width: 900px) { .mail-workspace { grid-template-columns: 1fr; } .mail-list { max-height: 320px; border-right: 0; border-bottom: 1px solid var(--line); } }

.customer-chat-launcher { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 999px; padding: 13px 18px; color: #fff; background: #155eef; box-shadow: 0 12px 30px rgba(21,94,239,.3); font-weight: 800; cursor: pointer; }
.customer-chat-launcher b { min-width: 22px; border-radius: 999px; padding: 2px 6px; color: #be123c; background: #fff; font-size: 11px; }
.customer-chat-panel { position: fixed; right: 22px; bottom: 82px; z-index: 80; width: min(380px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: #fff; box-shadow: 0 22px 55px rgba(20,35,66,.24); }
.customer-chat-panel header { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; color: #fff; background: #0c1424; }
.customer-chat-panel header div { display: grid; gap: 2px; }.customer-chat-panel header small { color: #9fb0cf; font-size: 11px; }.customer-chat-panel header button { border: 0; color: #fff; background: transparent; font-size: 22px; cursor: pointer; }
.customer-chat-messages, .support-chat-messages { display: flex; min-height: 250px; max-height: 430px; flex-direction: column; gap: 9px; padding: 15px; overflow-y: auto; background: #f7f9fc; }
.chat-message { max-width: 82%; border-radius: 13px 13px 13px 4px; padding: 9px 11px; color: #26354d; background: #fff; box-shadow: 0 2px 8px rgba(20,35,66,.06); font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.chat-message.own { align-self: flex-end; border-radius: 13px 13px 4px 13px; color: #fff; background: #155eef; }
.chat-message time { display: block; margin-top: 4px; color: inherit; font-size: 9px; opacity: .7; }
.customer-chat-panel form, .support-chat-reply-form { display: flex; gap: 8px; border-top: 1px solid var(--line); padding: 11px; }
.customer-chat-panel textarea, .support-chat-reply-form textarea { flex: 1; resize: none; }
.support-chat-workspace { display: grid; min-height: 620px; padding: 0; grid-template-columns: 330px minmax(0,1fr); overflow: hidden; }
.support-chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.support-chat-list-item { display: grid; width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; gap: 5px; background: transparent; text-align: left; cursor: pointer; }
.support-chat-list-item:hover,.support-chat-list-item.active { background: #eef4ff; }.support-chat-list-item.unread { border-left: 3px solid #155eef; background: #f7faff; }.support-chat-list-item strong { font-size: 14px; }.support-chat-list-item small { overflow: hidden; color: #64748b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.support-chat-thread { min-width: 0; }.support-chat-thread-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 16px 18px; }.support-chat-thread-head h3 { margin: 0; font-size: 18px; }.support-chat-thread-head small { color: #64748b; }
@media(max-width:900px){.support-chat-workspace{grid-template-columns:1fr}.support-chat-list{max-height:280px;border-right:0;border-bottom:1px solid var(--line)}}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.nav-label {
  margin: 17px 12px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-label:first-child {
  margin-top: 2px;
}

.nav-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  margin: 3px 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 0.87rem;
  font-weight: 600;
  transition: 160ms ease;
  transition-property: color, border-color, background, transform;
}

.nav-link { font-size: 0.98rem; font-weight: 700; }
.metric-icon, .list-icon, .buy-product-icon, .category-tab-icon, .security-orb {
  border: 1px solid #b9cdfc;
  color: #0f56db;
  background: linear-gradient(145deg, #f8fbff, #e6efff);
  box-shadow: 0 3px 9px rgba(37, 99, 235, 0.14);
  font-weight: 900;
}
small, .table-subtext, .field small, .profile-copy small, .sidebar-user small { color: var(--muted); font-size: 0.84rem; font-weight: 600; }
table { font-size: 0.94rem; }
th { color: #25334a; font-size: 0.82rem; font-weight: 800; }
td, input, select, textarea, button { font-weight: 600; }

.nav-link > span:first-child:not(.menu-glyph) {
  display: grid;
  width: 22px;
  place-items: center;
  color: var(--muted);
  font-size: 1rem;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-raised);
}

.nav-link.active {
  border-color: #dbe7ff;
  color: #124bb8;
  background: #eef4ff;
  box-shadow: inset 3px 0 var(--primary);
}

.nav-link.active > span:first-child {
  color: var(--primary-light);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 15px;
  border-top: 1px solid var(--line);
}

.sidebar-user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.sidebar-user > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sidebar-user strong,
.sidebar-user small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  max-width: 105px;
  font-size: 0.8rem;
}

.sidebar-user small {
  color: var(--muted);
  font-size: 0.68rem;
}

.avatar {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #cbdcff;
  border-radius: 50%;
  color: #124bb8;
  background: #eef4ff;
  font-size: 0.76rem;
  font-weight: 800;
}

.text-button {
  padding: 7px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
}

.text-button:hover {
  color: var(--red);
  background: #fff0f2;
}

.sidebar-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  margin: 1px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.dashboard-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.dashboard-language-switcher a {
  padding: 3px;
  border-radius: 5px;
  color: inherit;
  text-decoration: none;
}

.dashboard-language-switcher a:hover,
.dashboard-language-switcher a[aria-current="page"] {
  color: var(--primary-light);
}

.dashboard-language-switcher a:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 0.74rem;
}

.system-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 128, 92, 0.12);
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  padding: 5px 9px 5px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
}

.profile-button:hover {
  border-color: var(--line);
  background: var(--surface);
}

.profile-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.profile-copy strong,
.profile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 0.78rem;
}

.profile-copy small {
  max-width: 170px;
  color: var(--muted);
  font-size: 0.67rem;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 1.15rem;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-raised);
}

.menu-button,
.sidebar-close {
  display: none;
}

main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(24px, 3vw, 44px);
}

.loading-banner,
.alert {
  margin-bottom: 20px;
  padding: 12px 15px;
  border: 1px solid #cbdcff;
  border-radius: 12px;
  color: #174ea6;
  background: #eef4ff;
  font-size: 0.83rem;
}

.loading-banner::before {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 9px;
  border: 2px solid #bfd1f7;
  border-top-color: var(--primary);
  border-radius: 50%;
  content: "";
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

.alert.error {
  color: #a9253c;
  border-color: #f1c2ca;
  background: #fff3f5;
}

.alert.success {
  color: #0c694a;
  border-color: #b8e3d3;
  background: #effaf6;
}

.view {
  animation: view-in 220ms ease-out both;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 6px 0 7px;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  letter-spacing: -0.035em;
}

.section-heading > div > p:last-child,
.panel-head p,
.modal-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: 160ms ease;
  transition-property: transform, background, border-color, box-shadow;
}

.button:hover:not(:disabled) {
  color: inherit;
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 10px rgba(21, 94, 239, 0.18);
}

.button-primary:hover:not(:disabled) {
  color: #fff;
  background: var(--primary-deep);
  box-shadow: 0 6px 14px rgba(21, 94, 239, 0.24);
}

.button-secondary {
  color: var(--text-soft);
  border-color: var(--line-strong);
  background: var(--surface);
}

.button-danger {
  color: #b4233b;
  border-color: #efc2ca;
  background: #fff3f5;
}

.button-small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.7rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metric-card,
.panel,
.catalog-card,
.review-card,
.order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.metric-card {
  position: relative;
  display: flex;
  min-height: 138px;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  padding: 22px;
}

.metric-card:hover {
  border-color: #d3dce8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.metric-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #cbdcff;
  border-radius: 10px;
  color: var(--primary);
  background: #eef4ff;
  font-size: 1.25rem;
}

.metric-card:nth-child(2) .metric-icon {
  color: var(--blue);
  border-color: #c9dcff;
  background: #f0f5ff;
}

.metric-card:nth-child(3) .metric-icon {
  color: var(--green);
  border-color: #b9e1d3;
  background: #effaf6;
}

.metric-card > div {
  display: grid;
  gap: 5px;
}

.metric-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.metric-card strong {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.04em;
}

.metric-card span:last-child {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.content-grid {
  display: grid;
  gap: 16px;
}

.overview-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.85fr);
}

.kyc-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
}

.panel {
  padding: clamp(18px, 2.4vw, 25px);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h3,
.quick-panel h3,
.security-note h3 {
  margin: 4px 0 2px;
  font-size: 1rem;
}

.panel-head > a {
  font-size: 0.75rem;
  font-weight: 700;
}

.list {
  display: grid;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.list-item:first-child {
  border-top: 0;
}

.list-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: var(--blue);
  background: #eef4ff;
}

.list-icon.credit {
  color: var(--green);
  background: #effaf6;
}

.list-item > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.list-item strong,
.list-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item strong {
  font-size: 0.78rem;
}

.list-item small {
  color: var(--muted);
  font-size: 0.68rem;
}

.list-amount {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.list-amount.positive {
  color: var(--green);
}

.list-placeholder {
  padding: 32px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 0.8rem;
}

.quick-panel {
  display: flex;
  flex-direction: column;
}

.quick-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 4px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.quick-action:hover {
  color: var(--primary-deep);
  background: #fafcff;
}

.quick-action > span:first-child {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: var(--primary);
  background: #eef4ff;
}

.quick-action > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.quick-action strong {
  font-size: 0.77rem;
}

.quick-action small {
  color: var(--muted);
  font-size: 0.66rem;
}

.quick-action b {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.field,
.compact-field {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 650;
}

.field-wide {
  grid-column: 1 / -1;
}

.field small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: var(--surface);
  transition: 150ms ease;
  transition-property: border-color, box-shadow, background;
}

input::placeholder,
textarea::placeholder {
  color: #98a3b5;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aebac9;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.1);
}

input:disabled,
select:disabled,
textarea:disabled {
  color: var(--muted);
  background: var(--surface-soft);
}

textarea {
  min-height: 94px;
  resize: vertical;
}

.security-note {
  align-self: start;
  overflow: hidden;
  border-color: #cfe4dc;
  background: #f7fcfa;
}

.security-orb {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid #b9e1d3;
  border-radius: 50%;
  color: var(--green);
  background: #eaf8f3;
  font-size: 1.3rem;
}

.security-note p,
.security-note li {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.7;
}

.security-note ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 18px;
}

.status-badge,
.balance-pill,
.data-badge {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-raised);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: capitalize;
  white-space: nowrap;
}

.balance-pill {
  min-height: 42px;
  padding: 9px 16px;
  color: #124bb8;
  border-color: #cbdcff;
  background: #eef4ff;
  font-size: 0.86rem;
}

.status-badge.pending,
.data-badge.pending,
.data-badge.pending_payment,
.data-badge.processing,
.data-badge.reserved {
  color: #915900;
  border-color: #ead4aa;
  background: #fff8e8;
}

.status-badge.verified,
.data-badge.active,
.data-badge.available,
.data-badge.fulfilled,
.data-badge.issued,
.data-badge.credit {
  color: #0c694a;
  border-color: #b8e3d3;
  background: #effaf6;
}

.status-badge.rejected,
.data-badge.failed,
.data-badge.suspended,
.data-badge.closed,
.data-badge.disabled,
.data-badge.debit {
  color: #a9253c;
  border-color: #efc2ca;
  background: #fff3f5;
}

.status-badge.not_submitted,
.data-badge.cancelled {
  color: var(--text-soft);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-hover) transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--text-soft);
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: #f8fafc;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td strong {
  color: var(--text);
  font-size: 0.75rem;
}

td small,
.table-subtext {
  display: block;
  max-width: 230px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.row-actions select {
  min-width: 105px;
  min-height: 34px;
  padding: 6px 9px;
  font-size: 0.68rem;
}

.empty-state {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
  font-size: 0.8rem;
}

.empty-state strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 1rem;
}

.empty-state p {
  margin: 0 0 18px;
}

.card-grid,
.catalog-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

#orders-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.orders-group-title { margin: 0; color: var(--text); font-size: .9rem; }
.current-orders-grid { grid-template-columns: minmax(0, 580px); }
.orders-history { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.orders-history summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; color: var(--text); cursor: pointer; }
.orders-history summary span { color: var(--muted); font-size: .72rem; }
.history-orders-grid { padding: 0 16px 16px; border-top: 1px solid var(--line); padding-top: 16px; }

.order-card,
.catalog-card,
.review-card {
  min-width: 0;
  padding: 20px;
}

.order-card-head,
.catalog-card-head,
.review-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.order-card h3,
.catalog-card h3,
.review-card h3 {
  margin: 0 0 4px;
  font-size: 0.96rem;
}

.order-card-head small,
.catalog-card-head small,
.review-card-head small {
  color: var(--muted);
  font-size: 0.65rem;
}

.card-preview {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  margin-bottom: 17px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 17px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 0, rgba(94, 153, 255, 0.32), transparent 12rem),
    linear-gradient(145deg, #153b76, #0c2349 72%);
  box-shadow: 0 14px 34px rgba(15, 35, 73, 0.2);
}

.card-preview::before,
.virtual-card::before {
  position: absolute;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
  inset: -80px -50px auto auto;
}

.card-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-preview-number {
  margin: 38px 0 25px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: 0.08em;
}

.card-preview-bottom {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
}

.order-meta,
.catalog-meta,
.review-meta {
  display: grid;
  gap: 9px;
  margin: 0 0 17px;
}

.order-meta > div,
.catalog-meta > div,
.review-meta > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-meta dt,
.catalog-meta dt,
.review-meta dt {
  color: var(--muted);
  font-size: 0.68rem;
}

.order-meta dd,
.catalog-meta dd,
.review-meta dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 650;
  text-align: right;
}

.order-card .button {
  width: 100%;
}

.payment-instructions,
.card-window-note {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #ead4aa;
  border-radius: 10px;
  color: #805000;
  background: #fff8e8;
  font-size: 0.72rem;
  line-height: 1.55;
}

.usdt-invoice { display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: 16px; margin-top: 14px; padding: 14px; border: 1px solid #cbdcff; border-radius: 12px; background: #f8faff; }
.usdt-invoice:empty { display: none; }
.usdt-qr { width: 152px; height: 152px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.usdt-qr.expired { opacity: .32; filter: grayscale(1); }
.usdt-invoice-details { display: grid; min-width: 0; align-content: start; gap: 10px; }
.usdt-invoice-details p { margin: 0; color: var(--text-soft); font-size: .72rem; }
.usdt-payment-line { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.usdt-payment-line span { color: var(--muted); font-size: .68rem; }
.usdt-payment-line strong, .usdt-payment-line code { min-width: 0; overflow-wrap: anywhere; font-size: .72rem; }
.invoice-countdown { color: var(--amber); font-size: .72rem; font-variant-numeric: tabular-nums; }
.invoice-explorer-link { width: fit-content; font-size: .7rem; font-weight: 750; }

@media (max-width: 560px) {
  .usdt-invoice { grid-template-columns: 1fr; }
  .usdt-qr { justify-self: center; }
  .usdt-payment-line { grid-template-columns: 1fr auto; }
  .usdt-payment-line span { grid-column: 1 / -1; }
}

.buy-category-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.buy-category-tab {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.buy-category-tab:hover {
  border-color: #9cb7ee;
  transform: translateY(-1px);
}

.buy-category-tab:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.18);
  outline-offset: 2px;
}

.buy-category-tab.is-selected {
  border-color: var(--primary);
  background: linear-gradient(145deg, #fff, #f1f6ff);
  box-shadow: 0 12px 30px rgba(21, 94, 239, 0.13);
}

.category-tab-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 13px;
  color: var(--primary-deep);
  background: #eaf1ff;
  font-size: 0.82rem;
  font-weight: 850;
}

.buy-category-tab > span:nth-child(2) {
  display: grid;
  gap: 5px;
}

.buy-category-tab strong {
  font-size: 0.94rem;
}

.buy-category-tab small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.buy-category-tab > b {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--primary-deep);
  background: #eaf1ff;
  font-size: 0.62rem;
  white-space: nowrap;
}

.buy-category-panel {
  padding: clamp(18px, 2.8vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.service-selector-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.service-selector-head h3 {
  margin: 4px 0;
  font-size: 1.05rem;
}

.service-selector-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.service-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.service-option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 20px;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.service-option.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.08);
}

.service-option .buy-product-icon {
  width: 44px;
  height: 44px;
}

.service-option > span:nth-child(2),
.service-option-price {
  display: grid;
  gap: 3px;
}

.service-option strong {
  font-size: 0.78rem;
}

.service-option small {
  color: var(--muted);
  font-size: 0.62rem;
}

.service-option-price {
  color: var(--primary-deep);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.service-option > b {
  color: var(--green);
}

.service-request-panel {
  margin-bottom: 18px;
  border-color: #bdcff4;
  background: #f8faff;
}

.service-request-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.credential-warning {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid #ead4aa;
  border-radius: 10px;
  color: #805000;
  background: #fff8e8;
  font-size: 0.7rem;
  line-height: 1.55;
}

.buy-product {
  overflow: hidden;
  padding: clamp(20px, 3vw, 32px);
}

.buy-product-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.buy-product-icon,
.companion-icon {
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.buy-product-icon {
  width: 56px;
  height: 56px;
  color: #fff;
  background: linear-gradient(145deg, #155eef, #0b3eaa);
  box-shadow: 0 10px 24px rgba(21, 94, 239, 0.22);
  font-size: 1.25rem;
  font-weight: 850;
}

.buy-product-head h3,
.companion-card h3 {
  margin: 5px 0;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.buy-product-head p:last-child,
.companion-card > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.buy-price {
  display: grid;
  gap: 3px;
  color: var(--primary-deep);
  font-size: 1.15rem;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.buy-price small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 650;
}

.buy-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 24px 0 16px;
}

.buy-benefits span {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-soft);
  background: var(--surface-raised);
  font-size: 0.7rem;
  font-weight: 700;
}

.buy-benefits b {
  color: var(--green);
  font-size: 0.9rem;
}

.buy-notice {
  padding: 14px 16px;
  border: 1px solid #d7e3fa;
  border-radius: 11px;
  background: #f4f7ff;
}

.buy-notice strong {
  font-size: 0.75rem;
}

.buy-notice p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1.6;
}

.buy-checkout-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(250px, 1fr);
  gap: 24px;
  align-items: end;
  margin-top: 24px;
}

.buy-quantity-field input {
  font-size: 1rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.buy-summary {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
}

.buy-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.buy-summary dt {
  color: var(--muted);
  font-size: 0.7rem;
}

.buy-summary dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.buy-summary-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.buy-summary-total dd {
  color: var(--primary-deep);
  font-size: 1rem;
}

.bank-payment-card {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #cbdcff;
  border-radius: 12px;
  background: #f8faff;
}

.bank-mark {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: #124bb8;
  font-size: 0.72rem;
  font-weight: 850;
}

.bank-payment-card > div:nth-child(2) {
  display: grid;
  gap: 2px;
}

.bank-payment-card small,
.bank-payment-card span:not(.data-badge) {
  color: var(--muted);
  font-size: 0.65rem;
}

.bank-payment-card strong {
  font-size: 0.82rem;
}

.buy-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  font-size: 0.84rem;
}

.companion-card {
  position: relative;
  overflow: hidden;
  padding: 23px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #fff, #f3f6fa);
}

.companion-panel {
  min-height: 330px;
  padding: clamp(28px, 5vw, 58px);
  border-style: dashed;
  background: radial-gradient(circle at 90% 10%, #e8efff 0, transparent 36%), linear-gradient(145deg, #fff, #f3f6fa);
}

.companion-hero {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 780px;
}

.companion-hero .companion-icon {
  width: 76px;
  height: 76px;
  margin: 0;
  font-size: 1.7rem;
}

.companion-hero .data-badge {
  margin-bottom: 18px;
}

.companion-hero h3 {
  margin: 7px 0 10px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.companion-hero p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.75;
}

.companion-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 35px 0 0 100px;
}

.companion-features span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.68rem;
  font-weight: 700;
}

.admin-service-requests {
  margin-top: 28px;
  padding: clamp(18px, 2.4vw, 25px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.service-request-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-request-admin-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.service-request-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.service-request-admin-head h4 {
  margin: 0 0 3px;
  font-size: 0.86rem;
}

.service-request-admin-head small,
.service-request-details-label {
  color: var(--muted);
  font-size: 0.62rem;
}

.service-request-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.service-request-meta > div {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr);
  gap: 12px;
}

.service-request-meta dt,
.service-request-meta dd {
  margin: 0;
  font-size: 0.68rem;
  overflow-wrap: anywhere;
}

.service-request-meta dt {
  color: var(--muted);
}

.service-request-details-label {
  margin: 14px 0 4px;
  font-weight: 750;
}

.service-request-details {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.service-request-status-form {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr auto;
  gap: 9px;
  align-items: end;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.companion-card > .data-badge {
  position: absolute;
  top: 16px;
  right: 16px;
}

.companion-icon {
  width: 50px;
  height: 50px;
  margin: 34px 0 22px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 1.2rem;
}

.service-cards {
  display: grid;
  gap: 13px;
}

.service-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
}

.service-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.catalog-quick-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.catalog-form-label { margin: 0; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.admin-product-detail-card { max-width: 980px; padding: clamp(22px, 3vw, 34px); }

body[data-role="customer"] .purchased-cards-section { display: grid; gap: 15px; }
body[data-role="customer"] .purchased-cards-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
body[data-role="customer"] .purchased-cards-heading h3 { margin: 0; color: #17213a; font-size: 1.15rem; }
body[data-role="customer"] .purchased-cards-heading span { color: #71809a; font-size: .72rem; }
body[data-role="customer"] .purchased-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body[data-role="customer"] .purchased-cards-grid .order-card { padding: 22px; }
body[data-role="customer"] .purchased-cards-grid .service-card { border-color: #dce3f2; border-radius: 14px; background: linear-gradient(145deg, #f8faff, #fff); }

@media (max-width: 920px) {
  body[data-role="customer"] .purchased-cards-grid { grid-template-columns: 1fr; }
}

.card-countdown {
  color: var(--primary-deep);
  font-variant-numeric: tabular-nums;
}

.paypal-results {
  margin: 12px 0;
  padding: 11px;
  border-radius: 9px;
  background: #eef4ff;
}

.paypal-results strong,
.paypal-results p {
  display: block;
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.5;
}

.paypal-results p {
  margin-top: 4px;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.inventory-table {
  min-width: 1120px;
}

.inventory-table th,
.inventory-table td {
  white-space: nowrap;
}

.inventory-secret {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.inventory-pan {
  min-width: 175px;
}

.inventory-action .button {
  min-width: 92px;
}

.catalog-category {
  margin: 0 0 5px;
  color: var(--primary-deep);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-placeholder {
  border-style: dashed;
  background: linear-gradient(145deg, var(--surface-raised), #f8faff);
}

.catalog-placeholder-note {
  margin: 18px 0 0;
  padding: 12px;
  border-radius: 9px;
  color: var(--muted);
  background: #eef3ff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-bar .field {
  width: min(100%, 230px);
}

.compact-field {
  min-width: 150px;
}

.catalog-card .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.catalog-card input,
.catalog-card select,
.catalog-card textarea {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.72rem;
}

.catalog-card textarea {
  min-height: 76px;
}

.catalog-card .button {
  width: 100%;
}

.review-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.review-card-actions .rejection-reason {
  grid-column: 1 / -1;
}

.modal {
  width: min(94vw, 580px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 27px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(6px);
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 13px;
  right: 13px;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 1rem;
}

.modal-close:hover {
  color: var(--text);
}

.modal-heading {
  padding-right: 32px;
  margin-bottom: 22px;
}

.modal-heading h2 {
  margin: 5px 0 5px;
  font-size: 1.35rem;
}

.virtual-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 21px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 0, rgba(94, 153, 255, 0.34), transparent 14rem),
    linear-gradient(145deg, #153b76, #0b2146 75%);
  box-shadow: 0 22px 50px rgba(15, 35, 73, 0.28);
}

.virtual-card-top,
.virtual-card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.virtual-card-top strong {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.virtual-card-top span {
  font-size: 0.66rem;
  letter-spacing: 0.11em;
}

.card-number {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 56px 0 40px;
  padding: 0;
  color: #fff;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.15rem, 4vw, 1.65rem);
  letter-spacing: 0.07em;
  text-align: left;
}

.virtual-card-bottom > span {
  display: grid;
  gap: 5px;
}

.virtual-card-bottom small {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
}

.virtual-card-bottom strong,
.virtual-card-bottom button {
  max-width: 190px;
  overflow: hidden;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-value {
  padding: 0;
  background: transparent;
}

.copy-value:hover {
  color: #d9e7ff;
}

.sensitive-warning {
  margin: 17px 0 0;
  padding: 12px;
  border: 1px solid #ead4aa;
  border-radius: 10px;
  color: #805000;
  background: #fff8e8;
  font-size: 0.7rem;
  line-height: 1.55;
}

.toast-stack {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(380px, calc(100vw - 32px));
  gap: 9px;
  pointer-events: none;
}

.toast {
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  font-size: 0.76rem;
  line-height: 1.45;
  animation: toast-in 180ms ease-out both;
  pointer-events: auto;
}

.toast.success {
  color: #0c694a;
  border-color: #b8e3d3;
}

.toast.error {
  color: #a9253c;
  border-color: #efc2ca;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1180px) {
  .card-grid,
  .catalog-grid,
  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    padding: 18px;
  }
}

@media (max-width: 920px) {
  .sidebar {
    width: min(82vw, 294px);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-button {
    display: grid;
  }

  .workspace {
    margin-left: 0;
  }

  .overview-grid,
  .kyc-grid,
  .buy-layout {
    grid-template-columns: 1fr;
  }

  .companion-card {
    min-height: 190px;
  }

  .service-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-request-admin-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 68px;
    padding: 9px 14px;
  }

  .topbar > div:nth-child(2) .eyebrow,
  .system-status,
  .profile-copy {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .dashboard-language-switcher {
    padding-inline: 5px;
  }

  .profile-button {
    padding: 3px;
  }

  main {
    padding: 22px 14px 35px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .section-heading > .button,
  .section-heading > a.button,
  .section-heading > .balance-pill {
    width: 100%;
  }

  .metric-grid,
  .card-grid,
  .catalog-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .metric-card:first-child {
    grid-column: auto;
  }

  .metric-card {
    min-height: 125px;
  }

  .form-grid,
  .catalog-card .form-grid,
  .buy-category-tabs,
  .service-selector,
  .service-request-form,
  .buy-checkout-grid,
  .buy-benefits {
    grid-template-columns: 1fr;
  }

  .buy-category-tab {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 88px;
    padding: 14px;
  }

  .category-tab-icon {
    width: 42px;
    height: 42px;
  }

  .buy-category-tab > b {
    grid-column: 2;
    justify-self: start;
  }

  .buy-category-panel {
    padding: 14px;
  }

  .service-selector-head {
    align-items: stretch;
    flex-direction: column;
  }

  .service-selector-head .button {
    width: 100%;
  }

  .service-option {
    grid-template-columns: 44px minmax(0, 1fr) 20px;
  }

  .service-option-price {
    grid-column: 2;
    text-align: left;
  }

  .service-option > b {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .companion-panel {
    min-height: 300px;
    padding: 24px 18px;
  }

  .companion-hero {
    grid-template-columns: 1fr;
  }

  .companion-hero .companion-icon {
    width: 60px;
    height: 60px;
  }

  .companion-features {
    margin-left: 0;
  }

  .service-request-status-form {
    grid-template-columns: 1fr;
  }

  .buy-product-head {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .buy-product-icon {
    width: 48px;
    height: 48px;
  }

  .buy-price {
    grid-column: 1 / -1;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    text-align: left;
  }

  .bank-payment-card {
    grid-template-columns: 45px minmax(0, 1fr);
  }

  .bank-payment-card > .data-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .field-wide {
    grid-column: auto;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar .field {
    width: 100%;
  }

  .panel {
    padding: 16px;
  }

  .table-wrap {
    width: calc(100% + 16px);
  }

  .inventory-table-wrap {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  th,
  td {
    padding: 11px 9px;
  }

  .modal {
    width: calc(100vw - 20px);
    padding: 23px 17px;
    border-radius: 17px;
  }

  .virtual-card {
    min-height: 225px;
    padding: 22px;
  }

  .card-number {
    margin: 48px 0 32px;
  }

  .toast-stack {
    right: 16px;
    bottom: 16px;
  }
}

/* Customer storefront. Staff dashboards intentionally retain the operational UI above. */
body[data-role="customer"] {
  --customer-ink: #101828;
  --customer-muted: #667085;
  --customer-blue: #335cff;
  --customer-navy: #111b34;
  color: var(--customer-ink);
  background:
    radial-gradient(circle at 74% -10%, rgba(51, 92, 255, .11), transparent 31rem),
    #f6f8fc;
}

body[data-role="customer"] .sidebar {
  border-right: 0;
  color: #d8e1ff;
  background: linear-gradient(178deg, #111b34 0%, #172541 58%, #10192d 100%);
  box-shadow: 18px 0 50px rgba(16, 24, 40, .08);
}

body[data-role="customer"] .sidebar-head { border-color: rgba(255,255,255,.08); }
body[data-role="customer"] .brand { color: #fff; }
body[data-role="customer"] .nav-label { color: #8191b4; }
body[data-role="customer"] .nav-link { color: #aebbd6; }
body[data-role="customer"] .nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
body[data-role="customer"] .nav-link.active {
  border-color: rgba(117, 146, 255, .28);
  color: #fff;
  background: linear-gradient(135deg, rgba(70, 105, 255, .3), rgba(70, 105, 255, .13));
  box-shadow: inset 3px 0 #7592ff, 0 8px 24px rgba(0,0,0,.12);
}
body[data-role="customer"] .menu-glyph { border-color: rgba(255,255,255,.13); background-color: rgba(255,255,255,.09) !important; filter: brightness(1.7); }
body[data-role="customer"] .sidebar-foot { display: grid; grid-template-columns: 1fr; gap: 4px; border-color: rgba(255,255,255,.08); padding: 12px 14px; }
body[data-role="customer"] .sidebar-user strong { max-width: none; overflow: visible; color: #fff; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
body[data-role="customer"] .sidebar-user small { color: #8fa0c1; }
body[data-role="customer"] .sidebar-foot .avatar { border-color: rgba(255,255,255,.18); color: #fff; background: rgba(100,130,255,.2); }
body[data-role="customer"] .sidebar-foot #logout-button { justify-self: end; margin-right: 8px; padding: 5px 8px; }
body[data-role="customer"] .text-button { color: #9caaca; }
body[data-role="customer"] .text-button:hover { color: #fff; background: rgba(255,255,255,.08); }

body[data-role="customer"] .topbar {
  min-height: 80px;
  border-bottom: 1px solid rgba(16, 24, 40, .06);
  background: rgba(255,255,255,.82);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(22px) saturate(150%);
}
body[data-role="customer"] .topbar h1 { color: #17213a; font-size: 1.2rem; }
body[data-role="customer"] .topbar .eyebrow { color: #6174a1; }
body[data-role="customer"] .profile-button { border-color: #e6eaf2; background: rgba(255,255,255,.72); }
body[data-role="customer"] .profile-button .avatar { color: #264bdd; border-color: #d6defe; background: #eef2ff; }
body[data-role="customer"] .account-art-avatar {
  position: relative;
  overflow: hidden;
  color: #fff;
  border: 2px solid rgba(255,255,255,.88);
  background: #315cff url('/dashboard/account-identity.svg') center / cover no-repeat;
  box-shadow: 0 5px 16px rgba(31,58,143,.22);
  font-size: 0;
}
body[data-role="customer"] .profile-button .account-art-avatar { width: 43px; height: 43px; border-color: #fff; background-color: #315cff; }
body[data-role="customer"] .sidebar-foot .account-art-avatar { width: 45px; height: 45px; border-color: rgba(255,255,255,.2); background-color: #315cff; }
body[data-role="customer"] .account-art-avatar img { width: 100%; height: 100%; object-fit: cover; }
body[data-role="customer"] .topbar .profile-button { display: none; }
.sidebar-account-button { width: 100%; border: 0; text-align: left; cursor: pointer; }
body[data-role="customer"] .sidebar-account-button { padding: 8px; border-radius: 13px; color: inherit; background: transparent; transition: background 160ms ease; }
body[data-role="customer"] .sidebar-account-button:hover { background: rgba(255,255,255,.07); }
body[data-role="customer"] .sidebar-account-button:focus-visible { outline: 2px solid #7592ff; outline-offset: 2px; }
body[data-role="customer"] .account-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
body[data-role="customer"] .account-settings-card { padding: clamp(22px,3vw,30px); }
body[data-role="customer"] .account-settings-single { width: min(100%, 760px); }
body[data-role="customer"] #view-account { margin-top: -34px; }
body[data-role="customer"] #view-account > .visually-hidden { display: none !important; }
body[data-role="customer"] .account-security-panel { width: min(100%, 840px); overflow: hidden; border: 1px solid rgba(16,24,40,.09); border-radius: 18px; background: #fff; box-shadow: 0 14px 42px rgba(16,24,40,.07), 0 2px 4px rgba(16,24,40,.03); }
body[data-role="customer"] .account-panel-head { display: flex; align-items: center; gap: 15px; padding: 24px 28px; border-bottom: 1px solid #e7eaf0; background: linear-gradient(180deg,#fff,#fbfcff); }
body[data-role="customer"] .account-panel-head .account-settings-art { flex: 0 0 54px; width: 54px; height: 54px; border-radius: 15px; box-shadow: 0 7px 18px rgba(31,58,143,.15); }
body[data-role="customer"] .account-panel-head small { display: block; margin-bottom: 4px; color: #7c889f; font-size: .63rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
body[data-role="customer"] .account-panel-head strong { display: block; overflow-wrap: anywhere; color: #17213a; font-size: .96rem; }
body[data-role="customer"] .account-password-pane { padding: 28px; }
body[data-role="customer"] .account-password-title { display: flex; align-items: center; gap: 12px; margin-bottom: 23px; }
body[data-role="customer"] .account-password-title h3 { margin: 0 0 4px; color: #17213a; font-size: 1.05rem; }
body[data-role="customer"] .account-password-title p { margin: 0; color: #71809a; font-size: .69rem; }
body[data-role="customer"] .account-lock-mark { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: #315cff; background: #eef2ff; }
body[data-role="customer"] .account-password-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
body[data-role="customer"] .account-password-submit { width: fit-content; min-width: 190px; justify-self: start; margin-top: 5px; }
body[data-role="customer"] .account-settings-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
body[data-role="customer"] .account-settings-head h3 { margin: 3px 0 5px; color: #17213a; font-size: 1.1rem; }
body[data-role="customer"] .account-settings-head small { display: block; margin-bottom: 5px; color: #71809a; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
body[data-role="customer"] .account-settings-single .account-settings-head h3 { overflow-wrap: anywhere; font-size: 1.18rem; }
body[data-role="customer"] .account-form-title { margin: 0 0 18px; padding-top: 22px; border-top: 1px solid #e3e7ef; color: #17213a; font-size: 1rem; }
body[data-role="customer"] .account-settings-head p:last-child { margin: 0; color: #71809a; font-size: .72rem; }
body[data-role="customer"] .account-settings-art,
body[data-role="customer"] .account-security-art { display: grid; flex: 0 0 64px; width: 64px; height: 64px; place-items: center; overflow: hidden; border-radius: 18px; }
body[data-role="customer"] .account-settings-art img { width: 100%; height: 100%; object-fit: cover; }
body[data-role="customer"] .account-security-art { color: #fff; background: linear-gradient(145deg,#172f91,#315cff); box-shadow: 0 8px 20px rgba(49,92,255,.22); }
body[data-role="customer"] .account-email-card { display: grid; gap: 7px; padding: 18px; border: 1px solid #dce3f2; border-radius: 14px; background: #f8faff; }
body[data-role="customer"] .account-email-card span { color: #71809a; font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
body[data-role="customer"] .account-email-card strong { overflow-wrap: anywhere; color: #17213a; font-size: 1rem; }
body[data-role="customer"] .account-email-card small { color: #8290a8; font-size: .68rem; }
body[data-role="customer"] .account-security-divider { display: flex; align-items: center; gap: 12px; margin: 6px 0 22px; color: #53617c; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
body[data-role="customer"] .account-security-divider::after { content: ""; flex: 1; height: 1px; background: #e3e7ef; }
body[data-role="customer"] .account-session-note { color: #8290a8; text-align: center; font-size: .67rem; }

@media (max-width: 920px) { body[data-role="customer"] .account-settings-grid { grid-template-columns: 1fr; } }

@media (max-width: 680px) {
  body[data-role="customer"] #view-account { margin-top: -18px; }
  body[data-role="customer"] .account-panel-head { align-items: flex-start; padding: 20px; }
  body[data-role="customer"] .account-password-pane { padding: 22px 20px 24px; }
  body[data-role="customer"] .account-password-row { grid-template-columns: 1fr; }
  body[data-role="customer"] .account-password-submit { width: 100%; min-width: 0; }
}

body[data-role="customer"] main { width: min(100%, 1320px); padding: clamp(32px, 4vw, 58px); }
body[data-role="customer"] .section-heading { margin-bottom: 30px; }
body[data-role="customer"] .section-heading h2 {
  margin: 7px 0 9px;
  color: #111a2e;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 780;
  letter-spacing: -.055em;
  line-height: 1.03;
}
body[data-role="customer"] .section-heading > div > p:last-child { color: #68748d; font-size: .94rem; }
body[data-role="customer"] .button { border-radius: 11px; }
body[data-role="customer"] .button-primary {
  background: linear-gradient(135deg, #315cff, #2147de);
  box-shadow: 0 10px 25px rgba(49,92,255,.25);
}

body[data-role="customer"] .metric-card,
body[data-role="customer"] .panel,
body[data-role="customer"] .catalog-card,
body[data-role="customer"] .review-card,
body[data-role="customer"] .order-card {
  border-color: rgba(16, 24, 40, .08);
  border-radius: 18px;
  box-shadow: 0 10px 35px rgba(16, 24, 40, .055), 0 1px 2px rgba(16, 24, 40, .04);
}

body[data-role="customer"] #view-overview .metric-card {
  min-height: 172px;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(140,166,255,.35), transparent 10rem),
    linear-gradient(135deg, #18274a, #244ab7);
}
body[data-role="customer"] #view-overview .metric-card small,
body[data-role="customer"] #view-overview .metric-card span:last-child { color: #cbd6f4; }
body[data-role="customer"] #view-overview .metric-card strong { color: #fff; }
body[data-role="customer"] #view-overview .metric-icon { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.12); }
body[data-role="customer"] .quick-panel { overflow: hidden; padding: 28px; }
body[data-role="customer"] .quick-action { min-height: 76px; padding: 16px 8px; }

body[data-role="customer"] .buy-category-panel { border-color: #e4e8f1; border-radius: 20px; padding: clamp(20px,3vw,34px); background: rgba(255,255,255,.66); }
body[data-role="customer"] .buy-product { padding: clamp(24px,3.5vw,40px); }
body[data-role="customer"] .service-option.is-selected { border-color: #9aafff; background: #f7f8ff; box-shadow: 0 0 0 4px rgba(51,92,255,.08); }
body[data-role="customer"] .buy-notice { border-color: #e0e6f8; background: #f6f8ff; }
body[data-role="customer"] .bank-payment-card { border-color: #d8e0ff; background: linear-gradient(135deg, #f7f9ff, #eef3ff); }
body[data-role="customer"] .bank-mark { background: linear-gradient(145deg, #315cff, #172f91); box-shadow: 0 8px 20px rgba(49,92,255,.25); }

body[data-role="customer"] main:has(#view-buy.active) { width: min(100%, 1540px); padding-top: 18px; padding-right: clamp(24px,3vw,44px); padding-left: clamp(24px,3vw,44px); }
body[data-role="customer"] #view-buy { max-width: none; }
body[data-role="customer"] #view-buy > .visually-hidden { display: none !important; }
body[data-role="customer"] .buy-catalog-shell { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 14px; }
body[data-role="customer"] .service-request-panel { grid-column: 1 / -1; }
body[data-role="customer"] .buy-catalog-browser { min-width: 0; padding: 14px; border: 1px solid #e1e5ed; border-radius: 16px; background: rgba(255,255,255,.65); }
body[data-role="customer"] .buy-search-wrap { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 9px; margin-bottom: 14px; padding: 5px 6px 5px 12px; border: 1px solid #dce2ec; border-radius: 12px; background: #fff; }
body[data-role="customer"] .buy-search-wrap .button { min-height: 36px; padding: 7px 11px; white-space: nowrap; }
body[data-role="customer"] .buy-search-wrap > span { color: #8290a8; font-size: 1.15rem; }
body[data-role="customer"] .buy-search-wrap input { min-width: 0; height: 44px; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; }
body[data-role="customer"] .buy-search-wrap small { color: #8793a8; white-space: nowrap; }
body[data-role="customer"] .buy-service-list { display: grid; max-height: 700px; grid-template-columns: 1fr; gap: 10px; overflow-y: auto; padding: 2px 4px 2px 2px; scrollbar-width: thin; }
body[data-role="customer"] .buy-service-card { display: grid; grid-template-columns: 132px minmax(0,1fr) auto; align-items: center; gap: 15px; min-height: 142px; padding: 14px; border: 1px solid #dfe4ee; border-radius: 15px; color: #263451; text-align: left; background: #fff; cursor: pointer; transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
body[data-role="customer"] .buy-service-card:hover { border-color: #aebdff; transform: translateY(-1px); }
body[data-role="customer"] .buy-service-card.is-selected { border-color: #8fa5ff; background: #f5f7ff; box-shadow: 0 0 0 3px rgba(49,92,255,.07); }
body[data-role="customer"] .buy-service-visual { position: relative; display: grid; width: 132px; height: 104px; place-items: center; overflow: hidden; border-radius: 12px; background: radial-gradient(circle at 70% 10%,#e7edff,#f7f9ff 65%); }
body[data-role="customer"] .buy-service-visual img { width: 145px; height: 102px; object-fit: contain; }
body[data-role="customer"] .buy-service-visual b { position: absolute; right: 10px; bottom: 9px; display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: #fff; background: #315cff; font-size: .7rem; }
body[data-role="customer"] .buy-service-copy { display: grid; min-width: 0; gap: 5px; }
body[data-role="customer"] .buy-service-card strong { color: #17213a; font-size: .9rem; }
body[data-role="customer"] .buy-service-card small { display: -webkit-box; overflow: hidden; color: #6f7c93; font-size: .72rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
body[data-role="customer"] .buy-service-card-meta { display: grid; justify-items: end; gap: 4px; }
body[data-role="customer"] .buy-service-card-meta strong { color: #315cff; font-size: .88rem; }
body[data-role="customer"] .buy-service-card-meta small { color: #71809a; font-size: .68rem; white-space: nowrap; }
body[data-role="customer"] #buy-service-detail-paypal { padding: clamp(22px,2.2vw,32px); }
body[data-role="customer"] #buy-service-detail-paypal .buy-product-head h3 { font-size: 1.2rem; }
body[data-role="customer"] #buy-service-detail-paypal .buy-product-head p { font-size: .78rem; line-height: 1.55; }
body[data-role="customer"] .buy-catalog-shell > .buy-product { position: sticky; top: 102px; width: 100%; margin: 0; }
body[data-role="customer"] .buy-detail-placeholder { position: sticky; top: 102px; display: grid; min-height: 360px; place-items: center; align-content: center; padding: 35px; border: 1px dashed #cfd7e8; border-radius: 18px; color: #71809a; text-align: center; background: rgba(255,255,255,.48); }
body[data-role="customer"] .buy-detail-placeholder[hidden] { display: none; }
body[data-role="customer"] .buy-detail-placeholder > span { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 14px; border-radius: 15px; color: #315cff; background: #eef2ff; font-size: 1.2rem; }
body[data-role="customer"] .buy-detail-placeholder h3 { margin: 0 0 7px; color: #33415d; font-size: 1rem; }
body[data-role="customer"] .buy-detail-placeholder p { margin: 0; font-size: .7rem; }
body[data-role="customer"] .buy-product-meta { display: grid; justify-items: end; gap: 8px; }
body[data-role="customer"] .buy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, .9fr);
  align-items: end;
  gap: 42px;
  margin-bottom: 30px;
  padding: 4px 0 28px;
  border-bottom: 1px solid #dfe4ee;
}
body[data-role="customer"] .buy-hero-copy { max-width: 610px; }
body[data-role="customer"] .buy-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: #3659d9;
  font-size: .69rem;
  font-weight: 820;
  letter-spacing: .09em;
  text-transform: uppercase;
}
body[data-role="customer"] .buy-hero-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #20a779; box-shadow: 0 0 0 5px rgba(32,167,121,.1); }
body[data-role="customer"] .buy-hero h2 {
  max-width: 590px;
  margin: 0;
  color: #111a2e;
  font-size: clamp(2rem, 3vw, 2.85rem);
  font-weight: 780;
  letter-spacing: -.045em;
  line-height: 1.06;
}
body[data-role="customer"] .buy-hero-copy > p { max-width: 590px; margin: 13px 0 0; color: #66728a; font-size: .91rem; line-height: 1.65; }
body[data-role="customer"] .buy-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
body[data-role="customer"] .buy-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid #e1e6ef;
  border-radius: 13px;
  background: rgba(255,255,255,.62);
}
body[data-role="customer"] .buy-steps li > b { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: #71809c; background: #eef1f6; font-size: .64rem; }
body[data-role="customer"] .buy-steps li strong,
body[data-role="customer"] .buy-steps li small { display: block; }
body[data-role="customer"] .buy-steps li strong { color: #26334e; font-size: .7rem; line-height: 1.25; }
body[data-role="customer"] .buy-steps li small { margin-top: 3px; color: #8994a9; font-size: .59rem; line-height: 1.3; }
body[data-role="customer"] .buy-steps li.is-current { border-color: #b8c6ff; background: #f5f7ff; box-shadow: 0 6px 18px rgba(51,92,255,.08); }
body[data-role="customer"] .buy-steps li.is-current > b { color: #fff; background: #315cff; }
body[data-role="customer"] .buy-steps li.is-current strong { color: #2446c8; }
body[data-role="customer"] #view-buy .buy-category-tabs { max-width: 710px; }
body[data-role="customer"] .buy-category-tab { grid-template-columns: 138px minmax(0,1fr) auto; min-height: 132px; padding: 14px 22px 14px 10px; overflow: hidden; }
body[data-role="customer"] .category-card-art { display: block; width: 138px; height: 104px; }
body[data-role="customer"] .category-card-art img { display: block; width: 100%; height: 100%; object-fit: contain; filter: saturate(1.06) contrast(1.02); }
body[data-role="customer"] .buy-category-tab > span:nth-child(2) strong { color: #17213a; font-size: 1rem; }
body[data-role="customer"] .buy-category-tab > span:nth-child(2) small { margin-top: 6px; color: #6e7b94; font-size: .72rem; }

body[data-role="customer"] #view-orders .section-heading { align-items: center; }
body[data-role="customer"] #orders-grid { gap: 24px; }
body[data-role="customer"] .orders-group-title { color: #34405a; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
body[data-role="customer"] .current-orders-grid { max-width: none; grid-template-columns: 1fr; }
body[data-role="customer"] .current-orders-grid > .order-card {
  display: grid;
  width: min(100%, 760px);
  grid-template-columns: 1fr;
  gap: 0 34px;
  padding: 32px;
  overflow: hidden;
  border-color: #dfe5f2;
  background: linear-gradient(135deg, #fff 0%, #fff 62%, #f7f9ff 100%);
}
body[data-role="customer"] .current-orders-grid > .order-card.has-invoice {
  width: 100%;
  grid-template-columns: minmax(280px, .72fr) minmax(480px, 1.45fr);
}
body[data-role="customer"] .current-orders-grid .order-card-head,
body[data-role="customer"] .current-orders-grid .order-meta,
body[data-role="customer"] .current-orders-grid .payment-instructions,
body[data-role="customer"] .current-orders-grid > .order-card > .button { grid-column: 1; }
body[data-role="customer"] .current-orders-grid .has-invoice .usdt-invoice { grid-column: 2; grid-row: 1 / span 5; margin: 0; }
body[data-role="customer"] .order-card-head h3 { color: #162038; font-size: 1.15rem; }
body[data-role="customer"] .order-meta { padding: 18px 0; border-top: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; }
body[data-role="customer"] .payment-instructions { border-color: #dce4ff; color: #405172; background: #f6f8ff; }
body[data-role="customer"] .usdt-invoice {
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  padding: 25px;
  border: 1px solid #dce3f4;
  border-radius: 17px;
  background: #f8faff;
  box-shadow: inset 0 1px #fff;
}
body[data-role="customer"] .usdt-qr { width: 190px; height: 190px; padding: 7px; border-color: #dce2ee; box-shadow: 0 8px 24px rgba(16,24,40,.08); }
body[data-role="customer"] .usdt-invoice-details { gap: 13px; }
body[data-role="customer"] .usdt-invoice-details > p { color: #45516a; font-size: .78rem; }
body[data-role="customer"] .usdt-payment-line { grid-template-columns: 68px minmax(0,1fr) auto; padding: 11px 0; border-top: 1px solid #e5e9f2; }
body[data-role="customer"] .usdt-payment-line strong { color: #162038; font-size: 1rem; }
body[data-role="customer"] .usdt-payment-line code { color: #263451; font-size: .72rem; }
body[data-role="customer"] .invoice-countdown { width: fit-content; border-radius: 999px; padding: 7px 11px; color: #9a5900; background: #fff1d6; }
body[data-role="customer"] .orders-history { border-color: #e2e7f0; border-radius: 16px; background: rgba(255,255,255,.76); box-shadow: 0 8px 28px rgba(16,24,40,.04); }
body[data-role="customer"] .orders-history summary { padding: 19px 23px; }

@media (max-width: 1120px) {
  body[data-role="customer"] .buy-hero { grid-template-columns: 1fr; align-items: start; gap: 22px; }
  body[data-role="customer"] .buy-steps { max-width: 720px; }
  body[data-role="customer"] .current-orders-grid > .order-card.has-invoice { grid-template-columns: 1fr; }
  body[data-role="customer"] .current-orders-grid .order-card-head,
  body[data-role="customer"] .current-orders-grid .order-meta,
  body[data-role="customer"] .current-orders-grid .payment-instructions,
  body[data-role="customer"] .current-orders-grid > .order-card > .button,
  body[data-role="customer"] .current-orders-grid .usdt-invoice { grid-column: 1; grid-row: auto; }
  body[data-role="customer"] .current-orders-grid .usdt-invoice { margin-top: 18px; }
}

@media (max-width: 900px) {
  body[data-role="customer"] .buy-catalog-shell { grid-template-columns: 1fr; }
  body[data-role="customer"] .buy-catalog-shell > .buy-product,
  body[data-role="customer"] .buy-detail-placeholder { position: static; }
}

@media (max-width: 680px) {
  body[data-role="customer"] main { padding: 26px 16px 90px; }
  body[data-role="customer"] .section-heading h2 { font-size: 2.15rem; }
  body[data-role="customer"] .buy-hero { margin-bottom: 20px; padding-bottom: 20px; }
  body[data-role="customer"] .buy-hero h2 { font-size: 2rem; }
  body[data-role="customer"] .buy-steps { grid-template-columns: 1fr; gap: 7px; }
  body[data-role="customer"] .buy-steps li { min-height: 56px; }
  body[data-role="customer"] .buy-category-tab { grid-template-columns: 105px minmax(0,1fr); min-height: 112px; padding: 10px 14px 10px 5px; }
  body[data-role="customer"] .category-card-art { width: 105px; height: 88px; }
  body[data-role="customer"] .buy-category-tab > b { grid-column: 2; }
  body[data-role="customer"] .current-orders-grid > .order-card { padding: 20px; border-radius: 16px; }
  body[data-role="customer"] .usdt-invoice { grid-template-columns: 1fr; padding: 18px; }
  body[data-role="customer"] .usdt-qr { width: min(210px, 100%); height: auto; aspect-ratio: 1; justify-self: center; }
  body[data-role="customer"] .usdt-payment-line { grid-template-columns: 1fr auto; }
  body[data-role="customer"] .usdt-payment-line span { grid-column: 1 / -1; }
  body[data-role="customer"] .customer-chat-launcher { right: 14px; bottom: 14px; }
  body[data-role="customer"] .buy-search-wrap { grid-template-columns: auto minmax(0,1fr) auto; }
  body[data-role="customer"] .buy-search-wrap .button { grid-column: 1 / -1; width: 100%; }
  body[data-role="customer"] .buy-service-card { grid-template-columns: 92px minmax(0,1fr); }
  body[data-role="customer"] .buy-service-visual { width: 92px; height: 82px; }
  body[data-role="customer"] .buy-service-card-meta { grid-column: 2; justify-items: start; }
  body[data-role="customer"] .buy-product-meta { justify-items: start; }
}

@media (max-width: 420px) {
  .metric-card {
    gap: 13px;
  }

  .virtual-card-bottom {
    gap: 10px;
  }

  .virtual-card-bottom strong,
  .virtual-card-bottom button {
    max-width: 110px;
  }

  .review-card-actions {
    grid-template-columns: 1fr;
  }

  .review-card-actions .rejection-reason {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.usdt-invoice { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 18px; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #f8fafc; }
.usdt-qr { width: 150px; height: 150px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.usdt-invoice-details { display: grid; align-content: start; gap: 10px; }
.usdt-invoice-details p { margin: 0; color: #334155; font-size: 13px; }
.usdt-payment-line { display: grid; grid-template-columns: 70px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.usdt-payment-line code { overflow: hidden; color: #182236; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
@media(max-width:650px){.usdt-invoice{grid-template-columns:1fr}.usdt-qr{margin:auto}.usdt-payment-line{grid-template-columns:1fr}.usdt-payment-line code{white-space:normal;word-break:break-all}}
