:root {
  --bg-cream: #fffaf4;
  --bg-mint: #e9f8f1;
  --bg-sky: #e6f3ff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --text-main: #22313f;
  --text-muted: #5f7183;
  --line: rgba(34, 49, 63, 0.12);
  --accent-coral: #ff8e7f;
  --accent-mint: #63c9a3;
  --accent-blue: #79b9ff;
  --shadow: 0 24px 60px rgba(64, 89, 109, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(255, 142, 127, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(99, 201, 163, 0.24), transparent 24%),
    linear-gradient(135deg, var(--bg-cream), var(--bg-sky) 52%, var(--bg-mint));
}

button,
input {
  font: inherit;
}

textarea {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 32px 20px;
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto 20px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-blue));
  box-shadow: 0 8px 18px rgba(75, 124, 167, 0.28);
}

.auth-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-height: 58px;
}

.header-auth-button,
.user-chip-action,
.provider-button,
.auth-mode-button,
.route-help-trigger,
.auth-close-button {
  font: inherit;
}

.header-auth-button {
  padding: 13px 18px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-main);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(70, 94, 113, 0.1);
}

.header-link {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  padding: 13px 18px;
  border-radius: 999px;
  background: rgba(237, 247, 241, 0.96);
  color: #285443;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 10px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 24px rgba(70, 94, 113, 0.1);
}

.user-chip-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #233647, #4b7ca7);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
}

.user-chip-copy {
  display: grid;
  gap: 2px;
}

.user-chip-label {
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-chip-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 800;
}

.user-chip-action {
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: #edf7f1;
  color: #285443;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-profile-link[aria-current="page"] {
  background: linear-gradient(135deg, #233647, #4b7ca7);
  color: white;
}

.admin-profile-link {
  margin-right: 0;
}

.bg-shape {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.65;
}

.bg-shape-left {
  top: 80px;
  left: -40px;
  width: 240px;
  height: 240px;
  background: rgba(255, 206, 160, 0.55);
}

.bg-shape-right {
  right: -60px;
  bottom: 60px;
  width: 280px;
  height: 280px;
  background: rgba(121, 185, 255, 0.35);
}

.app-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.app-card-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 780px;
  padding: 40px 32px 32px;
}

.app-card-single {
  grid-template-columns: 1fr;
}

.hero-copy,
.panel {
  animation: rise-in 500ms ease-out both;
}

.hero-copy {
  padding: 18px 10px 18px 8px;
}

.app-card-home .hero-copy {
  width: 100%;
  padding: 6px 0 0;
  text-align: center;
  display: flex;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: #dd6f60;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  max-width: 9ch;
  font-size: clamp(3rem, 6vw, 5.5rem);
  letter-spacing: -0.06em;
}

.app-card-home h1 {
  max-width: none;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.lede,
.thanks-panel p {
  max-width: 58ch;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.pill {
  padding: 11px 15px;
  border: 1px solid rgba(121, 185, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #446175;
  font-size: 0.92rem;
  font-weight: 700;
}

.panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 20px 45px rgba(70, 94, 113, 0.12);
}

.app-card-home .panel {
  width: 100%;
  max-width: 640px;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 280px;
  padding: 28px;
  border: 2px dashed rgba(121, 185, 255, 0.42);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 250, 245, 0.86));
  text-align: center;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  transform: translateY(-2px);
  border-color: rgba(99, 201, 163, 0.85);
  box-shadow: 0 18px 30px rgba(99, 201, 163, 0.13);
}

.dropzone.is-disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.dropzone.is-disabled:hover {
  transform: none;
  border-color: rgba(121, 185, 255, 0.42);
  box-shadow: none;
}

.dropzone input {
  display: none;
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent-coral), #ffb38a);
  color: white;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(255, 142, 127, 0.25);
}

.dropzone-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.dropzone-subtitle,
.preview-label,
.preview-meta,
.status-message {
  color: var(--text-muted);
}

.file-preview {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
}

.file-preview img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 18px;
}

.preview-label,
.preview-name,
.preview-meta {
  margin: 0;
}

.preview-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preview-name {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 800;
}

.preview-meta {
  margin-top: 5px;
  font-size: 0.92rem;
}

.progress {
  overflow: hidden;
  height: 10px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(121, 185, 255, 0.18);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-mint));
  transition: width 200ms ease;
}

.status-message {
  min-height: 24px;
  margin: 14px 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.status-message.is-error {
  color: #c14f45;
}

.status-message.is-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.status-message.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(121, 185, 255, 0.3);
  border-top-color: #4b7ca7;
  border-radius: 999px;
  animation: spin 700ms linear infinite;
  flex: 0 0 auto;
}

.auth-hint {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.primary-button,
.secondary-button {
  width: 100%;
  margin-top: 10px;
  padding: 16px 18px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, #233647, #4b7ca7);
  color: white;
  font-weight: 800;
  box-shadow: 0 18px 24px rgba(35, 54, 71, 0.22);
}

.secondary-button {
  background: #edf7f1;
  color: #285443;
  font-weight: 800;
}

.warning-button {
  width: auto;
  margin-top: 10px;
  padding: 16px 18px;
  border: 0;
  border-radius: 18px;
  background: #ffd669;
  color: #6c4a00;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.warning-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.warning-button:disabled {
  opacity: 0.62;
  cursor: progress;
}

.thanks-panel {
  display: grid;
  align-content: center;
  min-height: 100%;
  text-align: left;
  gap: 14px;
}

.thanks-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(99, 201, 163, 0.15);
  color: #26765d;
  font-size: 0.9rem;
  font-weight: 800;
}

.order-meta,
.admin-toolbar-copy {
  margin: 16px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.thanks-preview {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
}

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

.thanks-replace-button {
  width: auto;
  margin-top: 0;
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #355a78;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.route-help-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-top: 0;
  border: 0;
  flex-shrink: 0;
  cursor: pointer;
  justify-self: start;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.route-help-trigger--text {
  padding: 0;
  background: transparent;
  color: #355a78;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.route-help-trigger--text:hover {
  color: #22313f;
  transform: translateY(-1px);
}

.route-help-trigger--icon {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(75, 124, 167, 0.24);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), transparent 58%),
    linear-gradient(135deg, rgba(121, 185, 255, 0.2), rgba(99, 201, 163, 0.18));
  color: #274663;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(75, 124, 167, 0.14);
}

.route-help-trigger--icon:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(75, 124, 167, 0.38);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98), transparent 58%),
    linear-gradient(135deg, rgba(121, 185, 255, 0.3), rgba(99, 201, 163, 0.24));
  color: #1f3850;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 12px 24px rgba(75, 124, 167, 0.18);
}

.route-help-trigger--icon:active {
  transform: translateY(0);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 49, 63, 0.34);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(35, 54, 71, 0.2);
}

.auth-close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(34, 49, 63, 0.08);
  color: var(--text-main);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.auth-dialog-copy {
  margin: 16px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.route-help-dialog {
  width: min(100%, 640px);
}

.route-help-sections {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.route-help-section-title {
  margin: 0;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 800;
}

.route-help-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.route-help-example {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.provider-button {
  width: 100%;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 18px;
  background: white;
  color: var(--text-main);
  font-weight: 800;
  cursor: pointer;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-form {
  display: grid;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(121, 185, 255, 0.12);
}

.auth-mode-button {
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  cursor: pointer;
}

.auth-mode-button.is-active {
  background: white;
  color: var(--text-main);
  box-shadow: 0 10px 24px rgba(70, 94, 113, 0.08);
}

.field-label {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 800;
}

.field-input {
  width: 100%;
  margin-top: 8px;
  padding: 15px 16px;
  border: 1px solid rgba(35, 54, 71, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-main);
}

.compact-textarea {
  min-height: 140px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-field .field-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 0;
}

.field-input:focus,
.header-auth-button:focus,
.provider-button:focus,
.auth-mode-button:focus,
.user-chip-action:focus,
.route-help-trigger:focus,
.auth-close-button:focus,
.primary-button:focus,
.secondary-button:focus {
  outline: 3px solid rgba(121, 185, 255, 0.34);
  outline-offset: 2px;
}

.auth-helper-text {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.field-select {
  appearance: none;
}

.admin-title {
  max-width: 12ch;
}

.admin-dashboard {
  display: grid;
  gap: 20px;
}

.admin-session-cached .admin-dashboard.hidden {
  display: grid !important;
  visibility: hidden;
}

.admin-session-cached .auth-controls {
  min-height: 56px;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-menu-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-nav-link,
.admin-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: #355a78;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(70, 94, 113, 0.08);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.admin-menu-button {
  gap: 10px;
  cursor: pointer;
}

.admin-menu-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 160ms ease;
}

.admin-nav-link:hover,
.admin-menu-button:hover,
.admin-nav-link:focus-visible,
.admin-menu-button:focus-visible,
.admin-menu-dropdown-link:hover,
.admin-menu-dropdown-link:focus-visible {
  border-color: rgba(35, 54, 71, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 28px rgba(70, 94, 113, 0.12);
  outline: none;
}

.admin-nav-link.is-active,
.admin-menu-button.is-active,
.admin-menu-group.is-open .admin-menu-button {
  border-color: rgba(35, 54, 71, 0.12);
  background: linear-gradient(135deg, #233647, #4b7ca7);
  color: white;
  box-shadow: 0 12px 24px rgba(35, 54, 71, 0.14);
}

.admin-menu-group {
  position: relative;
}

.admin-menu-group.is-open .admin-menu-button::after {
  transform: rotate(-135deg) translate(-1px, 1px);
}

.admin-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 10px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 44px rgba(70, 94, 113, 0.14);
  backdrop-filter: blur(18px);
}

.admin-menu-dropdown[hidden] {
  display: none !important;
}

.admin-menu-dropdown-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #4a6781;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.admin-menu-dropdown-link.is-active {
  border-color: rgba(35, 54, 71, 0.12);
  background: rgba(35, 54, 71, 0.9);
  color: white;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.admin-toolbar-actions {
  min-width: 220px;
}

.admin-toolbar-actions .primary-button,
.admin-toolbar-actions .secondary-button {
  width: auto;
  margin-top: 0;
}

.product-match-transfer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.product-match-transfer-actions .secondary-button {
  min-width: 108px;
}

.product-match-search-panel {
  display: grid;
  gap: 16px;
}

.product-match-search-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.product-match-search-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1.8fr) repeat(4, minmax(130px, 1fr)) minmax(140px, auto);
  align-items: end;
}

.product-match-search-field--query {
  grid-column: auto;
}

.product-match-search-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.product-match-search-actions .secondary-button {
  min-width: 140px;
}

.product-match-search-summary {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 16px;
  background: rgba(247, 250, 255, 0.82);
}

.reset-panel {
  gap: 16px;
}

.reset-panel-copy {
  display: grid;
  gap: 8px;
}

.reset-danger-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(193, 79, 69, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 248, 246, 0.96), rgba(255, 241, 238, 0.92));
}

.reset-danger-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.reset-danger-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(193, 79, 69, 0.14);
  color: #9b3b31;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-countdown-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.admin-list-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.admin-search-field {
  display: grid;
  gap: 8px;
  flex: 1;
  margin: 0;
}

.admin-paging-summary {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: right;
}

.admin-runtime-note {
  padding: 12px 14px;
  border: 1px solid rgba(121, 185, 255, 0.22);
  border-radius: 14px;
  background: rgba(247, 250, 255, 0.9);
  color: #355a78;
  font-size: 0.92rem;
  line-height: 1.5;
}

.admin-runtime-note.is-error {
  border-color: rgba(193, 79, 69, 0.28);
  background: rgba(255, 243, 241, 0.92);
  color: #8b3d35;
}

.admin-runtime-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.admin-runtime-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.admin-runtime-summary::-webkit-details-marker {
  display: none;
}

.admin-runtime-summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(121, 185, 255, 0.12);
  color: #355a78;
  font-size: 1rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.admin-runtime-panel[open] .admin-runtime-summary::after {
  content: "−";
}

.admin-runtime-log-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-runtime-log-entry {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(35, 54, 71, 0.08);
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-runtime-summary-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.admin-stat-card,
.order-card,
.admin-empty-state {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.admin-stat-card {
  padding: 18px;
}

.admin-stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-stat-value {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.admin-empty-state {
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
}

.order-list {
  display: grid;
  gap: 16px;
}

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

.profile-history-section {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.order-card,
.user-card {
  padding: 20px;
}

.user-list,
.user-management-list {
  display: grid;
  gap: 16px;
}

.order-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.order-card-heading {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.order-card-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
}

.order-card-title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.order-card-meta {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.order-card-submeta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.order-card-channel-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.order-card-channel-mark .channel-badge-logo {
  min-width: 0;
  height: auto;
}

.order-card-channel-mark-ebay {
  background: rgba(240, 246, 255, 0.96);
}

.order-card-channel-mark-email {
  background: rgba(245, 249, 255, 0.92);
}

.order-card-channel-mark-etsy {
  background: rgba(255, 244, 236, 0.96);
}

.order-card-channel-mark-agents {
  background: rgba(238, 244, 255, 0.96);
}

.order-status-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: none;
  max-width: min(360px, 100%);
}

.order-status-badge-label {
  line-height: 1.05;
}

.order-status-badge-detail {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0.88;
  letter-spacing: -0.01em;
  white-space: normal;
  word-break: break-word;
}

.status-error {
  background: rgba(255, 142, 127, 0.2);
  color: #a2443b;
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  background: rgba(245, 249, 255, 0.92);
  color: #23415f;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.channel-badge-text {
  letter-spacing: -0.01em;
}

.channel-badge-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  line-height: 1;
  flex: 0 0 auto;
}

.channel-badge-logo-email {
  color: #2f6b9f;
}

.channel-badge-logo-email svg {
  width: 18px;
  height: 18px;
  display: block;
}

.channel-badge-logo-ebay {
  min-width: 32px;
  gap: 0;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.08em;
}

.channel-badge-logo-letter {
  display: inline-block;
}

.ebay-letter-e {
  color: #e53238;
}

.ebay-letter-b {
  color: #0064d2;
}

.ebay-letter-a {
  color: #f5af02;
}

.ebay-letter-y {
  color: #86b817;
}

.channel-badge-logo-etsy {
  min-width: auto;
  color: #f1641e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.channel-badge-email {
  background: rgba(121, 185, 255, 0.12);
  color: #2f6b9f;
}

.channel-badge-ebay {
  background: rgba(240, 246, 255, 0.96);
}

.channel-badge-etsy {
  background: rgba(255, 244, 236, 0.96);
  color: #b24d16;
}

.channel-badge-agents {
  background: rgba(238, 244, 255, 0.96);
  color: #3f5f88;
}

.status-uploaded {
  background: rgba(121, 185, 255, 0.18);
  color: #2d6399;
}

.status-processing,
.status-sent_to_autopilot {
  background: rgba(255, 206, 160, 0.32);
  color: #8a541d;
}

.status-ready,
.status-shipped {
  background: rgba(99, 201, 163, 0.2);
  color: #26765d;
}

.status-completed {
  background: rgba(69, 181, 114, 0.16);
  color: #1e6e49;
}

.status-canceled {
  background: rgba(255, 142, 127, 0.2);
  color: #b04a40;
}

.account-basic {
  background: rgba(121, 185, 255, 0.12);
  color: #355a78;
}

.account-premium {
  background: rgba(255, 206, 160, 0.28);
  color: #8a541d;
}

.account-vip {
  background: rgba(99, 201, 163, 0.2);
  color: #26765d;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  margin: 18px 0 0;
}

.order-detail-grid dt {
  color: var(--text-muted);
  font-weight: 700;
}

.order-detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.order-detail-stack {
  display: grid;
  gap: 6px;
  align-items: start;
}

.order-detail-link {
  color: #1f5ca8;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 92, 168, 0.24);
  transition: color 160ms ease, border-color 160ms ease;
}

.order-detail-link:hover,
.order-detail-link:focus-visible {
  color: #143d70;
  border-color: rgba(20, 61, 112, 0.48);
}

.order-detail-link.is-disabled {
  color: var(--text-muted);
  border-bottom-color: transparent;
  cursor: default;
  pointer-events: none;
}

.tracking-info-stack {
  display: grid;
  gap: 8px;
}

.ebay-shipment-stack {
  min-width: min(100%, 420px);
}

.ebay-shipment-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.ebay-shipment-grid {
  display: grid;
  gap: 10px;
}

.ebay-shipment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ebay-shipment-actions .primary-button,
.ebay-shipment-actions .secondary-button {
  width: auto;
}

.tracking-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.tracking-info-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.tracking-info-error {
  color: #9b3b31;
}

.order-path-log {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-path-log-item {
  display: grid;
  gap: 3px;
  padding-left: 12px;
  border-left: 2px solid rgba(35, 54, 71, 0.14);
}

.order-path-log-item.is-error {
  border-left-color: rgba(193, 79, 69, 0.34);
}

.order-path-log-text {
  color: #183047;
  font-size: 0.92rem;
  line-height: 1.4;
}

.order-path-log-item.is-error .order-path-log-text {
  color: #9b3b31;
}

.order-path-log-time {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.order-log-stack {
  display: grid;
  gap: 14px;
}

.order-log-next-step {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(245, 249, 255, 0.92);
  border: 1px solid rgba(35, 54, 71, 0.08);
}

.order-log-next-step-label {
  color: #183047;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.order-log-next-step-text {
  color: #35526e;
  font-size: 0.92rem;
  line-height: 1.45;
}

.order-status-editor {
  display: grid;
  gap: 8px;
  max-width: 100%;
  margin-top: 0;
}

.order-status-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.92));
}

.order-status-panel-header {
  display: grid;
  gap: 4px;
}

.order-status-panel-title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.order-status-panel-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.order-status-panel-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.order-status-alert {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(193, 79, 69, 0.2);
  background: rgba(255, 242, 240, 0.9);
}

.order-status-alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-status-alert-label {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.order-status-alert-text {
  font-size: 0.92rem;
  line-height: 1.45;
}

.order-status-alert-action {
  min-height: 36px;
  padding: 9px 14px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.order-status-label {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.order-action-group {
  display: grid;
  gap: 10px;
  max-width: 100%;
  margin-top: 0;
}

.order-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-action-button {
  width: auto;
  margin-top: 0;
}

.order-action-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.autopilot-config-card,
.autopilot-config-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(247, 250, 255, 0.88);
}

.autopilot-config-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.autopilot-config-summary::-webkit-details-marker {
  display: none;
}

.autopilot-config-summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(121, 185, 255, 0.12);
  color: #355a78;
  font-size: 1rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.autopilot-config-panel[open] .autopilot-config-summary::after {
  content: "−";
}

.autopilot-config-summary-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.autopilot-config-title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.autopilot-config-summary-copy {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.autopilot-config-content {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(35, 54, 71, 0.08);
}

.autopilot-config-content .order-detail-grid {
  margin-top: 0;
}

.api-trace-section-list {
  display: grid;
  gap: 12px;
}

.api-trace-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.api-trace-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.api-trace-section-title {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: #183047;
}

.api-trace-code {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: #122234;
  color: #d8e6f5;
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

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

.email-config-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.email-config-section-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.email-config-section .field-label {
  margin-top: 0;
}

.email-config-checkbox-field {
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 16px;
  background: rgba(247, 250, 255, 0.88);
}

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

.autopilot-form-block {
  grid-column: 1 / -1;
}

.autopilot-live-indicator {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: 20px 22px;
  border: 1px solid rgba(52, 87, 118, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.84), transparent 36%),
    linear-gradient(135deg, rgba(232, 244, 255, 0.98), rgba(246, 250, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 20px 40px rgba(31, 52, 74, 0.08);
}

.autopilot-live-indicator.is-production {
  border-color: rgba(132, 87, 38, 0.16);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.84), transparent 36%),
    linear-gradient(135deg, rgba(255, 245, 228, 0.98), rgba(255, 250, 242, 0.96));
}

.autopilot-live-indicator.has-pending {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 20px 40px rgba(31, 52, 74, 0.08),
    0 0 0 3px rgba(79, 130, 180, 0.08);
}

.autopilot-live-indicator-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.autopilot-live-indicator-eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #45647f;
}

.autopilot-live-indicator-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #17324a;
}

.autopilot-live-indicator-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  min-width: 118px;
  border-radius: 999px;
  background: rgba(79, 130, 180, 0.16);
  color: #234a71;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.autopilot-live-indicator.is-production .autopilot-live-indicator-eyebrow {
  color: #8a5b29;
}

.autopilot-live-indicator.is-production .autopilot-live-indicator-title {
  color: #4a2d0d;
}

.autopilot-live-indicator.is-production .autopilot-live-indicator-badge {
  background: rgba(196, 123, 29, 0.16);
  color: #8b5718;
}

.autopilot-live-indicator-copy {
  margin: 0;
  color: #4b647b;
  line-height: 1.6;
}

.autopilot-live-indicator-pending {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #36516b;
  font-size: 0.92rem;
  line-height: 1.5;
}

.autopilot-selected-auth-card {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(52, 87, 118, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.96), rgba(242, 247, 255, 0.92));
}

.autopilot-selected-auth-card.is-production {
  border-color: rgba(191, 145, 62, 0.2);
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.98), rgba(255, 244, 226, 0.92));
}

.autopilot-selected-auth-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.autopilot-selected-auth-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7b6947;
}

.autopilot-selected-auth-title {
  margin: 4px 0 0;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  color: #183047;
}

.autopilot-selected-auth-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(79, 130, 180, 0.14);
  color: #234a71;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.autopilot-selected-auth-card.is-production .autopilot-selected-auth-badge {
  background: rgba(195, 150, 70, 0.16);
  color: #8f6720;
}

.autopilot-selected-auth-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.autopilot-environment-switcher {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.autopilot-environment-option {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.autopilot-environment-option:hover {
  transform: translateY(-1px);
  border-color: rgba(61, 94, 123, 0.18);
  box-shadow: 0 14px 28px rgba(31, 52, 74, 0.08);
}

.autopilot-environment-option.is-active {
  border-color: rgba(61, 94, 123, 0.28);
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.98), rgba(234, 244, 255, 0.92));
  box-shadow: 0 18px 38px rgba(31, 52, 74, 0.12);
}

.autopilot-environment-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.autopilot-environment-option-title {
  font-size: 1rem;
  letter-spacing: -0.03em;
  color: #183047;
}

.autopilot-environment-option-copy {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.autopilot-environment-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.autopilot-environment-card.is-active {
  border-color: rgba(61, 94, 123, 0.22);
  background: linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(240, 247, 255, 0.92));
  box-shadow: 0 18px 42px rgba(31, 52, 74, 0.08);
}

.autopilot-environment-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.autopilot-environment-title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.autopilot-environment-copy {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.autopilot-runtime-auth-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.autopilot-runtime-auth-title {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  color: #17324a;
}

.autopilot-runtime-auth-copy,
.autopilot-runtime-auth-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.autopilot-runtime-auth-note.is-error {
  color: #9b3b31;
}

.autopilot-runtime-auth-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(35, 54, 71, 0.04);
}

.autopilot-runtime-auth-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4b647b;
}

.autopilot-runtime-auth-value {
  font-family: "SFMono-Regular", "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.84rem;
  color: #17324a;
  text-align: right;
  overflow-wrap: anywhere;
}

.autopilot-environment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(35, 54, 71, 0.08);
  color: #4e657b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.autopilot-environment-badge.is-active {
  background: rgba(79, 130, 180, 0.16);
  color: #234a71;
}

.product-match-environment-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-match-environment-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.product-match-environment-title {
  margin: 0;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
  color: #183047;
}

.product-match-environment-details {
  margin-top: 0;
}

.product-match-list-panel {
  margin-top: 0;
}

.product-match-list-summary {
  min-width: 0;
}

.product-match-list-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-match-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.product-match-list-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(35, 54, 71, 0.08);
  color: #4e657b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.product-match-list-tag.is-category {
  background: rgba(121, 185, 255, 0.14);
  color: #28527e;
}

.product-match-list-tag.is-active {
  background: rgba(99, 201, 163, 0.18);
  color: #245441;
}

.product-match-list-tag.is-inactive {
  background: rgba(255, 142, 127, 0.18);
  color: #9b5147;
}

.product-match-list-content {
  gap: 14px;
}

.channels-config-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.routing-config-stack {
  display: grid;
  gap: 18px;
}

.routing-subsection {
  display: grid;
  gap: 14px;
}

.routing-subsection-header {
  display: grid;
  gap: 6px;
}

.routing-subsection-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.channel-config-card,
.channel-route-card,
.channel-route-empty {
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.channel-config-card,
.channel-route-card {
  padding: 16px;
}

.channel-route-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.channel-route-card.is-conflict {
  border-color: rgba(193, 79, 69, 0.35);
  background: rgba(255, 242, 240, 0.92);
}

.channel-config-card-header,
.channel-route-toolbar,
.channel-route-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.channel-route-card-title-wrap {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.channel-route-card-title-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.channel-config-card-fields {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.channel-support-note,
.channel-route-help {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.channel-route-delay-note {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 600;
}

.channel-route-warning {
  min-height: 0;
  margin: 0;
}

.channel-route-toolbar {
  margin-top: 0;
}

.channel-route-list {
  display: grid;
  gap: 12px;
}

.channel-route-grid {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(180px, 1fr));
  align-items: start;
}

.channel-route-field--patterns {
  grid-column: 1 / 2;
  grid-row: 1 / span 2;
}

.channel-route-field--channel {
  grid-column: 2 / 3;
}

.channel-route-field--delay {
  grid-column: 3 / 4;
}

.channel-route-field--notes {
  grid-column: 2 / 4;
}

.channel-route-patterns-input {
  min-height: 118px;
}

.channel-route-settings {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 1fr);
}

.channel-route-setting-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.channel-route-setting-card--compact {
  align-content: start;
}

.channel-route-setting-title {
  color: #35526e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.channel-route-setting-toggle {
  margin: 0;
  color: #183047;
  font-size: 0.94rem;
  font-weight: 600;
}

.channel-route-footer {
  display: grid;
  gap: 10px;
}

.route-help-field {
  align-content: stretch;
}

.route-help-field-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.route-help-field-header .channel-route-setting-title {
  margin-top: 0;
}

.channel-route-help {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(35, 54, 71, 0.08);
  border-radius: 14px;
  background: rgba(245, 249, 255, 0.9);
}

.channel-route-empty {
  padding: 18px;
  color: var(--text-muted);
}

.autopilot-config-field {
  display: grid;
  gap: 8px;
  margin: 0;
}

.autopilot-config-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  grid-column: 1 / -1;
}

.etsy-sync-grid {
  margin-top: 10px;
}

.etsy-config-grid {
  margin-top: 10px;
}

.agent-config-grid {
  margin-top: 10px;
}

.ebay-config-grid {
  margin-top: 10px;
}

.ebay-config-checkbox {
  align-self: end;
  min-height: 52px;
}

.ebay-message-subject-field,
.ebay-message-body-field {
  grid-column: 1 / -1;
}

.ebay-message-template-section {
  grid-column: 1 / -1;
}

.ebay-inline-action-field {
  display: grid;
  gap: 8px;
}

.ebay-inline-action-label {
  margin: 0;
}

.ebay-inline-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ebay-inline-action-row .field-input {
  flex: 1 1 auto;
}

.ebay-inline-action-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ebay-reply-check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.ebay-template-help {
  grid-column: 1 / -1;
}

.ebay-auth-grid {
  margin-top: 14px;
}

.agent-config-address-field {
  grid-column: 1 / -1;
}

.agent-config-message-field {
  grid-column: 1 / -1;
}

.etsy-config-forwarding-field {
  grid-column: 1 / span 2;
}

.etsy-config-instructions-field {
  grid-column: 1 / -1;
}

.etsy-sync-resource-field {
  grid-column: 1 / -1;
}

.etsy-sync-checkbox {
  align-self: end;
  min-height: 52px;
}

.template-textarea {
  min-height: 220px;
  resize: vertical;
}

.template-form {
  display: grid;
  gap: 14px;
}

.template-form-section {
  display: grid;
  gap: 12px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(35, 54, 71, 0.08);
}

.template-form-section:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

.email-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.email-order-line-list {
  display: grid;
  gap: 12px;
}

.email-order-row {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.email-order-row-summary {
  display: grid;
  grid-template-columns: 36px minmax(180px, 1.2fr) minmax(220px, 2fr) minmax(140px, auto) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.email-order-expand-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(121, 185, 255, 0.12);
  color: #355a78;
  font-size: 1.1rem;
  font-weight: 800;
}

.email-order-row-primary,
.email-order-row-subject,
.email-order-row-time {
  min-width: 0;
}

.email-order-row-primary {
  font-weight: 800;
}

.email-order-row-subject,
.email-order-row-time {
  color: var(--text-muted);
}

.email-order-row-primary,
.email-order-row-subject,
.email-order-row-time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-order-row-details {
  padding: 0 18px 18px;
  border-top: 1px solid rgba(35, 54, 71, 0.08);
}

.admin-pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .site-header {
    gap: 16px;
    align-items: flex-start;
  }

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

  .admin-toolbar,
  .admin-stats,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .admin-list-toolbar {
    display: grid;
    align-items: start;
  }

  .admin-toolbar {
    display: grid;
    align-items: start;
  }

  .admin-toolbar-actions {
    min-width: 0;
    width: 100%;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .autopilot-config-grid {
    grid-template-columns: 1fr;
  }

  .email-config-section-grid {
    grid-template-columns: 1fr;
  }

  .autopilot-environment-switcher {
    grid-template-columns: 1fr;
  }

  .autopilot-live-indicator-header {
    flex-direction: column;
  }

  .autopilot-live-indicator-badge {
    min-width: 0;
  }

  .autopilot-runtime-auth-row {
    flex-direction: column;
    align-items: start;
  }

  .autopilot-runtime-auth-value {
    text-align: left;
  }

  .product-match-environment-grid {
    grid-template-columns: 1fr;
  }

  .product-match-transfer-actions {
    justify-content: stretch;
  }

  .product-match-transfer-actions .secondary-button {
    flex: 1 1 160px;
  }

  .product-match-search-grid {
    grid-template-columns: 1fr 1fr;
  }

  .product-match-search-field--query {
    grid-column: 1 / -1;
  }

  .product-match-search-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .product-match-search-actions .secondary-button {
    width: 100%;
  }

  .reset-danger-card-header {
    align-items: start;
    flex-direction: column;
  }

  .channels-config-grid,
  .channel-route-grid {
    grid-template-columns: 1fr;
  }

  .channel-route-field--patterns,
  .channel-route-field--channel,
  .channel-route-field--delay,
  .channel-route-field--notes {
    grid-column: auto;
    grid-row: auto;
  }

  .channel-route-settings {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 18px 14px;
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-controls {
    justify-content: stretch;
  }

  .header-auth-button,
  .user-chip,
  .header-link {
    width: 100%;
  }

  .user-chip {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
  }

  .user-chip-action {
    width: 100%;
    justify-content: center;
  }

  .app-card,
  .panel {
    padding: 18px;
    border-radius: 24px;
  }

  .dropzone {
    min-height: 220px;
    padding: 22px 18px;
  }

  .file-preview {
    grid-template-columns: 1fr;
  }

  .auth-dialog {
    padding: 22px;
  }

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

  .admin-menu-bar {
    display: grid;
  }

  .admin-menu-group,
  .admin-nav-link,
  .admin-menu-button {
    width: 100%;
  }

  .admin-nav-link,
  .admin-menu-button {
    justify-content: space-between;
  }

  .admin-menu-dropdown {
    position: static;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
    background: rgba(245, 249, 255, 0.92);
  }

  .order-detail-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .email-order-row-summary {
    grid-template-columns: 32px 1fr;
    align-items: start;
  }

  .email-order-row-summary .order-status-badge,
  .email-order-row-time,
  .email-order-row-subject {
    grid-column: 2;
  }

  .admin-pagination {
    flex-direction: column;
  }

  .channel-config-card-header,
  .channel-route-toolbar,
  .channel-route-card-header {
    flex-direction: column;
  }
}
