/* MonkeyOS landing + auth (Hashmonkeys web UI) */
.monkeyos-page {
  padding: 0 0 4rem;
}

.monkeyos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-top: 1.25rem;
}

.monkeyos-hero {
  padding: 0.5rem 0 1rem;
}

.monkeyos-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(62, 255, 208, 0.25);
  background: rgba(62, 255, 208, 0.08);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
}

.monkeyos-hero__badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(62, 255, 208, 0.75);
}

.monkeyos-hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.monkeyos-hero h1 span {
  color: var(--mint);
}

.monkeyos-hero__lead {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.monkeyos-features {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.monkeyos-features li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--text);
  font-size: 0.95rem;
}

.monkeyos-features li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--violet);
  font-weight: 700;
}

.monkeyos-hero__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.monkeyos-auth-card {
  position: relative;
  overflow: hidden;
}

.monkeyos-auth-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 55%;
  background: radial-gradient(ellipse at 50% 0%, rgba(167, 139, 250, 0.18), transparent 70%);
  pointer-events: none;
}

.monkeyos-auth-card > * {
  position: relative;
}

.monkeyos-auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.monkeyos-auth-tabs .scheme-btn {
  flex: 1;
  text-align: center;
}

.monkeyos-auth-sub {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.monkeyos-field {
  margin-bottom: 0.85rem;
}

.monkeyos-submit {
  width: 100%;
  margin-top: 0.35rem;
}

.monkeyos-error {
  margin: 0.85rem 0 0;
  color: var(--rose);
  font-size: 0.88rem;
  line-height: 1.4;
}

.monkeyos-error[hidden] {
  display: none;
}

.monkeyos-success {
  margin: 0;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(62, 255, 208, 0.25);
  background: rgba(62, 255, 208, 0.08);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}

.monkeyos-success[hidden] {
  display: none;
}

.monkeyos-success a {
  color: var(--mint);
  font-weight: 600;
}

.monkeyos-preview-note {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.monkeyos-auth-foot {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.monkeyos-auth-foot a {
  color: var(--mint);
  font-weight: 600;
  text-decoration: none;
}

.monkeyos-auth-foot a:hover {
  text-decoration: underline;
}

/* Dashboard */
.mos-dash-page {
  padding-bottom: 4rem;
}

.mos-dash-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.mos-dash-user__email {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mos-dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
}

.mos-dash-head h1 {
  margin: 0.35rem 0 0.5rem;
}

.mos-dash-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 42rem;
}

.mos-pair-panel {
  margin-bottom: 1.25rem;
}

.mos-pair-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.mos-pair-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.mos-rig-grid {
  display: grid;
  gap: 1rem;
}

.mos-rig-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mos-rig-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mos-rig-card__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.mos-rig-card__meta code {
  font-family: var(--font-mono);
  color: var(--violet);
}

.mos-rig-card__btn {
  flex-shrink: 0;
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
}

.mos-rig-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.mos-rig-stats div {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mos-rig-stats dt {
  margin: 0 0 0.25rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.mos-rig-stats dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.mos-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mos-badge--online {
  background: rgba(62, 255, 208, 0.15);
  color: var(--mint);
  border: 1px solid rgba(62, 255, 208, 0.25);
}

.mos-badge--offline {
  background: rgba(251, 113, 133, 0.12);
  color: var(--rose);
  border: 1px solid rgba(251, 113, 133, 0.25);
}

.mos-empty {
  text-align: center;
  padding: 2rem 1.5rem;
}

.mos-detail-head {
  margin: 1rem 0 1.25rem;
}

.mos-detail-head h1 {
  margin: 0.35rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mos-gpu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.mos-gpu-table th,
.mos-gpu-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mos-gpu-table th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mos-cmd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.mos-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.mos-subnav .scheme-btn.active {
  color: var(--void);
  background: linear-gradient(135deg, var(--mint), #00c4a8);
  border-color: transparent;
}

.mos-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.mos-pool-name-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}

.mos-pool-name-card {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.95rem 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.mos-pool-name-card:hover {
  border-color: rgba(62, 255, 208, 0.35);
  color: var(--mint);
  background: rgba(0, 0, 0, 0.38);
}

.mos-pool-coins-view[hidden] {
  display: none;
}

.mos-pool-coins-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.mos-pool-coins-back {
  flex-shrink: 0;
}

.mos-pool-coins-title {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.mos-pool-coins-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.mos-pool-coins-meta a {
  color: var(--mint);
}

.mos-pool-coins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.mos-pool-coin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  padding: 1rem 0.75rem 0.85rem;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}

.mos-pool-coin-card:hover {
  border-color: rgba(62, 255, 208, 0.35);
  transform: translateY(-1px);
}

.mos-pool-coin-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
}

.mos-pool-coin-logo--fallback,
.calc-coin-logo.mos-pool-coin-logo--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 1rem;
  color: var(--mint);
}

.mos-pool-coin-card__sym {
  font-weight: 700;
  font-size: 0.95rem;
}

.mos-pool-coin-card__name {
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--muted);
}

.mos-payout-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
  margin-top: 0.15rem;
}

.mos-payout-chip {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(62, 255, 208, 0.25);
  color: var(--mint);
  background: rgba(62, 255, 208, 0.08);
}

.mos-pool-coin-card__algo {
  font-size: 0.72rem;
}

.mos-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
}

.mos-modal[hidden] {
  display: none;
}

.mos-modal__panel {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgba(18, 14, 32, 0.95);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mos-modal__panel .monkeyos-field {
  margin-bottom: 0.85rem;
}

.mos-modal__panel .calc-input,
.mos-modal__panel select.calc-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mos-modal__panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.mos-modal__sub {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.mos-modal__rig-hint {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.mos-modal__rig-hint a {
  color: var(--mint);
}

.mos-modal__error {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
}

.mos-modal__actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.mos-oc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mos-oc-field label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
  color: var(--muted);
}

.mos-oc-field input[type="range"] {
  width: 100%;
}

.mos-config-dl {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.mos-config-dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 0.5rem 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mos-config-dl dt {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mos-config-dl dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  text-align: right;
  word-break: break-word;
}

.mos-table-wrap {
  overflow-x: auto;
}

.mos-miner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mos-file-banner {
  position: relative;
  z-index: 20;
  margin: 0;
  padding: 0.85rem 1rem;
  background: rgba(255, 160, 72, 0.15);
  border-bottom: 1px solid rgba(255, 160, 72, 0.35);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

.mos-file-banner a {
  color: var(--mint);
  font-weight: 600;
}

.mos-file-banner code {
  font-family: var(--font-mono);
  font-size: 0.82em;
}

@media (max-width: 860px) {
  .monkeyos-layout {
    grid-template-columns: 1fr;
  }

  .monkeyos-hero {
    text-align: center;
  }

  .monkeyos-hero__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .monkeyos-features {
    display: inline-grid;
    text-align: left;
  }

  .mos-pair-grid {
    grid-template-columns: 1fr;
  }

  .mos-rig-stats {
    grid-template-columns: 1fr;
  }

  .mos-rig-card__head {
    flex-direction: column;
  }

  .mos-dash-user__email {
    display: none;
  }

  .mos-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .mos-oc-grid {
    grid-template-columns: 1fr;
  }
}
