/* Sun Kala v23.0.0 — top-level collection launcher
   The complete legacy application remains the Scanner module. */
body.adaptive-collection-active {
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  color: var(--adaptive-ink, #14233a);
  background: var(--adaptive-page, #f4f7fa);
}

.collection-shell,
.collection-shell .page-main {
  position: relative;
  width: 100%;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background: var(--adaptive-page, #f4f7fa);
}

.collection-shell .page-main {
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

body.adaptive-collection-active .collection-shell .page-main > .adaptive-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  background: var(--adaptive-page, #f4f7fa);
}

body.adaptive-collection-active .collection-shell .adaptive-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 43%, transparent 0 13%, rgba(3, 15, 29, .07) 58%, rgba(3, 15, 29, .17) 100%),
    linear-gradient(180deg, rgba(245, 249, 252, .10), rgba(245, 249, 252, .22));
}

:root[data-daypart="evening"] body.adaptive-collection-active .collection-shell .adaptive-scene::after,
:root[data-daypart="night"] body.adaptive-collection-active .collection-shell .adaptive-scene::after {
  background:
    radial-gradient(circle at 50% 43%, transparent 0 12%, rgba(1, 7, 17, .20) 58%, rgba(1, 7, 17, .40) 100%),
    linear-gradient(180deg, rgba(3, 11, 24, .08), rgba(3, 11, 24, .18));
}

body.adaptive-collection-active .collection-shell .adaptive-sky-image {
  position: absolute;
  inset: -3%;
  width: 106%;
  height: 106%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(.94);
  animation: adaptiveSkyDrift 24s ease-in-out infinite alternate;
}

.collection-view {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(430px, 100%);
  margin: 0 auto;
}

.collection-glass {
  width: min(100%, 355px);
  padding: 21px 22px 24px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 30px;
  background: color-mix(in srgb, var(--adaptive-panel-strong, rgba(255,255,255,.90)) 78%, transparent);
  box-shadow:
    0 28px 70px rgba(2, 11, 25, .22),
    inset 0 1px 0 rgba(255,255,255,.36);
  backdrop-filter: blur(28px) saturate(132%);
  -webkit-backdrop-filter: blur(28px) saturate(132%);
}

.collection-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 35px;
  margin-bottom: 18px;
  color: var(--adaptive-ink, #14233a);
}

.collection-brand img {
  width: 31px;
  height: 31px;
  object-fit: contain;
  filter: drop-shadow(0 6px 11px rgba(0,0,0,.15));
}

.collection-brand span {
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -.2px;
}

.collection-modules {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
}

.collection-module {
  display: grid;
  justify-items: center;
  gap: 9px;
  width: 104px;
}

.collection-module-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding: 0;
  border: 1px solid var(--adaptive-line, rgba(72,93,117,.24));
  border-radius: 25px;
  color: var(--adaptive-accent, #ff7a21);
  background: color-mix(in srgb, var(--adaptive-panel-strong, rgba(255,255,255,.94)) 82%, transparent);
  box-shadow:
    0 14px 32px rgba(2, 12, 27, .15),
    inset 0 1px 0 rgba(255,255,255,.48);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.collection-module-button::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 122, 33, .12);
  border-radius: 18px;
  pointer-events: none;
}

.collection-module-button span {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
}

.collection-module-button.is-scanner {
  color: #f56b12;
}

.collection-module-button.is-admin {
  color: #4d78b1;
}

.collection-module-button.is-admin::after {
  border-color: rgba(77, 120, 177, .15);
}

.collection-module-button:hover,
.collection-module-button:focus-visible {
  transform: translateY(-4px) scale(1.02);
  border-color: color-mix(in srgb, currentColor 42%, transparent);
  box-shadow:
    0 19px 42px rgba(2, 12, 27, .22),
    0 0 0 4px color-mix(in srgb, currentColor 9%, transparent),
    inset 0 1px 0 rgba(255,255,255,.52);
  outline: none;
}

.collection-module-button:active {
  transform: translateY(-1px) scale(.98);
}

.collection-module strong {
  max-width: 104px;
  overflow: hidden;
  color: var(--adaptive-ink, #14233a);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.5;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 4px 14px rgba(0,0,0,.08);
}

@media (max-width: 380px) {
  .collection-glass {
    width: min(100%, 325px);
    padding: 19px 16px 22px;
    border-radius: 27px;
  }
  .collection-modules { gap: 14px; }
  .collection-module { width: 98px; }
  .collection-module-button { width: 86px; height: 86px; border-radius: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .collection-module-button,
  body.adaptive-collection-active .collection-shell .adaptive-sky-image {
    animation: none !important;
    transition: none !important;
  }
}

/* v23 Task Manager launcher tile */
.collection-module-button.is-tasks {
  color: #176a53;
  background: linear-gradient(145deg, rgba(237,255,248,.66), rgba(255,255,255,.36));
}
.collection-module-button.is-tasks::after { background: rgba(34,197,139,.16); }
.collection-task-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ff6b35;
  color: white;
  border: 2px solid rgba(255,255,255,.9);
  font: 800 11px/1 system-ui, sans-serif;
  box-shadow: 0 5px 12px rgba(160,55,20,.2);
}

/* Keep the top-level collection launcher visually isolated from Scanner chrome. */
body.adaptive-collection-active > .seller-notification-button,
body.adaptive-collection-active > .mobile-current-quote {
  display: none !important;
}

/* v23.0.2 lightweight boot status */
.lite-core-status {
  margin-top: 17px;
  min-height: 20px;
  color: color-mix(in srgb, var(--adaptive-ink, #14233a) 62%, transparent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
}
.lite-core-status button {
  border: 0;
  background: transparent;
  color: var(--adaptive-accent, #ff7a21);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

/* === v23.0.5 — پس‌زمینه کامل کالکشن در موبایل === */
body.adaptive-collection-active,
body.adaptive-collection-active #app {
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
}
body.adaptive-collection-active .collection-shell {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100svh !important;
  height: 100dvh !important;
  min-height: 100svh !important;
  min-height: 100dvh !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}
:root[data-daypart="morning"] body.adaptive-collection-active .collection-shell { background-image: url('/assets/dayparts/morning-portrait.webp') !important; }
:root[data-daypart="day"] body.adaptive-collection-active .collection-shell { background-image: url('/assets/dayparts/day-portrait.webp') !important; }
:root[data-daypart="evening"] body.adaptive-collection-active .collection-shell { background-image: url('/assets/dayparts/evening-portrait.webp') !important; }
:root[data-daypart="night"] body.adaptive-collection-active .collection-shell { background-image: url('/assets/dayparts/night-portrait.webp') !important; }
body.adaptive-collection-active .collection-shell .page-main {
  height: 100% !important;
  min-height: 100% !important;
  background: transparent !important;
}
body.adaptive-collection-active .collection-shell .adaptive-scene { background: transparent !important; }
body.adaptive-collection-active .collection-shell .adaptive-sky-image { opacity: 0 !important; }
.collection-module strong { font-size: 12px; }
