
.auth-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg0);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  min-width: 0;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 2.2rem 2.4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.6rem;
  color: #f4ecd7;
  background:
    radial-gradient(80% 60% at 80% 0%, color-mix(in srgb, var(--accent), transparent 78%), transparent 60%),
    radial-gradient(60% 50% at 0% 100%, color-mix(in srgb, var(--accent), transparent 85%), transparent 60%),
    linear-gradient(165deg, #1a1d24 0%, #0d1014 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-hero-stripes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 48px,
    rgba(201, 167, 106, 0.04) 48px,
    rgba(201, 167, 106, 0.04) 49px
  );
  mask-image: radial-gradient(60% 50% at 50% 60%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(60% 50% at 50% 60%, #000 30%, transparent 80%);
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.auth-hero-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--accent);
  color: #1a1410;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
}

.auth-hero-brand-name {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.auth-hero-brand-name em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.62;
  margin-left: 0.25rem;
}

.auth-hero-text {
  max-width: 32rem;
}

.auth-hero-title {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  color: #fff;
}

.auth-hero-sub {
  font-size: 0.86rem;
  line-height: 1.6;
  opacity: 0.62;
  margin: 0;
}

.auth-hero-device {
  flex: 1;
  width: 100%;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0.4rem 0;
}

.laptop {
  width: 100%;
  max-width: 540px;
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.55));
}

.laptop-screen {
  background: linear-gradient(180deg, #2c3038 0%, #1c1f25 100%);
  border-radius: 10px 10px 3px 3px;
  padding: 10px 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.laptop-preview {
  background: #131418;
  border-radius: 3px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
}

.lp-topbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: #1a1c20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lp-traffic {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.lp-traffic:nth-child(1) { background: #ff5f57; }
.lp-traffic:nth-child(2) { background: #febc2e; }
.lp-traffic:nth-child(3) { background: #28c840; }

.lp-url {
  flex: 1;
  height: 7px;
  margin-left: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

.lp-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 70px 1fr;
  min-height: 0;
}

.lp-sidebar {
  background: #16181c;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.lp-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 2px 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lp-brand-mark {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.lp-brand-text {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 1px;
}

.lp-group-label {
  height: 4px;
  width: 60%;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 1px;
  margin: 4px 2px 2px;
}

.lp-row {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1.5px;
  margin-left: 4px;
}

.lp-row.active {
  background: var(--accent);
  box-shadow: -3px 0 0 0 var(--accent);
}

.lp-content {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.lp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lp-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.lp-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.lp-eyebrow {
  height: 4px;
  width: 40%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
}

.lp-title {
  height: 9px;
  width: 55%;
  background: rgba(255, 255, 255, 0.32);
  border-radius: 1.5px;
}

.lp-userchip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
}

.lp-avatar {
  width: 10px;
  height: 10px;
  background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent), #000 35%));
  border-radius: 2px;
}

.lp-userlines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lp-userlines i {
  display: block;
  width: 26px;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 1px;
}

.lp-userlines i:nth-child(2) {
  width: 18px;
  opacity: 0.55;
}

.lp-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.lp-kpi {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lp-kpi span {
  height: 3px;
  width: 60%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
}

.lp-kpi b {
  height: 7px;
  width: 75%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1.5px;
}

.lp-kpi:nth-child(1) b { background: var(--accent); opacity: 0.85; }

.lp-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.lp-search {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 1.5px;
}

.lp-pill {
  height: 8px;
  width: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.lp-pill.accent {
  background: var(--accent);
  border-color: var(--accent);
}

.lp-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  min-height: 0;
}

.lp-card {
  background: #1c1f25;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 4px;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lp-card > i {
  display: block;
  flex: 1;
  background: linear-gradient(135deg, #2a2e36 0%, #181b21 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 3px;
}

.lp-card > b {
  display: block;
  height: 5px;
  background: var(--accent);
  opacity: 0.7;
  margin: 0 4px 0;
  border-radius: 1px;
  width: 50%;
}

.lp-card > span {
  display: block;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
  margin: 3px 4px 0;
  border-radius: 1px;
}

.lp-card > em {
  display: block;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  margin: 2px 4px 0;
  width: 65%;
  border-radius: 1px;
}

.laptop-hinge {
  height: 4px;
  background: linear-gradient(180deg, #1c1f25 0%, #0f1115 100%);
  margin: 0 -2%;
  border-radius: 0 0 2px 2px;
}

.laptop-base {
  height: 8px;
  width: 108%;
  margin: 0 -4%;
  background: linear-gradient(180deg, #34383f 0%, #1a1c20 100%);
  border-radius: 0 0 14px 14px;
  position: relative;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.laptop-base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 3px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 0 0 4px 4px;
}

.auth-hero-apps {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #f4ecd7;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
  min-width: 150px;
}

.app-badge:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.app-badge i {
  font-size: 1.45rem;
  line-height: 1;
}

.app-badge span {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.app-badge small {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
}

.app-badge strong {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

@media (max-width: 960px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    display: none;
  }
  .auth-main {
    min-height: 100vh;
    padding: 1.5rem 1rem;
  }
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin: 0.1rem 0 0.3rem;
  border-bottom: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
  position: relative;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.6rem;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted, rgba(255, 255, 255, 0.45));
  transition: color 0.18s ease, border-color 0.18s ease;
  font-family: inherit;
  margin-bottom: -1px;
}

.auth-tab:hover {
  color: var(--text-soft);
}

.auth-tab.active {
  color: var(--text, inherit);
  border-bottom-color: var(--accent, #c9a76a);
}

.auth-pane[hidden] {
  display: none !important;
}

.auth-back {
  text-align: center;
  margin: 0.4rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--stroke);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.auth-back a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-back a:hover {
  color: var(--accent);
}

.otp-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 200;
  animation: otpFade 0.18s ease;
}

.otp-backdrop[hidden] {
  display: none !important;
}

@keyframes otpFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.otp-card {
  background: var(--surface, #1c1c20);
  color: var(--text, #f1eada);
  border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 1.3rem 1.3rem 1.1rem;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  animation: otpPop 0.2s ease;
}

@keyframes otpPop {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.otp-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.otp-card .muted.small {
  font-size: 0.75rem;
  margin: 0.2rem 0 0;
}

.otp-card .field {
  margin-top: 1.1rem;
  gap: 0.5rem;
}

.otp-card .field label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}

.otp-inputs {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin: 0.2rem 0 0;
}

.otp-cell {
  width: 2.3rem;
  height: 2.6rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 5px;
  border: 1px solid var(--stroke);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  padding: 0;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.otp-cell:focus {
  border-color: color-mix(in srgb, var(--accent), transparent 30%);
  background: var(--surface);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent), transparent 92%);
}

.otp-cell.filled {
  border-color: color-mix(in srgb, var(--accent), transparent 55%);
  color: var(--accent);
  background: var(--surface);
}

.otp-cell.error {
  border-color: #b35040;
  color: #b35040;
  animation: otpShake 0.35s ease;
}

@keyframes otpShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

#login-code-field > label {
  justify-content: center;
}

.login-form .otp-inputs {
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.login-form .otp-cell {
  width: 2.55rem;
  height: 2.9rem;
  font-size: 1.2rem;
}

.code-sent {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  border-radius: 5px;
  font-size: 0.74rem;
  margin-bottom: 0.65rem;
}

.code-sent-label {
  color: var(--text-muted);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.code-sent strong {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.code-change {
  margin-left: auto;
  background: transparent;
  border: 0;
  padding: 0.2rem 0;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.code-change:hover {
  opacity: 0.7;
}

.otp-resend {
  margin: 0.9rem 0 0.2rem;
  text-align: center;
  font-size: 0.74rem;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent, #c9a76a);
  font: inherit;
  cursor: pointer;
  border-bottom: 1px dashed currentColor;
}

.link-btn:hover {
  opacity: 0.85;
}

.otp-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--stroke);
}

.otp-actions .btn {
  flex: 1;
}

#otp-hint {
  margin: 0.6rem 0 0;
  min-height: 1.2em;
  text-align: center;
  font-size: 0.74rem;
}

#otp-hint.error {
  color: #ff8b8b;
}

#otp-hint.success {
  color: #74d39e;
}
