/* Login-specific layout: do not inherit workspace form spacing. */
.auth-dialog {
  width: min(984px, calc(100vw - 48px));
  max-width: 984px;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid #32363c;
  background: #191a1e;
  overflow: hidden;
  border-radius: 20px;
  color: #eceff4;
  color-scheme: dark;
}
.auth-dialog::backdrop {
  background: rgba(8, 11, 16, .68);
  backdrop-filter: blur(4px);
}
.auth-dialog .workspace-dialog-header {
  position: absolute;
  right: 24px;
  top: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  z-index: 2;
}
.auth-dialog .workspace-dialog-header h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.auth-dialog .workspace-dialog-header button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  color: #b8bdc8;
}
.auth-dialog .workspace-dialog-header button:hover { background: #ffffff0a; color: #fff; }
.auth-dialog #workspaceDialogBody {
  padding: 0;
  max-height: calc(100dvh - 50px);
  overflow: hidden;
  border-radius: 19px;
  scrollbar-width: thin;
  scrollbar-color: #464a52 transparent;
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 424px;
  height: min(558px, calc(100dvh - 50px));
  min-height: 0;
}
.auth-art {
  position: relative;
  overflow: hidden;
  padding: 38px 40px 32px;
  background: radial-gradient(ellipse at 75% 62%, #57887866, transparent 55%),
    linear-gradient(140deg, #173231, #111c23 60%, #1c2d40);
  display: flex;
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
}
.auth-brand {
  position: absolute;
  top: 36px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #d9fff2;
}
.auth-art h3 {
  font-size: 38px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 1px;
  margin: auto 0 18px;
  padding-top: 120px;
  z-index: 1;
}
.auth-art p { font-size: 14px; line-height: 1.9; color: #b4c9c9; margin: 0; z-index: 1; }
.auth-art-caption {
  margin-top: auto;
  padding-top: 70px;
  font-size: 9px;
  letter-spacing: 2.5px;
  color: #8ea9a7;
  z-index: 1;
}
.auth-orbit {
  position: absolute;
  top: 90px;
  left: 180px;
  width: 420px;
  height: 420px;
  border: 1px solid #93dbc140;
  border-radius: 50%;
  box-shadow: 0 0 90px #75deb515, inset 0 0 60px #6acecd15;
  transform: rotate(-30deg) scaleX(.55);
  z-index: -1;
}
.auth-orbit:after {
  content: '';
  position: absolute;
  inset: 40px;
  border: 1px solid #b5e9ff28;
  border-radius: 50%;
  transform: rotate(80deg) scaleX(1.65);
  box-shadow: 0 0 50px #86c3ff15;
}
.auth-content {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 52px 32px 32px;
  display: flex;
  flex-direction: column;
}
.auth-heading { flex: 0 0 auto; margin-bottom: 32px; }
/* Only the right-hand form scrolls; artwork and heading retain their composition. */
.auth-scroll {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: -4px -16px -4px -4px;
  padding: 4px 16px 4px 4px;
  scrollbar-width: thin;
  scrollbar-color: #464a52 transparent;
  overscroll-behavior: contain;
}
.auth-scroll > * { flex-shrink: 0; }
.auth-heading h3 { font-size: 25px; font-weight: 600; line-height: 1.4; margin: 8px 0; color: #f2f4f8; }
.auth-heading p { color: #939aa8; font-size: 13px; line-height: 1.6; margin: 0; }
.auth-eyebrow { color: #7bcfba; font-size: 11px; letter-spacing: 2px; }
.auth-dialog #authForm { display: block; margin: 0; }
.auth-dialog form label { display: block; font-size: 12px; line-height: 18px; color: #b6bdc8; margin: 18px 0 8px; }
.auth-dialog form > label:first-child { margin-top: 0; }
.auth-dialog input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid #363b45;
  border-radius: 8px;
  background: #26282d;
  color: #f0f3f9;
  padding: 0 13px;
  outline: none;
  font-size: 13px;
  transition: border-color .15s;
  color-scheme: dark;
}
.auth-dialog input:focus { border-color: #8be1c3; outline: none; box-shadow: 0 0 0 3px #88e4c512; }
.auth-dialog input::placeholder { color: #737b88; }
/* Chrome/Edge autofill must keep the same dark input surface. */
.auth-dialog input:autofill {
  box-shadow: 0 0 0 1000px #26282d inset;
  -webkit-text-fill-color: #f0f3f9;
  caret-color: #f0f3f9;
}
.auth-dialog input:autofill:focus { box-shadow: 0 0 0 1000px #26282d inset, 0 0 0 3px #88e4c512; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.auth-dialog .auth-label-row label { margin: 0; }
.auth-link { padding: 0; background: none; border: 0; color: #a5e9d3; cursor: pointer; font-size: 12px; }
.auth-link:hover { color: #dcfff1; text-decoration: underline; }
.auth-password { position: relative; }
.auth-password input { padding-right: 61px; }
.auth-password button { position: absolute; right: 11px; top: 0; height: 44px; background: none; border: 0; color: #8993a3; font-size: 11px; cursor: pointer; }
.auth-code-row { display: flex; gap: 8px; }
.auth-code-btn { min-width: 112px; border: 1px solid #3e4f4c; border-radius: 8px; background: #25322f; color: #b9f3dc; font-size: 12px; cursor: pointer; }
.auth-code-btn:disabled { opacity: .5; cursor: default; }
.auth-submit { width: 100%; height: 48px; margin-top: 28px; border-radius: 8px !important; background: #bbf4dc !important; color: #153029 !important; font-weight: 650; }
.auth-submit:disabled { opacity: .5; }
.auth-switch { font-size: 12px; line-height: 18px; text-align: center; color: #919aa8; margin-top: 22px; }
.auth-switch button { margin-left: 4px; }
.auth-dialog .form-error { font-size: 12px; line-height: 1.5; margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.auth-dialog .form-error:empty { display: none; }
.auth-dialog .form-error .auth-link { margin-left: 6px; font-size: 12px; }
.auth-footer { text-align: center; color: #737d8b; font-size: 11px; line-height: 18px; margin: auto 0 0; padding-top: 28px; }
.auth-hint { font-size: 11px; line-height: 1.6; color: #8e98a9; margin: 12px 0 0; }
.auth-divider { font-size: 11px; text-align: center; color: #737f90; display: flex; align-items: center; gap: 10px; margin: 25px 0 14px; }
.auth-divider:before, .auth-divider:after { content: ''; height: 1px; background: #343b45; flex: 1; }
.auth-providers { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-providers button { flex: 1; min-width: 100px; height: 36px; border: 1px solid #343d48; border-radius: 8px; background: #222831; color: #c5cfdb; font-size: 12px; cursor: pointer; }
.auth-loading { padding: 70px 40px; text-align: center; color: #a7b4c3; min-height: 200px; }
.auth-loading .primary-btn { margin-top: 15px; }
.auth-policy { padding: 20px; border: 1px solid #3d4948; border-radius: 12px; background: #23302d; font-size: 13px; line-height: 1.7; color: #b9cfca; }
.auth-policy p { font-size: 12px; color: #96b0a8; }
.auth-policy .primary-btn { width: 100%; margin-top: 14px; }
.auth-dialog button:focus-visible { outline: 2px solid #91e6c8; outline-offset: 3px; }
@media (max-width: 820px) {
  .auth-dialog { width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); height: auto; max-height: calc(100dvh - 26px); min-height: 0; }
  .auth-art { display: none; }
  .auth-content { padding: 44px 24px 28px; max-height: calc(100dvh - 26px); }
  .auth-heading { margin-bottom: 30px; }
  .auth-dialog #workspaceDialogBody { max-height: calc(100dvh - 26px); border-radius: 15px; }
  .auth-dialog .workspace-dialog-header { right: 16px; top: 16px; }
  .auth-heading h3 { font-size: 24px; }
  .auth-footer { margin-top: 0; }
}
@media (max-height: 640px) and (min-width: 821px) {
  .auth-layout { min-height: 0; }
  .auth-content { padding-top: 32px; padding-bottom: 24px; }
  .auth-heading { margin-bottom: 24px; }
  .auth-art h3 { padding-top: 80px; }
  .auth-art-caption { padding-top: 40px; }
}
