.sealed-portfolio-page {
  background:
    linear-gradient(180deg, #090d13 0%, #101016 46%, #070b12 100%),
    #070b12;
}

.sealed-shell {
  width: min(1440px, 100%);
  padding-inline: clamp(14px, 3vw, 32px);
}

.sealed-portfolio-page [hidden] {
  display: none !important;
}

.sp-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid rgba(248, 200, 107, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 22, 28, 0.96), rgba(9, 13, 20, 0.98));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  padding: clamp(16px, 3vw, 24px);
}

.sp-hero,
.sp-dashboard-head,
.sp-product-head,
.sp-account-summary,
.sp-preview-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.sp-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
}

.sp-product-head {
  grid-template-columns: minmax(0, 1fr);
}

.sp-kicker,
.sp-metric-label {
  margin: 0;
  color: var(--brand-gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sp-panel h1,
.sp-panel h2,
.sp-panel h3,
.sp-auth-card h2 {
  margin: 0;
  text-align: left;
}

.sp-panel p {
  margin: 0;
  color: var(--muted);
}

.sp-actions,
.sp-workflow-nav,
.sp-workflow-steps,
.sp-section-head,
.sp-section-actions,
.sp-inline-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.sp-section-head {
  justify-content: space-between;
}

.sp-section-head--search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  align-items: end;
  gap: 12px 24px;
}

.sp-section-head--search .sp-inline-search {
  width: 100%;
  margin-left: 0;
}

.sp-section-actions {
  justify-content: flex-end;
  margin-left: auto;
}

.sp-section-actions .button {
  flex: 0 0 auto;
}

.sp-section-actions .sp-table-search {
  width: min(260px, 100%);
}

.sp-inline-search {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 1 520px;
  align-items: end;
  width: min(520px, 100%);
  margin-left: auto;
}

.sp-inline-search label {
  flex: 1 1 auto;
  min-width: 0;
}

.sp-inline-search .button {
  flex: 0 0 auto;
  width: 144px;
  min-height: 42px;
  align-self: end;
  white-space: nowrap;
}

.sp-inline-search .button:hover,
.sp-inline-search .button:focus-visible {
  transform: none;
}

.sp-inline-search .button.is-loading {
  cursor: wait;
  filter: none;
  opacity: 0.84;
  pointer-events: none;
}

.sp-inline-search .button.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sp-button-spin 700ms linear infinite;
}

.sp-inline-search .button.is-loading::after {
  display: none;
}

@keyframes sp-button-spin {
  to {
    transform: rotate(360deg);
  }
}

.sp-account-bar {
  display: grid;
  grid-template-columns: minmax(150px, 0.36fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(122, 162, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px 16px;
}

.sp-account-bar__summary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sp-account-bar__summary strong {
  color: #f4f7ff;
  font-size: 0.95rem;
}

.sp-account-bar__settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px 16px;
  margin: 0;
}

.sp-account-bar__settings div {
  min-width: 0;
  border-left: 1px solid rgba(122, 162, 255, 0.26);
  padding-left: 10px;
}

.sp-account-bar__settings dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sp-account-bar__settings dd {
  margin: 3px 0 0;
  color: #f4f7ff;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sp-account-bar__edit {
  justify-self: end;
  white-space: nowrap;
}

.sp-workflow-nav {
  justify-content: space-between;
  border: 1px solid rgba(122, 162, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.sp-workflow-steps {
  gap: 6px;
}

.sp-workflow-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  color: #dce6f4;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 5px 10px 5px 6px;
  text-decoration: none;
}

.sp-workflow-nav a.is-active {
  border-color: rgba(248, 200, 107, 0.72);
  background: rgba(248, 200, 107, 0.14);
  color: #fff2cf;
}

.sp-step-number {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  background: rgba(122, 162, 255, 0.16);
  color: #dbe6ff;
  font-size: 0.72rem;
}

.sp-workflow-nav a.is-active .sp-step-number {
  background: rgba(248, 200, 107, 0.25);
  color: #ffe5a8;
}

.sp-portfolio-tape {
  overflow: hidden;
  border: 1px solid rgba(248, 200, 107, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 21, 29, 0.98), rgba(6, 9, 15, 0.98)),
    #070b12;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
}

.sp-portfolio-tape__head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(248, 200, 107, 0.18);
  color: var(--muted);
  font-size: 0.78rem;
  padding: 9px 14px;
}

.sp-portfolio-tape__label {
  color: var(--brand-gold);
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sp-portfolio-tape__date {
  flex: 1;
  min-width: 0;
}

.sp-portfolio-tape__head a {
  color: #ffe5a8;
  font-weight: 800;
  text-decoration: none;
}

.sp-portfolio-tape__head a:hover,
.sp-portfolio-tape__head a:focus-visible {
  text-decoration: underline;
}

.sp-portfolio-tape__window {
  overflow: hidden;
}

.sp-portfolio-tape__track {
  display: flex;
  width: max-content;
  animation: sp-portfolio-tape-scroll 58s linear infinite;
}

.sp-portfolio-tape:hover .sp-portfolio-tape__track,
.sp-portfolio-tape:focus-within .sp-portfolio-tape__track {
  animation-play-state: paused;
}

.sp-portfolio-tape__item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--ink);
  font-size: 0.86rem;
  padding: 10px 18px;
  text-decoration: none;
  white-space: nowrap;
}

.sp-portfolio-tape__symbol {
  color: #ffe5a8;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sp-portfolio-tape__name {
  max-width: 170px;
  overflow: hidden;
  color: #dce6f4;
  font-weight: 750;
  text-overflow: ellipsis;
}

.sp-portfolio-tape__meta {
  color: var(--muted);
  font-weight: 800;
}

.sp-portfolio-tape__price,
.sp-portfolio-tape__change {
  font-weight: 850;
}

.sp-portfolio-tape__item.is-up .sp-portfolio-tape__change {
  color: #9ee7b6;
}

.sp-portfolio-tape__item.is-down .sp-portfolio-tape__change {
  color: #ffb2bd;
}

.sp-portfolio-tape__item.is-flat .sp-portfolio-tape__change {
  color: var(--muted);
}

@keyframes sp-portfolio-tape-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.sp-access-pill,
.sp-status,
.sp-lock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.sp-access-pill,
.sp-status {
  color: #ffe5a8;
  background: rgba(248, 200, 107, 0.1);
}

.sp-access-pill {
  white-space: nowrap;
}

.sp-lock-badge {
  min-height: 24px;
  border-color: rgba(122, 162, 255, 0.32);
  background: rgba(122, 162, 255, 0.12);
  color: #dbe6ff;
  font-size: 0.72rem;
  padding: 3px 8px;
  text-transform: uppercase;
}

.sp-section-note,
.sp-help-text {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.sp-section-note {
  margin: -4px 0 6px;
}

.sp-readout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  align-items: stretch;
}

.sp-readout-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sp-readout-main h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.sp-readout-link,
.sp-metric-link {
  align-self: flex-start;
  color: var(--brand-gold);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.sp-readout-link {
  margin-top: 8px;
}

.sp-metric-link {
  display: inline-block;
  margin-top: 8px;
}

.sp-readout-link:hover,
.sp-metric-link:hover {
  text-decoration: underline;
}

.sp-action-readout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sp-action-readout-grid article {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.sp-action-readout-grid article > span,
.sp-action-readout-grid p {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sp-action-readout-grid strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 1.05rem;
}

.sp-portfolio-summary {
  display: grid;
  gap: 14px;
}

.sp-summary-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.sp-summary-head h2 {
  margin: 3px 0 0;
  color: #f4f7ff;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.12;
  text-align: left;
}

.sp-summary-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.3;
  text-align: right;
}

.sp-summary-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.16fr) minmax(230px, 0.92fr) minmax(230px, 0.92fr);
  gap: 12px;
  align-items: stretch;
}

.sp-summary-group {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 26, 35, 0.95), rgba(9, 13, 20, 0.98)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  padding: 16px;
}

.sp-summary-group--value {
  border-color: rgba(248, 200, 107, 0.3);
  background:
    linear-gradient(180deg, rgba(28, 24, 15, 0.7), rgba(10, 14, 21, 0.98)),
    rgba(255, 255, 255, 0.04);
}

.sp-summary-group h3 {
  margin: 0;
  color: var(--brand-gold);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
}

.sp-summary-list {
  display: grid;
  align-content: start;
  margin: 0;
}

.sp-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 0;
}

.sp-summary-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.sp-summary-item:last-child {
  padding-bottom: 0;
}

.sp-summary-item dt {
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
}

.sp-summary-item dt span {
  display: block;
  margin-top: 2px;
  color: rgba(220, 230, 244, 0.62);
  font-size: 0.68rem;
  font-weight: 750;
}

.sp-summary-item dd {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.sp-summary-item--primary {
  grid-template-columns: 1fr;
  gap: 5px;
  border-top: 0;
  border-bottom: 1px solid rgba(248, 200, 107, 0.18);
  margin-bottom: 2px;
  padding: 2px 0 14px;
}

.sp-summary-item--primary dt {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-summary-item--primary dd {
  display: flex;
  justify-content: flex-start;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  text-align: left;
  white-space: normal;
}

.sp-summary-group--value .sp-summary-item--primary dd {
  color: #fff7dc;
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  line-height: 1.05;
}

.sp-summary-item--primary + .sp-summary-item {
  border-top: 0;
}

.sp-summary-item--locked dd {
  white-space: normal;
}

.sp-summary-item .sp-metric-link {
  margin-top: 0;
  font-size: 0.76rem;
}

.sp-summary-item.is-up dd {
  color: #9ee7b6;
}

.sp-summary-item.is-down dd {
  color: #ffb2bd;
}

.sp-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.sp-metric {
  min-height: 94px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
}

.sp-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-metric strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.15rem;
}

.sp-metric--locked strong {
  margin-top: 8px;
}

.is-up {
  color: #9ee7b6;
}

.is-down {
  color: #ffb2bd;
}

.sp-grid {
  display: grid;
  gap: var(--gap);
}

.sp-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sp-grid--thirds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sp-account-preferences {
  grid-column: 1 / -1;
}

.sp-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.sp-auth-card,
.sp-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sp-auth-card .sp-agreement-form {
  gap: 14px;
}

.sp-user-agreement-callout {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(122, 162, 255, 0.24);
  border-radius: 8px;
  background: rgba(122, 162, 255, 0.08);
  padding: 12px;
}

.sp-user-agreement-callout .sp-checkbox {
  align-items: flex-start;
  color: #dce6f4;
  font-size: 0.82rem;
  font-weight: 700;
}

.sp-user-agreement-callout .sp-checkbox input {
  margin-top: 3px;
}

.sp-form-grid,
.sp-lot-form .sp-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.sp-ev-lab-form .sp-checkbox,
.sp-ev-lab-form .button {
  align-self: end;
}

.sp-ev-lab-form .sp-checkbox {
  min-height: var(--ctrl-h);
}

.sp-wide {
  grid-column: 1 / -1;
}

.sp-form label,
.sp-auth-card label,
.sp-inline-search label,
.sp-danger-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #dce6f4;
  font-size: 0.86rem;
  font-weight: 750;
}

.sp-form fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.sp-form legend {
  margin-bottom: 6px;
  color: #f4f7ff;
  font-size: 1rem;
  font-weight: 850;
}

.sp-form-section,
.sp-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sp-form .sp-choice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid rgba(248, 200, 107, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  padding: 12px;
}

.sp-form .sp-choice-card:has(input:checked) {
  border-color: rgba(248, 200, 107, 0.72);
  background: rgba(248, 200, 107, 0.12);
}

.sp-form .sp-choice-card input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 2px;
}

.sp-form .sp-choice-card strong,
.sp-form .sp-choice-card small {
  display: block;
}

.sp-form .sp-choice-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.sp-settings-form {
  gap: 14px;
}

.sp-settings-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 8px;
  margin: 0;
}

.sp-settings-summary div,
.sp-form .sp-setting-group {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.sp-settings-summary div {
  padding: 10px;
}

.sp-settings-summary dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sp-settings-summary dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 850;
}

.sp-form .sp-setting-group {
  padding: 14px;
}

.sp-rule-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.sp-rule-list strong {
  color: var(--ink);
}

.sp-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.sp-settings-grid--compact {
  grid-template-columns: minmax(220px, 360px);
}

.sp-input-with-prefix,
.sp-input-with-suffix {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid rgba(248, 200, 107, 0.28);
  border-radius: 8px;
  background: rgba(6, 9, 15, 0.9);
  color: var(--muted);
}

.sp-input-with-suffix {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sp-input-with-prefix span,
.sp-input-with-suffix span {
  padding-inline: 11px;
  font-weight: 850;
}

.sp-form .sp-input-with-prefix input,
.sp-form .sp-input-with-suffix input {
  min-height: 40px;
  border: 0;
  background: transparent;
}

.sp-settings-actions {
  display: flex;
  justify-content: flex-end;
}

.sp-form input,
.sp-form select,
.sp-form textarea,
.sp-auth-card input,
.sp-inline-search input,
.sp-table-search,
.sp-danger-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(248, 200, 107, 0.28);
  border-radius: 8px;
  background: rgba(6, 9, 15, 0.9);
  color: var(--ink);
  font: inherit;
  padding: 9px 11px;
}

.sp-form input[name="transaction_total"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.sp-form input[type="number"][name="target_buy_price"],
.sp-form input[type="number"][name="threshold_value"] {
  appearance: textfield !important;
  -moz-appearance: textfield !important;
}

.sp-form input[name="transaction_total"]::-webkit-inner-spin-button,
.sp-form input[name="transaction_total"]::-webkit-outer-spin-button,
.sp-form input[type="number"][name="target_buy_price"]::-webkit-inner-spin-button,
.sp-form input[type="number"][name="target_buy_price"]::-webkit-outer-spin-button,
.sp-form input[type="number"][name="threshold_value"]::-webkit-inner-spin-button,
.sp-form input[type="number"][name="threshold_value"]::-webkit-outer-spin-button {
  display: none;
  margin: 0;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.sp-form textarea {
  min-height: 110px;
  resize: vertical;
}

.sp-checkbox {
  align-items: center;
  flex-direction: row;
  justify-content: flex-start;
  line-height: 1.35;
}

.sp-form label.sp-checkbox {
  flex-direction: row;
  justify-content: flex-start;
}

.sp-checkbox input {
  width: auto;
  min-height: 0;
}

.sp-table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
}

.sp-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.sp-table th,
.sp-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  text-align: right;
  vertical-align: top;
}

.sp-table th:first-child,
.sp-table td:first-child {
  text-align: left;
}

.sp-table th.sp-table-actions,
.sp-table td.sp-table-actions {
  text-align: center;
}

.sp-table th:first-child,
.sp-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #11151d;
}

.sp-table thead th:first-child {
  z-index: 3;
}

.sp-table thead th {
  background: #211b12;
  color: #ffe5a8;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.sp-table tbody tr.sp-holding-row {
  --sp-row-edge: rgba(255, 255, 255, 0.08);
  --sp-row-shade: transparent;
  background: var(--sp-row-shade);
}

.sp-table tbody tr.sp-holding-row[data-holding-chart-row="true"] {
  cursor: pointer;
}

.sp-table tbody tr.sp-holding-row[data-holding-chart-row="true"]:hover,
.sp-table tbody tr.sp-holding-row[data-holding-chart-row="true"]:focus-visible {
  --sp-row-shade: rgba(248, 200, 107, 0.12);
}

.sp-table tbody tr.sp-holding-row.is-selected {
  --sp-row-edge: rgba(248, 200, 107, 0.95);
  --sp-row-shade: rgba(248, 200, 107, 0.15);
}

.sp-table tbody tr.sp-holding-row[data-holding-chart-row="true"]:focus-visible {
  outline: 2px solid rgba(248, 200, 107, 0.78);
  outline-offset: -2px;
}

.sp-table tbody tr.sp-holding-row:nth-child(even) {
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025)),
    var(--sp-row-shade);
}

.sp-table tbody tr.sp-holding-row th:first-child,
.sp-table tbody tr.sp-holding-row td:first-child {
  background:
    linear-gradient(0deg, var(--sp-row-shade), var(--sp-row-shade)),
    #11151d;
  box-shadow: inset 3px 0 0 var(--sp-row-edge);
}

.sp-table tbody tr.sp-holding-row:nth-child(even) th:first-child,
.sp-table tbody tr.sp-holding-row:nth-child(even) td:first-child {
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025)),
    linear-gradient(0deg, var(--sp-row-shade), var(--sp-row-shade)),
    #11151d;
}

.sp-table tbody tr.sp-holding-chart-row td,
.sp-table tbody tr.sp-holding-chart-row td:first-child {
  position: static;
  border-bottom-color: rgba(248, 200, 107, 0.14);
  background: rgba(5, 8, 13, 0.78);
  box-shadow: inset 3px 0 0 rgba(248, 200, 107, 0.72);
  padding: 0 12px 14px;
  text-align: left;
}

.sp-table tbody tr.sp-set-group-row th {
  border-bottom-color: rgba(248, 200, 107, 0.22);
  background:
    linear-gradient(90deg, rgba(248, 200, 107, 0.18), rgba(248, 200, 107, 0.06)),
    #11151d;
  box-shadow: inset 3px 0 0 rgba(248, 200, 107, 0.72);
  color: #ffe5a8;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
}

.sp-table tbody tr.sp-set-group-row small {
  margin-left: 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.sp-holding-row[data-product-type="collector-box"],
.sp-holding-row[data-product-type="collector-booster-display"],
.sp-holding-row[data-product-type="collector-booster-box"] {
  --sp-row-edge: rgba(248, 200, 107, 0.7);
  --sp-row-shade: rgba(248, 200, 107, 0.095);
}

.sp-holding-row[data-product-type="play-box"],
.sp-holding-row[data-product-type="play-booster-display"],
.sp-holding-row[data-product-type="play-booster-box"] {
  --sp-row-edge: rgba(91, 190, 255, 0.58);
  --sp-row-shade: rgba(91, 190, 255, 0.07);
}

.sp-holding-row[data-product-type="beyond-box"],
.sp-holding-row[data-product-type="beyond-booster-display"],
.sp-holding-row[data-product-type="beyond-booster-box"] {
  --sp-row-edge: rgba(84, 211, 187, 0.58);
  --sp-row-shade: rgba(84, 211, 187, 0.06);
}

.sp-holding-row[data-product-type="jumpstart-box"],
.sp-holding-row[data-product-type="jumpstart-booster-display"],
.sp-holding-row[data-product-type="jumpstart-booster-box"] {
  --sp-row-edge: rgba(147, 230, 135, 0.56);
  --sp-row-shade: rgba(147, 230, 135, 0.055);
}

.sp-holding-row[data-product-type="draft-box"],
.sp-holding-row[data-product-type="draft-booster-display"],
.sp-holding-row[data-product-type="draft-booster-box"] {
  --sp-row-edge: rgba(72, 220, 162, 0.58);
  --sp-row-shade: rgba(72, 220, 162, 0.065);
}

.sp-holding-row[data-product-type="set-box"],
.sp-holding-row[data-product-type="set-booster-display"],
.sp-holding-row[data-product-type="set-booster-box"] {
  --sp-row-edge: rgba(177, 149, 255, 0.58);
  --sp-row-shade: rgba(177, 149, 255, 0.07);
}

.sp-holding-row[data-product-type="bundle"],
.sp-holding-row[data-product-type="gift-bundle"],
.sp-holding-row[data-product-type="compleat-bundle"],
.sp-holding-row[data-product-type="nightmare-bundle"],
.sp-holding-row[data-product-type="finish-line-bundle"] {
  --sp-row-edge: rgba(255, 184, 108, 0.58);
  --sp-row-shade: rgba(255, 184, 108, 0.06);
}

.sp-holding-row[data-product-type="commander-deck"],
.sp-holding-row[data-product-type="commander-deck-set"],
.sp-holding-row[data-product-type="commander-deck-display"] {
  --sp-row-edge: rgba(255, 126, 150, 0.58);
  --sp-row-shade: rgba(255, 126, 150, 0.065);
}

.sp-holding-row[data-product-type="preconstructed-deck"] {
  --sp-row-edge: rgba(178, 204, 224, 0.52);
  --sp-row-shade: rgba(178, 204, 224, 0.055);
}

.sp-table th button {
  appearance: none;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  line-height: 1.25;
  overflow-wrap: break-word;
  padding: 0;
  text-align: inherit;
  text-transform: inherit;
  transform: none;
  white-space: normal;
}

.sp-table th button:hover,
.sp-table th button:focus-visible {
  color: inherit;
  filter: none;
  transform: none;
  box-shadow: none;
}

.sp-table th button:focus-visible {
  outline: 2px solid rgba(248, 200, 107, 0.75);
  outline-offset: 3px;
}

.sp-table th button::after {
  content: "Sort";
  display: block;
  margin-top: 3px;
  color: rgba(255, 229, 168, 0.58);
  font-size: 0.62rem;
  line-height: 1;
}

.sp-table th[aria-sort="ascending"] button::after {
  content: "Asc";
}

.sp-table th[aria-sort="descending"] button::after {
  content: "Desc";
}

.sp-picker-wrap {
  max-height: 460px;
}

.sp-picker-table {
  min-width: 980px;
}

.sp-picker-table th:first-child,
.sp-picker-table td:first-child {
  width: 74px;
  text-align: center;
}

.sp-picker-table input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 0;
}

.sp-picker-table tr.is-selected {
  background: rgba(248, 200, 107, 0.12);
  box-shadow: inset 3px 0 0 rgba(248, 200, 107, 0.88);
}

.sp-sift-ok {
  box-shadow: inset 3px 0 0 rgba(54, 220, 162, 0.78);
}

.sp-sift-bad {
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.1);
}

.sp-table tbody th span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.sp-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid rgba(255, 178, 189, 0.38);
  border-radius: 999px;
  background: rgba(255, 178, 189, 0.08);
  color: #ffd8dd;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 9px;
  text-decoration: none;
}

.sp-lot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.sp-lot-actions--inline {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.sp-lot-actions form {
  margin: 0;
}

.sp-icon-button--edit {
  border-color: rgba(248, 200, 107, 0.46);
  background: rgba(248, 200, 107, 0.1);
  color: #ffe7aa;
}

.sp-icon-button--table-edit {
  width: 48px;
  min-width: 48px;
  padding-inline: 0;
}

.sp-icon-button--compact {
  width: 30px;
  min-width: 30px;
  padding-inline: 0;
}

.sp-icon-button--menu {
  min-width: 78px;
  border-color: rgba(248, 200, 107, 0.5);
  background: rgba(248, 200, 107, 0.12);
  color: #ffe7aa;
}

.sp-icon-button--add {
  border-color: rgba(118, 215, 255, 0.48);
  background: rgba(118, 215, 255, 0.11);
  color: #d9f6ff;
}

.sp-icon-button--sell {
  border-color: rgba(158, 231, 182, 0.42);
  background: rgba(54, 220, 162, 0.1);
  color: #c9f7d7;
}

.sp-icon-button--rip {
  border-color: rgba(122, 162, 255, 0.44);
  background: rgba(122, 162, 255, 0.12);
  color: #dbe6ff;
}

.sp-icon-button:hover,
.sp-icon-button:focus-visible {
  border-color: rgba(255, 178, 189, 0.68);
  background: rgba(255, 106, 130, 0.16);
  box-shadow: 0 0 0 2px rgba(255, 106, 130, 0.18);
  color: #fff3f5;
  filter: none;
}

.sp-icon-button--sell:hover,
.sp-icon-button--sell:focus-visible {
  border-color: rgba(158, 231, 182, 0.72);
  background: rgba(54, 220, 162, 0.18);
  box-shadow: 0 0 0 2px rgba(54, 220, 162, 0.16);
  color: #effff4;
}

.sp-icon-button--edit:hover,
.sp-icon-button--edit:focus-visible,
.sp-icon-button--menu:hover,
.sp-icon-button--menu:focus-visible {
  border-color: rgba(248, 200, 107, 0.76);
  background: rgba(248, 200, 107, 0.18);
  box-shadow: 0 0 0 2px rgba(248, 200, 107, 0.16);
  color: #fff3cf;
}

.sp-icon-button--add:hover,
.sp-icon-button--add:focus-visible {
  border-color: rgba(118, 215, 255, 0.74);
  background: rgba(118, 215, 255, 0.19);
  box-shadow: 0 0 0 2px rgba(118, 215, 255, 0.16);
  color: #f5fdff;
}

.sp-icon-button--rip:hover,
.sp-icon-button--rip:focus-visible {
  border-color: rgba(122, 162, 255, 0.74);
  background: rgba(122, 162, 255, 0.2);
  box-shadow: 0 0 0 2px rgba(122, 162, 255, 0.17);
  color: #f4f8ff;
}

.sp-mover-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-left: 1.2rem;
}

.sp-mover-list li {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
}

.sp-mover-quantity {
  min-width: 2ch;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.sp-history-chart {
  width: 100%;
  max-height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.sp-holding-chart-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(122, 162, 255, 0.24);
  border-radius: 8px;
  background: rgba(122, 162, 255, 0.06);
  padding: 14px;
}

.sp-holding-chart-panel .sp-section-note {
  margin: -4px 0 0;
}

.sp-empty,
.sp-note,
.sp-note-panel p {
  color: var(--muted);
}

.sp-alert {
  border: 1px solid rgba(122, 162, 255, 0.35);
  border-radius: 8px;
  background: rgba(122, 162, 255, 0.12);
  padding: 12px 14px;
}

.sp-alert--success {
  border-color: rgba(54, 220, 162, 0.45);
  background: rgba(54, 220, 162, 0.12);
}

.sp-alert--danger {
  border-color: rgba(255, 106, 130, 0.45);
  background: rgba(255, 106, 130, 0.12);
}

.sp-form-feedback {
  width: 100%;
  margin-top: 12px;
}

.sp-confirm-open,
.sp-action-open {
  overflow: hidden;
}

.sp-confirm-overlay {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 7, 12, 0.76);
  backdrop-filter: blur(8px);
  padding: 18px;
}

.sp-action-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(8px);
  padding: 18px;
}

.sp-confirm-overlay[hidden],
.sp-action-overlay[hidden] {
  display: none !important;
}

.sp-confirm-dialog {
  width: min(440px, 100%);
  border: 1px solid rgba(255, 178, 189, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(22, 27, 36, 0.98), rgba(8, 12, 20, 0.98)),
    #080c14;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
  color: var(--ink);
  padding: clamp(18px, 4vw, 24px);
}

.sp-action-dialog {
  width: min(420px, 100%);
  border: 1px solid rgba(248, 200, 107, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 22, 30, 0.98), rgba(7, 10, 16, 0.98)),
    #080b11;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.54);
  color: var(--ink);
  padding: clamp(18px, 4vw, 24px);
}

.sp-confirm-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.sp-action-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sp-confirm-heading h2 {
  margin: 2px 0 0;
  color: #f4f7ff;
  font-size: 1.2rem;
  line-height: 1.2;
}

.sp-action-heading h2 {
  margin: 2px 0 0;
  color: #f4f7ff;
  font-size: 1.2rem;
  line-height: 1.2;
}

.sp-action-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.sp-confirm-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 178, 189, 0.48);
  border-radius: 50%;
  background: rgba(255, 106, 130, 0.13);
  color: #ffd8dd;
  font-size: 1.1rem;
  font-weight: 900;
}

.sp-confirm-message {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.sp-action-body {
  margin-top: 16px;
}

.sp-lot-actions--dialog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sp-lot-actions--dialog form {
  margin: 0;
}

.sp-lot-actions--dialog .sp-icon-button {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.sp-lot-actions--dialog form:last-child {
  grid-column: 1 / -1;
}

.sp-confirm-quantity {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  color: #dce6f4;
  font-size: 0.86rem;
  font-weight: 750;
}

.sp-confirm-quantity input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(248, 200, 107, 0.28);
  border-radius: 8px;
  background: rgba(6, 9, 15, 0.9);
  color: var(--ink);
  font: inherit;
  padding: 9px 11px;
}

.sp-confirm-quantity-help {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.sp-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.sp-confirm-actions .button {
  min-height: 40px;
  border-radius: 8px;
  padding-inline: 16px;
}

.sp-confirm-actions .button::after {
  display: none;
}

.sp-action-close {
  min-height: 34px;
  border: 1px solid rgba(248, 200, 107, 0.28);
  border-radius: 999px;
  background: rgba(248, 200, 107, 0.08);
  color: #ffe7aa;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 5px 10px;
}

.sp-action-close:hover,
.sp-action-close:focus-visible {
  border-color: rgba(248, 200, 107, 0.7);
  background: rgba(248, 200, 107, 0.16);
  color: #fff3cf;
}

.sp-confirm-submit {
  border-color: rgba(255, 178, 189, 0.62);
  background: linear-gradient(125deg, #ffb2bd 0%, #ff6a82 100%);
  box-shadow:
    0 12px 26px rgba(255, 106, 130, 0.24),
    inset 0 0 0 1px rgba(255, 232, 236, 0.36);
  color: #22070c;
}

.sp-definition-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.sp-definition-list div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
}

.sp-definition-list dt {
  color: var(--muted);
  font-weight: 800;
}

.sp-definition-list dd {
  margin: 0;
}

.sp-danger-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.sp-legal {
  max-width: 900px;
  margin-inline: auto;
}

.sp-legal h2 {
  margin-top: 10px;
  color: #f4f7ff;
  font-size: 1.05rem;
}

@media (max-width: 980px) {
  .sp-hero,
  .sp-dashboard-head,
  .sp-product-head,
  .sp-account-summary,
  .sp-preview-gate,
  .sp-readout,
  .sp-grid--two,
  .sp-grid--thirds,
  .sp-auth-grid {
    grid-template-columns: 1fr;
  }

  .sp-account-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sp-account-bar__settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sp-summary-grid {
    grid-template-columns: 1fr;
  }

  .sp-account-bar__edit {
    justify-self: start;
  }

  .sp-form-grid,
  .sp-lot-form .sp-form-grid,
  .sp-settings-summary,
  .sp-settings-grid,
  .sp-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .sp-form-grid,
  .sp-lot-form .sp-form-grid,
  .sp-settings-summary,
  .sp-settings-grid,
  .sp-settings-grid--compact,
  .sp-choice-grid {
    grid-template-columns: 1fr;
  }

  .sp-actions,
  .sp-workflow-nav,
  .sp-workflow-steps,
  .sp-section-actions,
  .sp-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sp-inline-search {
    flex-wrap: nowrap;
    align-items: end;
    width: 100%;
    margin-left: 0;
  }

  .sp-section-head--search {
    grid-template-columns: 1fr;
  }

  .sp-section-actions {
    margin-left: 0;
  }

  .sp-section-actions .sp-table-search {
    width: 100%;
  }

  .sp-action-readout-grid {
    grid-template-columns: 1fr;
  }

  .sp-account-bar__settings {
    grid-template-columns: 1fr;
  }

  .sp-account-bar__edit {
    justify-self: stretch;
  }

  .sp-summary-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .sp-summary-count {
    text-align: left;
  }

  .sp-summary-group {
    padding: 14px;
  }

  .sp-summary-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .sp-summary-item dd {
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
  }

  .sp-portfolio-tape__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .sp-portfolio-tape__item {
    padding-inline: 14px;
  }

  .sp-portfolio-tape__name {
    max-width: 128px;
  }

  .sp-settings-actions {
    justify-content: stretch;
  }

  .sp-definition-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .sp-confirm-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-portfolio-tape__window {
    overflow-x: auto;
  }

  .sp-portfolio-tape__track {
    animation: none;
    transform: none;
  }
}
