* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #1f2937;
  overflow-x: hidden;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand img {
  display: block;
  width: clamp(128px, 11vw, 168px);
  height: auto;
  max-width: min(168px, 45vw);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-wordmark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #1d1c1c;
  white-space: nowrap;
}

.footer-wordmark .footer-separator {
  color: #6b7280;
  letter-spacing: 0;
  margin: 0 0.2rem;
}

.footer-wordmark .footer-subbrand {
  font-size: 0.95em;
  letter-spacing: 0.22em;
  text-transform: lowercase;
}

.footer-legal {
  max-width: 980px;
  margin: 0.45rem auto 0;
  font-size: 0.69rem;
  line-height: 1.45;
  color: #7b8496;
  text-align: center;
}

nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: #374151;
}

.container {
  max-width: 960px;
  margin: auto;
  padding: 1.5rem;
}

.container.small {
  max-width: 420px;
}

.hero {
  text-align: center;
  padding-top: 4rem;
}

h1, h2 {
  margin-bottom: 1rem;
}

.button {
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #e5e7eb;
  color: #111827;
  margin-top: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button.primary {
  background: #4f46e5;
  color: #ffffff;
}

.button.action-blue {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.button.action-blue:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}

.button.action-green {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #86efac;
}

.button.action-green:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

.button.action-outline {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.button.action-outline:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

textarea, input, select {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

textarea {
  resize: vertical;   /* disables horizontal resize */
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
}

.card.highlight {
  border: 2px solid #4f46e5;
}

.result {
  margin-top: 2rem;
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  overflow: hidden;
}


.result .generated-media,
.result .generated-image-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.result .generated-image-frame img,
.result .generated-media img {
  display: block;
}

.download-chip {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #c7d2fe;
  background: rgba(238, 242, 255, 0.96);
  color: #4338ca;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  z-index: 2;
}

.download-chip span {
  display: inline-block;
  font-size: 1.1rem;
  line-height: 1;
  transform: translateY(-1px);
}

.download-chip:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
  transform: scale(1.04);
}

.generated-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.generated-gallery-grid .generated-image-frame {
  width: 100%;
}

.generated-gallery-grid .generated-image-frame img {
  width: 100%;
  max-width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.gallery-card .gallery-image-wrap {
  position: relative;
}

.gallery-card .gallery-image-wrap .download-chip {
  top: 0.55rem;
  right: 0.55rem;
}

/* Ensure generated images always fit inside the result container */
.result img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: #6b7280;
}
/* Nav consistency */
.topbar nav a,
.topbar .nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: #374151;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
}

.topbar nav a:hover,
.topbar .nav a:hover {
  background: #f3f4f6;
}

.topbar nav a.active,
.topbar .nav a.active {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
}


/* Shared signed-in credit balance pill. Created once by auth-modal.js on every public page. */
.credits-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: #eef5ff;
  color: #0f1f4f !important;
  border: 1px solid #a9c1ff;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
}


.credits-pill-floating {
  position: fixed;
  right: 144px;
  bottom: 30px;
  top: auto;
  z-index: 79;
  box-shadow: 0 10px 24px rgba(77, 101, 177, 0.12);
  margin: 0 !important;
}

.credits-pill:hover,
.credits-pill:focus-visible {
  background: #e7f0ff;
  border-color: #8eabff;
  color: #0b1b55 !important;
  text-decoration: none;
}

.credits-pill-label {
  color: #0f1f4f;
  font-weight: 500;
}

.credits-pill strong {
  color: #071065;
  font-weight: 800;
}

.credits-pill-free {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding-left: 0.45rem;
  margin-left: 0.05rem;
  border-left: 1px solid #a9c1ff;
}

.credits-pill-free.hidden,
.credits-pill.hidden,
body.home-page .credits-pill {
  display: none !important;
}


@media (max-width: 700px) {
  .credits-pill-floating {
    top: auto;
    left: max(20px, env(safe-area-inset-left));
    right: auto;
    bottom: max(20px, env(safe-area-inset-bottom));
    min-height: 44px;
    max-width: calc(100vw - 180px);
    padding: 0.55rem 0.75rem;
    z-index: 2147482990;
  }
}

@media (max-width: 700px) {
  .topbar .nav .credits-pill {
    min-height: 44px;
    padding: 0.55rem 0.45rem;
    white-space: normal;
  }
}


/* Prompt Assistant */
.prompt-field-with-helper {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.prompt-field-with-helper:focus-within {
  border-color: #a9bcff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}
.prompt-field-textarea,
.prompt-field-with-helper textarea {
  display: block;
  width: 100%;
  min-height: 118px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: vertical;
}
.prompt-field-textarea:focus,
.prompt-field-with-helper textarea:focus {
  outline: none;
  box-shadow: none;
}
.prompt-helper {
  margin: 0.55rem 0 1rem 0;
  padding: 0.75rem;
  border: 1px solid #d9e2ff;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(45, 68, 126, 0.06);
}
.prompt-helper-inline {
  margin: 0;
  padding: 0.55rem 0.7rem 0.6rem;
  border: 0;
  border-top: 1px solid #e4e9f6;
  border-radius: 0;
  background: #f8fbff;
  box-shadow: none;
}
.prompt-helper-title {
  display: inline-flex;
  align-items: center;
  margin: 0 0.5rem 0.35rem 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: #1f2937;
  white-space: nowrap;
}
.prompt-helper-inline .prompt-helper-title {
  margin-bottom: 0.35rem;
}
.prompt-helper-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  vertical-align: middle;
}
.prompt-helper-chip {
  border: 0;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.prompt-helper-chip:hover,
.prompt-helper-chip:focus-visible {
  background: #e0e7ff;
  color: #312e81;
  transform: none;
}
.prompt-helper-chip:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}
.prompt-helper-status {
  min-height: 1.05rem;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #5f6b7a;
}
.prompt-helper-status.error {
  color: #b91c1c;
}
.prompt-helper-status.ok {
  color: #166534;
}
@media (max-width: 700px) {
  .prompt-helper-inline {
    padding: 0.6rem;
  }
  .prompt-helper-title {
    display: block;
    margin-right: 0;
  }
  .prompt-helper-actions {
    display: flex;
    gap: 0.4rem;
  }
  .prompt-helper-chip {
    flex: 0 1 auto;
    padding: 0.48rem 0.65rem;
  }
}

/* Form footer actions (button + status text) */
.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-actions #status {
  font-size: 0.95rem;
  color: #6b7280;
}

/* File inputs */
input[type="file"] {
  padding: 0.55rem;
  background: #ffffff;
}


/* Upload page previews */
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.preview {
  background: #ffffff;
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  text-align: center;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  overflow: hidden;
}

.preview img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
}

.gallery {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: block;
}

.image-text-page .image-text-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1rem 0;
}

.image-text-page .image-text-preview-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #d8e0ef;
  border-radius: 14px;
  padding: 0.9rem;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.image-text-page .image-text-preview-card.is-empty {
  color: #6b7280;
  background: #ffffff;
}

.image-text-page .image-text-preview-card img {
  width: 100%;
  max-width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  background: #f8fafc;
}

.image-text-page .image-text-preview-caption {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.35;
  word-break: break-word;
}

.image-text-page .image-text-preview-card .slot-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b7a90;
}

.image-text-page .image-text-preview-card .delete-chip {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #be123c;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.image-text-page .image-text-preview-card .delete-chip span {
  display: inline-block;
  line-height: 1;
  transform: translateY(-1px);
}

.image-text-page .image-text-preview-card .delete-chip:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  transform: scale(1.04);
}

.image-text-page .image-text-preview-card .empty-slot-copy {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.35;
  max-width: 18rem;
}

@media (max-width: 760px) {
  .image-text-page .image-text-preview-grid {
    grid-template-columns: 1fr;
  }
}


.generation-duration {
  margin-top: 0.85rem;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 500;
}

/* ---- Generation timer/progress styling ---- */
.statusbox.active { border: 1px solid rgba(79,70,229,0.25); }
.status-row { display:flex; align-items:center; gap:10px; justify-content:space-between; }
.status-row .status-text { flex: 1; font-weight: 500; }
.status-timer { font-variant-numeric: tabular-nums; opacity: 0.9; white-space: nowrap; }
.spinner {
  width: 16px; height: 16px; border-radius: 999px;
  border: 2px solid rgba(79,70,229,0.25);
  border-top-color: rgba(79,70,229,1);
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-rail {
  margin-top: 12px;
  width: 100%;
  height: 8px;
  background: rgba(79,70,229,0.10);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  height: 100%;
  background: rgba(79,70,229,0.70);
  border-radius: 999px;
  animation: indeterminate 1.3s ease-in-out infinite;
}
@keyframes indeterminate {
  0% { transform: translateX(-120%); }
  50% { transform: translateX(120%); }
  100% { transform: translateX(320%); }
}
/* ---- end timer/progress styling ---- */


.hidden {
  display: none !important;
}

.auth-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(17, 24, 39, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  backdrop-filter: blur(8px);
}

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e5eaf6;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  padding: 32px 28px 24px;
}

.auth-modal h2 {
  margin-bottom: 0.65rem;
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #334155;
  font-size: 0;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.auth-close-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-2px);
}

.auth-close:hover,
.auth-close:focus-visible {
  background: rgba(96, 165, 250, 0.18);
  color: #1e293b;
  outline: none;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 16px;
}

.auth-switch .button {
  flex: 1;
  margin-top: 0;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-weight: 600;
}

.auth-panel {
  display: grid;
  gap: 14px;
}

.auth-panel.hidden {
  display: none !important;
}

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

.auth-form-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.auth-field {
  min-width: 0;
}

.auth-field-full {
  grid-column: 1 / -1;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 0.96rem;
  font-weight: 600;
}

.auth-note {
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

.auth-register-note {
  margin-bottom: 2px;
}

.auth-submit {
  width: 100%;
  margin-top: 0;
  padding: 0.9rem 1.15rem;
  font-weight: 600;
  border-radius: 10px;
}

.auth-message {
  min-height: 22px;
  margin-top: -2px;
}

.auth-captcha-box {
  margin: 0;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #f8fafc;
}

.auth-captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-captcha-refresh {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

.auth-captcha-refresh:hover {
  background: #e0e7ff;
}

.auth-captcha-question {
  margin: 0 0 10px;
  color: #0f172a;
  font-weight: 600;
  font-size: 1.08rem;
}

.inline-link {
  color: #4f46e5;
  cursor: pointer;
  text-decoration: underline;
}

.password-field {
  position: relative;
  margin-bottom: 0;
}

.password-field input {
  padding-right: 46px;
  margin-bottom: 0;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #475569;
  font-size: 1rem;
  line-height: 1;
  padding: 0 4px;
}

.password-toggle:hover {
  color: #111827;
}


@media (max-width: 640px) {
  .auth-backdrop {
    align-items: flex-start;
    padding: 14px;
  }

  .auth-modal {
    max-width: 100%;
    border-radius: 20px;
    padding: 26px 18px 18px;
  }

  .auth-switch,
  .auth-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-modal h2 {
    font-size: 1.95rem;
    margin-right: 28px;
  }
}

.account-page {
  min-height: 100vh;
}

.account-dashboard {
  padding-top: 32px;
  padding-bottom: 40px;
}
.account-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.account-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.account-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.section-gap-top {
  margin-top: 16px;
}
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.admin-stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.account-panels {
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
}
.account-panels > * {
  min-width: 0;
}
.admin-panels-3 {
  grid-template-columns: 1.5fr 1fr 1fr;
}
.stat-card .stat-label {
  color: #6b7280;
  font-size: 0.92rem;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-top: 6px;
}

.stat-card .stat-value-email {
  font-size: clamp(1.1rem, 1.7vw, 2rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stat-card .stat-sub {
  color: #6b7280;
  margin-top: 8px;
  font-size: 0.9rem;
}
.stat-card .stat-meta {
  color: #111827;
  margin-top: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}
.accent-indigo { border-top: 4px solid #4f46e5; }
.accent-green { border-top: 4px solid #16a34a; }
.accent-amber { border-top: 4px solid #d97706; }
.accent-blue { border-top: 4px solid #0ea5e9; }
.accent-rose { border-top: 4px solid #e11d48; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0; }
.muted { color: #6b7280; }
.small { font-size: 0.85rem; }
.bar-chart, .mini-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.activity-row {
  display: grid;
  grid-template-columns: 70px 1fr 36px;
  gap: 12px;
  align-items: center;
}
.activity-label, .activity-value {
  font-size: 0.9rem;
  color: #374151;
}
.activity-track, .mini-track {
  background: #eef2ff;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
}
.activity-fill, .mini-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
}
.mini-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.chart-summary-card {
  border: 1px solid #e6eaf5;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
}
.chart-summary-label {
  display: block;
  color: #6b7280;
  font-size: 0.82rem;
  margin-bottom: 6px;
}
.chart-summary-card strong {
  display: block;
  color: #111827;
  font-size: 1.25rem;
}
.chart-summary-sub {
  display: block;
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 4px;
}
.clearer-chart {
  padding: 12px 8px 6px;
}
.activity-scale-note {
  margin-bottom: 10px;
}
.activity-chart-shell {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: stretch;
}
.activity-y-axis {
  height: 244px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 6px 0 28px;
  color: #6b7280;
  font-size: 0.78rem;
}
.activity-plot {
  position: relative;
}
.activity-grid {
  position: absolute;
  inset: 26px 0 28px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.activity-grid-line {
  border-top: 1px dashed #d7def0;
}
.activity-columns {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.activity-columns.compact-columns {
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
}
.activity-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.activity-column-value {
  min-height: 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}
.activity-column-track {
  height: 190px;
  width: 100%;
  max-width: 86px;
  border-radius: 18px;
  background: rgba(238, 242, 255, 0.45);
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px;
}
.activity-column-fill {
  width: 100%;
  min-height: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #8b5cf6 0%, #4f46e5 100%);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.18);
}
.activity-column-label {
  font-size: 0.88rem;
  color: #374151;
  text-align: center;
}
.activity-line-chart {
  width: 100%;
  min-height: 300px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #e6eaf5;
  padding: 10px 12px 6px;
}
.activity-line-svg {
  display: block;
  width: 100%;
  height: 300px;
}
.activity-line-grid {
  stroke: #d7def0;
  stroke-width: 1;
}
.activity-line-axis {
  stroke: #9aa4bf;
  stroke-width: 1.25;
}
.activity-line-path {
  fill: none;
  stroke: #4f46e5;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.activity-line-dot {
  fill: #4f46e5;
  stroke: #ffffff;
  stroke-width: 2;
}
.activity-line-tick {
  fill: #6b7280;
  font-size: 12px;
}
.activity-line-label {
  fill: #6b7280;
  font-size: 11px;
}
.richer-mini-row {
  padding: 10px 12px;
  border: 1px solid #e6eaf5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fafbff);
}
.mini-meta {
  margin-top: 4px;
}
.admin-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-user-table td:last-child {
  min-width: 270px;
}
.admin-credit-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.admin-credit-row {
  display: grid;
  grid-template-columns: minmax(84px, 110px) 1fr 1fr;
  gap: 8px;
  width: 100%;
  align-items: center;
}
.admin-credit-input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d7deee;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #ffffff;
  color: #111827;
  box-sizing: border-box;
}
.admin-credit-input:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
}
.pill-active {
  background: #ecfdf5;
  color: #166534;
}
.pill-blocked {
  background: #fff1f2;
  color: #be123c;
}
.mini-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}
.table-wrap {
  overflow-x: auto;
}
.account-table {
  width: 100%;
  border-collapse: collapse;
}
.account-table th, .account-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 0.95rem;
}
.account-table th {
  color: #374151;
  background: #f9fafb;
}
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.85rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f3f4f6;
}
.gallery-meta {
  padding: 12px;
}
.gallery-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.admin-earnings-note {
  margin: 0 0 16px;
}

.admin-panel[data-panel="earnings"] .earnings-period-tabs {
  margin-bottom: 18px;
}

.earnings-summary-grid {
  margin-bottom: 16px;
}

.admin-panel[data-panel="earnings"] .table-wrap {
  overflow-x: hidden;
}

.earnings-table {
  table-layout: fixed;
}

.earnings-table th,
.earnings-table td {
  padding: 10px 8px;
  font-size: 0.9rem;
}

.earnings-table th {
  white-space: normal;
  line-height: 1.25;
}

.earnings-table th:nth-child(1), .earnings-table td:nth-child(1) {
  width: 24%;
}

.earnings-table th:nth-child(2), .earnings-table td:nth-child(2) {
  width: 14%;
}

.earnings-table th:nth-child(3), .earnings-table td:nth-child(3) {
  width: 14%;
}

.earnings-table th:nth-child(4), .earnings-table td:nth-child(4) {
  width: 18%;
}

.earnings-table th:nth-child(5), .earnings-table td:nth-child(5),
.earnings-table th:nth-child(6), .earnings-table td:nth-child(6) {
  width: 15%;
}

.earnings-table td:nth-child(1) {
  word-break: break-word;
}

.earnings-table th:nth-child(n+2), .earnings-table td:nth-child(n+2) {
  text-align: right;
}

.earnings-table td:nth-child(n+2) {
  white-space: nowrap;
}

.earnings-breakdown {
  display: grid;
  gap: 12px;
}

.earnings-breakdown-card {
  border: 1px solid #dbe4f5;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
  padding: 14px 16px;
}

.earnings-breakdown-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.earnings-breakdown-top strong {
  font-size: 1rem;
  color: #111827;
}

.earnings-breakdown-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}

.earnings-track {
  margin-top: 12px;
}

.earnings-fill {
  min-width: 8px;
}

@media (max-width: 960px) {
  .stats-grid, .account-panels, .admin-panels-3, .admin-stats-grid, .chart-summary {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .account-hero, .stats-grid, .account-panels, .admin-panels-3, .admin-stats-grid, .chart-summary {
    grid-template-columns: 1fr;
    display: grid;
  }
  .activity-row {
    grid-template-columns: 64px 1fr 32px;
  }
  .activity-chart-shell {
    grid-template-columns: 30px 1fr;
    gap: 8px;
  }
  .activity-y-axis {
    height: 204px;
    padding-bottom: 26px;
    font-size: 0.72rem;
  }
  .activity-columns {
    gap: 8px;
  }
  .activity-grid {
    inset: 26px 0 26px 0;
  }
  .activity-column-track {
    height: 150px;
    padding: 6px;
  }
  .activity-column-label {
    font-size: 0.8rem;
  }
  .activity-line-chart {
    padding: 8px 8px 2px;
    min-height: 260px;
  }
  .activity-line-svg {
    height: 250px;
  }
  .activity-line-label {
    font-size: 10px;
  }
  .activity-line-tick {
    font-size: 11px;
  }
}


.account-page {
  background:
    radial-gradient(circle at top left, rgba(79,70,229,0.08), transparent 28%),
    linear-gradient(180deg, #f7f8fc 0%, #eef2ff 100%);
}

.hero-shell {
  border: 1px solid rgba(79,70,229,0.10);
  box-shadow: 0 20px 50px rgba(15,23,42,0.06);
}

.hero-copy {
  text-align: left;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4f46e5;
  background: #eef2ff;
  padding: 6px 10px;
  border-radius: 999px;
}

.account-empty {
  max-width: 880px;
  margin: 0 auto 16px;
  text-align: center;
  border: 1px solid rgba(79,70,229,0.10);
  box-shadow: 0 18px 45px rgba(15,23,42,0.05);
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #eef2ff, #ede9fe);
}

.empty-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.empty-actions .button {
  margin-top: 0;
}

.empty-preview-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.preview-tile {
  padding: 18px;
  border-radius: 16px;
  text-align: left;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #e5e7eb;
}

.preview-tile strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
}

.preview-tile span {
  color: #6b7280;
  font-size: 0.92rem;
}

.stat-card {
  text-align: left;
  box-shadow: 0 10px 30px rgba(15,23,42,0.04);
}

.panel-wide, .panel-side {
  text-align: left;
  box-shadow: 0 10px 30px rgba(15,23,42,0.04);
  width: 100%;
  max-width: 100%;
  align-self: start;
  overflow: hidden;
}
.panel-side .section-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.single-panel-stack {
  grid-template-columns: 1fr;
}
.panel-full {
  width: 100%;
  max-width: 100%;
  text-align: left;
  box-shadow: 0 10px 30px rgba(15,23,42,0.04);
  overflow: hidden;
}
.account-billing-wrap {
  overflow-x: auto;
}
.billing-table {
  min-width: 720px;
}
.billing-table th:nth-child(1), .billing-table td:nth-child(1) {
  min-width: 180px;
}
.billing-table th:nth-child(5), .billing-table td:nth-child(5) {
  min-width: 180px;
}

.admin-toolmix-section {
  max-width: 100%;
}
.toolmix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.gallery-card {
  box-shadow: 0 10px 24px rgba(15,23,42,0.05);
}

@media (max-width: 700px) {
  .hero-copy {
    text-align: center;
  }
  .empty-preview-grid {
    grid-template-columns: 1fr;
  }
}


/* Auto-expanding prompt boxes */
textarea.auto-expand {
  min-height: 112px;
  resize: none;
  overflow-y: hidden;
  line-height: 1.45;
}

.folder-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 18px;
}
.folder-chip {
  border: 1px solid #dbe3ff;
  background: #f8faff;
  color: #334155;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}
.folder-chip span {
  display: inline-block;
  margin-left: 8px;
  background: #eef2ff;
  color: #4f46e5;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.82rem;
}
.folder-chip.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}
.folder-chip.active span {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.small-chip {
  padding: 8px 12px;
  font-size: 0.88rem;
}
.activity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.activity-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.activity-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.activity-range-tabs .folder-chip {
  margin: 0;
}
.small-button {
  padding: 8px 12px;
  font-size: 0.9rem;
  margin-top: 0;
}
.admin-dashboard .gallery-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}


.auth-page-shell { padding-top: 48px; }
.auth-page-card { text-align: left; border-radius: 18px; box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08); }
.auth-page-card h1 { margin-top: 12px; }
.auth-page-card .button { margin-top: 0.75rem; }
.stat-value-email { overflow-wrap: anywhere; word-break: break-word; }

body.modal-open { overflow: hidden; }
.auth-modal-floating {
  max-height: min(90vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.auth-modal-floating::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.modal-trigger { text-decoration:none; }

.hero-signed-in {
  margin-top: 1rem;
  color: #475569;
  font-weight: 500;
}


.admin-image-list {
  display: grid;
  gap: 16px;
}
.admin-image-group {
  border: 1px solid #e6eaf5;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff 0%, #f8faff 100%);
  padding: 14px;
}
.admin-image-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 0;
  border-bottom: 0;
  cursor: pointer;
  list-style: none;
}
.admin-image-group-head::-webkit-details-marker {
  display: none;
}
.admin-image-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(59, 130, 246, 0.06));
  color: #3b4a86;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.admin-image-group-toggle::after {
  content: '▾';
  font-size: 12px;
  line-height: 1;
}
.admin-image-group[open] .admin-image-group-head {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e8ecfb;
}
.admin-image-group[open] .admin-image-group-toggle {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.16), rgba(59, 130, 246, 0.1));
}
.admin-image-group[open] .admin-image-group-toggle::after {
  content: '▴';
}
.admin-image-group-grid {
  display: grid;
  gap: 12px;
}
.admin-image-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e6eaf5;
  border-radius: 16px;
  background: #fbfcff;
}
.admin-thumb-link {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2ff;
}
.admin-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
}
.admin-image-meta {
  min-width: 0;
}
.admin-image-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 700px) {
  .admin-image-group {
    padding: 12px;
  }
  .admin-image-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .admin-image-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .admin-thumb-link, .admin-thumb {
    width: 56px;
    height: 56px;
  }
}


.gallery-actions{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap;}
.danger-button{background:#fff0f0;border:1px solid #f3b5b5;color:#8f1d1d;}
.danger-button:hover{background:#ffe4e4;}


.topbar .nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar .nav a {
  margin-left: 0;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .topbar {
    padding: 0.85rem 1rem;
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    width: 100%;
    display: flex;
    justify-content: center;
    text-align: center;
  }

  .brand img {
    width: min(170px, 62vw);
    height: auto;
    max-width: 100%;
  }

  .topbar .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .topbar .nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
    font-size: 0.95rem;
    padding: 0.55rem 0.4rem;
  }
}

@media (max-width: 420px) {
  .topbar .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-bookmarks {
  margin-top: 4px;
  margin-bottom: 18px;
}

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

.admin-focus-card {
  min-height: 100%;
}

.section-head-tight {
  margin-bottom: 10px;
}

.admin-account-card {
  border: 1px solid #e6eaf5;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8faff 0%, #eef2ff 100%);
  padding: 18px;
}

.admin-account-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #312e81;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-account-email {
  margin-top: 14px;
  font-size: clamp(1.15rem, 1.65vw, 1.7rem);
  line-height: 1.2;
  font-weight: 700;
  color: #111827;
  overflow-wrap: anywhere;
}

.admin-account-meta {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #334155;
  font-size: 0.95rem;
}

.admin-account-note {
  margin: 14px 0 0;
}

.admin-snapshot-grid {
  display: grid;
  gap: 12px;
}

.admin-snapshot-item {
  border: 1px solid #e6eaf5;
  border-radius: 16px;
  background: #fbfcff;
  padding: 14px 16px;
}

.admin-snapshot-label {
  display: block;
  color: #6b7280;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.admin-snapshot-item strong {
  display: block;
  color: #111827;
  font-size: 1.05rem;
}

.admin-user-row {
  background: linear-gradient(180deg, rgba(238,242,255,0.82), rgba(248,250,255,0.98));
}

.admin-user-row td:first-child {
  font-weight: 700;
}

.admin-pill {
  background: #312e81;
  color: #fff;
}

.failed-jobs-head {
  align-items: center;
}

.failed-jobs-reset {
  min-width: 152px;
  white-space: nowrap;
  margin-top: 0;
  box-shadow: none;
}

.failed-jobs-reset:disabled {
  opacity: 0.7;
  cursor: wait;
}

.failed-job-list {
  display: grid;
  gap: 12px;
}

.failed-job-card {
  border: 1px solid #f1d2d9;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8fa 0%, #fff 100%);
  padding: 14px 16px;
}

.failed-job-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.failed-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.failed-job-error {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #f3d7dc;
  color: #7f1d1d;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 960px) {
  .admin-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .failed-job-top {
    flex-direction: column;
  }

  .failed-job-meta {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 720px) {
  .activity-head {
    align-items: stretch;
  }
  .activity-range-tabs {
    width: 100%;
  }
  .activity-range-tabs .folder-chip {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }
}


@media (max-width: 960px) {
  .earnings-table th,
  .earnings-table td {
    font-size: 0.82rem;
    padding: 9px 6px;
  }
}


@media (max-width: 560px) {
  .admin-panel[data-panel="earnings"] .table-wrap {
    overflow-x: visible;
  }

  .earnings-table,
  .earnings-table thead,
  .earnings-table tbody,
  .earnings-table tr,
  .earnings-table th,
  .earnings-table td {
    display: block;
    width: 100% !important;
  }

  .earnings-table thead {
    display: none;
  }

  .earnings-table tbody {
    display: grid;
    gap: 12px;
  }

  .earnings-table tr {
    border: 1px solid #dbe4f5;
    border-radius: 14px;
    background: #ffffff;
    padding: 10px 12px;
  }

  .earnings-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    text-align: right !important;
    white-space: normal;
    border-bottom: 1px solid #eef2ff;
  }

  .earnings-table td::before {
    content: attr(data-label);
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-weight: 600;
    color: #334155;
  }

  .earnings-table td:first-child {
    display: block;
    padding-top: 0;
    padding-bottom: 10px;
    margin-bottom: 2px;
    text-align: left !important;
    font-weight: 700;
    color: #111827;
  }

  .earnings-table td:first-child::before {
    display: none;
  }

  .earnings-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}


.home-main {
  min-height: calc(100vh - 78px);
}

.home-showcase-hero {
  position: relative;
  min-height: calc(100vh - 78px);
  overflow: hidden;
  background: #f5f7fb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-showcase-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 78px);
  text-align: center;
}

.hero-copy-overlay {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero-copy-overlay h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.05;
  color: #ffffff;
  text-shadow: 0 12px 36px rgba(15, 23, 42, 0.45);
}

.hero-copy-overlay p {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  color: rgba(255, 255, 255, 0.92);
  margin: 0 auto 1.4rem;
  max-width: 720px;
  text-shadow: 0 8px 28px rgba(15, 23, 42, 0.35);
}

.hero-copy-overlay .button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  min-width: min(92vw, 300px);
  padding: 0.78rem 1.25rem;
  border-radius: 999px;
  background: #4f46e5;
  color: #ffffff;
  border: 1px solid #4f46e5;
  box-shadow: none;
  text-decoration: none;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 600;
  line-height: 1.2;
}

.hero-signed-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto 0;
  padding: 0.78rem 1.25rem;
  border-radius: 999px;
  color: #ecfdf5;
  background: rgba(22, 163, 74, 0.22);
  border: 1px solid rgba(134, 239, 172, 0.42);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.08), 0 0 22px rgba(34, 197, 94, 0.26);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 600;
  line-height: 1.2;
  text-shadow: none;
}

.hero-carousel-tint {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.36) 0%, rgba(15, 23, 42, 0.46) 100%),
    rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.showcase-carousel-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  mask-image: none;
  -webkit-mask-image: none;
  background: #111827;
}

.showcase-track-hero {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  width: max-content;
  height: 100%;
  animation: showcase-scroll 52s linear infinite;
}

.showcase-slide {
  flex: 0 0 clamp(260px, 30vw, 520px);
  width: clamp(260px, 30vw, 520px);
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #111827;
  border: 0;
}

.showcase-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.82) saturate(1.02);
  transform: scale(1.03);
}

.home-showcase-hero.showcase-is-empty .showcase-carousel-hero {
  display: none;
}

.home-showcase-hero.showcase-is-empty {
  background:
    radial-gradient(circle at top, rgba(79, 70, 229, 0.22), transparent 36%),
    linear-gradient(180deg, #374151 0%, #111827 100%);
}

@keyframes showcase-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 0.5rem)); }
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .topbar nav a,
  .topbar .nav a {
    margin-left: 0;
  }

  .home-main,
  .home-showcase-hero,
  .home-showcase-content {
    min-height: calc(100vh - 126px);
  }

  .hero-copy-overlay h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-copy-overlay p {
    font-size: 1rem;
  }

  .showcase-track-hero {
    gap: 0.75rem;
    animation-duration: 42s;
  }

  .showcase-slide {
    flex-basis: 72vw;
    width: 72vw;
  }
}


.visually-hidden-upload,
.upload-file-input {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 110px;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1.5px dashed #c7d2fe;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8faff 0%, #eef2ff 100%);
  color: #3730a3;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-dropzone:hover {
  border-color: #818cf8;
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.10);
}

.upload-dropzone.is-dragover {
  border-color: #4f46e5;
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.16);
}

.upload-dropzone.has-files {
  border-style: solid;
  border-color: #a5b4fc;
  background: #eef2ff;
}

.upload-dropzone-title {
  font-weight: 700;
  color: #312e81;
}

.upload-dropzone-meta {
  font-size: 0.92rem;
  color: #5b638e;
}

@media (max-width: 640px) {
  .upload-dropzone {
    min-height: 96px;
    padding: 0.9rem;
    border-radius: 14px;
  }

  .upload-dropzone-title {
    font-size: 0.97rem;
  }

  .upload-dropzone-meta {
    font-size: 0.87rem;
  }
}


.admin-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.admin-actions-stack .button,
.admin-actions-stack .danger-button {
  min-width: 120px;
}

.admin-actions-stack .success-button {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}

.admin-actions-stack .success-button:hover:not(:disabled) {
  background: #dcfce7;
}

.admin-actions-stack .danger-button {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.admin-actions-stack .danger-button:hover:not(:disabled) {
  background: #ffe4e6;
}

.admin-actions-stack .success-button:disabled,
.admin-actions-stack .danger-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.admin-auto-refresh {
  display: grid;
  gap: 0.35rem;
}

.admin-auto-refresh label,
.admin-auto-refresh select {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.admin-auto-refresh label {
  color: #5b67a5;
  text-align: center;
  margin: 0;
}

.admin-auto-refresh select {
  min-width: 120px;
  min-height: 0;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  padding: 0.7rem 2.1rem 0.7rem 1.4rem;
  margin-bottom: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  background-image: linear-gradient(45deg, transparent 50%, #4338ca 50%), linear-gradient(135deg, #4338ca 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.admin-auto-refresh select:hover {
  background-color: #e0e7ff;
}

.admin-auto-refresh select:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

@media (max-width: 720px) {
  .account-hero {
    align-items: flex-start;
  }
  .account-actions.admin-actions-stack {
    width: 100%;
  }
  .admin-actions-stack .button,
  .admin-actions-stack .danger-button,
  .admin-auto-refresh select {
    width: 100%;
  }
  .admin-credit-controls {
    width: 100%;
  }
  .admin-credit-row {
    grid-template-columns: 1fr;
  }
}



.toolbar {
  margin: 0.9rem 0 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-size: 0.875rem;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  border: 1px solid #d9dee9;
  background: #ffffff;
  color: #1f2937;
  font-weight: 500;
  line-height: 1.2;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.checkbox-option:hover {
  border-color: #c7d2fe;
  background: #fcfcff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
}

.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #4f46e5;
  flex: 0 0 auto;
}

.checkbox-option span {
  display: inline-block;
}

@media (max-width: 640px) {
  .toolbar {
    margin: 0.8rem 0 0.9rem;
  }

  .checkbox-option {
    width: fit-content;
    max-width: 100%;
    justify-content: center;
    margin: 0 auto;
  }
}


/* Merged admin panel card styles and restore controls */
.admin-actions-inline {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.admin-actions-inline--three {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.admin-actions-inline--two {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.admin-control-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.95rem;
  min-height: 236px;
  padding: 1.05rem;
  border-radius: 18px;
  border: 1px solid #dbe4f5;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.admin-control-card--success {
  border-color: #b7ebc4;
  background: linear-gradient(180deg, #f6fffa 0%, #effaf4 100%);
}

.admin-control-card--indigo {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #f8f9ff 0%, #f1f4ff 100%);
}

.admin-control-card--danger {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #fff8f9 0%, #fff4f5 100%);
}

.admin-control-card--restore {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fffaf5 0%, #fff8ef 100%);
}

.admin-control-title,
.admin-restore-label,
.admin-auto-refresh label {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.admin-auto-refresh label {
  text-align: left;
}

.admin-control-sub {
  margin: 0;
  min-height: 3.25rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #64748b;
}

.admin-actions-inline .button,
.admin-actions-inline .danger-button,
.admin-actions-inline .admin-restore-button,
.admin-actions-inline .admin-auto-refresh select,
.admin-actions-inline .admin-restore-input {
  width: 100%;
}

.admin-actions-stack .button,
.admin-actions-stack .danger-button,
.admin-restore-button {
  min-width: 0;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 600;
}

.admin-control-card > .button,
.admin-control-card > .danger-button,
.admin-auto-refresh select,
.admin-restore-meta {
  margin-top: auto;
}

.admin-actions-stack .success-button {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}

.admin-actions-stack .success-button:hover:not(:disabled) {
  background: #dcfce7;
}

.admin-actions-stack .danger-button {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.admin-actions-stack .danger-button:hover:not(:disabled) {
  background: #ffe4e6;
}

.admin-actions-stack .success-button:disabled,
.admin-actions-stack .danger-button:disabled,
.admin-restore-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.admin-restore-block {
  display: flex;
  flex-direction: column;
}

.admin-restore-input {
  width: 100%;
  font: inherit;
  font-size: 0.84rem;
  color: #334155;
}

.admin-restore-input::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.admin-restore-meta {
  display: grid;
  gap: 0.65rem;
}

.admin-restore-button {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.admin-restore-button:hover:not(:disabled) {
  background: #ffedd5;
}

.admin-restore-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.admin-auto-refresh {
  display: flex;
  flex-direction: column;
}

.admin-auto-refresh select {
  min-width: 0;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  padding: 0.7rem 2.1rem 0.7rem 1rem;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  background-image: linear-gradient(45deg, transparent 50%, #4338ca 50%), linear-gradient(135deg, #4338ca 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.admin-auto-refresh select:hover {
  background-color: #e0e7ff;
}

.admin-auto-refresh select:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

.admin-restore-panel {
  display: grid;
  gap: 18px;
}

.admin-restore-layout {
  display: grid;
  gap: 18px;
}

.admin-restore-upload,
.admin-restore-guide,
.admin-restore-compared-card,
.admin-restore-selected-card {
  border-radius: 18px;
}

.admin-restore-upload {
  display: grid;
  gap: 16px;
  border: 1px solid #fed7aa;
  background: linear-gradient(180deg, #fffaf5 0%, #fff8ef 100%);
}

.admin-restore-guide {
  display: grid;
  gap: 12px;
  border: 1px solid #dbe4f5;
  background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
}

.admin-restore-upload-copy h3,
.admin-restore-guide h3,
.admin-restore-report-head h3,
.admin-restore-selected-card h3,
.admin-restore-compared-card h3 {
  margin: 0;
  color: #0f172a;
}

.admin-restore-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-restore-upload-controls {
  display: grid;
  gap: 10px;
  max-width: 680px;
  margin-inline: auto;
}

.admin-restore-file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.admin-restore-picker {
  white-space: nowrap;
  padding: 0.72rem 1rem;
  font-size: 0.95rem;
  line-height: 1.2;
}

.admin-restore-filename {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.95rem;
}

.admin-restore-meta--panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-restore-result-host {
  min-height: 0;
}

.admin-restore-report-shell {
  display: grid;
  gap: 18px;
}

.admin-restore-report-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid #fed7aa;
  background: linear-gradient(180deg, #fffaf5 0%, #fff8ef 100%);
}

.admin-restore-report-head p {
  margin: 8px 0 0;
}

.admin-restore-report-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-restore-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.admin-restore-summary-grid .stat-value {
  overflow-wrap: anywhere;
}

.admin-restore-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-restore-definition-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.admin-restore-definition-list > div {
  display: grid;
  gap: 4px;
}

.admin-restore-definition-list dt {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.admin-restore-definition-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
}

.admin-restore-break {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-restore-rules-copy {
  margin: 0;
  line-height: 1.6;
}

.admin-restore-compared-card {
  padding: 18px;
}

.admin-restore-table-wrap {
  margin-top: 6px;
}

.admin-restore-table td,
.admin-restore-table th {
  vertical-align: top;
}

.admin-restore-source-name {
  font-weight: 700;
  color: #0f172a;
}

.admin-restore-path-cell {
  max-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-restore-table .badge {
  white-space: nowrap;
}

.admin-restore-trimmed-note {
  margin-top: 10px;
}

.admin-restore-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.6rem;
}

@media (max-width: 1080px) {
  .admin-actions-inline--three,
  .admin-actions-inline--two {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
  .admin-restore-layout,
  .admin-restore-details-grid,
  .admin-restore-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-actions-inline {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .account-hero {
    align-items: flex-start;
  }
  .account-actions.admin-actions-stack {
    width: 100%;
  }
  .admin-actions-inline,
  .admin-actions-inline--three,
  .admin-actions-inline--two,
  .admin-restore-layout,
  .admin-restore-details-grid,
  .admin-restore-summary-grid {
    grid-template-columns: 1fr;
  }
  .admin-actions-stack .button,
  .admin-actions-stack .danger-button,
  .admin-auto-refresh select,
  .admin-restore-block,
  .admin-restore-button,
  .admin-restore-picker {
    width: 100%;
  }
  .admin-restore-file-row,
  .admin-restore-meta--panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .admin-restore-file-row {
    gap: 10px;
  }
  .admin-restore-report-head {
    padding: 18px;
    flex-direction: column;
  }
  .admin-restore-report-badges {
    justify-content: flex-start;
  }
  .admin-restore-compared-card,
  .admin-restore-selected-card,
  .admin-restore-upload,
  .admin-restore-guide,
  .admin-restore-report-head {
    padding-left: 16px;
    padding-right: 16px;
  }
  .admin-restore-summary-grid .stat-card {
    min-width: 0;
  }
  .admin-restore-table thead {
    display: none;
  }
  .admin-restore-table,
  .admin-restore-table tbody,
  .admin-restore-table tr,
  .admin-restore-table td {
    display: block;
    width: 100%;
  }
  .admin-restore-table tr {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
  }
  .admin-restore-table td {
    border: 0;
    padding: 6px 0;
  }
  .admin-restore-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
  }
  .admin-credit-controls {
    width: 100%;
  }
  .admin-credit-row {
    grid-template-columns: 1fr;
  }
}



.toolbar {
  margin: 0.9rem 0 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-size: 0.875rem;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  border: 1px solid #d9dee9;
  background: #ffffff;
  color: #1f2937;
  font-weight: 500;
  line-height: 1.2;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.checkbox-option:hover {
  border-color: #c7d2fe;
  background: #fcfcff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
}

.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #4f46e5;
  flex: 0 0 auto;
}

.checkbox-option span {
  display: inline-block;
}

@media (max-width: 640px) {
  .toolbar {
    margin: 0.8rem 0 0.9rem;
  }

  .checkbox-option {
    width: fit-content;
    max-width: 100%;
    justify-content: center;
    margin: 0 auto;
  }
}


.result-message {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.1rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.result-message.error {
  background: #fff7f7;
  border-color: #fecaca;
}

.result-message-title {
  font-weight: 700;
  font-size: 1rem;
  color: #991b1b;
  margin-bottom: 0.35rem;
}

.result-message-body {
  color: #7f1d1d;
  line-height: 1.5;
}

.result-message-hint {
  margin-top: 0.55rem;
  color: #991b1b;
  font-size: 0.94rem;
}

.result-message-actions {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-restore-report-shell--minimal {
  gap: 18px;
}

.admin-restore-minimal-note {
  padding: 18px 20px;
}

.admin-restore-minimal-note p {
  margin: 0;
  text-align: center;
}



.admin-restore-layout {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.admin-restore-upload--compact {
  padding: 16px 18px;
  gap: 12px;
}

.admin-restore-upload--compact .admin-restore-upload-copy {
  display: grid;
  gap: 8px;
}

.admin-restore-upload--compact .admin-restore-upload-copy p {
  margin: 0;
}

.admin-restore-meta--panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 680px;
  margin-inline: auto;
  width: 100%;
}

.admin-restore-summary-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.restore-summary-chip {
  margin: 0;
}

.admin-restore-summary-toggle .folder-chip,
.admin-restore-action-row .button {
  min-height: 42px;
  padding: 0.62rem 1rem;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
  margin-top: 0;
}

.admin-restore-summary-toggle .folder-chip {
  background: #ffffff;
  color: #334155;
  border: 1px solid #c7d2fe;
}

.admin-restore-summary-toggle .folder-chip.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

.admin-restore-action-row .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  background: #ffffff;
  color: #334155;
}

.admin-restore-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-restore-clear-button {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.admin-restore-clear-button:hover:not(:disabled) {
  border-color: #fda4af;
  background: #ffe4e6;
  color: #9f1239;
}

.admin-restore-clear-button:disabled {
  opacity: 1;
  cursor: not-allowed;
  border-color: #ffe4e6;
  background: #fff7f7;
  color: #f1a7b5;
}

.admin-restore-button {
  border-color: #86efac;
  background: #ecfdf5;
  color: #166534;
}

.admin-restore-button:hover:not(:disabled) {
  border-color: #4ade80;
  background: #dcfce7;
  color: #166534;
}

.admin-restore-button:disabled {
  opacity: 1;
  cursor: not-allowed;
  border-color: #dcfce7;
  background: #f0fdf4;
  color: #86b89a;
}

.admin-restore-report-card {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid #fed7aa;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffaf5 0%, #fff8ef 100%);
}

.admin-restore-report-head--grouped {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.admin-restore-report-body {
  display: grid;
  gap: 16px;
}

.admin-restore-summary-grid--inside .stat-card {
  background: #ffffff;
}

.admin-restore-max-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-restore-max-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

.admin-restore-max-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.admin-restore-max-value {
  color: #0f172a;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1080px) {
  .admin-restore-max-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-restore-layout {
    grid-template-columns: 1fr;
  }
  .admin-restore-upload--compact,
  .admin-restore-report-card {
    padding: 16px;
  }
  .admin-restore-meta--panel,
  .admin-restore-action-row {
    align-items: stretch;
  }
  .admin-restore-action-row,
  .admin-restore-max-grid {
    grid-template-columns: 1fr;
  }
  .admin-restore-action-row {
    display: grid;
    width: 100%;
  }
  .admin-restore-summary-toggle {
    width: 100%;
  }
  .admin-restore-summary-toggle .folder-chip,
  .admin-restore-action-row .button {
    width: 100%;
    justify-content: center;
  }
  .admin-restore-max-grid {
    display: grid;
  }
}

.admin-panel[data-panel="restore"] {
  font-size: 1rem;
  overflow-x: clip;
}

.admin-panel[data-panel="restore"] .section-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.admin-panel[data-panel="restore"] .muted {
  font-size: 1em;
}

.admin-restore-panel,
.admin-restore-layout,
.admin-restore-result-host,
.admin-restore-report-shell,
.admin-restore-upload,
.admin-restore-guide,
.admin-restore-report-head,
.admin-restore-summary-grid {
  min-width: 0;
  max-width: 100%;
}

.admin-restore-upload-copy h3,
.admin-restore-guide h3,
.admin-restore-report-head h3 {
  font-size: 1rem;
  font-weight: 700;
}

.admin-restore-summary-grid .stat-label {
  font-size: 0.92rem;
}

.admin-restore-summary-grid .stat-value {
  font-size: 1.55rem;
}

.admin-restore-summary-grid .stat-sub,
.admin-restore-list {
  font-size: 0.9rem;
}

.admin-restore-file-row,
.admin-restore-meta--panel,
.admin-restore-report-head,
.admin-restore-summary-grid > * {
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .admin-panel[data-panel="restore"] {
    font-size: 0.95rem;
  }

  .admin-panel[data-panel="restore"] .section-head h2 {
    font-size: 1.4rem;
  }

  .admin-restore-upload-copy h3,
  .admin-restore-guide h3,
  .admin-restore-report-head h3 {
    font-size: 0.98rem;
  }

  .admin-restore-summary-grid .stat-value {
    font-size: 1.45rem;
  }
}


.admin-panel[data-panel="restore"] .section-head {
  margin-bottom: 12px;
}

.admin-panel[data-panel="restore"] .section-head .muted {
  line-height: 1.45;
}

.admin-pricing-panel {
  overflow: hidden;
}

.admin-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.admin-pricing-card {
  border: 1px solid #e2e8fb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.05);
}

.admin-pricing-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.admin-pricing-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 16px;
  min-height: 178px;
  padding: 18px;
  border: 1px solid #dbe3f4;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.admin-pricing-row-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  text-align: left;
}

.admin-pricing-row-copy strong {
  color: #111827;
  font-size: 0.95rem;
  line-height: 1.3;
}

.admin-pricing-eyebrow {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.2;
}

.admin-pricing-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-pricing-input-wrap--stack {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.admin-pricing-input-label {
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.2;
}

.admin-pricing-field-note {
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-pricing-credit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.admin-pricing-input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border-radius: 18px;
  border: 1px solid #d9e2f5;
  background: #fff;
  padding: 0 14px;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.admin-pricing-input--credits {
  font-size: 0.98rem;
}

.admin-pricing-input:focus {
  outline: none;
  border-color: #8aa4ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.admin-pricing-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.admin-pricing-note {
  margin-top: 12px;
}

@media (max-width: 980px) {
  .admin-pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-pricing-list {
    grid-template-columns: 1fr;
  }

  .admin-pricing-row,
  .admin-pricing-row--credit {
    min-height: 0;
  }

  .admin-pricing-credit-fields {
    grid-template-columns: 1fr;
  }

  .admin-pricing-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Support widget and admin support */
.site-support{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:80;
}
.site-support-toggle{
  border:none;
  background:linear-gradient(135deg,#4aa9dc,#4f46e5);
  color:#fff;
  font-weight:700;
  padding:12px 18px;
  border-radius:999px;
  box-shadow:0 16px 32px rgba(55,84,170,0.22);
  cursor:pointer;
  box-sizing:border-box;
  max-width:calc(100vw - 28px);
  white-space:nowrap;
  overflow:visible;
  text-overflow:ellipsis;
}
.site-support-panel{
  width:min(360px,calc(100vw - 24px));
  max-height:min(72vh,640px);
  background:#fff;
  border:1px solid #d9e2ff;
  border-radius:22px;
  box-shadow:0 24px 60px rgba(32,42,76,0.18);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.site-support-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:16px 18px;
  background:linear-gradient(135deg,#4aa9dc,#4f46e5);
  color:#fff;
}
.site-support-subtitle{ font-size:12px; opacity:0.9; margin-top:4px; }
.site-support-localtime{ font-size:12px; font-weight:700; opacity:0.98; margin-top:6px; }
.site-support-localtime.hidden{ display:none; }
.site-support-beatline{ font-size:11px; opacity:0.9; margin-top:2px; font-variant-numeric:tabular-nums; letter-spacing:0.01em; }
.site-support-beatline .site-support-beat-now{ font-weight:700; }
.site-support-beatline.hidden{ display:none; }
.site-support-close{
  border:none;
  background:transparent;
  color:#fff;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:0;
}
.site-support-body{
  padding:16px;
  background:#f7f9ff;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:220px;
}
.site-support-empty-state{
  color:#56617d;
  line-height:1.55;
  background:#fff;
  border:1px dashed #d9def0;
  border-radius:16px;
  padding:16px;
}
.site-support-message{ display:flex; flex-direction:column; gap:4px; max-width:86%; align-items:flex-start; }
.site-support-message.mine{ align-self:flex-end; align-items:flex-end; text-align:right; }
.site-support-message.other{ align-self:flex-start; align-items:flex-start; }
.site-support-message-label{ font-size:11px; font-weight:700; color:#64708b; text-transform:uppercase; letter-spacing:0.04em; }
.site-support-message-bubble{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  align-content:flex-start;
  width:auto;
  height:auto;
  min-height:0;
  max-width:100%;
  padding:12px 14px;
  border-radius:18px;
  background:#fff;
  border:1px solid #dbe3ff;
  color:#18233f;
  line-height:1.5;
  text-align:left;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.site-support-message.mine .site-support-message-bubble{
  background:linear-gradient(135deg,#eef1ff,#e6e6ff);
  border-color:#c8d0ff;
}
.site-support-message-time{ font-size:12px; color:#7c859d; }
.site-support-compose{
  padding:14px 16px 16px;
  border-top:1px solid #e6ebfb;
  background:#fff;
}
.site-support-compose textarea{
  width:100%;
  resize:none;
  min-height:92px;
  border:1px solid #d6deef;
  border-radius:16px;
  padding:12px 14px;
  font:inherit;
  box-sizing:border-box;
}
.site-support-compose-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
}
.site-support-footnote{ color:#7c859d; font-size:12px; }
.site-support-send{ min-width:92px; }

.admin-support-panel{ display:flex; flex-direction:column; gap:18px; }
.admin-support-mode-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:8px 14px;
  min-height:46px;
  min-width:124px;
  border-radius:999px;
  background:#eef2ff;
  color:#4f46e5;
  font-weight:700;
  font-size:13px;
  line-height:1.2;
}
.admin-support-mode-badge.online{ background:#e8fbef; color:#15803d; }
.admin-support-settings{
  padding:14px 20px 20px;
  border:1px solid #e2e8fb;
  background:#fafbff;
}
.admin-support-settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.admin-support-toggle{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-height:112px;
  padding:18px 20px;
  border:1.5px solid #dbe5fb;
  border-radius:22px;
  background:#f8faff;
  cursor:pointer;
  transition:border-color .18s ease, background-color .18s ease, box-shadow .18s ease, opacity .18s ease, transform .18s ease;
  opacity:.58;
}
.admin-support-toggle:hover{
  transform:translateY(-1px);
}
.admin-support-toggle input{
  position:absolute;
  inset:0;
  opacity:0;
  margin:0;
  cursor:pointer;
}
.admin-support-toggle span{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  max-width:280px;
}
.admin-support-toggle strong{
  display:block;
  color:#14213d;
  margin:0;
  font-size:15px;
  line-height:1.35;
}
.admin-support-toggle small{
  color:#65708a;
  line-height:1.45;
  display:block;
  font-size:13px;
}
.admin-support-toggle.active{
  opacity:1;
  box-shadow:0 10px 22px rgba(99,102,241,.08);
}
.admin-support-toggle.live.active{
  border-color:#86efac;
  background:#eefcf3;
}
.admin-support-toggle.live.active strong,
.admin-support-toggle.live.active small{
  color:#166534;
}
.admin-support-toggle.assistant.active{
  border-color:#93c5fd;
  background:#eff6ff;
}
.admin-support-toggle.assistant.active strong,
.admin-support-toggle.assistant.active small{
  color:#1d4ed8;
}
.admin-support-toggle.inactive{
  background:#f8fafc;
  border-color:#e5e7eb;
  box-shadow:none;
}
.admin-support-toggle.inactive strong{ color:#334155; }
.admin-support-toggle.inactive small{ color:#94a3b8; }
.admin-support-settings-actions{ margin-top:14px; }
.admin-support-availability-head{
  align-items:flex-start;
  margin-bottom:12px;
}
.admin-support-availability-head h3{
  margin-top:0;
}
.admin-support-shell{
  display:grid;
  grid-template-columns:minmax(260px,320px) minmax(0,1fr);
  gap:18px;
}
.admin-support-list,
.admin-support-thread{
  border:1px solid #e2e8fb;
  border-radius:22px;
  background:#fff;
  padding:18px;
}
.admin-support-thread-list{ display:flex; flex-direction:column; gap:10px; max-height:620px; overflow:auto; }
.admin-support-thread-item{
  text-align:left;
  border:1px solid #dde4fb;
  background:#fff;
  border-radius:18px;
  padding:14px;
  cursor:pointer;
}
.admin-support-thread-item.active{
  border-color:#6475ff;
  background:#f5f7ff;
  box-shadow:0 10px 24px rgba(89,97,211,0.08);
}
.admin-support-thread-item-top,
.admin-support-thread-item-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}
.admin-support-thread-item-top strong{ color:#14213d; font-size:14px; }
.admin-support-thread-item-top span,
.admin-support-thread-item-preview{ color:#67728d; font-size:12px; }
.admin-support-thread-item-preview{ margin:8px 0 10px; line-height:1.45; }
.admin-support-role-pill,
.admin-support-unread-pill,
.admin-support-thread-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}
.admin-support-role-pill{ background:#eef2ff; color:#4f46e5; }
.admin-support-unread-pill{ background:#fff3e7; color:#c76c1d; }
.admin-support-thread-badge{ background:#eff6ff; color:#1d4ed8; }
.admin-support-empty{ padding:14px; border:1px dashed #d8deef; border-radius:16px; background:#fafbff; }
.admin-support-thread-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding-bottom:14px;
  border-bottom:1px solid #edf1fb;
  margin-bottom:14px;
}
.admin-support-messages{
  max-height:420px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-right:4px;
}
.admin-support-message{ display:flex; flex-direction:column; gap:4px; max-width:84%; align-items:flex-start; }
.admin-support-message.user{ align-self:flex-start; align-items:flex-start; }
.admin-support-message.admin,
.admin-support-message.assistant{ align-self:flex-end; align-items:flex-end; }
.admin-support-message-meta{ display:flex; justify-content:space-between; gap:10px; font-size:12px; color:#7d869e; }
.admin-support-message-bubble{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  align-content:flex-start;
  width:auto;
  height:auto;
  min-height:0;
  max-width:100%;
  border:1px solid #dce3f8;
  background:#fff;
  border-radius:18px;
  padding:12px 14px;
  line-height:1.55;
  color:#18233f;
  text-align:left;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.admin-support-message.admin .admin-support-message-bubble{ background:#eef1ff; border-color:#cfd6ff; }
.admin-support-message.assistant .admin-support-message-bubble{ background:#edf8ff; border-color:#cfeaff; }
.admin-support-reply-box{ min-height:120px; margin-top:16px; }

.admin-support-reply-attachments{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}
.admin-support-attach-button{
  padding:8px 12px;
}
.admin-support-reply-attachment-preview{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  width:100%;
}
.admin-support-reply-attachment-chip{
  display:flex;
  align-items:center;
  gap:8px;
  max-width:240px;
  padding:6px 8px;
  border:1px solid #dce3f8;
  border-radius:999px;
  background:#f7f8ff;
  color:#263250;
  font-size:12px;
}
.admin-support-reply-attachment-chip span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.admin-support-reply-attachment-chip button{
  width:20px;
  height:20px;
  border:0;
  border-radius:999px;
  background:#ffe8ee;
  color:#d0204c;
  cursor:pointer;
  line-height:1;
}

.admin-support-thread-actions{ display:flex; justify-content:flex-end; gap:12px; margin-top:12px; }
.admin-support-delete{ border-color:#f0c8c8; color:#b42318; background:#fff5f5; }

@media (max-width: 900px){
  .admin-support-settings-grid,
  .admin-support-shell{ grid-template-columns:1fr; }
}
@media (max-width: 640px){
  .site-support{
    position:fixed;
    left:auto;
    right:max(12px, env(safe-area-inset-right));
    bottom:max(12px, env(safe-area-inset-bottom));
    transform:none;
    z-index:2147483000;
    max-width:calc(100vw - 24px);
  }
  .site-support-toggle{
    max-width:calc(100vw - 24px);
    min-width:0;
  }
  .site-support-panel{ width:min(calc(100vw - 24px), 360px); max-width:calc(100vw - 24px); max-height:78vh; }
  .admin-support-thread-actions,
  .site-support-compose-row{ flex-direction:column; align-items:stretch; }
}


.admin-support-bookmark{
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.folder-chip.admin-support-bookmark span.admin-support-bookmark-badge{
  position:static;
  margin-left:0;
  min-width:22px;
  height:22px;
  padding:0 7px;
  box-sizing:border-box;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  border:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:11px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  line-height:1;
  box-shadow:0 6px 14px rgba(239,68,68,0.22);
}
.folder-chip.active.admin-support-bookmark .admin-support-bookmark-badge{
  background:#ef4444;
  color:#fff;
  border:0;
  box-shadow:0 6px 14px rgba(239,68,68,0.22);
}
.site-support-head-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.site-support-title-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.site-support-status-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  flex:0 0 auto;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}
.site-support-status-dot.online{
  background:#22c55e;
}
.site-support-status-dot.offline{
  background:#ef4444;
}

.site-support-compose-meta{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
  min-width:0;
}
.site-support-attach-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid #d6deef;
  background:#f8faff;
  color:#344767;
  font-size:14px;
  line-height:1.2;
  font-weight:700;
  white-space:nowrap;
  cursor:pointer;
}
.site-support-attach-button:hover{
  background:#eef4ff;
}
.site-support-upload-preview{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.site-support-upload-preview.hidden{ display:none; }
.site-support-upload-card{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  border:1px solid #dbe3ff;
  background:#f4f7ff;
  aspect-ratio:1/1;
}
.site-support-upload-card img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.site-support-upload-remove{
  position:absolute;
  top:6px;
  right:6px;
  width:24px;
  height:24px;
  border:none;
  border-radius:999px;
  background:rgba(15,23,42,0.78);
  color:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}
.site-support-message-text{
  display:block;
  width:auto;
  min-width:0;
  max-width:100%;
  margin:0;
  text-align:left;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.site-support-message-bubble.attachments-only{
  padding:10px;
}
.site-support-attachment-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.site-support-message-text + .site-support-attachment-grid{
  margin-top:10px;
}
.site-support-attachment{
  display:flex;
  flex-direction:column;
  gap:6px;
  text-decoration:none;
  color:#3f4e74;
}
.site-support-attachment img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:12px;
  border:1px solid #dbe3ff;
  background:#eef2ff;
}
.site-support-attachment span{
  font-size:11px;
  line-height:1.35;
}
.site-support-typing-bubble{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
  min-height:44px;
  padding:12px 14px;
  border-radius:18px;
  background:#fff;
  border:1px solid #dbe3ff;
}
.site-support-typing-dots{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.site-support-typing-bubble span{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#94a3b8;
  animation:siteSupportTyping 1.1s infinite ease-in-out;
}
.site-support-typing-text{
  font-size:12px;
  line-height:1.35;
  color:#64708b;
}
.site-support-typing-bubble span:nth-child(2){ animation-delay:0.16s; }
.site-support-typing-bubble span:nth-child(3){ animation-delay:0.32s; }
@keyframes siteSupportTyping{
  0%, 80%, 100% { opacity:0.35; transform:translateY(0); }
  40% { opacity:1; transform:translateY(-2px); }
}
.admin-support-message-text{
  display:block;
  width:auto;
  min-width:0;
  max-width:100%;
  margin:0;
  text-align:left;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.admin-support-message-bubble.attachments-only{
  padding:10px;
}
.admin-support-attachment-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.admin-support-message-text + .admin-support-attachment-grid{
  margin-top:10px;
}
.admin-support-attachment{
  display:flex;
  flex-direction:column;
  gap:6px;
  text-decoration:none;
  color:#46557c;
}
.site-support-message-bubble > *,
.admin-support-message-bubble > *{
  align-self:flex-start;
}

.admin-support-attachment img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:12px;
  border:1px solid #dce3f8;
  background:#eef2ff;
}
.admin-support-attachment span{
  font-size:11px;
  line-height:1.35;
}


.admin-support-name-row{
  margin-top:14px;
}
.admin-support-name-row-split{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.admin-support-name-row-split .admin-support-name-field{
  max-width:none;
}
.admin-support-message-field-wide{
  max-width:none;
}

.admin-support-name-row-right{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.admin-support-name-row-right .admin-support-name-field{
  grid-column:2;
  max-width:none;
}
.admin-support-name-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-width:420px;
}
.admin-support-name-label{
  display:flex;
  align-items:baseline;
  gap:6px;
  font-size:14px;
  font-weight:700;
  color:var(--text-strong);
}
.admin-support-name-label small{
  font-size:12px;
  font-weight:600;
  color:var(--text-muted);
}
.admin-support-name-field .text-input{
  width:100%;
}
.admin-support-name-field-tight{
  max-width:none;
}
.admin-support-timezone-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:16px 18px;
  border:1.5px solid #dbe5fb;
  border-radius:20px;
  background:linear-gradient(180deg,#fbfcff 0%, #f5f8ff 100%);
  box-shadow:0 8px 20px rgba(99,102,241,0.06);
}
.admin-support-timezone-card .admin-support-name-field{
  max-width:none;
}
.admin-support-timezone-card .text-input{
  min-height:44px;
}
.admin-support-timezone-note{
  margin:0;
  color:#66738f;
  font-size:12px;
  line-height:1.5;
}
.admin-support-toggle-compact{
  min-height:84px;
  padding:14px 18px;
  border-radius:18px;
}
.admin-support-toggle-compact span{
  gap:4px;
  max-width:100%;
}
.admin-support-toggle-compact strong{
  font-size:14px;
}
.admin-support-toggle-compact small{
  font-size:12px;
  max-width:270px;
}
.admin-support-toggle-global-clock{
  align-self:start;
  width:100%;
  max-width:none;
  min-height:112px;
  height:112px;
  max-height:112px;
  padding:18px 20px;
  border-radius:22px;
  box-sizing:border-box;
  overflow:hidden;
}
.admin-support-toggle-global-clock span{
  gap:6px;
  max-width:280px;
  justify-content:center;
}
.admin-support-toggle-global-clock strong{
  font-size:15px;
}
.admin-support-toggle-global-clock small{
  font-size:13px;
}
.admin-support-toggle-global-clock-accent{
  border-color:#f2df8f;
  background:#fff8d8;
  opacity:1;
  box-shadow:0 10px 22px rgba(217,170,26,0.08);
}
.admin-support-toggle-global-clock-accent strong,
.admin-support-toggle-global-clock-accent small{
  color:#8a5a00;
}
.admin-support-toggle-global-clock-accent:hover{
  border-color:#e6cd63;
  background:#fff5c7;
}
.admin-support-toggle-global-clock-accent input:checked + span strong,
.admin-support-toggle-global-clock-accent input:checked + span small{
  color:#7a4c00;
}


.pwa-install-card {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  width: min(420px, calc(100vw - 24px));
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10, 14, 28, 0.94);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  backdrop-filter: blur(16px);
}
.pwa-install-card.hidden { display: none; }
.pwa-install-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
}
.pwa-install-close::before,
.pwa-install-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transform-origin: center;
}
.pwa-install-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.pwa-install-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.pwa-install-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.pwa-install-title {
  margin: 0 40px 8px 0;
  font-size: 1.3rem;
  line-height: 1.2;
  color: #fff;
}
.pwa-install-text {
  margin: 0;
  color: rgba(255,255,255,0.82);
  line-height: 1.5;
}
.pwa-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.pwa-install-device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.pwa-install-device-grid.hidden {
  display: none !important;
}
.pwa-install-logo-row {
  pointer-events: none;
}
.pwa-device-button,
.pwa-device-logo {
  min-height: 78px;
  padding: 12px 8px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  cursor: default;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.pwa-device-button {
  cursor: pointer;
}
.pwa-device-button:hover,
.pwa-device-button:focus-visible,
.pwa-device-button.active,
.pwa-device-logo.active {
  transform: translateY(-1px);
  border-color: rgba(145, 190, 255, 0.72);
  background: rgba(94, 129, 255, 0.22);
  outline: none;
}
.pwa-device-button img,
.pwa-device-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.pwa-install-help {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
}
.pwa-install-help.hidden { display: none; }
@media (max-width: 720px) {
  .pwa-install-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    border-radius: 18px;
    padding: 16px 16px 14px;
  }
  .pwa-install-actions .button {
    flex: 1 1 140px;
  }
}


.site-support-toggle{
  position:relative;
}
.site-support-badge{
  position:absolute;
  top:-7px;
  right:-7px;
  min-width:22px;
  height:22px;
  padding:0 6px;
  box-sizing:border-box;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  border:2px solid rgba(255,255,255,0.92);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:11px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  line-height:1;
  box-shadow:0 8px 18px rgba(239,68,68,0.28);
}
.site-support-badge.hidden{ display:none; }
.site-support-toggle.has-alert{
  animation:none;
}
.site-support-toggle.has-alert .site-support-badge{
  animation:supportBadgePulse 1.2s ease-in-out infinite;
}
.admin-support-bookmark.has-alert{
  animation:none;
}
.admin-support-bookmark.has-alert .admin-support-bookmark-badge{
  animation:supportBadgePulse 1.2s ease-in-out infinite;
}
@keyframes supportPulse{
  0%, 100%{ box-shadow:0 16px 32px rgba(55,84,170,0.22); transform:translateY(0); }
  50%{ box-shadow:0 22px 40px rgba(239,68,68,0.28); transform:translateY(-1px); }
}
@keyframes supportBadgePulse{
  0%, 100%{ transform:scale(1); box-shadow:0 6px 14px rgba(239,68,68,0.22); }
  50%{ transform:scale(1.08); box-shadow:0 10px 20px rgba(239,68,68,0.30); }
}
.admin-geo-detail-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:18px;
  margin-top:18px;
}
.admin-geo-card{
  padding:18px;
  border:1px solid #e2e8fb;
  background:#fff;
}
.admin-geo-countries-card{
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border-color:#e6eaf5;
  box-shadow:0 10px 22px rgba(79,70,229,0.06);
}
.admin-geo-countries-card .section-head{
  margin-bottom:12px;
}
.admin-geo-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.admin-geo-row{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.admin-geo-row-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.admin-geo-row-top strong{ color:#14213d; }
.admin-geo-track{
  width:100%;
  height:11px;
  border-radius:999px;
  background:#eef2ff;
  overflow:hidden;
}
.admin-geo-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg,#4aa9dc,#4f46e5);
}
.admin-geo-table-wrap{ margin-top:0; }

.admin-geo-countries-wrap{
  margin-top:0;
  padding:12px;
  border:1px solid #e6eaf5;
  border-radius:18px;
  background:linear-gradient(180deg,rgba(255,255,255,0.88) 0%,rgba(248,251,255,0.96) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.7);
}
.admin-geo-countries-table thead th:last-child,
.admin-geo-countries-table tbody td:last-child{
  min-width:180px;
}
.admin-geo-country-cell{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  font-weight:600;
}
.admin-geo-flag{
  font-size:16px;
  line-height:1;
  width:20px;
  text-align:center;
  flex:0 0 20px;
}
.admin-geo-code-cell{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  text-transform:uppercase;
  color:#66738f;
}
.admin-geo-activity-cell{
  min-width:180px;
}
.admin-geo-track-table{
  height:12px;
}
@media (max-width: 900px){
  .admin-geo-countries-table thead th:last-child,
  .admin-geo-countries-table tbody td:last-child{ min-width:150px; }
}



.admin-support-beat-grid{
  align-items:start;
  grid-template-columns:minmax(406px,406px) minmax(0,1fr);
  gap:18px;
}
.admin-support-beat-config{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}
.admin-support-timezone-card{
  min-width:0;
  padding:18px 18px 16px;
}
.admin-support-time-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.admin-support-time-field{
  max-width:none;
  align-items:center;
  gap:8px;
}
.admin-support-time-field .text-input{
  min-height:44px;
}
.admin-support-time-heading{
  display:block;
  width:100%;
  text-align:center;
  font-size:14px;
  font-weight:800;
  color:#111827;
}
.admin-support-time-note{
  display:block;
  width:100%;
  text-align:center;
  font-size:12px;
  font-weight:600;
  color:#66738f;
}
.admin-support-beat-preview{
  border:1px solid #dbe2f5;
  background:#f8faff;
  border-radius:18px;
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.admin-support-beat-preview-line{
  font-size:13px;
  color:#22314f;
  text-align:center;
}
.admin-support-beat-preview-line strong{
  color:#14213d;
}
@media (max-width: 1100px){
  .admin-support-beat-grid{ grid-template-columns:1fr; }
}
@media (max-width: 860px){
  .admin-support-name-row-split,
  .admin-support-name-row-right,
  .admin-support-time-grid{ grid-template-columns:1fr; }
  .admin-support-name-row-right .admin-support-name-field{
    grid-column:1;
  }
}


.balance-summary-bar {
  padding: 1rem 1.5rem 0;
}

.balance-summary-bar.hidden {
  display: none;
}

.balance-summary-inner {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  width: 100%;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #d8deea;
  background: #f7f8fc;
  color: #475467;
  font-size: 0.96rem;
  line-height: 1;
  white-space: nowrap;
}

.balance-pill-label {
  font-weight: 500;
}

.balance-pill-value {
  font-weight: 700;
  color: #111827;
}

@media (max-width: 760px) {
  .balance-summary-bar {
    padding: 0.75rem 1rem 0;
  }

  .balance-summary-inner {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}


.failed-job-section-label {
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6b7280;
}

.failed-job-user-message {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #dbe7f3;
  color: #1f2937;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
}


.printing-page-body {
  min-height: 100vh;
  background: #f5f7fb;
}
.printing-page {
  max-width: 960px;
  margin: 0 auto;
  padding-top: 36px;
  padding-bottom: 64px;
}
.printing-hero {
  display: block;
  margin-bottom: 1.5rem;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: left;
}
.printing-hero .eyebrow { display: none; }
.printing-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5em;
  line-height: 1.2;
  color: #0f1f3a;
}
.printing-hero p {
  margin: 0;
  max-width: 760px;
  color: #000000;
  font-size: 1rem;
}
.printing-hero-note {
  max-width: none;
  margin-top: 0.9rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #677489;
  font-size: 0.95rem;
}
.printing-auth-gate {
  max-width: 820px;
  margin: 1.25rem auto 2rem;
  padding: 1.35rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid #d6dde8;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
  text-align: left;
}
.printing-auth-gate-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 auto;
}
.printing-auth-gate-copy {
  min-width: 0;
}
.printing-auth-gate-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 1.25rem;
}
.printing-auth-gate h2 {
  margin: 0 0 0.35rem;
  color: #11213d;
  font-size: 1.25rem;
}
.printing-auth-gate p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}
.printing-auth-gate-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  flex: 0 0 auto;
}
.printing-auth-gate-actions .button {
  justify-content: center;
  margin-top: 0;
  min-height: 40px;
  height: 40px;
  border-radius: 6px;
  font-weight: 600;
}
.printing-auth-gate-actions #printingLoginBtn {
  width: 82px;
  padding: 0;
  background: #4f46e5;
  color: #ffffff;
}
.printing-auth-gate-actions #printingRegisterBtn {
  width: 136px;
  padding: 0;
  background: #e5e7eb;
  color: #111827;
}

.printing-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
.printing-left-column,
.printing-right-column {
  display: grid;
  gap: 1.5rem;
}
.printing-preview-card,
.printing-source-card,
.printing-options-card,
.printing-address-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  text-align: left;
}
.printing-page .section-head {
  margin-bottom: 0.85rem;
}
.printing-page .section-head h2 {
  margin: 0;
  color: #11213d;
  font-size: 1.25rem;
}
.printing-preview-shell,
.printing-source-note,
#printingUploadPane,
#printingGalleryPane,
.printing-summary-box,
.printing-checkout-note {
  background: #ffffff;
  border: 1px solid #d6dde8;
  border-radius: 14px;
}
.printing-preview-shell {
  background: #ffffff;
  padding: 1.2rem 1rem 1rem;
}
.printing-shirt-stage {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
  aspect-ratio: 1122 / 1402;
}
.printing-shirt-template-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.printing-shirt-stage.shirt-white .printing-shirt-template-image { filter: none; }
.printing-shirt-stage.shirt-black .printing-shirt-template-image { filter: brightness(0) saturate(1) contrast(1); }
.printing-print-area {
  position: absolute;
  left: 26.1%;
  top: 22.8%;
  width: 47.8%;
  height: 36.8%;
  border: 1px dashed rgba(99, 102, 241, 0.32);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}
.printing-design-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #64748b;
  font-size: 0.96rem;
  line-height: 1.45;
  padding: 0.75rem;
}
.printing-design-wrap {
  position: absolute;
  width: 76%;
  max-width: 282px;
  cursor: grab;
  touch-action: none;
}
.printing-design-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.printing-adjust-row {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}
.printing-slider-wrap {
  flex: 0 1 560px;
  display: grid;
  gap: 0.35rem;
}
.printing-slider-wrap span,
.printing-page label {
  display: block;
  font-weight: 500;
  color: #14213a;
  margin-bottom: 0.42rem;
}

.printing-slider-wrap input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: min(100%, 560px);
  height: 16px;
  margin: 0.25rem 0 0;
  background: transparent;
  outline: none;
  cursor: pointer;
}
.printing-slider-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b4cf6 0%, #7c3aed 100%);
}
.printing-slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 2px solid #5b4cf6;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(91, 76, 246, 0.25);
  cursor: pointer;
}
.printing-slider-wrap input[type="range"]::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b4cf6 0%, #7c3aed 100%);
}
.printing-slider-wrap input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid #5b4cf6;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(91, 76, 246, 0.25);
  cursor: pointer;
}
.printing-slider-wrap input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(91, 76, 246, 0.16), 0 2px 8px rgba(91, 76, 246, 0.25);
}
.printing-slider-wrap input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(91, 76, 246, 0.16), 0 2px 8px rgba(91, 76, 246, 0.25);
}
.printing-adjust-actions,
.printing-source-actions,
.printing-chip-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.printing-source-actions,
.printing-chip-row { margin-bottom: 0.9rem; }
.printing-source-note {
  margin-bottom: 0.9rem;
  padding: 0.85rem 0.95rem;
  color: #64748b;
  background: #f9fbfd;
}
.printing-source-pane {
  padding: 0.95rem;
}
.printing-gallery-pane {
  min-height: 190px;
}
.printing-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.printing-source-tab {
  margin-top: 0;
  border-color: #cfd6e1;
}
.printing-source-tab.active {
  background: #eef2ff !important;
  color: #4338ca !important;
  border-color: #a5b4fc !important;
  box-shadow: 0 0 0 3px rgba(91, 76, 246, 0.12);
}
.printing-gallery-folders {
  margin: 0 0 0.85rem;
}
.printing-gallery-folders:empty {
  display: none;
}
.printing-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.8rem;
}
.printing-gallery-grid:empty {
  display: none;
}
.printing-gallery-grid-modal {
  margin-top: 1rem;
  max-height: min(62vh, 640px);
  overflow: auto;
  padding-right: 0.2rem;
}
.printing-gallery-item {
  border: 1px solid #d6dde8;
  border-radius: 14px;
  background: #fff;
  padding: 0.5rem;
  display: grid;
  gap: 0.42rem;
  text-align: left;
  color: #334155;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.printing-gallery-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}
.printing-gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: #f8fafc;
}
.printing-gallery-item.active,
.printing-choice.active {
  border-color: #5b4cf6;
  box-shadow: 0 0 0 3px rgba(91, 76, 246, 0.12);
}
.printing-gallery-item.active::after {
  content: "Selected";
  justify-self: start;
  border-radius: 999px;
  padding: 0.16rem 0.46rem;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.75rem;
  font-weight: 700;
}
.printing-upload-label {
  margin-bottom: 0.55rem;
  color: #14213a;
  font-weight: 500;
}
.printing-upload-box {
  min-height: 108px;
  position: relative;
  display: block;
  text-align: center;
  border-radius: 18px;
  padding: 0;
  background: #f5f7fb;
  border: 1px dashed #bfcbff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}
.printing-upload-box-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.printing-upload-box strong {
  display: block;
  margin: 0;
  color: #243c96;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}
.printing-upload-box-copy > span {
  display: block;
  margin: 0;
  color: #5e6b96;
  font-size: 0.96rem;
  line-height: 1.35;
}
.printing-upload-box:hover {
  background: #f1f5ff;
  border-color: #a8b8ff;
}
.printing-upload-box:focus-within {
  border-color: #8fa3ff;
  box-shadow: 0 0 0 4px rgba(91, 76, 246, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}
.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Keep visually hidden upload inputs from inheriting full-width form-field styles on Printing. */
.printing-page input.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  max-width: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.printing-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #d6dde8;
  border-radius: 999px;
  background: #fff;
  padding: 0.68rem 0.95rem;
  color: #24324a;
}
.printing-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.18);
}
.printing-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.printing-address-grid .printing-field-span-2,
.printing-form-grid .printing-field-span-2 {
  grid-column: auto;
}
.printing-page input,
.printing-page select,
.printing-page textarea {
  width: 100%;
  margin-bottom: 0;
  border-radius: 10px;
  border: 1px solid #cfd6e1;
  background: #ffffff;
  padding: 0.88rem 0.95rem;
  color: #111827;
  box-shadow: none;
}
.printing-page input:focus,
.printing-page select:focus,
.printing-page textarea:focus {
  outline: none;
  border-color: #5b4cf6;
  box-shadow: 0 0 0 3px rgba(91, 76, 246, 0.12);
}
.printing-summary-box {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  background: #ffffff;
  display: grid;
  gap: 0.7rem;
}
.printing-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.printing-summary-waiting .printing-summary-row-shipping,
.printing-summary-waiting .printing-summary-row-total {
  display: none;
}
.printing-quote-placeholder {
  margin: 0.15rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid #e2e8f0;
}
.printing-summary-row-total {
  padding-top: 0.6rem;
  border-top: 1px solid #e2e8f0;
  font-size: 1.05rem;
}
.printing-country-note {
  margin: 0.45rem 0 0;
}
.printing-country-locked {
  background: #f8fafc !important;
  color: #475569 !important;
  cursor: not-allowed;
}
.printing-checkout-note {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: #f9fbfd;
  color: #64748b;
}
.printing-order-actions { margin-top: 1rem; }
.printing-page .button.primary {
  background: #5b4cf6;
  color: #ffffff;
  border: 1px solid #5b4cf6;
  box-shadow: none;
}
.printing-page .button.primary:hover {
  background: #4b3fe3;
  border-color: #4b3fe3;
}
.printing-page .button.action-outline,
.printing-page .button.small-button {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cfd6e1;
}
.printing-page .button.action-outline:hover,
.printing-page .button.small-button:hover {
  background: #f8fafc;
  border-color: #b7c3d4;
}
.printing-page .printing-source-tab:hover {
  background: #f8f7ff;
  border-color: #a5b4fc;
  color: #4338ca;
}
.printing-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.printing-modal.hidden { display: none; }
.printing-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}
.printing-modal-dialog {
  position: relative;
  width: min(920px, calc(100vw - 2rem));
  max-height: min(86vh, 900px);
  overflow: auto;
  border-radius: 20px;
  padding: 1.1rem;
  background: #fff;
  border: 1px solid #d6dde8;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}
.printing-modal-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}
.admin-printing-panel {
  overflow: hidden;
}
.admin-printing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
  margin-bottom: 18px;
}
.admin-printing-grid--variants {
  align-items: start;
}
.admin-printing-grid--colour-sizes {
  grid-template-columns: minmax(0, 1fr);
}
.admin-printing-card {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.admin-printing-variant-card {
  overflow: hidden;
}
.admin-printing-orders-card {
  margin-top: 18px;
}
.admin-printing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}
.admin-printing-form-grid--single {
  grid-template-columns: minmax(180px, 260px);
}
.admin-printing-textarea { min-height: 92px; resize: vertical; }
.admin-printing-colour-size-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 10px;
  align-items: start;
}
.admin-printing-colour-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbe3f4;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.admin-printing-colour-head {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, 140px) minmax(120px, 150px) minmax(90px, 110px);
  gap: 12px;
  align-items: end;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e6ecf7;
}
.admin-printing-size-table {
  display: grid;
  gap: 10px;
}
.admin-printing-size-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(90px, 120px) minmax(116px, 142px);
  gap: 12px;
  align-items: end;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e1e8f6;
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
}
.admin-printing-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #24324a;
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
}
.admin-printing-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #4f46e5;
  flex: 0 0 auto;
}
.admin-printing-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-printing-colour-toggle {
  padding-bottom: 8px;
}
.admin-printing-size-toggle {
  padding-bottom: 8px;
}
.admin-printing-stock-total {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 42px;
}
.admin-printing-stock-total span {
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.2;
}
.admin-printing-stock-total strong {
  color: #11213d;
  font-size: 1rem;
}
.admin-printing-mini-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.admin-printing-mini-field span {
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.2;
}
.admin-printing-mini-field .admin-pricing-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 42px;
  border-radius: 14px;
  font-size: 0.94rem;
  padding-inline: 11px;
}
@media (max-width: 1320px) {
  .admin-printing-colour-size-list { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .admin-printing-colour-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-printing-size-row {
    grid-template-columns: minmax(90px, 1fr) minmax(90px, 1fr) minmax(116px, 1fr);
  }
}
@media (max-width: 980px) {
  .admin-printing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .admin-printing-form-grid,
  .admin-printing-form-grid--single { grid-template-columns: 1fr; }
  .admin-printing-colour-head,
  .admin-printing-size-row { grid-template-columns: 1fr; }
  .printing-preview-shell { padding-bottom: 0.8rem; }
  .printing-adjust-row {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.8rem;
  }
  .printing-slider-wrap {
    flex: 0 1 auto;
    width: 100%;
  }
  .printing-adjust-actions {
    align-self: flex-start;
    justify-content: flex-start;
  }
  .printing-gallery-toolbar { flex-direction: column; align-items: stretch; }
  .printing-modal { padding: 0.75rem; }
  .printing-modal-dialog { width: 100%; border-radius: 18px; padding: 0.95rem; }
}


.printing-upload-box.drag-over {
  border-color: #5b4cf6;
  background: #f8f7ff;
  box-shadow: 0 0 0 3px rgba(91, 76, 246, 0.12);
}




/* Keep the floating Support pill visible inside narrow phone frames, including the top of wider mobile pages. */
@media (max-width: 640px) {
  .site-support,
  .printing-page-body .site-support {
    position: fixed !important;
    left: auto !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    transform: none !important;
    z-index: 2147483000 !important;
    max-width: calc(100vw - 24px) !important;
    pointer-events: auto !important;
  }
  .site-support-toggle,
  .printing-page-body .site-support-toggle {
    box-sizing: border-box !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    transform: none !important;
  }
  .site-support-panel,
  .printing-page-body .site-support-panel {
    width: min(calc(100vw - 24px), 360px) !important;
    max-width: calc(100vw - 24px) !important;
  }
  .printing-page .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .printing-auth-gate {
    margin: 1rem 0 1.5rem;
    padding: 1.15rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .printing-auth-gate-main {
    width: 100%;
  }
  .printing-auth-gate-actions {
    align-items: flex-start;
    width: 100%;
  }
  .printing-auth-gate-actions .button {
    width: auto;
  }
}


.pricing-auth-gate {
  max-width: 820px;
  margin: 18px auto 22px;
  width: 100%;
  padding: 1.35rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid #d6dde8;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
  text-align: left;
}
.pricing-auth-gate-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 auto;
}
.pricing-auth-gate-copy {
  min-width: 0;
}
.pricing-auth-gate-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 1.25rem;
}
.pricing-auth-gate h3 {
  margin: 0 0 0.35rem;
  color: #11213d;
  font-size: 1.25rem;
}
.pricing-auth-gate p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}
.pricing-auth-gate-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  flex: 0 0 auto;
}
.pricing-auth-gate-actions .button {
  justify-content: center;
  margin-top: 0;
  min-height: 40px;
  height: 40px;
  border-radius: 6px;
}
.pricing-auth-gate-actions .button.primary {
  min-width: 82px;
  padding: 0 16px;
}
.pricing-auth-gate-actions .button:not(.primary) {
  min-width: 136px;
  padding: 0 16px;
}

@media (max-width: 640px) {
  .pricing-auth-gate {
    margin: 1rem 0 1.5rem;
    padding: 1.15rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .pricing-auth-gate-main {
    width: 100%;
  }
  .pricing-auth-gate-actions {
    width: 100%;
    align-items: flex-start;
  }
  .pricing-auth-gate-actions .button {
    width: auto;
  }
}
.printing-choice.disabled,
.printing-choice:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}


/* Admin Printing: match the Admin Pricing tab typography and card style. */
.admin-printing-panel .section-head h3 {
  color: #111827;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}
.admin-printing-panel .section-head .muted {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}
.admin-printing-card {
  border: 1px solid #e2e8fb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.05);
}
.admin-printing-colour-size-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.admin-printing-colour-card {
  padding: 18px;
  border: 1px solid #dbe3f4;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.admin-printing-colour-head {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e6ecf7;
}
.admin-printing-size-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 14px;
}
.admin-printing-size-row {
  display: flex !important;
  align-items: center;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid #dbe3f4;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.admin-printing-toggle {
  color: #111827;
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 700;
}
.admin-printing-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #4f46e5;
}
.admin-printing-colour-toggle,
.admin-printing-size-toggle {
  padding-bottom: 0;
}
.admin-printing-form-grid .admin-pricing-input-label {
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.2;
}
.admin-printing-form-grid .admin-pricing-input {
  height: 48px;
  border-radius: 18px;
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-printing-orders-table th,
.admin-printing-orders-table td {
  vertical-align: top;
}
.admin-printing-order-row td {
  line-height: 1.45;
}
.admin-printing-order-row td:nth-child(3),
.admin-printing-order-row td:nth-child(4) {
  min-width: 190px;
}


/* Admin printing recent orders: card layout that fits the panel and shows a real T-shirt mockup preview. */
.admin-printing-orders-list {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}
.admin-printing-order-card {
  border: 1px solid #dbe3f4;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  padding: 16px;
  overflow: hidden;
}
.admin-printing-order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e6ecf7;
}
.admin-printing-order-top-meta {
  text-align: right;
  flex: 0 0 auto;
}

.admin-printing-order-delete {
  margin-top: 12px;
}
.admin-printing-order-body {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-printing-order-mockup-col {
  min-width: 0;
}
.admin-printing-order-preview-wrap {
  display: grid;
  gap: 10px;
}
.admin-printing-order-preview {
  width: min(100%, 260px);
  margin: 0;
}
.admin-printing-order-print-area {
  border-style: solid;
  border-color: rgba(99, 102, 241, 0.18);
  background: rgba(255, 255, 255, 0.08);
}
.admin-printing-order-design-wrap {
  width: 76%;
  max-width: 282px;
  cursor: default;
}
.admin-printing-order-design-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.admin-printing-order-links a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}
.admin-printing-order-links a:hover {
  text-decoration: underline;
}
.admin-printing-order-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.admin-printing-order-section {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.admin-printing-order-section-title {
  margin: 0 0 8px;
  color: #111827;
  font-size: 0.85rem;
  font-weight: 700;
}
@media (max-width: 1180px) {
  .admin-printing-order-body {
    grid-template-columns: 1fr;
  }
  .admin-printing-order-preview {
    width: min(100%, 300px);
  }
  .admin-printing-order-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .admin-printing-order-top {
    flex-direction: column;
  }
  .admin-printing-order-top-meta {
    text-align: left;
  }
  .admin-printing-order-details-grid {
    grid-template-columns: 1fr;
  }
}

/* Centre the mockup heading and design link in Admin Printing order cards. */
.admin-printing-order-mockup-col .admin-printing-order-section-title,
.admin-printing-order-links {
  text-align: center;
}
.admin-printing-order-preview {
  margin-left: auto;
  margin-right: auto;
}


/* Admin Print orders badge: same size as other tab counters, green only when there are unseen orders. */
.folder-chip.admin-print-orders-bookmark span.admin-print-orders-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  background: #eef2ff;
  color: #4f46e5;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  height: auto;
  box-shadow: none;
}
.folder-chip.admin-print-orders-bookmark span.admin-print-orders-badge.hidden {
  display: none !important;
}
.folder-chip.active.admin-print-orders-bookmark span.admin-print-orders-badge {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.folder-chip.admin-print-orders-bookmark span.admin-print-orders-badge.has-new {
  background: #dcfce7;
  color: #15803d;
}
.folder-chip.active.admin-print-orders-bookmark span.admin-print-orders-badge.has-new {
  background: #22c55e;
  color: #fff;
}



.admin-print-orders-head {
  align-items: flex-start;
  gap: 1rem;
}
.admin-print-orders-reset-btn {
  flex: 0 0 auto;
  margin-top: 0;
}
@media (max-width: 720px) {
  .admin-print-orders-head {
    flex-direction: column;
    align-items: flex-start;
  }
}



/* Match Admin print-order mockup preview to the current user Printing preview. */
.admin-printing-order-preview {
  width: min(100%, 320px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.admin-printing-order-preview .printing-print-area,
.admin-printing-order-print-area {
  left: 24% !important;
  top: 22% !important;
  width: 52% !important;
  height: 42% !important;
  border: 1px dashed rgba(99, 102, 241, 0.42) !important;
  outline: none !important;
  background: rgba(255, 255, 255, 0.10) !important;
  border-radius: 22px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.admin-printing-order-preview .printing-design-wrap,
.admin-printing-order-design-wrap {
  width: 50% !important;
  max-width: none !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  cursor: default !important;
}

.admin-printing-order-preview .printing-design-wrap img,
.admin-printing-order-design-wrap img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

.admin-printing-order-preview-wrap {
  gap: 12px;
}

.admin-printing-order-links {
  text-align: center;
}




/* Compact, cleaner fulfilment form inside Admin Print orders */
.admin-printing-fulfilment-form {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #e2e8fb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.admin-printing-fulfilment-form > .admin-printing-order-section-title {
  margin-bottom: 10px;
  font-size: 0.9rem;
  text-align: left;
}

.admin-printing-fulfilment-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(150px, 1fr) minmax(190px, 1.4fr);
  gap: 10px;
  align-items: end;
}

.admin-printing-fulfilment-grid .admin-pricing-input-wrap {
  gap: 5px;
}

.admin-printing-fulfilment-grid .admin-pricing-input-label {
  font-size: 0.78rem;
  line-height: 1.2;
  color: #66738f;
  font-weight: 600;
}

.admin-printing-fulfilment-grid .admin-pricing-input {
  min-height: 42px;
  height: 42px;
  border-radius: 14px;
  padding: 0 12px;
  font-size: 0.94rem;
  font-weight: 600;
}

.admin-printing-fulfilment-note-field {
  grid-column: 1 / -1;
}

.admin-printing-fulfilment-note {
  min-height: 72px !important;
  height: 72px !important;
  padding: 10px 12px !important;
  resize: vertical;
  line-height: 1.35;
  font-size: 0.94rem !important;
}

.admin-printing-fulfilment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 12px;
}

.admin-printing-fulfilment-actions .button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.admin-printing-fulfilment-actions [data-print-fulfilment-message] {
  min-height: 1em;
  color: #16a34a;
  font-weight: 600;
}

.admin-printing-fulfilment-actions [data-print-fulfilment-message]:empty {
  display: none;
}

@media (max-width: 980px) {
  .admin-printing-fulfilment-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-printing-fulfilment-note-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .admin-printing-fulfilment-grid {
    grid-template-columns: 1fr;
  }
}


/* Fit Admin Print orders fulfilment form inside the order card cleanly */
.admin-printing-order-body .admin-printing-fulfilment-form {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-printing-fulfilment-form,
.admin-printing-fulfilment-grid,
.admin-printing-fulfilment-grid .admin-pricing-input-wrap,
.admin-printing-fulfilment-grid .admin-pricing-input {
  min-width: 0;
}

.admin-printing-fulfilment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.admin-printing-fulfilment-grid .admin-pricing-input,
.admin-printing-fulfilment-grid select,
.admin-printing-fulfilment-grid textarea {
  width: 100%;
  box-sizing: border-box;
}

.admin-printing-fulfilment-note-field {
  grid-column: 1 / -1;
}

.admin-printing-fulfilment-note {
  width: 100% !important;
  max-width: 100% !important;
}

.admin-printing-fulfilment-summary {
  text-align: left;
}

@media (max-width: 900px) {
  .admin-printing-fulfilment-grid {
    grid-template-columns: 1fr;
  }
}


/* Admin Print orders: compact collapsible order cards */
.admin-printing-order-card {
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-printing-order-card-collapsed {
  padding-bottom: 14px;
}

.admin-printing-order-top-clickable {
  cursor: pointer;
}

.admin-printing-order-top-clickable:hover {
  background: rgba(248, 250, 255, 0.72);
  border-radius: 14px;
}

.admin-printing-order-compact-main {
  min-width: 0;
}

.admin-printing-order-compact-user {
  margin-top: 4px;
  color: #53627c;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.admin-printing-order-compact-summary {
  min-width: 130px;
  text-align: right;
  line-height: 1.4;
}

.admin-printing-order-top-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.admin-printing-order-toggle {
  min-width: 108px;
}

.admin-printing-order-body-collapsible.hidden {
  display: none !important;
}

.admin-printing-order-body-collapsible {
  margin-top: 14px;
}

.admin-printing-order-card-collapsed .admin-printing-order-top {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.admin-printing-order-card:not(.admin-printing-order-card-collapsed) {
  border-color: #cfd9f5;
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.08);
}

@media (max-width: 760px) {
  .admin-printing-order-compact-summary {
    text-align: left;
  }

  .admin-printing-order-top-actions {
    align-items: flex-start;
    width: 100%;
  }

  .admin-printing-order-toggle,
  .admin-printing-order-delete {
    width: auto;
  }
}


/* Admin panel typography: keep all tabs consistent with Printing / Print orders. */
.admin-panel .section-head h2,
.admin-panel .panel-wide > .section-head h2 {
  color: #111827;
  font-size: 1.08rem;
  line-height: 1.3;
  font-weight: 700;
}

.admin-panel .section-head h3,
.admin-panel .card .section-head h3,
.admin-panel .admin-pricing-card .section-head h3,
.admin-panel .admin-printing-panel .section-head h3 {
  color: #111827;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}

.admin-panel .section-head .muted,
.admin-panel .muted,
.admin-panel .admin-pricing-note,
.admin-panel .small {
  font-size: 0.82rem;
  line-height: 1.35;
}

.admin-panel label,
.admin-panel .admin-pricing-input-label,
.admin-panel .admin-restore-label,
.admin-panel .admin-support-settings label,
.admin-panel .account-table th,
.admin-panel .account-table td {
  font-size: 0.9rem;
  line-height: 1.35;
}

.admin-panel .account-table th {
  color: #111827;
  font-weight: 700;
}

.admin-panel .account-table td {
  color: #1f2937;
}

.admin-panel .stat-card .stat-label,
.admin-panel .admin-support-help,
.admin-panel .admin-restore-help,
.admin-panel .admin-printing-order-section-title {
  font-size: 0.85rem;
  line-height: 1.35;
}

.admin-panel .button,
.admin-panel button,
.admin-panel select,
.admin-panel input,
.admin-panel textarea {
  font-size: 0.92rem;
}

.admin-panel .folder-chip {
  font-size: 0.9rem;
  line-height: 1.25;
}

.admin-panel .folder-chip span {
  font-size: 0.82rem;
  line-height: 1;
}

.admin-print-orders-reset-control {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  max-width: 280px;
}
.admin-print-orders-reset-btn.danger-button {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}
.admin-print-orders-reset-btn.danger-button:hover:not(:disabled) {
  background: #b91c1c;
}
.admin-print-orders-reset-description {
  text-align: right;
  line-height: 1.35;
}
@media (max-width: 720px) {
  .admin-print-orders-reset-control {
    align-items: flex-start;
    max-width: 100%;
  }
  .admin-print-orders-reset-description {
    text-align: left;
  }
}

/* Reset workspace button: always visible, pale by default, red on hover/focus. */
.admin-control-card--danger {
  min-height: 236px;
  overflow: visible;
}

.admin-control-card--danger .admin-control-sub {
  margin-bottom: 0;
}

.admin-control-card--danger .admin-control-reveal {
  max-height: none;
  opacity: 1;
  overflow: visible;
  transform: none;
  margin-top: auto;
}

.admin-control-card--danger .danger-button {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.admin-control-card--danger .danger-button:hover:not(:disabled),
.admin-control-card--danger .danger-button:focus-visible:not(:disabled) {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}




/* Image+Text reference remove button: optically centre the X in the circle. */
.image-text-page .image-text-preview-card .delete-chip {
  display: block !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
.image-text-page .image-text-preview-card .delete-chip span {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  transform: translate(-50%, -56%) !important;
}


/* Shared single-image upload preview cards with remove bubble. */
.preview.is-empty {
  color: #374151;
}

.upload-preview-card {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.upload-preview-card img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
}

.upload-preview-caption {
  font-size: 0.95rem;
  line-height: 1.35;
  color: #4b5563;
  word-break: break-word;
  text-align: center;
}

/* Reuse Image+Text-like remove bubble for upload previews. */
.preview-delete-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: rgba(255, 245, 247, 0.96);
  color: #e5484d;
  display: block;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  font-size: 0;
  line-height: 0;
}

.preview-delete-chip:hover {
  background: #fff0f1;
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.preview-delete-chip span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  transform: translate(-50%, -56%);
}

/* FINAL: make Face Swap, Try-On and Upscale preview X bubbles match Image+Text exactly. */
.preview .preview-delete-chip {
  position: absolute !important;
  top: 0.35rem !important;
  right: 0.35rem !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border: 1px solid #fecdd3 !important;
  background: #fff1f2 !important;
  color: #be123c !important;
  border-radius: 999px !important;
  display: block !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
  font-weight: 700 !important;
  line-height: 0 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease !important;
}

.preview .preview-delete-chip span {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  transform: translate(-50%, -56%) !important;
}

.preview .preview-delete-chip:hover {
  background: #ffe4e6 !important;
  border-color: #fda4af !important;
  transform: scale(1.04) !important;
}

/* FINAL V9: centre the X and place the bubble closer to the top-right corner. */
.preview {
  position: relative !important;
}

.preview .upload-preview-card {
  position: static !important;
}

.preview .preview-delete-chip {
  position: absolute !important;
  top: 0.35rem !important;
  right: 0.35rem !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border: 1px solid #fecdd3 !important;
  background: #fff1f2 !important;
  color: #be123c !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 0 !important;
  line-height: 0 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease !important;
}

.preview .preview-delete-chip span {
  display: none !important;
}

.preview .preview-delete-chip::before {
  content: "×";
  display: block !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translateY(-1px) !important;
}

.preview .preview-delete-chip:hover {
  background: #ffe4e6 !important;
  border-color: #fda4af !important;
  transform: scale(1.04) !important;
}


/* Credit-pack-only pricing layout. */
.pricing-intro {
  margin-bottom: 24px;
}
.pricing-intro h1 {
  margin: 10px 0 10px;
}
.pricing-section-note {
  margin-top: -4px;
  margin-bottom: 16px;
}
.pricing-pack-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pricing-pack-unit {
  margin-top: -2px;
}
.pricing-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.pricing-guide-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 170px;
}
.pricing-guide-values {
  display: grid;
  gap: 3px;
}
.pricing-guide-values strong {
  font-size: 1.35rem;
  color: #111827;
}
.pricing-guide-values span,
.pricing-guide-price {
  color: #53627a;
  font-size: 0.93rem;
}

/* Admin Pricing: full-width credit-pack layout, matching the Printing settings panel. */
.admin-panel[data-panel="pricing"] .admin-pricing-grid--credit-packs {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
  width: 100% !important;
  margin-top: 16px !important;
  margin-bottom: 18px !important;
}

.admin-panel[data-panel="pricing"] .admin-pricing-card--credit-packs {
  display: grid !important;
  gap: 1rem !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 24px !important;
}

.admin-panel[data-panel="pricing"] .admin-pricing-card--credit-packs > .section-head {
  align-items: flex-start !important;
  margin-bottom: 4px !important;
}

.admin-panel[data-panel="pricing"] .admin-pricing-list--credit-packs,
.admin-panel[data-panel="pricing"] #adminPricingCredits {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
  gap: 18px !important;
  width: 100% !important;
  margin-top: 10px !important;
  align-items: stretch !important;
}

.admin-panel[data-panel="pricing"] #adminPricingCredits .admin-pricing-row--credit {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 150px !important;
  height: 100% !important;
  padding: 20px !important;
}

.admin-panel[data-panel="pricing"] #adminPricingCredits .admin-pricing-row-copy {
  gap: 6px !important;
}

.admin-panel[data-panel="pricing"] #adminPricingCredits .admin-pricing-row-copy strong {
  font-size: 1rem !important;
}

.admin-panel[data-panel="pricing"] #adminPricingCredits .admin-pricing-credit-fields {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 0 !important;
}

.admin-panel[data-panel="pricing"] #adminPricingCredits .admin-pricing-input {
  width: 100% !important;
}

.admin-panel[data-panel="pricing"] .admin-pricing-actions {
  border-top: 1px solid #e7eefc !important;
  padding-top: 18px !important;
  margin-top: 22px !important;
}

@media (max-width: 1120px) {
  .admin-panel[data-panel="pricing"] .admin-pricing-list--credit-packs,
  .admin-panel[data-panel="pricing"] #adminPricingCredits {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .admin-panel[data-panel="pricing"] .admin-pricing-list--credit-packs,
  .admin-panel[data-panel="pricing"] #adminPricingCredits {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .admin-panel[data-panel="pricing"] #adminPricingCredits .admin-pricing-credit-fields {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Mobile UI fixes: account buttons, support panel, PWA device buttons, and hero carousel. */
.pwa-install-actions .button {
  margin-top: 0;
}

.showcase-slide img {
  background: #111827;
}
.showcase-carousel-hero:not(:has(.showcase-slide)) {
  display: block;
}

@media (max-width: 760px) {
  .account-page .account-dashboard {
    padding-left: 16px;
    padding-right: 16px;
  }
  .account-page .account-hero {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 24px;
    padding: 28px 18px;
  }
  .account-page .account-hero .hero-copy {
    text-align: center;
    width: 100%;
  }
  .account-page .account-hero .hero-copy p {
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
  }
  .account-page .account-actions {
    width: 100%;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
  }
  .account-page .account-actions .button {
    flex: 1 1 150px;
    max-width: 180px;
    min-width: 140px;
    min-height: 48px;
    margin-top: 0;
    text-align: center;
  }
  .account-page .account-actions .button.hidden {
    display: none !important;
  }
  .home-main,
  .home-showcase-hero,
  .home-showcase-content {
    min-height: calc(100dvh - 126px);
  }
}

@media (max-width: 420px) {
  .account-page .account-actions .button {
    flex-basis: calc(50% - 6px);
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .site-support-panel,
  .printing-page-body .site-support-panel {
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100dvh - 24px) !important;
    overflow: hidden !important;
  }
  .site-support-panel.hidden,
  .printing-page-body .site-support-panel.hidden {
    display: none !important;
  }
  .site-support-body {
    flex: 1 1 auto;
    min-height: 110px;
    padding: 12px;
  }
  .site-support-compose {
    flex: 0 0 auto;
    padding: 12px;
  }
  .site-support-compose textarea {
    min-height: 78px;
  }
  .site-support-compose-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end !important;
    gap: 10px !important;
    margin-top: 10px;
  }
  .site-support-compose-meta {
    min-width: 0;
  }
  .site-support-send {
    min-width: 84px;
    min-height: 44px;
    margin-top: 0;
  }
  .site-support-footnote {
    display: block;
    margin-top: 7px;
    line-height: 1.25;
  }
  .site-support-empty-state {
    padding: 14px;
    line-height: 1.45;
  }
  .pwa-install-card {
    bottom: max(12px, env(safe-area-inset-bottom));
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }
}

@media (max-width: 360px) {
  .site-support-compose-row {
    grid-template-columns: 1fr !important;
  }
  .site-support-send {
    width: 100%;
  }
}

/* v3: keep the PWA install card inside the visible iPhone viewport. */
.pwa-install-card {
  box-sizing: border-box;
}
.pwa-install-title,
.pwa-install-text,
.pwa-install-help {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .pwa-install-card {
    left: 50% !important;
    right: auto !important;
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    width: min(360px, calc(100dvw - 24px)) !important;
    max-width: calc(100dvw - 24px) !important;
    transform: translateX(-50%) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 14px;
  }
  .pwa-install-title {
    margin-right: 42px;
    font-size: clamp(1.15rem, 7vw, 1.75rem);
  }
  .pwa-install-text {
    font-size: clamp(0.94rem, 4.4vw, 1.05rem);
    line-height: 1.42;
  }
  .pwa-install-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pwa-install-actions .button {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
  }
}
@media (max-width: 340px) {
  .pwa-install-actions {
    grid-template-columns: 1fr !important;
  }
}

/* v3: use a simpler cross-fade carousel on phones to avoid blank/jerky horizontal tracks in mobile Safari. */
@media (max-width: 760px) {
  .showcase-track-hero.mobile-fade-carousel {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    animation: none !important;
    gap: 0;
  }
  .showcase-track-hero.mobile-fade-carousel .showcase-slide {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    flex: none !important;
    opacity: 0;
    transition: opacity 900ms ease;
  }
  .showcase-track-hero.mobile-fade-carousel .showcase-slide.is-active {
    opacity: 1;
  }
  .showcase-track-hero.mobile-fade-carousel .showcase-slide img {
    transform: none;
  }
  .hero-carousel-tint {
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.24) 0%, rgba(15, 23, 42, 0.34) 100%),
      rgba(0, 0, 0, 0.16);
  }
}

/* PWA install prompt refinement pwa137: keep device logos compact and prevent SVGs from expanding the card. */
.pwa-install-card .pwa-install-device-grid {
  gap: 8px !important;
  margin-top: 12px !important;
}
.pwa-install-card .pwa-device-logo,
.pwa-install-card .pwa-device-button {
  min-height: 54px !important;
  padding: 7px 6px !important;
  border-radius: 13px !important;
  gap: 5px !important;
  font-size: 0.72rem !important;
  line-height: 1.15 !important;
}
.pwa-install-card .pwa-device-logo img,
.pwa-install-card .pwa-device-button img {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  object-fit: contain !important;
  flex: 0 0 18px !important;
}
@media (max-width: 760px) {
  .pwa-install-card .pwa-device-logo,
  .pwa-install-card .pwa-device-button {
    min-height: 50px !important;
    padding: 6px 4px !important;
    font-size: 0.68rem !important;
  }
  .pwa-install-card .pwa-device-logo img,
  .pwa-install-card .pwa-device-button img {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex-basis: 16px !important;
  }
}



/* Admin mobile layout fixes v6: centre print-order reset and prevent stored-image cards from overflowing phones. */
@media (max-width: 760px) {
  .account-page .admin-dashboard,
  .account-page .admin-dashboard #adminContent,
  .admin-panel,
  .admin-panel .panel-wide,
  .admin-panel .card {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .admin-panel .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .admin-panel .section-head > *,
  .admin-panel .section-head .muted {
    min-width: 0;
    max-width: 100%;
  }

  .admin-print-orders-head {
    align-items: center !important;
    text-align: center;
  }

  .admin-print-orders-head > div {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .admin-print-orders-reset-control {
    width: 100%;
    max-width: 100% !important;
    align-items: center !important;
    text-align: center !important;
  }

  .admin-print-orders-reset-description {
    text-align: center !important;
  }

  .admin-print-orders-reset-btn {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
  }

  .admin-panel[data-panel="images"] .section-head {
    align-items: flex-start;
  }

  .admin-image-list,
  .admin-image-group,
  .admin-image-group-head,
  .admin-image-group-grid,
  .admin-image-row,
  .admin-image-meta {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .admin-image-group {
    overflow: hidden;
  }

  .admin-image-group-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-items: start;
    gap: 10px;
  }

  .admin-image-group-head > div {
    min-width: 0;
    max-width: 100%;
  }

  .admin-image-group-head .gallery-title,
  .admin-image-meta .gallery-title {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .admin-image-group-toggle {
    justify-self: start;
    max-width: 100%;
    white-space: normal;
  }

  .admin-image-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-image-actions .button {
    flex: 1 1 110px;
    min-width: 0;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .account-page .admin-dashboard {
    padding-left: 14px;
    padding-right: 14px;
  }

  .admin-panel .panel-wide,
  .admin-panel .card {
    border-radius: 18px;
  }

  .admin-image-group {
    padding: 12px;
  }
}


/* Pricing v140: clearer 10/25/50 credit pack presentation. */
.pricing-pack-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pricing-pack-title-row h3 {
  margin: 0;
}
.pricing-pack-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}
.pricing-pack-card--highlight {
  border-color: rgba(79, 70, 229, 0.26);
  box-shadow: 0 18px 38px rgba(79, 70, 229, 0.08);
}
@media (max-width: 520px) {
  .pricing-pack-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .pricing-pack-badge {
    font-size: 0.74rem;
  }
}


.earnings-period-note{
  margin: -6px 0 16px 0;
  padding: 8px 12px;
  border: 1px solid #dfe6ff;
  border-radius: 14px;
  background: #f7f8ff;
}


.admin-user-main-row{
  cursor:pointer;
}
.admin-user-main-row:hover{
  background:#f8faff;
}
.admin-user-main-row.expanded{
  background:#f4f6ff;
}
.admin-user-main-row.expanded .admin-user-expand-toggle{
  transform:rotate(90deg);
}
.admin-user-expand-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  margin-right:8px;
  border:0;
  border-radius:999px;
  background:#eef2ff;
  color:#4f46e5;
  font-size:12px;
  cursor:pointer;
  transition:transform .15s ease;
}
.pill-warning{
  background:#fff7d6;
  color:#8a5b00;
  border-color:#f8df8c;
}
.admin-user-detail-row.hidden{
  display:none;
}
.admin-user-detail-row td{
  background:#fbfcff;
  border-top:0;
  padding:0 12px 18px 12px;
}
.admin-user-detail-panel{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  padding:16px;
  border:1px solid #dfe6ff;
  border-radius:18px;
  background:#ffffff;
  box-shadow:0 10px 24px rgba(22,34,79,.06);
}
.admin-user-detail-panel h4{
  margin:0 0 10px 0;
  font-size:14px;
}
.admin-user-detail-list{
  display:grid;
  gap:8px;
}
.admin-user-detail-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px 10px;
  padding:9px 10px;
  border:1px solid #edf1ff;
  border-radius:12px;
  background:#f8faff;
}
.admin-user-detail-item .small{
  grid-column:1 / -1;
}
.admin-user-detail-error{
  grid-column:1 / -1;
  color:#6b7280;
  font-size:12px;
  line-height:1.4;
}
.admin-user-detail-item--failed{
  border-color:#ffe1e1;
  background:#fff8f8;
}
@media (max-width: 760px){
  .admin-user-detail-panel{
    grid-template-columns:1fr;
  }
}


/* Generic auth gate for protected tools */
.tool-auth-gate {
  max-width: 820px;
  margin: 1.25rem auto 2rem;
  padding: 1.35rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid #d6dde8;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
  text-align: left;
}
.tool-auth-gate-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 auto;
}
.tool-auth-gate-copy {
  min-width: 0;
}
.tool-auth-gate-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 1.25rem;
}
.tool-auth-gate h2,
.tool-auth-gate h3 {
  margin: 0 0 0.35rem;
  color: #11213d;
  font-size: 1.25rem;
}
.tool-auth-gate p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}
.tool-auth-gate-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  flex: 0 0 auto;
}
.tool-auth-gate-actions .button {
  justify-content: center;
  margin-top: 0;
  min-height: 40px;
  height: 40px;
  border-radius: 6px;
  font-weight: 600;
}
.tool-auth-gate-actions .button.primary {
  min-width: 82px;
  padding: 0 16px;
  background: #4f46e5;
  color: #ffffff;
}
.tool-auth-gate-actions .button:not(.primary) {
  min-width: 136px;
  padding: 0 16px;
  background: #e5e7eb;
  color: #111827;
}
.tool-workflow {
  width: 100%;
}
@media (max-width: 640px) {
  .tool-auth-gate {
    margin: 1rem 0 1.5rem;
    padding: 1.15rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .tool-auth-gate-main {
    width: 100%;
  }
  .tool-auth-gate-actions {
    align-items: flex-start;
    width: 100%;
  }
  .tool-auth-gate-actions .button {
    width: auto;
  }
}

/* Mobile auth buttons: keep Log in and Create account on one row like Account page */
@media (max-width: 640px) {
  .tool-auth-gate-actions,
  .printing-auth-gate-actions,
  .pricing-auth-gate-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 12px !important;
  }

  .tool-auth-gate-actions .button,
  .printing-auth-gate-actions .button,
  .pricing-auth-gate-actions .button,
  .printing-auth-gate-actions #printingLoginBtn,
  .printing-auth-gate-actions #printingRegisterBtn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 180px !important;
    min-height: 48px !important;
    height: auto !important;
    padding: 0 12px !important;
    margin-top: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 360px) {
  .tool-auth-gate-actions,
  .printing-auth-gate-actions,
  .pricing-auth-gate-actions {
    gap: 8px !important;
  }

  .tool-auth-gate-actions .button,
  .printing-auth-gate-actions .button,
  .pricing-auth-gate-actions .button,
  .printing-auth-gate-actions #printingLoginBtn,
  .printing-auth-gate-actions #printingRegisterBtn {
    padding: 0 8px !important;
    font-size: 0.92rem !important;
  }
}


/* Mobile admin tables: convert wide dashboard tables into readable cards */
@media (max-width: 760px) {
  .admin-panel[data-panel="earnings"] .table-wrap,
  .admin-geo-table-wrap,
  .admin-geo-countries-wrap {
    overflow-x: visible !important;
    width: 100%;
    box-sizing: border-box;
  }

  .admin-geo-countries-wrap {
    padding: 10px;
  }

  .earnings-table,
  .earnings-table thead,
  .earnings-table tbody,
  .earnings-table tfoot,
  .earnings-table tr,
  .earnings-table th,
  .earnings-table td,
  .admin-geo-countries-table,
  .admin-geo-countries-table thead,
  .admin-geo-countries-table tbody,
  .admin-geo-countries-table tr,
  .admin-geo-countries-table th,
  .admin-geo-countries-table td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
    table-layout: auto !important;
  }

  .earnings-table thead,
  .admin-geo-countries-table thead {
    display: none !important;
  }

  .earnings-table tbody,
  .earnings-table tfoot,
  .admin-geo-countries-table tbody {
    display: grid;
    gap: 12px;
  }

  .earnings-table tr,
  .admin-geo-countries-table tr {
    border: 1px solid #dbe4f5;
    border-radius: 16px;
    background: #ffffff;
    padding: 12px 14px;
    margin: 0;
    box-shadow: 0 10px 22px rgba(79,70,229,0.04);
  }

  .earnings-table tfoot tr {
    background: linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
    border-color: #cfdaf3;
  }

  .earnings-table td,
  .admin-geo-countries-table td {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #eef2ff;
    text-align: right !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    font-size: 0.96rem;
  }

  .earnings-table td:last-child,
  .admin-geo-countries-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .earnings-table td::before,
  .admin-geo-countries-table td::before {
    content: attr(data-label);
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-weight: 700;
    color: #334155;
    overflow-wrap: normal;
  }

  .earnings-table td[data-label="Tool"],
  .earnings-table tfoot td:first-child {
    display: block !important;
    text-align: left !important;
    font-weight: 800;
    color: #111827;
    font-size: 1.02rem;
    padding-top: 0;
    padding-bottom: 11px;
    margin-bottom: 2px;
  }

  .earnings-table td[data-label="Tool"]::before,
  .earnings-table tfoot td:first-child::before {
    display: none !important;
  }

  .admin-geo-country-cell {
    justify-content: flex-end;
    text-align: right;
    max-width: 60%;
    margin-left: auto;
  }

  .admin-geo-country-cell span:last-child {
    overflow-wrap: anywhere;
  }

  .admin-geo-countries-table td[data-label="Activity"] {
    display: block !important;
    text-align: left !important;
  }

  .admin-geo-countries-table td[data-label="Activity"]::before {
    display: block;
    margin-bottom: 8px;
  }

  .admin-geo-activity-cell,
  .admin-geo-countries-table tbody td:last-child {
    min-width: 0 !important;
  }

  .admin-geo-track-table {
    width: 100%;
  }
}


/* Mobile admin earnings cards: add breathing room between stacked cards */
@media (max-width: 760px) {
  .admin-panel[data-panel="earnings"] .earnings-table tbody {
    gap: 18px !important;
  }

  .admin-panel[data-panel="earnings"] .earnings-table tfoot {
    margin-top: 18px !important;
  }

  .admin-panel[data-panel="earnings"] .earnings-table tbody tr,
  .admin-panel[data-panel="earnings"] .earnings-table tfoot tr {
    margin-bottom: 0 !important;
  }
}

