/* Auth modal copied from :20002 login.html */
.mf-auth-root {
  --red: #ff6b6b;
  --bg: #1b1d21;
  --bg-2: #121316;
  --panel: #26282e;
  --panel-2: #2e3138;
  --line: #3a3d45;
  --text: #eceff4;
  --muted: #8b909a;
  --blue: #228be6;
  --font: "Noto Sans SC", Inter, system-ui, sans-serif;
}
.mf-auth-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(6px);
}
.mf-auth-mask[hidden] { display: none !important; }
body.mf-auth-open { overflow: hidden; }
.mf-auth-dialog {
  width: min(420px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #25262b;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  color: var(--text);
  font-family: var(--font);
}
.mf-auth-dialog .login-card {
  width: 100%;
  margin: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.mf-auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 0 0;
}
.mf-auth-close {
  border: 0;
  background: transparent;
  color: #9aa0a6;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.mf-auth-close:hover { color: #fff; background: #2a2d34; }

/* from 20002 */
.login-body {
  min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(600px 300px at 30% 0%, rgba(34,139,230,0.15), transparent), var(--bg);
}
.login-shell {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0;
  box-sizing: border-box;
}
.login-card {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
  overflow: hidden;
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #fab005, #fd7e14);
}
.login-card .brand-name { margin: 0; font-size: 18px; font-weight: 700; }
.brand-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-lead { margin: 0 0 16px; color: var(--muted); }
.login-form { display: grid; gap: 12px; width: 100%; box-sizing: border-box; }
.login-form > label:not(.biz-check) { display: grid; gap: 6px; color: var(--muted); }
.login-form input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 40px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); padding: 0 12px; outline: none;
  font: 14px var(--font);
}
.login-error { margin: 0; color: #ff6b6b; font-size: 13px; line-height: 1.4; }
.login-submit {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font: 600 15px var(--font);
  cursor: pointer;
}
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.login-submit:hover:not(:disabled) { filter: brightness(1.08); }

/* ===== Rig detail page ===== */
#rigPage[hidden], #farmPage[hidden] { display: none !important; }
.rig-detail { padding-bottom: 32px; }
.rd-head {
  display: flex; flex-wrap: wrap; gap: 16px 24px;
  justify-content: space-between; align-items: flex-start;
  padding: 8px 0 14px;
}
.rd-head-main { min-width: 0; flex: 1; }
.rd-gpu-tiles {
  display: flex; flex-wrap: nowrap; gap: 5px;
  justify-content: flex-end;
  align-items: flex-start;
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
}
.rd-gpu-tile {
  flex: 0 0 auto;
  width: 58px;
  background: #25272d;
  border: 1px solid #32353c;
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  color: #aeb0b5;
}
.rd-gpu-tile-temp {
  padding: 5px 4px 3px;
  font-weight: 500;
  letter-spacing: .02em;
}
.rd-gpu-tile-fan {
  padding: 3px 4px;
  font-weight: 600;
  color: #fff;
  background: #c92a2a;
}
.rd-gpu-tile-fan.is-ok { background: #2f9e44; }
.rd-gpu-tile-fan.is-warm { background: #e67700; }
.rd-gpu-tile-fan.is-hot { background: #c92a2a; }
.rd-gpu-tile-fan.is-idle { background: #3a3d45; color: #8b8e95; }
.rd-gpu-tile-hash {
  padding: 4px 3px 5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rd-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 36px;
}
.rd-back {
  border: 0;
  background: transparent;
  color: #91a7ff;
  font: 700 26px var(--font);
  padding: 0;
  cursor: pointer;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.rd-back:hover { color: #bac8ff; text-decoration: underline; text-underline-offset: 4px; }
.rd-crumb-sep {
  color: #5c5f66;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  user-select: none;
  margin: 0 2px;
}
.rd-star {
  border: 0;
  background: transparent;
  color: #6c6f76;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  flex: 0 0 auto;
}
.rd-star svg { width: 18px; height: 18px; display: block; }
.rd-star:hover { color: #ffd43b; background: rgba(255, 212, 59, 0.08); }
.rd-star.on { color: var(--yellow); }
.rd-name {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.rd-online {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-left: 2px;
}
.rd-online.is-on {
  color: #69db7c;
  background: rgba(64, 192, 87, 0.14);
}
.rd-online.is-off {
  color: #adb5bd;
  background: rgba(173, 181, 189, 0.12);
}
.rd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rd-tag {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 600;
}
.rd-tag.flight { background: rgba(250,82,82,.15); color: #ff8787; }
.rd-tag.gpu { background: rgba(190,75,219,.15); color: #e599f7; }
.rd-tag.ok { background: rgba(64,192,87,.15); color: #69db7c; }
.rd-meta {
  margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.7;
}
.rd-meta b { color: var(--text); font-weight: 500; }
.rd-hw {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px;
  margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.8;
  align-items: start;
}
.rd-hw b { color: var(--text); font-weight: 500; }
.rd-hw-right { justify-self: end; text-align: left; min-width: 200px; }
.rd-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 4px 0 12px;
}
.rd-actions .tb-ico {
  background: #2a2c32; border: 1px solid #3a3d45; min-width: 34px; min-height: 32px;
}
.rd-alerts {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 8px 0 14px;
}
.rd-alert {
  display: flex; align-items: center; gap: 8px;
  background: #1f2126; border: 1px solid #32353c;
  border-radius: 6px; padding: 8px 10px;
  font-size: 12px; max-width: 280px;
}
.rd-alert.warn { border-color: rgba(250,176,5,.35); color: #ffd43b; }
.rd-alert.err { border-color: rgba(250,82,82,.4); color: #ff8787; }
.rd-alert.info { border-color: rgba(64,192,87,.3); color: #69db7c; }
.rd-alert .ago { color: var(--muted); margin-left: auto; white-space: nowrap; }
.rd-tabs {
  display: flex; gap: 0; border-bottom: 1px solid #2c2e33;
  overflow-x: auto; margin-bottom: 12px;
}
.rd-tab {
  border: 0; background: transparent; color: var(--muted);
  padding: 12px 14px; font: 500 13px var(--font); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.rd-tab:hover { color: var(--text); }
.rd-tab.is-active { color: var(--text); border-bottom-color: #fff; }
.rd-gpu-list {
  display: grid;
  gap: 0;
  overflow-x: auto;
  border: 1px solid #2c2e33;
  border-radius: 6px;
  background: #1c1e23;
}
.rd-gpu {
  display: grid;
  grid-template-columns: 72px minmax(200px, 1.6fr) 72px 72px 88px 88px 56px 88px 40px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #23252b;
  border-bottom: 1px solid #1a1c20;
  font-variant-numeric: tabular-nums;
}
.rd-gpu:last-child { border-bottom: 0; }
.rd-gpu:hover { background: #2a2d34; }
.rd-gpu-head {
  background: #1f2126;
  border-bottom: 1px solid #2c2e33;
  padding: 8px 12px;
  min-height: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.rd-gpu-head > div { color: var(--muted); font-size: 11px; }
.rd-gpu .g-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}
.rd-gpu .g-top {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.rd-gpu .g-bot {
  color: #868e96;
  font-size: 12px;
  font-weight: 500;
}
.rd-gpu .g-id { font-weight: 600; color: var(--text); font-size: 13px; }
.rd-gpu .g-bus { color: var(--muted); font-size: 11px; margin-top: 2px; }
.rd-gpu .g-name { font-weight: 600; color: var(--text); font-size: 13px; }
.rd-gpu .g-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.rd-gpu .g-fan-val { color: var(--text); font-size: 13px; font-weight: 600; }
.rd-gpu .g-col-off .g-top { color: #69db7c; }
.rd-gpu .g-col-pwr .g-top { color: #ffa94d; }
.rd-gpu .g-oc-btn {
  border: 0;
  background: transparent;
  color: #91a7ff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.rd-gpu .g-oc-btn:hover { background: #2f3340; color: #bac8ff; }
.rd-gpu .g-col-act { text-align: center; }
.gpu-table th,
.gpu-table td {
  font-size: 12px;
  white-space: nowrap;
}
.rd-gpu-head:hover { background: #1f2126; }
.rd-sys {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px; margin-top: 14px;
}
.rd-sys .box {
  background: #23252b; border: 1px solid #32353c; border-radius: 6px;
  padding: 12px 14px; min-height: 72px;
}
.rd-sys .box .v { font-size: 18px; font-weight: 600; }
.rd-sys .box .k { margin-top: 6px; color: var(--muted); font-size: 11px; }
.rd-debug { max-width: 640px; padding: 8px 0 24px; }
.rd-debug h2 { margin: 0 0 8px; font-size: 18px; }
.debug-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.debug-drv {
  display: grid; gap: 14px;
  background: #23252b; border: 1px solid #32353c; border-radius: 8px;
  padding: 14px 16px; margin-top: 8px;
}
.drv-upload { margin-top: 8px; }
.drv-series {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: rgba(116,143,252,.15); color: #91a7ff;
}
.drv-series.rtx50 { background: rgba(64,192,87,.14); color: #69db7c; }
.drv-series.rtx40 { background: rgba(77,171,247,.14); color: #74c0fc; }
.rd-settings {
  max-width: 520px;
  display: grid;
  gap: 18px;
  padding: 8px 0 24px;
}
.rd-field { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.rd-field input[type="text"],
.rd-field input[type="number"] {
  height: 40px;
  border: 1px solid var(--line);
  background: #1e2025;
  color: var(--text);
  border-radius: 8px;
  padding: 0 12px;
  font: 14px var(--font);
  outline: none;
}
.rd-field input:focus { border-color: var(--blue); }
.tag-row { display: flex; gap: 10px; align-items: center; }
.tag-row input { flex: 1; }
.tag-add {
  border: 0; background: transparent; color: #74c0fc;
  font: 500 14px var(--font); cursor: pointer; padding: 6px 4px; white-space: nowrap;
}
.tag-add:hover { color: #a5d8ff; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 28px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #2c2e33; border: 1px solid #3a3d45;
  border-radius: 999px; padding: 4px 10px;
  color: var(--text); font-size: 12px; cursor: pointer;
}
.tag-chip:hover { border-color: #fa5252; color: #ff8787; }
.rd-switch {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 13px;
  padding: 4px 0;
}
.rd-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui {
  width: 44px; height: 24px; border-radius: 999px;
  background: #3a3d45; position: relative; transition: .2s;
  flex: 0 0 auto;
}
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: .2s;
}
.rd-switch input:checked + .switch-ui { background: var(--blue); }
.rd-switch input:checked + .switch-ui::after { left: 23px; }
.rd-settings-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; gap: 12px;
}

/* ---- Rig stats charts ---- */
.rd-stats { display: grid; gap: 12px; }
.stats-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding: 4px 2px 8px;
}
.stats-nav { display: flex; align-items: center; gap: 10px; }
.stats-day { color: var(--text); font-size: 14px; font-weight: 500; min-width: 160px; text-align: center; }
.stats-ranges { display: inline-flex; background: #1f2126; border-radius: 8px; padding: 3px; gap: 2px; }
.stats-range {
  border: 0; background: transparent; color: var(--muted);
  font: 500 12px var(--font); padding: 6px 12px; border-radius: 6px; cursor: pointer;
}
.stats-range.is-on { background: var(--blue); color: #fff; }
.stats-range:hover:not(.is-on) { color: var(--text); }
.stats-charts { display: grid; gap: 12px; }
.stats-card {
  background: #23252b; border: 1px solid #2a2d34; border-radius: 10px; overflow: hidden;
}
.stats-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 0;
}
.stats-card-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--text); }
.stats-card-body {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px;
  padding: 8px 12px 12px;
  align-items: stretch;
}
.stats-legend {
  display: flex; flex-direction: column; gap: 8px; justify-content: center;
  padding-top: 4px;
}
.stats-leg-item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center;
  color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
.stats-leg-item b { color: var(--text); font-weight: 600; justify-self: start; }
.stats-leg-item i {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.stats-leg-item span { color: #868e96; min-width: 12px; text-align: right; }
.stats-leg-item.total { grid-template-columns: 1fr; }
.stats-leg-item.total b { color: #74c0fc; font-size: 14px; }
.stats-plot {
  background: #1c1e23; border-radius: 8px; min-height: 140px; overflow: hidden;
}
.stats-svg { width: 100%; height: 140px; display: block; }
.stats-loading, .stats-empty {
  color: var(--muted); font-size: 13px; padding: 28px 12px; text-align: center;
  background: #23252b; border-radius: 10px;
}

@media (max-width: 900px) {
  .stats-card-body { grid-template-columns: 1fr; }
  .stats-legend { flex-direction: row; flex-wrap: wrap; gap: 10px 14px; }
}

@media (max-width: 1200px) {
  .shell { width: min(100%, calc(100% - 32px)); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .rig-head { display: none; }
  .rig-body { min-width: 0; }
  .rig-row {
    grid-template-columns: 24px 24px minmax(90px, 1fr) 44px minmax(120px, 1.1fr);
  }
  .rig-row .rig-gpu-cell,
  .rig-row .rig-metric,
  .rig-row .rig-shares-cell,
  .rig-row .rig-remote,
  .alert-dot, .ico-rocket, .ico-dash, .ico-n, .gpu-bars, .rig-spacer, .mining-bar { display: none; }
  .rd-gpu { grid-template-columns: 1fr 1fr; }
  .rd-sys { grid-template-columns: repeat(2, 1fr); }
  .rd-hw { grid-template-columns: 1fr; }
  .rd-gpu-tiles { max-width: none; justify-content: flex-start; flex-wrap: nowrap; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 24px); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .topbar { height: auto; padding: 8px 0; }
  .topbar-inner { flex-wrap: wrap; gap: 8px; padding: 4px 0; }
  .rd-name { font-size: 20px; }
  .rd-back { font-size: 20px; }
  .rd-crumb-sep { font-size: 18px; }
}

/* Miner warehouse category panel */
.miner-wh-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}
.miner-cat-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}
.miner-cat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.miner-cat-list { display: flex; flex-direction: column; padding: 6px; gap: 2px; }
.miner-cat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 2px 4px 2px 6px;
}
.miner-cat-item.is-active { background: var(--panel-2); }
.miner-cat-name {
  flex: 1;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 7px 6px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
}
.miner-cat-name:hover { color: #fff; }
.miner-cat-del {
  width: 24px;
  height: 24px;
  padding: 0;
  opacity: 0.55;
  flex: 0 0 auto;
}
.miner-cat-item:hover .miner-cat-del { opacity: 1; }
.miner-wh-main { min-width: 0; }
@media (max-width: 900px) {
  .miner-wh-layout { grid-template-columns: 1fr; }
}


/* Autofan curve editor */
.af-panel { margin-top: 14px; max-width: 560px; }
.af-table input[type="number"] {
  width: 72px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #1c1e24;
  color: var(--text);
  font: 600 12px var(--font);
}
.af-table td { vertical-align: middle; }


/* ===== UI text size boost (requested) ===== */
.topbar { height: 50px; }
.rig-name, .rig-title, .worker-name { font-size: 14px !important; }
.rig-meta, .meta, .muted-sm { font-size: 12px !important; }
.hash-item .hk, .hash-item .hv { font-size: 12px !important; }
.badge, .chip, .tag { font-size: 12px !important; }
.gpu-row, .gpu-cell, .stat-cell { font-size: 12px !important; }
.placeholder h2 { font-size: 20px !important; }
.modal-head h2 { font-size: 18px !important; }
.modal-body label, .form-grid label { font-size: 13px !important; }
.modal-body input[type="text"], .modal-body select, .modal-body textarea {
  font-size: 14px !important;
}
.search-mini input { font-size: 14px; height: 34px; width: 180px; }
.batch-select { height: 34px; font-size: 14px !important; }
.rig-head { font-size: 12px !important; }


/* Login math captcha */
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 10px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.captcha-row input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  font: 600 16px var(--font);
  letter-spacing: 0.08em;
  box-sizing: border-box;
}
.captcha-img-btn {
  border: 1px solid var(--line);
  background: #121316;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  height: 44px;
  width: 200px;
  max-width: 200px;
  flex: 0 0 200px;
  box-sizing: border-box;
}
.captcha-img-btn:hover { border-color: #74c0fc; }
.captcha-img {
  display: block;
  width: 200px;
  height: 44px;
  object-fit: cover;
}
.login-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
}


/* Login split: left form + right panel, centered on page */
.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
  width: 100%;
}
.login-pane {
  min-width: 0;
}
.login-side {
  border: 1px solid rgba(116, 192, 252, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(520px 280px at 12% 0%, rgba(34, 139, 230, 0.42), transparent 62%),
    radial-gradient(440px 260px at 100% 100%, rgba(64, 192, 87, 0.28), transparent 58%),
    radial-gradient(300px 180px at 70% 20%, rgba(132, 94, 247, 0.16), transparent 55%),
    linear-gradient(145deg, #1e3a5f 0%, #1a2438 28%, #171a22 58%, #14241c 100%);
  padding: 36px 32px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}
.login-side-inner { width: 100%; }
.login-side-kicker {
  margin: 0 0 10px;
  color: #74c0fc;
  font: 600 13px var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.login-side-title {
  margin: 0 0 14px;
  color: #fff;
  font: 700 34px/1.2 "IBM Plex Sans", var(--font);
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 0%, #a5d8ff 42%, #8ce99a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.login-side-rent .login-side-title {
  background: linear-gradient(120deg, #ffffff 0%, #b2f2bb 45%, #69db7c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.login-side-desc {
  margin: 0 0 22px;
  color: #adb5bd;
  font: 400 15px/1.6 var(--font);
  max-width: 34em;
}
.login-side-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.login-side-list li {
  position: relative;
  padding: 10px 12px 10px 34px;
  border-radius: 8px;
  background: linear-gradient(105deg, rgba(34,139,230,0.14) 0%, rgba(255,255,255,0.04) 55%, rgba(64,192,87,0.10) 100%);
  border: 1px solid rgba(116, 192, 252, 0.14);
  color: #e9ecef;
  font: 500 14px var(--font);
}
.login-side-rent .login-side-list li {
  background: linear-gradient(105deg, rgba(64,192,87,0.18) 0%, rgba(255,255,255,0.04) 55%, rgba(34,139,230,0.10) 100%);
  border-color: rgba(105, 219, 124, 0.16);
}
.login-side-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #40c057;
  box-shadow: 0 0 0 3px rgba(64,192,87,0.18);
}
@media (max-width: 900px) {
  .login-shell { width: min(560px, calc(100% - 32px)); padding: 20px 0; }
  .login-split { grid-template-columns: 1fr; gap: 16px; }
  .login-side { min-height: auto; padding: 28px 22px; }
  .login-side-title { font-size: 28px; }
}


.login-ok { margin: 0; color: #69db7c; }
.register-submit { background: #2f9e44; }
.register-submit:hover:not(:disabled) { filter: brightness(1.08); }
.register-card h1 { margin-top: 8px; }


/* Register entry under login button */
.login-register-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  height: 40px;
  border: 1px solid #4a4e57;
  border-radius: 8px;
  background: transparent;
  color: #c5c9d2;
  font: 600 14px var(--font);
  cursor: pointer;
}
.login-register-link:hover {
  color: #fff;
  border-color: #74c0fc;
  background: rgba(34, 139, 230, 0.12);
}

/* Register modal popup */
.reg-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
  padding: 20px;
  box-sizing: border-box;
}
.reg-modal-mask[hidden] { display: none !important; }
body.reg-modal-open { overflow: hidden; }
.reg-modal {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.reg-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.reg-modal-head h2 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}
.reg-modal-close {
  border: 0;
  background: transparent;
  color: #adb5bd;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.reg-modal-close:hover { color: #fff; background: #2a2d34; }
.reg-modal-body {
  padding: 18px 16px 20px;
}
.login-ok { margin: 0; color: #69db7c; }
.register-submit { background: #2f9e44; }
.register-submit:hover:not(:disabled) { filter: brightness(1.08); }


/* Login right promo carousel */
.login-side {
  position: relative;
  overflow: hidden;
}
.login-promo {
  width: 100%;
  height: 100%;
  min-height: 420px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.login-promo-track {
  position: relative;
  flex: 1;
  min-height: 0;
}
.login-promo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  display: flex;
  align-items: center;
}
.login-promo-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 1;
}
.login-side-rent .login-side-kicker.is-rent,
.login-side-kicker.is-rent {
  color: #69db7c;
}
.login-side.login-pane {
  background:
    radial-gradient(520px 280px at 12% 0%, rgba(34, 139, 230, 0.42), transparent 62%),
    radial-gradient(440px 260px at 100% 100%, rgba(64, 192, 87, 0.28), transparent 58%),
    radial-gradient(300px 180px at 70% 20%, rgba(132, 94, 247, 0.16), transparent 55%),
    linear-gradient(145deg, #1e3a5f 0%, #1a2438 28%, #171a22 58%, #14241c 100%);
}
.login-side.login-pane.is-rent-slide {
  background:
    radial-gradient(520px 280px at 12% 0%, rgba(64, 192, 87, 0.38), transparent 62%),
    radial-gradient(440px 260px at 100% 100%, rgba(34, 139, 230, 0.22), transparent 58%),
    radial-gradient(300px 180px at 70% 20%, rgba(250, 176, 5, 0.12), transparent 55%),
    linear-gradient(145deg, #143528 0%, #1a2430 32%, #171a22 62%, #1a2a40 100%);
}
.login-promo-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 4px 0 2px;
  position: relative;
  z-index: 2;
}
.login-promo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #495057;
}
.login-promo-dot.is-on {
  background: #74c0fc;
  box-shadow: 0 0 0 3px rgba(116,192,252,0.2);
}
.login-promo-dot[data-dot="1"].is-on {
  background: #69db7c;
  box-shadow: 0 0 0 3px rgba(105,219,124,0.2);
}
@media (max-width: 900px) {
  .login-promo { min-height: 360px; }
}


/* Register modal contacts */
.reg-contacts {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.reg-contacts-title {
  margin: 0 0 10px;
  color: var(--muted);
  font: 500 12px var(--font);
}
.reg-contacts-row {
  display: grid;
  gap: 8px;
}
.reg-contact-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.reg-contact-lab {
  color: #74c0fc;
  font: 600 13px var(--font);
}
.reg-contact-val {
  color: var(--text);
  font: 500 13px var(--font);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reg-contact-copy {
  border: 1px solid #4a4e57;
  background: transparent;
  color: #ced4da;
  border-radius: 6px;
  padding: 4px 10px;
  font: 500 12px var(--font);
  cursor: pointer;
}
.reg-contact-copy:hover {
  border-color: #74c0fc;
  color: #fff;
}


/* User contact on register (password recovery) */
.contact-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
  align-items: center;
}
.contact-row select,
.contact-row input {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  padding: 0 10px;
  outline: none;
  font: 14px var(--font);
  box-sizing: border-box;
  width: 100%;
}
.contact-row select { cursor: pointer; }


.captcha-img-btn {
  position: relative;
  background: #1a1c21 !important;
}
.captcha-img {
  background: #1a1c21;
}


.captcha-img-btn {
  position: relative;
  background: #1a1c21 !important;
}
.captcha-img {
  background: #1a1c21;
}


/* Register biz type checks */
.biz-check-wrap { margin: 2px 0 4px; }
.biz-check-title {
  margin: 0 0 8px;
  color: var(--muted);
  font: 500 13px var(--font);
}
.biz-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.biz-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  color: var(--text);
  min-width: 0;
}
@media (max-width: 520px) {
  .biz-checks { grid-template-columns: 1fr; }
}
.biz-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #228be6;
}
.biz-check span {
  display: grid;
  gap: 2px;
  font: 600 14px var(--font);
}
.biz-check em {
  font-style: normal;
  font-weight: 400;
  color: #868e96;
  font-size: 12px;
}
.biz-check:has(input:checked) {
  border-color: #74c0fc;
  background: rgba(34,139,230,0.10);
}

/* Fix: allow interest module checkboxes to be clicked */
.login-form > label:not(.biz-check) { display: grid; gap: 6px; color: var(--muted); }
.login-form input:not([type="checkbox"]):not([type="radio"]) {
  /* keep original text/password field styles via cascade below if needed */
}
.biz-check {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  user-select: none;
}
.biz-check input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  position: relative !important;
  opacity: 1 !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  flex: 0 0 16px !important;
  pointer-events: auto !important;
  accent-color: #228be6;
  z-index: 2;
  cursor: pointer !important;
}
.biz-check span {
  pointer-events: none;
}

/* Interest module toggles */
.interest-mods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.interest-mod {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #3a3d45;
  background: #121316;
  color: #eceff4;
  font: 600 14px "Noto Sans SC", Inter, system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
  user-select: none;
}
.interest-mod::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 4px;
  border: 1.5px solid #868e96;
  background: #1b1d21;
  box-sizing: border-box;
}
.interest-mod[aria-pressed="true"] {
  border-color: #74c0fc;
  background: rgba(34, 139, 230, 0.12);
}
.interest-mod[aria-pressed="true"]::before {
  border-color: #228be6;
  background: #228be6;
  box-shadow: inset 0 0 0 2px #121316;
}
.interest-mod:hover { border-color: #74c0fc; }
@media (max-width: 520px) {
  .interest-mods { grid-template-columns: 1fr; }
}


/* ===== Compact wider register modal ===== */
.mf-auth-mask.reg-modal-mask {
  padding: 12px;
  align-items: center;
}
.reg-modal.mf-auth-dialog,
.reg-modal {
  width: min(640px, 100%);
  max-height: min(92vh, 720px);
}
.reg-modal-head {
  padding: 10px 14px;
}
.reg-modal-head h2 {
  font-size: 16px;
}
.reg-modal-body.login-form,
#registerForm.login-form {
  padding: 12px 14px 14px;
  gap: 8px;
}
#registerForm.login-form > label:not(.biz-check) {
  gap: 4px;
  font-size: 12px;
}
#registerForm.login-form input:not([type="checkbox"]):not([type="radio"]) {
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 6px;
}
#registerForm .reg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
#registerForm .login-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: #868e96;
}
#registerForm .biz-check-wrap {
  margin: 0;
}
#registerForm .biz-check-title {
  margin: 0 0 6px;
  font-size: 12px;
}
#registerForm .interest-mods {
  gap: 6px;
  grid-template-columns: 1fr 1fr 1fr 1fr;
}
#registerForm .interest-mod {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
  gap: 6px;
  border-radius: 6px;
}
#registerForm .interest-mod::before {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}
#registerForm .contact-row {
  grid-template-columns: 88px 1fr;
  gap: 6px;
}
#registerForm .contact-row select,
#registerForm .contact-row input {
  height: 34px;
  font-size: 13px;
  border-radius: 6px;
}
#registerForm .captcha-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
#registerForm .captcha-img-btn,
#registerForm .captcha-img {
  height: 34px;
  border-radius: 6px;
}
#registerForm .login-submit {
  height: 38px;
  font-size: 14px;
  margin-top: 2px;
  border-radius: 6px;
}
@media (max-width: 560px) {
  .reg-modal.mf-auth-dialog,
  .reg-modal { width: min(100%, 100%); }
  #registerForm .reg-row { grid-template-columns: 1fr; }
  #registerForm .interest-mods { grid-template-columns: 1fr 1fr; }
}
/* reg error visible */
#regError.login-error, #mfLoginError.login-error {
  color: #ff6b6b !important;
  display: block;
}
#regError[hidden], #mfLoginError[hidden], #regOk[hidden] { display: none !important; }
#regOk.login-ok { color: #69db7c; font-size: 13px; }

/* ===== register click fix ===== */
body.mf-auth-open .boot,
body.mf-auth-open .nav-grid,
body.mf-auth-open .nav-grid-h span,
body.mf-auth-open .nav-grid-v span,
body.mf-auth-open .topbar,
body.mf-auth-open .account-actions {
  pointer-events: none !important;
}
.mf-auth-mask.reg-modal-mask,
#mfRegMask {
  z-index: 400 !important;
  pointer-events: auto !important;
}
.reg-modal.mf-auth-dialog,
.reg-modal {
  overflow: auto !important;
  max-height: min(92vh, 720px);
  position: relative;
  z-index: 401;
  pointer-events: auto !important;
}
#mfInterestWrap,
#mfInterestWrap .interest-mods,
#mfInterestWrap .interest-mod {
  position: relative;
  z-index: 1 !important;
}
#registerForm .reg-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 4px;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(38,40,46,0), #26282e 28%);
  pointer-events: auto !important;
}
#regSubmitBtn.register-submit,
#regSubmitBtn {
  position: relative;
  z-index: 21 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}
#regError, #regOk {
  position: relative;
  z-index: 21;
  min-height: 18px;
}

/* ===== reg success btn ===== */
#regSuccessBtn.reg-success-btn {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: #2f9e44;
  color: #fff;
  font: 600 15px "Noto Sans SC", Inter, system-ui, sans-serif;
  cursor: pointer;
  margin-top: 6px;
}
#regSuccessBtn.reg-success-btn:hover { filter: brightness(1.08); }
#regSuccessBtn[hidden] { display: none !important; }
#registerForm.is-success #regSubmitBtn { display: none !important; }

/* ===== reg success panel ===== */
.reg-success-panel {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(37, 38, 43, 0.96);
  border-radius: 14px;
  pointer-events: auto !important;
}
.reg-success-panel[hidden] { display: none !important; }
.reg-success-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #69db7c;
}
.reg-success-desc {
  margin: 0 0 8px;
  font-size: 13px;
  color: #adb5bd;
}
.reg-success-panel .reg-success-btn {
  width: min(280px, 100%);
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #2f9e44;
  color: #fff;
  font: 600 16px "Noto Sans SC", Inter, system-ui, sans-serif;
  cursor: pointer;
  pointer-events: auto !important;
  position: relative;
  z-index: 60;
}
.reg-modal, .mf-auth-dialog { position: relative; }
