/**
 * MailNero — Main Stylesheet
 * Dark mode, modern SaaS design
 * ──────────────────────────────────────────────────────────
 */

/* ── CSS Variables (Design Tokens) ─────────────────────────────────────── */

:root {
  /* Colors */
  --bg-base:       #0a0a0f;
  --bg-surface:    #111118;
  --bg-elevated:   #18181f;
  --bg-hover:      #1e1e28;
  --bg-active:     #22222e;

  --border:        #2a2a38;
  --border-light:  #333344;

  --text-primary:  #f0f0f5;
  --text-secondary:#a0a0b8;
  --text-muted:    #6060778;
  --text-dim:      #606078;

  --accent:        #7c6aff;        /* purple */
  --accent-hover:  #9178ff;
  --accent-dim:    #7c6aff22;

  --green:         #22c55e;
  --green-dim:     #22c55e22;
  --yellow:        #eab308;
  --yellow-dim:    #eab30822;
  --red:           #ef4444;
  --red-dim:       #ef444422;
  --blue:          #3b82f6;
  --blue-dim:      #3b82f622;
  --purple:        #a855f7;
  --purple-dim:    #a855f722;

  --xmr-orange:    #ff6600;
  --xmr-dim:       #ff660022;

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.5);
  --shadow-glow: 0 0 40px rgba(124,106,255,.15);
}

/* ── Reset & Base ───────────────────────────────────────────────────────── */

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; }

/* ── Typography ─────────────────────────────────────────────────────────── */

h1 { font-size: 2rem;   font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.4rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: .875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-secondary); }

p { color: var(--text-secondary); }

.text-sm    { font-size: .875rem; }
.text-muted { color: var(--text-dim) !important; }
.mono       { font-family: var(--font-mono); font-size: .85em; }
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.container    { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-md { max-width: 900px;  margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 640px;  margin: 0 auto; padding: 0 1.5rem; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */

.navbar {
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}
.brand-icon {
  color: var(--accent);
  font-size: 1.2rem;
}
.navbar-brand:hover { color: var(--accent); }

.navbar-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin-left: auto;
}

.nav-link {
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.nav-link-cta {
  background: var(--accent);
  color: #fff !important;
  padding: .4rem .9rem;
}
.nav-link-cta:hover { background: var(--accent-hover); }
.nav-link-logout { color: var(--red) !important; }
.nav-link-logout:hover { background: var(--red-dim) !important; }

.nav-divider { width: 1px; height: 20px; background: var(--border); margin: 0 .25rem; }

.nav-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .5rem;
  color: var(--text-secondary);
  font-size: .875rem;
}
.nav-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
}
.navbar-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all .3s;
}
.navbar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.navbar-toggle.active span:nth-child(2) { opacity: 0; }
.navbar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,106,255,.3); }

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-success { background: var(--green-dim); color: var(--green); border: 1px solid var(--green); }

.btn-sm  { padding: .3rem .7rem; font-size: .8rem; }
.btn-lg  { padding: .7rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin: 0; }

/* ── Alerts / Flash Messages ────────────────────────────────────────────── */

.alert {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: .9rem;
  border: 1px solid;
  transition: opacity .4s, transform .4s;
}
.alert-icon { font-size: 1rem; flex-shrink: 0; }
.alert-close {
  margin-left: auto; background: none; border: none;
  cursor: pointer; font-size: 1.2rem; line-height: 1;
  color: inherit; opacity: .6;
}
.alert-close:hover { opacity: 1; }

.alert-success { background: var(--green-dim);  color: var(--green);  border-color: var(--green); }
.alert-error   { background: var(--red-dim);    color: var(--red);    border-color: var(--red);   }
.alert-info    { background: var(--blue-dim);   color: var(--blue);   border-color: var(--blue);  }

/* ── Forms ───────────────────────────────────────────────────────────────── */

.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-label { font-size: .875rem; font-weight: 500; color: var(--text-secondary); }
.form-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .875rem;
  color: var(--text-primary);
  font-size: .9rem;
  font-family: var(--font-sans);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder { color: var(--text-dim); }
.form-input option { background: var(--bg-elevated); }

.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 2.5rem; }
.toggle-password {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem; line-height: 1;
  color: var(--text-dim); padding: 0;
}
.toggle-password:hover { color: var(--text-primary); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid-4 { grid-template-columns: repeat(4, 1fr); }
.form-group-half { grid-column: span 1; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.form-section { margin-bottom: 0; }
.form-section .card-header { padding: 1rem 1.5rem; }
.form-section .form-grid { padding: 1.25rem 1.5rem 0; }
.form-actions { display: flex; justify-content: flex-end; padding: 1.5rem 0; }

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table th {
  text-align: left;
  padding: .75rem 1rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.table td strong { color: var(--text-primary); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-hover); }

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge-lg { padding: .3rem .9rem; font-size: .875rem; }
.badge-gray   { background: var(--bg-elevated); color: var(--text-dim);      border: 1px solid var(--border); }
.badge-green  { background: var(--green-dim);  color: var(--green);         border: 1px solid var(--green);  }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow);        border: 1px solid var(--yellow); }
.badge-red    { background: var(--red-dim);    color: var(--red);           border: 1px solid var(--red);    }
.badge-blue   { background: var(--blue-dim);   color: var(--blue);          border: 1px solid var(--blue);   }
.badge-purple { background: var(--purple-dim); color: var(--purple);        border: 1px solid var(--purple); }

/* ── Stats Grid ──────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex; align-items: flex-start; gap: 1rem;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.stat-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.stat-icon-blue   { background: var(--blue-dim);   color: var(--blue);   }
.stat-icon-green  { background: var(--green-dim);  color: var(--green);  }
.stat-icon-yellow { background: var(--yellow-dim); color: var(--yellow); }
.stat-icon-purple { background: var(--purple-dim); color: var(--purple); }
.stat-icon-red    { background: var(--red-dim);    color: var(--red);    }

/* 6-column grid for admin with profit stats */
.stats-grid-6 { grid-template-columns: repeat(6, 1fr); }

/* Highlight the profit card */
.stat-card-profit {
  border-color: var(--green);
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--green-dim) 100%);
}
.profit-value { color: var(--green) !important; }

/* Profit cell in admin table */
.profit-cell {
  color: var(--green);
  font-weight: 600;
  font-size: .85rem;
}
.stat-card-label  { font-size: .8rem; color: var(--text-dim); margin-bottom: .2rem; }
.stat-card-value  { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); line-height: 1; }

/* ── Page layout ─────────────────────────────────────────────────────────── */

.app-page { padding: 2rem 0; }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-header h1 { margin-bottom: .25rem; }
.page-subtitle { color: var(--text-dim); font-size: .875rem; }

.action-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: .5rem; }
.empty-state p  { margin-bottom: 1.5rem; }

/* ── Quick actions ───────────────────────────────────────────────────────── */

.quick-actions {
  display: flex; gap: 1rem;
  margin-top: 1.5rem;
}
.quick-action-card {
  flex: 1;
  display: flex; align-items: center; gap: .75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all .2s;
}
.quick-action-card:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.quick-action-icon { font-size: 1.5rem; }

/* ── Step indicator ──────────────────────────────────────────────────────── */

.steps-indicator {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 2rem;
}
.step-item {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; color: var(--text-dim); font-weight: 500;
}
.step-item.active .step-dot  { background: var(--accent); color: #fff; border-color: var(--accent); }
.step-item.active             { color: var(--text-primary); }
.step-item.done .step-dot     { background: var(--green-dim); color: var(--green); border-color: var(--green); }
.step-item.done               { color: var(--green); }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
  background: var(--bg-elevated);
}
.step-line {
  flex: 1; height: 1px; background: var(--border);
  margin: 0 .75rem; max-width: 80px;
}
.step-line.done { background: var(--green); }

/* ── Rate selection ──────────────────────────────────────────────────────── */

.rates-list { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.rate-option { cursor: pointer; }
.rate-option input[type="radio"] { display: none; }
.rate-card {
  display: flex; align-items: center;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all .2s;
  position: relative;
}
.rate-option input:checked + .rate-card {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.rate-card:hover { border-color: var(--border-light); background: var(--bg-hover); }
.rate-carrier { flex: 1; }
.rate-carrier-name { font-weight: 700; color: var(--text-primary); display: block; margin-bottom: .15rem; }
.rate-service { font-size: .85rem; color: var(--text-dim); }
.rate-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.rate-price { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.rate-eta   { font-size: .8rem; color: var(--text-dim); }
.rate-check {
  display: none; margin-left: 1rem;
  color: var(--accent); font-weight: 700;
}
.rate-option input:checked + .rate-card .rate-check { display: block; }

/* ── Payment page ────────────────────────────────────────────────────────── */

.payment-card { }
.payment-header {
  text-align: center; padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.xmr-logo {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--xmr-dim); border: 2px solid var(--xmr-orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: var(--xmr-orange); font-weight: 700;
  margin: 0 auto 1rem;
}
.payment-header h2 { margin-bottom: .5rem; }
.payment-header p  { font-size: .9rem; }

.payment-amount-box {
  text-align: center; padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.payment-amount-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: .25rem; }
.payment-amount-usd { font-size: 2.5rem; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: .5rem; }
.payment-amount-note { font-size: .8rem; color: var(--text-dim); }

.payment-address-box {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.payment-address-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: .75rem; }
.address-copy-wrapper { display: flex; align-items: center; gap: .75rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem 1rem; }
.xmr-address { font-family: var(--font-mono); font-size: .8rem; word-break: break-all; flex: 1; color: var(--text-primary); }

.payment-instructions { padding: 1.5rem; border-bottom: 1px solid var(--border); }
.payment-instructions h3 { margin-bottom: .75rem; }
.payment-instructions ol { padding-left: 1.25rem; }
.payment-instructions li { color: var(--text-secondary); margin-bottom: .5rem; font-size: .9rem; }

.payment-txid-form { padding: 1.5rem; }
.payment-actions { margin-top: 1rem; }
.payment-note { margin-top: 1rem; font-size: .8rem; color: var(--text-dim); background: var(--yellow-dim); border: 1px solid var(--yellow); border-radius: var(--radius-sm); padding: .75rem 1rem; }

.order-summary { padding: 0 1.5rem 1.5rem; }
.summary-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .75rem 0; border-bottom: 1px solid var(--border); font-size: .9rem;
}
.summary-row:first-child { padding-top: 1.25rem; }
.summary-row:last-child { border-bottom: none; }
.summary-row > span:first-child { color: var(--text-dim); flex-shrink: 0; }
.summary-row > span:last-child  { color: var(--text-secondary); text-align: right; }
.summary-total { background: var(--bg-elevated); margin: 0 -1.5rem; padding: .875rem 1.5rem; }
.summary-total > span:first-child { font-weight: 600; color: var(--text-secondary); }
.price-highlight { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); }

/* ── Order detail ─────────────────────────────────────────────────────────── */

.detail-grid { display: grid; gap: 1rem; }
.detail-section { padding: 0 1.5rem; }
.detail-row {
  display: grid; grid-template-columns: 120px 1fr; gap: 1rem; align-items: baseline;
  padding: .875rem 0; border-bottom: 1px solid var(--border);
}
.detail-row:first-child { padding-top: 1.25rem; }
.detail-row:last-child  { border-bottom: none; padding-bottom: 1.25rem; }
.detail-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.detail-value { color: var(--text-secondary); font-size: .9rem; line-height: 1.6; }
.detail-value strong { color: var(--text-primary); }

.status-banner {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: .9rem; color: var(--text-secondary);
}

.address-truncated { word-break: break-all; font-size: .75rem; }
.link-external { font-size: .85rem; }
.back-link { margin-top: 1.5rem; }

/* ── Admin ───────────────────────────────────────────────────────────────── */

.admin-nav-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.admin-nav-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  text-decoration: none; color: var(--text-secondary);
  transition: all .2s;
}
.admin-nav-card:hover { border-color: var(--accent); color: var(--text-primary); transform: translateY(-2px); }
.admin-nav-icon { font-size: 2rem; }
.admin-nav-card strong { display: block; color: var(--text-primary); margin-bottom: .2rem; }
.admin-nav-card p { font-size: .85rem; margin: 0; }

/* ── Auth pages ──────────────────────────────────────────────────────────── */

.auth-page {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 1rem;
}
.auth-container { width: 100%; max-width: 440px; }
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-logo {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--accent-dim); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--accent); margin: 0 auto 1rem;
}
.auth-header h1 { font-size: 1.5rem; margin-bottom: .35rem; }
.auth-header p  { color: var(--text-dim); font-size: .9rem; }
.auth-form { margin-bottom: 1.25rem; }
.auth-footer { text-align: center; font-size: .875rem; color: var(--text-dim); }
.auth-footer a { color: var(--accent); }
.auth-footer a:hover { color: var(--accent-hover); }

/* ── Hero section ─────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}
.hero-container { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center;
  background: var(--accent-dim); border: 1px solid var(--accent);
  color: var(--accent); border-radius: 999px;
  padding: .3rem .9rem; font-size: .8rem; font-weight: 600;
  letter-spacing: .05em; margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.1; margin-bottom: 1.25rem;
  letter-spacing: -.02em;
}
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto 2rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 0; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1rem 2rem; display: inline-flex;
}
.hero-stat { padding: 0 1.5rem; text-align: center; }
.hero-stat-value { display: block; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.hero-stat-label { font-size: .75rem; color: var(--text-dim); }
.hero-stat-divider { width: 1px; height: 40px; background: var(--border); }

.hero-glow {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse at top, rgba(124,106,255,.12) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── Features section ─────────────────────────────────────────────────────── */

.features { padding: 5rem 0; }
.section-header { text-align: center; max-width: 540px; margin: 0 auto 3rem; }
.section-header h2 { margin-bottom: .75rem; }
.section-header p  { color: var(--text-dim); }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--border-light); transform: translateY(-3px); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p  { font-size: .875rem; color: var(--text-dim); line-height: 1.7; }

/* ── How it works ──────────────────────────────────────────────────────────── */

.how-it-works { padding: 5rem 0; border-top: 1px solid var(--border); }
.steps {
  display: flex; align-items: flex-start; gap: 0;
  max-width: 900px; margin: 0 auto;
}
.step { flex: 1; text-align: center; padding: 0 1rem; }
.step-number {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-dim); border: 2px solid var(--accent);
  color: var(--accent); font-size: 1.1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 { margin-bottom: .5rem; font-size: .95rem; }
.step p   { font-size: .875rem; color: var(--text-dim); line-height: 1.6; }
.step-arrow { font-size: 1.5rem; color: var(--text-dim); padding-top: .6rem; flex-shrink: 0; }

/* ── CTA section ──────────────────────────────────────────────────────────── */

.cta-section { padding: 5rem 0; }
.cta-card {
  text-align: center;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 4rem 2rem;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 200px;
  background: radial-gradient(ellipse at top, rgba(124,106,255,.1) 0%, transparent 70%);
}
.cta-card h2 { font-size: 2rem; margin-bottom: .75rem; position: relative; }
.cta-card p  { margin-bottom: 2rem; position: relative; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
  margin-top: auto;
}
.footer-container {
  max-width: 1200px; margin: 0 auto;
  display: flex; gap: 3rem; flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand { flex: 1; min-width: 180px; }
.footer-brand .brand-icon { font-size: 1.3rem; }
.footer-brand .brand-name { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.footer-tagline { font-size: .875rem; color: var(--text-dim); margin-top: .5rem; }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 { margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a  { font-size: .875rem; color: var(--text-dim); transition: color .2s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom { max-width: 1200px; margin: 1.5rem auto 0; }
.footer-bottom p { font-size: .8rem; color: var(--text-dim); }

/* ── Terms of Service page ───────────────────────────────────────────────── */

.tos-page { padding: 3rem 0 5rem; }

.tos-header {
  text-align: center; margin-bottom: 3rem; padding: 3rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.tos-eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--purple); margin-bottom: .6rem;
}
.tos-title { font-size: 2.5rem; font-weight: 900; margin-bottom: .75rem; }
.tos-meta  { font-size: .85rem; color: var(--text-dim); margin-bottom: 1.25rem; }
.tos-intro { max-width: 620px; margin: 0 auto; color: var(--text-secondary); line-height: 1.7; }

/* Two-column layout: TOC left, content right */
.tos-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 3rem; align-items: start;
}

/* Sticky table of contents */
.tos-toc {
  position: sticky; top: 80px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.25rem 1.25rem 1.5rem;
}
.tos-toc-title {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: .75rem;
}
.tos-toc-list { list-style: none; counter-reset: none; padding: 0; margin: 0; }
.tos-toc-list li { margin-bottom: .1rem; }
.tos-toc-list a {
  display: block; font-size: .8rem; color: var(--text-dim); padding: .3rem .5rem;
  border-radius: var(--radius-sm); transition: color .15s, background .15s;
  text-decoration: none; line-height: 1.4;
}
.tos-toc-list a:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* Content body */
.tos-body { min-width: 0; }

.tos-section {
  margin-bottom: 2.75rem; padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--border);
}
.tos-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.tos-section-title {
  font-size: 1.2rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 1rem; padding-bottom: .6rem;
  border-bottom: 2px solid var(--purple-dim);
  display: inline-block;
}

.tos-section p {
  color: var(--text-secondary); line-height: 1.75; margin-bottom: .9rem; font-size: .95rem;
}
.tos-section p:last-child { margin-bottom: 0; }

.tos-section a { color: var(--blue); text-decoration: underline; }
.tos-section a:hover { color: var(--text-primary); }

.tos-list {
  list-style: none; padding: 0; margin: .5rem 0 1rem;
}
.tos-list li {
  position: relative; padding: .45rem 0 .45rem 1.5rem;
  color: var(--text-secondary); font-size: .93rem; line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.tos-list li:last-child { border-bottom: none; }
.tos-list li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--purple); font-size: .8rem; top: .55rem;
}

.tos-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }

/* Callout boxes */
.tos-callout {
  background: var(--blue-dim); border: 1px solid var(--blue);
  border-left: 3px solid var(--blue); border-radius: var(--radius-sm);
  padding: .9rem 1.1rem; margin: 1rem 0; font-size: .88rem;
  color: var(--text-secondary); line-height: 1.6;
}
.tos-callout-warning {
  background: var(--yellow-dim); border-color: var(--yellow); border-left-color: var(--yellow);
}
.tos-callout strong { color: var(--text-primary); }

/* Contact card */
.tos-contact-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; margin: 1rem 0;
}
.tos-contact-row {
  display: grid; grid-template-columns: 160px 1fr; gap: 1rem; align-items: baseline;
  padding: .7rem 1.1rem; border-bottom: 1px solid var(--border); font-size: .88rem;
}
.tos-contact-row:last-child { border-bottom: none; }
.tos-contact-label {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-dim);
}

/* Disclaimer block at the bottom */
.tos-disclaimer {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-left: 3px solid var(--text-dim); border-radius: var(--radius-sm);
  padding: 1rem 1.25rem; margin-top: 1.5rem;
  font-size: .85rem !important; color: var(--text-dim) !important; line-height: 1.7 !important;
}
.tos-disclaimer strong { color: var(--text-secondary) !important; }

/* ── Wallet withdrawal notice ─────────────────────────────────────────────── */

.wallet-withdrawal-notice {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-left: 3px solid var(--blue); border-radius: var(--radius-md);
  padding: 1rem 1.25rem; margin-bottom: 2rem;
}
.wallet-withdrawal-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: .1rem; }
.wallet-withdrawal-notice strong { display: block; font-size: .9rem; color: var(--text-primary); margin-bottom: .3rem; }
.wallet-withdrawal-notice p { margin: 0; font-size: .83rem; color: var(--text-secondary); line-height: 1.6; }
.wallet-withdrawal-notice a { color: var(--blue); text-decoration: underline; }

/* ── Order detail: refund card ────────────────────────────────────────────── */

.card-refund {
  border-color: var(--purple-dim);
  background: linear-gradient(135deg, rgba(139,92,246,.04) 0%, var(--bg-surface) 100%);
}
.card-refunded { border-color: var(--border); }

.refund-amount-preview {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
}
.refund-amount-label { font-size: .8rem; color: var(--text-dim); }
.refund-amount-value { font-size: 1.15rem; font-weight: 800; color: var(--green); }

.btn-refund {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1rem; padding: .6rem 1.25rem;
  background: transparent; border: 1px solid var(--purple);
  color: var(--purple); border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600; cursor: pointer; transition: all .15s;
}
.btn-refund:hover {
  background: var(--purple); color: #fff;
}

/* ── Error pages ──────────────────────────────────────────────────────────── */

.error-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 60px); padding: 3rem 1rem;
}
.error-container { text-align: center; max-width: 480px; }
.error-code { font-size: 8rem; font-weight: 900; line-height: 1; color: var(--border-light); margin-bottom: .5rem; }
.error-title { margin-bottom: .75rem; }
.error-message { color: var(--text-dim); margin-bottom: 2rem; }
.error-actions { display: flex; gap: 1rem; justify-content: center; }
.error-detail {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem; font-family: var(--font-mono);
  font-size: .8rem; color: var(--red); text-align: left; margin-bottom: 2rem;
  white-space: pre-wrap; word-break: break-all;
}

/* ── Misc utilities ───────────────────────────────────────────────────────── */

.hidden { display: none !important; }

/* ── Navbar: cart badge + wallet pill ────────────────────────────────────── */

.nav-cart {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  font-size: 1.1rem;
  padding: .35rem .6rem !important;
}
.nav-cart-badge {
  position: absolute; top: 0; right: -2px;
  background: var(--red); color: #fff;
  font-size: .65rem; font-weight: 700; line-height: 1;
  padding: .18em .38em; border-radius: 999px;
  min-width: 1.2em; text-align: center;
}
.nav-wallet-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--green-dim); border: 1px solid var(--green);
  color: var(--green); font-size: .8rem; font-weight: 600;
  padding: .28rem .7rem; border-radius: 999px;
  text-decoration: none; transition: opacity .2s;
}
.nav-wallet-pill:hover { opacity: .85; }
.nav-wallet-icon { font-size: .9rem; }

/* ── Stats grid variants ─────────────────────────────────────────────────── */

.stats-grid-5 { grid-template-columns: repeat(5, 1fr); }
.stat-card-wallet {
  border-color: var(--green);
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--green-dim) 100%);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.stat-card-wallet:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.25); }

/* ── Wallet page ─────────────────────────────────────────────────────────── */

.wallet-balance-card {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--green-dim) 80%);
  border: 1px solid var(--green); border-radius: var(--radius-lg);
  padding: 2rem 2.5rem; margin-bottom: 1.25rem; gap: 2rem; flex-wrap: wrap;
}
.wallet-balance-label { font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--green); margin-bottom: .25rem; }
.wallet-balance-amount { font-size: 3rem; font-weight: 900; color: var(--text-primary); line-height: 1; }
.wallet-balance-xmr { font-size: .85rem; color: var(--text-dim); margin-top: .4rem; }
.wallet-balance-right { display: flex; flex-direction: column; gap: .6rem; }

.wallet-info-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem;
}
.wallet-info-item {
  display: flex; align-items: flex-start; gap: .75rem;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem;
}
.wallet-info-item p { margin: 0; }
.wallet-info-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }

.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-blue  { color: var(--blue); }
.text-yellow { color: var(--yellow); }

/* ── Deposit page ────────────────────────────────────────────────────────── */

.input-prefix-wrap { position: relative; display: flex; align-items: center; }
.input-prefix {
  position: absolute; left: .85rem; color: var(--text-dim);
  font-weight: 600; pointer-events: none;
}
.input-has-prefix { padding-left: 2rem !important; }
.form-hint { font-size: .78rem; color: var(--text-dim); margin-top: .35rem; }

.deposit-xmr-preview {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .75rem 1rem; margin: 1rem 0;
}
.deposit-xmr-amount { font-size: 1rem; font-weight: 700; color: var(--green); }

.deposit-quick-amounts { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

.card-muted { background: var(--bg-elevated) !important; border-color: var(--border) !important; }
.dev-mode-card { border-left: 3px solid var(--yellow) !important; }

/* ── Payment details (shared by wallet/deposit-confirm and cart/payment) ─── */

.payment-detail-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--border); font-size: .9rem;
}
.payment-detail-row:last-child { border-bottom: none; }
.payment-detail-col { flex-direction: column; align-items: flex-start; gap: .5rem; }
.payment-detail-label { color: var(--text-dim); font-size: .85rem; }
.payment-detail-value { font-weight: 600; color: var(--text-primary); }
.xmr-amount-big { font-size: 1.25rem; font-weight: 800; color: var(--green); }

.xmr-address-box {
  display: flex; align-items: center; gap: .6rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .6rem .85rem; width: 100%;
  box-sizing: border-box;
}
.xmr-address-text {
  font-family: var(--font-mono); font-size: .78rem; color: var(--text-secondary);
  word-break: break-all; flex: 1;
}

.payment-notice {
  display: flex; gap: .65rem; align-items: flex-start;
  background: var(--blue-dim); border: 1px solid var(--blue);
  border-radius: var(--radius-sm); padding: .85rem 1rem; margin-top: 1rem;
}
.payment-notice-icon { font-size: 1rem; flex-shrink: 0; margin-top: .1rem; }

.divider { border: none; border-top: 1px solid var(--border); margin: .75rem 0; }

/* ── Cart page ───────────────────────────────────────────────────────────── */

.cart-layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start;
}
.cart-items-col {}
.cart-summary-col { position: sticky; top: 80px; }

.cart-item {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.5rem;
}
.cart-item-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: var(--text-dim);
  flex-shrink: 0;
}
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-route {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem;
}
.cart-item-addr { display: flex; flex-direction: column; font-size: .85rem; }
.cart-addr-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-dim);
}
.cart-arrow { color: var(--text-dim); font-size: .9rem; flex-shrink: 0; }
.cart-item-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cart-divider { border: none; border-top: 1px solid var(--border); margin: 0 1.5rem; }

.cart-item-price {
  display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; flex-shrink: 0;
}
.cart-item-amount { font-weight: 700; color: var(--text-primary); }
.btn-icon-danger {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  font-size: .85rem; padding: .2rem .4rem; border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.btn-icon-danger:hover { color: var(--red); background: var(--red-dim); }

.cart-summary-card {}

/* Checkout option blocks inside cart summary */
.checkout-option {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1rem; margin-bottom: 0;
}
.checkout-option-disabled { opacity: .6; }
.checkout-option-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  margin-bottom: .75rem;
}
.checkout-option-title { font-weight: 700; font-size: .95rem; margin-bottom: .2rem; }
.checkout-option-desc  { font-size: .78rem; color: var(--text-dim); }
.checkout-option-total { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); white-space: nowrap; }

.wallet-balance-inline {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; margin-bottom: .75rem; flex-wrap: wrap;
}

.checkout-or {
  text-align: center; position: relative; margin: .9rem 0;
  color: var(--text-dim); font-size: .8rem;
}
.checkout-or::before, .checkout-or::after {
  content: ''; position: absolute; top: 50%; width: 42%; height: 1px;
  background: var(--border);
}
.checkout-or::before { left: 0; }
.checkout-or::after  { right: 0; }
.checkout-or span { background: var(--bg-surface); position: relative; padding: 0 .5rem; }

.btn-outline {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--text-dim); color: var(--text-primary); background: var(--bg-elevated); }

.btn-block { width: 100%; text-align: center; display: block; }

.badge-xs { font-size: .62rem !important; padding: .15em .4em !important; }
.badge-purple { background: var(--purple-dim); color: var(--purple); }

/* ── Legal pages: footer bottom row + nav legal links ───────────────────── */

.footer-bottom-legal {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}
.footer-legal-links { display: flex; align-items: center; gap: .45rem; }
.footer-legal-links a { font-size: .78rem; color: var(--text-dim); text-decoration: none; transition: color .15s; }
.footer-legal-links a:hover { color: var(--text-primary); }
.footer-dot { color: var(--border-light); font-size: .7rem; }

.nav-legal-links { display: flex; align-items: center; gap: .15rem; }
.nav-legal-link {
  font-size: .75rem; color: var(--text-dim); text-decoration: none;
  padding: .2rem .45rem; border-radius: var(--radius-sm); transition: color .15s, background .15s;
}
.nav-legal-link:hover, .nav-legal-link.active { color: var(--text-secondary); background: var(--bg-elevated); }

/* ── ToS eyebrow colour variants ─────────────────────────────────────────── */
.legal-eyebrow-red { color: var(--red) !important; }

/* ── Prohibited Items: top compliance banner ─────────────────────────────── */

.prohibited-banner {
  display: flex; gap: 1rem; align-items: flex-start;
  background: linear-gradient(135deg, var(--red-dim) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--red); border-left: 4px solid var(--red);
  border-radius: var(--radius-md); padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.prohibited-banner-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: .1rem; }
.prohibited-banner strong { display: block; font-size: .95rem; color: var(--text-primary); margin-bottom: .35rem; }
.prohibited-banner p { margin: 0; font-size: .875rem; color: var(--text-secondary); line-height: 1.65; }

/* ── Carrier comparison cards (prohibited items page) ────────────────────── */

.tos-carrier-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0;
}
.tos-carrier-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.1rem 1.25rem;
  display: flex; flex-direction: column;
}
.tos-carrier-name {
  font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--purple); margin-bottom: .75rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.tos-carrier-card .tos-list { flex: 1; }
.tos-carrier-link {
  display: inline-block; margin-top: .9rem; font-size: .78rem; font-weight: 600;
  color: var(--blue); text-decoration: underline; transition: color .15s;
}
.tos-carrier-link:hover { color: var(--text-primary); }

/* ── Fee-saving tip banner (cart page, multi-label direct pay) ───────────── */

.fee-tip {
  display: flex; align-items: flex-start; gap: .65rem;
  background: linear-gradient(135deg, var(--yellow-dim) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--yellow); border-radius: var(--radius-sm);
  padding: .75rem .9rem; margin-bottom: .75rem;
  animation: feeTipIn .25s ease;
}
@keyframes feeTipIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fee-tip-icon { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.fee-tip-body { flex: 1; font-size: .82rem; line-height: 1.5; color: var(--text-secondary); }
.fee-tip-body strong { color: var(--text-primary); }
.fee-tip-link {
  display: inline-block; margin-top: .3rem;
  color: var(--yellow); font-weight: 600; font-size: .82rem; text-decoration: underline;
}
.fee-tip-link:hover { color: var(--text-primary); }
.fee-tip-close {
  background: none; border: none; cursor: pointer; color: var(--text-dim);
  font-size: .8rem; padding: .1rem .25rem; flex-shrink: 0;
  line-height: 1; transition: color .15s;
}
.fee-tip-close:hover { color: var(--text-primary); }

/* ── Rate form: split action buttons ─────────────────────────────────────── */

.form-actions-split { display: flex; gap: .75rem; flex-wrap: wrap; }
.form-actions-split .btn { flex: 1; min-width: 160px; text-align: center; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .navbar-toggle { display: flex; }
  .navbar-menu {
    display: none; flex-direction: column; align-items: flex-start;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg-surface); border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem; gap: .25rem; z-index: 99;
  }
  .navbar-menu.open { display: flex; }
  .nav-divider { width: 100%; height: 1px; }
  .nav-user { padding: .5rem 0; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-4 { grid-template-columns: 1fr 1fr; }
  .admin-nav-cards { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: .5rem; padding: 1rem; }
  .hero-stat-divider { width: 60%; height: 1px; }
  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }
  .page-header { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 1.6rem; }
  .auth-card { padding: 1.75rem; }
  .detail-row { grid-template-columns: 100px 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 4rem 1rem; }
  .hero-title { font-size: 2rem; }
  .steps-indicator { flex-wrap: wrap; gap: .5rem; }
  .step-line { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTODIAL WALLET SYSTEM — New styles for the XMR deposit/balance UI
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Wallet balance grid ─────────────────────────────────────────────────── */

.wallet-balance-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.5rem;
}
.wallet-balance-card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem 1.75rem;
}
.wallet-balance-card-main {
  background: linear-gradient(135deg, rgba(109,86,210,.12) 0%, var(--bg-surface) 100%);
  border-color: rgba(109,86,210,.3);
}
.wallet-balance-card-pending {
  background: linear-gradient(135deg, rgba(234,179,8,.06) 0%, var(--bg-surface) 100%);
  border-color: rgba(234,179,8,.25);
}
.wallet-balance-left { display: flex; flex-direction: column; gap: .25rem; }
.wallet-balance-right { display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; }
.wallet-balance-label { font-size: .8rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-secondary); }
.wallet-balance-amount { font-size: 2.2rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.wallet-balance-pending-amount { font-size: 1.6rem; color: var(--yellow); }
.wallet-balance-xmr { font-size: .8rem; color: var(--text-dim); }

/* ── Wallet stats row ────────────────────────────────────────────────────── */

.wallet-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; margin-bottom: 1.5rem;
}
.wallet-stat {
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1rem 1.25rem; background: var(--bg-surface);
}
.wallet-stat-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); }
.wallet-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }

/* ── Wallet info cards ───────────────────────────────────────────────────── */

.wallet-info-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem;
}
.wallet-info-item {
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.1rem;
}
.wallet-info-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .05rem; }
.wallet-info-item strong { display: block; font-size: .85rem; color: var(--text-primary); margin-bottom: .2rem; }
.wallet-info-item p { margin: 0; }

/* ── Wallet withdrawal notice ────────────────────────────────────────────── */

.wallet-withdrawal-notice {
  display: flex; gap: 1rem; align-items: flex-start;
  background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.25);
  border-left: 4px solid var(--blue); border-radius: var(--radius-md);
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
}
.wallet-withdrawal-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.wallet-withdrawal-notice strong { display: block; font-size: .9rem; margin-bottom: .35rem; color: var(--text-primary); }
.wallet-withdrawal-notice p { margin: 0; font-size: .85rem; color: var(--text-secondary); line-height: 1.6; }
.wallet-withdrawal-notice a { color: var(--blue); text-decoration: underline; }

/* ── Deposit address page ────────────────────────────────────────────────── */

.deposit-address-card {
  border-color: rgba(109,86,210,.25);
  background: linear-gradient(135deg, rgba(109,86,210,.05) 0%, var(--bg-surface) 100%);
}
.deposit-layout {
  display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: flex-start;
}
.deposit-qr-col { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.deposit-qr {
  border-radius: var(--radius-md); border: 2px solid var(--border);
  display: block;
}
.deposit-qr-placeholder {
  width: 200px; height: 200px; border: 2px dashed var(--border);
  border-radius: var(--radius-md); display: flex; align-items: center;
  justify-content: center; color: var(--text-dim); font-size: .8rem;
}
.deposit-qr-label { font-size: .75rem; color: var(--text-dim); text-align: center; }

.deposit-details-col { display: flex; flex-direction: column; gap: 1.25rem; }
.deposit-explainer { font-size: .9rem; color: var(--text-secondary); line-height: 1.65; margin: 0; }

.deposit-address-row { display: flex; flex-direction: column; gap: .5rem; }

.deposit-calculator { display: flex; flex-direction: column; gap: .4rem; }
.deposit-calc-row { display: flex; align-items: center; gap: .75rem; }
.deposit-calc-sep { color: var(--text-dim); font-size: .9rem; }
.deposit-calc-xmr { font-size: 1rem; font-weight: 700; color: var(--purple); min-width: 140px; }

.deposit-notes {
  display: flex; flex-direction: column; gap: .6rem;
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border);
}
.deposit-note {
  display: flex; gap: .65rem; align-items: flex-start;
  font-size: .82rem; line-height: 1.55; color: var(--text-secondary);
  padding: .6rem .85rem; border-radius: var(--radius-sm);
}
.deposit-note-info { background: rgba(59,130,246,.06); border: 1px solid rgba(59,130,246,.15); }
.deposit-note-warning { background: rgba(234,179,8,.06); border: 1px solid rgba(234,179,8,.2); }
.deposit-note a { color: var(--blue); text-decoration: underline; }

/* ── Dev mode simulate form ──────────────────────────────────────────────── */

.dev-credit-form { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }

/* ── Confirmation progress bar ───────────────────────────────────────────── */

.confirm-progress {
  height: 4px; background: var(--bg-elevated); border-radius: 99px;
  overflow: hidden; width: 80px; display: inline-block; vertical-align: middle; margin-right: .4rem;
}
.confirm-bar {
  height: 100%; background: var(--yellow); border-radius: 99px;
  transition: width .3s ease;
}

/* ── Monero stat card ────────────────────────────────────────────────────── */

.stat-card-xmr {
  background: linear-gradient(135deg, rgba(255,107,0,.06) 0%, var(--bg-surface) 100%);
  border-color: rgba(255,107,0,.2);
}
.stat-icon-orange { background: rgba(255,107,0,.12); color: #ff6b00; }
.stat-card-sub { font-size: .72rem; color: var(--text-dim); margin-top: .2rem; }

/* ── Alert card + nav card ───────────────────────────────────────────────── */

.card-alert {
  border-color: rgba(239,68,68,.3);
  background: linear-gradient(135deg, rgba(239,68,68,.04) 0%, var(--bg-surface) 100%);
}
.stat-card-alert { border-color: rgba(239,68,68,.4); }
.admin-nav-card-alert {
  border-color: rgba(239,68,68,.35) !important;
  background: linear-gradient(135deg, rgba(239,68,68,.05) 0%, var(--bg-elevated) 100%) !important;
}

/* ── RPC status banner ───────────────────────────────────────────────────── */

.rpc-status-banner {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1.1rem; border-radius: var(--radius-md);
  font-size: .875rem; border: 1px solid;
}
.rpc-online  { background: rgba(34,197,94,.06); border-color: rgba(34,197,94,.25); color: var(--text-secondary); }
.rpc-offline { background: rgba(234,179,8,.06); border-color: rgba(234,179,8,.25); color: var(--text-secondary); }
.rpc-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.rpc-online  .rpc-dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
.rpc-offline .rpc-dot { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }

/* ── Admin credit/debit form grid ────────────────────────────────────────── */

.admin-credit-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1rem;
  margin-bottom: 1rem;
}

/* ── Medium container ────────────────────────────────────────────────────── */

.container-md { max-width: 900px; }

/* ── Extra small button ──────────────────────────────────────────────────── */

.btn-xs { padding: .2rem .55rem; font-size: .72rem; }

/* ── Responsive adjustments for new wallet UI ───────────────────────────── */

@media (max-width: 900px) {
  .deposit-layout { grid-template-columns: 1fr; }
  .deposit-qr-col { flex-direction: row; align-items: center; gap: 1rem; }
  .wallet-info-row { grid-template-columns: 1fr; }
  .admin-credit-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .wallet-balance-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .wallet-balance-right { flex-direction: row; align-items: center; }
  .wallet-stats-row { grid-template-columns: 1fr; }
  .deposit-qr-col { flex-direction: column; }
  .admin-credit-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DISCLOSURES, ORDER HISTORY, TRACKING — Feature styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── TOS sub-headings ────────────────────────────────────────────────────── */

.tos-sub-title {
  font-size: 1rem; font-weight: 700; color: var(--text-primary);
  margin: 1.5rem 0 .5rem;
}
.tos-callout-important {
  background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.25);
  border-left-color: var(--red);
}

/* ── Custodial wallet disclosure banner (dashboard) ─────────────────────── */

.custodial-disclosure-banner {
  background: rgba(109,86,210,.07); border: 1px solid rgba(109,86,210,.25);
  border-radius: var(--radius-md); margin-bottom: 1.5rem; overflow: hidden;
}
.custodial-disclosure-inner {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: .9rem 1.1rem;
}
.custodial-disclosure-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.custodial-disclosure-inner strong { display: block; font-size: .9rem; color: var(--text-primary); margin-bottom: .25rem; }
.custodial-disclosure-inner p { margin: 0; font-size: .83rem; color: var(--text-secondary); line-height: 1.55; }
.custodial-disclosure-inner a { color: var(--purple); text-decoration: underline; }
.custodial-disclosure-close {
  background: none; border: none; cursor: pointer; color: var(--text-dim);
  font-size: 1.1rem; padding: .1rem .3rem; flex-shrink: 0; margin-left: auto;
  line-height: 1; transition: color .15s;
}
.custodial-disclosure-close:hover { color: var(--text-primary); }

/* ── Pending deposit alert (dashboard) ──────────────────────────────────── */

.pending-deposit-alert {
  display: flex; gap: 1rem; align-items: center;
  background: rgba(234,179,8,.07); border: 1px solid rgba(234,179,8,.25);
  border-left: 3px solid var(--yellow); border-radius: var(--radius-md);
  padding: .85rem 1.1rem; margin-bottom: 1.5rem;
}
.pending-deposit-alert > span { font-size: 1.1rem; flex-shrink: 0; }
.pending-deposit-alert > div { flex: 1; }
.pending-deposit-alert strong { display: block; font-size: .9rem; color: var(--text-primary); margin-bottom: .15rem; }
.pending-deposit-alert p { margin: 0; font-size: .82rem; color: var(--text-secondary); }

/* ── Stat card sub-line ──────────────────────────────────────────────────── */

.stat-card-sub { font-size: .72rem; margin-top: .2rem; color: var(--text-dim); }
.text-yellow { color: var(--yellow); }

/* ── Stats grid 6 ────────────────────────────────────────────────────────── */

.stats-grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) { .stats-grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .stats-grid-6 { grid-template-columns: repeat(2, 1fr); } }

/* ── Custodial deposit disclosure (deposit page) ─────────────────────────── */

.custodial-deposit-disclosure {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.custodial-disclosure-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.custodial-item {
  display: flex; gap: .65rem; align-items: flex-start;
}
.custodial-item-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.custodial-item strong { display: block; font-size: .82rem; color: var(--text-primary); margin-bottom: .2rem; }
.custodial-item p { margin: 0; font-size: .78rem; color: var(--text-dim); line-height: 1.5; }
.custodial-disclosure-link { margin: .75rem 0 0; font-size: .78rem; }
.custodial-disclosure-link a { color: var(--purple); text-decoration: underline; }

/* ── Wallet custodial notice (wallet page) ───────────────────────────────── */

.wallet-custodial-notice {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.wallet-custodial-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.wallet-custodial-item {
  display: flex; gap: .65rem; align-items: flex-start;
}
.wallet-custodial-item > span { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.wallet-custodial-item strong { display: block; font-size: .82rem; color: var(--text-primary); margin-bottom: .15rem; }
.link-subtle { color: var(--purple); text-decoration: underline; font-size: .8rem; }

/* ── Orders filter bar ───────────────────────────────────────────────────── */

.orders-filter-bar {
  margin-bottom: 1rem;
}
.orders-filter-form {
  display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: .75rem 1rem;
}
.filter-search-wrap {
  position: relative; display: flex; align-items: center; flex: 1; min-width: 220px;
}
.filter-search-icon {
  position: absolute; left: .65rem; font-size: .85rem; pointer-events: none;
  color: var(--text-dim);
}
.filter-search-input {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .45rem .75rem .45rem 2rem;
  font-size: .875rem; color: var(--text-primary); outline: none;
}
.filter-search-input:focus { border-color: var(--purple); }
.filter-search-input::placeholder { color: var(--text-dim); }
.filter-clear-btn {
  position: absolute; right: .5rem; color: var(--text-dim); font-size: 1.1rem;
  text-decoration: none; line-height: 1; padding: .1rem .25rem;
  background: none; border: none; cursor: pointer;
}
.filter-clear-btn:hover { color: var(--text-primary); }
.filter-select {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .45rem .75rem;
  font-size: .875rem; color: var(--text-primary); cursor: pointer; outline: none;
}
.filter-select:focus { border-color: var(--purple); }
.filter-period-toggle {
  display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.filter-period-btn {
  padding: .4rem .85rem; font-size: .8rem; font-weight: 600; text-decoration: none;
  color: var(--text-secondary); background: var(--bg-input); white-space: nowrap;
  transition: background .15s, color .15s;
}
.filter-period-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.filter-period-btn.active {
  background: var(--purple); color: #fff;
}
.filter-period-btn + .filter-period-btn { border-left: 1px solid var(--border); }

.orders-result-meta {
  padding: .75rem 1.25rem; border-bottom: 1px solid var(--border);
}
.orders-table .tracking-link {
  color: var(--blue); text-decoration: underline; word-break: break-all;
}
.orders-table .tracking-link:hover { color: var(--text-primary); }

/* ── Tracking page ───────────────────────────────────────────────────────── */

.tracking-main-card { margin-bottom: 1.25rem; }
.tracking-status-block {
  display: flex; gap: 1.25rem; align-items: center;
  padding: 1.5rem 1.75rem;
}
.tracking-status-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; flex-shrink: 0;
  background: var(--bg-elevated); color: var(--text-secondary);
}
.tracking-status-complete  { background: rgba(34,197,94,.12); color: var(--green); }
.tracking-status-awaiting_payment { background: rgba(234,179,8,.12); color: var(--yellow); }
.tracking-status-failed    { background: rgba(239,68,68,.12); color: var(--red); }
.tracking-status-refunded  { background: rgba(109,86,210,.12); color: var(--purple); }
.tracking-status-headline  { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin: 0 0 .2rem; }
.tracking-status-sub       { font-size: .82rem; color: var(--text-dim); margin: 0; }
.tracking-external-notice {
  display: flex; gap: .75rem; align-items: flex-start;
  font-size: .83rem; color: var(--text-secondary); line-height: 1.55;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: .85rem 1rem; margin-top: 1rem;
}
.tracking-external-notice p { margin: 0; }
.tracking-external-notice a { color: var(--blue); text-decoration: underline; }

/* ── Responsive: disclosures, filters, tracking ─────────────────────────── */

@media (max-width: 860px) {
  .custodial-disclosure-grid { grid-template-columns: 1fr; }
  .wallet-custodial-grid     { grid-template-columns: 1fr; }
  .custodial-disclosure-grid .custodial-item { border-bottom: 1px solid var(--border); padding-bottom: .75rem; }
  .custodial-disclosure-grid .custodial-item:last-child { border-bottom: none; padding-bottom: 0; }
}
@media (max-width: 640px) {
  .orders-filter-form { gap: .5rem; }
  .filter-search-wrap { min-width: 100%; }
  .tracking-status-block { flex-direction: column; align-items: flex-start; gap: .75rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW FEATURES: Maintenance, Support Tickets, Activity Logs, Freeze Controls
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Maintenance page ────────────────────────────────────────────────────── */

.maintenance-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg-base); padding: 2rem 1rem;
}
.maintenance-content {
  text-align: center; max-width: 500px; width: 100%;
}
.maintenance-icon {
  font-size: 3.5rem; margin-bottom: 1.25rem; animation: wobble 2s ease-in-out infinite;
}
@keyframes wobble {
  0%,100% { transform: rotate(-8deg); }
  50%      { transform: rotate(8deg); }
}
.maintenance-title {
  font-size: 2rem; font-weight: 800; color: var(--text-primary); margin: 0 0 .75rem;
}
.maintenance-sub {
  color: var(--text-secondary); font-size: 1.05rem; line-height: 1.65; margin: 0 0 1.5rem;
}
.maintenance-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem; text-align: left; margin-bottom: 1.25rem;
}
.maintenance-what {
  font-weight: 700; color: var(--text-primary); margin: 0 0 .6rem;
}
.maintenance-card ul { margin: 0; padding-left: 1.25rem; color: var(--text-secondary); line-height: 1.8; }
.maintenance-contact { color: var(--text-dim); font-size: .9rem; margin: 0 0 1.25rem; }
.maintenance-contact a { color: var(--blue); }

/* ── Payment page: status auto-refresh banner ────────────────────────────── */

.status-banner {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.25rem; border-radius: var(--radius-md);
  margin-bottom: 1rem; font-size: .9rem; font-weight: 500;
}
.status-banner-waiting {
  background: rgba(234,179,8,.1); border: 1px solid rgba(234,179,8,.3);
  color: var(--yellow);
}
.status-banner-success {
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3);
  color: var(--green);
}
.status-banner-icon { font-size: 1.1rem; flex-shrink: 0; }
.status-banner-pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; margin-left: auto; flex-shrink: 0;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.6); }
}

/* ── Support ticket thread ───────────────────────────────────────────────── */

.ticket-thread {
  display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem;
}
.ticket-message {
  border-radius: var(--radius-lg); padding: 1rem 1.25rem;
  border: 1px solid var(--border);
}
.ticket-message-user  { background: var(--bg-card); }
.ticket-message-admin {
  background: rgba(99,102,241,.07); border-color: rgba(99,102,241,.25);
}
.ticket-message-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .6rem; flex-wrap: wrap; gap: .5rem;
}
.ticket-author { display: flex; align-items: center; gap: .5rem; }
.ticket-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-elevated); color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.ticket-avatar-admin { background: rgba(99,102,241,.2); color: var(--blue); }
.ticket-timestamp { font-size: .78rem; }
.ticket-message-body {
  color: var(--text-secondary); font-size: .9rem; line-height: 1.65;
}

/* ── Support info card ───────────────────────────────────────────────────── */

.support-info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
}
.support-info-card h3 {
  font-size: .9rem; font-weight: 700; color: var(--text-primary);
  margin: 0 0 .6rem; text-transform: uppercase; letter-spacing: .05em;
}
.support-info-card ul {
  margin: 0; padding-left: 1.25rem; color: var(--text-secondary);
  line-height: 1.8; font-size: .88rem;
}
.support-info-card a { color: var(--blue); }

/* ── Filter tabs ─────────────────────────────────────────────────────────── */

.filter-tabs {
  display: flex; gap: .25rem; border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.filter-tab {
  padding: .45rem .9rem; font-size: .85rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.filter-tab:hover { color: var(--text-primary); }
.filter-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── Badge extras (xs size, new colors) ──────────────────────────────────── */

.badge-xs { font-size: .68rem; padding: .15rem .4rem; }
.badge-purple { background: rgba(109,86,210,.15); color: var(--purple); }

/* ── Frozen row highlight ────────────────────────────────────────────────── */

.row-frozen td { background: rgba(239,68,68,.05); }
.row-muted  td { opacity: .65; }

/* ── Danger ghost button ─────────────────────────────────────────────────── */

.btn-danger-ghost {
  border-color: rgba(239,68,68,.4); color: var(--red);
}
.btn-danger-ghost:hover {
  background: rgba(239,68,68,.1); border-color: var(--red);
}
.btn-danger {
  background: var(--red); border-color: var(--red); color: #fff;
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }

/* ── Modal overlay ───────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
}
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem; max-width: 460px; width: 100%;
}
.modal-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 .5rem; color: var(--text-primary); }
.modal-body  { color: var(--text-secondary); font-size: .9rem; margin: 0 0 1.25rem; }
.modal-actions { display: flex; gap: .5rem; margin-top: 1.25rem; }

/* ── Alert box (maintenance banner) ─────────────────────────────────────── */

.alert { padding: .9rem 1.25rem; border-radius: var(--radius-md); font-size: .9rem; }
.alert-warning {
  background: rgba(234,179,8,.1); border: 1px solid rgba(234,179,8,.3);
  color: var(--yellow);
}

/* ── Stats grid: 3-column variant ────────────────────────────────────────── */

.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card-alert { border-color: rgba(239,68,68,.4); }

/* ── Activity log: compact table ─────────────────────────────────────────── */

.table-sm td, .table-sm th { padding: .45rem .75rem; font-size: .8rem; }

/* ── Filter bar (activity log search) ───────────────────────────────────── */

.filter-bar {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.form-input-sm { height: 34px; padding: .3rem .65rem; font-size: .85rem; }

/* ── Pagination ──────────────────────────────────────────────────────────── */

.pagination {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  margin-top: 1rem; padding-top: 1rem;
}

/* ── Table link styling ──────────────────────────────────────────────────── */

.table-link { color: var(--text-primary); font-weight: 500; text-decoration: none; }
.table-link:hover { color: var(--blue); text-decoration: underline; }

/* ── Info box ────────────────────────────────────────────────────────────── */

.info-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.25rem;
  color: var(--text-secondary); font-size: .9rem;
}
.info-box a { color: var(--blue); }

/* ── Text size utility ───────────────────────────────────────────────────── */

.text-xs { font-size: .73rem; }

/* ── Responsive: support, activity ──────────────────────────────────────── */

@media (max-width: 860px) {
  .stats-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ticket-message-header { flex-direction: column; align-items: flex-start; }
  .filter-tabs { flex-wrap: wrap; }
  .stats-grid-3 { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* v2.0 — Kill Switches, Health, Risk Scoring, Blacklists, Audit, Notes       */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ── Kill Switch Panel ─────────────────────────────────────────────────── */

.kill-switch-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kill-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.kill-switch-row:last-child { border-bottom: none; }

.kill-switch-row-danger {
  background: rgba(239,68,68,.04);
  border-radius: 0 0 .75rem .75rem;
}

.kill-switch-info { flex: 1; }
.kill-switch-info strong { display:block; font-size:.9rem; color:var(--text-primary); }
.kill-switch-info p { font-size:.8rem; color:var(--text-muted); margin:.15rem 0 0; }

.kill-switch-btn {
  padding: .45rem 1rem;
  border-radius: .5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  min-width: 190px;
  text-align: center;
}
.kill-switch-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }

.kill-switch-active {
  background: rgba(234,179,8,.12);
  border-color: #ca8a04;
  color: #eab308;
}
.kill-switch-active:hover { background: rgba(234,179,8,.18); }

.kill-switch-danger {
  background: rgba(239,68,68,.15) !important;
  border-color: #dc2626 !important;
  color: #ef4444 !important;
}

/* ── System Health Cards ───────────────────────────────────────────────── */

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 0;
}

.health-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.25rem;
  transition: border-color .15s;
}
.health-card-online  { border-left: 3px solid #22c55e; }
.health-card-degraded { border-left: 3px solid #eab308; }
.health-card-offline { border-left: 3px solid #ef4444; }

.health-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .75rem;
}
.health-icon { font-size: 1.5rem; }

.health-status-badge {
  padding: .25rem .6rem;
  border-radius: .4rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
}
.health-status-online  { background: rgba(34,197,94,.15);  color: #22c55e; }
.health-status-degraded { background: rgba(234,179,8,.15); color: #eab308; }
.health-status-offline { background: rgba(239,68,68,.15);  color: #ef4444; }

.health-card-body h3 { font-size: .95rem; margin: 0 0 .25rem; }
.health-detail       { font-size: .8rem;  color: var(--text-muted); margin: 0; }
.health-note         { font-size: .78rem; color: #eab308; margin: .5rem 0 0; }

/* ── Hot Wallet display ────────────────────────────────────────────────── */

.wallet-balance-display { margin-bottom: 1.25rem; }
.balance-amount { font-size: 1.6rem; font-weight: 700; font-family: var(--font-mono); }
.text-success { color: #22c55e; }
.text-danger  { color: #ef4444; }
.text-warning { color: #eab308; }

.wallet-architecture-note {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.wallet-architecture-note h4 { font-size: .85rem; margin: 0 0 .4rem; color: var(--text-secondary); }
.cold-wallet-stub { margin-top: .5rem; display: flex; align-items: center; gap: .5rem; }

/* ── Risk Score Bar ────────────────────────────────────────────────────── */

.risk-score-section { margin-bottom: .5rem; }
.risk-score-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: .4rem;
}
.risk-score-number { font-weight: 700; font-family: var(--font-mono); }

.risk-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.risk-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .3s ease;
}
.risk-bar-low  { background: #22c55e; }
.risk-bar-med  { background: #eab308; }
.risk-bar-high { background: #ef4444; }

.risk-mini { font-size: .75rem; font-family: var(--font-mono); }

/* ── Trust Level Badges ────────────────────────────────────────────────── */

.badge-orange { background: rgba(249,115,22,.15); color: #f97316; }

/* ── User Detail Page ──────────────────────────────────────────────────── */

.user-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: .5rem;
}
@media (max-width: 768px) {
  .user-detail-grid { grid-template-columns: 1fr; }
}

.detail-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.detail-table td { padding: .45rem .25rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.detail-table td:first-child { color: var(--text-muted); width: 38%; }
.detail-table tr:last-child td { border-bottom: none; }

/* ── Admin Notes ───────────────────────────────────────────────────────── */

.notes-list { display: flex; flex-direction: column; gap: .75rem; }

.note-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: .75rem 1rem;
}
.note-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; margin-bottom: .4rem; }
.note-body  { font-size: .88rem; color: var(--text-primary); white-space: pre-wrap; line-height: 1.55; }

/* ── Blacklist table ───────────────────────────────────────────────────── */

.row-inactive td { opacity: .5; }

.badge-orange { background: rgba(249,115,22,.15); color: #f97316; }
.badge-gray   { background: rgba(107,114,128,.15); color: #9ca3af; }

/* ── Add form inline grid ──────────────────────────────────────────────── */

.form-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 1rem;
}
@media (max-width: 600px) { .form-inline-grid { grid-template-columns: 1fr; } }

/* ── Stats grid variants ───────────────────────────────────────────────── */

.stats-grid-2 { grid-template-columns: repeat(2, 1fr); }
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 900px) {
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .stats-grid-2 { grid-template-columns: 1fr; }
  .stats-grid-4, .stats-grid-5 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Alert / info banner ───────────────────────────────────────────────── */

.alert-info {
  background: rgba(99,102,241,.1);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: .5rem;
  padding: .85rem 1rem;
  font-size: .88rem;
  color: var(--text-secondary);
}

/* ── Audit log / activity action badge sm variant ──────────────────────── */

.badge-sm { font-size: .7rem; padding: .2rem .5rem; }
.badge-xs { font-size: .65rem; padding: .15rem .4rem; }

/* ── stat-card-note ────────────────────────────────────────────────────── */

.stat-card-note { font-size: .7rem; color: var(--text-muted); margin: .15rem 0 0; }

/* ── stat-icon-orange ──────────────────────────────────────────────────── */
.stat-icon-orange { background: rgba(249,115,22,.15); color: #f97316; }

/* ── form-input-sm ─────────────────────────────────────────────────────── */
.form-input-sm { padding: .35rem .6rem; font-size: .85rem; }

/* ── Admin nav cards — expand to 3-column on larger screens ─────────────── */
.admin-nav-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM MEMBERSHIP & TIER SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tier badges ──────────────────────────────────────────────────────────── */
/* Displayed in navbar, dashboard, orders, admin wherever membership shows.  */

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity .2s;
}
.tier-badge:hover { opacity: .85; }

/* Sizes */
.tier-badge-sm  { font-size: .65rem; padding: .18rem .45rem; }
.tier-badge-nav { font-size: .68rem; padding: .22rem .55rem; }
.tier-badge-lg  { font-size: .82rem; padding: .35rem .8rem; }

/* Free — subtle grey */
.tier-free {
  background: rgba(96,96,120,.18);
  color: var(--text-secondary);
  border: 1px solid rgba(96,96,120,.3);
}

/* Tier 1 — blue / teal */
.tier-basic {
  background: rgba(59,130,246,.15);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,.35);
}

/* Tier 2 — purple (featured) */
.tier-pro {
  background: rgba(124,106,255,.18);
  color: #a78bfa;
  border: 1px solid rgba(124,106,255,.4);
}

/* Tier 3 — gold / amber (elite) */
.tier-elite {
  background: rgba(234,179,8,.15);
  color: #fbbf24;
  border: 1px solid rgba(234,179,8,.4);
  box-shadow: 0 0 8px rgba(234,179,8,.12);
}

/* ── Navbar tier badge link ───────────────────────────────────────────────── */
.nav-tier-badge-link { text-decoration: none; }

/* ── Dashboard tier row ───────────────────────────────────────────────────── */
.dashboard-tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: .85rem 1.25rem;
  margin-bottom: 1rem;
}
.dashboard-tier-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.dashboard-tier-hint {
  font-size: .82rem;
  color: var(--text-secondary);
}
.dashboard-tier-hint a { color: var(--accent); text-decoration: none; }
.dashboard-tier-hint a:hover { text-decoration: underline; }

/* ── Onboarding notice ───────────────────────────────────────────────────── */
/* Friendly, non-accusatory notice for new/free accounts.                    */

.onboarding-notice {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.22);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  position: relative;
}
.onboarding-notice-compact { font-size: .88rem; margin-bottom: 1.25rem; }
.onboarding-notice-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.onboarding-notice strong { color: var(--text-primary); font-size: .9rem; display: block; margin-bottom: .3rem; }
.onboarding-notice p { color: var(--text-secondary); font-size: .83rem; margin: 0; line-height: 1.5; }
.onboarding-notice a { color: var(--accent); text-decoration: none; }
.onboarding-notice a:hover { text-decoration: underline; }
.onboarding-notice-close {
  position: absolute;
  top: .6rem; right: .75rem;
  background: none; border: none;
  color: var(--text-muted); font-size: 1.3rem;
  cursor: pointer; line-height: 1; padding: 0;
}
.onboarding-notice-close:hover { color: var(--text-primary); }

/* ── Info banner (generic) ────────────────────────────────────────────────── */
.info-banner {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: .9rem 1.2rem;
  font-size: .85rem;
}
.info-banner strong { color: var(--text-primary); display: block; margin-bottom: .2rem; }
.info-banner p { color: var(--text-secondary); margin: 0; font-size: .82rem; }
.info-banner a { color: var(--accent); text-decoration: none; }
.info-banner a:hover { text-decoration: underline; }

/* ── Membership status banner (top of /premium) ───────────────────────────── */
.membership-status-banner {
  border-radius: .75rem;
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--bg-elevated);
}
.membership-status-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.membership-status-text { font-size: .85rem; color: var(--text-secondary); margin: .35rem 0 0; }
.discount-active-notice  { font-size: .82rem; color: var(--green); margin: .25rem 0 0; }

/* ── Pricing grid ─────────────────────────────────────────────────────────── */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.pricing-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.pricing-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(124,106,255,.15);
}
.pricing-card-elite {
  border-color: rgba(234,179,8,.5);
  box-shadow: 0 0 0 1px rgba(234,179,8,.3), 0 8px 32px rgba(234,179,8,.08);
}
.pricing-card-current {
  border-color: var(--green);
}

.pricing-card-badge {
  position: absolute; top: 0; right: 0;
  background: var(--accent);
  color: #fff;
  font-size: .7rem; font-weight: 700;
  padding: .2rem .65rem;
  border-radius: 0 1rem 0 .5rem;
  letter-spacing: .04em;
}
.pricing-card-badge-elite {
  background: linear-gradient(135deg, #d97706, #fbbf24);
  color: #1a0e00;
}

.pricing-card-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}
.pricing-price {
  margin-top: .75rem;
  display: flex;
  align-items: baseline;
  gap: .4rem;
}
.pricing-amount { font-size: 2rem; font-weight: 800; color: var(--text-primary); }
.pricing-period { font-size: .82rem; color: var(--text-muted); }

.pricing-card-body { padding: 1.25rem 1.5rem; flex: 1; }

.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.pricing-features li {
  font-size: .84rem;
  color: var(--text-secondary);
  padding-left: 1.2rem;
  position: relative;
}
.pricing-features li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--green);
  font-weight: 700;
}
.feature-excluded { color: var(--text-dim) !important; }
.feature-excluded::before { content: '–' !important; color: var(--text-muted) !important; }

.pricing-savings-hint {
  font-size: .78rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1rem 0 0;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

/* Richer per-tier value-prop block shown above the upgrade button */
.pricing-perks {
  margin: 1rem 0 0;
  padding: .9rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  border-radius: 8px;
}
.pricing-perks-title {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 .5rem;
  font-weight: 700;
}
.pricing-perks-tagline {
  font-size: .88rem;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 .55rem;
  line-height: 1.35;
}
.pricing-perks-list {
  list-style: none;
  padding: 0;
  margin: 0 0 .55rem;
}
.pricing-perks-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: .25rem 0;
}
.pricing-perks-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: .65rem;
  line-height: 1.5;
}
.pricing-perks-footnote {
  font-size: .72rem;
  color: var(--text-dim);
  font-style: italic;
  margin: .5rem 0 0;
}
/* Small inline tag for perks that are planned but not yet live */
.perk-soon {
  display: inline-block;
  margin-left: .35rem;
  padding: .05rem .4rem;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  border-radius: 999px;
  vertical-align: middle;
}
/* Elite-tier accent — slightly warmer to match the gold upgrade button */
.pricing-card-elite .pricing-perks { background: rgba(245, 158, 11, .06); }
.pricing-card-elite .pricing-perks-list li::before { color: #f59e0b; }

.pricing-card-footer { padding: 1rem 1.5rem 1.5rem; }
.pricing-balance-warning {
  font-size: .76rem;
  color: var(--yellow);
  margin: .5rem 0 0;
  text-align: center;
}
.pricing-balance-warning a { color: var(--accent); text-decoration: none; }

.btn-premium {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #1a0e00;
  font-weight: 700;
  border: none;
}
.btn-premium:hover {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #1a0e00;
}

/* ── FAQ grid ─────────────────────────────────────────────────────────────── */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 1.25rem;
}
.faq-item h4 { color: var(--text-primary); font-size: .9rem; margin: 0 0 .4rem; }
.faq-item p  { color: var(--text-secondary); font-size: .82rem; margin: 0; line-height: 1.55; }

/* ── Premium success card ─────────────────────────────────────────────────── */
.success-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}
.success-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 520px;
  width: 100%;
}
.success-icon { font-size: 3rem; margin-bottom: 1rem; color: var(--accent); }
.success-card h1 { font-size: 1.6rem; margin-bottom: .5rem; }
.success-subtitle { color: var(--text-secondary); font-size: .92rem; margin: 1rem 0; }
.success-tier-badge { margin: 1rem 0; }
.success-savings-notice {
  display: flex; gap: .75rem; align-items: flex-start;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: .6rem;
  padding: .85rem 1rem;
  text-align: left;
  margin: 1.25rem 0;
  font-size: .84rem;
  color: var(--text-secondary);
}
.success-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }

/* ── Limitations page ─────────────────────────────────────────────────────── */

.limitations-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.limitations-status-left {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.limitations-status-info { font-size: .85rem; }
.limitations-status-info p { margin: .2rem 0; color: var(--text-secondary); }

.limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.limit-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: .75rem;
  overflow: hidden;
}
.limit-card-info { background: var(--bg-surface); }
.limit-card-header {
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.limit-card-header h3 { font-size: .95rem; font-weight: 600; margin: 0; color: var(--text-primary); }
.limit-card-body { padding: 1.25rem; }

.limit-stat {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .84rem; margin-bottom: .6rem;
}
.limit-label { color: var(--text-muted); }
.limit-value  { color: var(--text-primary); font-weight: 600; }

.limit-remaining { margin: .5rem 0 .75rem; font-size: .82rem; }
.limit-transaction {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; padding-top: .75rem; border-top: 1px solid var(--border);
}

/* ── Progress bars ────────────────────────────────────────────────────────── */
.progress-bar-container {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
  margin: .4rem 0;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
  min-width: 2px;
}
.progress-bar-usps { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.progress-bar-ups  { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* ── Upgrade CTA card ─────────────────────────────────────────────────────── */
.upgrade-cta-card {
  background: linear-gradient(135deg, rgba(124,106,255,.12), rgba(59,130,246,.08));
  border: 1px solid rgba(124,106,255,.3);
  border-radius: 1rem;
  padding: 2rem;
}
.upgrade-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.upgrade-cta-inner h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
.upgrade-cta-inner p  { color: var(--text-secondary); font-size: .88rem; margin: 0 0 .4rem; }
.upgrade-cta-hint { color: var(--text-muted) !important; font-style: italic; font-size: .8rem !important; }

/* ── Dashboard limits widget ─────────────────────────────────────────────── */
.limits-widget { margin-bottom: 1.5rem; }
.limits-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  padding: 1.25rem;
}
.limit-widget-item { display: flex; flex-direction: column; gap: .4rem; }
.limit-widget-label {
  display: flex; justify-content: space-between;
  font-size: .84rem; color: var(--text-secondary); font-weight: 600;
}
.limit-widget-remaining { font-size: .78rem; }
.limits-widget-footer {
  padding: .9rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}

/* ── Stat row (for analytics) ─────────────────────────────────────────────── */
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.stat-row:last-child { border-bottom: none; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .limits-grid  { grid-template-columns: 1fr; }
  .upgrade-cta-inner { flex-direction: column; align-items: flex-start; }
  .membership-status-inner { flex-direction: column; align-items: flex-start; }
  .dashboard-tier-row { flex-direction: column; align-items: flex-start; }
}

/* ── Support Chatbot Widget ──────────────────────────────────────────────────
   Floating bubble + slide-up chat panel for logged-in users.
   Rendered by views/partials/chatbot-widget.ejs, controlled by js/chatbot.js. */

.chatbot-root {
  position: fixed;
  bottom: 1.25rem;
  right:  1.25rem;
  z-index: 9000;
  font-family: inherit;
}

.chatbot-launcher {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.05rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent, #6366f1), #8b5cf6);
  color: #fff;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 2px 6px rgba(99, 102, 241, .4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.chatbot-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .4), 0 4px 10px rgba(99, 102, 241, .5); }
.chatbot-launcher.is-open { transform: scale(.94); opacity: .85; }
.chatbot-launcher-icon { font-size: 1.05rem; line-height: 1; }
.chatbot-launcher-label { letter-spacing: .01em; }

.chatbot-panel {
  position: absolute;
  bottom: 3.75rem;
  right: 0;
  width: 22rem;
  max-width: calc(100vw - 2rem);
  height: 32rem;
  max-height: calc(100vh - 6rem);
  background: var(--bg-elevated, #1a1a24);
  border: 1px solid var(--border, #2a2a3a);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatbot-pop .18s ease-out;
}
@keyframes chatbot-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, .15), rgba(139, 92, 246, .1));
  border-bottom: 1px solid var(--border);
}
.chatbot-header-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.chatbot-header-icon { color: var(--accent); }
.chatbot-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .35rem;
  border-radius: 6px;
}
.chatbot-close:hover { color: var(--text-primary); background: rgba(255, 255, 255, .06); }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.chatbot-msg {
  max-width: 85%;
  padding: .55rem .8rem;
  border-radius: 12px;
  font-size: .86rem;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.chatbot-msg-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, .05);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chatbot-msg-user {
  align-self: flex-end;
  background: var(--accent, #6366f1);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: 0 .9rem .55rem;
}
.chatbot-suggestions:empty { padding: 0; }
.chatbot-chip {
  font-size: .74rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, .12);
  border: 1px solid rgba(99, 102, 241, .35);
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  line-height: 1.2;
}
.chatbot-chip:hover { background: rgba(99, 102, 241, .22); }
.chatbot-chip-link { background: rgba(255, 255, 255, .04); border-color: var(--border); }

.chatbot-input {
  display: flex;
  gap: .4rem;
  padding: .65rem .75rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, .2);
}
.chatbot-input input[type='text'] {
  flex: 1;
  background: var(--bg, #0f0f17);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem .7rem;
  color: var(--text-primary);
  font-size: .86rem;
  font-family: inherit;
}
.chatbot-input input[type='text']:focus { outline: none; border-color: var(--accent); }
.chatbot-send {
  background: var(--accent, #6366f1);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 .9rem;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 700;
}
.chatbot-send:hover { filter: brightness(1.1); }

.chatbot-ticket-form {
  padding: .85rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, .25);
  max-height: 70%;
  overflow-y: auto;
}
.chatbot-ticket-intro {
  margin: 0 0 .65rem;
  font-size: .8rem;
  color: var(--text-secondary);
}
.chatbot-field {
  display: block;
  margin-bottom: .6rem;
}
.chatbot-field > span {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-secondary);
  margin-bottom: .25rem;
  font-weight: 600;
}
.chatbot-field > span small { color: var(--text-dim); font-weight: 400; }
.chatbot-field input,
.chatbot-field select,
.chatbot-field textarea {
  width: 100%;
  background: var(--bg, #0f0f17);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .45rem .6rem;
  color: var(--text-primary);
  font-size: .82rem;
  font-family: inherit;
  resize: vertical;
}
.chatbot-field input:focus,
.chatbot-field select:focus,
.chatbot-field textarea:focus { outline: none; border-color: var(--accent); }
.chatbot-ticket-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: .4rem;
}

/* Mobile: full-width sheet from the bottom */
@media (max-width: 480px) {
  .chatbot-panel {
    width: calc(100vw - 1rem);
    right: -.25rem;
  }
}
