/* Sim Top kirish — 3D hub + sodda forma */

:root {
  --font: "Manrope", system-ui, sans-serif;
  --font-display: "Sora", var(--font);
  --hub-blue: #2f6bff;
  --hub-blue-soft: #6ea8ff;
  --hub-ink: #0b1b3a;
}

/* Login ekrani: rasm bilan bir xil oq fon — tiniq */
#view-login.hub-login {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: clamp(1rem, 2.5vw, 2rem) clamp(1rem, 3vw, 2rem) 3rem;
  background: #ffffff;
  color: var(--hub-ink);
}

.hub-topbrand {
  width: min(1400px, 100%);
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-topbrand-logo {
  height: clamp(64px, 10vw, 92px);
  width: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 40, 90, 0.1);
}

.hub-panel-logo {
  display: block;
  height: 72px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 0.85rem;
  border-radius: 14px;
}

.hub-panel-logo-sm {
  height: 56px;
}

#view-login.hub-login .bg-animation {
  display: none;
}

body:has(#view-login.hub-login:not(.hidden)) .bg-animation,
body:has(#view-login.hub-login:not(.hidden))::before {
  opacity: 0;
  visibility: hidden;
}

.hub-shell {
  width: min(1400px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - 4rem);
  display: grid;
  grid-template-columns: 1.55fr minmax(300px, 380px);
  gap: clamp(0.75rem, 2vw, 1.75rem);
  align-items: center;
}

/* ─── Hub rasm — tiniq, blur yo'q ─── */
.hub-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(84vh, 800px);
  background: #ffffff;
}

.hub-stage-bg {
  display: none;
}

.hub-scene {
  position: relative;
  width: min(100%, 960px);
  background: #ffffff;
}

.hub-float {
  position: relative;
  animation: hubBob 6s ease-in-out infinite;
  filter: none;
  background: transparent;
}

@keyframes hubBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hub-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 960px;
  user-select: none;
  pointer-events: none;
  background: #ffffff;
  -webkit-user-drag: none;
}

.hub-shine,
.hub-shadow {
  display: none !important;
}

@keyframes hubShadow {
  0%, 100% { transform: scaleX(1); opacity: 0.55; }
  50% { transform: scaleX(0.86); opacity: 0.35; }
}

.hub-caption {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #3b5a8a;
  letter-spacing: 0.02em;
}

/* ─── Forma paneli ─── */
.hub-panel {
  width: 100%;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 24px 60px rgba(30, 60, 120, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--hub-ink);
  animation: hubPanelIn 0.7s 0.1s ease both;
}

@keyframes hubPanelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.hub-kicker {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hub-blue);
}

.hub-panel h1 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.1rem);
  letter-spacing: -0.03em;
  color: var(--hub-ink);
  text-align: center;
}

.hub-panel .sub-login {
  margin: 0 0 1.1rem;
  color: #5a7194;
  font-size: 0.92rem;
  text-align: center;
}

.auth-view.hidden {
  display: none;
}

.auth-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.28rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(47, 107, 255, 0.06);
  border: 1px solid rgba(47, 107, 255, 0.12);
}

.auth-method-tab {
  border: none;
  background: transparent;
  color: #5a7194;
  font: 600 0.82rem/1.2 var(--font);
  padding: 0.65rem 0.4rem;
  border-radius: 9px;
  cursor: pointer;
}

.auth-method-tab.is-active {
  background: #fff;
  color: var(--hub-ink);
  box-shadow: 0 4px 14px rgba(47, 107, 255, 0.12);
}

.auth-method-panel.hidden {
  display: none;
}

#view-login .auth-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin: 0;
  min-height: 0;
  justify-content: flex-start;
}

#view-login .auth-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

#view-login .auth-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5a7194;
}

#view-login .auth-row input,
#view-login .auth-standalone-input {
  width: 100%;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(47, 107, 255, 0.18);
  background: #fff;
  color: var(--hub-ink);
  font-size: 0.92rem;
}

#view-login .auth-row input:focus,
#view-login .auth-standalone-input:focus {
  outline: none;
  border-color: var(--hub-blue);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.16);
}

#view-login .auth-row-link {
  justify-items: end;
  margin-top: -0.15rem;
}

#view-login .auth-text-link {
  background: none;
  border: none;
  color: var(--hub-blue);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0;
}

#view-login .auth-text-link:hover {
  text-decoration: underline;
}

#view-login .btn-auth-submit {
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e4fd6 0%, #2f6bff 55%, #5b9bff 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.32);
  transition: transform 0.15s, filter 0.15s;
}

#view-login .btn-auth-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

#view-login .btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#view-login .login-error {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

#view-login .login-error:empty {
  display: none;
}

#view-login .auth-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: #5a7194;
}

#view-login .auth-alt-block {
  display: grid;
  gap: 0.75rem;
}

#view-login .login-tg-hint {
  margin: 0;
  font-size: 0.8rem;
  color: #5a7194;
  line-height: 1.45;
}

#view-login .login-tg-hint code {
  font-size: 0.76rem;
  padding: 0.1rem 0.3rem;
  border-radius: 5px;
  background: rgba(47, 107, 255, 0.1);
  color: #1e4fd6;
}

#view-login .login-divider {
  margin: 1rem 0;
  color: #8aa0c0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#view-login .login-divider::before,
#view-login .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(47, 107, 255, 0.15);
}

#view-login .auth-terms {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0.15rem 0;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(47, 107, 255, 0.06);
  border: 1px solid rgba(47, 107, 255, 0.14);
  font-size: 0.82rem;
  color: #3b5a8a;
  line-height: 1.45;
  white-space: normal;
  writing-mode: horizontal-tb;
}

#view-login .auth-terms input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.12rem 0 0;
  flex: 0 0 auto;
  accent-color: var(--hub-blue);
}

#view-login .auth-terms > span {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  writing-mode: horizontal-tb;
  word-break: normal;
  overflow-wrap: break-word;
}

#view-login .server-warn {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #92400e;
  font-size: 0.82rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  line-height: 1.5;
}

#view-login .password-toggle {
  color: #5a7194;
}

/* ─── Kirish yo'riqnomasi (1-qadam) ─── */
.hub-howto {
  width: min(1280px, 100%);
  margin: 1.75rem auto 0;
  padding: 1.4rem 1.25rem 1.5rem;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(232, 240, 255, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 40px rgba(30, 79, 214, 0.08);
}

.hub-howto-head {
  margin-bottom: 1.1rem;
}

.hub-howto-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--hub-ink);
}

.hub-howto-head p {
  margin: 0;
  font-size: 0.95rem;
  color: #4a6288;
  line-height: 1.5;
  max-width: 52rem;
}

.hub-howto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.hub-howto-card {
  position: relative;
  padding: 1.1rem 1rem 1.05rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(47, 107, 255, 0.14);
  box-shadow: 0 6px 20px rgba(30, 79, 214, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hub-howto-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 107, 255, 0.35);
}

.hub-howto-num {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1e4fd6, #2f6bff);
}

.hub-howto-icon {
  font-size: 1.55rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}

.hub-howto-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: var(--hub-ink);
}

.hub-howto-card p {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: #3f567a;
  line-height: 1.5;
}

.hub-howto-card code {
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(47, 107, 255, 0.1);
  font-size: 0.82rem;
}

.hub-howto-card ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  color: #5a7194;
  font-size: 0.82rem;
  line-height: 1.55;
}

/* ─── Kirish ostidagi xizmatlar demo ─── */
.hub-demos {
  width: min(1280px, 100%);
  margin: 1.15rem auto 0;
  padding: 1.45rem 1.25rem 1.55rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 40px rgba(30, 79, 214, 0.08);
}

.hub-demos-head {
  margin-bottom: 1rem;
}

.hub-demos-head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--hub-ink);
}

.hub-demos-head p {
  margin: 0;
  font-size: 0.95rem;
  color: #4a6288;
  line-height: 1.5;
  max-width: 52rem;
}

.hub-demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.hub-demo-tab {
  border: 1px solid rgba(47, 107, 255, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #2a3f63;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hub-demo-tab:hover {
  border-color: rgba(47, 107, 255, 0.4);
}

.hub-demo-tab.is-active {
  background: linear-gradient(135deg, #1e4fd6, #2f6bff);
  border-color: transparent;
  color: #fff;
}

.hub-demo-stage {
  position: relative;
}

.hub-demo-panel {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.1rem;
  align-items: stretch;
}

.hub-demo-panel.is-active {
  display: grid;
}

.hub-demo-badge {
  display: inline-block;
  margin: 0 0 0.45rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1e4fd6;
  background: rgba(47, 107, 255, 0.12);
}

.hub-demo-copy h3 {
  margin: 0 0 0.55rem;
  font-size: 1.18rem;
  color: var(--hub-ink);
  line-height: 1.3;
}

.hub-demo-lead {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: #4a6288;
  line-height: 1.55;
}

.hub-demo-copy ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.hub-demo-copy ol li {
  position: relative;
  margin: 0 0 0.5rem;
  padding: 0.6rem 0.75rem 0.6rem 2.5rem;
  border-radius: 12px;
  background: rgba(47, 107, 255, 0.06);
  color: #334868;
  font-size: 0.88rem;
  line-height: 1.45;
  counter-increment: step;
}

.hub-demo-copy ol li b {
  color: var(--hub-ink);
}

.hub-demo-copy ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.55rem;
  top: 0.62rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1e4fd6, #2f6bff);
}

.hub-demo-tip {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 214, 102, 0.22), rgba(255, 236, 179, 0.35));
  border: 1px solid rgba(214, 160, 40, 0.28);
  color: #5a4a20;
  font-size: 0.86rem;
  line-height: 1.5;
}

.hub-demo-media {
  position: relative;
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(80, 140, 255, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(40, 200, 160, 0.18), transparent 50%),
    linear-gradient(160deg, #0b1220 0%, #152238 100%);
  border: 1px solid rgba(47, 107, 255, 0.25);
}

.hub-demo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
  background: #0b1220;
  z-index: 2;
}

.hub-demo-video.hidden {
  display: none !important;
}

.hub-demo-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.hub-demo-phone {
  position: relative;
  z-index: 1;
  width: min(100%, 280px);
  margin: 0 auto;
  padding: 0.55rem 0.55rem 0.7rem;
  border-radius: 28px;
  background: linear-gradient(160deg, #1a2438, #0d1424);
  border: 2px solid rgba(180, 200, 255, 0.22);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #e8eefc;
  animation: hubPhoneIn 0.45s ease;
}

.hub-demo-phone.hidden {
  display: none !important;
}

@keyframes hubPhoneIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.hub-phone-notch {
  width: 38%;
  height: 0.35rem;
  margin: 0.2rem auto 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hub-phone-screen {
  padding: 0.15rem 0.35rem 0.25rem;
}

.hub-demos .demo-live-sub {
  margin: -0.2rem 0 0.55rem;
  font-size: 0.75rem;
  color: #9db0d4;
  line-height: 1.35;
}

.hub-demos .demo-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.45rem 0 0.35rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  color: #9db0d4;
}

.hub-demos .demo-price-row strong {
  color: #fff;
  font-weight: 750;
}

.hub-demos .demo-cards-row {
  display: flex;
  gap: 0.4rem;
  margin: 0.45rem 0;
  font-size: 0.78rem;
}

.hub-demos .demo-cards-row span {
  flex: 1;
  text-align: center;
  padding: 0.4rem 0.35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hub-demo-live-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #9db0d4;
  margin-bottom: 0.75rem;
}

.hub-demo-live-bar b.pulse {
  color: #ff5c5c;
  animation: hubDemoRec 1.2s ease-in-out infinite;
}

@keyframes hubDemoRec {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hub-demos .demo-live-label {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.98rem;
}

.hub-demos .demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

.hub-demos .demo-chips span {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hub-demos .demo-chips span.on {
  background: rgba(47, 107, 255, 0.35);
  border-color: rgba(120, 160, 255, 0.5);
}

.hub-demos .demo-fake-input {
  margin: 0.45rem 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
}

.hub-demos .demo-typing::after {
  content: "|";
  margin-left: 2px;
  animation: hubDemoCaret 1s steps(1) infinite;
}

@keyframes hubDemoCaret {
  50% { opacity: 0; }
}

.hub-demos .demo-fake-btn {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e4fd6, #2f6bff);
  font-weight: 700;
  font-size: 0.88rem;
  animation: hubDemoBtn 2.8s ease-in-out infinite;
}

@keyframes hubDemoBtn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.hub-demos .demo-live-ok {
  margin: 0.7rem 0 0;
  color: #6dffb0;
  font-size: 0.88rem;
  font-weight: 650;
  animation: hubDemoOk 3.5s ease-in-out infinite;
}

@keyframes hubDemoOk {
  0%, 40% { opacity: 0.25; }
  55%, 85% { opacity: 1; }
  100% { opacity: 0.25; }
}

.hub-demos .demo-balance-line {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.4rem 0;
}

.hub-demos .demo-balance-line strong {
  font-size: 1.45rem;
  font-weight: 800;
}

.hub-demos .demo-balance-line span {
  color: #9db0d4;
  font-size: 0.85rem;
}

.hub-demos-foot {
  margin: 1rem 0 0;
  font-size: 0.86rem;
  color: #5a7194;
  line-height: 1.45;
}

/* Theme toggle — kirish sahifasida */
#view-login.hub-login ~ .theme-toggle-global,
body:has(#view-login.hub-login:not(.hidden)) .theme-toggle-global {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(47, 107, 255, 0.25);
  color: var(--hub-ink);
  z-index: 300;
}

/* ─── Kirish: TUN rejimi ─── */
html[data-theme="dark"] #view-login.hub-login,
[data-theme="dark"] #view-login.hub-login {
  background: #0b1220;
  color: #e8eefc;
}

html[data-theme="dark"] #view-login.hub-login .hub-stage,
html[data-theme="dark"] #view-login.hub-login .hub-scene,
html[data-theme="dark"] #view-login.hub-login .hub-img,
[data-theme="dark"] #view-login.hub-login .hub-stage,
[data-theme="dark"] #view-login.hub-login .hub-scene,
[data-theme="dark"] #view-login.hub-login .hub-img {
  background: #0b1220;
}

html[data-theme="dark"] #view-login.hub-login .hub-caption,
[data-theme="dark"] #view-login.hub-login .hub-caption {
  color: #9fb4d9;
}

html[data-theme="dark"] #view-login.hub-login .hub-panel,
[data-theme="dark"] #view-login.hub-login .hub-panel {
  background: rgba(18, 28, 48, 0.92);
  border-color: rgba(99, 130, 200, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color: #e8eefc;
}

html[data-theme="dark"] #view-login.hub-login .hub-panel h1,
[data-theme="dark"] #view-login.hub-login .hub-panel h1 {
  color: #f1f5ff;
}

html[data-theme="dark"] #view-login.hub-login .hub-panel .sub-login,
html[data-theme="dark"] #view-login.hub-login .auth-switch,
html[data-theme="dark"] #view-login.hub-login .login-tg-hint,
[data-theme="dark"] #view-login.hub-login .hub-panel .sub-login,
[data-theme="dark"] #view-login.hub-login .auth-switch,
[data-theme="dark"] #view-login.hub-login .login-tg-hint {
  color: #9fb4d9;
}

html[data-theme="dark"] #view-login.hub-login .auth-method-tabs,
[data-theme="dark"] #view-login.hub-login .auth-method-tabs {
  background: rgba(99, 130, 200, 0.1);
  border-color: rgba(99, 130, 200, 0.2);
}

html[data-theme="dark"] #view-login.hub-login .auth-method-tab,
[data-theme="dark"] #view-login.hub-login .auth-method-tab {
  color: #9fb4d9;
}

html[data-theme="dark"] #view-login.hub-login .auth-method-tab.is-active,
[data-theme="dark"] #view-login.hub-login .auth-method-tab.is-active {
  background: rgba(47, 107, 255, 0.25);
  color: #f1f5ff;
  box-shadow: none;
}

html[data-theme="dark"] #view-login.hub-login .auth-row label,
[data-theme="dark"] #view-login.hub-login .auth-row label {
  color: #9fb4d9;
}

html[data-theme="dark"] #view-login.hub-login .auth-row input,
html[data-theme="dark"] #view-login.hub-login .auth-standalone-input,
[data-theme="dark"] #view-login.hub-login .auth-row input,
[data-theme="dark"] #view-login.hub-login .auth-standalone-input {
  background: #121c30 !important;
  border-color: rgba(99, 130, 200, 0.28) !important;
  color: #f1f5ff !important;
  -webkit-text-fill-color: #f1f5ff !important;
  color-scheme: dark;
}

html[data-theme="dark"] #view-login.hub-login .auth-terms,
[data-theme="dark"] #view-login.hub-login .auth-terms {
  background: rgba(47, 107, 255, 0.12);
  border-color: rgba(99, 130, 200, 0.25);
  color: #c5d4f0;
}

html[data-theme="dark"] #view-login.hub-login .auth-text-link,
[data-theme="dark"] #view-login.hub-login .auth-text-link {
  color: #6ea8ff;
}

html[data-theme="dark"] #view-login.hub-login .hub-howto,
html[data-theme="dark"] #view-login.hub-login .hub-demos,
[data-theme="dark"] #view-login.hub-login .hub-howto,
[data-theme="dark"] #view-login.hub-login .hub-demos {
  background: linear-gradient(160deg, rgba(18, 28, 48, 0.95), rgba(12, 20, 36, 0.92));
  border-color: rgba(99, 130, 200, 0.2);
  color: #e8eefc;
}

/* Tun: yo'riqnoma / demo matnlari — tiniq oq-ko'k */
html[data-theme="dark"] #view-login.hub-login .hub-howto-head h2,
html[data-theme="dark"] #view-login.hub-login .hub-demos-head h2,
html[data-theme="dark"] #view-login.hub-login .hub-howto-card h3,
html[data-theme="dark"] #view-login.hub-login .hub-demo-copy h3,
[data-theme="dark"] #view-login.hub-login .hub-howto-head h2,
[data-theme="dark"] #view-login.hub-login .hub-demos-head h2,
[data-theme="dark"] #view-login.hub-login .hub-howto-card h3,
[data-theme="dark"] #view-login.hub-login .hub-demo-copy h3 {
  color: #f1f5ff !important;
}

html[data-theme="dark"] #view-login.hub-login .hub-howto-head p,
html[data-theme="dark"] #view-login.hub-login .hub-demos-head p,
html[data-theme="dark"] #view-login.hub-login .hub-howto-card p,
html[data-theme="dark"] #view-login.hub-login .hub-howto-card ul,
html[data-theme="dark"] #view-login.hub-login .hub-demo-copy p,
html[data-theme="dark"] #view-login.hub-login .hub-demo-copy ol,
html[data-theme="dark"] #view-login.hub-login .hub-demo-copy ol li,
html[data-theme="dark"] #view-login.hub-login .hub-demos-foot,
[data-theme="dark"] #view-login.hub-login .hub-howto-head p,
[data-theme="dark"] #view-login.hub-login .hub-demos-head p,
[data-theme="dark"] #view-login.hub-login .hub-howto-card p,
[data-theme="dark"] #view-login.hub-login .hub-howto-card ul,
[data-theme="dark"] #view-login.hub-login .hub-demo-copy p,
[data-theme="dark"] #view-login.hub-login .hub-demo-copy ol,
[data-theme="dark"] #view-login.hub-login .hub-demo-copy ol li,
[data-theme="dark"] #view-login.hub-login .hub-demos-foot {
  color: #c5d4f0 !important;
}

html[data-theme="dark"] #view-login.hub-login .hub-howto-card,
html[data-theme="dark"] #view-login.hub-login .hub-demo-panel,
html[data-theme="dark"] #view-login.hub-login .hub-demo-copy,
[data-theme="dark"] #view-login.hub-login .hub-howto-card,
[data-theme="dark"] #view-login.hub-login .hub-demo-panel,
[data-theme="dark"] #view-login.hub-login .hub-demo-copy {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(99, 130, 200, 0.28) !important;
  color: #e8eefc !important;
}

html[data-theme="dark"] #view-login.hub-login .hub-demo-copy ol li b,
html[data-theme="dark"] #view-login.hub-login .hub-howto-card code,
[data-theme="dark"] #view-login.hub-login .hub-demo-copy ol li b,
[data-theme="dark"] #view-login.hub-login .hub-howto-card code {
  color: #9ec1ff !important;
}

html[data-theme="dark"] #view-login.hub-login .hub-demo-tab,
[data-theme="dark"] #view-login.hub-login .hub-demo-tab {
  color: #c5d4f0;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 130, 200, 0.25);
}

html[data-theme="dark"] #view-login.hub-login .hub-demo-tab.is-active,
[data-theme="dark"] #view-login.hub-login .hub-demo-tab.is-active {
  color: #fff;
  background: rgba(47, 107, 255, 0.45);
}

html[data-theme="dark"] body:has(#view-login.hub-login:not(.hidden)) .theme-toggle-global,
[data-theme="dark"] body:has(#view-login.hub-login:not(.hidden)) .theme-toggle-global {
  background: rgba(18, 28, 48, 0.92);
  border-color: rgba(99, 130, 200, 0.35);
  color: #f1f5ff;
}

@media (max-width: 980px) {
  .hub-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hub-stage {
    min-height: auto;
    order: 1;
  }

  .hub-panel {
    order: 2;
    max-width: 440px;
    margin: 0 auto;
  }

  .hub-scene {
    width: min(100%, 560px);
  }

  .hub-howto-grid {
    grid-template-columns: 1fr;
  }

  .hub-demo-panel.is-active {
    grid-template-columns: 1fr;
  }

  .hub-demo-media {
    min-height: 300px;
  }

  .hub-demo-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .hub-demo-tab {
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  .hub-howto,
  .hub-demos {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hub-howto-head h2,
  .hub-demos-head h2 {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-float,
  .hub-shine,
  .hub-shadow,
  .hub-stage-bg,
  .hub-panel {
    animation: none !important;
  }

  .hub-scene {
    transition: none !important;
  }
}
