/* MuseMark — style.css
   Mobile-first. Max-width 480px. Dark BDSM aesthetic.
   Colors:
     Background:  #1a1a1a
     Surface:     #242424
     Border:      #333333
     Text:        #f5f5f5
     Muted text:  #999999
     Accent red:  #c41e3a
     Accent gold: #d4af37
   Profile type badges:
     Dominant:    #8b0000 (dark red)
     Submissive:  #4a0080 (deep purple)
     Gear:        #1a3a5c (steel blue)
     Crafter:     #2d4a1e (forest green)
     Other:       #3a3a3a (neutral dark)
*/

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

/* ---- Base ---- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: #1a1a1a;
  color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Layout container ---- */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
  flex: 1;
}

/* ---- Header ---- */
.site-header {
  background-color: #111111;
  border-bottom: 1px solid #c41e3a;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f5f5f5;
  text-decoration: none;
}

.wordmark span {
  color: #d4af37;
}

.header-nav a {
  color: #999999;
  text-decoration: none;
  font-size: 0.875rem;
  margin-left: 12px;
}

.header-nav a:hover {
  color: #f5f5f5;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 16px;
  color: #555555;
  font-size: 0.75rem;
  border-top: 1px solid #2a2a2a;
  margin-top: auto;
}

.site-footer a {
  color: #d4af37;
  text-decoration: none;
}

/* ---- Typography ---- */
h1 { font-size: 1.5rem;  font-weight: 700; margin-bottom: 8px; }
h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
h3 { font-size: 1.1rem;  font-weight: 600; margin-bottom: 6px; }
p  { margin-bottom: 12px; color: #cccccc; }

.muted { color: #999999; font-size: 0.875rem; }

/* ---- Cards ---- */
.card {
  background-color: #242424;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  opacity: 0.8;
}

.btn-primary {
  background-color: #c41e3a;
  color: #f5f5f5;
}

.btn-primary:hover {
  background-color: #a01830;
}

.btn-secondary {
  background-color: #333333;
  color: #f5f5f5;
}

.btn-secondary:hover {
  background-color: #444444;
}

.btn-gold {
  background-color: #d4af37;
  color: #1a1a1a;
}

.btn-gold:hover {
  background-color: #b8962a;
}

.btn-danger {
  background-color: transparent;
  color: #c41e3a;
  border: 1px solid #c41e3a;
}

.btn-danger:hover {
  background-color: #c41e3a;
  color: #f5f5f5;
}

.btn-full {
  width: 100%;
  display: flex;
}

.btn-sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cccccc;
  margin-bottom: 6px;
}

.form-label .required {
  color: #c41e3a;
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 44px;
  background-color: #2d2d2d;
  border: 1px solid #444444;
  border-radius: 6px;
  color: #f5f5f5;
  font-size: 1rem;
  font-family: inherit;
  padding: 10px 12px;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #d4af37;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #666666;
}

.form-textarea {
  min-height: 88px;
  resize: vertical;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 0.8rem;
  color: #777777;
  margin-top: 4px;
}

.form-error {
  font-size: 0.8rem;
  color: #c41e3a;
  margin-top: 4px;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* ---- Profile type badges ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-dominant    { background-color: #8b0000; color: #f5f5f5; }
.badge-submissive  { background-color: #4a0080; color: #f5f5f5; }
.badge-gear        { background-color: #1a3a5c; color: #f5f5f5; }
.badge-crafter     { background-color: #2d4a1e; color: #f5f5f5; }
.badge-other       { background-color: #3a3a3a; color: #cccccc; }

/* ---- Profile page ---- */
.profile-hero {
  text-align: center;
  padding: 32px 16px 24px;
}

.profile-photo-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 3px solid #d4af37;
  background-color: #2d2d2d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-placeholder {
  font-size: 3rem;
  color: #555555;
  line-height: 1;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.profile-section {
  padding: 16px 0;
  border-top: 1px solid #2a2a2a;
}

.profile-section:last-child {
  border-bottom: 1px solid #2a2a2a;
}

.profile-field-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d4af37;
  margin-bottom: 4px;
}

.profile-field-value {
  color: #dddddd;
  font-size: 0.95rem;
}

/* ---- Setup wizard: themed live preview at confirm step ---- */
.profile-preview {
  margin: 12px 0 8px;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1a1a1a;
}

.profile-preview .profile-pre-fields,
.profile-preview .profile-data {
  padding: 0 16px;
}

.profile-preview .profile-pre-fields:empty {
  padding: 0;
}

/* ---- Setup wizard ---- */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  gap: 0;
}

.wizard-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #333333;
  border: 2px solid #444444;
  color: #777777;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.wizard-step-dot.active {
  background-color: #c41e3a;
  border-color: #c41e3a;
  color: #f5f5f5;
}

.wizard-step-dot.complete {
  background-color: #d4af37;
  border-color: #d4af37;
  color: #1a1a1a;
}

.wizard-step-line {
  flex: 1;
  height: 2px;
  background-color: #333333;
  max-width: 40px;
}

.wizard-step-line.complete {
  background-color: #d4af37;
}

.wizard-step {
  display: none;
  padding: 8px 0 24px;
}

.wizard-step.active {
  display: block;
}

.wizard-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.wizard-subtitle {
  color: #999999;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* Profile type selector cards */
.type-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.type-option {
  background-color: #242424;
  border: 2px solid #333333;
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.type-option:hover {
  border-color: #555555;
  background-color: #2a2a2a;
}

.type-option.selected {
  border-color: #d4af37;
  background-color: #2a2515;
}

.type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-option-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.type-option-name {
  font-weight: 700;
  font-size: 1rem;
}

.type-option-desc {
  font-size: 0.85rem;
  color: #999999;
}

/* Type-specific fields */
.type-fields {
  display: none;
}

.type-fields.visible {
  display: block;
}

/* Photo upload */
.photo-upload-area {
  border: 2px dashed #444444;
  border-radius: 8px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
  background-color: #1e1e1e;
}

.photo-upload-area:hover,
.photo-upload-area.dragover {
  border-color: #d4af37;
}

.photo-upload-area input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.photo-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 12px auto 0;
  display: none;
  border: 2px solid #d4af37;
}

.photo-preview.visible {
  display: block;
}

/* Confirmation preview */
.confirm-profile-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d4af37;
  background-color: #2d2d2d;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  overflow: hidden;
}

/* ---- Dashboard ---- */
.dashboard-header {
  padding: 20px 0 16px;
}

.dashboard-section {
  margin-bottom: 24px;
}

.dashboard-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d4af37;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #2a2a2a;
}

.token-card {
  background-color: #242424;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.token-card-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #444444;
  background-color: #333333;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555555;
  font-size: 1.25rem;
  overflow: hidden;
}

.token-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.token-card-info {
  flex: 1;
  min-width: 0;
}

.token-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.token-card-scans {
  font-size: 0.75rem;
  color: #777777;
}

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

.token-card-id {
  font-size: 0.7rem;
  color: #555555;
  font-family: monospace;
  margin-top: 4px;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: #666666;
}

.empty-state p {
  color: #666666;
  margin-bottom: 16px;
}

/* Add token section */
.add-token-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.add-token-input-row .form-input {
  flex: 1;
}

/* Account settings */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #2a2a2a;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #cccccc;
}

.settings-value {
  font-size: 0.875rem;
  color: #999999;
}

.subscription-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.subscription-free     { background-color: #333333; color: #999999; }
.subscription-inactive { background-color: #333333; color: #999999; }
.subscription-active   { background-color: #1a3a1e; color: #4caf50; border: 1px solid #2d6b31; }
.subscription-trialing { background-color: #1a2a3a; color: #7ab3e0; border: 1px solid #2a4060; }
.subscription-past_due { background-color: #3a2a10; color: #d4af37; border: 1px solid #5a4010; }
.subscription-canceled { background-color: #3a1a1a; color: #c41e3a; border: 1px solid #6b2d2d; }
.subscription-expired  { background-color: #3a1a1a; color: #c41e3a; border: 1px solid #6b2d2d; }

/* Subscription action banner on dashboard */
.subscription-banner {
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subscription-banner.banner-warning {
  background-color: #2a2010;
  border: 1px solid #5a4010;
  color: #d4af37;
}

.subscription-banner.banner-error {
  background-color: #3a1a1a;
  border: 1px solid #6b2d2d;
  color: #e07a7a;
}

.subscription-banner-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.subscription-banner-detail {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 4px;
}

/* ---- Lapsed page ---- */
.lapsed-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 24px;
  text-align: center;
}

.lapsed-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #3a1a1a;
  border: 2px solid #c41e3a;
  color: #c41e3a;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.lapsed-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #f5f5f5;
}

.lapsed-message {
  color: #999999;
  font-size: 1rem;
  margin-bottom: 28px;
  max-width: 320px;
}

.lapsed-btn {
  max-width: 320px;
}

/* ---- Login page ---- */
.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 32px 16px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: #242424;
  border: 1px solid #333333;
  border-radius: 10px;
  padding: 28px 24px;
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo .wordmark {
  font-size: 2rem;
}

.login-tabs {
  display: flex;
  border-bottom: 2px solid #333333;
  margin-bottom: 24px;
}

.login-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: #777777;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.login-tab.active {
  color: #f5f5f5;
  border-bottom-color: #c41e3a;
}

.login-form {
  display: none;
}

.login-form.active {
  display: block;
}

/* ---- Alerts / notifications ---- */
.alert {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.alert-info    { background-color: #1a2a3a; border: 1px solid #2a4060; color: #7ab3e0; }
.alert-success { background-color: #1a3a1e; border: 1px solid #2d6b31; color: #6fcf80; }
.alert-error   { background-color: #3a1a1a; border: 1px solid #6b2d2d; color: #e07a7a; }
.alert-warning { background-color: #2a2010; border: 1px solid #5a4010; color: #d4af37; }

/* ---- Loading state ---- */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #444444;
  border-top-color: #d4af37;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

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

.loading-overlay {
  text-align: center;
  padding: 48px 16px;
  color: #777777;
}

/* ---- Divider ---- */
.divider {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 20px 0;
}

/* ---- Link-or-Create panel (scan-to-link feature) ---- */

/* Full-page overlay shown before the wizard when the user is logged in
   and the token is unclaimed and they have existing profiles. */
.link-panel {
  padding: 8px 0 24px;
}

.link-panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.link-panel-subtitle {
  color: #999999;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* Grid of selectable existing-profile cards */
.link-token-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.link-token-card {
  background-color: #242424;
  border: 2px solid #333333;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.link-token-card:hover {
  border-color: #555555;
  background-color: #2a2a2a;
}

.link-token-card.selected {
  border-color: #d4af37;
  background-color: #2a2515;
}

.link-token-card-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #444444;
  background-color: #333333;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555555;
  font-size: 1.1rem;
  overflow: hidden;
}

.link-token-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-token-card-info {
  flex: 1;
  min-width: 0;
}

.link-token-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-token-card-id {
  font-size: 0.7rem;
  color: #555555;
  font-family: monospace;
}

.link-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #555555;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.link-divider::before,
.link-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #2a2a2a;
}

/* ---- Footer order link ---- */
.footer-sep {
  margin: 0 6px;
  color: #333333;
}

.footer-order-link {
  color: #d4af37;
  text-decoration: none;
  font-size: 0.75rem;
}

.footer-order-link:hover {
  color: #f5f5f5;
}

/* ---- Order page ---- */
.order-header {
  padding: 20px 0 16px;
}

.order-option-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.order-option-card {
  background-color: #242424;
  border: 2px solid #333333;
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.order-option-card:hover {
  border-color: #555555;
  background-color: #2a2a2a;
}

.order-option-card.selected {
  border-color: #d4af37;
  background-color: #2a2515;
}

.order-option-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #f5f5f5;
}

.order-option-card-desc {
  font-size: 0.875rem;
  color: #999999;
}

.order-option-icon {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

/* Order form panel — hidden until an option is selected */
.order-form-panel {
  display: none;
}

.order-form-panel.visible {
  display: block;
}

/* Profile selector for replacements */
.replacement-profile-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.replacement-profile-card {
  background-color: #242424;
  border: 2px solid #333333;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.replacement-profile-card:hover {
  border-color: #555555;
  background-color: #2a2a2a;
}

.replacement-profile-card.selected {
  border-color: #d4af37;
  background-color: #2a2515;
}

.replacement-profile-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #444444;
  background-color: #333333;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555555;
  font-size: 1.1rem;
  overflow: hidden;
}

.replacement-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.replacement-profile-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* Order history on dashboard */
.order-history-item {
  background-color: #242424;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
}

.order-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.order-history-type {
  font-weight: 700;
  font-size: 0.9rem;
}

.order-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-status-pending   { background-color: #2a2010; color: #d4af37; border: 1px solid #5a4010; }
.order-status-shipped   { background-color: #1a2a3a; color: #7ab3e0; border: 1px solid #2a4060; }
.order-status-completed { background-color: #1a3a1e; color: #4caf50; border: 1px solid #2d6b31; }
.order-status-canceled  { background-color: #3a1a1a; color: #c41e3a; border: 1px solid #6b2d2d; }

.order-history-detail {
  font-size: 0.8rem;
  color: #999999;
}

/* ---- Theme picker ---- */
.theme-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.theme-picker-card {
  background-color: #242424;
  border: 2px solid #333333;
  border-radius: 8px;
  padding: 12px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}

.theme-picker-card:hover {
  border-color: #555555;
  background-color: #2a2a2a;
}

.theme-picker-card.selected {
  border-color: #d4af37;
  background-color: #2a2515;
}

.theme-picker-swatches {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.theme-picker-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.theme-picker-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #f5f5f5;
  margin-bottom: 2px;
  line-height: 1.3;
}

.theme-picker-desc {
  font-size: 0.75rem;
  color: #888888;
  line-height: 1.3;
}

/* Token card theme label */
.token-card-theme {
  font-size: 0.72rem;
  color: #d4af37;
  font-style: italic;
  margin-top: 2px;
  margin-bottom: 4px;
}

/* ---- Responsive: slightly wider screens ---- */
@media (min-width: 520px) {
  .container {
    padding: 0 24px;
  }
  .profile-photo-wrap {
    width: 140px;
    height: 140px;
  }
}

/* ---- Pricing ---- */
.pricing-toggle { display: flex; gap: 0; margin-bottom: 16px; border-radius: 6px; overflow: hidden; }
.pricing-toggle-btn { flex: 1; padding: 10px; border: 1px solid #333; background: #242424; color: #999; font-weight: 600; cursor: pointer; font-size: 0.875rem; }
.pricing-toggle-btn.active { background: #d4af37; color: #1a1a1a; border-color: #d4af37; }
.pricing-cards { display: flex; flex-direction: column; gap: 12px; }
.pricing-card { background: #242424; border: 2px solid #333; border-radius: 10px; padding: 20px; }
.pricing-card.popular { border-color: #d4af37; }
.pricing-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.pricing-card-name { font-size: 1.1rem; font-weight: 700; }
.pricing-card-price { font-size: 1.5rem; font-weight: 700; color: #d4af37; margin-bottom: 12px; }
.pricing-card-price .interval { font-size: 0.8rem; color: #999; font-weight: 400; }
.pricing-card-features { list-style: none; padding: 0; margin: 0 0 16px 0; }
.pricing-card-features li { padding: 4px 0; font-size: 0.875rem; color: #ccc; }
.pricing-card-features li::before { content: "\2713  "; color: #d4af37; font-weight: 700; }
.popular-badge { display: inline-block; background: #d4af37; color: #1a1a1a; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.subscription-tier-label { font-size: 0.75rem; color: #d4af37; font-weight: 700; text-transform: uppercase; margin-left: 6px; }
.pricing-card .btn { width: 100%; }

/* ---- Custom template builder ---- */
.builder-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
}
.builder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.builder-col {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 16px;
}
.builder-col h2 {
  color: #d4af37;
  font-size: 1.15rem;
  margin: 0 0 6px 0;
}
.builder-col h3 {
  color: #d4af37;
  font-size: 0.95rem;
  margin: 16px 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #2a2a2a;
}
.builder-col h3:first-child { margin-top: 0; }
.builder-token-id {
  font-size: 0.75rem;
  color: #888;
  margin: 0 0 12px 0;
}
.builder-token-id strong { color: #d4af37; }
.builder-meta-row {
  margin-bottom: 14px;
}
.builder-meta-row label {
  display: block;
  font-size: 0.8rem;
  color: #ccc;
  margin-bottom: 4px;
  font-weight: 600;
}
.builder-meta-row select.form-select { width: 100%; }
.builder-field-library {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 6px;
  background: #141414;
}
.builder-library-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 0.875rem;
  background: #1f1f1f;
}
.builder-library-item:last-child { margin-bottom: 0; }
.builder-library-label { color: #ddd; flex: 1; }
.builder-library-add {
  border: 1px solid #444;
  background: #2a2a2a;
  color: #d4af37;
  padding: 2px 10px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.2;
}
.builder-library-add:hover { background: #3a3a3a; }
.builder-library-add:disabled {
  cursor: not-allowed;
  color: #555;
  background: #1c1c1c;
  border-color: #2a2a2a;
}
.builder-library-item.disabled .builder-library-label { color: #555; }
.builder-active-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  background: #141414;
  min-height: 60px;
}
.builder-active-empty {
  padding: 16px;
  text-align: center;
  color: #666;
  font-style: italic;
  font-size: 0.85rem;
}
.builder-active-item {
  padding: 10px;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #1f1f1f;
}
.builder-active-item:last-child { border-bottom: 0; }
.builder-active-item-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.builder-active-type {
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 1;
}
.builder-active-label-input {
  flex: 2 1 160px;
  min-width: 120px;
  padding: 6px 8px;
  background: #0e0e0e;
  border: 1px solid #333;
  color: #f5f5f5;
  border-radius: 4px;
  font-size: 0.85rem;
}
.builder-active-label-input:focus {
  outline: none;
  border-color: #d4af37;
}
.builder-active-required {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: 0.75rem;
  color: #ccc;
  cursor: pointer;
}
.builder-active-btn {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #ccc;
  padding: 4px 8px;
  font-size: 0.85rem;
  border-radius: 3px;
  cursor: pointer;
  min-width: 32px;
}
.builder-active-btn:hover { background: #3a3a3a; color: #fff; }
.builder-active-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.builder-active-btn.danger { color: #c41e3a; }
.builder-active-btn.danger:hover { background: #401818; color: #ff8080; }
.builder-field-count {
  text-align: right;
  font-size: 0.8rem;
  color: #999;
  margin-top: 8px;
}
.builder-field-count.warn { color: #c41e3a; }
.builder-preview-box {
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 14px;
  background: #141414;
  max-height: 70vh;
  overflow-y: auto;
}
.builder-preview-empty {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 30px 10px;
}
.builder-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.builder-actions .btn { flex: 1 1 140px; }
.builder-secondary-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.builder-secondary-actions .btn { flex: 1; font-size: 0.8rem; padding: 6px 10px; }
.builder-photo-upload {
  margin-top: 14px;
  padding: 12px;
  background: #141414;
  border: 1px dashed #333;
  border-radius: 6px;
  font-size: 0.85rem;
}
.builder-photo-upload label { display:block; margin-bottom: 6px; color: #ccc; font-weight:600; }

@media (min-width: 768px) {
  .builder-grid {
    grid-template-columns: 1fr 1fr;
  }
}
