.btn {
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 14px 26px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms var(--ease-smooth);
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
}
.btn-primary:hover { box-shadow: var(--shadow-subtle); }

.cta-primary,
#continueBtn {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.cta-primary:hover,
#continueBtn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 12px 28px rgba(99,102,241,0.35);
  filter: brightness(1.08);
  background: var(--accent-gradient);
}

.cta-primary:active,
#continueBtn:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 6px 16px rgba(99,102,241,0.25);
  background: var(--accent-gradient);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
}

.button {
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 14px 26px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms var(--ease-smooth);
  overflow: visible;
}

.button-glow {
  position: relative;
  overflow: visible;
  transition: transform 160ms ease;
}

.button-glow::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, box-shadow 220ms ease;
}

.button-glow:hover {
  transform: translateY(-1px);
}

.button-glow:active {
  transform: translateY(0) scale(0.98);
}

.button-glow.primary:hover::after {
  opacity: 1;
  box-shadow:
    0 0 0 2px rgba(120,130,255,0.6),
    0 0 26px rgba(120,130,255,0.45);
}

.button-glow.danger:hover::after {
  opacity: 1;
  box-shadow:
    0 0 0 2px rgba(255,59,48,0.6),
    0 0 22px rgba(255,59,48,0.35);
}

.button-glow.neutral:hover::after {
  opacity: 1;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.2),
    0 0 14px rgba(255,255,255,0.15);
}

.button-glow:focus-visible::after {
  opacity: 1;
  box-shadow:
    0 0 0 2px rgba(120,130,255,0.8),
    0 0 18px rgba(120,130,255,0.4);
}

.builder-add-link {
  display: inline-block;
  font-weight: 500;
  font-size: 0.95rem;
  color: #ffffff;
  text-decoration: none;
  transition: color 180ms ease;
  margin: 10px;
}

.builder-add-link:hover {
  color: #818cf8;
  text-decoration: underline;
}

.field { display: grid; gap: .45rem; }
.field > span { color: var(--text-secondary); font-size: .9rem; }

.field-error {
  border-color: rgba(239, 68, 68, 0.7) !important;
}

input, select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-primary);
  transition: all 200ms var(--ease-smooth);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #6b7cff;
  box-shadow: 0 0 0 2px rgba(91,140,255,0.3);
  outline: none;
}

.alert {
  border-radius: 10px;
  padding: .7rem .9rem;
  border: 1px solid transparent;
}
.alert.error {
  background: rgba(255, 106, 122, 0.12);
  border-color: rgba(255, 106, 122, 0.4);
}

.progress,
.stepper {
  position: relative;
  display: flex;
  background: var(--bg-2);
  border-radius: var(--radius-pill);
  overflow: visible;
  border: 1px solid var(--border-subtle);
}

.step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
  cursor: pointer;
  transition: color 250ms var(--ease-smooth), opacity 250ms var(--ease-smooth), background 250ms var(--ease-smooth);
  font-weight: 600;
  margin: 0;
}

.step.step--first {
  margin-left: 0;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
  clip-path: polygon(
    0% 0%,
    92% 0%,
    100% 50%,
    92% 100%,
    0% 100%
  );
}

.step.step--middle {
  margin-left: -21px;
  clip-path: polygon(
    0% 0%,
    92% 0%,
    100% 50%,
    92% 100%,
    0% 100%,
    8% 50%
  );
}

.step.step--last {
  margin-left: -21px;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
  clip-path: polygon(
    0% 0%,
    100% 0%,
    100% 100%,
    0% 100%,
    8% 50%
  );
}

.step.step--active {
  background: var(--accent-gradient);
  color: #fff;
  z-index: 3;
}

.step.step--first.step--active {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.step.step--last.step--active {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.step.step--complete {
  color: var(--text-primary);
}

.step:disabled {
  cursor: default;
}

.table {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-header,
.table-row {
  display: grid;
  gap: .5rem;
  padding: .65rem;
  align-items: center;
}

.table-header {
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.table-row {
  background: var(--bg-2);
  border-top: 1px solid var(--border-subtle);
}

.fulfillment-batch-row {
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.fulfillment-batch-row:hover {
  background: rgba(120, 130, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(120, 130, 255, 0.35);
}

.cards-table .table-header,
.cards-table .table-row {
  grid-template-columns: inherit;
}

.cards-table .table-header,
.cards-table .table-row {
  gap: 16px;
}

.cards-row {
  align-items: center;
  height: 76px;
}

.cards-table .table-row.cards-row {
  min-height: 0;
  align-items: center;
}

.cards-row input,
.cards-row select,
.cards-row .dropdown,
.cards-row .qty-input {
  height: 44px;
}

.cards-type-cell {
  position: relative;
  display: flex;
  align-items: center;
}

.cards-type-select {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  color: var(--text-primary);
  padding: 0 36px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 3px),
    calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.cards-type-select:focus {
  border-color: #6b7cff;
  box-shadow: 0 0 0 2px rgba(91, 140, 255, 0.3);
  outline: none;
}

.card-image-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
}

.upload-thumb,
.card-image-tile {
  position: relative;
  width: 31px;
  height: 43px;
  padding: 0;
  min-height: 43px;
  border-radius: 6px;
  border: 1px dashed rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border 200ms ease, box-shadow 200ms ease;
}

.card-image-tile.is-empty {
  border-style: dashed;
  flex-direction: row;
  color: var(--text-secondary);
}

.upload-thumb:hover,
.card-image-tile:hover {
  border-color: rgba(120,130,255,0.6);
  box-shadow: 0 0 10px rgba(120,130,255,0.25);
}

.card-image-tile__plus {
  font-size: 20px;
  line-height: 1;
}

.card-image-tile__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 2.5 / 3.5;
}

.card-image-tile__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: none;
  background: rgba(7, 10, 17, 0.84);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    /* border-color 200ms ease, */
    background 200ms ease,
    color 200ms ease;
}

.card-image-tile__remove:hover {
  border: 1px solid rgba(153, 54, 59, 1);
  color: #fecaca;
  box-shadow: inset 0px 0px 0px 10px rgba(239, 68, 68, 0.12);
}

.cards-table .card-image-tile--cards {
  overflow: visible;
}

.cards-table .card-image-tile--cards .card-image-tile__remove--outside {
  top: -10px;
  right: -10px;
  z-index: 5;
}

.card-image-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
}

.card-image-modal[hidden] {
  display: none !important;
}

.card-image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.card-image-modal__frame {
  position: relative;
  z-index: 1;
  max-width: min(94vw, 720px);
  max-height: 92vh;
}

.card-image-modal__frame img {
  width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.pack-block-list {
  display: grid;
  gap: 2.5rem;
}

.pack-block {
  padding: 18px;
  border-radius: var(--radius-lg);
}

.pack-card {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.03),
    rgba(255,255,255,0.015)
  );
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.pack-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.pack-block__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.pack-block__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.pack-col {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.pack-left-top {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.pack-price-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  width: calc(66.6667% - 10px);
  max-width: 100%;
}

.price-equals {
  align-self: center;
  justify-self: center;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1;
}

.price-recommendation {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 200ms ease;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.price-recommendation.is-visible {
  opacity: 1;
  height: auto;
  overflow: visible;
}

.info-icon {
  font-size: 0.9rem;
  opacity: 0.7;
}

.pack-style-field {
  width: 100%;
}

.pack-style-field .segmented {
  width: 100%;
}

.pack-type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pack-type-pill {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.pack-type-pill.active {
  border-color: rgba(99, 102, 241, 0.55);
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.12);
}

.pack-image-cell {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.pack-image-tile {
  position: relative;
  width: min(240px, 100%);
  aspect-ratio: 2.5 / 3.5;
  height: auto;
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.pack-preview-container {
  width: 260px;
  max-width: 100%;
  min-height: 364px;
}

.pack-preview-container.pack-image-tile {
  aspect-ratio: auto;
  height: auto;
}

.pack {
  width: 100%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.review-panel--preview .pack {
  overflow: visible;
}

.review-panel--preview .pack > .card-stack {
  z-index: 1;
}

.review-panel--preview .pack > .pack__background,
.review-panel--preview .pack > .pack__overlay,
.review-panel--preview .pack > .pack__art,
.review-panel--preview .pack > .pack__wax-shell,
.review-panel--preview .pack > .pack__cards,
.review-panel--preview .pack > .plastic-label-region {
  z-index: 3;
}

.pack--wax {
  aspect-ratio: 1200 / 1680;
}

.pack__wax-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pack__wax-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.pack__wax-top,
.pack__wax-bottom {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: transform 1.2s cubic-bezier(0.22, 0.75, 0.28, 1), opacity 1.2s cubic-bezier(0.22, 0.75, 0.28, 1);
}

.pack__wax-top {
  clip-path: polygon(0 0, 100% 0, 100% 34%, 94% 33.3%, 88% 34.4%, 82% 33.6%, 76% 34.5%, 70% 33.7%, 64% 34.4%, 58% 33.5%, 52% 34.3%, 46% 33.6%, 40% 34.2%, 34% 33.4%, 28% 34.1%, 22% 33.5%, 16% 34%, 10% 33.4%, 4% 34.1%, 0 33.6%);
}

.pack__wax-bottom {
  clip-path: polygon(-1% 33.6%, 4% 34.1%, 10% 33.4%, 16% 34%, 22% 33.5%, 28% 34.1%, 34% 33.4%, 40% 34.2%, 46% 33.6%, 52% 34.3%, 58% 33.5%, 64% 34.4%, 70% 33.7%, 76% 34.5%, 82% 33.6%, 88% 34.4%, 94% 33.3%, 101% 34%, 101% 101%, -1% 101%);
}

.pack--plastic,
.pack--foil {
  aspect-ratio: 1200 / 2080;
}

.pack__background,
.pack__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pack__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.pack__cards {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.pack--wax.is-opening .pack__wax-top {
  transform: translateY(-120%) rotate(6deg);
}

.pack--wax.is-opening .pack__wax-bottom {
  transform: translateY(calc(160% + 120vh + 800px)) rotate(-4deg);
  opacity: 0;
}

.pack--wax.open-complete .pack__cards {
  opacity: 1;
  transform: translateY(0);
}

.plastic-pack {
  position: relative;
  aspect-ratio: 1200 / 2080;
}

.plastic-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plastic-label-region {
  position: absolute;
  width: 86%;
  left: 50%;
  transform: translateX(-50%);
  top: calc((315 / 2080) * 100%);
  height: calc((1450 / 2080) * 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.user-art {
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
}

.pack--foil {
  border-radius: 14px;
}

.pack-image-tile__empty {
  display: inline-block;
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-secondary);
  padding: 0 10px;
}

.pack-tile-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  animation: packTileSpin 700ms linear infinite;
}

@keyframes packTileSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.pack-image-tile:hover {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.pack-image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pack-earnings {
  /* border: 1px solid var(--border-subtle); */
  /* border-radius: var(--radius-md); */
  /* padding: 12px; */
  /* background: rgba(255, 255, 255, 0.03); */
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
}

.pack-earnings-net {
  color: #d9ffe8;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.pack-earnings-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.earnings-header {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
}

.earnings-amount {
  white-space: nowrap;
}

.earnings-context {
  white-space: nowrap;
  opacity: 0.75;
}

.earnings-header .pack-earnings-net,
.earnings-header .pack-earnings-sub {
  margin: 0;
}

.earnings-breakdown {
  margin: 0;
}

.earnings-toggle {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.85rem;
  user-select: none;
}

.earnings-breakdown__rows {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.pack-image-guidance {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-secondary);
  max-width: 220px;
}

.price-group {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  height: 43px;
}

.price-group input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0 1rem;
  color: #fff;
  height: 100%;
  border-radius: 0;
}

.price-group input:focus {
  outline: none;
  box-shadow: none;
}

.price-addon {
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  height: 100%;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.pack-delete-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 40px;
}

.pack-delete-confirm {
  position: absolute;
  right: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #1b2230;
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 250ms ease;
  z-index: 2;
}

.pack-delete-confirm.visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .pack-block__grid {
    grid-template-columns: 1fr;
  }

  .pack-left-top {
    grid-template-columns: 1fr;
  }

  .pack-price-grid {
    width: 100%;
  }
}

.toggle {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: #29354a;
  position: relative;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s var(--ease-smooth);
}

.toggle.on { background: var(--accent-gradient); }
.toggle.on::after { transform: translateX(20px); }

.pack-age-field {
  grid-column: 1 / -1;
  width: 100%;
}

.pack-age-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
}

.segmented {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  overflow: hidden;
}

.segmented-highlight {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--segment-count));
  border-radius: var(--radius-pill);
  background: var(--accent-gradient);
  transition: transform 250ms var(--ease-smooth);
  z-index: 1;
}

.segmented button {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 200ms var(--ease-smooth);
}

.segmented button.active {
  color: #fff;
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  background: var(--bg-2);
  transition: all 200ms var(--ease-smooth);
  cursor: pointer;
}

.dropzone.dragover {
  border-color: #6b7cff;
  background: rgba(91,140,255,0.08);
}

.dropzone-inner p { margin-bottom: .4rem; }
.dropzone-inner span { color: var(--text-secondary); }

.release-options {
  margin-top: 2px;
}

.release-datetime {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: -10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-12px);
  transition:
    max-height 500ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 400ms ease,
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  flex-wrap: nowrap;
  pointer-events: none;
}

.release-datetime > * {
  flex: none;
}

.release-datetime.release-datetime--visible {
  max-height: 160px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.date-input {
  width: 160px;
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.hour-select,
.minute-select {
  width: 70px;
}

.release-ampm-segmented {
  width: 100px;
}

.hour-select,
.minute-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 3px),
    calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.timezone-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-right: 8px;
  white-space: nowrap;
}

.ampm-toggle {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ampm-toggle .segmented button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px 0 15px;
}

.back-upload {
  margin-top: -20px;
  margin-right: 8px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-12px);
  transition:
    max-height 500ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 400ms ease,
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.back-upload.back-upload--visible {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
}

.upload-dropzone {
  position: relative;
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 16px;
  height: 440px;
  padding: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 250ms ease, border-color 250ms ease;
}

#universalBackDropzone.upload-dropzone {
  width: 320px;
  max-width: 100%;
  margin-left: auto;
}

.upload-dropzone:hover {
  border-color: rgba(120,120,255,0.6);
  background: rgba(120,120,255,0.05);
}

.upload-dropzone.dragover {
  border-color: rgba(120,120,255,0.6);
  background: rgba(120,120,255,0.05);
}

.spectra-dropzone {
  position: relative;
  margin-top: 24px;
  width: 100%;
  min-height: 142px;
  border: 2px dashed rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-secondary);
  padding: 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.spectra-dropzone:hover,
.spectra-dropzone:focus-visible {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.07);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  outline: none;
}

.spectra-dropzone.dragover {
  border-color: rgba(99, 102, 241, 0.8);
  background: rgba(99, 102, 241, 0.11);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.spectra-dropzone.is-uploading {
  pointer-events: none;
}

.spectra-dropzone.spectra-dropzone--success {
  border-color: rgba(16, 185, 129, 0.8);
  background: rgba(16, 185, 129, 0.09);
}

.spectra-dropzone.spectra-dropzone--error {
  border-color: rgba(248, 113, 113, 0.85);
  background: rgba(248, 113, 113, 0.08);
}

.spectra-dropzone__message {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.spectra-dropzone__file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  max-width: 100%;
  min-width: 0;
}

.spectra-dropzone__filename {
  display: inline-block;
  max-width: min(74vw, 680px);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.spectra-dropzone__check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.spectra-dropzone__meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.spectra-dropzone__replace {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: rgba(129, 140, 248, 1);
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.spectra-dropzone__replace:hover {
  color: rgba(165, 180, 252, 1);
}

.spectra-dropzone__status {
  margin-top: 10px;
  min-height: 20px;
  font-size: 13px;
}

.spectra-dropzone__status--error {
  color: #fca5a5;
}

.spectra-dropzone__status--success {
  color: #6ee7b7;
}

.upload-progress {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  overflow: hidden;
  transition: opacity 200ms ease;
  pointer-events: none;
  z-index: 3;
}

.upload-progress.active {
  opacity: 1;
}

.upload-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(
    0deg,
    rgba(99,102,241,0.8),
    rgba(139,92,246,0.6)
  );
  transition: height 150ms ease;
}

.upload-percent {
  position: relative;
  font-size: 0.9rem;
  color: #fff;
  z-index: 2;
}

.upload-success .upload-fill {
  background: rgba(16,185,129,0.85);
}

.upload-progress.upload-progress--compact .upload-percent {
  font-size: 0;
}

.upload-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.upload-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.upload-preview {
  width: 250px;
  height: 350px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.upload-preview-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(7, 10, 17, 0.84);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
}

.upload-preview-remove:hover {
  border: 1px solid rgba(153, 54, 59, 1);
  color: #fecaca;
  box-shadow: inset 0px 0px 0px 10px rgba(239, 68, 68, 0.12);
}

.bulk-import-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.bulk-import-panel__title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.bulk-import-dropzone {
  width: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-secondary);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.bulk-import-dropzone span {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 2px;
}

.bulk-import-dropzone small {
  display: block;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.bulk-import-dropzone:hover,
.bulk-import-dropzone.is-dragover {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.08);
}

.bulk-import-progress {
  margin-top: 10px;
}

.bulk-import-progress__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bulk-import-progress__meta {
  min-width: 0;
}

.bulk-import-progress__text {
  font-size: 0.86rem;
  color: var(--text-primary);
}

.bulk-import-progress__subtext {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.bulk-import-progress__cancel {
  margin-top: 0;
  margin-left: auto;
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

.bulk-import-progress__cancel:hover {
  border-color: rgba(248, 113, 113, 0.75);
  background: rgba(248, 113, 113, 0.14);
}

.bulk-import-progress__bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.bulk-import-progress__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.08) 0 10px,
    rgba(255, 255, 255, 0.03) 10px 20px
  );
  background-size: 28px 100%;
  animation: bulk-progress-track-stripes 1.1s linear infinite;
  pointer-events: none;
}

.bulk-import-progress__bar-fill {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6d7cff, #8b5cf6);
  transition: width 160ms ease;
}

@keyframes bulk-progress-track-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 28px 0;
  }
}

.card-name-cell {
  position: relative;
}

.card-name-cell.has-bulk-status input {
  padding-right: 180px;
}

.card-bulk-status {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.card-bulk-status.is-working {
  color: rgba(148, 163, 184, 0.95);
}

.card-bulk-status.is-success {
  color: rgba(74, 222, 128, 0.95);
}

.card-bulk-status.is-issue {
  color: rgba(248, 113, 113, 0.95);
}

.card-image-cell.is-missing-side .card-image-tile {
  border-color: rgba(239, 68, 68, 0.7) !important;
}

.card-image-cell.is-missing-side-pending .card-image-tile {
  border-color: rgba(99, 102, 241, 0.6) !important;
  background: rgba(99, 102, 241, 0.08);
}

#bulkAssignModal .bf-modal__actions {
  margin-top: 14px;
}

.bulk-assign-field {
  margin-top: 10px;
}

#bulkAssignTypeSelect {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(120, 130, 255, 0.58);
  background: linear-gradient(180deg, rgba(26, 34, 55, 0.86), rgba(19, 27, 44, 0.9));
  color: #e8edff;
  font-size: 1.02rem;
  font-weight: 600;
  padding: 0 42px 0 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(228, 235, 255, 0.95) 50%),
    linear-gradient(135deg, rgba(228, 235, 255, 0.95) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

#bulkAssignTypeSelect:focus {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow:
    0 0 0 2px rgba(129, 140, 248, 0.22),
    0 0 16px rgba(129, 140, 248, 0.2);
}


.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, .76);
  display: grid;
  place-items: center;
  z-index: 20;
}

#firstTimeModal .modal-card {
  width: min(837px, 94vw);
  background: linear-gradient(180deg, #1a2436, #111a29);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: var(--shadow-subtle);
}

#firstTimeModal .modal-card > .btn {
  display: block;
  margin-left: auto;
}

.placeholder-graphic {
  height: 220px;
  width: 100%;
  max-width: 800px;
  padding: 15px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background-image: url('/assets/img/tutorial.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-origin: content-box;
  background-clip: content-box;
  background-color: #111620;
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 0 0 30px #111620;
}

.bf-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.bf-modal[hidden] {
  display: none !important;
}

.bf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  animation: fadeIn 250ms ease forwards;
}

.bf-modal__panel {
  position: relative;
  background: linear-gradient(145deg, #161d2b, #111827);
  border-radius: 20px;
  padding: 28px 32px;
  width: 420px;
  max-width: 90%;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
  animation: slideUp 350ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.bf-modal__message {
  font-size: 18px;
  color: #e5e7eb;
  margin-bottom: 20px;
}

.bf-modal__actions {
  display: flex;
  justify-content: flex-end;
}

.bf-btn {
  border: none;
  border-radius: 12px;
  padding: 14px 26px;
  font-weight: 600;
  cursor: pointer;
}

.bf-btn--primary {
  background: var(--accent-gradient);
  color: #fff;
}

.btn-series-help {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 220ms var(--ease-smooth), color 220ms var(--ease-smooth), background 220ms var(--ease-smooth), transform 180ms var(--ease-smooth);
}

.btn-series-help__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.btn-series-help:hover {
  border-color: rgba(99, 102, 241, 0.55);
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}

.btn-series-help::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: rgba(10, 16, 28, 0.96);
  color: #e5e7eb;
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 25;
}

.btn-series-help:hover::after,
.btn-series-help:focus-visible::after {
  opacity: 1;
}

.btn-reset-series {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 220ms var(--ease-smooth), color 220ms var(--ease-smooth), background 220ms var(--ease-smooth);
}

.btn-reset-series:hover {
  border-color: rgba(239, 68, 68, 0.55);
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
}

.btn-row-delete {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  position: relative;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    /* border-color 200ms ease, */
    background 200ms ease,
    color 200ms ease;
}

.btn-row-delete:hover {
  border-color: rgba(239, 68, 68, 0.55);
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
}

.btn-row-primary:hover {
  border-color: rgba(99, 102, 241, 0.55);
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.12);
}

.btn-row-neutral:hover {
  border-color: rgba(148, 163, 184, 0.55);
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.12);
}

.btn-row-delete,
.btn-row-primary,
.btn-row-neutral {
  transition:
    border-color 200ms ease,
    background 200ms ease,
    color 200ms ease;
}

.btn-row-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bf-modal__panel--confirm {
  width: 460px;
}

.bf-modal__title {
  margin: 0 0 8px;
  font-size: 22px;
  color: #f3f5fa;
}

.bf-modal__actions--split {
  justify-content: flex-end;
  gap: 10px;
}

.launching-modal__loading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.launching-modal__message {
  margin: 0;
}

.launching-modal__progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(122, 145, 255, 0.18);
  overflow: hidden;
}

.launching-modal__progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(122, 145, 255, 0.95), rgba(86, 112, 255, 0.95));
  transition: width 220ms ease;
}

.launching-modal__progress-text {
  font-size: 12px;
  color: #d8def1;
  text-align: right;
}

.launching-modal__done .bf-modal__message {
  margin: 0;
}

#launchingSeriesActions {
  margin-top: 16px;
}

.bf-btn--neutral {
  background: #2b3445;
  color: #e2e8f0;
}

.bf-btn--danger {
  background: #ef4444;
  color: #fff;
}

.bf-toast {
  position: fixed;
  right: 24px;
  bottom: 86px;
  z-index: 10000;
  background: rgba(24, 31, 46, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #edf2f7;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.bf-toast[hidden] {
  display: none !important;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes launch-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 3px;
  background: rgba(126, 123, 255, 0.34);
  border: 0;
  color: #e4e9ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--muted {
  background: rgba(170, 178, 197, 0.18);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
