:root {
  --bg: #141313;
  --panel: #1f1d1d;
  --text: #f4ece7;
  --muted: #b6aaa3;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #df8f78;
  --accent-strong: #f2b36a;
  --accent-soft: rgba(223, 143, 120, 0.16);
  --ink-blue: #8aa8bf;
  --success: #7dd6aa;
  --warning: #ffd27f;
  --danger: #ff8d8d;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --mobile-overlay-stack-height: 0px;
}

* {
  box-sizing: border-box;
}

/* ── event ripple ── */
.event-ripple {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0.45;
  animation: ripple-expand 1.4s ease-out forwards;
}
@keyframes ripple-expand {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0.45; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

html {
  min-height: 100%;
  background: #111010;
  overflow-x: hidden;
  overscroll-behavior-y: auto;
  /* Note: scroll-padding-bottom retire volontairement. Sur iOS, il provoquait
     un re-scroll du caret a chaque touche dans un textarea jusqu'a ce que le
     champ soit tout en haut. Android/PC non affectes. */
}

html.menu-open-mobile,
body.menu-open-mobile {
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-y: auto;
  -webkit-text-size-adjust: 100%;
  background:
    linear-gradient(160deg, #111010 0%, #1a1412 30%, #201714 50%, #1a1412 70%, #111010 100%);
  background-size: 300% 300%;
  background-attachment: fixed;
  animation: bg-shift 16s ease-in-out infinite;
  color: var(--text);
  font-family: Bahnschrift, "Segoe UI", sans-serif;
}

@keyframes bg-shift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

@media (max-width: 768px) {
  body { animation-duration: 8s; }
}

body.menu-open-mobile {
  overflow: hidden;
}

body.menu-open-mobile .app-shell {
  overflow: hidden;
}

body.mobile-side-drawer-open {
  overflow: hidden;
}

body.mobile-side-drawer-open .app-shell {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 28px;
}

@supports (min-height: 100dvh) {
  body,
  .app-shell {
    min-height: 100dvh;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  padding: calc(18px + env(safe-area-inset-top)) 18px 14px;
  background: rgba(20, 19, 19, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-inline {
  min-width: 0;
}

.app-menu {
  position: relative;
  --menu-panel-shift: 0px;
  --menu-overlay-opacity: 1;
}

.app-menu summary {
  list-style: none;
}

.app-menu summary::-webkit-details-marker {
  display: none;
}

.menu-button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  gap: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.menu-overlay {
  display: none;
}

.mobile-side-drawer-overlay {
  display: none;
}

.menu-edge-swipe-zone {
  display: none;
}

.menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(300px, calc(100vw - 40px));
  height: 100vh;
  z-index: 60;
  padding: calc(22px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(41, 37, 37, 0.98), rgba(20, 18, 18, 0.98));
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(calc(-100% + var(--menu-panel-shift)));
  transition: transform 180ms ease;
  will-change: transform;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.app-menu[open] .menu-overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.38);
  opacity: var(--menu-overlay-opacity);
  transition: opacity 180ms ease;
}

.app-menu[open] .menu-panel {
  transform: translateX(var(--menu-panel-shift));
}

.app-menu.is-menu-swiping .menu-overlay,
.app-menu.is-menu-swiping .menu-panel {
  transition: none;
}

.menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.menu-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid transparent;
  transition: transform 120ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.menu-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.menu-link.is-active {
  background: rgba(223, 143, 120, 0.12);
  border-color: rgba(223, 143, 120, 0.26);
}

.menu-link-disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.menu-link-disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.04);
}

.menu-link-note {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(223, 143, 120, 0.14);
  border: 1px solid rgba(223, 143, 120, 0.28);
  color: var(--accent-strong);
  font-size: 0.78rem;
  line-height: 1;
}

.stock-total-value {
  color: var(--accent-strong);
  font-weight: 700;
}

.menu-link-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  flex: 0 0 18px;
}

.menu-link-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.onboarding-shell {
  display: grid;
  gap: 24px;
}

.onboarding-shell-compact {
  max-width: 860px;
}

.onboarding-grid {
  align-items: stretch;
}

.onboarding-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.onboarding-actions-shell {
  max-width: 760px;
}

.onboarding-choice-panel {
  display: grid;
  justify-items: center;
  padding: 28px;
}

.onboarding-choice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.onboarding-ghost-dashboard {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.14), transparent 42%);
}

.onboarding-ghost-topbar {
  display: flex;
  gap: 10px;
  padding: 18px 18px 0;
}

.onboarding-ghost-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
}

.onboarding-ghost-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  filter: grayscale(1);
  opacity: 0.38;
}

.onboarding-ghost-sidebar,
.onboarding-ghost-card {
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.04);
}

.onboarding-ghost-sidebar {
  min-height: 280px;
}

.onboarding-ghost-content {
  display: grid;
  gap: 16px;
}

.onboarding-ghost-card-large {
  min-height: 92px;
}

.onboarding-ghost-card-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.onboarding-ghost-card-table {
  min-height: 180px;
}

.onboarding-ghost-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  padding: 28px;
  background: linear-gradient(180deg, rgba(20,16,16,0.12), rgba(20,16,16,0.5));
  backdrop-filter: blur(2px);
}

.onboarding-ghost-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.onboarding-join-shell[hidden] {
  display: none !important;
}

.onboarding-join-panel[hidden] {
  display: none !important;
}

.organization-setup-shell {
  display: grid;
  gap: 24px;
}

.organization-setup-preview {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.12), transparent 42%),
    rgba(18, 15, 15, 0.92);
  min-height: 980px;
}

.organization-setup-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 8, 0.42);
  pointer-events: none;
}

.organization-setup-preview-dim {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(1px);
}

.organization-setup-preview-header,
.organization-setup-add-preview {
  position: relative;
  z-index: 1;
  filter: grayscale(1);
  opacity: 0.36;
  pointer-events: none;
}

.organization-setup-preview-header {
  padding: 28px 28px 0;
  margin-bottom: 0;
}

.organization-setup-add-preview {
  padding: 0 28px 28px;
}

.organization-setup-add-panel,
.organization-setup-recent-panel {
  min-height: 100%;
}

.organization-setup-photo-preview {
  min-height: 92px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.organization-setup-recent-card {
  opacity: 0.95;
}

.organization-setup-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  padding: 32px;
}

.organization-setup-card {
  width: min(940px, 100%);
  margin: 0 auto;
  text-align: left;
  background: rgba(24, 20, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.onboarding-org-head {
  margin-bottom: 18px;
}

.onboarding-org-plan-grid {
  margin-top: 10px;
}

.menu-footer {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.menu-company-switch {
  display: grid;
  gap: 8px;
}

.menu-company-switch label {
  color: var(--muted);
  font-size: 0.92rem;
}

.menu-company-switch .select {
  width: 100%;
}

.menu-user-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-user-pill {
  padding: 10px 14px;
}

.menu-logout {
  width: 100%;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark-mini {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
}

.landing-topbar-actions {
  margin-left: auto;
  display: none;
  gap: 10px;
  align-items: center;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-subtitle,
.muted {
  color: var(--muted);
}

.page-shell {
  width: min(1120px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.page-messages .page-shell {
  width: min(1560px, calc(100vw - 28px));
}

.page-landing .topbar {
  background: rgba(16, 15, 15, 0.72);
}

.app-shell-landing {
  padding-bottom: 0;
}

.auth-shell {
  width: min(560px, 100%);
  margin: 36px auto 0;
}

.auth-shell-wide {
  width: min(1080px, 100%);
}

.auth-panel h1 {
  margin-top: 0;
}

.auth-choice-grid {
  display: grid;
  gap: 16px;
  margin: 22px 0;
}

.auth-choice-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
}

.auth-choice-card-active {
  border-color: rgba(223, 143, 120, 0.45);
  box-shadow: 0 18px 34px rgba(0,0,0,0.24);
}

.auth-choice-card-owner {
  background: linear-gradient(180deg, rgba(64, 43, 35, 0.88), rgba(22, 19, 19, 0.96));
}

.auth-choice-card h2 {
  margin: 14px 0 8px;
}

.auth-form-single {
  grid-template-columns: 1fr;
}

.auth-heading {
  margin-bottom: 18px;
}

.plan-grid {
  display: grid;
  gap: 14px;
  margin: 22px 0 8px;
}

.plan-card {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.plan-card:hover {
  transform: translateY(-2px);
}

.plan-card.is-selected {
  border-color: rgba(216, 179, 95, 0.82);
  background: linear-gradient(180deg, rgba(63, 46, 26, 0.92), rgba(25, 20, 18, 0.98));
  box-shadow:
    0 0 0 1px rgba(216, 179, 95, 0.28),
    0 18px 36px rgba(0, 0, 0, 0.22);
}

.plan-card-owner {
  background: linear-gradient(180deg, rgba(54, 38, 34, 0.86), rgba(20, 19, 19, 0.96));
}

.plan-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.plan-top h2 {
  margin: 12px 0 0;
}

.plan-price {
  font-weight: 800;
  color: var(--accent-strong);
  white-space: nowrap;
}

.plan-limit {
  margin: 10px 0 14px;
}

.plan-features,
.checkout-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-chip {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.88rem;
}

.checkout-panel {
  position: relative;
  overflow: hidden;
}

.checkout-panel::after {
  content: "";
  position: absolute;
  inset: auto -8% -38% 20%;
  height: 220px;
  background: radial-gradient(circle, rgba(242,179,106,0.18), transparent 60%);
  pointer-events: none;
}

.checkout-summary {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  margin: 20px 0;
}

.checkout-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.checkout-payment-box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(140deg, rgba(36,20,17,0.95), rgba(75,47,39,0.88));
  border: 1px solid rgba(255,255,255,0.08);
}

.checkout-card-visual {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(242,179,106,0.92), rgba(223,143,120,0.9));
  color: #231411;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.auth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
}

.auth-separator::before,
.auth-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.google-signin-block {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-top: 8px;
}

.auth-native-google-button {
  width: min(100%, 320px);
  justify-content: center;
}

.auth-plan-panel,
.auth-register-panel {
  padding: 28px;
}

.auth-plan-head,
.auth-register-head {
  display: grid;
  gap: 12px;
}

.auth-plan-head h1,
.auth-register-head h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.94;
  max-width: 12ch;
}

.auth-plan-grid {
  margin-top: 24px;
}

.auth-plan-card {
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 22px;
}

.auth-plan-card-classic {
  background: linear-gradient(180deg, rgba(58, 40, 34, 0.98), rgba(26, 21, 21, 0.98));
  border-color: rgba(223, 143, 120, 0.22);
}

.auth-plan-card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.auth-plan-card-top h2 {
  margin: 12px 0 0;
}

.auth-plan-price {
  font-weight: 900;
  color: var(--accent-strong);
  white-space: nowrap;
  font-size: 1.05rem;
}

.auth-plan-lead {
  margin: 0;
  line-height: 1.55;
}

.auth-plan-inline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-plan-inline-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
}

.auth-plan-card-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-strong);
  font-weight: 800;
}

.auth-plan-foot {
  margin-top: 26px;
}

.auth-register-summary,
.auth-register-methods,
.auth-company-prep {
  margin-top: 22px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.auth-back-link {
  color: var(--muted);
  text-decoration: none;
}

.auth-back-link:hover {
  color: var(--text);
}

.auth-register-summary {
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

.auth-register-summary-box {
  display: grid;
  gap: 12px;
  width: min(680px, 100%);
  padding: 18px 20px 20px;
  background:
    linear-gradient(180deg, rgba(84, 56, 45, 0.96), rgba(43, 32, 30, 0.98));
  border: 1px solid rgba(223, 143, 120, 0.4);
  border-left: 5px solid var(--accent);
  border-radius: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.2);
}

.auth-register-summary-label {
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-register-summary-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 1.16rem;
}

.auth-register-summary-main strong {
  font-size: 1.22rem;
}

.auth-register-summary-main span:last-child {
  color: var(--accent-strong);
  font-weight: 900;
  font-size: 1.05rem;
}

.auth-register-summary-sub {
  color: var(--muted);
  font-weight: 700;
}

.auth-register-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-company-prep {
  display: grid;
  gap: 8px;
}

.auth-company-prep-standalone {
  margin-top: 18px;
}

.auth-register-methods {
  display: grid;
  gap: 18px;
}

.auth-register-methods-top {
  display: grid;
  gap: 8px;
}

.auth-register-methods-top h2 {
  margin: 0;
}

.auth-social-panel {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.auth-social-panel-box {
  padding: 16px;
  border-radius: 20px;
  background: rgba(14, 12, 12, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-social-note {
  margin: 0;
  text-align: center;
}

.auth-separator-tight {
  margin: 2px 0;
}

.auth-register-form {
  margin-top: 4px;
}

.auth-register-actions {
  justify-content: flex-start;
}

.auth-register-login-line {
  margin-top: 2px;
}

.auth-switch-line a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.auth-switch-line-center {
  text-align: center;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-header p,
.back-link {
  margin: 6px 0 0;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-link::before {
  content: "\2190";
  color: var(--text);
  font-weight: 800;
  line-height: 1;
}

.back-link-strong {
  margin: 0 0 10px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
}

.back-link-strong:hover {
  background: rgba(255, 255, 255, 0.08);
}

.notice-banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: #ffdada;
  border: 1px solid rgba(239, 154, 154, 0.28);
}

.confirm-modal {
  position: fixed;
  inset: 0;
  /* 9998 = au-dessus du FAB .assistant-fab (z-index 9997). Sans ca, sur
     mobile (<= 500px) le modal glisse en bas et son bouton d'action passe
     sous le FAB Agent IA, impossible a cliquer. Bug observe sur l'echec
     enrichissement de la page /add. */
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 20px;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(7, 6, 6, 0.68);
  backdrop-filter: blur(10px);
}

.confirm-modal-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(28, 24, 24, 0.98), rgba(18, 15, 15, 0.98));
  border: 1px solid rgba(223, 143, 120, 0.24);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.confirm-modal-copy {
  display: grid;
  gap: 10px;
}

.confirm-modal-copy strong {
  font-size: 1.12rem;
}

.confirm-modal-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.confirm-modal-open {
  overflow: hidden;
}

.stock-image-source-modal[hidden] {
  display: none !important;
}

.stock-image-source-modal {
  position: fixed;
  inset: 0;
  z-index: 145;
  display: grid;
  place-items: center;
  padding: 24px;
}

.stock-image-source-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(8, 6, 6, 0.68);
  backdrop-filter: blur(14px);
}

.stock-image-source-card {
  position: relative;
  z-index: 1;
  width: min(430px, calc(100vw - 28px));
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(44, 40, 40, 0.98), rgba(25, 22, 22, 0.98));
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 16px;
}

.stock-image-source-copy {
  display: grid;
  gap: 6px;
}

.stock-image-source-copy strong {
  font-size: 1.08rem;
}

.stock-image-source-copy p {
  margin: 0;
  color: var(--muted);
}

.stock-image-source-actions {
  display: grid;
  gap: 10px;
}

.stock-image-source-modal-open {
  overflow: hidden;
}

.toolbar,
.jobs-toolbar,
.inline-form,
.form-actions,
.review-actions,
.marketplace-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar,
.panel,
.form-panel,
.detail-photo-card {
  background: linear-gradient(180deg, rgba(40, 36, 36, 0.94), rgba(24, 22, 22, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.toolbar,
.panel,
.form-panel {
  padding: 16px;
  margin-bottom: 18px;
}

.toolbar-image-search {
  align-items: end;
}

.toolbar-image-field {
  min-width: min(320px, 100%);
  flex: 1 1 320px;
}

.page-header-compact {
  margin-bottom: 14px;
}

.asset-viewer-panel {
  min-height: calc(100vh - 220px);
  display: grid;
  align-items: stretch;
}

.asset-viewer-frame {
  width: 100%;
  min-height: calc(100vh - 280px);
  border: 0;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
}

.asset-viewer-image-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 320px);
  padding: 12px;
}

.asset-viewer-image {
  max-width: min(100%, 520px);
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  background: #fff;
}

.stock-toolbar {
  align-items: stretch;
}

.stock-appear-surface {
  animation: stockSurfaceReveal 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stock-appear-list .stock-appear-card {
  animation: stockCardReveal 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stock-appear-list .stock-appear-card:nth-child(1) { animation-delay: 30ms; }
.stock-appear-list .stock-appear-card:nth-child(2) { animation-delay: 55ms; }
.stock-appear-list .stock-appear-card:nth-child(3) { animation-delay: 80ms; }
.stock-appear-list .stock-appear-card:nth-child(4) { animation-delay: 105ms; }
.stock-appear-list .stock-appear-card:nth-child(5) { animation-delay: 130ms; }
.stock-appear-list .stock-appear-card:nth-child(6) { animation-delay: 155ms; }
.stock-appear-list .stock-appear-card:nth-child(7) { animation-delay: 180ms; }
.stock-appear-list .stock-appear-card:nth-child(8) { animation-delay: 205ms; }
.stock-appear-list .stock-appear-card:nth-child(9) { animation-delay: 230ms; }
.stock-appear-list .stock-appear-card:nth-child(10) { animation-delay: 255ms; }
.stock-appear-list .stock-appear-card:nth-child(11) { animation-delay: 280ms; }
.stock-appear-list .stock-appear-card:nth-child(12) { animation-delay: 305ms; }

.app-shell:not(.app-shell-landing) .page-shell > *:not(.stock-appear-surface):not(.stock-appear-list) {
  animation: stockSurfaceReveal 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-shell:not(.app-shell-landing) .page-shell > *:nth-child(1):not(.stock-appear-surface):not(.stock-appear-list) { animation-delay: 25ms; }
.app-shell:not(.app-shell-landing) .page-shell > *:nth-child(2):not(.stock-appear-surface):not(.stock-appear-list) { animation-delay: 55ms; }
.app-shell:not(.app-shell-landing) .page-shell > *:nth-child(3):not(.stock-appear-surface):not(.stock-appear-list) { animation-delay: 85ms; }
.app-shell:not(.app-shell-landing) .page-shell > *:nth-child(4):not(.stock-appear-surface):not(.stock-appear-list) { animation-delay: 115ms; }
.app-shell:not(.app-shell-landing) .page-shell > *:nth-child(5):not(.stock-appear-surface):not(.stock-appear-list) { animation-delay: 145ms; }
.app-shell:not(.app-shell-landing) .page-shell > *:nth-child(6):not(.stock-appear-surface):not(.stock-appear-list) { animation-delay: 175ms; }
.app-shell:not(.app-shell-landing) .page-shell > *:nth-child(7):not(.stock-appear-surface):not(.stock-appear-list) { animation-delay: 205ms; }
.app-shell:not(.app-shell-landing) .page-shell > *:nth-child(8):not(.stock-appear-surface):not(.stock-appear-list) { animation-delay: 235ms; }

.detail-grid > *,
.settings-grid > *,
.settings-home-grid > *,
.messages-layout-v3 > *,
.pricing-item-list > *,
.review-list > * {
  animation: stockCardReveal 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.detail-grid > :nth-child(1),
.settings-grid > :nth-child(1),
.settings-home-grid > :nth-child(1),
.messages-layout-v3 > :nth-child(1),
.pricing-item-list > :nth-child(1),
.review-list > :nth-child(1) { animation-delay: 30ms; }

.detail-grid > :nth-child(2),
.settings-grid > :nth-child(2),
.settings-home-grid > :nth-child(2),
.messages-layout-v3 > :nth-child(2),
.pricing-item-list > :nth-child(2),
.review-list > :nth-child(2) { animation-delay: 60ms; }

.detail-grid > :nth-child(3),
.settings-grid > :nth-child(3),
.settings-home-grid > :nth-child(3),
.messages-layout-v3 > :nth-child(3),
.pricing-item-list > :nth-child(3),
.review-list > :nth-child(3) { animation-delay: 90ms; }

.detail-grid > :nth-child(4),
.settings-grid > :nth-child(4),
.settings-home-grid > :nth-child(4),
.messages-layout-v3 > :nth-child(4),
.pricing-item-list > :nth-child(4),
.review-list > :nth-child(4) { animation-delay: 120ms; }

.detail-grid > :nth-child(5),
.settings-grid > :nth-child(5),
.settings-home-grid > :nth-child(5),
.messages-layout-v3 > :nth-child(5),
.pricing-item-list > :nth-child(5),
.review-list > :nth-child(5) { animation-delay: 150ms; }

.detail-grid > :nth-child(6),
.settings-grid > :nth-child(6),
.settings-home-grid > :nth-child(6),
.messages-layout-v3 > :nth-child(6),
.pricing-item-list > :nth-child(6),
.review-list > :nth-child(6) { animation-delay: 180ms; }

@keyframes stockSurfaceReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stockCardReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.988);
    filter: saturate(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell:not(.app-shell-landing) .page-shell > *,
  .detail-grid > *,
  .settings-grid > *,
  .settings-home-grid > *,
  .messages-layout-v3 > *,
  .pricing-item-list > *,
  .review-list > *,
  .stock-appear-surface,
  .stock-appear-list .stock-appear-card {
    animation: none;
  }
}

.stock-toolbar > .input,
.stock-toolbar > .button {
  flex: 1 1 170px;
}

.stock-toolbar > .button {
  flex: 0 0 auto;
}

.stock-filters-drawer {
  flex: 1 1 100%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.stock-filters-drawer summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stock-filters-drawer summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.stock-filters-drawer[open] summary::before {
  transform: rotate(45deg);
}

.stock-filters-drawer summary::-webkit-details-marker {
  display: none;
}

.stock-filters-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 1.1rem 1.1rem;
}

.stock-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.stock-filter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.stock-filter-block--select .select {
  padding: 8px 28px 8px 12px;
  font-size: 0.85rem;
  min-height: 36px;
  height: 36px;
  width: auto;
  border-radius: 10px;
}

.stock-filter-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stock-filter-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stock-filter-pill {
  position: relative;
  display: inline-flex;
}

.stock-filter-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stock-filter-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.stock-filter-pill span:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.stock-filter-pill input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

/* --- Review filter pills --- */
.review-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
}

.review-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-filter-title {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.review-filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.review-filter-pill:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.review-filter-pill.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.12), 0 0 12px var(--accent-soft);
}

/* --- Review status pill colors --- */
.review-status-pill[data-status="open"] {
  border-color: rgba(255, 180, 50, 0.25);
  color: #ffb432;
}
.review-status-pill[data-status="open"].is-active {
  border-color: rgba(255, 180, 50, 0.5);
  background: rgba(255, 180, 50, 0.12);
  color: #ffb432;
  box-shadow: inset 0 0 0 1.5px rgba(255, 180, 50, 0.25), 0 0 14px rgba(255, 180, 50, 0.18);
}

.review-status-pill[data-status="resolved"] {
  border-color: rgba(125, 214, 170, 0.25);
  color: #7dd6aa;
}
.review-status-pill[data-status="resolved"].is-active {
  border-color: rgba(125, 214, 170, 0.5);
  background: rgba(125, 214, 170, 0.12);
  color: #7dd6aa;
  box-shadow: inset 0 0 0 1.5px rgba(125, 214, 170, 0.25), 0 0 14px rgba(125, 214, 170, 0.18);
}

.review-status-pill[data-status="ignored"] {
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-style: italic;
}
.review-status-pill[data-status="ignored"].is-active {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-style: italic;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.12), 0 0 14px rgba(255, 255, 255, 0.08);
}

/* --- Marketplace pill colors --- */
.stock-mp-pill[data-mp="amazon"] span {
  border-color: rgba(255, 153, 0, 0.25);
  color: #ff9900;
}
.stock-mp-pill[data-mp="amazon"]:hover span,
.stock-mp-pill[data-mp="amazon"] input:checked + span {
  border-color: rgba(255, 153, 0, 0.5);
  background: rgba(255, 153, 0, 0.12);
  color: #ff9900;
}

.stock-mp-pill[data-mp="rakuten"] span {
  border-color: rgba(191, 0, 48, 0.25);
  color: #e8365d;
}
.stock-mp-pill[data-mp="rakuten"]:hover span,
.stock-mp-pill[data-mp="rakuten"] input:checked + span {
  border-color: rgba(191, 0, 48, 0.5);
  background: rgba(191, 0, 48, 0.12);
  color: #e8365d;
}

.stock-mp-pill[data-mp="ebay"] span {
  border-color: rgba(72, 133, 237, 0.25);
  color: #4885ed;
}
.stock-mp-pill[data-mp="ebay"]:hover span,
.stock-mp-pill[data-mp="ebay"] input:checked + span {
  border-color: rgba(72, 133, 237, 0.5);
  background: rgba(72, 133, 237, 0.12);
  color: #4885ed;
}

.stock-mp-pill[data-mp="lbc"] span {
  border-color: rgba(236, 111, 45, 0.25);
  color: #ec6f2d;
}
.stock-mp-pill[data-mp="lbc"]:hover span,
.stock-mp-pill[data-mp="lbc"] input:checked + span {
  border-color: rgba(236, 111, 45, 0.5);
  background: rgba(236, 111, 45, 0.12);
  color: #ec6f2d;
}

/* --- Condition pill colors (best→worst: green→orange) --- */
.stock-condition-pill[data-condition="neuf"] span {
  border-color: rgba(125, 214, 170, 0.25);
  color: #7dd6aa;
}
.stock-condition-pill[data-condition="neuf"]:hover span,
.stock-condition-pill[data-condition="neuf"] input:checked + span {
  border-color: rgba(125, 214, 170, 0.5);
  background: rgba(125, 214, 170, 0.12);
  color: #7dd6aa;
}

.stock-condition-pill[data-condition="comme neuf"] span {
  border-color: rgba(160, 210, 160, 0.25);
  color: #a0d2a0;
}
.stock-condition-pill[data-condition="comme neuf"]:hover span,
.stock-condition-pill[data-condition="comme neuf"] input:checked + span {
  border-color: rgba(160, 210, 160, 0.5);
  background: rgba(160, 210, 160, 0.12);
  color: #a0d2a0;
}

.stock-condition-pill[data-condition="tres bon etat"] span {
  border-color: rgba(138, 168, 191, 0.25);
  color: var(--ink-blue);
}
.stock-condition-pill[data-condition="tres bon etat"]:hover span,
.stock-condition-pill[data-condition="tres bon etat"] input:checked + span {
  border-color: rgba(138, 168, 191, 0.5);
  background: rgba(138, 168, 191, 0.12);
  color: var(--ink-blue);
}

.stock-condition-pill[data-condition="bon etat"] span {
  border-color: rgba(255, 210, 127, 0.25);
  color: #ffd27f;
}
.stock-condition-pill[data-condition="bon etat"]:hover span,
.stock-condition-pill[data-condition="bon etat"] input:checked + span {
  border-color: rgba(255, 210, 127, 0.5);
  background: rgba(255, 210, 127, 0.12);
  color: #ffd27f;
}

.stock-condition-pill[data-condition="etat correct"] span {
  border-color: rgba(223, 143, 120, 0.25);
  color: var(--accent);
}
.stock-condition-pill[data-condition="etat correct"]:hover span,
.stock-condition-pill[data-condition="etat correct"] input:checked + span {
  border-color: rgba(223, 143, 120, 0.5);
  background: rgba(223, 143, 120, 0.12);
  color: var(--accent);
}

.stock-condition-pill[data-condition="__missing__"] span {
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-style: italic;
}
.stock-condition-pill[data-condition="__missing__"]:hover span,
.stock-condition-pill[data-condition="__missing__"] input:checked + span {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.stock-filter-range {
  display: flex;
  gap: 8px;
}

.stock-filter-range .input {
  width: 110px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.stock-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 100%;
}

.stock-toolbar-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  align-items: center;
}

.stock-sort-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px; font-size: 0.82rem;
}
.stock-sort-label { color: var(--muted); }
.stock-sort-btn {
  padding: 3px 10px; border-radius: 6px;
  color: var(--muted); text-decoration: none;
  border: 1px solid transparent; transition: all 0.15s;
}
.stock-sort-btn:hover { color: var(--text); border-color: var(--border); }
.stock-sort-btn--active {
  color: var(--text); border-color: var(--accent);
  background: rgba(255,255,255,0.05); font-weight: 600;
}

.stock-selection-toolbar {
  position: fixed;
  top: calc(74px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 10009;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  width: auto;
  max-width: 1280px;
  margin: 0 auto;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.stock-selection-toolbar[hidden] {
  display: none !important;
}

.stock-selection-summary {
  display: grid;
  gap: 6px;
}

.stock-selection-summary strong,
.stock-selection-summary p {
  margin: 0;
}

.stock-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.stock-selection-actions form {
  margin: 0;
}

.stock-search-shell {
  flex: 1 1 420px;
  min-width: 260px;
  position: relative;
}

.stock-search-actions {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.stock-toolbar-help {
  flex: 1 1 100%;
  margin-top: -4px;
}

.stock-search-input {
  width: 100%;
  padding-right: 6.8rem;
}

.stock-image-button {
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.stock-image-button:hover {
  transform: scale(1.04);
  border-color: rgba(223, 143, 120, 0.35);
  background: rgba(223, 143, 120, 0.1);
}

.stock-image-button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.stock-appear-card {
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.stock-appear-card.is-selected {
  border-color: rgba(223, 143, 120, 0.42);
  background: linear-gradient(180deg, rgba(49, 35, 31, 0.88), rgba(27, 22, 21, 0.94));
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.2);
}

.stock-appear-card.is-selected .item-card-title {
  color: #ffd9ca;
}

.stock-image-button.is-loading {
  pointer-events: none;
}

.stock-image-button.is-loading svg {
  opacity: 0.2;
}

.stock-image-button.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-top-color: rgba(255, 255, 255, 0.95);
  animation: spinnerTurn 0.8s linear infinite;
}

.stock-search-icon-button {
  position: relative;
}

.stock-image-loading[hidden] {
  display: none;
}

.stock-image-loading {
  position: sticky;
  top: 14px;
  z-index: 18;
  margin: -2px 0 14px;
  animation: stockSurfaceReveal 180ms ease both;
}

.stock-image-loading-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(223, 143, 120, 0.2);
  background: linear-gradient(180deg, rgba(42, 34, 31, 0.96), rgba(25, 22, 21, 0.98));
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.16);
}

.stock-image-loading-card strong {
  display: block;
  margin-bottom: 3px;
}

.stock-image-loading-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stock-image-loading-spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  animation: spinnerTurn 0.8s linear infinite;
}

.stock-image-hint {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

.image-search-summary {
  display: grid;
  gap: 16px;
}

.image-search-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.image-search-head h2 {
  margin: 0 0 6px;
}

.image-search-preview {
  width: min(220px, 100%);
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 12, 12, 0.72);
}

.image-search-preview img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.field {
  display: grid;
  gap: 8px;
}

.field[hidden] {
  display: none !important;
}

.landing-hero {
  display: grid;
  gap: 24px;
  align-items: stretch;
  padding-top: 18px;
  perspective: 1200px;
}

.landing-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.95;
  max-width: 12ch;
}

.landing-lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.landing-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 28px;
}

.landing-proof,
.feature-grid,
.landing-columns {
  display: grid;
  gap: 14px;
}

.page-landing .page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(242,179,106,0.10), transparent 18%),
    radial-gradient(circle at 82% 24%, rgba(138,168,191,0.10), transparent 20%),
    radial-gradient(circle at 52% 74%, rgba(223,143,120,0.08), transparent 22%);
  animation: backgroundDrift 16s ease-in-out infinite;
}

.reveal-card {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition:
    opacity 520ms ease,
    transform 620ms cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.proof-item,
.feature-card,
.landing-panel,
.hero-panel {
  background: linear-gradient(180deg, rgba(37, 32, 31, 0.94), rgba(18, 17, 17, 0.98));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.proof-item,
.feature-card {
  padding: 16px;
}

.proof-item strong,
.feature-card strong {
  display: block;
  margin-bottom: 8px;
}

.proof-item span,
.feature-card p {
  color: var(--muted);
  margin: 0;
}

.landing-visual {
  display: grid;
  gap: 14px;
}

.hero-panel {
  padding: 18px;
}

.hero-panel-primary {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 180ms ease;
}

.hero-panel-primary::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% 25%;
  height: 220px;
  background: radial-gradient(circle, rgba(242,179,106,0.18), transparent 62%);
  pointer-events: none;
  animation: heroPulse 7s ease-in-out infinite;
}

.hero-panel-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.05) 24%, transparent 48%);
  transform: translateX(-120%);
  animation: scanSweep 8.5s ease-in-out infinite;
  pointer-events: none;
}

.hero-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  overflow: hidden;
}

.hero-logo-art {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 10px 26px rgba(223, 143, 120, 0.22));
}

.hero-rail {
  display: grid;
  gap: 14px;
  position: relative;
}

.hero-rail::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, rgba(242,179,106,0.65), rgba(138,168,191,0.2));
  opacity: 0.6;
}

.hero-rail-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
}

.hero-rail-step p {
  margin: 6px 0 0;
  color: var(--muted);
}

.rail-index {
  width: 52px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.feature-card-accent {
  background:
    linear-gradient(180deg, rgba(64, 43, 35, 0.96), rgba(25, 20, 19, 0.98));
}

@keyframes backgroundDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -1.5%, 0) scale(1.02);
  }
}

@keyframes heroPulse {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate3d(-2%, -4%, 0) scale(1.08);
    opacity: 1;
  }
}

@keyframes scanSweep {
  0%, 100% {
    transform: translateX(-120%);
    opacity: 0;
  }
  15% {
    opacity: 0.15;
  }
  55% {
    transform: translateX(120%);
    opacity: 0.22;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

.landing-section {
  margin-top: 44px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  max-width: 18ch;
  margin: 14px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1.02;
}

.landing-columns-narrow .landing-panel h3 {
  margin-top: 0;
}

.landing-hero-v2 {
  position: relative;
  display: grid;
  gap: 30px;
  align-items: center;
  min-height: calc(100vh - 124px);
  padding: 24px 0 18px;
}

.landing-hero-v2::before,
.landing-hero-v2::after {
  content: "";
  position: absolute;
  pointer-events: none;
  filter: blur(26px);
}

.landing-hero-v2::before {
  top: 4%;
  left: -4%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(223,143,120,0.22), transparent 68%);
  animation: floatBlob 12s ease-in-out infinite;
}

.landing-hero-v2::after {
  right: 2%;
  bottom: 8%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(138,168,191,0.18), transparent 70%);
  animation: floatBlob 15s ease-in-out infinite reverse;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  margin: 16px 0 14px;
  font-size: clamp(3rem, 6vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  max-width: 11ch;
}

.hero-lead {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ink-blue);
  box-shadow: 0 0 0 0 rgba(138,168,191,0.3);
}

.signal-dot-live {
  background: var(--success);
  animation: pulseDot 2.4s ease-out infinite;
}

.signal-dot-alert {
  background: var(--accent-strong);
  animation: pulseDotWarm 2.7s ease-out infinite;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(29, 25, 24, 0.96), rgba(15, 14, 14, 0.98)),
    radial-gradient(circle at top, rgba(255,255,255,0.03), transparent 45%);
  box-shadow: 0 30px 70px rgba(0,0,0,0.34);
}

.hero-grid-glow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,1), rgba(0,0,0,0.1));
  opacity: 0.22;
}

.stage-panel {
  position: absolute;
  z-index: 2;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(47, 39, 37, 0.94), rgba(21, 18, 18, 0.96));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 22px 40px rgba(0,0,0,0.26);
  backdrop-filter: blur(10px);
}

.mini-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-item-card {
  top: 44px;
  left: 30px;
  width: 230px;
  padding: 16px;
  animation: panelFloat 6.5s ease-in-out infinite;
}

.hero-item-top {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.hero-item-top p {
  margin: 6px 0 0;
  color: var(--muted);
}

.hero-item-thumb {
  width: 62px;
  height: 74px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(242,179,106,0.95), rgba(223,143,120,0.78)),
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.hero-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-item-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-hub {
  top: 160px;
  left: 286px;
  width: 206px;
  padding: 18px;
  text-align: center;
  animation: panelFloat 7.8s ease-in-out infinite 0.8s;
}

.hero-hub-logo {
  width: 76px;
  height: 76px;
  margin: 18px auto 14px;
}

.hero-hub-stack {
  display: grid;
  gap: 10px;
}

.hub-stack-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stack-chip {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.8rem;
}

.stack-chip-accent {
  color: var(--accent-strong);
  border-color: rgba(242,179,106,0.22);
}

.hero-jobs {
  right: 26px;
  top: 64px;
  width: 244px;
  padding: 16px;
  animation: panelFloat 8.4s ease-in-out infinite 1.2s;
}

.job-pulse-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 14px;
}

.job-pulse-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

.job-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--ink-blue);
  box-shadow: 0 0 0 0 rgba(138,168,191,0.25);
}

.job-dot-live {
  background: var(--success);
  animation: pulseDot 2.4s ease-out infinite;
}

.job-dot-alert {
  background: var(--accent-strong);
  animation: pulseDotWarm 2.7s ease-out infinite;
}

.pricing-overview,
.pricing-layout {
  display: grid;
  gap: 18px;
}

.pricing-page-stack {
  display: grid;
  gap: 18px;
}

.mobile-split-shell {
  min-width: 0;
}

.mobile-split-track {
  min-width: 0;
}

.mobile-split-main-stack {
  display: grid;
  gap: 18px;
}

.pricing-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.pricing-hub-card {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 100%;
}

.pricing-hub-card-primary {
  background:
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(40, 36, 36, 0.94), rgba(24, 22, 22, 0.96));
}

.pricing-hub-step {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(223, 143, 120, 0.14);
  border: 1px solid rgba(223, 143, 120, 0.28);
  color: var(--accent-strong);
  font-weight: 800;
}

.pricing-hub-copy h2 {
  margin: 8px 0 8px;
}

.pricing-hub-copy p,
.pricing-hub-note p {
  margin: 0;
}

.pricing-hub-meta,
.pricing-hub-actions,
.pricing-strip-actions,
.pricing-empty-focus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pricing-hub-note {
  display: grid;
  gap: 8px;
}

.pricing-hub-note strong {
  font-size: 1rem;
}

.pricing-strip-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.pricing-strip-card strong {
  display: block;
  margin-bottom: 6px;
}

.pricing-strip-card p {
  margin: 0;
}

.pricing-threshold-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.pricing-threshold-form .field {
  min-width: 180px;
}

.pricing-empty-focus {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(223, 143, 120, 0.24);
  background:
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.08), transparent 34%),
    rgba(255,255,255,0.03);
}

.pricing-empty-focus strong {
  font-size: 1.08rem;
}

.pricing-list-card,
.pricing-jobs-panel {
  display: grid;
  gap: 14px;
}

.pricing-control-deck {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.pricing-home-grid,
.pricing-home-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.pricing-home-card,
.pricing-home-summary-card {
  display: grid;
  gap: 16px;
}

.pricing-home-card-primary {
  background:
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(40, 36, 36, 0.94), rgba(24, 22, 22, 0.96));
}

.pricing-home-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.pricing-home-card-head h2 {
  margin: 10px 0 6px;
}

.pricing-home-stats,
.pricing-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pricing-home-flow-list {
  display: grid;
  gap: 12px;
}

.pricing-home-flow-step {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.pricing-home-flow-step p,
.pricing-home-flow-step strong {
  margin: 0;
}

.pricing-home-flow-step p {
  margin-top: 6px;
}

.pricing-control-card {
  display: grid;
  gap: 16px;
}

.pricing-control-card-primary {
  background:
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(40, 36, 36, 0.94), rgba(24, 22, 22, 0.96));
}

.pricing-control-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.pricing-control-head h2 {
  margin: 10px 0 6px;
}

.pricing-control-stats,
.pricing-marketplaces-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pricing-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pricing-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.pricing-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.pricing-section-head h2 {
  margin: 0 0 6px;
}

.pricing-workspace-shell {
  position: relative;
  display: grid;
  gap: 18px;
}

.pricing-workspace-shell-locked .toolbar,
.pricing-workspace-shell-locked .pricing-bulk-toolbar,
.pricing-workspace-shell-locked .pricing-items-panel {
  opacity: 0.28;
  filter: grayscale(0.1);
  pointer-events: none;
}

.pricing-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 20px;
}

.pricing-lock-card {
  width: min(440px, 100%);
  display: grid;
  gap: 12px;
  text-align: center;
  padding: 24px;
  border-radius: 24px;
  background: rgba(22, 18, 18, 0.94);
  border: 1px solid rgba(223, 143, 120, 0.28);
  box-shadow: var(--shadow);
}

.pricing-lock-card strong {
  font-size: 1.18rem;
}

.pricing-bulk-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.pricing-bulk-actions,
.pricing-selection-submit {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pricing-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.pricing-summary-head h2,
.pricing-jobs-panel h2 {
  margin-top: 0;
}

.pricing-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.pricing-rule-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pricing-warning {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(242, 179, 106, 0.12);
  border: 1px solid rgba(242, 179, 106, 0.24);
  color: var(--text);
}

  .pricing-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    align-items: start;
  }

  .pricing-layout.mobile-split-shell > .mobile-split-track {
    display: contents;
  }

  .pricing-origin-mobile-split.mobile-split-shell > .mobile-split-track {
    display: contents;
  }

.pricing-item-list {
  display: grid;
  gap: 14px;
}

.pricing-item-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.pricing-item-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.pricing-item-media {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.pricing-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pricing-item-copy {
  min-width: 0;
}

.pricing-item-copy strong {
  display: block;
  font-size: 1rem;
}

.pricing-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pricing-item-check {
  display: grid;
  place-items: center;
}

.pricing-item-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
}

.pricing-item-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.pricing-item-list-compact {
  gap: 12px;
}

.pricing-item-row-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.pricing-item-side-compact {
  min-width: 96px;
}

.pricing-repricing-panel {
  display: grid;
  gap: 14px;
}

.pricing-repricing-list {
  display: grid;
  gap: 14px;
}

.pricing-repricing-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.pricing-repricing-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
}

.pricing-repricing-controls {
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.pricing-control-deck-single {
  grid-template-columns: 1fr;
}

.pricing-inline-note {
  margin-top: 10px;
  color: var(--warning);
  font-size: 0.92rem;
}

.pricing-repricing-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.pricing-repricing-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pricing-repricing-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, 120px) auto;
  gap: 10px;
  align-items: center;
}

.pricing-settings-intro {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.pricing-repricing-details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.pricing-repricing-details[open] summary {
  color: var(--text);
}

@media (max-width: 980px) {
  .stock-selection-toolbar {
    top: calc(10px + env(safe-area-inset-top));
    left: 10px;
    right: 10px;
  }

  .stock-selection-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .stock-selection-actions {
    justify-content: flex-start;
  }

  .pricing-hub-grid,
  .pricing-home-grid,
  .pricing-home-summary-grid,
  .pricing-control-deck {
    grid-template-columns: 1fr;
  }

  .pricing-strip-card {
    flex-direction: column;
    align-items: start;
  }

  .pricing-section-head {
    align-items: start;
    flex-direction: column;
  }

  .pricing-bulk-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pricing-bulk-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .pricing-layout {
    grid-template-columns: 1fr;
  }

  .pricing-item-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .pricing-item-side {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .pricing-item-check {
    place-items: start;
    padding-top: 6px;
  }

  .pricing-item-main {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
  }

  .pricing-item-copy strong {
    overflow-wrap: anywhere;
  }

  .pricing-item-side .button {
    width: 100%;
  }

  .pricing-repricing-row {
    grid-template-columns: 1fr;
  }

  .pricing-repricing-main {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .pricing-home-card-head {
    flex-direction: column;
    align-items: start;
  }

  .pricing-repricing-form {
    grid-template-columns: 1fr;
  }
}

.marketplace-orbit {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.orbit-badge {
  position: absolute;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.22);
}

.orbit-amazon { top: 70px; right: 84px; animation: orbitBob 7.2s ease-in-out infinite; }
.orbit-rakuten { top: 220px; right: 94px; animation: orbitBob 7.8s ease-in-out infinite 0.6s; }
.orbit-ebay { top: 360px; right: 84px; animation: orbitBob 8.1s ease-in-out infinite 1s; }
.orbit-lbc { top: 300px; left: 70px; animation: orbitBob 7.4s ease-in-out infinite 0.4s; }

.hero-flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.flow-line {
  fill: none;
  stroke: rgba(242,179,106,0.72);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 12 14;
  animation: flowDash 14s linear infinite;
}

.flow-line-secondary {
  stroke: rgba(138,168,191,0.6);
  animation-duration: 18s;
}

.landing-flow-section .section-heading h2,
.integrations-section .section-heading h2,
.product-stage-section .section-heading h2,
.audience-section .section-heading h2,
.contrast-section .section-heading h2 {
  max-width: 20ch;
}

.pipeline-board {
  position: relative;
  display: grid;
  gap: 14px;
}

.pipeline-board::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: linear-gradient(180deg, rgba(242,179,106,0.55), rgba(138,168,191,0.18));
}

.pipeline-node {
  position: relative;
  padding: 22px 22px 22px 74px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(41, 35, 34, 0.96), rgba(18, 16, 16, 0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}

.pipeline-node h3 {
  margin: 2px 0 8px;
}

.pipeline-node p {
  margin: 0;
  color: var(--muted);
}

.pipeline-index {
  position: absolute;
  left: 18px;
  top: 22px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--accent-strong);
  font-weight: 900;
}

.pipeline-node-alert {
  background: linear-gradient(180deg, rgba(66, 46, 37, 0.96), rgba(24, 17, 16, 0.98));
}

.integrations-stage {
  position: relative;
  display: grid;
  gap: 16px;
}

.integration-core,
.integration-card {
  position: relative;
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(40,36,36,0.95), rgba(18,17,17,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}

.integration-core {
  text-align: center;
  overflow: hidden;
}

.integration-core::after {
  content: "";
  position: absolute;
  inset: auto -10% -36% 20%;
  height: 200px;
  background: radial-gradient(circle, rgba(223,143,120,0.18), transparent 62%);
  pointer-events: none;
}

.integration-core-logo {
  width: 84px;
  height: 84px;
  display: block;
  margin: 0 auto 14px;
}

.integration-core p,
.integration-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.integration-wordmark {
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.integration-card-amazon { transform: translateX(0); }
.integration-card-rakuten { transform: translateX(0); }
.integration-card-ebay { transform: translateX(0); }
.integration-card-lbc { transform: translateX(0); }

.product-stage {
  display: grid;
  gap: 18px;
}

.product-screen {
  position: relative;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(34,31,31,0.95), rgba(14,14,14,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 28px 50px rgba(0,0,0,0.3);
  padding: 18px;
}

.screen-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
}

.screen-top strong {
  margin-left: 10px;
  color: var(--text);
}

.window-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
}

.stock-list-mini,
.jobs-stack-mini,
.flow-bars {
  display: grid;
  gap: 12px;
}

.stock-row-mini,
.job-mini {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.stock-row-mini p,
.job-mini p {
  margin: 4px 0 0;
  color: var(--muted);
}

.stock-thumb-mini {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(242,179,106,0.95), rgba(223,143,120,0.78));
}

.stock-thumb-mini-orange {
  background: linear-gradient(145deg, rgba(223,143,120,0.95), rgba(167,93,66,0.78));
}

.stock-thumb-mini-blue {
  background: linear-gradient(145deg, rgba(138,168,191,0.88), rgba(102,127,145,0.75));
}

.job-mini {
  grid-template-columns: 16px 1fr;
}

.job-mini-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ink-blue);
}

.job-mini-live .job-mini-dot {
  background: var(--success);
}

.job-mini-alert .job-mini-dot {
  background: var(--accent-strong);
}

.flow-bar {
  display: grid;
  gap: 8px;
}

.flow-bar span {
  color: var(--text);
  font-weight: 700;
}

.flow-meter {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.flow-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242,179,106,0.95), rgba(223,143,120,0.88));
  animation: meterPulse 4.5s ease-in-out infinite;
}

.flow-meter-alert i {
  background: linear-gradient(90deg, rgba(223,143,120,0.95), rgba(138,168,191,0.78));
}

.audience-grid,
.contrast-grid {
  display: grid;
  gap: 16px;
}

.audience-card,
.contrast-side,
.contrast-core {
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(39,34,34,0.96), rgba(17,16,16,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}

.audience-card p,
.contrast-side p,
.contrast-core p {
  color: var(--muted);
  margin-bottom: 0;
}

.contrast-core {
  text-align: center;
}

.contrast-logo {
  width: 82px;
  height: 82px;
  display: block;
  margin: 0 auto 14px;
}

.contrast-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.contrast-side-good {
  background: linear-gradient(180deg, rgba(64,43,35,0.96), rgba(19,17,17,0.98));
}

.landing-cta-section {
  padding-bottom: 30px;
}

.cta-shell {
  display: grid;
  gap: 18px;
  align-items: center;
  padding: 28px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(56, 40, 36, 0.96), rgba(18, 17, 17, 0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 34px 58px rgba(0,0,0,0.32);
}

.cta-shell h2 {
  margin: 14px 0 10px;
  max-width: 16ch;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
}

.landing-hero-v3 {
  position: relative;
  display: grid;
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 124px);
  padding: 28px 0 22px;
}

.landing-hero-v3::before,
.landing-hero-v3::after {
  content: "";
  position: absolute;
  pointer-events: none;
  filter: blur(22px);
}

.landing-hero-v3::before {
  top: 8%;
  left: -2%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(223, 143, 120, 0.22), transparent 66%);
  animation: floatBlob 14s ease-in-out infinite;
}

.landing-hero-v3::after {
  right: 0;
  bottom: 6%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(138, 168, 191, 0.18), transparent 66%);
  animation: floatBlob 16s ease-in-out infinite reverse;
}

.hero-copy-v3 {
  position: relative;
  z-index: 2;
}

.hero-copy-v3 h1 {
  margin: 18px 0 14px;
  max-width: 10.5ch;
  font-size: clamp(3.2rem, 6vw, 6.8rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
}

.hero-stage-v3 {
  min-height: 680px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 28%),
    linear-gradient(180deg, rgba(29, 25, 24, 0.96), rgba(10, 10, 10, 0.98));
}

.hero-stage-v3::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.hero-flow-svg-v3 {
  opacity: 0.96;
}

.hero-item-card-v3 {
  width: 236px;
  top: 52px;
  left: 28px;
}

.hero-hub-v3 {
  width: 230px;
  top: 176px;
  left: 252px;
}

.hero-jobs-v3 {
  width: 256px;
  top: 66px;
  right: 26px;
}

.hero-sync-card {
  left: 80px;
  bottom: 44px;
  width: 262px;
  padding: 18px;
  animation: panelFloat 7.2s ease-in-out infinite 0.4s;
}

.hero-sync-card p {
  margin: 8px 0 0;
}

.hero-sync-bars {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.hero-sync-bars span {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(242, 179, 106, 0.95), rgba(223, 143, 120, 0.75));
  animation: meterPulse 4.2s ease-in-out infinite;
}

.hero-sync-bars span:nth-child(2) {
  animation-delay: 0.35s;
}

.hero-sync-bars span:nth-child(3) {
  animation-delay: 0.7s;
}

.hero-command-strip {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  gap: 10px;
  overflow: hidden;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-command-strip span {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  white-space: nowrap;
  animation: marqueeShift 13s linear infinite;
}

.marketplace-orbit-v3 .orbit-badge {
  padding: 14px 16px;
}

.landing-flow-system {
  margin-top: 72px;
}

.pipeline-ribbon {
  position: relative;
  display: grid;
  gap: 16px;
}

.pipeline-ribbon-line {
  position: absolute;
  top: 42px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: linear-gradient(90deg, rgba(223, 143, 120, 0.25), rgba(242, 179, 106, 0.8), rgba(138, 168, 191, 0.24));
  opacity: 0.75;
}

.pipeline-ribbon-node {
  position: relative;
  padding: 30px 22px 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(40, 35, 34, 0.95), rgba(14, 13, 13, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.assistant-sidebar,
.assistant-chat-panel,
.assistant-sidecards .panel {
  display: grid;
  gap: 14px;
}

.assistant-main {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.assistant-thread-list,
.assistant-message-list,
.assistant-approval-list,
.assistant-sidecards {
  display: grid;
  gap: 12px;
}

.assistant-thread-card,
.assistant-message,
.assistant-approval-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 14, 14, 0.82);
}

.assistant-thread-card.is-active {
  border-color: rgba(223, 143, 120, 0.55);
  box-shadow: 0 0 0 1px rgba(223, 143, 120, 0.2) inset;
}

.assistant-thread-card span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.assistant-message-user {
  margin-left: 56px;
}

.assistant-message-assistant {
  margin-right: 56px;
}

.assistant-message-role {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.assistant-message-body {
  white-space: pre-wrap;
}

.assistant-prompt-form,
.assistant-approval-actions {
  display: grid;
  gap: 12px;
}

.assistant-approval-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assistant-tool-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.assistant-compact-page {
  margin: 0;
  min-height: 100dvh;
  height: 100dvh;
  background: rgba(18, 15, 15, 0.96);
  overflow: hidden;
}

.assistant-compact-shell {
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}

.assistant-compact-notice {
  margin: 0;
  flex: 0 0 auto;
}

.assistant-compact-section-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 222, 214, 0.62);
}

.assistant-compact-message-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 4px;
  gap: 8px;
}

.assistant-compact-approvals {
  flex: 0 0 auto;
  max-height: 110px;
  overflow: auto;
  padding-right: 4px;
  gap: 8px;
}

.assistant-compact-approvals .assistant-approval-top strong {
  font-size: 0.82rem;
}

.assistant-compact-approvals .assistant-approval-actions {
  gap: 8px;
}

.assistant-compact-approvals .button {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.82rem;
}

.assistant-message-thinking {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
}

.assistant-thinking-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.assistant-thinking-label {
  color: rgba(255, 245, 240, 0.86);
}

.assistant-thinking-text {
  min-width: 26px;
  color: rgba(223, 143, 120, 0.92);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.assistant-thinking-text::before {
  content: ".";
  animation: assistant-thinking-ellipsis-text 1.1s steps(1, end) infinite;
}

@keyframes assistant-thinking-ellipsis-text {
  0%, 24% {
    content: ".";
  }
  25%, 49% {
    content: "..";
  }
  50%, 74% {
    content: "...";
  }
  75%, 100% {
    content: "..";
  }
}

.assistant-compact-form {
  margin-top: 0;
  flex: 0 0 auto;
}

.assistant-compact-message-list .assistant-message,
.assistant-compact-approvals .assistant-approval-card {
  gap: 6px;
  padding: 10px 12px;
  border-radius: 16px;
}

.assistant-compact-message-list .assistant-message-user {
  margin-left: 28px;
  margin-right: 0;
  border-color: rgba(223, 143, 120, 0.2);
  background: rgba(74, 45, 39, 0.62);
}

.assistant-compact-message-list .assistant-message-assistant {
  margin-right: 22px;
  margin-left: 0;
}

.assistant-compact-message-list .assistant-message-role {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.assistant-compact-message-list .assistant-message-body,
.assistant-compact-approvals p {
  font-size: 0.9rem;
  line-height: 1.4;
}

.assistant-compact-composer {
  display: grid;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(14, 12, 12, 0.72);
  overflow: hidden;
}

.assistant-compact-textarea {
  min-height: 94px;
  max-height: 126px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 14px 14px 10px;
  resize: none;
  line-height: 1.42;
}

.assistant-compact-textarea:focus {
  outline: none;
}

.assistant-compact-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.assistant-compact-icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease, background 140ms ease, box-shadow 140ms ease;
}

.assistant-compact-icon-button:hover {
  transform: translateY(-1px);
}

.assistant-compact-icon-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.assistant-compact-icon-button-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 245, 240, 0.9);
}

.assistant-compact-icon-button-primary {
  background: var(--accent);
  color: #23110f;
}

.assistant-compact-form.is-busy .assistant-compact-composer {
  border-color: rgba(223, 143, 120, 0.24);
  box-shadow: 0 0 0 1px rgba(223, 143, 120, 0.08) inset;
}

.assistant-compact-form.is-busy .assistant-compact-icon-button {
  opacity: 0.72;
}

.assistant-fab {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  --assistant-fab-bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9997;
  display: grid;
  justify-items: end;
  gap: 12px;
  pointer-events: none;
}

.assistant-fab-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #171110;
  font-weight: 800;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  transform: translateY(0) scale(1);
  transition:
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms ease,
    filter 180ms ease,
    opacity 180ms ease;
  pointer-events: auto;
}

.assistant-fab-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
}

.assistant-fab-icon svg {
  width: 18px;
  height: 18px;
}

.assistant-fab-panel {
  position: fixed;
  right: 18px;
  bottom: calc(var(--assistant-fab-bottom) + 64px);
  width: min(340px, calc(100vw - 28px));
  height: min(420px, calc(100dvh - 118px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 17, 17, 0.98);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  transform-origin: bottom right;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  filter: saturate(0.92) blur(1px);
  pointer-events: none;
  transition:
    width 220ms cubic-bezier(0.22, 1, 0.36, 1),
    height 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    filter 180ms ease,
    box-shadow 220ms ease;
}

.assistant-fab-panel[hidden] {
  display: none !important;
}

.assistant-fab.is-open .assistant-fab-toggle {
  transform: translateY(2px) scale(0.985);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  filter: saturate(0.92);
}

.assistant-fab.is-open .assistant-fab-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  filter: saturate(1) blur(0);
  pointer-events: auto;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.46);
}

.assistant-fab-panel.is-expanded {
  width: min(520px, calc(100vw - 28px));
  height: min(680px, calc(100dvh - 72px));
}

.assistant-fab-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 3;
}

.assistant-fab-panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 8;
}

.assistant-fab-handle {
  flex: 1 1 auto;
  min-width: 0;
  touch-action: auto;
  user-select: none;
}

.assistant-fab-handle .muted {
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.assistant-fab-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.assistant-fab-size {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.assistant-fab-open-full {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.assistant-fab-open-full svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.assistant-fab-close,
.assistant-fab-panel-top .button {
  cursor: pointer;
  pointer-events: auto;
}

.assistant-fab-close,
.assistant-fab-open-full,
.assistant-fab-size {
  position: relative;
  z-index: 9;
}

.assistant-fab-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  position: relative;
  z-index: 1;
  display: block;
  opacity: 0.72;
  transition: opacity 220ms ease 60ms;
}

.assistant-fab.is-open .assistant-fab-frame {
  opacity: 1;
}

@media (max-width: 1180px) {
  .assistant-layout,
  .assistant-main {
    grid-template-columns: 1fr;
  }

  .assistant-message-user,
  .assistant-message-assistant {
    margin-left: 0;
    margin-right: 0;
  }

  .assistant-fab {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    --assistant-fab-bottom: max(12px, env(safe-area-inset-bottom));
    left: auto;
    justify-items: end;
  }

  .assistant-fab-toggle {
    justify-content: center;
  }

  .assistant-fab-panel {
    right: 12px;
    width: min(334px, calc(100vw - 20px));
    height: min(430px, calc(100dvh - 110px));
  }

  .assistant-fab-panel.is-expanded {
    width: min(388px, calc(100vw - 20px));
    height: min(560px, calc(100dvh - 70px));
  }

  .assistant-fab-panel-top {
    padding: 12px 14px;
  }

  .assistant-fab-handle .muted {
    font-size: 0.72rem;
    line-height: 1.2;
  }
}

.pipeline-ribbon-node:hover,
.pipeline-ribbon-node.is-active {
  transform: translateY(-4px);
  border-color: rgba(242, 179, 106, 0.26);
  box-shadow: 0 30px 46px rgba(0, 0, 0, 0.34);
}

.pipeline-ribbon-node h3 {
  margin: 16px 0 10px;
}

.pipeline-ribbon-node p {
  margin: 0;
  color: var(--muted);
}

.pipeline-ribbon-index {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-strong);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.pipeline-ribbon-node-alert {
  background: linear-gradient(180deg, rgba(66, 45, 37, 0.96), rgba(20, 15, 15, 0.98));
}

.integrations-showcase-shell {
  display: grid;
  gap: 18px;
}

.integration-wall {
  position: relative;
  min-height: 420px;
  padding: 24px;
  overflow: hidden;
}

.integration-wall-grid {
  position: absolute;
  inset: 0;
}

.integration-badge {
  position: absolute;
  padding: 14px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
  font-weight: 700;
  backdrop-filter: blur(8px);
  animation: orbitBob 8s ease-in-out infinite;
}

.integration-badge-amazon { top: 18%; left: 9%; }
.integration-badge-rakuten { top: 16%; right: 8%; animation-delay: 0.5s; }
.integration-badge-ebay { bottom: 18%; right: 10%; animation-delay: 1s; }
.integration-badge-lbc { bottom: 16%; left: 8%; animation-delay: 1.5s; }

.integration-hub-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 46%),
    linear-gradient(180deg, rgba(53, 41, 38, 0.97), rgba(18, 17, 17, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 46px rgba(0, 0, 0, 0.32);
  text-align: center;
  padding: 24px;
}

.integration-hub-center img {
  width: 74px;
  height: 74px;
}

.integration-hub-center span {
  color: var(--muted);
  font-size: 0.92rem;
}

.integration-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.integration-lines path {
  fill: none;
  stroke: rgba(242, 179, 106, 0.75);
  stroke-width: 2.4;
  stroke-dasharray: 10 14;
  animation: flowDash 15s linear infinite;
}

.integration-story-grid {
  display: grid;
  gap: 14px;
}

.integration-story-card {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(39, 34, 34, 0.96), rgba(17, 16, 16, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.integration-story-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.product-command-grid {
  display: grid;
  gap: 18px;
}

.product-command-card {
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(34, 31, 31, 0.95), rgba(14, 14, 14, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.3);
}

.product-command-map {
  position: relative;
  overflow: hidden;
}

.product-command-map::after {
  content: "";
  position: absolute;
  inset: auto -18% -36% 30%;
  height: 220px;
  background: radial-gradient(circle, rgba(223, 143, 120, 0.18), transparent 62%);
  pointer-events: none;
}

@keyframes marqueeShift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-18px); }
}

@keyframes panelFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}

@keyframes orbitBob {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}

@keyframes flowDash {
  to { stroke-dashoffset: -340; }
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(125,214,170,0.4); }
  100% { box-shadow: 0 0 0 12px rgba(125,214,170,0); }
}

@keyframes pulseDotWarm {
  0% { box-shadow: 0 0 0 0 rgba(242,179,106,0.4); }
  100% { box-shadow: 0 0 0 12px rgba(242,179,106,0); }
}

@keyframes meterPulse {
  0%, 100% { opacity: 0.95; filter: saturate(1); }
  50% { opacity: 1; filter: saturate(1.2); }
}

@keyframes floatBlob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -18px, 0) scale(1.08); }
}

/* ============================================================
   LANDING V4 — Concrete reseller flow
   ============================================================ */

.landing-hero-v4 {
  position: relative;
  display: grid;
  gap: 36px;
  align-items: center;
  min-height: calc(100vh - 124px);
  padding: 28px 0 22px;
}

.landing-hero-v4::before,
.landing-hero-v4::after {
  content: "";
  position: absolute;
  pointer-events: none;
  filter: blur(28px);
}

.landing-hero-v4::before {
  top: 6%;
  left: -3%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(223, 143, 120, 0.2), transparent 66%);
  animation: floatBlob 14s ease-in-out infinite;
}

.landing-hero-v4::after {
  right: -1%;
  bottom: 8%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(138, 168, 191, 0.16), transparent 66%);
  animation: floatBlob 17s ease-in-out infinite reverse;
}

.hero-copy-v4 {
  position: relative;
  z-index: 2;
}

.hero-copy-v4 h1 {
  margin: 18px 0 16px;
  max-width: 16ch;
  font-size: clamp(2.8rem, 5.5vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

/* --- Hero demo panel --- */
.hero-demo-v4 {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.04), transparent 40%),
    linear-gradient(180deg, rgba(26, 23, 22, 0.97), rgba(12, 11, 11, 0.99));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
  padding: 28px 24px;
  display: grid;
  gap: 20px;
}

.hero-demo-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.05));
  opacity: 0.3;
}

/* Object card */
.hero-object-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(50, 42, 39, 0.95), rgba(30, 26, 25, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.hero-object-thumb {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.hero-object-thumb svg {
  width: 48px;
  height: 48px;
}

.hero-object-info {
  display: grid;
  gap: 3px;
}

.hero-object-info strong {
  font-size: 1.08rem;
}

.hero-object-ean,
.hero-object-state {
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-object-state {
  color: var(--success);
}

.hero-object-price {
  text-align: right;
  display: grid;
  gap: 2px;
}

.hero-object-price strong {
  font-size: 1.3rem;
  color: var(--accent-strong);
}

.hero-object-price-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-object-confidence {
  font-size: 0.78rem;
  color: var(--success);
}

/* Channel row */
.hero-channels-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.hero-channel {
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: all 400ms ease;
}

.hero-channel-active {
  border-color: rgba(125, 214, 170, 0.25);
}

.hero-channel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  margin: 0 auto;
  box-shadow: 0 0 0 0 rgba(125, 214, 170, 0.3);
  animation: pulseDot 2.4s ease-out infinite;
}

.hero-channel-name {
  font-weight: 700;
  font-size: 0.88rem;
}

.hero-channel-price {
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.92rem;
}

.hero-channel-status {
  font-size: 0.76rem;
  color: var(--success);
}

.hero-channel-sold .hero-channel-dot {
  background: var(--accent-strong);
  animation: pulseDotWarm 2.4s ease-out infinite;
}

.hero-channel-sold .hero-channel-status {
  color: var(--accent-strong);
}

.hero-channel-removed {
  opacity: 0.35;
  border-color: rgba(255, 255, 255, 0.04);
}

.hero-channel-removed .hero-channel-dot {
  background: var(--muted);
  animation: none;
}

.hero-channel-removed .hero-channel-status {
  color: var(--muted);
}

/* Sale event */
.hero-sale-event {
  position: relative;
  z-index: 1;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(66, 46, 37, 0.6), rgba(30, 22, 20, 0.8));
  border: 1px solid rgba(242, 179, 106, 0.2);
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.hero-sale-event.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-sale-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-weight: 700;
}

.hero-sale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-sale-action {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.hero-sale-action-done {
  color: var(--accent-strong);
  border-color: rgba(242, 179, 106, 0.3);
  background: rgba(242, 179, 106, 0.08);
}

.hero-sale-action-remove {
  color: #e87373;
  border-color: rgba(232, 115, 115, 0.22);
  background: rgba(232, 115, 115, 0.06);
}

.hero-sale-action-sync {
  color: var(--ink-blue);
  border-color: rgba(138, 168, 191, 0.25);
  background: rgba(138, 168, 191, 0.06);
}

/* Timeline strip */
.hero-timeline-strip {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

.hero-timeline-step {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  transition: all 300ms ease;
}

.hero-timeline-step.is-done {
  color: var(--success);
  border-color: rgba(125, 214, 170, 0.2);
  background: rgba(125, 214, 170, 0.06);
}

.hero-timeline-step.is-active {
  color: var(--accent-strong);
  border-color: rgba(242, 179, 106, 0.35);
  background: rgba(242, 179, 106, 0.1);
  box-shadow: 0 0 0 0 rgba(242, 179, 106, 0.3);
  animation: pulseDotWarm 2.5s ease-out infinite;
}

/* ===== JOURNEY SECTION ===== */
.landing-journey {
  margin-top: 80px;
}

.journey-track {
  position: relative;
  display: grid;
  gap: 0;
}

.journey-line {
  position: absolute;
  left: 27px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(242, 179, 106, 0.6), rgba(138, 168, 191, 0.2), rgba(125, 214, 170, 0.4));
}

.journey-step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 24px 0;
}

.journey-step-marker {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.journey-step-num {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(50, 42, 39, 0.95), rgba(26, 22, 21, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-strong);
  font-weight: 900;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.journey-step-marker-success .journey-step-num {
  border-color: rgba(125, 214, 170, 0.3);
  color: var(--success);
}

.journey-step-body h3 {
  margin: 4px 0 10px;
  font-size: 1.2rem;
}

.journey-step-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 56ch;
}

.journey-step-example {
  margin-top: 16px;
}

.journey-example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.journey-tag {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.journey-tag-state {
  color: var(--success);
  border-color: rgba(125, 214, 170, 0.22);
}

/* Pricing demo in journey */
.journey-pricing-demo {
  max-width: 340px;
}

.journey-pricing-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.journey-pricing-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 1.2s ease;
}

.journey-pricing-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.journey-pricing-value {
  color: var(--accent-strong);
  font-weight: 700;
}

/* Channel pills in journey */
.journey-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.journey-channel-pill {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.journey-channel-amazon { color: #ff9900; border-color: rgba(255, 153, 0, 0.25); }
.journey-channel-rakuten { color: #bf0000; border-color: rgba(191, 0, 0, 0.2); }
.journey-channel-ebay { color: #e53238; border-color: rgba(229, 50, 56, 0.2); }
.journey-channel-lbc { color: #f56b2a; border-color: rgba(245, 107, 42, 0.2); }

/* Repricing demo */
.journey-reprice-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.journey-reprice-day {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.journey-reprice-arrow {
  color: var(--muted);
  font-size: 0.9rem;
}

.journey-reprice-floor {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e87373;
  background: rgba(232, 115, 115, 0.06);
  border: 1px solid rgba(232, 115, 115, 0.2);
}

/* Sync demo */
.journey-sync-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.journey-sync-pill {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.journey-sync-sold {
  color: var(--accent-strong);
  border-color: rgba(242, 179, 106, 0.3);
  background: rgba(242, 179, 106, 0.06);
}

.journey-sync-removed {
  color: #e87373;
  border-color: rgba(232, 115, 115, 0.18);
  background: rgba(232, 115, 115, 0.04);
}

/* ===== IA SECTION ===== */
.ia-grid {
  display: grid;
  gap: 16px;
}

.ia-card {
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(38, 33, 32, 0.96), rgba(16, 15, 15, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.ia-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(242, 179, 106, 0.08);
  border: 1px solid rgba(242, 179, 106, 0.18);
  color: var(--accent-strong);
}

.ia-card strong {
  font-size: 1.05rem;
}

.ia-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

/* ===== CHANNELS SECTION ===== */
.channels-grid {
  display: grid;
  gap: 16px;
}

.channel-card {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(36, 32, 31, 0.96), rgba(15, 14, 14, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.channel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.channel-badge {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.channel-badge-amazon {
  color: #ff9900;
  background: rgba(255, 153, 0, 0.08);
  border: 1px solid rgba(255, 153, 0, 0.22);
}

.channel-badge-rakuten {
  color: #bf0000;
  background: rgba(191, 0, 0, 0.06);
  border: 1px solid rgba(191, 0, 0, 0.18);
}

.channel-badge-ebay {
  color: #e53238;
  background: rgba(229, 50, 56, 0.06);
  border: 1px solid rgba(229, 50, 56, 0.18);
}

.channel-badge-lbc {
  color: #f56b2a;
  background: rgba(245, 107, 42, 0.06);
  border: 1px solid rgba(245, 107, 42, 0.18);
}

.channel-card-type {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.channel-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

/* ===== EXCEPTIONS SECTION ===== */
.exceptions-grid {
  display: grid;
  gap: 16px;
}

.exception-card {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(40, 34, 33, 0.96), rgba(16, 14, 14, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
}

.exception-card strong {
  grid-column: 2;
  margin-top: -2px;
}

.exception-card p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.exception-card-icon {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1.1rem;
}

.exception-card-icon-warn {
  color: var(--accent-strong);
  background: rgba(242, 179, 106, 0.08);
  border: 1px solid rgba(242, 179, 106, 0.2);
}

.exception-card-icon-info {
  color: var(--ink-blue);
  background: rgba(138, 168, 191, 0.08);
  border: 1px solid rgba(138, 168, 191, 0.2);
}

/* ===== HERO DEMO ANIMATION ===== */
@keyframes saleSlideIn {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== V4 RESPONSIVE ===== */
@media (min-width: 760px) {
  .landing-hero-v4 {
    grid-template-columns: minmax(0, 1.05fr) minmax(480px, 0.95fr);
    gap: 36px;
  }

  .ia-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .exceptions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 759px) {
  .hero-channels-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-object-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-object-thumb {
    margin: 0 auto;
  }

  .hero-object-price {
    text-align: center;
  }

  .journey-step {
    grid-template-columns: 44px 1fr;
    gap: 14px;
  }

  .journey-step-num {
    width: 44px;
    height: 44px;
    font-size: 0.82rem;
  }

  .journey-line {
    left: 21px;
  }

  .journey-reprice-demo {
    gap: 6px;
  }

  .journey-reprice-arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero-v4::before,
  .landing-hero-v4::after,
  .hero-channel-dot,
  .hero-timeline-step.is-active {
    animation: none !important;
  }
}

@keyframes spinnerTurn {
  to { transform: rotate(360deg); }
}

@keyframes statusPulse {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 rgba(223, 143, 120, 0);
  }
  50% {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 0 0 10px rgba(223, 143, 120, 0.08);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 rgba(223, 143, 120, 0);
  }
}

@keyframes tagPulse {
  0% {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.04);
  }
  50% {
    transform: scale(1.03);
    background: rgba(242, 179, 106, 0.14);
  }
  100% {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.04);
  }
}

@keyframes photoReveal {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes freshCardPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(223, 143, 120, 0.22);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(223, 143, 120, 0);
  }
}

@keyframes processingPulseSoft {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(242, 179, 106, 0.14);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(242, 179, 106, 0);
    transform: translateY(-1px);
  }
}

@keyframes doneCardGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(125, 214, 170, 0.28);
    border-color: rgba(125, 214, 170, 0.52);
    background: rgba(125, 214, 170, 0.18);
  }
  55% {
    box-shadow: 0 0 0 18px rgba(125, 214, 170, 0);
    border-color: rgba(125, 214, 170, 0.3);
    background: rgba(125, 214, 170, 0.12);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(125, 214, 170, 0);
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(14, 12, 12, 0.7);
  }
}

@keyframes failedCardGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(226, 101, 101, 0.28);
    border-color: rgba(226, 101, 101, 0.55);
    background: rgba(226, 101, 101, 0.16);
  }
  55% {
    box-shadow: 0 0 0 18px rgba(226, 101, 101, 0);
    border-color: rgba(226, 101, 101, 0.34);
    background: rgba(226, 101, 101, 0.1);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(226, 101, 101, 0);
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(14, 12, 12, 0.7);
  }
}

.input,
.select,
.textarea,
.input-file {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 12, 12, 0.7);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
}

.textarea {
  resize: vertical;
}

.button,
.action-button,
.mini-button {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button,
.mini-button {
  padding: 12px 16px;
}

.button:hover,
.action-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.button:active,
.action-button:active,
.mini-button:active {
  transform: translateY(0) scale(0.985);
}

.button-primary,
.action-button,
.mini-button {
  background: var(--accent);
  color: #281515;
  font-weight: 700;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 18px;
  text-align: center;
}

.button-ghost,
.action-button-secondary,
.mini-button-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-list {
  display: grid;
  gap: 14px;
}

.item-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(22, 19, 19, 0.84);
}

.item-card-media img,
.media-card img,
.detail-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.item-card-media {
  width: 84px;
  height: 84px;
}

.item-card-media .media-fallback {
  width: 84px;
  height: 84px;
  min-height: 84px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
  padding: 8px;
}

.item-card-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.item-card-subtitle {
  color: var(--muted);
  margin-top: 4px;
}

.item-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.detail-hero {
  display: grid;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
  min-width: 0;
}

.detail-photo-card {
  min-height: 300px;
  padding: 16px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.detail-gallery {
  position: relative;
}

.detail-gallery-slide {
  display: none;
  margin: 0;
}

.detail-gallery-slide.is-active {
  display: block;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
  z-index: 2;
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

.gallery-arrow-prev {
  left: 8px;
}

.gallery-arrow-next {
  right: 8px;
}

.detail-photo {
  aspect-ratio: 1 / 1;
  max-height: 440px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
}

.detail-gallery-caption {
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.detail-photo-empty,
.media-fallback {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.item-ai-runtime {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.item-ai-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.item-ai-input-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 12, 12, 0.7);
}

.item-ai-input-image,
.item-ai-input-empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
}

.item-ai-input-image {
  object-fit: cover;
}

.item-ai-input-empty,
.item-ai-input-value {
  display: grid;
  place-items: center;
  min-height: 96px;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .item-ai-inputs-grid {
    grid-template-columns: 1fr;
  }
}

.action-rail {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.action-button {
  width: 100%;
  padding: 16px 18px;
}

.detail-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  min-width: 0;
}

.add-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}

.page-add .page-shell {
  padding-bottom: calc(128px + env(safe-area-inset-bottom));
}

.page-add .page-shell > .add-layout {
  animation: none !important;
  transform: none !important;
}

.add-form-panel {
  min-height: 100%;
}

@media (min-width: 760px) {
  .add-form-panel {
    padding: clamp(14px, 2vw, 34px) clamp(16px, 2vw, 36px);
    font-size: clamp(0.85rem, 0.6vw + 0.45rem, 1.12rem);
  }

  .add-form-panel .input,
  .add-form-panel .select,
  .add-form-panel .textarea {
    padding: clamp(8px, 1vw, 18px) clamp(10px, 1.1vw, 20px);
    font-size: clamp(0.84rem, 0.55vw + 0.45rem, 1.08rem);
  }

  .add-form-panel .field > span,
  .add-form-panel .field-head-inline > span {
    font-size: clamp(0.82rem, 0.5vw + 0.45rem, 1.05rem);
  }

  .add-form-panel .form-grid {
    gap: clamp(10px, 1.2vw, 24px);
  }

  .add-form-panel .field {
    gap: clamp(4px, 0.5vw, 8px);
  }

  .add-form-panel h2 {
    font-size: clamp(1rem, 0.7vw + 0.55rem, 1.35rem);
  }

  .add-preset-strip {
    margin-bottom: clamp(2px, 0.4vw, 10px);
  }

  .add-form-panel .mini-button,
  .add-form-panel .field-inline-button {
    font-size: clamp(0.78rem, 0.4vw + 0.45rem, 0.95rem);
    padding: clamp(4px, 0.5vw, 10px) clamp(8px, 0.8vw, 16px);
  }
}

.add-form-actions {
  margin-top: 8px;
}

.add-form-actions-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.add-form-actions #create_item_button {
  width: 100%;
}

body.add-submit-dock-ready .add-form-actions:not(.is-dock-anchor-visible) #create_item_button,
body.add-submit-dock-ready .add-form-actions:not(.is-dock-anchor-visible) .add-form-actions-copy {
  display: none;
}

body.add-submit-dock-ready .add-form-actions {
  min-height: 88px;
}

body.add-submit-dock-ready .add-form-actions:not(.is-dock-anchor-visible) {
  opacity: 0.001;
}

body.add-submit-dock-ready .add-form-actions.is-dock-anchor-visible {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(31, 27, 27, 0.96), rgba(18, 16, 16, 0.98));
  border: 1px solid rgba(223, 143, 120, 0.18);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  opacity: 1;
  transform: translateY(0);
}

body.add-submit-dock-ready .add-form-actions.is-dock-anchor-visible > * {
  flex: initial;
}

body.add-submit-dock-ready .add-form-actions.is-dock-anchor-visible .add-form-actions-copy {
  flex: 1 1 auto;
}

.add-submit-help.is-ready {
  color: #4a9e6e;
}

body.add-submit-dock-ready .add-form-actions.is-dock-anchor-visible .add-submit-help,
body.add-submit-dock-ready .add-form-actions.is-dock-anchor-visible .add-submit-note {
  display: block;
  margin: 0;
}

body.add-submit-dock-ready .add-form-actions .add-submit-note-turbo {
  display: none !important;
}

body.add-submit-dock-ready .add-form-actions.is-dock-anchor-visible #create_item_button {
  width: auto;
  min-width: 188px;
  flex: 0 0 auto;
  justify-content: center;
}

.add-submit-dock {
  position: fixed;
  left: 0;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 10010;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  gap: 12px;
  margin-top: 0;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(31, 27, 27, 0.96), rgba(18, 16, 16, 0.98));
  border: 1px solid rgba(223, 143, 120, 0.18);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  transform: translateY(0) scale(1);
  transition: box-shadow 120ms ease;
  will-change: opacity, transform;
}

.add-submit-dock.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.add-submit-dock.is-locked {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.add-submit-dock[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}

.add-submit-dock-button {
  width: auto;
  min-width: 188px;
  flex: 0 0 auto;
  justify-content: center;
}

.add-submit-dock-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.add-submit-dock-copy[hidden] {
  display: none;
}

.add-submit-dock-copy[hidden] + .add-submit-dock-button {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.add-submit-dock-help,
.add-submit-dock-note {
  margin: 0;
}

.add-submit-dock-help {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.25;
}

.add-submit-dock-note {
  color: var(--warning);
  font-size: 0.76rem;
  line-height: 1.25;
}

.add-recent-head h2 {
  margin-top: 0;
}

.add-recent-list {
  display: grid;
  gap: 12px;
}

.add-recent-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 12, 12, 0.7);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.add-recent-card:hover {
  transform: translateY(-2px);
  border-color: rgba(223, 143, 120, 0.24);
}

.add-recent-card.is-fresh {
  border-color: rgba(223, 143, 120, 0.44);
  background: rgba(223, 143, 120, 0.08);
  animation: freshCardPulse 1.2s ease;
}

.add-recent-card.is-pending .badge-status,
.add-recent-card.is-running .badge-status {
  animation: processingPulseSoft 1.6s ease-in-out infinite;
}

.add-recent-card.just-done {
  animation: doneCardGlow 1.1s ease;
}

.add-recent-card.just-failed {
  animation: failedCardGlow 1.1s ease;
}


.add-recent-media {
  width: 78px;
  height: 78px;
}

.add-recent-media img,
.add-recent-media .media-fallback {
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

.add-recent-body {
  min-width: 0;
}

.add-recent-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.add-recent-top strong {
  display: block;
}

.add-recent-body p {
  margin: 8px 0 0;
  color: var(--muted);
}

.add-copy-source-banner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 18px 0 0;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(223, 143, 120, 0.24);
  background: rgba(223, 143, 120, 0.08);
}

.add-copy-source-banner p {
  margin: 6px 0 0;
}

.add-ean-match-panel {
  margin: 20px 0 0;
  padding: 18px;
}

.add-ean-match-head h2 {
  margin: 0 0 8px;
}

.add-ean-match-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.add-ean-match-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 12, 12, 0.72);
}

.add-ean-match-media {
  width: 92px;
  height: 92px;
}

.add-ean-match-media img,
.add-ean-match-media .media-fallback {
  width: 100%;
  height: 100%;
  border-radius: 18px;
}

.add-ean-match-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.add-ean-match-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.add-ean-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.add-ean-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.add-ean-match-actions form {
  margin: 0;
}

.field-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-inline-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.field-inline-button {
  min-height: 40px;
  padding: 8px 14px;
}

.sku-inline-preview {
  display: inline-flex;
  align-items: center;
  max-width: 52%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sku-inline-preview.is-updated {
  animation: tagPulse 420ms ease;
}

.field-help {
  color: var(--muted);
  font-size: 0.84rem;
}

.field-help.is-error {
  color: #e58d81;
}

.field-help code {
  color: var(--accent-strong);
}

.input-with-suffix {
  position: relative;
}

.input-with-suffix .input {
  padding-right: 42px;
}

.input-with-inline-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.quantity-inline-button {
  min-width: 40px;
  padding-inline: 0;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
}

.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.publishability-panel {
  margin: 20px 0 24px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.publishability-head h2 {
  margin: 0 0 8px;
}

.publishability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.publishability-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  flex-wrap: wrap;
}

.publishability-compact-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}

.publishability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.publishability-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: default;
}

.publishability-chip.is-eligible {
  background: rgba(125, 214, 170, 0.12);
  color: var(--success);
  border: 1px solid rgba(125, 214, 170, 0.25);
}

.publishability-chip.is-blocked {
  background: rgba(255, 141, 141, 0.10);
  color: var(--danger);
  border: 1px solid rgba(255, 141, 141, 0.2);
}

.publish-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 12, 12, 0.72);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.publish-card:hover {
  transform: translateY(-2px);
}

.publish-card.is-updated {
  animation: statusPulse 520ms ease;
}

.publish-card.is-eligible {
  border-color: rgba(125, 214, 170, 0.28);
  background: rgba(125, 214, 170, 0.07);
}

.publish-card.is-blocked {
  border-color: rgba(255, 141, 141, 0.2);
}

.publish-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.publish-card-text {
  margin: 10px 0 0;
  color: var(--muted);
}

.edit-layout {
  display: grid;
  gap: 18px;
}

.add-preset-panel,
.settings-add-preset-card,
.settings-add-preset-list-card,
.settings-add-preset-detail-card {
  display: grid;
  gap: 14px;
}

.add-preset-head,
.settings-add-presets-head,
.settings-add-preset-card-head,
.settings-add-preset-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.add-preset-head h2,
.settings-add-presets-head h2 {
  margin: 0 0 6px;
}

.add-preset-list,
.settings-add-presets-stack {
  display: grid;
  gap: 12px;
}

.settings-add-presets-list {
  display: grid;
  gap: 14px;
}

.add-preset-list {
  grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
  align-items: start;
}

.add-preset-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.add-preset-strip-title {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-strong);
}

.add-preset-list-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.add-preset-list-compact .button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.92rem;
}

.page-header:has(.add-settings-button) {
  flex-direction: row !important;
  align-items: center !important;
}

.add-settings-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.8rem;
  opacity: 0.7;
  flex: 0 0 auto !important;
  width: auto !important;
}

.add-settings-button:hover {
  opacity: 1;
}

.add-preset-strip .add-preset-active-copy {
  flex-basis: 100%;
  font-size: 0.84rem;
  margin-top: -2px;
}

.add-preset-list .button.is-active {
  background: rgba(223, 143, 120, 0.14);
  border-color: rgba(223, 143, 120, 0.34);
  color: var(--accent-strong);
}

.add-preset-active-copy {
  font-size: 0.95rem;
}

.settings-add-preset-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.settings-add-preset-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.settings-add-preset-list-card,
.settings-add-preset-detail-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.settings-add-preset-list-link {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.settings-add-preset-list-link:hover {
  border-color: rgba(223, 143, 120, 0.28);
  background: rgba(223, 143, 120, 0.06);
  transform: translateY(-1px);
}

.assistant-agent-profile-card {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.assistant-agent-profile-main {
  flex: 1 1 auto;
  min-width: 0;
}

.assistant-agent-profile-activate-form {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  padding-right: 0;
}

.assistant-agent-profile-activate-button {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .assistant-agent-profile-card {
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-content: stretch;
  }

  .assistant-agent-profile-activate-form {
    justify-content: flex-start;
    padding: 0 16px 14px;
  }
}

.settings-add-preset-list-chevron {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--accent-strong);
  opacity: 0.82;
}

.settings-add-preset-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-add-preset-card-actions,
.settings-add-preset-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-field-sorter {
  display: grid;
  gap: 12px;
}

.preset-field-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.preset-field-row:hover {
  border-color: rgba(223, 143, 120, 0.22);
  background: rgba(223, 143, 120, 0.04);
}

.preset-field-sorter.is-sorting .preset-field-row:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.preset-field-row.is-dragging {
  opacity: 0.72;
  transform: scale(0.99);
  border-color: rgba(223, 143, 120, 0.42);
  background: rgba(223, 143, 120, 0.1);
  box-shadow: 0 18px 34px rgba(223, 143, 120, 0.16);
}

.preset-field-drag-handle {
  width: 38px;
  height: 38px;
  border: 0;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: grab;
  font-size: 1.1rem;
  line-height: 1;
}

.preset-field-drag-handle:focus,
.preset-field-edit-button:focus {
  outline: none;
}

.preset-field-drag-handle:focus-visible,
.preset-field-edit-button:focus-visible {
  border-color: rgba(223, 143, 120, 0.34);
  box-shadow: 0 0 0 2px rgba(223, 143, 120, 0.18);
}

.preset-field-drag-handle:active {
  cursor: grabbing;
}

.preset-field-row-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.preset-field-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preset-field-row-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.preset-field-row-title strong {
  font-size: 1rem;
}

.preset-field-row-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-field-edit-button {
  min-height: 36px;
  padding: 7px 12px;
  white-space: nowrap;
}

.preset-field-modal[hidden] {
  display: none !important;
}

.preset-field-modal [hidden] {
  display: none !important;
}

.preset-field-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 24px;
}

.preset-field-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.preset-field-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 28px));
  max-height: min(84vh, 760px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(44, 40, 40, 0.98), rgba(25, 22, 22, 0.98));
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}

.preset-field-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.preset-field-modal-head strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 4px;
}

.add-copy-source-media {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.add-copy-source-media-card {
  display: grid;
  gap: 8px;
  width: 82px;
}

.add-copy-source-media-card img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 759px) {
  .stock-image-source-modal {
    align-items: end;
    padding: 10px;
  }

  .stock-image-source-card {
    width: min(100vw - 12px, 520px);
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 18px 18px;
  }

  .settings-add-preset-create {
    grid-template-columns: 1fr;
  }

  .add-preset-strip {
    padding: 0;
    border: 0;
    background: transparent;
    gap: 8px;
  }

  .add-preset-strip-title,
  .add-preset-strip .add-preset-active-copy {
    display: none;
  }

  .add-settings-button {
    margin-left: 0;
  }

  .add-preset-list-compact {
    gap: 8px;
  }

  .add-preset-list-compact .button {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
  }

  .preset-field-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 12px 13px;
  }

  .preset-field-drag-handle {
    width: 34px;
    height: 34px;
  }

  .preset-field-row-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .preset-field-edit-button {
    width: 100%;
    justify-content: center;
  }

  .preset-field-modal {
    align-items: end;
    padding: 10px;
  }

  .preset-field-modal-card {
    width: min(100vw - 12px, 560px);
    max-height: min(88vh, 760px);
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 18px 18px;
  }

  .preset-field-modal-head {
    flex-direction: column;
    margin-bottom: 14px;
  }
}

.field.field-locked .input[disabled] {
  color: var(--accent-strong);
  border-color: rgba(242, 179, 106, 0.28);
}

.add-photo-grid {
  align-items: start;
}

@media (max-width: 759px) {
  .add-photo-grid {
    grid-template-columns: 1fr !important;
  }

  .add-form-panel .textarea {
    resize: none;
  }
}

.add-photo-field {
  gap: 10px;
}

.add-photo-field[hidden] {
  display: none;
}

.add-photo-field .field-head-inline {
  align-items: center;
}

.input-file-camera {
  display: none;
}

.add-photo-preview {
  display: none;
}

.add-photo-preview.is-visible {
  display: block;
}

.add-photo-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 12, 12, 0.72);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
  animation: photoReveal 260ms ease;
}

.add-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.add-photo-meta {
  display: grid;
  gap: 4px;
  padding: 12px 14px 14px;
}

.add-photo-meta strong {
  font-size: 0.95rem;
}

.add-photo-meta span {
  color: var(--muted);
  font-size: 0.86rem;
  word-break: break-word;
}

.add-photo-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 19, 19, 0.76);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.add-photo-remove:hover {
  background: rgba(223, 143, 120, 0.92);
  color: #281515;
}

.scanner-sheet {
  position: fixed;
  inset: 0;
  z-index: 180;
}

.scanner-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.scanner-sheet-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(560px, calc(100vw - 24px));
  transform: translate(-50%, -50%);
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(37, 31, 31, 0.98), rgba(17, 15, 15, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.scanner-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.scanner-sheet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scanner-sheet-head h2 {
  margin: 0 0 6px;
}

.scanner-sheet-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

.scanner-video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #090808;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 360px;
}

.scanner-sheet-apple .scanner-video-shell {
  min-height: min(72vh, 560px);
}

.scanner-sheet-native .scanner-video-shell {
  min-height: min(72vh, 560px);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.scanner-sheet-native .scanner-sheet-panel {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  left: 0;
  top: 0;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.scanner-sheet-native .scanner-sheet-head {
  margin-bottom: 10px;
}

.scanner-sheet-native .scanner-sheet-head > div,
.scanner-sheet-native .scanner-sheet-close,
.scanner-sheet-native .scanner-status {
  background: rgba(20, 19, 19, 0.58);
  backdrop-filter: blur(10px);
}

.scanner-sheet-native .scanner-sheet-head > div {
  padding: 12px 14px;
  border-radius: 18px;
  max-width: min(520px, calc(100vw - 96px));
}

.scanner-sheet-native .scanner-sheet-close {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scanner-sheet-native .scanner-status {
  margin: 10px auto 0;
  padding: 10px 14px;
  border-radius: 16px;
  width: fit-content;
  max-width: min(680px, calc(100vw - 36px));
  text-align: center;
}

.scanner-reader {
  position: relative;
  width: 100%;
  min-height: 360px;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
}

.scanner-reader > div {
  border: 0 !important;
  padding: 0 !important;
}

.scanner-reader video,
.scanner-reader canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 22px;
  z-index: 1;
}

.scanner-reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(82%, 360px);
  height: 140px;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(242, 179, 106, 0.95);
  border-radius: 22px;
  box-shadow:
    0 0 0 999px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(20, 19, 19, 0.42) inset,
    0 0 28px rgba(242, 179, 106, 0.2);
  pointer-events: none;
  z-index: 2;
}

.scanner-reader__dashboard_section_swaplink,
.scanner-reader__dashboard_section_csr span {
  display: none !important;
}

.scanner-status {
  margin: 14px 4px 0;
}

.scanner-status.is-error {
  color: var(--warning);
}

body.barcode-scanner-active .app-shell {
  visibility: hidden;
}

body.barcode-scanner-active .scanner-sheet,
body.barcode-scanner-active .scanner-sheet * {
  visibility: visible;
}

body.barcode-scanner-active .scanner-sheet-backdrop {
  background: transparent;
  backdrop-filter: none;
}

body.barcode-scanner-active,
body.barcode-scanner-active .page-shell,
body.barcode-scanner-active .topbar {
  background: transparent !important;
}

.button.is-loading,
.action-button.is-loading,
.mini-button.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
}

.button.is-loading::after,
.action-button.is-loading::after,
.mini-button.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 10px;
  display: inline-block;
  vertical-align: middle;
  border-radius: 999px;
  border: 2px solid rgba(40, 21, 21, 0.28);
  border-top-color: #281515;
  animation: spinnerTurn 0.8s linear infinite;
}

.button.is-disabled,
.action-button.is-disabled,
.mini-button.is-disabled,
.button:disabled,
.action-button:disabled,
.mini-button:disabled {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

.add-submit-help {
  color: var(--muted);
  font-size: 0.92rem;
}

.add-submit-help.is-hidden {
  display: none;
}

.add-submit-help.is-ready {
  color: var(--success);
}

.add-submit-note {
  display: none;
  margin-top: -0.15rem;
  color: var(--warning);
  font-size: 0.8rem;
  line-height: 1.35;
}

.add-submit-note.is-visible {
  display: block;
}

.settings-grid {
  display: grid;
  gap: 18px;
}

.settings-home-header {
  margin-bottom: 12px;
}

.settings-home-grid {
  display: grid;
  gap: 18px;
}

.settings-home-card {
  display: grid;
  gap: 18px;
}

.settings-home-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.settings-home-card-head h2 {
  margin: 0;
}

.settings-home-card-account,
.settings-home-card-danger {
  grid-column: 1 / -1;
}

.settings-account-stack {
  display: grid;
  gap: 16px;
}

.settings-identity-box,
.settings-action-card,
.settings-link-tile,
.settings-plan-pill {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-identity-box,
.settings-action-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.settings-identity-box {
  display: grid;
  gap: 14px;
}

.settings-identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.settings-identity-label {
  color: var(--muted);
}

.settings-action-card {
  display: grid;
  gap: 14px;
}

.settings-action-card h3 {
  margin: 0;
}

.settings-action-copy {
  display: grid;
  gap: 6px;
}

.settings-inline-form {
  display: grid;
  gap: 12px;
}

.settings-inline-form-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.settings-inline-form-compact .form-actions {
  justify-content: flex-start;
}

.settings-helper-copy {
  margin: -4px 0 0;
}

.settings-code-field {
  max-width: 220px;
}

.settings-link-list-home {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-link-tile {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.settings-link-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(223, 143, 120, 0.24);
  background: rgba(223, 143, 120, 0.06);
}

.settings-plan-grid-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.settings-plan-pill {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.settings-plan-pill span {
  color: var(--accent-strong);
  font-weight: 800;
}

.settings-home-card-danger {
  border-color: rgba(255, 141, 141, 0.16);
}

.settings-danger-title {
  color: #ffb1b1;
}

.settings-action-card-danger {
  background: rgba(255, 141, 141, 0.05);
  border-color: rgba(255, 141, 141, 0.14);
}

.integrations-overview {
  display: grid;
  gap: 18px;
}

.integrations-overview-head,
.integration-card-head,
.integration-status-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.integrations-overview-head,
.integration-card-head {
  flex-wrap: wrap;
}

.integration-status-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.integration-status-card,
.integration-card {
  border-radius: 22px;
}

.integration-status-card {
  display: grid;
  gap: 10px;
  min-height: 128px;
}

.integration-status-card strong,
.integration-card-head h2 {
  margin: 0;
}

.integration-card-head > div,
.integration-status-top > strong {
  min-width: 0;
}

.integrations-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.integrations-grid .field-full,
.integrations-grid .auth-form-single {
  grid-column: 1 / -1;
}

.integrations-grid .textarea {
  min-height: 136px;
}

.integration-badge.is-configured {
  background: rgba(130, 237, 189, 0.18);
  color: #8df0ba;
}

.integration-badge.is-inherited {
  background: rgba(129, 183, 255, 0.18);
  color: #9fc4ff;
}

.integration-badge.is-partial {
  background: rgba(255, 196, 105, 0.18);
  color: #ffc66a;
}

.integration-badge.is-empty {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.integration-status-card .integration-badge,
.integration-card .integration-badge {
  position: static;
  flex: 0 0 auto;
  white-space: nowrap;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  animation: none;
  backdrop-filter: blur(8px);
}

.integration-guide {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.integration-guide strong {
  margin: 0;
}

.integration-guide-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 6px;
}

.integration-details {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.integration-details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--accent);
}

.integration-details summary::-webkit-details-marker {
  display: none;
}

.integration-details[open] summary {
  margin-bottom: 14px;
}

.settings-panel h2 {
  margin-top: 0;
}

.settings-link-list {
  display: grid;
  gap: 10px;
}

.settings-plan-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.settings-panel-wide {
  grid-column: 1 / -1;
}

.import-mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.import-preview-table-wrap {
  margin-top: 14px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.import-preview-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.import-preview-table th,
.import-preview-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.import-preview-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.88rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.messages-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
}

.messages-sidebar,
.messages-main {
  display: grid;
  gap: 16px;
  min-width: 0;
  position: relative;
  z-index: 0;
}

.messages-thread-list {
  display: grid;
  gap: 10px;
}

.messages-thread-load-more-sentinel {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 10px 12px 2px;
}

.message-thread-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 15, 15, 0.76);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.message-thread-card.is-active {
  border-color: rgba(229, 148, 120, 0.55);
  box-shadow: 0 0 0 1px rgba(229, 148, 120, 0.18) inset;
}

.message-bubble-top,
.message-thread-meta,
.message-ai-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.message-thread-top,
.messages-thread-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.message-thread-top > .status-pill,
.messages-thread-header > .status-pill {
  justify-self: end;
}

.message-thread-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.messages-conversation {
  display: grid;
  gap: 12px;
}

.message-bubble {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(22, 18, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.message-bubble.is-outbound {
  background: rgba(229, 148, 120, 0.14);
  border-color: rgba(229, 148, 120, 0.22);
}

.message-bubble.is-system {
  background: rgba(138, 168, 191, 0.14);
  border-color: rgba(138, 168, 191, 0.28);
}

.message-bubble p,
.message-draft-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.message-bubble-subject {
  color: var(--accent);
  font-weight: 700;
}

.message-draft-panel {
  display: grid;
  gap: 12px;
}

.message-ai-actions {
  flex-wrap: wrap;
}

.message-draft-body {
  max-width: 520px;
}

.message-draft-row {
  align-items: start;
}

.message-draft-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.badge-warning {
  color: #ffd3a6;
  background: rgba(229, 148, 120, 0.14);
  border-color: rgba(229, 148, 120, 0.24);
}

@media (max-width: 1080px) {
  .messages-layout {
    grid-template-columns: 1fr;
  }
}

.messages-page-header {
  align-items: start;
}

.messages-focus-panel,
.messages-conversation-panel,
.message-summary-card,
.message-draft-card {
  background: linear-gradient(180deg, rgba(37, 31, 31, 0.94), rgba(20, 17, 17, 0.92));
  overflow: hidden;
  min-width: 0;
}

.message-overview-top,
.message-draft-card-top,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.tone-muted {
  color: var(--muted);
}

.tone-success {
  color: #b6ffd8;
  background: rgba(125, 214, 170, 0.14);
  border-color: rgba(125, 214, 170, 0.24);
}

.tone-warning {
  color: #ffe1a2;
  background: rgba(242, 179, 106, 0.14);
  border-color: rgba(242, 179, 106, 0.24);
}

.tone-danger {
  color: #ffc3c3;
  background: rgba(255, 141, 141, 0.14);
  border-color: rgba(255, 141, 141, 0.24);
}

.tone-info {
  color: #c8dbef;
  background: rgba(138, 168, 191, 0.14);
  border-color: rgba(138, 168, 191, 0.24);
}

.messages-thread-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.message-thread-title-wrap,
.messages-thread-brand > div {
  min-width: 0;
}

.marketplace-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  flex: 0 0 auto;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.marketplace-logo-large {
  width: 50px;
  height: 50px;
  border-radius: 16px;
}

.message-thread-channel,
.message-summary-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.message-thread-title-wrap strong,
.messages-thread-brand h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-thread-card {
  gap: 12px;
  padding: 16px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.message-thread-card:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 179, 106, 0.18);
}

.message-thread-snippet,
.message-thread-counterparty {
  margin: 0;
}

.message-thread-counterparty {
  color: var(--text);
  font-weight: 600;
}

.messages-content-grid {
  display: grid;
  gap: 16px;
}

.messages-content-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  margin-top: 18px;
  align-items: start;
}

.messages-conversation-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.messages-actions-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.message-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.message-drafts-list {
  display: grid;
  gap: 12px;
}

.message-draft-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.message-draft-actions {
  display: flex;
  justify-content: flex-end;
}

.settings-inline-group,
.settings-check-grid {
  display: grid;
  gap: 10px;
}

.settings-check-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.empty-state.compact {
  padding: 18px 14px;
}

@media (max-width: 1080px) {
  .messages-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1480px) {
  .messages-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1240px) {
  .messages-layout {
    grid-template-columns: 1fr;
  }

  .messages-main {
    order: 1;
  }

  .messages-sidebar {
    order: 2;
  }
}

@media (max-width: 1500px) {
  .page-messages .page-shell {
    width: min(1180px, calc(100vw - 24px));
  }

  .messages-layout {
    grid-template-columns: 1fr;
  }

  .messages-main {
    order: 1;
  }

  .messages-sidebar {
    order: 2;
  }
}

.messages-sync-menu {
  position: relative;
}

.messages-sync-menu summary {
  list-style: none;
}

.messages-sync-menu summary::-webkit-details-marker {
  display: none;
}

.messages-sync-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  min-width: 180px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(21, 18, 18, 0.98);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.message-thread-title-wrap {
  min-width: 0;
}

.messages-thread-summary {
  margin: 8px 0 0;
  color: var(--muted);
}

.messages-layout-v2 {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
  overflow: visible;
  height: calc(100dvh - 190px);
  min-height: 720px;
}

.messages-sidebar-shell,
.messages-main-shell,
.messages-sidepanel {
  min-width: 0;
}

.messages-sidebar-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 16px;
  max-height: calc(100dvh - 190px);
}

.messages-sidebar-top,
.messages-person-top,
.message-thread-card-topline,
.messages-focus-stats {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.messages-filters-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.messages-filters-bar .field {
  margin: 0;
}

.messages-filters-bar .field span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.message-thread-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.message-thread-card-media {
  position: relative;
  width: 58px;
  min-width: 58px;
}

.message-thread-avatar,
.messages-person-avatar {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff5ea;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 208, 141, 0.26), transparent 38%),
    linear-gradient(160deg, rgba(223, 143, 120, 0.95), rgba(143, 82, 43, 0.88));
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.25);
}

.message-thread-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 1.2rem;
}

.message-thread-marketplace-logo {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  border: 2px solid rgba(12, 10, 10, 0.9);
  box-shadow: none;
}

.message-thread-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.message-thread-card-topline > .status-pill {
  flex: 0 0 auto;
}

.messages-focus-hero {
  display: grid;
  gap: 14px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(37, 31, 31, 0.95), rgba(20, 17, 17, 0.94));
}

.messages-focus-stats {
  justify-content: flex-start;
}

.messages-conversation-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
  min-height: 0;
}

.messages-conversation-head {
  padding: 18px 20px 0;
}

.messages-conversation-stream {
  display: grid;
  gap: 16px;
  padding: 18px 20px 22px;
  overflow-y: auto;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(21, 18, 18, 0.86), rgba(13, 11, 11, 0.92)),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 31px,
      rgba(255, 255, 255, 0.018) 31px,
      rgba(255, 255, 255, 0.018) 32px
    );
}

.messages-conversation-stream-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.messages-history-load {
  padding: 16px 20px 0;
}

.message-row {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.message-row.is-outbound {
  justify-items: end;
}

.message-row.is-system {
  justify-items: center;
}

.message-row-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.message-row.is-outbound .message-row-meta {
  justify-content: flex-end;
}

.message-row.is-system .message-row-meta {
  justify-content: center;
}

.message-row.is-system .message-row-meta strong {
  color: #c8dbef;
}

.message-bubble {
  width: min(100%, 720px);
  border-radius: 22px;
}

.message-row.is-system .message-bubble {
  width: min(100%, 640px);
}

.messages-compose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.messages-sidepanel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 16px;
  max-height: calc(100dvh - 190px);
  overflow-y: auto;
}

.messages-main-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 0;
  max-height: calc(100dvh - 190px);
}

.messages-thread-list {
  overflow-y: auto;
  min-height: 0;
  padding-right: 6px;
}

.messages-person-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.messages-person-avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  font-size: 1.5rem;
  flex: 0 0 auto;
}

.messages-person-top h3 {
  margin: 0;
}

.messages-person-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.messages-mini-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.messages-mini-stat span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.message-spotlight-panel {
  overflow: hidden;
}

.message-item-spotlight {
  display: grid;
  gap: 14px;
}

.message-item-spotlight-image {
  width: 100%;
  min-height: 180px;
  max-height: 260px;
  border-radius: 20px;
  object-fit: cover;
}

.message-item-spotlight-copy {
  display: grid;
  gap: 8px;
}

.message-item-spotlight-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1280px) {
  .messages-layout-v2 {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    height: auto;
    min-height: 0;
  }

  .messages-sidebar-shell,
  .messages-sidepanel {
    position: static;
    max-height: none;
    overflow: visible;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .messages-main-shell {
    max-height: none;
  }

  .messages-thread-list,
  .messages-conversation-stream {
    overflow: visible;
  }
}

@media (max-width: 1080px) {
  .messages-layout-v2 {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .messages-sidebar-shell,
  .messages-sidepanel {
    position: static;
  }

  .messages-sidepanel {
    grid-template-columns: 1fr;
  }

  .messages-main-shell {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .messages-filters-bar,
  .messages-compose-grid,
  .messages-person-stats {
    grid-template-columns: 1fr;
  }

  .message-thread-card {
    grid-template-columns: 1fr;
  }

  .message-thread-card-media {
    width: auto;
    min-width: 0;
  }

  .message-thread-marketplace-logo {
    right: auto;
    left: 42px;
  }
}

.message-item-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.message-item-card-link {
  display: block;
  border-radius: 22px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.message-item-card-link:hover {
  transform: translateY(-1px);
}

.message-item-card-link .message-item-card {
  border: 1px solid rgba(223, 143, 120, 0.16);
  padding: 8px;
  border-radius: 22px;
}

.page-messages .page-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100dvh - 96px);
  min-height: calc(100dvh - 96px);
  max-height: calc(100dvh - 96px);
  align-content: stretch;
  overflow: hidden;
}

.messages-layout-v3 {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  height: 100%;
  align-items: stretch;
  overflow: hidden;
}

.messages-layout-v3 .messages-sidebar-shell,
.messages-layout-v3 .messages-stage-shell,
.messages-layout-v3 .messages-main-shell,
.messages-layout-v3 .messages-sidepanel,
.messages-layout-v3 .messages-chat-panel {
  min-height: 0;
  min-width: 0;
}

.messages-layout-v3 .messages-sidebar-shell {
  position: static;
  max-height: none;
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  height: 100%;
  overflow: hidden;
}

.messages-sidebar-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.messages-sidebar-top-actions .button {
  white-space: nowrap;
}

.messages-page-top-strip {
  margin-bottom: 18px;
}

.messages-layout-v3 .messages-stage-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 18px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.messages-layout-v3.is-list-mode .messages-stage-shell {
  grid-template-columns: 1fr;
}

.messages-layout-v3.is-list-mode .messages-sidepanel {
  display: none;
}

.messages-layout-v3 .messages-main-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  max-height: none;
  height: 100%;
  overflow: hidden;
}

.messages-layout-v3 .messages-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 26, 26, 0.96), rgba(17, 15, 15, 0.94));
}

.messages-chat-mobile-bar {
  display: none;
  padding: 14px 16px 0;
}

.messages-mobile-back {
  display: none;
  flex: 0 0 auto;
}

.messages-layout-v3 .messages-conversation-stream {
  overflow-y: auto;
  min-height: 0;
  padding: 24px;
}

.messages-layout-v3 .messages-thread-list {
  overflow-y: auto;
  min-height: 0;
  padding-right: 6px;
}

.messages-thread-list .message-thread-card {
  min-height: 118px;
}

.messages-layout-v3 .messages-sidepanel {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 18px;
  min-height: 0;
  height: 100%;
  position: static;
  top: auto;
  max-height: none;
  overflow-y: auto;
  padding-right: 4px;
}

.messages-compose-panel {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(13, 11, 11, 0.88);
}

.messages-compose-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.11), transparent 38%),
    rgba(24, 20, 20, 0.96);
}

.messages-compose-field {
  display: block;
}

.messages-compose-textarea {
  min-height: 260px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 15, 15, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  resize: vertical;
}

.messages-compose-textarea.is-readonly {
  opacity: 0.78;
}

.messages-compose-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.messages-compose-status {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.messages-compose-status-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.messages-compose-status-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.messages-compose-status-note {
  font-size: 0.85rem;
}

.messages-compose-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.messages-compose-ai-trigger {
  min-width: 56px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.messages-empty-panel {
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
}

@media (max-width: 1280px) {
  .page-messages .page-shell {
    min-height: calc(100dvh - 96px);
    overflow: hidden;
  }

  .messages-layout-v3 {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  }

  .messages-layout-v3 .messages-stage-shell {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  }
}

@media (max-width: 1080px) {
  .page-messages .page-shell {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .messages-layout-v3 {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .messages-layout-v3.has-thread .messages-sidebar-shell {
    display: none;
  }

  .messages-layout-v3.is-list-mode .messages-stage-shell {
    display: none;
  }

  .messages-layout-v3 .messages-stage-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .messages-layout-v3 .messages-sidepanel,
  .messages-layout-v3 .messages-thread-list,
  .messages-layout-v3 .messages-conversation-stream {
    overflow: visible;
    padding-right: 0;
  }

  .messages-mobile-back {
    display: inline-flex;
  }

  .messages-compose-footer,
  .messages-compose-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .messages-layout-v3 .messages-sidebar-shell {
    padding: 16px;
  }

  .messages-sidebar-top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .messages-chat-mobile-bar {
    display: block;
  }

  .messages-layout-v3 .messages-conversation-stream {
    padding: 16px;
  }

  .messages-compose-panel {
    padding: 14px 16px 16px;
  }

  .messages-compose-textarea {
    min-height: 220px;
  }

  .messages-compose-footer,
  .messages-compose-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .messages-compose-actions {
    width: 100%;
  }

  .messages-compose-actions .button {
    width: 100%;
    justify-content: center;
  }
}

.message-item-card-image,
.message-item-card-placeholder {
  width: 92px;
  height: 92px;
  border-radius: 18px;
}

.message-item-card-image {
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.message-item-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  padding: 10px;
}

.message-item-card-body {
  display: grid;
  gap: 6px;
}

.floating-import-widget {
  position: fixed;
  right: 18px;
  bottom: 104px;
  z-index: 9999;
  width: min(360px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(24, 20, 20, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.floating-import-widget[hidden] {
  display: none;
}

.floating-import-widget.is-success {
  border-color: rgba(125, 214, 170, 0.35);
}

.floating-import-widget.is-failed {
  border-color: rgba(255, 141, 141, 0.35);
}

.floating-import-widget-top,
.floating-import-widget-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.floating-import-widget-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.floating-import-widget-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.floating-import-widget-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 220ms ease;
}

.floating-import-widget.is-success .floating-import-widget-progress-bar {
  background: linear-gradient(90deg, rgba(125, 214, 170, 0.88), rgba(87, 197, 143, 0.96));
}

.floating-import-widget.is-failed .floating-import-widget-progress-bar {
  background: linear-gradient(90deg, rgba(255, 141, 141, 0.88), rgba(239, 92, 92, 0.96));
}

.floating-import-widget-current {
  min-height: 18px;
}

.floating-import-widget-link {
  justify-self: start;
}

.mobile-install-widget {
  position: fixed;
  right: 18px;
  bottom: 104px;
  z-index: 9998;
  width: min(360px, calc(100vw - 24px));
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(223, 143, 120, 0.3);
  background: rgba(24, 20, 20, 0.97);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.mobile-install-widget[hidden] {
  display: none;
}

.mobile-install-widget-top,
.mobile-install-widget-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-install-widget-copy,
.mobile-install-widget-note {
  margin: 0;
}

.mobile-install-widget-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.mobile-install-widget-actions .button {
  flex: 1 1 150px;
  justify-content: center;
}

.mobile-install-ios-help[hidden] {
  display: none;
}

.mobile-install-widget-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.floating-import-widget:not([hidden]) ~ .mobile-install-widget {
  bottom: 292px;
}

.mobile-install-widget:not([hidden]) ~ .assistant-fab {
  bottom: 210px;
  --assistant-fab-bottom: 210px;
}

.floating-import-widget:not([hidden]) ~ .assistant-fab {
  bottom: 210px;
  --assistant-fab-bottom: 210px;
}

.floating-import-widget:not([hidden]) ~ .mobile-install-widget:not([hidden]) ~ .assistant-fab {
  bottom: 398px;
  --assistant-fab-bottom: 398px;
}

.ios-install-modal {
  position: fixed;
  inset: 0;
  z-index: 1201;
  display: grid;
  place-items: center;
  padding: 20px;
}

.ios-install-modal[hidden] {
  display: none;
}

.ios-install-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(7, 6, 6, 0.7);
  backdrop-filter: blur(10px);
}

.ios-install-modal-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(28, 24, 24, 0.98), rgba(18, 15, 15, 0.98));
  border: 1px solid rgba(223, 143, 120, 0.24);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.ios-install-modal-copy {
  display: grid;
  gap: 10px;
}

.ios-install-modal-copy strong {
  font-size: 1.12rem;
}

.ios-install-modal-copy p,
.ios-install-tip {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.ios-install-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  line-height: 1.5;
}

.ios-install-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.ios-install-modal-open {
  overflow: hidden;
}

.settings-copy-stack {
  display: grid;
  gap: 10px;
}

.settings-mini-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.settings-import-inline-status {
  margin-top: 14px;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.import-image-match-list {
  display: grid;
  gap: 10px;
}

.import-image-match-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
  min-width: 0;
}

.info-grid dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.info-grid dd {
  margin: 6px 0 0;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 759px) {
  .detail-hero,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-photo-card {
    padding: 12px;
  }

  .detail-gallery-slide {
    min-width: 100%;
  }

  .onboarding-choice-actions {
    flex-direction: column;
    width: 100%;
  }

  .onboarding-choice-actions .button {
    width: 100%;
    justify-content: center;
  }

  .organization-setup-preview {
    min-height: 1280px;
  }

  .organization-setup-overlay {
    padding: 18px;
  }

  .onboarding-ghost-actions {
    flex-direction: column;
  }
}

.info-grid-ref dd {
  color: #d8b35f;
  text-shadow: 0 0 18px rgba(216, 179, 95, 0.18);
}

.rich-block + .rich-block {
  margin-top: 16px;
}

.marketplace-grid,
.media-grid,
.review-list {
  display: grid;
  gap: 12px;
}

.marketplace-card,
.media-card,
.candidate-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 12, 12, 0.7);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.human-task-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

@media (max-width: 720px) {
  .stock-toolbar-actions {
    width: 100%;
  }

  .stock-toolbar-actions .button {
    flex: 1 1 0;
    justify-content: center;
  }

  .pricing-threshold-form {
    width: 100%;
  }

  .pricing-threshold-form .field,
  .pricing-threshold-form .button {
    width: 100%;
  }
}

.marketplace-card-top,
.review-top,
.job-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.human-task-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.human-task-top h2 {
  margin: 4px 0 0;
  word-break: break-word;
}

.human-task-channel {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.human-task-summary {
  margin: 8px 0 0;
}

.human-task-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.human-task-copy p {
  margin: 0;
  overflow-wrap: anywhere;
}

.human-task-item-link {
  display: block;
  min-width: 0;
}

.human-task-item-row-link {
  display: grid;
  text-decoration: none;
  color: inherit;
  padding: 10px 0;
}

.human-task-item-row-link + .human-task-item-row-link {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.human-task-item-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
}

.candidate-card-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.candidate-card-copy {
  min-width: 0;
}

.candidate-card-copy strong {
  display: block;
}

.candidate-card-thumb {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.04);
}

.stock-card-thumb {
  width: 88px;
  height: 88px;
  min-width: 88px;
  min-height: 88px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.04);
}

.human-task-item-row .media-fallback {
  width: 88px;
  height: 88px;
  border-radius: 18px;
}

.candidate-card-thumb.media-fallback {
  border-radius: 16px;
}

.pricing-review-estimate {
  display: grid;
  gap: 6px;
}

.pricing-review-price-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pricing-review-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-strong);
}

.pricing-review-reason {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.pricing-review-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pricing-modify-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pricing-price-input {
  width: 140px !important;
  text-align: center;
}

.pricing-reason-input {
  flex: 1;
  min-width: 180px;
}

/* Analyze listing review block */
.analyze-review-diagnostic {
  background: var(--surface-subtle, rgba(255,255,255,0.03));
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 0.88rem;
}
.analyze-review-diagnostic ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: grid;
  gap: 4px;
}
.analyze-review-diagnostic code {
  background: rgba(255,255,255,0.05);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.analyze-review-diff {
  margin: 8px 0;
}
.analyze-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 6px;
}
.analyze-diff-table th {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  font-weight: 600;
  vertical-align: top;
  width: 110px;
}
.analyze-diff-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  vertical-align: top;
  line-height: 1.4;
}
.analyze-diff-before {
  color: var(--muted, #999);
  background: rgba(255, 90, 90, 0.06);
}
.analyze-diff-after {
  background: rgba(90, 220, 140, 0.07);
  font-weight: 500;
}

.marketplace-error,
.job-error {
  color: #ffd1d1;
  font-size: 0.9rem;
  margin: 10px 0 0;
}

.membership-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Bloc analyze conversationnel (kind=question) -- l'agent pose une question
   a l'humain qui repond via texte + image optionnelle. */
.analyze-question-block {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 8px;
  background: var(--surface-subtle, rgba(255,255,255,0.02));
  display: grid;
  gap: 10px;
}
.analyze-question-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.analyze-question-text {
  font-size: 1.02rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
}
/* Le "Pourquoi" est l'info la plus importante du bloc question :
   c'est ce qui justifie pourquoi l'humain doit s'arreter et repondre.
   Mis en avant avec la couleur d'accent du projet (cuivre clair). */
.analyze-question-reason {
  margin: 4px 0 8px 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--accent-strong);
  line-height: 1.4;
}
.analyze-question-reason-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-right: 6px;
  opacity: 0.9;
}
.analyze-question-history {
  margin: 4px 0;
}
.analyze-question-history summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted, rgba(255,255,255,0.65));
}
.analyze-question-history ol {
  margin: 8px 0 0 0;
  padding-left: 20px;
  font-size: 0.88rem;
}
.analyze-question-history li {
  margin-bottom: 4px;
}
.analyze-question-form {
  display: grid;
  gap: 8px;
}
/* Hint visuel quand l'IA recommande explicitement de joindre une image
   (label.highlight). Fond legerement teinte sans agresser. */
.analyze-question-form .analyze-review-label.highlight {
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.32);
}

.job-list {
  display: grid;
  gap: 12px;
}

.jobs-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.jobs-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.jobs-filters-panel {
  margin-bottom: 16px;
}

.job-running-panel {
  margin-bottom: 16px;
}

.job-running-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.job-running-header h2 {
  margin: 0;
}

.job-running-header p {
  margin: 0;
  color: var(--muted);
}

.job-running-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.job-running-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.job-running-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.job-running-body {
  display: grid;
  gap: 10px;
}

.job-running-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.job-running-item:hover {
  text-decoration: none;
}

.jobs-filters {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.jobs-filter-field {
  display: grid;
  gap: 6px;
}

.jobs-filter-field span {
  color: var(--muted);
  font-size: 0.84rem;
}

.jobs-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.job-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.job-row-done-flash {
  animation: jobRowDoneFlash 2.1s ease-out;
}

.job-card:last-child {
  border-bottom: 0;
}

.job-card-main {
  min-width: 0;
}

.job-card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.job-card-title-wrap {
  min-width: 0;
}

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.job-card-body {
  margin-top: 14px;
}

.job-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.job-card-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.job-card-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.job-card-link {
  color: var(--text);
  text-decoration: none;
}

.job-card-link:hover {
  text-decoration: underline;
}

.job-card-summary {
  margin-top: 12px;
  display: grid;
  gap: 4px;
}

.job-card-debug {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.job-card-debug summary {
  cursor: pointer;
  color: var(--muted);
}

.job-card-debug-block {
  margin-top: 10px;
}

.job-card-debug pre {
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(12, 11, 11, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.job-card-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 0;
}

.job-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.job-item-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-primary, #4f6ef7);
  font-size: 0.85rem;
  max-width: 260px;
  overflow: hidden;
}

.job-item-link:hover {
  text-decoration: underline;
}

.job-item-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.job-item-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-row-right {
  flex: 0 1 46%;
  min-width: 0;
  text-align: right;
}

.job-row > div:first-child {
  flex: 1 1 54%;
  min-width: 0;
}

.job-row strong,
.job-row .muted,
.job-error,
.job-card strong,
.job-card .muted,
.job-card span,
.job-card code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1080px) {
  .jobs-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jobs-filter-actions {
    grid-column: 1 / -1;
  }

  .job-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .jobs-filters {
    grid-template-columns: 1fr;
  }

  .job-running-list {
    grid-template-columns: 1fr;
  }

  .job-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .job-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-card-right {
    flex-wrap: wrap;
  }

  .job-item-link {
    max-width: 180px;
  }

  .job-card-grid {
    grid-template-columns: 1fr;
  }

  .job-card-actions {
    justify-content: flex-start;
  }

  .job-row {
    flex-direction: column;
    gap: 10px;
  }

  .job-row-right,
  .job-row > div:first-child {
    flex: 1 1 auto;
    width: 100%;
  }

  .job-row-right {
    text-align: left;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.badge-muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.badge-score {
  color: #fff;
  font-weight: 800;
  padding: 8px 14px;
  font-size: 0.92rem;
}

.badge-status {
  color: #191515;
  font-weight: 700;
}

.badge-status.badge-running {
  background: linear-gradient(135deg, #ffd47f, #f2b36a);
  color: #3a2500;
  box-shadow: 0 0 0 0 rgba(242, 179, 106, 0.22);
  animation: pulseDotWarm 2.7s ease-out infinite;
}

.badge-status-live {
  position: relative;
}

.job-status-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 18px;
}

.job-status-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.28;
  animation: jobStatusDotWave 1.1s ease-in-out infinite;
}

.job-status-live-dot:nth-child(2) {
  animation-delay: 0.14s;
}

.job-status-live-dot:nth-child(3) {
  animation-delay: 0.28s;
}

.badge-not-listed,
.badge-pending,
.badge-running {
  background: var(--warning);
}

.badge-listed,
.badge-done,
.badge-resolved {
  background: var(--success);
}

.badge-sold {
  background: #a8cfff;
  color: #10243f;
}

.badge-awaiting_review {
  background: #f0ad4e;
  color: #1a1a1a;
}

.badge-failed,
.badge-ignored,
.badge-not-eligible,
.badge-cancelled {
  background: var(--danger);
}

.badge-neutral,
.badge-running,
.badge-pending-approval,
.badge-executed,
.badge-rejected {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

.badge-unknown,
.badge-open {
  background: #d0b6ff;
}

@keyframes jobStatusDotWave {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.28;
  }

  40% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes jobRowDoneFlash {
  0% {
    background: rgba(137, 232, 173, 0.22);
    box-shadow: 0 0 0 0 rgba(137, 232, 173, 0.22);
  }

  45% {
    background: rgba(137, 232, 173, 0.14);
    box-shadow: 0 0 0 8px rgba(137, 232, 173, 0.05);
  }

  100% {
    background: transparent;
    box-shadow: 0 0 0 0 rgba(137, 232, 173, 0);
  }
}

.action-button-danger {
  background: rgba(255, 141, 141, 0.12);
  color: var(--text);
  border: 1px solid rgba(255, 141, 141, 0.28);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.checkbox-field {
  align-content: center;
  grid-auto-flow: column;
  justify-content: start;
}

.checkbox-field .field-help {
  grid-column: 1 / -1;
}

.field-disabled {
  opacity: 0.62;
}

.upload-section h2,
.panel h2 {
  margin-top: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.pagination-label {
  color: var(--muted);
}

.empty-state {
  padding: 28px 18px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.payload-view pre {
  margin: 10px 0 0;
  padding: 14px;
  overflow: auto;
  border-radius: 16px;
  background: rgba(9, 8, 8, 0.8);
  color: #e7dfdb;
}

@media (min-width: 760px) {
  .page-shell {
    width: min(1180px, calc(100vw - 56px));
    padding-top: 26px;
  }

  .auth-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .auth-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-topbar-actions {
    display: flex;
  }

  .landing-hero-v2 {
    grid-template-columns: minmax(0, 1.04fr) minmax(520px, 0.96fr);
    gap: 34px;
  }

  .landing-hero-v3 {
    grid-template-columns: minmax(0, 1.02fr) minmax(560px, 0.98fr);
  }

  .landing-proof,
  .feature-grid,
  .landing-columns,
  .audience-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pipeline-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pipeline-ribbon {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
  }

  .integrations-showcase-shell {
    grid-template-columns: 1.16fr 0.84fr;
    align-items: stretch;
  }

  .integration-story-grid {
    align-self: stretch;
  }

  .product-command-grid {
    grid-template-columns: 1.15fr 0.92fr 0.92fr;
    align-items: start;
  }

  .integrations-stage {
    grid-template-columns: 1.1fr 1fr 1fr;
    align-items: stretch;
  }

  .integration-core {
    grid-row: span 2;
    min-height: 100%;
  }

  .product-stage {
    grid-template-columns: 1.1fr 0.9fr 0.9fr;
    align-items: start;
  }

  .product-screen-stock {
    min-height: 100%;
  }

  .contrast-grid {
    grid-template-columns: 0.9fr 1.1fr 0.9fr;
    align-items: stretch;
  }

  .cta-shell {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .detail-hero {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .detail-gallery-slide {
    min-width: min(100%, 720px);
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .add-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  }

  .add-layout.mobile-split-shell > .mobile-split-track {
    display: contents;
  }

  .add-recent-panel {
    overflow-y: auto;
  }

  .settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .settings-home-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .settings-account-stack {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .marketplace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 760px) and (max-width: 1119px) {
  .stock-selection-toolbar {
    top: calc(78px + env(safe-area-inset-top));
    left: 16px;
    right: 16px;
    max-width: none;
  }
}

@media (min-width: 1120px) {
  .app-shell:not(.app-shell-landing) {
    padding-bottom: 28px;
  }

  .app-shell:not(.app-shell-landing) .app-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 292px;
    height: 100vh;
    z-index: 60;
    background: linear-gradient(180deg, rgba(41, 37, 37, 0.98), rgba(20, 18, 18, 0.98));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }

  .app-shell:not(.app-shell-landing) .app-menu > .menu-panel {
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-sizing: border-box;
    background: transparent;
    border-right: none;
  }

  .app-shell:not(.app-shell-landing) .topbar {
    padding: 22px 28px 18px 332px;
  }

  .app-shell:not(.app-shell-landing) .page-shell {
    width: calc(100vw - 360px);
    max-width: none;
    margin: 0 28px 0 332px;
    padding: 24px 28px 36px;
    display: grid;
    justify-items: center;
  }

  .app-shell:not(.app-shell-landing) .page-shell > * {
    width: min(1280px, 100%);
    justify-self: center;
  }

  .page-messages .page-shell > * {
    width: min(1560px, 100%);
  }

  .app-shell:not(.app-shell-landing) .menu-button,
  .app-shell:not(.app-shell-landing) .menu-overlay {
    display: none !important;
  }

  .app-shell:not(.app-shell-landing) .menu-panel {
    position: static;
    width: 100%;
    height: 100%;
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 20px 18px 24px;
    box-shadow: none;
    background: transparent;
    border-right: none;
    border-radius: 0;
    transform: none !important;
    transition: none;
    overflow-y: auto;
  }

  .stock-selection-toolbar {
    top: 18px;
    left: calc(332px + 28px);
    right: 28px;
    max-width: none;
  }
}

@media (max-width: 1119px) {
  .app-shell:not(.app-shell-landing) .app-menu {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top));
    left: 16px;
    z-index: 80;
  }

  .app-shell:not(.app-shell-landing) .topbar {
    padding-left: 78px;
  }

  .app-shell:not(.app-shell-landing) .menu-button {
    position: static !important;
  }

  .menu-edge-swipe-zone {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 28px;
    z-index: 79;
    touch-action: pan-y;
    background: transparent;
  }

  body.menu-open-mobile .menu-edge-swipe-zone {
    display: none;
  }

  .pricing-layout.mobile-split-shell,
  .add-layout.mobile-split-shell,
  .pricing-origin-mobile-split.mobile-split-shell {
    display: block;
    overflow: hidden;
  }

  /* /add : `overflow: clip` (full, pas `hidden`) = clippe sur les 2 axes SANS
   * creer de scroll container. C'est la difference clef avec `hidden`: `clip`
   * n'expose pas d'interfaces de scroll → `scrollIntoView` ne scrolle pas le
   * shell mais le document → pas de pull-to-refresh declenche. De plus, `clip`
   * empeche le debordement vertical de la pane-side absolue (qui est aussi
   * longue que les "derniers ajouts") de propager vers le document → la page
   * reste a la hauteur de pane-main (form + EAN panel si affiche). */
  .add-layout.mobile-split-shell {
    overflow: clip;
  }

  /* /add : pane-side en position absolute pour qu'elle ne contribue pas a la
   * hauteur du track (flex container). Sinon track.height = max(pane-main,
   * pane-side), le document devient aussi long que pane-side et on peut scroll
   * sous pane-main jusqu'au bas des "derniers ajouts" alors qu'on est sur le
   * formulaire. Le JS (syncActivePaneHeight) garde le role de resize du shell
   * quand side open → shell.height = pane-side.height. Le transform
   * translateX(-100%) du track reste valide : pane-side a left:100% du track
   * se retrouve a left:0 du viewport apres la translation. */
  .add-layout.mobile-split-shell > .mobile-split-track {
    position: relative;
  }
  .add-layout.mobile-split-shell .mobile-split-pane-side {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
  }

  .pricing-layout.mobile-split-shell > .mobile-split-track,
  .add-layout.mobile-split-shell > .mobile-split-track,
  .pricing-origin-mobile-split.mobile-split-shell > .mobile-split-track {
    display: flex;
  }

  .mobile-split-track {
    display: flex;
    width: 100%;
    min-width: 100%;
    align-items: start;
    transition: transform 220ms ease;
    will-change: transform;
  }

  .mobile-split-shell.is-side-open .mobile-split-track {
    transform: translateX(-100%);
  }

  .mobile-split-shell.is-swiping .mobile-split-track {
    transition: none;
  }

  .mobile-split-pane {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
  }

  .mobile-split-pane-main {
    padding-right: 10px;
  }

  .mobile-split-pane-side {
    padding-left: 10px;
  }

  .mobile-side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, calc(100vw - 18px));
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    z-index: 96;
    margin: 0;
    border-radius: 26px 0 0 26px;
    border-right: 0;
    padding-top: calc(18px + env(safe-area-inset-top));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateX(calc(100% - var(--mobile-drawer-shift, 0px)));
    transition: transform 180ms ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  }

  .mobile-side-drawer.is-open {
    transform: translateX(var(--mobile-drawer-shift, 0px));
  }

  .mobile-side-drawer.is-swiping {
    transition: none;
  }

  .mobile-side-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 95;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .mobile-side-drawer-overlay.is-visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 759px) {
  .settings-inline-form-compact {
    grid-template-columns: 1fr;
  }

  .hero-stage-v3 {
    min-height: 780px;
  }

  .hero-item-card-v3,
  .hero-hub-v3,
  .hero-jobs-v3,
  .hero-sync-card {
    transform: scale(0.92);
    transform-origin: top left;
  }

  .hero-item-card-v3 {
    left: 12px;
    top: 28px;
  }

  .hero-hub-v3 {
    left: 140px;
    top: 236px;
  }

  .hero-jobs-v3 {
    right: 12px;
    top: 74px;
  }

  .hero-sync-card {
    left: 18px;
    bottom: 62px;
  }

  .hero-command-strip {
    overflow-x: auto;
  }

  .integration-wall {
    min-height: 360px;
  }

.publishability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .publish-card {
    padding: 14px;
  }
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ═══════════════════════════════════════════════════════════════════
   PICKING LIST  v2
   ═══════════════════════════════════════════════════════════════════ */

.picking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 16px;
}
.picking-header-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.picking-page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.picking-count {
  font-size: 2rem; font-weight: 800;
  color: var(--accent); letter-spacing: -0.02em;
}
.picking-updated { font-size: 0.8rem; }
.picking-refresh-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text); display: grid; place-items: center;
  cursor: pointer; flex-shrink: 0;
  transition: transform 200ms ease, background 160ms ease;
}
.picking-refresh-btn:hover { background: rgba(255,255,255,0.08); }
.picking-refresh-btn:active { transform: scale(0.88) rotate(-30deg); }
.picking-refresh-btn.is-loading { animation: pickingSpin 1s linear infinite; pointer-events: none; opacity: .5; }
@keyframes pickingSpin { to { transform: rotate(-360deg); } }

.picking-sync-gate {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
  border-color: rgba(242,179,106,0.32); background: rgba(242,179,106,0.08);
}
.picking-sync-gate-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Filters bar ── */
.picking-filters {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; padding: 0 0 16px;
}
.picking-tabs {
  display: flex; background: rgba(255,255,255,0.04);
  border-radius: 12px; padding: 3px; gap: 2px;
}
.picking-tab {
  padding: 7px 18px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
  transition: all 160ms ease;
  display: flex; align-items: center; gap: 6px;
}
.picking-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.picking-tab.is-active { background: rgba(255,255,255,0.1); color: var(--text); }
.picking-tab-badge {
  font-size: 0.72rem; font-weight: 700;
  background: rgba(223,143,120,0.2); color: var(--accent);
  padding: 1px 7px; border-radius: 100px;
  min-width: 18px; text-align: center;
}
.picking-channels {
  display: flex; gap: 6px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.picking-channels::-webkit-scrollbar { display: none; }
.picking-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: var(--muted); font-size: 0.82rem; font-weight: 600;
  white-space: nowrap; text-decoration: none;
  transition: all 180ms ease; cursor: pointer;
}
.picking-pill:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.picking-pill.is-active { background: var(--accent); color: #1b1516; border-color: var(--accent); }
.picking-pill-count {
  font-size: 0.72rem; font-weight: 700;
  background: rgba(255,255,255,0.1);
  padding: 0 6px; border-radius: 100px;
}
.picking-pill.is-active .picking-pill-count { background: rgba(27,21,22,0.15); }
.picking-pill-dot { width: 6px; height: 6px; border-radius: 50%; }
.picking-pill-dot--warn { background: #f2b36a; }
.picking-pill-dot--error { background: #ff8d8d; }
.picking-pill--amazon.is-active { background: #ff9900; border-color: #ff9900; }
.picking-pill--rakuten.is-active { background: #bf0000; border-color: #bf0000; color: #fff; }
.picking-pill--ebay.is-active { background: #e53238; border-color: #e53238; color: #fff; }
.picking-pill--lbc.is-active { background: #f56b2a; border-color: #f56b2a; color: #fff; }
.picking-sort { display: flex; gap: 6px; margin-left: auto; }
.picking-select {
  padding: 6px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text); font-size: 0.8rem; cursor: pointer;
}

/* ── Card grid ── */
.picking-grid { display: grid; gap: 12px; }

/* ── Card ── */
.picking-card {
  display: grid; gap: 12px;
  padding: 18px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  background: var(--panel);
  transition: border-color 160ms ease, box-shadow 160ms ease;
  animation: pickFadeIn 350ms ease backwards;
}
.picking-card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
@keyframes pickFadeIn { from { opacity: 0; transform: translateY(8px); } }
.picking-card:nth-child(1) { animation-delay: 0ms; }
.picking-card:nth-child(2) { animation-delay: 30ms; }
.picking-card:nth-child(3) { animation-delay: 60ms; }
.picking-card:nth-child(4) { animation-delay: 90ms; }
.picking-card:nth-child(5) { animation-delay: 120ms; }
.picking-card:nth-child(n+6) { animation-delay: 150ms; }

/* Not-found state: signale aux autres pickers qu'un item a deja ete cherche sans succes */
.picking-card--not-found {
  border-color: rgba(224,95,95,0.35);
  background: linear-gradient(90deg, rgba(224,95,95,0.07) 0%, var(--panel) 40%);
  box-shadow: inset 3px 0 0 0 var(--danger, #e05f5f);
}
.picking-card--not-found:hover {
  border-color: rgba(224,95,95,0.55);
  box-shadow: inset 3px 0 0 0 var(--danger, #e05f5f), 0 4px 20px rgba(0,0,0,0.12);
}

/* "En attente" state : note libre saisie via le bouton "Preciser". Meme
   traitement visuel que `--not-found` (bordure tintee + ombre intrusive a
   gauche) mais en orange/warning au lieu de rouge/danger. */
.picking-card--hold {
  border-color: rgba(244,185,66,0.4);
  background: linear-gradient(90deg, rgba(244,185,66,0.07) 0%, var(--panel) 40%);
  box-shadow: inset 3px 0 0 0 var(--warning, #f2b36a);
}
.picking-card--hold:hover {
  border-color: rgba(244,185,66,0.6);
  box-shadow: inset 3px 0 0 0 var(--warning, #f2b36a), 0 4px 20px rgba(0,0,0,0.12);
}
/* Cas ou une card est a la fois --not-found ET --hold (user a marque
   "Pas trouve" apres avoir laisse une note). Priorite visuelle au
   --not-found (rouge) car c'est l'info la plus importante ; la bordure
   droite reste orange pour signaler qu'il y a aussi une note. */
.picking-card--not-found.picking-card--hold {
  border-color: rgba(224,95,95,0.35);
  background: linear-gradient(90deg, rgba(224,95,95,0.07) 0%, var(--panel) 40%);
  box-shadow: inset 3px 0 0 0 var(--danger, #e05f5f),
              inset -3px 0 0 0 var(--warning, #f2b36a);
}
.picking-card--not-found.picking-card--hold:hover {
  box-shadow: inset 3px 0 0 0 var(--danger, #e05f5f),
              inset -3px 0 0 0 var(--warning, #f2b36a),
              0 4px 20px rgba(0,0,0,0.12);
}

/* Card top row */
.picking-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.picking-card-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }

/* Channel tag */
.picking-tag {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 3px 9px; border-radius: 6px;
}
.picking-tag--amazon { background: rgba(255,153,0,0.15); color: #ff9900; }
.picking-tag--rakuten { background: rgba(191,0,0,0.15); color: #ff4d4d; }
.picking-tag--ebay { background: rgba(229,50,56,0.15); color: #e53238; }
.picking-tag--lbc { background: rgba(245,107,42,0.15); color: #f56b2a; }

/* Badges */
.picking-badge {
  font-size: 0.68rem; font-weight: 700; padding: 2px 8px;
  border-radius: 6px; white-space: nowrap;
}
.picking-badge--done { background: rgba(125,214,170,0.15); color: var(--success); }
.picking-badge--status { background: rgba(138,168,191,0.15); color: var(--ink-blue); }
.picking-badge--warn { background: rgba(242,179,106,0.15); color: var(--warning); }
/* Quantite > 1 : badge tres visible, doit sauter aux yeux du picker pour
   eviter d'oublier d'emballer la 2eme/3eme unite. */
.picking-badge--qty {
  background: var(--warning, #f4b942);
  color: #1a1306;
  font-size: 1rem;
  font-weight: 800;
  padding: 4px 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 1px 3px rgba(244,185,66,0.4);
}
/* Quantite > 1 : on imprime un gros "x2"/"x3"/... en watermark derriere
   le contenu de la card (gradient orange estompe). Le but est que le
   picker reconnaisse une commande multi-unite au premier coup d'oeil
   sans avoir a lire le badge. La valeur est lue depuis data-qty. */
.picking-card--multi-qty {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.picking-card--multi-qty::before {
  content: "x" attr(data-qty);
  position: absolute;
  top: 50%;
  right: 3%;
  transform: translateY(-50%);
  font-size: clamp(6rem, 14vw, 11rem);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.06em;
  font-family: system-ui, -apple-system, sans-serif;
  background: linear-gradient(115deg,
    rgba(244,185,66,0.32) 0%,
    rgba(244,185,66,0.18) 40%,
    rgba(244,185,66,0.05) 80%,
    rgba(244,185,66,0) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  pointer-events: none;
  user-select: none;
  z-index: -1;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .picking-card--multi-qty::before {
    font-size: clamp(7rem, 32vw, 12rem);
    right: 4%;
  }
}

.picking-badge--notfound {
  background: rgba(224,95,95,0.18);
  color: var(--danger, #e05f5f);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border: 1px solid rgba(224,95,95,0.35);
}
/* Badge "En attente" (note libre saisie via bouton "Preciser"). Calque
   sur picking-badge--notfound mais en orange. Cliquable : ouvre le
   prompt JS pour modifier la note (ou la retirer en validant vide). */
.picking-badge--hold {
  background: rgba(244,185,66,0.15);
  color: var(--warning, #f2b36a);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border: 1px solid rgba(244,185,66,0.4);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}
.picking-badge--hold:hover {
  background: rgba(244,185,66,0.25);
  border-color: rgba(244,185,66,0.6);
}

/* Product row */
.picking-card-product { display: flex; align-items: center; gap: 14px; }
.picking-thumb {
  width: 64px; height: 64px; border-radius: 12px;
  object-fit: cover; flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}
.picking-thumb--empty {
  display: grid; place-items: center;
  color: rgba(255,255,255,0.12);
}
.picking-card-thumbs { display: flex; flex-shrink: 0; }
.picking-mini-thumb {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover; border: 2px solid var(--panel);
  margin-left: -8px; position: relative;
}
.picking-mini-thumb:first-child { margin-left: 0; }
.picking-mini-thumb--empty,
.picking-mini-thumb--more {
  background: rgba(255,255,255,0.06);
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700; color: var(--muted);
}
.picking-card-text { min-width: 0; }
.picking-card-title {
  font-size: 0.95rem; font-weight: 600; margin: 0; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.picking-card-title-link { color: inherit; text-decoration: none; }
.picking-card-title-link:hover .picking-card-title { text-decoration: underline; }
.picking-card-sku { font-size: 0.78rem; color: var(--muted); }

/* Numbers row */
.picking-card-numbers { display: flex; gap: 4px; flex-wrap: wrap; }
.picking-num {
  flex: 1; min-width: 64px; padding: 8px 10px;
  border-radius: 10px; background: rgba(255,255,255,0.03);
  text-align: center;
}
.picking-num-val { display: block; font-size: 0.88rem; font-weight: 700; line-height: 1.2; }
.picking-num-val--green { color: var(--success); }
.picking-num-val--red { color: var(--danger); }
.picking-num-lbl {
  display: block; font-size: 0.65rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-top: 1px;
}

/* Warning (unmatched) */
.picking-card-warn {
  padding: 8px 12px; border-radius: 10px;
  background: rgba(242,179,106,0.08); border: 1px solid rgba(242,179,106,0.18);
  font-size: 0.82rem; color: var(--warning);
}

/* Bundle */
.picking-bundle { border-radius: 10px; overflow: hidden; }
.picking-bundle summary {
  padding: 8px 14px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; background: rgba(255,255,255,0.03);
  border-radius: 10px; list-style: none;
  transition: background 160ms ease;
}
.picking-bundle summary::-webkit-details-marker { display: none; }
.picking-bundle summary::before { content: "\25B8 "; }
.picking-bundle[open] summary::before { content: "\25BE "; }
.picking-bundle summary:hover { background: rgba(255,255,255,0.06); }
.picking-bundle-list { display: grid; gap: 6px; padding: 10px 0 4px; }
.picking-bundle-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 8px; font-size: 0.85rem;
}
.picking-bundle-row:hover { background: rgba(255,255,255,0.03); }
.picking-bundle-img {
  width: 40px; height: 40px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
}
.picking-bundle-img--empty {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.35);
  font-size: 1.1rem;
}
/* Rakuten bundle: per-item rows with the cancel ✕ on the right */
.picking-bundle--rakuten summary {
  background: rgba(191,18,29,0.10);
  color: var(--rakuten, #ff5c4d);
}
.picking-bundle--rakuten summary:hover { background: rgba(191,18,29,0.16); }
.picking-bundle-row--rakuten {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
}
.picking-bundle-row--rakuten[data-item-state="history"] {
  opacity: 0.55;
}
.picking-bundle-row-text {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.picking-bundle-row-text strong { font-size: 0.85rem; }
.picking-bundle-row-text .muted { font-size: 0.72rem; }
.picking-bundle-row-text .picking-badge { align-self: flex-start; margin-top: 2px; }
.picking-bundle-row-price {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent, #f0c040);
  align-self: flex-start;
  margin-top: 2px;
}
.picking-bundle-row-actions {
  display: flex; flex-direction: row; align-items: center; gap: 4px;
  flex-wrap: nowrap;
}
.picking-bundle-row-form { margin: 0; }
.picking-bundle-cancel-form { margin: 0; }

/* Rakuten bundle confirm: one barcode input per item type (grouped by sku),
   shown as a vertical stack of mini-rows so the picker scans one code per
   product, regardless of how many units of the same item are in the order. */
.picking-rk-bundle-confirm {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}
.picking-rk-barcode-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.picking-rk-barcode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}
.picking-rk-barcode-thumb {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}
.picking-rk-barcode-thumb--empty {
  display: grid; place-items: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
}
.picking-rk-barcode-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.picking-rk-barcode-text strong { font-size: 0.85rem; line-height: 1.25; }
.picking-rk-barcode-text .muted { font-size: 0.7rem; }
.picking-rk-barcode-qty {
  display: inline-block;
  background: var(--warning, #f4b942);
  color: #1a1306;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 0.85rem;
  margin-right: 4px;
}
.picking-rk-barcode-shell { flex-shrink: 0; }

/* ── Buttons ── */
.picking-card-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.picking-card-actions form { margin: 0; }
.picking-confirm-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.picking-barcode-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.picking-barcode-input {
  width: 200px; max-width: 220px;
  padding: 6px 38px 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(14,12,12,0.7);
  color: var(--text);
  font-size: 0.82rem;
}
.picking-barcode-input:focus {
  outline: none;
  border-color: rgba(125,214,170,0.45);
  box-shadow: 0 0 0 2px rgba(125,214,170,0.15);
}
.picking-barcode-input::placeholder { color: rgba(255,255,255,0.35); }
.picking-scan-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.picking-scan-btn:hover {
  background: rgba(125,214,170,0.18);
  color: rgba(125,214,170,0.95);
}
.picking-scan-btn:focus-visible {
  outline: 2px solid rgba(125,214,170,0.55);
  outline-offset: 1px;
}

.picking-store-barcode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(125,214,170,0.10);
  border: 1px dashed rgba(125,214,170,0.35);
  font-size: 0.82rem;
}
.picking-store-barcode-label {
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}
.picking-store-barcode-value {
  color: rgba(125,214,170,0.95);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  user-select: all;
}

/* Clic sur le chip copie le code magasin dans le presse-papier (handler
   global data-copy dans base.js). Signale le geste en soulignant UNIQUEMENT
   la valeur (pas le label "Code magasin") pour rester lisible. */
.picking-store-barcode--copyable {
  cursor: pointer;
}
.picking-store-barcode--copyable .picking-store-barcode-value {
  border-bottom: 1px dashed rgba(125,214,170,0.55);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.picking-store-barcode--copyable:hover .picking-store-barcode-value {
  color: #a8f0cc;
  border-bottom-color: rgba(168,240,204,0.85);
}
.picking-store-barcode--copyable.copy-on-click-done .picking-store-barcode-value {
  color: var(--success, #4caf50);
  border-bottom-color: var(--success, #4caf50);
}

/* Form de saisie du code magasin sur l'onglet Bordereau (quand l'user
   a oublie au moment de "Confirmer la vente"). Compact, inline. */
.picking-store-barcode-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
}
.picking-barcode-shell--inline {
  flex: 1;
  min-width: 0;
}
.picking-store-barcode-submit {
  flex-shrink: 0;
}

/* eBay shipping label mini-form (Bordereau tab, Packlink Pro). Pattern :
   panneau sombre subtil aligne sur le design Achflow (rgba blanc 3-8%),
   inputs compacts sans surface visible, label + valeur en colonne. */
.picking-ebay-label-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  margin: 4px 0 2px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.picking-ebay-label-form > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.picking-ebay-label-form > label > input {
  width: 70px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  -moz-appearance: textfield;
}
.picking-ebay-label-form > label > input::-webkit-outer-spin-button,
.picking-ebay-label-form > label > input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.picking-ebay-label-form > label > input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.4);
}
.picking-ebay-label-form > label.picking-ebay-label-form-weight > input {
  width: 80px;
}
.picking-ebay-label-form > .picking-ebay-label-form-submit {
  margin-left: auto;
}
@media (max-width: 700px) {
  .picking-ebay-label-form > label > input {
    width: 100%;
    text-align: left;
  }
  .picking-ebay-label-form > label {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
  .picking-ebay-label-form > .picking-ebay-label-form-submit {
    margin-left: 0;
    flex: 1 1 100%;
  }
}


.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px; border-radius: 10px;
  font-size: 0.82rem; font-weight: 700; border: none;
  cursor: pointer; text-decoration: none;
  transition: all 180ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:active { transform: scale(0.95); }
.btn--primary { background: var(--accent); color: #1b1516; }
.btn--primary:hover { box-shadow: 0 4px 14px rgba(223,143,120,0.3); }
.btn--danger { background: rgba(255,100,100,0.12); color: #ff8d8d; border: 1px solid rgba(255,100,100,0.2); }
.btn--danger:hover { background: rgba(255,100,100,0.2); }
.btn--outline { background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid rgba(255,255,255,0.1); }
.btn--outline:hover { background: rgba(255,255,255,0.1); }
.btn--ghost { background: none; color: var(--muted); padding: 6px 12px; }
.btn--ghost:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.btn--sm { padding: 6px 12px; font-size: 0.78rem; }
.btn--xs { padding: 4px 10px; font-size: 0.72rem; }

/* ── Empty state ── */
.picking-empty {
  text-align: center; padding: 56px 20px;
  color: var(--muted); grid-column: 1 / -1;
  animation: pickFadeIn 500ms ease backwards;
}
.picking-empty svg { margin-bottom: 12px; }
.picking-empty p { margin: 0; font-size: 0.92rem; }

/* ── Mobile ── */
@media (max-width: 700px) {
  .picking-filters { gap: 8px; }
  .picking-card { padding: 14px; }
  .picking-thumb { width: 52px; height: 52px; }
  .picking-card-title { font-size: 0.88rem; }
  .picking-num { min-width: 56px; padding: 6px 6px; }
  .picking-num-val { font-size: 0.8rem; }
  .btn--sm, .btn--primary, .btn--danger, .btn--outline { flex: 1; justify-content: center; min-height: 40px; }
  .picking-sort { margin-left: 0; width: 100%; }
  .picking-sync-gate { flex-direction: column; align-items: flex-start; }
  .picking-count { font-size: 1.6rem; }
}
@media (max-width: 420px) {
  .picking-card-numbers { gap: 3px; }
  .picking-num { min-width: 0; padding: 5px 4px; }
  .picking-num-val { font-size: 0.75rem; }
  .picking-num-lbl { font-size: 0.58rem; }
}

.ai-behaviors-overview-panel,
.ai-behavior-panel,
.ai-agent-panel {
  display: grid;
  gap: 18px;
}

.ai-behavior-panel-head,
.ai-agent-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.ai-behavior-helper-box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-behavior-feedback {
  min-height: 1.2rem;
  margin: 0;
}

.ai-agent-base-box,
.ai-agent-doc-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.ai-agent-base-box summary,
.ai-agent-doc-card summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
}

.ai-agent-base-text,
.ai-agent-doc-text {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.55;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.94rem;
}

.ai-agent-docs-box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-agent-docs-head h3 {
  margin: 0 0 6px;
}

.ai-agent-upload-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.ai-agent-upload-form .input[type="file"] {
  flex: 1 1 320px;
}

.ai-agent-doc-list {
  display: grid;
  gap: 12px;
}

.ai-agent-hub-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.ai-agent-hub-card {
  display: grid;
  gap: 16px;
}

.ai-agent-hub-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.ai-agent-hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .picking-sync-gate {
    flex-direction: column;
    align-items: flex-start;
  }

  .picking-card-top {
    flex-direction: column;
  }

  .picking-card-meta {
    justify-content: flex-start;
  }

  .picking-card-actions {
    width: 100%;
  }

  .picking-bundle-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .picking-bundle-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 759px) {
  .pagination {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .pagination .button {
    width: 100%;
    justify-content: center;
  }

  .pagination-label {
    grid-column: 1 / -1;
    text-align: center;
  }

  .topbar {
    gap: 10px;
    padding: calc(12px + env(safe-area-inset-top)) 12px 10px;
  }

  .brand-inline {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-inline > div:last-child {
    min-width: 0;
  }

  .topbar .brand-inline .brand-subtitle {
    display: none;
  }

  .brand-title {
    font-size: 0.98rem;
    line-height: 1.1;
  }

  .menu-panel {
    width: min(320px, calc(100vw - 12px));
    padding-left: 14px;
    padding-right: 14px;
    backdrop-filter: blur(10px);
  }

  .page-shell,
  .page-messages .page-shell {
    width: min(100%, calc(100vw - 20px));
    padding-top: 14px;
    padding-bottom: calc(32px + var(--mobile-overlay-stack-height));
  }

  .toolbar,
  .panel,
  .form-panel,
  .detail-photo-card {
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 20px;
  }

  .input,
  .select,
  .textarea,
  .button,
  .action-button,
  .mini-button {
    font-size: 16px;
  }

  .button,
  .action-button,
  .mini-button {
    min-height: 46px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-header-actions,
  .header-actions,
  .form-actions,
  .review-actions,
  .marketplace-actions,
  .picking-card-actions,
  .picking-sync-gate-actions,
  .landing-actions,
  .messages-sidebar-top-actions,
  .ai-agent-upload-form {
    width: 100%;
    align-items: stretch;
  }

  .page-header-actions > *,
  .header-actions > *,
  .form-actions > *,
  .review-actions > *,
  .marketplace-actions > *,
  .picking-card-actions > *,
  .picking-sync-gate-actions > *,
  .landing-actions > *,
  .messages-sidebar-top-actions > * {
    flex: 1 1 100%;
  }

  .page-header-actions form,
  .header-actions form,
  .form-actions form,
  .review-actions form,
  .marketplace-actions form,
  .picking-card-actions form,
  .picking-sync-gate-actions form {
    width: 100%;
  }

  .page-header-actions .button,
  .header-actions .button,
  .form-actions .button,
  .review-actions .button,
  .marketplace-actions .button,
  .picking-card-actions .button,
  .picking-sync-gate-actions .button,
  .landing-actions .button,
  .messages-sidebar-top-actions .button,
  .page-header-actions .action-button,
  .form-actions .action-button,
  .picking-card-actions .action-button {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .toolbar {
    gap: 12px;
  }

  .toolbar > *,
  .stock-toolbar > *,
  .stock-filters-drawer,
  .stock-search-shell,
  .stock-toolbar-actions {
    width: 100%;
  }

  .stock-toolbar .select,
  .stock-toolbar > .input,
  .stock-toolbar > .button {
    flex: 1 1 100%;
  }

  .stock-search-shell {
    min-width: 0;
    flex-basis: 100%;
  }

  .stock-search-input {
    padding-right: 6.6rem;
  }

  .stock-filter-range {
    flex-direction: column;
  }

  .stock-filter-range .input {
    width: 100%;
  }

  .image-search-head {
    flex-direction: column;
    align-items: stretch;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .item-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
  }

  .item-card-media,
  .item-card-media .media-fallback {
    width: 72px;
    height: 72px;
    min-height: 72px;
  }

  .item-card-title {
    font-size: 1rem;
  }

  .add-recent-card {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .add-recent-media {
    width: 68px;
    height: 68px;
  }

  .human-task-item-row {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
  }

  .review-top,
  .marketplace-card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .review-top .badge,
  .marketplace-card-top .badge {
    align-self: flex-start;
  }

  .review-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .review-actions > *,
  .review-actions form {
    width: 100%;
    min-width: 0;
  }

  .pricing-review-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pricing-modify-form {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .pricing-price-input {
    width: 100% !important;
  }

  .stock-card-thumb,
  .picking-card-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
  }

  .picking-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .picking-summary-count {
    font-size: 1.6rem;
  }

  .picking-tab-nav {
    width: 100%;
  }

  .picking-tab-nav > * {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }

  /* Picking main tabs (Picking list / Confirmer / Bordereau / Caisse /
     Historique) : sur telephone portrait, les 5 tabs avec leur libelle
     complet debordent hors de l'ecran et "Caisse" + "Historique"
     n'etaient plus visibles. On compacte le padding + font-size et on
     autorise le scroll horizontal comme filet de secours. */
  .picking-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    max-width: 100%;
  }
  .picking-tabs::-webkit-scrollbar { display: none; }
  .picking-tab {
    padding: 6px 10px;
    font-size: 0.78rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .picking-copy-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .picking-bundle-card {
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
  }

  .picking-bundle-shell {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .picking-bundle-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .picking-bundle-copy {
    gap: 3px;
  }

  .picking-bundle-copy strong {
    font-size: 0.96rem;
    word-break: break-word;
  }

  .picking-bundle-label {
    padding-bottom: 2px;
  }

  .page-add .page-shell {
    padding-bottom: calc(104px + env(safe-area-inset-bottom) + var(--mobile-overlay-stack-height));
  }

  .add-submit-dock {
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 8px 10px;
    border-radius: 20px;
    gap: 10px;
    align-items: center;
  }

  .add-submit-dock-copy {
    display: grid;
    gap: 2px;
  }

  .add-submit-dock-copy[hidden] {
    display: none;
  }

  .add-submit-dock-help {
    font-size: 0.74rem;
  }

  .add-submit-dock-note {
    font-size: 0.7rem;
  }

  .add-submit-dock-button {
    width: auto;
    min-width: 132px;
    flex: 0 0 auto;
    padding-inline: 14px;
  }

  .add-submit-dock-copy[hidden] + .add-submit-dock-button {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  body.add-submit-dock-ready .add-form-actions.is-dock-anchor-visible {
    padding: 8px 10px;
    border-radius: 20px;
    gap: 10px;
    align-items: center;
  }

  body.add-submit-dock-ready .add-form-actions.is-dock-anchor-visible .add-form-actions-copy {
    gap: 2px;
  }

  body.add-submit-dock-ready .add-form-actions.is-dock-anchor-visible #create_item_button {
    min-width: 132px;
    padding-inline: 14px;
  }

  .page-add .assistant-fab {
    bottom: calc(24px + env(safe-area-inset-bottom));
    --assistant-fab-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .page-add .floating-import-widget,
  .page-add .mobile-install-widget {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .assistant-fab {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    --assistant-fab-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .assistant-fab-toggle {
    width: 58px;
    height: 58px;
    padding: 0;
    border-radius: 20px;
    display: inline-grid;
    place-items: center;
    justify-content: center;
  }

  .assistant-fab-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    line-height: 0;
    transform: none;
  }

  .assistant-fab-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: none;
    overflow: visible;
  }

  .assistant-fab-toggle span:last-child {
    display: none;
  }

  .assistant-fab-panel {
    left: 10px;
    right: 10px;
    width: auto;
    height: min(68dvh, calc(100dvh - 92px));
    backdrop-filter: blur(10px);
  }

  .assistant-fab-panel.is-expanded {
    left: 10px;
    right: 10px;
    width: auto;
    height: min(82dvh, calc(100dvh - 24px));
  }

  .assistant-fab-handle .muted {
    display: none;
  }

  .floating-import-widget,
  .mobile-install-widget {
    left: 10px;
    right: 10px;
    width: auto;
    padding: 14px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
  }

  .floating-import-widget-top,
  .mobile-install-widget-top {
    align-items: flex-start;
  }

  .mobile-install-widget-actions .button {
    flex: 1 1 100%;
  }

  .page-landing .page-shell::before,
  .landing-hero-v3::before,
  .landing-hero-v3::after,
  .hero-item-card-v3,
  .hero-hub-v3,
  .hero-jobs-v3,
  .hero-sync-card,
  .marketplace-orbit-v3 .orbit-badge,
  .hero-command-strip span,
  .signal-dot-live,
  .signal-dot-alert,
  .job-dot-live,
  .job-dot-alert,
  .hero-sync-bars span,
  .flow-line,
  .hero-panel-primary::before,
  .hero-panel-primary::after {
    animation: none !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .button:hover,
  .action-button:hover,
  .mini-button:hover,
  .menu-link:hover,
  .item-card:hover,
  .add-recent-card:hover,
  .picking-summary-card-link:hover,
  .pipeline-ribbon-node:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 420px) {
  .picking-summary-grid {
    grid-template-columns: 1fr;
  }

  .picking-tab-nav > * {
    flex-basis: 100%;
  }
}

.messages-layout-v4 {
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
  height: calc(100vh - 212px);
}

.messages-page-toolbar {
  padding: 12px 16px;
}

.messages-page-toolbar-copy p {
  margin: 4px 0 0;
}

.messages-page-toolbar .pricing-strip-actions {
  gap: 10px;
}

.messages-layout-v4 .messages-sidebar-shell,
.messages-layout-v4 .messages-workspace,
.messages-layout-v4 .messages-chat-panel-v4 {
  min-width: 0;
  min-height: 0;
}

.messages-layout-v4 .messages-sidebar-shell {
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}

.messages-sidebar-heading h2 {
  margin: 2px 0 0;
}

.messages-sidebar-intro {
  margin: 4px 0 0;
  max-width: 42ch;
  font-size: 0.88rem;
}

.messages-layout-v4 .messages-thread-list {
  overflow-y: auto;
  min-height: 0;
  padding-right: 6px;
}

.messages-layout-v4 .messages-workspace {
  display: grid;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  height: 100%;
}

.messages-chat-panel-v4 {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background:
    radial-gradient(circle at top right, rgba(223, 143, 120, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(31, 26, 26, 0.97), rgba(18, 15, 15, 0.96));
}

.messages-thread-hero {
  display: grid;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.messages-thread-hero-compact {
  min-width: 0;
}

.messages-thread-hero-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.messages-thread-headline {
  display: grid;
  gap: 4px;
}

.messages-thread-headline-main {
  min-width: 0;
}

.messages-thread-hero h2 {
  margin: 0;
  font-size: clamp(1.12rem, 1.55vw, 1.35rem);
}

.messages-thread-hero-product,
.messages-thread-hero-secondary {
  margin: 0;
}

.messages-thread-hero-product {
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
}

.messages-thread-hero-secondary {
  color: var(--muted);
  font-size: 0.92rem;
}

.messages-thread-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-self: start;
}

.messages-thread-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.messages-thread-meta-pill strong {
  color: var(--text);
}

.messages-thread-activity-inline {
  color: var(--muted);
  font-size: 0.84rem;
  margin-left: auto;
}

.messages-linked-context {
  padding: 0;
}

.messages-linked-context .message-item-card {
  margin: 0;
}

.messages-thread-context-drawer {
  margin: 0 16px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.messages-thread-context-drawer summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text);
}

.messages-thread-context-drawer summary::-webkit-details-marker {
  display: none;
}

.messages-thread-context-drawer[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.messages-linked-context-compact .message-item-spotlight-compact {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.messages-linked-context-compact .message-item-spotlight-image {
  width: 88px;
  height: 88px;
  min-height: 88px;
}

.messages-linked-context-compact .message-item-spotlight-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.message-item-inline-button {
  align-self: flex-start;
  margin-top: 4px;
}

.messages-layout-v4 .messages-conversation-stream-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.messages-layout-v4 .messages-conversation-stream {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding: 14px 16px 18px;
  background:
    linear-gradient(180deg, rgba(20, 17, 17, 0.82), rgba(14, 12, 12, 0.92));
}

.messages-thread-empty {
  padding: 0 22px 22px;
}

.messages-layout-v4 .messages-compose-panel {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(13, 11, 11, 0.88);
}

.messages-layout-v4 .message-thread-card {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  min-height: 0;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.messages-layout-v4 .message-thread-card:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 179, 106, 0.18);
}

.message-thread-channel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.message-thread-reference {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.message-thread-product {
  margin: 2px 0 0;
  font-weight: 700;
  color: var(--text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.messages-empty-panel-v4 {
  min-height: 520px;
  place-items: center;
  padding: 28px;
}

.messages-layout-v4 .message-thread-snippet {
  display: -webkit-box;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.messages-layout-v4 .message-thread-meta {
  margin-top: 5px;
  gap: 8px;
  font-size: 0.82rem;
}

@media (max-width: 1180px) {
  .messages-layout-v4 {
    grid-template-columns: 1fr;
    height: auto;
  }

  .messages-thread-meta-strip {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .messages-layout-v4 .messages-sidebar-shell {
    padding: 16px;
  }

  .messages-layout-v4.has-thread .messages-sidebar-shell {
    display: none;
  }

  .messages-layout-v4.is-list-mode .messages-workspace {
    display: none;
  }

  .messages-layout-v4 .messages-chat-panel-v4 {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .messages-thread-hero,
  .messages-layout-v4 .messages-conversation-stream,
  .messages-layout-v4 .messages-compose-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .messages-thread-context-drawer {
    margin-left: 16px;
    margin-right: 16px;
  }

  .messages-linked-context-compact .message-item-spotlight-compact {
    grid-template-columns: 1fr;
  }

  .messages-layout-v4 .message-thread-card {
    grid-template-columns: 1fr;
  }

  .messages-layout-v4 .message-thread-card-media {
    width: auto;
    min-width: 0;
  }

  .messages-layout-v4 .message-thread-marketplace-logo {
    right: auto;
    left: 42px;
  }
}

/* ═══════════════════════════════════════════════════════
   MESSAGES V6 — 3-column layout, full-width
   ═══════════════════════════════════════════════════════ */

/* ── Page-level: full-height, full-width, no padding ── */
.page-messages .page-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  height: calc(100dvh - 80px);
  max-height: calc(100dvh - 80px);
  min-height: 480px;
  padding: 0;
  overflow: hidden;
}

/* Desktop sidebar: override the 0-3-0 specificity rule from app-shell layout */
@media (min-width: 1120px) {
  .app-shell-messages:not(.app-shell-landing) .page-shell {
    padding: 0;
    height: calc(100dvh - 80px);
    max-height: calc(100dvh - 80px);
    overflow: hidden;
  }
}

/* msg-layout must take full width, override the 1560px cap on page-shell children */
.page-messages .page-shell > .msg-layout {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.msg-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.msg-layout.msg-has-thread {
  grid-template-columns: 340px minmax(0, 1fr) 340px;
}

/* ── Sidebar ── */
.msg-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
}

.msg-sidebar-head {
  display: grid;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.msg-sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.msg-sidebar-title-row h2 {
  margin: 0;
  font-size: 1.15rem;
}

.msg-sidebar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.msg-sidebar-actions .button {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.msg-sidebar-actions a.button {
  padding: 6px 8px;
}

.msg-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.msg-filters .select {
  font-size: 0.8rem;
  padding: 6px 8px;
}

/* ── Sync dropdown ── */
.msg-sync-dd {
  position: relative;
}

.msg-sync-dd summary {
  list-style: none;
}

.msg-sync-dd summary::-webkit-details-marker {
  display: none;
}

.msg-sync-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 150px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(21, 18, 18, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.msg-sync-pop .button {
  width: 100%;
  justify-content: flex-start;
}

/* ── Thread list ── */
.msg-thread-list {
  overflow-y: auto;
  min-height: 0;
  padding: 6px;
}

/* ── Thread card ── */
.msg-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: background 120ms ease;
}

.msg-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.msg-card.is-active {
  background: var(--accent-soft);
}

.msg-card-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.msg-card-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #8f522b);
}

.msg-card-mp {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--bg);
}

.msg-card-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.msg-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.msg-card-name {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.msg-card-time {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.msg-card-product {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-card-snippet {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.4;
}

.msg-card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.msg-card-foot .status-pill {
  padding: 3px 8px;
  font-size: 0.72rem;
}

.msg-card-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: auto;
}

.msg-empty-list {
  padding: 32px 16px;
  text-align: center;
}

/* ── Workspace / Chat panel ── */
.msg-workspace {
  display: grid;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.msg-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.msg-back {
  display: none;
  padding: 10px 14px;
  gap: 6px;
  align-items: center;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--line);
}

/* ── Thread header ── */
.msg-thread-head {
  display: grid;
  gap: 6px;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--line);
}

.msg-thread-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.msg-thread-identity {
  min-width: 0;
}

.msg-thread-identity h2 {
  margin: 0;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-thread-product {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-thread-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.msg-thread-badges .status-pill {
  padding: 4px 10px;
  font-size: 0.76rem;
}

.msg-ref {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.msg-thread-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

.msg-thread-meta span::before {
  content: "";
}

/* ── Context drawer ── */
.msg-context-drawer {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.msg-context-drawer summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.msg-context-drawer summary::-webkit-details-marker {
  display: none;
}

.msg-context-drawer[open] summary {
  border-bottom: 1px solid var(--line);
}

.msg-context-body {
  padding: 12px 20px;
}

.msg-item-link {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.msg-item-link:hover {
  opacity: 0.85;
}

.msg-item-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.msg-item-info {
  display: grid;
  gap: 2px;
  font-size: 0.88rem;
}

/* ── Message stream ── */
.msg-stream-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.msg-load-older {
  padding: 10px 20px 0;
  text-align: center;
}

.msg-load-older .button {
  font-size: 0.82rem;
}

.msg-stream {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 16px 20px 20px;
  overflow-y: auto;
  min-height: 0;
}

.msg-stream-empty {
  padding: 20px;
  text-align: center;
}

/* ── Message rows & bubbles ── */
.msg-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 75%;
}

.msg-row-out {
  align-items: flex-end;
  align-self: flex-end;
}

.msg-row-sys {
  align-items: center;
  align-self: center;
  max-width: 85%;
}

.msg-bubble {
  display: grid;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.msg-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
}

.msg-bubble-out {
  background: rgba(223, 143, 120, 0.14);
  border-color: rgba(223, 143, 120, 0.22);
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 16px;
}

.msg-bubble-sys {
  background: rgba(138, 168, 191, 0.1);
  border-color: rgba(138, 168, 191, 0.18);
  border-radius: 12px;
  text-align: center;
}

.msg-bubble-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.msg-bubble-head strong {
  font-size: 0.8rem;
  color: var(--accent);
}

.msg-row-in .msg-bubble-head strong {
  color: var(--ink-blue);
}

.msg-row-sys .msg-bubble-head strong {
  color: var(--muted);
}

.msg-bubble-head time {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.msg-bubble-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 210, 127, 0.14);
  color: #ffe1a2;
  border: 1px solid rgba(255, 210, 127, 0.2);
}

/* ── Compose ── */
.msg-compose {
  display: grid;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  background: rgba(18, 15, 15, 0.6);
}

.msg-compose-input {
  resize: vertical;
  min-height: 80px;
  max-height: 240px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.msg-compose-input.is-readonly {
  opacity: 0.6;
}

.msg-compose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.msg-compose-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 0.82rem;
}

.msg-compose-status-label {
  font-weight: 700;
  color: var(--text);
}

.msg-compose-status-note {
  font-size: 0.78rem;
}

.msg-compose-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.msg-btn-ai {
  font-weight: 800;
  letter-spacing: 0.04em;
  min-width: 44px;
}

/* ── Compose attachments (Phase 3 eBay : pieces jointes images) ── */
.msg-compose-attach {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.msg-compose-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.msg-compose-attach-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--bg-soft, rgba(0, 0, 0, 0.03));
}

.msg-compose-attach-btn svg {
  flex: 0 0 14px;
}

.msg-compose-attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.msg-compose-attach-preview:empty {
  display: none;
}

.msg-attach-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft, #f5f5f5);
  width: 72px;
}

.msg-attach-thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  background: #fff;
}

.msg-attach-thumb-label {
  font-size: 0.65rem;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  color: var(--muted);
}

.msg-attach-thumb-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--danger, #c0392b);
  color: white;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.msg-attach-thumb-remove:hover {
  background: var(--danger-hover, #a72f23);
}

/* ============================================================
   Phase 5 : UI/UX upgrade page Messages (skin overrides)
   ============================================================ */

/* ── Cards sidebar : avatar amélioré + thumbnail si dispo ── */
.msg-card {
  position: relative;
  padding: 10px 12px;
  border: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease;
}
.msg-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.05);
}
.msg-card.is-active {
  background: linear-gradient(90deg, rgba(223, 143, 120, 0.12) 0%, transparent 100%);
  border-color: rgba(223, 143, 120, 0.18);
}
.msg-card.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.msg-card-avatar-wrap {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  position: relative;
}

.msg-card-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
}

.msg-card-avatar-wrap.ch-rakuten .msg-card-avatar { background: linear-gradient(135deg, #bf0000, #7a0a0a); }
.msg-card-avatar-wrap.ch-ebay    .msg-card-avatar { background: linear-gradient(135deg, #e6b400, #8a5a00); }
.msg-card-avatar-wrap.ch-lbc     .msg-card-avatar { background: linear-gradient(135deg, var(--accent, #df8f78), #8f522b); }
.msg-card-avatar-wrap.ch-amazon  .msg-card-avatar { background: linear-gradient(135deg, #ff9900, #b66a00); }

.msg-card-mp {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid #1a1414;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.msg-card-unread {
  background: var(--accent, #df8f78);
  box-shadow: 0 0 0 2px rgba(223, 143, 120, 0.18);
}

/* ── Header thread : mini-thumbnail produit ── */
.msg-thread-head-top {
  align-items: center;
}

.msg-thread-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}
.msg-thread-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.msg-thread-identity {
  flex: 1;
  min-width: 0;
}

/* ── Fiche produit panneau droite : hero card ── */
.msg-context-panel .msg-context-product {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.msg-product-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--line);
}

.msg-product-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
}
.msg-product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 280ms ease;
}
.msg-product-card:hover .msg-product-cover img {
  transform: scale(1.03);
}

.msg-product-cover-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.msg-product-channel {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.msg-product-info {
  display: grid;
  gap: 6px;
}

.msg-product-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.msg-product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent, #df8f78);
  letter-spacing: -0.01em;
}

.msg-product-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}
.msg-product-meta .muted {
  min-width: 30px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.msg-product-actions .button.msg-product-cta {
  width: 100%;
  justify-content: center;
}

/* ── Bulles conversation : polish typo/spacing/hover ── */
.msg-stream {
  gap: 10px;
  padding: 18px 22px 22px;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.msg-bubble:hover {
  background: rgba(255, 255, 255, 0.065);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.msg-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.55;
}

.msg-bubble-out {
  background: linear-gradient(180deg, rgba(223, 143, 120, 0.16), rgba(223, 143, 120, 0.10));
  border-color: rgba(223, 143, 120, 0.28);
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.msg-bubble-out:hover {
  box-shadow: 0 4px 16px rgba(223, 143, 120, 0.18);
}

.msg-bubble-head {
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.msg-bubble-head strong {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}
.msg-bubble-head time {
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Page batch /messages/ai-questions ── */
.msg-ai-questions-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.msg-ai-questions-header h1 {
  margin: 0 0 4px 0;
}

.msg-ai-questions-header p.muted {
  margin: 0;
  max-width: 720px;
  font-size: 0.88rem;
}

.msg-ai-questions-counts {
  display: flex;
  align-items: center;
  gap: 10px;
}

.msg-ai-questions-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

.msg-ai-questions-empty h2 {
  margin: 4px 0 0 0;
  font-size: 1.1rem;
  color: var(--text);
}

.msg-ai-questions-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.msg-ai-question-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-left: 4px solid var(--info, #4a9eff);
  background: linear-gradient(180deg, rgba(74, 158, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  scroll-margin-top: 80px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.msg-ai-question-card.is-just-resolved {
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.35);
  border-left-color: var(--success, #4caf50);
}

.msg-ai-question-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.msg-ai-question-card-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--muted);
}
.msg-ai-question-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.msg-ai-question-card-meta {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 200px;
}

.msg-ai-question-card-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.msg-ai-question-card-counterparty {
  font-size: 0.95rem;
}

.msg-ai-question-card-round {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.msg-ai-question-card-subject,
.msg-ai-question-card-price {
  font-size: 0.78rem;
}

.msg-ai-question-card-open {
  flex-shrink: 0;
}

.msg-ai-question-card-original {
  margin: 0;
  padding: 10px 14px;
  border-left: 2px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
}

.msg-ai-question-card-original .muted {
  display: block;
  font-size: 0.7rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.msg-ai-question-card-body {
  display: grid;
  gap: 12px;
}

.msg-ai-question-card-question {
  background: rgba(74, 158, 255, 0.08);
  border: 1px solid rgba(74, 158, 255, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.msg-ai-question-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--info, #4a9eff);
}

.msg-ai-question-card-question p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.5;
}

.msg-ai-question-card-question small {
  font-size: 0.75rem;
}

/* Sidebar /messages : lien vers la page batch */
.msg-sidebar-actions .msg-ai-questions-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.msg-sidebar-actions .msg-ai-questions-link-badge {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--info, #4a9eff);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Form question IA integre dans le compose (Phase 2 ask_human polished) ── */
.msg-ai-question {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(74, 158, 255, 0.06) 0%, rgba(74, 158, 255, 0.02) 100%);
  border: 1px solid rgba(74, 158, 255, 0.22);
  border-left: 4px solid var(--info, #4a9eff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.msg-ai-question-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.msg-ai-question-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(74, 158, 255, 0.15);
  color: var(--info, #4a9eff);
  border: 1px solid rgba(74, 158, 255, 0.32);
}

.msg-ai-question-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.msg-ai-question-head-text strong {
  font-size: 0.92rem;
  color: var(--text);
}

.msg-ai-question-round {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.msg-ai-question-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 2px solid rgba(74, 158, 255, 0.45);
  font-style: italic;
}

.msg-ai-question-reason {
  margin: -4px 0 0 0;
  font-size: 0.78rem;
  font-style: italic;
}

.msg-ai-question-history {
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.18);
}

.msg-ai-question-history summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--muted);
  padding: 2px 0;
}

.msg-ai-question-history[open] summary {
  margin-bottom: 6px;
  color: var(--text);
}

.msg-ai-question-history ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.msg-ai-question-form {
  display: grid;
  gap: 10px;
}

.msg-ai-question-field {
  display: grid;
  gap: 4px;
}

.msg-ai-question-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.msg-ai-question-field .textarea {
  min-height: 70px;
  resize: vertical;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.5;
}

.msg-ai-question-field .textarea:focus {
  border-color: var(--info, #4a9eff);
  outline: none;
  background: rgba(255, 255, 255, 0.055);
}

.msg-ai-question-image {
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg-ai-question-image-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.msg-ai-question-image:hover .msg-ai-question-image-btn {
  border-style: solid;
  border-color: var(--info, #4a9eff);
  color: var(--text);
  background: rgba(74, 158, 255, 0.06);
}

.msg-ai-question-image.is-recommended .msg-ai-question-image-btn {
  border-color: rgba(74, 158, 255, 0.45);
  color: var(--info, #4a9eff);
}

.msg-ai-question-image-btn svg {
  flex: 0 0 14px;
}

.msg-ai-question-image.has-file .msg-ai-question-image-btn {
  border-style: solid;
  border-color: var(--success, #4caf50);
  color: var(--success, #4caf50);
  background: rgba(76, 175, 80, 0.08);
}

.msg-ai-question-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.msg-ai-question-actions .button-primary {
  flex: 1 1 auto;
  min-width: 160px;
}

@media (max-width: 600px) {
  .msg-ai-question {
    padding: 14px;
    gap: 12px;
  }
  .msg-ai-question-text {
    font-size: 0.92rem;
  }
}

/* ── Bloc decision IA dans le compose box ── */
.msg-ai-decision {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
}

.msg-ai-decision-answer  { border-left-color: var(--success, #4caf50); }
.msg-ai-decision-question { border-left-color: var(--info, #4a9eff); }
.msg-ai-decision-review   { border-left-color: var(--warning, #e6b400); }

.msg-ai-decision-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.msg-ai-confidence {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.msg-ai-decision-reason {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
}

.msg-ai-decision-hint {
  margin: 0;
  font-size: 0.78rem;
  font-style: italic;
}
.msg-ai-decision-hint a {
  color: var(--accent, #df8f78);
  text-decoration: underline;
}

/* ── Compose : harmonisation dark theme ── */
.msg-compose {
  background: linear-gradient(180deg, rgba(18, 15, 15, 0.4), rgba(18, 15, 15, 0.85));
  padding: 14px 22px 18px;
}

.msg-compose-input {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  transition: border-color 160ms ease, background 160ms ease;
}
.msg-compose-input:focus {
  border-color: var(--accent, #df8f78);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.msg-compose-attach-btn {
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
}
.msg-compose-attach-btn:hover {
  border-style: solid;
  border-color: var(--accent, #df8f78);
  color: var(--text);
  background: rgba(223, 143, 120, 0.06);
}

.msg-attach-thumb {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 76px;
  padding: 4px;
}
.msg-attach-thumb img {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
}
.msg-attach-thumb-label {
  color: var(--muted);
}
.msg-attach-thumb-remove {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--line);
  width: 18px;
  height: 18px;
  font-size: 12px;
}
.msg-attach-thumb-remove:hover {
  background: var(--danger, #c0392b);
  border-color: var(--danger, #c0392b);
}

/* ── Empty state ── */
.msg-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  height: 100%;
  text-align: center;
  color: var(--muted);
}

.msg-empty p {
  margin: 0;
  font-size: 0.95rem;
}

/* ── Context panel (right column) ── */
.msg-context-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid var(--line);
}

.msg-context-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 16px 18px;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.msg-context-product {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.msg-context-panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.msg-context-panel .msg-item-link {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.msg-context-panel .msg-item-img {
  width: 100%;
  height: auto;
  max-height: 180px;
  border-radius: 10px;
  object-fit: cover;
}

.msg-context-panel .msg-claim-panel {
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

/* ── Claim panel ── */
.msg-claim-panel {
  display: grid;
  gap: 8px;
  padding: 10px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 210, 127, 0.04);
}

.msg-claim-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg-claim-header strong {
  font-size: 0.88rem;
  color: #ffe1a2;
}

.msg-claim-header .status-pill {
  padding: 3px 8px;
  font-size: 0.72rem;
}

.msg-claim-details {
  display: grid;
  gap: 4px;
}

.msg-claim-row {
  display: flex;
  gap: 10px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.msg-claim-row > span:first-child {
  flex-shrink: 0;
  min-width: 90px;
}

.msg-claim-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.msg-action-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(125, 214, 170, 0.12);
  color: #b6ffd8;
  border: 1px solid rgba(125, 214, 170, 0.2);
}

.msg-claim-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--danger);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 141, 141, 0.08);
  border: 1px solid rgba(255, 141, 141, 0.14);
}

/* ── Bubble author & tags ── */
.msg-bubble-author {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.msg-bubble-source {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.msg-bubble-source-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.msg-bubble-source-warning {
  color: #ffe1a2;
  background: rgba(242, 179, 106, 0.12);
}

.msg-bubble-source-info {
  color: #c8dbef;
  background: rgba(138, 168, 191, 0.12);
}

.msg-bubble-source-success {
  color: #b6ffd8;
  background: rgba(125, 214, 170, 0.12);
}

.msg-bubble-recipient {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.msg-bubble-subject {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}

.msg-bubble-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.msg-tag-claim {
  background: rgba(255, 210, 127, 0.14);
  color: #ffe1a2;
  border-color: rgba(255, 210, 127, 0.2);
}

.msg-tag-inquiry {
  background: rgba(138, 168, 191, 0.14);
  color: #c8dbef;
  border-color: rgba(138, 168, 191, 0.2);
}

/* ── Responsive: small desktop — collapse context panel ── */
@media (max-width: 1100px) {
  .msg-layout.msg-has-thread {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .msg-context-panel {
    display: none;
  }
}

/* ── Responsive: tablet ── */
@media (max-width: 960px) {
  .msg-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

/* ── Responsive: mobile ── */
@media (max-width: 720px) {
  .page-messages .page-shell {
    height: calc(100dvh - 64px);
    max-height: calc(100dvh - 64px);
  }

  .msg-layout,
  .msg-layout.msg-has-thread {
    grid-template-columns: 1fr;
  }

  /* List mode: show sidebar, hide workspace */
  .msg-list-mode .msg-workspace {
    display: none;
  }

  /* Thread mode: hide sidebar, show workspace */
  .msg-has-thread .msg-sidebar {
    display: none;
  }

  .msg-context-panel {
    display: none;
  }

  .msg-back {
    display: inline-flex;
  }

  .msg-stream {
    padding: 12px 14px 16px;
  }

  .msg-compose {
    padding: 10px 14px 14px;
  }

  .msg-compose-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .msg-compose-actions {
    width: 100%;
  }

  .msg-compose-actions .button {
    flex: 1;
    justify-content: center;
  }

  .msg-row {
    max-width: 88%;
  }

  .msg-thread-head {
    padding: 12px 14px 8px;
  }

  .msg-thread-head-top {
    flex-direction: column;
    gap: 6px;
  }
}

/* --- Message bubble body & structured sections --- */
.msg-bubble-body {
  word-break: break-word;
  line-height: 1.5;
}
.msg-bubble-body p {
  margin: 0 0 6px 0;
}
.msg-bubble-body p:last-child {
  margin-bottom: 0;
}
.msg-section {
  padding: 6px 10px;
  margin: 4px 0;
  border-radius: 6px;
  border-left: 3px solid var(--border);
  background: rgba(255,255,255,0.03);
  font-size: 0.93rem;
  line-height: 1.45;
}
.msg-section strong {
  color: var(--text-primary);
  font-weight: 600;
}
.msg-section-warning {
  border-left-color: var(--warning);
  background: rgba(255,193,7,0.06);
}
.msg-section-info {
  border-left-color: var(--accent);
  background: rgba(99,102,241,0.06);
}
.msg-section-accent {
  border-left-color: var(--accent);
  background: rgba(99,102,241,0.08);
}
.msg-section-default {
  border-left-color: var(--border);
}
.msg-section-tracking {
  border-left-color: var(--success);
  background: rgba(34,197,94,0.06);
  font-family: monospace;
}

/* --- Compose reply target toggle buttons --- */
.msg-compose-target {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0;
}

.msg-target-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.msg-target-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.msg-target-btn.is-active {
  background: rgba(223, 143, 120, 0.14);
  border-color: rgba(223, 143, 120, 0.3);
  color: var(--accent);
}

.msg-compose-no-target {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--danger);
  background: rgba(255, 141, 141, 0.08);
  border: 1px solid rgba(255, 141, 141, 0.14);
}

/* ═══════════════════════════════════════════════════
   UI Polish — mobile-first micro-interactions
   ═══════════════════════════════════════════════════ */

/* --- Smooth scroll globally --- */
html {
  scroll-behavior: smooth;
}

/* --- Spring easing custom property --- */
:root {
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Hamburger → X animation --- */
.menu-button span {
  transition: transform 280ms var(--spring), opacity 180ms ease, width 180ms ease;
  transform-origin: center;
}

.app-menu[open] .menu-button span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.app-menu[open] .menu-button span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.app-menu[open] .menu-button span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --- Menu links stagger entrance --- */
.app-menu[open] .menu-link {
  animation: menuLinkSlideIn 320ms var(--smooth) backwards;
}
.app-menu[open] .menu-links > :nth-child(1) .menu-link,
.app-menu[open] .menu-links > :nth-child(1) { animation-delay: 40ms; }
.app-menu[open] .menu-links > :nth-child(2) .menu-link,
.app-menu[open] .menu-links > :nth-child(2) { animation-delay: 70ms; }
.app-menu[open] .menu-links > :nth-child(3) .menu-link,
.app-menu[open] .menu-links > :nth-child(3) { animation-delay: 100ms; }
.app-menu[open] .menu-links > :nth-child(4) .menu-link,
.app-menu[open] .menu-links > :nth-child(4) { animation-delay: 130ms; }
.app-menu[open] .menu-links > :nth-child(5) .menu-link,
.app-menu[open] .menu-links > :nth-child(5) { animation-delay: 160ms; }
.app-menu[open] .menu-links > :nth-child(6) .menu-link,
.app-menu[open] .menu-links > :nth-child(6) { animation-delay: 190ms; }
.app-menu[open] .menu-links > :nth-child(7) .menu-link,
.app-menu[open] .menu-links > :nth-child(7) { animation-delay: 220ms; }
.app-menu[open] .menu-links > :nth-child(8) .menu-link,
.app-menu[open] .menu-links > :nth-child(8) { animation-delay: 250ms; }
.app-menu[open] .menu-links > :nth-child(9) .menu-link,
.app-menu[open] .menu-links > :nth-child(9) { animation-delay: 280ms; }
.app-menu[open] .menu-links > :nth-child(10) .menu-link,
.app-menu[open] .menu-links > :nth-child(10) { animation-delay: 310ms; }
.app-menu[open] .menu-links > :nth-child(11),
.app-menu[open] .menu-links > :nth-child(12) { animation-delay: 340ms; }

@keyframes menuLinkSlideIn {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Active link glow pulse on menu --- */
.menu-link.is-active {
  position: relative;
  overflow: hidden;
}

.menu-link.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 20% 50%, rgba(223, 143, 120, 0.08), transparent 70%);
  pointer-events: none;
}

/* --- Card touch feedback (press-down on mobile) --- */
.item-card {
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  will-change: transform;
}

.item-card:active {
  transform: scale(0.975);
  transition-duration: 80ms;
}

@media (hover: hover) and (pointer: fine) {
  .item-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
  }
  .item-card:active {
    transform: scale(0.99);
  }
}

/* --- Button press spring --- */
.button:active,
.action-button:active,
.mini-button:active {
  transform: scale(0.94);
  transition-duration: 60ms;
}

.button-primary:active,
.action-button:active {
  filter: brightness(1.1);
}

/* --- Badge subtle entrance --- */
.badge,
.status-pill,
.badge-status {
  animation: badgePop 280ms var(--spring) backwards;
}

@keyframes badgePop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Notice banner slide-in from top --- */
.notice-banner {
  animation: noticeSlideIn 400ms var(--smooth) backwards;
}

@keyframes noticeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Page header entrance --- */
.page-header {
  animation: pageHeaderIn 420ms var(--smooth) backwards;
}

@keyframes pageHeaderIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Toolbar slide up --- */
.toolbar,
.stock-toolbar {
  animation: toolbarSlideUp 380ms var(--smooth) 80ms backwards;
}

@keyframes toolbarSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Panel entrance with subtle scale --- */
.panel,
.form-panel {
  animation: panelEnter 380ms var(--smooth) backwards;
}

@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Floating widgets entrance --- */
.floating-import-widget:not([hidden]),
.mobile-install-widget:not([hidden]) {
  animation: widgetSlideUp 440ms var(--spring) backwards;
}

@keyframes widgetSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Confirm modal entrance --- */
.confirm-modal:not([hidden]) .confirm-modal-card {
  animation: modalPop 340ms var(--spring) backwards;
}

.confirm-modal:not([hidden]) .confirm-modal-backdrop {
  animation: modalBackdropIn 280ms ease backwards;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Menu link active state — tactile press --- */
.menu-link:active {
  transform: scale(0.96);
  transition-duration: 60ms;
}

/* --- Stock filter pill toggle animation --- */
.stock-filter-pill span {
  transition: transform 160ms var(--spring), background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.stock-filter-pill input:checked + span {
  animation: pillCheck 280ms var(--spring);
}

@keyframes pillCheck {
  0% { transform: scale(1); }
  40% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* --- Input focus glow --- */
.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(223, 143, 120, 0.4);
  box-shadow: 0 0 0 3px rgba(223, 143, 120, 0.1);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

/* --- Detail gallery photos — smooth snap with inertia feel --- */
.detail-gallery {
  position: relative;
}

/* --- Topbar subtle entrance --- */
.topbar {
  animation: topbarFadeIn 300ms ease backwards;
}

@keyframes topbarFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- Loading shimmer for placeholder states --- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.is-loading-shimmer {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease infinite;
  border-radius: 12px;
}

/* --- Success flash for just-saved items --- */
@keyframes successFlash {
  0% { box-shadow: 0 0 0 0 rgba(125, 214, 170, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(125, 214, 170, 0.12); }
  100% { box-shadow: 0 0 0 0 rgba(125, 214, 170, 0); }
}

.is-just-saved {
  animation: successFlash 600ms ease;
}

/* --- Error shake for invalid inputs --- */
@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.is-input-error {
  animation: inputShake 400ms ease;
  border-color: var(--danger) !important;
}

/* --- Smoother stock card reveal with spring --- */
@keyframes stockCardRevealV2 {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stock-appear-list .stock-appear-card {
  animation-name: stockCardRevealV2;
  animation-timing-function: var(--spring);
}

/* --- Assistant FAB bounce entrance --- */
.assistant-fab {
  animation: fabBounceIn 500ms var(--spring) 600ms backwards;
}

@keyframes fabBounceIn {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(20px);
  }
  70% {
    transform: scale(1.05) translateY(-2px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --- Assistant FAB pulse when idle (subtle attention) --- */
.assistant-fab-toggle {
  animation: fabPulse 4s ease 3s infinite;
}

@keyframes fabPulse {
  0%, 85%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.24); }
  92% { box-shadow: 0 8px 24px rgba(0,0,0,0.24), 0 0 0 6px rgba(223, 143, 120, 0.12); }
}

/* --- Pagination links tactile --- */
.pagination a,
.pagination span {
  transition: transform 120ms ease, background 120ms ease;
}

.pagination a:active {
  transform: scale(0.92);
}

/* --- Better mobile touch targets --- */
@media (max-width: 759px) {
  .menu-link {
    min-height: 48px;
    padding: 14px 16px;
  }

  .button,
  .mini-button {
    min-height: 44px;
    padding: 12px 18px;
  }

  .stock-filter-pill span {
    min-height: 40px;
    padding: 8px 14px;
  }

  .pagination a,
  .pagination span {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════
   Round 2 — Real UX improvements
   ═══════════════════════════════════════════════════ */

/* --- Custom scrollbar (dark, thin, unobtrusive) --- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.22);
}

/* Hide scrollbar on mobile (scroll with touch) */
@media (hover: none) and (pointer: coarse) {
  ::-webkit-scrollbar {
    display: none;
  }
  * {
    scrollbar-width: none;
  }
}

/* --- Ripple effect on buttons --- */
.button,
.action-button,
.mini-button,
.menu-link {
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.button::after,
.action-button::after,
.mini-button::after,
.menu-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.15), transparent 60%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.button:active::after,
.action-button:active::after,
.mini-button:active::after,
.menu-link:active::after {
  opacity: 1;
  transition-duration: 80ms;
}

/* Don't ripple the active-link glow pseudo-element */
.menu-link.is-active::after {
  background: radial-gradient(circle at 20% 50%, rgba(223, 143, 120, 0.08), transparent 70%);
  opacity: 1;
}

/* --- Gallery arrows mobile --- */

/* --- Better empty states --- */
.detail-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  color: var(--muted);
  font-size: 0.95rem;
  background: rgba(255,255,255,0.02);
  border: 2px dashed rgba(255,255,255,0.08);
  border-radius: 18px;
}

/* --- Info grid improvements — cleaner on mobile --- */
.info-grid > div {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.04);
  transition: background 160ms ease;
}

.info-grid > div:active {
  background: rgba(255,255,255,0.05);
}

/* --- Marketplace cards — better touch targets + status feedback --- */
.marketplace-card {
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.marketplace-card:active {
  transform: scale(0.98);
}

/* Marketplace status colors */
.badge-listed { background: rgba(125, 214, 170, 0.15); color: var(--success); border: 1px solid rgba(125, 214, 170, 0.25); }
.badge-not-listed { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid rgba(255,255,255,0.08); }
.badge-unknown { background: rgba(255, 210, 127, 0.15); color: var(--warning); border: 1px solid rgba(255, 210, 127, 0.25); }
.badge-not-eligible { background: rgba(255, 141, 141, 0.12); color: var(--danger); border: 1px solid rgba(255, 141, 141, 0.2); }

/* --- Mini-button bigger touch targets --- */
.mini-button,
.mini-button-ghost {
  min-height: 40px;
  min-width: 40px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

@media (max-width: 759px) {
  .mini-button,
  .mini-button-ghost {
    min-height: 44px;
    padding: 12px 16px;
  }
}

/* --- Action rail — horizontal scroll on mobile for quick access --- */
@media (max-width: 759px) {
  .action-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .action-rail .action-button,
  .action-rail form {
    flex: 0 0 auto;
    min-width: max-content;
    scroll-snap-align: start;
  }

  .action-rail .action-button {
    width: auto;
    padding: 14px 20px;
    white-space: nowrap;
  }
}

/* --- Toast notification system --- */
.toast-container {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2100;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}

.toast {
  pointer-events: auto;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(50, 46, 46, 0.98), rgba(30, 28, 28, 0.98));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  backdrop-filter: blur(16px);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 380ms var(--spring) backwards;
}

.toast-success { border-color: rgba(125, 214, 170, 0.3); }
.toast-success::before { content: "✓"; color: var(--success); font-weight: 800; }

.toast-error { border-color: rgba(255, 141, 141, 0.3); }
.toast-error::before { content: "✕"; color: var(--danger); font-weight: 800; }

.toast-info { border-color: rgba(138, 168, 191, 0.3); }
.toast-info::before { content: "ℹ"; color: var(--ink-blue); font-weight: 800; }

.toast.is-leaving {
  animation: toastSlideOut 280ms ease forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSlideOut {
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
}

/* --- Enrich fail modal --- */
.enrich-fail-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  animation: enrichOverlayIn 200ms ease;
}

.enrich-fail-modal {
  background: linear-gradient(180deg, rgba(37, 31, 31, 0.98), rgba(17, 15, 15, 0.98));
  border: 1px solid rgba(255, 100, 100, 0.35);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 420px;
  width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(255, 80, 80, 0.08);
  animation: enrichModalIn 250ms ease;
}

.enrich-fail-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(255, 80, 80, 0.15);
  border: 2px solid rgba(255, 100, 100, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #ff6b6b;
}

.enrich-fail-modal h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #ff8d8d;
}

.enrich-fail-modal p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
}

.enrich-fail-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

@keyframes enrichOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes enrichModalIn {
  from { opacity: 0; transform: scale(0.9) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Better typography for readability on small screens --- */
@media (max-width: 759px) {
  body {
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0.01em;
  }
}

/* --- Copy on click --- */
.copy-on-click {
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  transition: color 0.2s;
}
.copy-on-click:hover {
  color: var(--accent);
}
.copy-on-click-done {
  color: var(--success, #4caf50);
}
.copy-toast {
  position: absolute;
  transform: translateX(-50%);
  background: var(--success, #4caf50);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 9999;
  animation: copy-toast-fade 1.4s ease forwards;
}
@keyframes copy-toast-fade {
  0% { opacity: 0; transform: translateX(-50%) translateY(4px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

h1 {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    line-height: 1.25;
  }

  h2 {
    font-size: 1.15rem;
  }

  .page-header p {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .item-card-title {
    font-size: 1rem;
    line-height: 1.35;
  }
}

/* --- Back link — bigger, more tappable --- */
.back-link,
.back-link-strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px 8px 10px;
  margin: -8px 0 4px -10px;
  border-radius: 14px;
  transition: background 140ms ease, transform 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.back-link:active,
.back-link-strong:active {
  transform: scale(0.96);
  background: rgba(255,255,255,0.06);
}

/* --- Stock search bar — sticky on scroll for quick access --- */
@media (max-width: 759px) {
  .stock-toolbar {
    position: sticky;
    top: calc(56px + env(safe-area-inset-top));
    z-index: 20;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    backdrop-filter: blur(16px);
    background: rgba(24, 22, 22, 0.92);
  }
}

/* --- Picking card actions — better layout --- */
@media (max-width: 759px) {
  .picking-actions,
  .marketplace-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .picking-actions form,
  .marketplace-actions form {
    width: 100%;
  }

  .picking-actions .button,
  .picking-actions .mini-button,
  .marketplace-actions .mini-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* --- Photo gallery — full bleed on mobile --- */
@media (max-width: 759px) {
  .detail-photo-card {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0;
  }

  .detail-gallery {
    border-radius: 0;
  }

  .detail-photo {
    border-radius: 0;
    max-height: 50vh;
  }

  .detail-gallery-caption {
    padding: 8px 16px;
  }
}

/* --- Confirm modal — better on mobile --- */
@media (max-width: 500px) {
  .confirm-modal-card {
    width: 100%;
    border-radius: 22px 22px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    animation-name: modalSlideUp;
  }

  @keyframes modalSlideUp {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .confirm-modal-actions {
    flex-direction: column;
    gap: 8px;
  }

  .confirm-modal-actions .button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* --- Selection mode visual feedback --- */
.item-card.is-selected {
  border-color: rgba(223, 143, 120, 0.4);
  background: rgba(223, 143, 120, 0.06);
  box-shadow: 0 0 0 1px rgba(223, 143, 120, 0.2);
}

/* --- Active filters badges — dismissible look --- */
.stock-active-filter-badge {
  transition: transform 160ms var(--spring), opacity 160ms ease;
}

.stock-active-filter-badge:active {
  transform: scale(0.9);
}

/* --- Job status rows — better visual hierarchy --- */
.job-row {
  transition: background 300ms ease, box-shadow 300ms ease;
  border-radius: 14px;
  padding: 10px 12px;
}

.job-row-done-flash {
  background: rgba(125, 214, 170, 0.08);
  box-shadow: inset 0 0 0 1px rgba(125, 214, 170, 0.15);
}

/* --- Pull-down visual cue at top of page --- */
@media (hover: none) and (pointer: coarse) {
  .page-shell::before {
    content: "";
    display: block;
    height: 0;
    transition: height 200ms ease;
  }
}

/* --- Stock card image — nicer loading placeholder --- */
.item-card-media img {
  background: rgba(255,255,255,0.03);
  transition: opacity 300ms ease;
}

.item-card-media .media-fallback {
  background: linear-gradient(135deg, rgba(223, 143, 120, 0.08), rgba(138, 168, 191, 0.08));
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Settings tiles — card grid with hover lift --- */
.settings-home-grid .panel {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.settings-home-grid .panel:active {
  transform: scale(0.98);
}

/* --- Smoother focus outlines for keyboard nav --- */
:focus-visible {
  outline: 2px solid rgba(223, 143, 120, 0.5);
  outline-offset: 2px;
  border-radius: inherit;
}

/* Remove ugly default focus for mouse/touch */
:focus:not(:focus-visible) {
  outline: none;
}

/* --- Loading dots animation (reusable) --- */
@keyframes loadingDots {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: loadingDots 1.2s ease infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }

/* --- Marketplace channel icons color coding --- */
.marketplace-card-top strong {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

/* --- Quantity badge highlight when low --- */
.badge-quantity-low {
  background: rgba(255, 141, 141, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 141, 141, 0.2);
  animation: pulseDotWarm 3s ease infinite;
}

/* --- Divider utility --- */
.divider {
  height: 1px;
  background: var(--line);
  margin: 12px 0;
  border: none;
}

/* --- Skeleton loading placeholder blocks --- */
.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease infinite;
}

.skeleton-text {
  height: 14px;
  width: 60%;
  margin: 6px 0;
}

.skeleton-text-short {
  height: 14px;
  width: 35%;
}

.skeleton-image {
  aspect-ratio: 1;
  width: 100%;
}

/* --- Flag modal textarea (item detail) --- */
.flag-modal-textarea {
  width: 100%;
  resize: vertical;
  min-height: 80px;
  margin: 12px 0 0;
  box-sizing: border-box;
}

/* --- User-flagged message in review card --- */
.user-flagged-message {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-strong);
  margin: 8px 0 12px;
}

/* --- Lots --- */

.lot-item-banner {
  margin: -8px 0 20px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(255, 183, 77, 0.10);
  border: 1px solid rgba(255, 183, 77, 0.25);
  color: var(--text-secondary);
}
.lot-item-banner strong {
  display: block;
  margin-bottom: 4px;
  color: #ffb74d;
  font-size: 1.05em;
}
.lot-item-banner p {
  margin: 0 0 6px;
  font-size: 0.92em;
  line-height: 1.5;
}
.lot-item-banner-link {
  color: #ffb74d;
  font-weight: 600;
  font-size: 0.92em;
}

.lot-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lot-media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0.5;
}

.lot-detail-info {
  padding: 20px;
  margin-bottom: 20px;
}

.lot-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.lot-detail-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lot-detail-label {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lot-detail-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.lot-detail-description {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.lot-detail-description p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.lot-actions {
  padding: 20px;
  margin-bottom: 20px;
}

.lot-actions h2 {
  margin-bottom: 12px;
}

.lot-actions-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lot-dissolve-button {
  color: #e87c7c !important;
  border-color: rgba(232, 124, 124, 0.25) !important;
}

.lot-dissolve-button:hover {
  background: rgba(232, 124, 124, 0.1) !important;
}

.lot-composed-hero {
  aspect-ratio: auto;
  max-height: none;
  width: 100%;
  border-radius: 8px;
}

.lot-photos-section {
  margin-top: 8px;
}
.lot-photos-section h2 {
  margin-bottom: 14px;
}
.lot-photos-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lot-composed-photo {
  width: 100%;
  max-width: 800px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.lot-items-section {
  margin-top: 8px;
}

.lot-items-section h2 {
  margin-bottom: 14px;
}

.lot-item-card {
  text-decoration: none;
}

.lot-item-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.lot-item-link:hover {
  text-decoration-color: var(--accent);
}

.lot-remove-form {
  display: inline;
}

.lot-remove-badge {
  cursor: pointer;
  border: none;
  font: inherit;
  color: #e87c7c;
  background: rgba(232, 124, 124, 0.1);
  transition: background 0.15s;
}

.lot-remove-badge:hover {
  background: rgba(232, 124, 124, 0.2);
}

.lot-badge-link {
  cursor: pointer;
  transition: opacity 0.15s;
}

.lot-badge-link:hover {
  opacity: 0.8;
}

.lot-hero-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  aspect-ratio: 1;
  max-width: 400px;
  margin: 0 auto;
}

.lot-hero-thumb {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  aspect-ratio: 1;
}

.lot-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lot-hero-thumb .media-fallback {
  width: 100%;
  height: 100%;
  min-height: unset;
  border-radius: 0;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lot-hero-more {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.detail-photo-card:has(.lot-hero-mosaic) {
  position: relative;
}

.confirm-modal-card-wide {
  max-width: 520px;
  width: 90vw;
}

.lot-add-results {
  display: grid;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
  margin: 12px 0 0;
  padding: 2px;
}

.lot-add-section-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 4px 2px;
}

.lot-add-loading {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.lot-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  transition: background 0.15s;
}

.lot-add-row:hover {
  background: rgba(255,255,255,0.07);
}

.lot-add-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  min-height: 0;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #281515;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.lot-add-btn:hover {
  opacity: 0.85;
}

.lot-add-row-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
}

.lot-add-row-thumb-empty {
  border: 1px dashed var(--line);
}

.lot-add-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.lot-add-row-info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.lot-add-row-info .muted {
  font-size: 0.8rem;
}

.lot-add-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.lot-edit-fields {
  display: grid;
  gap: 14px;
  padding: 8px 0 16px;
}

.lot-edit-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.lot-edit-label .input {
  font-size: 1rem;
}

/* --- Lot review cards (reviews page) --- */
.lot-review-block {
  display: grid;
  gap: 12px;
}

.lot-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lot-review-items {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.lot-review-item-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.lot-review-item-card:hover {
  background: rgba(255,255,255,0.07);
}

.lot-review-item-thumb {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
}

.lot-review-item-thumb-empty {
  border: 1px dashed var(--line);
}

.lot-review-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.lot-review-item-info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.lot-review-item-info .muted {
  font-size: 0.8rem;
}

.lot-review-dissolve-actions {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.lot-review-dissolve-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lot-review-dissolve-form .pricing-reason-input {
  flex: 1;
  max-width: 320px;
}


/* ── Statistics page ───────────────────────────────────────────────── */

.stats-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stats-kpi {
  background: linear-gradient(180deg, rgba(40,36,36,0.94), rgba(24,22,22,0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stats-kpi::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 50% 0%, rgba(223,143,120,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.stats-kpi-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
}

.stats-kpi-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.stats-kpi-icon-value { background: rgba(242,179,106,0.14); }
.stats-kpi-icon-value svg { color: var(--accent-strong); }
.stats-kpi-icon-invest { background: rgba(138,168,191,0.14); }
.stats-kpi-icon-invest svg { color: var(--ink-blue); }
.stats-kpi-icon-margin { background: rgba(125,214,170,0.14); }
.stats-kpi-icon-margin svg { color: var(--success); }

.stats-kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stats-kpi-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.stats-kpi-sub {
  font-size: 0.78rem;
}

.stats-kpi-gold { color: var(--accent-strong); }
.stats-kpi-green { color: var(--success); }
.stats-kpi-red { color: var(--danger); }

/* bar chart rows */
.stats-bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stats-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 44px;
  align-items: center;
  gap: 10px;
}

.stats-bar-label {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-bar-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  border-radius: 4px;
  min-width: 2px;
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.stats-bar-success { background: var(--success); }
.stats-bar-gold { background: var(--accent-strong); }
.stats-bar-muted { background: var(--muted); opacity: 0.6; }
.stats-bar-dim { background: rgba(255,255,255,0.18); }
.stats-bar-warning { background: var(--warning); }

.stats-bar-count {
  font-size: 0.88rem;
  font-weight: 600;
  text-align: right;
}

/* marketplace cards */
.stats-mp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stats-mp-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.stats-mp-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.stats-mp-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.84rem;
}

.stats-mp-big {
  font-size: 1.3rem;
  font-weight: 700;
}

/* metrics grid (IA, lots, jobs, reviews, activity) */
.stats-metrics {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.stats-metric {
  flex: 1;
  text-align: center;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 12px 8px;
}

.stats-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
}

.stats-metric-value small {
  font-size: 0.65em;
  color: var(--muted);
  font-weight: 400;
}

.stats-info-grid {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* sales table */
.stats-sales-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stats-sales-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.stats-sales-table th {
  text-align: right;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 14px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.stats-sales-table th:first-child {
  text-align: left;
}

.stats-sales-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.stats-sales-ch {
  font-weight: 600;
  white-space: nowrap;
}

.stats-sales-cell {
  text-align: right;
}

.stats-sales-count {
  font-weight: 700;
  font-size: 1.05rem;
}

.stats-sales-rev {
  font-size: 0.8rem;
  margin-top: 1px;
}

.stats-sales-table tfoot td {
  border-top: 1px solid var(--line);
  border-bottom: none;
  padding-top: 12px;
}

.stats-sales-table tfoot .stats-sales-count {
  font-size: 1.15rem;
}

/* panel header with link */
.stats-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}

.stats-panel-header h2 {
  margin: 0;
}

.stats-panel-link {
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 140ms;
}

.stats-panel-link:hover {
  color: var(--accent);
}

/* triple column layout */
.stats-triple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

/* ── Statistics responsive ── */

@media (max-width: 1080px) {
  .stats-triple {
    grid-template-columns: 1fr 1fr;
  }
  .stats-triple > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .stats-hero {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .stats-hero {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stats-kpi {
    padding: 14px 12px;
  }
  .stats-kpi-value {
    font-size: 1.25rem;
  }
  .stats-triple {
    grid-template-columns: 1fr;
  }
  .stats-triple > :last-child {
    grid-column: auto;
  }
  .stats-bar-row {
    grid-template-columns: 90px 1fr 38px;
    gap: 8px;
  }
  .stats-bar-label {
    font-size: 0.8rem;
  }
  .stats-mp-grid {
    grid-template-columns: 1fr;
  }
  .stats-metrics {
    flex-wrap: wrap;
  }
  .stats-metric {
    min-width: calc(50% - 4px);
  }
}

@media (max-width: 480px) {
  .stats-hero {
    grid-template-columns: 1fr;
  }
  .stats-metrics {
    flex-wrap: wrap;
  }
  .stats-metric {
    min-width: calc(50% - 4px);
  }
}

/* --- Respect reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
