/* SolarCompute simple subscription page */

.sub-page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  color: #f2f6fb;
}

.sub-page * {
  box-sizing: border-box;
}

.sub-heading,
.sub-section-heading,
.sub-panel-heading,
.sub-status-heading,
.sub-plan-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.sub-heading {
  margin-bottom: 24px;
}

.sub-heading h2 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.2;
}

.sub-heading p,
.sub-section-heading p,
.sub-panel-copy,
.sub-status-heading p,
.sub-plan-description,
.sub-empty p {
  margin: 0;
  color: #91a3bb;
  font-size: 13px;
  line-height: 1.55;
}

.sub-eyebrow,
.sub-plan-code {
  display: block;
  color: #5f87b8;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sub-panel {
  background: #101b2b;
  border: 1px solid #24354b;
  border-radius: 12px;
  padding: 18px;
}

.sub-status-panel {
  margin-bottom: 26px;
}

.sub-status-heading {
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #24354b;
}

.sub-status-heading h3,
.sub-panel-heading h3,
.sub-plan-heading h3,
.sub-section-heading h3 {
  margin: 3px 0 5px;
  color: #f4f7fb;
  font-size: 16px;
  line-height: 1.3;
}

.sub-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.sub-summary-grid article {
  min-width: 0;
  padding: 13px 14px;
  background: #0b1524;
  border: 1px solid #22334a;
  border-radius: 9px;
}

.sub-summary-grid span {
  display: block;
  margin-bottom: 7px;
  color: #6684aa;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sub-summary-grid strong {
  display: block;
  overflow: hidden;
  color: #f2f6fb;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-summary-grid strong.positive {
  color: #42d69b;
}

.sub-section {
  margin-bottom: 24px;
}

.sub-section-heading {
  align-items: end;
  margin-bottom: 12px;
}

.sub-count {
  color: #91a3bb;
  font-size: 12px;
}

.sub-plan-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(270px, 360px)
  );
  gap: 12px;
  align-items: stretch;
}

.sub-plan {
  position: relative;
  display: flex;
  min-height: 285px;
  flex-direction: column;
}

.sub-plan.featured {
  border-color: #9a701d;
  box-shadow: inset 0 2px 0 #d99b22;
}

.sub-plan-description {
  min-height: 42px;
  margin-top: 12px;
}

.sub-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 22px 0 15px;
}

.sub-price strong {
  color: #f4f7fb;
  font-size: 25px;
  line-height: 1;
}

.sub-price span {
  color: #91a3bb;
  font-size: 11px;
}

.sub-entitlements {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.sub-entitlements li {
  display: flex;
  gap: 8px;
  color: #c9d5e4;
  font-size: 12px;
}

.sub-entitlements li span {
  color: #42d69b;
}

.sub-plan .sub-button {
  width: 100%;
  margin-top: auto;
}

.sub-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 10px;
  border: 1px solid #31445d;
  border-radius: 999px;
  color: #a9b8cb;
  background: #142238;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sub-state-positive {
  color: #42d69b;
  background: rgba(30, 190, 132, .1);
  border-color: rgba(30, 190, 132, .28);
}

.sub-state-featured {
  color: #f3b62d;
  background: rgba(224, 159, 25, .1);
  border-color: rgba(224, 159, 25, .28);
}

.sub-state-warning {
  color: #f3b62d;
  background: rgba(224, 159, 25, .1);
  border-color: rgba(224, 159, 25, .28);
}

.sub-state-neutral {
  color: #9aabc0;
}

.sub-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color .15s ease,
    background .15s ease,
    opacity .15s ease;
}

.sub-button-primary {
  color: #101722;
  background: #e1a11d;
  border: 1px solid #e1a11d;
}

.sub-button-primary:hover:not(:disabled) {
  background: #efb536;
  border-color: #efb536;
}

.sub-button-secondary {
  color: #bfd0e3;
  background: #0b1524;
  border: 1px solid #2a3d56;
}

.sub-button-secondary:hover:not(:disabled) {
  color: #ffffff;
  border-color: #55769d;
}

.sub-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.sub-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 12px;
}

.sub-panel-heading {
  align-items: center;
  margin-bottom: 12px;
}

.sub-panel-copy {
  max-width: 720px;
  margin-bottom: 18px;
}

.sub-detail-list {
  margin: 0 0 18px;
}

.sub-detail-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 15px;
  padding: 9px 0;
  border-top: 1px solid #22334a;
}

.sub-detail-list dt,
.sub-detail-list dd {
  margin: 0;
  font-size: 12px;
}

.sub-detail-list dt {
  color: #7891af;
}

.sub-detail-list dd {
  color: #edf3fa;
  font-weight: 600;
}

.sub-steps {
  display: grid;
  gap: 13px;
  margin: 5px 0 20px;
  padding: 0;
  list-style: none;
}

.sub-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.sub-steps li > span {
  display: inline-flex;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(66, 214, 155, .35);
  border-radius: 50%;
  color: #42d69b;
  background: rgba(66, 214, 155, .08);
  font-size: 10px;
  font-weight: 700;
}

.sub-steps strong {
  display: block;
  margin-bottom: 2px;
  color: #eef4fa;
  font-size: 12px;
}

.sub-steps p {
  margin: 0;
  color: #91a3bb;
  font-size: 11px;
  line-height: 1.45;
}

.sub-loading,
.sub-empty {
  color: #91a3bb;
  font-size: 13px;
}

.sub-plan-grid > .sub-loading,
.sub-plan-grid > .sub-empty {
  grid-column: 1 / -1;
  min-height: 105px;
}

.sub-empty strong {
  display: block;
  margin-bottom: 5px;
  color: #e7eef7;
}

.sub-empty.error strong {
  color: #ff727b;
}

.sub-notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  max-width: 420px;
  padding: 11px 14px;
  border: 1px solid rgba(66, 214, 155, .32);
  border-radius: 8px;
  color: #bdf6df;
  background: #10291f;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .35);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
}

.sub-notice.error {
  color: #ffc4c8;
  background: #33191e;
  border-color: rgba(255, 93, 104, .38);
}

.sub-notice.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .sub-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sub-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .sub-heading,
  .sub-section-heading,
  .sub-status-heading,
  .sub-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .sub-summary-grid {
    grid-template-columns: 1fr;
  }

  .sub-plan-grid {
    grid-template-columns: 1fr;
  }

  .sub-detail-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .sub-heading .sub-button {
    width: 100%;
  }
}

/* Paid Host subscription activation */
.sub-activation-panel {
  margin-bottom: 24px;
  border-color: rgba(224, 159, 25, .38);
}

.sub-activation-panel[hidden] {
  display: none;
}

.sub-activation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #24354b;
}

.sub-activation-heading h3 {
  margin: 4px 0 5px;
  color: #f4f7fb;
  font-size: 16px;
}

.sub-activation-heading p,
.sub-activation-information p,
.sub-token-result p {
  margin: 0;
  color: #91a3bb;
  font-size: 12px;
  line-height: 1.55;
}

.sub-activation-body {
  display: grid;
  grid-template-columns:
    minmax(260px, .65fr)
    minmax(360px, 1.35fr);
  gap: 12px;
  margin-top: 16px;
}

.sub-activation-information,
.sub-token-result {
  padding: 15px;
  background: #0b1524;
  border: 1px solid #22334a;
  border-radius: 9px;
}

.sub-activation-information strong {
  display: block;
  margin-bottom: 6px;
  color: #eef4fa;
  font-size: 13px;
}

.sub-activation-information .sub-button {
  margin-top: 15px;
}

.sub-token-result[hidden] {
  display: none;
}

.sub-token-result > span {
  display: block;
  margin-bottom: 8px;
  color: #6684aa;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sub-token-value-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}

.sub-token-value-row code {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  overflow-x: auto;
  padding: 10px 12px;
  border: 1px solid #304763;
  border-radius: 7px;
  color: #52dfa4;
  background: #07111d;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
  user-select: all;
}

@media (max-width: 820px) {
  .sub-activation-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .sub-activation-heading {
    flex-direction: column;
  }

  .sub-token-value-row {
    flex-direction: column;
  }
}

/* Host subscription management entry */
.sub-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.sub-heading-actions .sub-button {
  min-height: 40px;
  text-decoration: none;
}

@media (max-width: 680px) {
  .sub-heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .sub-heading-actions .sub-button {
    flex: 1 1 auto;
  }
}

/* Host subscription — compact machine management */
.sub-machine-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sub-machine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #293547);
}

.sub-machine-row:last-child {
  border-bottom: none;
}

.sub-machine-row > div {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 24px;
}

.sub-machine-row strong {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.sub-machine-row p {
  margin: 0;
  font-size: 12px;
  color: var(--muted, #94a3b8);
  white-space: nowrap;
}

.sub-machine-row .sub-release-machine {
  flex-shrink: 0;
  width: auto;
  min-width: 120px;
  padding: 8px 12px;
  font-size: 12px;
}

@media (max-width: 600px) {
  .sub-machine-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .sub-machine-row > div {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .sub-machine-row .sub-release-machine {
    margin-left: auto;
  }
}

/* Host machines — header summary aligned right */
#subMachinesCard .sub-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#subMachinesCard .sub-panel-heading > div {
  display: contents;
}

#subMachinesCard .sub-panel-heading .sub-eyebrow {
  display: none;
}

#subMachinesCard .sub-panel-heading h3 {
  margin: 0;
}

#subMachinesCard .sub-panel-heading p {
  margin: 0 0 0 auto;
  text-align: right;
  font-size: 12px;
  color: var(--muted, #94a3b8);
}

@media (max-width: 600px) {
  #subMachinesCard .sub-panel-heading {
    flex-wrap: wrap;
  }

  #subMachinesCard .sub-panel-heading p {
    margin-left: 0;
    text-align: left;
  }
}

/* Final refinement — compact Host machine rows */
.sub-machine-row {
  padding-top: 8px;
  padding-bottom: 8px;
}

.sub-machine-row .sub-release-machine {
  padding: 6px 12px;
}
