/* Auth page */
.auth-page {
  --page: #eef3f9;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --surface-strong: #edf2f8;
  --text: #101c2c;
  --text-soft: #405168;
  --muted: #7b899b;
  --line: #e6ebf2;
  --line-strong: #d9e1ea;
  --field: #f8fafc;
  --shadow-card: 0 26px 70px rgba(34, 67, 112, 0.12), 0 3px 10px rgba(34, 67, 112, 0.04);
  --showcase: #0d2238;
  color: var(--text);
  background: var(--page);
  overflow-x: hidden;
}

:root[data-theme="dark"] .auth-page {
  --page: #0a111a;
  --surface: #111b26;
  --surface-soft: #162230;
  --surface-strong: #1a2736;
  --text: #f1f6fb;
  --text-soft: #c4d1df;
  --muted: #8494a6;
  --line: #223142;
  --line-strong: #2b3d50;
  --field: #0e1823;
  --shadow-card: 0 30px 80px rgba(0, 0, 0, 0.35), 0 3px 10px rgba(0, 0, 0, 0.12);
}

.auth-page button {
  background: none;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface) !important;
  border: 1px solid var(--line);
  box-shadow: 0 5px 16px rgba(25, 55, 94, 0.06);
  transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.icon-button:hover {
  color: var(--text);
  background: var(--surface-soft) !important;
  transform: translateY(-1px);
}

.icon-button:active {
  transform: translateY(0);
}

.auth-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.5;
}

.auth-orb-1 {
  width: 560px;
  height: 560px;
  right: -220px;
  top: -220px;
  background: radial-gradient(circle, rgba(72, 183, 255, 0.25), transparent 68%);
}

.auth-orb-2 {
  width: 500px;
  height: 500px;
  left: -200px;
  bottom: -260px;
  background: radial-gradient(circle, rgba(47, 141, 245, 0.14), transparent 70%);
}

.auth-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: linear-gradient(rgba(42, 86, 139, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 86, 139, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 70%, transparent);
}

:root[data-theme="dark"] .auth-grid {
  opacity: 0.14;
}

.auth-topbar {
  position: fixed;
  z-index: 20;
  top: max(20px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
}

.auth-theme-button {
  width: 42px;
  height: 42px;
  background: color-mix(in srgb, var(--surface) 82%, transparent) !important;
  backdrop-filter: blur(12px);
}

.auth-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(480px, 0.93fr);
  min-height: 100dvh;
  max-width: 1680px;
  margin: 0 auto;
}

/* Showcase */
.auth-showcase {
  position: relative;
  min-height: calc(100dvh - 32px);
  margin: 16px;
  margin-right: 0;
  border-radius: 32px;
  overflow: hidden;
  color: #f4f9ff;
  background:
    radial-gradient(105% 90% at 15% 0%, rgba(64, 167, 255, 0.34), transparent 52%),
    radial-gradient(90% 80% at 90% 100%, rgba(42, 102, 219, 0.34), transparent 55%),
    linear-gradient(148deg, #102c4b 0%, #0b2138 42%, #091a2c 100%);
  isolation: isolate;
}

.auth-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.17;
  background-image: linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 70% 45%, #000, transparent 72%);
}

.auth-showcase::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  right: -130px;
  top: -210px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 90px rgba(255, 255, 255, 0.025), 0 0 0 180px rgba(255, 255, 255, 0.018);
}

.showcase-inner {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 32px);
  padding: clamp(34px, 4.2vw, 66px) clamp(32px, 4.8vw, 76px) clamp(30px, 3.5vw, 52px);
}

.showcase-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.showcase-brand img {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.auth-showcase h1 {
  margin: clamp(38px, 5.6vh, 72px) 0 0;
  font-size: clamp(43px, 4.2vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.052em;
  font-weight: 720;
}

.auth-showcase h1 span {
  color: #8ac9ff;
  background: linear-gradient(100deg, #a9dcff, #6db9ff 55%, #b4e0ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-lead {
  max-width: 490px;
  margin: 22px 0 0;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.65;
  color: rgba(219, 236, 252, 0.72);
}

.showcase-art {
  position: relative;
  width: min(440px, 82%);
  margin: clamp(28px, 5vh, 54px) auto clamp(18px, 3vh, 38px);
  flex: 0 1 auto;
}

.art-glow {
  position: absolute;
  inset: 12% 5% -10%;
  background: radial-gradient(ellipse at center, rgba(64, 168, 255, 0.36), transparent 66%);
  filter: blur(30px);
}

.fake-chat {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  color: #142132;
  background: #f6f9fd;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 34px 70px rgba(2, 14, 26, 0.42), 0 6px 18px rgba(2, 14, 26, 0.22);
  transform: rotate(-1.4deg);
  animation: fake-chat-float 7s ease-in-out infinite;
}

@keyframes fake-chat-float {
  0%, 100% { transform: rotate(-1.4deg) translateY(0); }
  50% { transform: rotate(-0.7deg) translateY(-7px); }
}

.fake-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #e8eef5;
  backdrop-filter: blur(10px);
}

.fake-avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  background: linear-gradient(145deg, #f0a85c, #e37775);
}

.fake-chat-person {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.fake-chat-person strong {
  font-size: 13px;
  font-weight: 650;
}

.fake-chat-person span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #74859a;
}

.fake-chat-person i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22b07d;
  box-shadow: 0 0 0 2px rgba(34, 176, 125, 0.13);
}

.fake-head-dots {
  display: flex;
  gap: 3px;
}

.fake-head-dots i {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: #9ba9b9;
}

.fake-chat-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 14px 13px;
  background-image: radial-gradient(rgba(50, 104, 161, 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
}

.fake-day {
  align-self: center;
  margin-bottom: 3px;
  padding: 4px 10px;
  font-size: 9px;
  color: #8190a1;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(218, 228, 238, 0.8);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.fake-bubble {
  max-width: 79%;
  padding: 9px 12px;
  font-size: 11px;
  line-height: 1.45;
  border-radius: 13px;
}

.fake-in {
  align-self: flex-start;
  background: #fff;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 7px rgba(28, 60, 95, 0.05);
}

.fake-out {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(140deg, #4fa9ff, #2f8df5);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(47, 141, 245, 0.2);
}

.fake-photo {
  position: relative;
  align-self: flex-start;
  width: 67%;
  height: 138px;
  overflow: hidden;
  border-radius: 13px;
  border-bottom-left-radius: 4px;
  background: #f9c58f;
  box-shadow: 0 3px 10px rgba(39, 71, 112, 0.1);
}

.fake-photo-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #7da9d8 0%, #deb7b2 46%, #f4c38c 74%, #e89c63 100%);
}

.fake-photo-sun {
  position: absolute;
  width: 48px;
  height: 48px;
  right: 23%;
  top: 27%;
  border-radius: 50%;
  background: #ffe3b3;
  box-shadow: 0 0 36px 14px rgba(255, 221, 168, 0.7);
}

.fake-photo-hill {
  position: absolute;
  bottom: -30%;
  width: 115%;
  height: 80%;
  border-radius: 45% 55% 0 0;
}

.fake-hill-1 {
  left: -35%;
  bottom: -42%;
  background: #5e6b75;
  transform: rotate(8deg);
}

.fake-hill-2 {
  right: -40%;
  bottom: -52%;
  background: #394952;
  transform: rotate(-7deg);
}

.fake-photo-time {
  position: absolute;
  right: 6px;
  bottom: 5px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 5px;
  font-size: 8px;
  color: #fff;
  background: rgba(9, 20, 30, 0.35);
  border-radius: 7px;
  backdrop-filter: blur(4px);
}

.fake-check {
  width: 10px;
  height: 10px;
  stroke-width: 2.4;
}

.fake-typing {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 11px 13px;
}

.fake-typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #99a7b7;
  animation: fake-typing 1.3s ease-in-out infinite;
}

.fake-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.fake-typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes fake-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.fake-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px 9px 13px;
  font-size: 10px;
  color: #9aa8b8;
  background: #fff;
  border-top: 1px solid #ebf0f6;
}

.fake-input b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  border-radius: 50%;
  background: #2f8df5;
}

.fake-input svg {
  width: 13px;
  height: 13px;
}

.art-float {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  color: #26384b;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 13px;
  box-shadow: 0 16px 32px rgba(2, 16, 30, 0.28);
  backdrop-filter: blur(12px);
  animation: float-card 6s ease-in-out infinite;
}

.art-float div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.art-float strong {
  font-size: 10px;
  font-weight: 650;
}

.art-float span {
  font-size: 8.5px;
  color: #778899;
}

.art-float-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  color: #2f8df5;
  background: #e7f2ff;
}

.art-float-icon svg {
  width: 14px;
  height: 14px;
}

.art-float-photo {
  right: -60px;
  top: 42%;
  animation-delay: -1.5s;
}

.art-float-shield {
  left: -54px;
  bottom: 11%;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.showcase-features {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0;
  margin: auto 0 0;
  list-style: none;
}

.showcase-features li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(221, 239, 255, 0.7);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.showcase-features svg {
  width: 14px;
  height: 14px;
  color: #86c8ff;
  stroke-width: 2;
}

/* Form panel */
.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 54px clamp(28px, 5vw, 82px) 30px;
}

.auth-mobile-brand {
  display: none;
}

.auth-card {
  width: min(100%, 446px);
  padding: clamp(26px, 3vw, 38px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  animation: auth-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 15%, transparent);
}

.auth-card-head h2 {
  margin: 12px 0 7px;
  font-size: clamp(27px, 2.4vw, 33px);
  line-height: 1.16;
  letter-spacing: -0.04em;
  font-weight: 720;
}

.auth-card-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 26px 0 22px;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.auth-tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 5px);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(20, 45, 77, 0.07);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-tabs[data-active="register"] .auth-tab-indicator {
  transform: translateX(calc(100% + 1px));
}

:root[data-theme="dark"] .auth-tab-indicator {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.auth-tab {
  position: relative;
  z-index: 1;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 9px;
  transition: color 0.18s ease;
}

.auth-tab.is-active {
  color: var(--text);
}

.auth-tab:hover:not(.is-active) {
  color: var(--text-soft);
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 16px;
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #b42328;
  background: #fff1f1;
  border: 1px solid #ffd4d4;
  border-radius: 11px;
  animation: alert-in 0.2s ease both;
}

:root[data-theme="dark"] .auth-alert {
  color: #ffb3b4;
  background: rgba(229, 72, 77, 0.11);
  border-color: rgba(255, 107, 111, 0.25);
}

.auth-alert[hidden] {
  display: none;
}

.auth-alert svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex: 0 0 auto;
}

@keyframes alert-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.field-box {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field-box:focus-within {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 13%, transparent);
}

.field.is-invalid .field-box {
  border-color: var(--danger);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--danger) 10%, transparent);
}

.field-box input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  color: var(--text);
  font-size: 14px;
  background: transparent;
  border: 0;
  border-radius: inherit;
}

.field-box input::placeholder {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}

.field-box input:focus {
  outline: none;
}

.field-icon {
  width: 18px;
  height: 18px;
  margin-left: 14px;
  color: var(--muted);
  stroke-width: 1.8;
}

.field-box:focus-within .field-icon {
  color: var(--accent);
}

.field-prefix {
  display: grid;
  place-items: center;
  width: 43px;
  height: 24px;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-right: 1px solid var(--line);
}

.field-box:focus-within .field-prefix {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.field-action {
  display: grid;
  place-items: center;
  width: 42px;
  height: 44px;
  flex: 0 0 auto;
  color: var(--muted);
  border-radius: 10px;
  transition: color 0.18s ease;
}

.field-action:hover {
  color: var(--text);
}

.field-action svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.field-hint {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.auth-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 51px;
  margin-top: 2px;
  padding: 7px 8px 7px 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  background: linear-gradient(135deg, #42a2fc 0%, #2f8df5 48%, #247ee8 100%) !important;
  border-radius: 13px;
  box-shadow: 0 12px 26px rgba(39, 127, 232, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.16) 48%, transparent 65%);
  transform: translateX(-110%);
  transition: transform 0.65s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(39, 127, 232, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  filter: saturate(1.05);
}

.auth-submit:hover::before {
  transform: translateX(110%);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  cursor: wait;
  filter: saturate(0.8);
}

.auth-submit-label {
  position: relative;
  z-index: 1;
}

.auth-submit-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
}

.auth-submit-icon svg {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
  stroke-width: 2.1;
}

.auth-spinner {
  display: none;
  position: absolute;
  right: 19px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-submit.is-loading .auth-submit-icon {
  opacity: 0;
}

.auth-submit.is-loading .auth-spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-switch-copy {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.link-button {
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  color: var(--accent);
  background: none !important;
}

.link-button:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-footer {
  margin: 20px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
}

.auth-footer span {
  margin: 0 4px;
  opacity: 0.5;
}

.auth-download {
  display: inline-block;
  margin-top: 5px;
  color: var(--accent);
  font-weight: 550;
  text-decoration: none;
}

.auth-download:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1180px) {
  .auth-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(450px, 1.05fr);
  }

  .showcase-art {
    width: min(390px, 86%);
  }

  .art-float-photo { right: -30px; }
  .art-float-shield { left: -26px; }

  .auth-showcase h1 {
    font-size: clamp(38px, 4.4vw, 58px);
  }
}

@media (max-width: 980px) {
  .auth-layout {
    display: block;
    min-height: 100dvh;
  }

  .auth-showcase {
    display: none;
  }

  .auth-panel {
    min-height: 100dvh;
    padding: 82px 22px 26px;
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 26px;
  }

  .auth-mobile-brand img {
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(27, 94, 175, 0.24);
  }

  .auth-mobile-brand div {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .auth-mobile-brand strong {
    font-size: 19px;
    letter-spacing: -0.03em;
  }

  .auth-mobile-brand span {
    font-size: 11px;
    color: var(--muted);
  }

  .auth-topbar {
    top: max(18px, env(safe-area-inset-top));
    right: max(20px, env(safe-area-inset-right));
  }

  .auth-card {
    border-radius: 24px;
  }
}

@media (max-width: 520px) {
  .auth-panel {
    justify-content: flex-start;
    padding: 74px 12px 20px;
  }

  .auth-mobile-brand {
    margin: 0 8px 16px;
  }

  .auth-card {
    width: 100%;
    padding: 24px 18px;
    border-radius: 21px;
    box-shadow: 0 16px 42px rgba(34, 67, 112, 0.1);
  }

  .auth-card-head h2 {
    font-size: 27px;
  }

  .auth-card-head p {
    font-size: 13px;
  }

  .auth-tabs {
    margin: 22px 0 19px;
  }

  .field-pair {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .auth-submit {
    min-height: 50px;
  }

  .auth-footer {
    margin-top: 16px;
  }

  .auth-theme-button {
    width: 38px;
    height: 38px;
  }
}

@media (max-height: 780px) and (min-width: 981px) {
  .showcase-inner {
    padding-top: 34px;
  }

  .auth-showcase h1 {
    margin-top: 30px;
    font-size: clamp(38px, 3.8vw, 54px);
  }

  .showcase-lead {
    margin-top: 15px;
    font-size: 14px;
  }

  .showcase-art {
    width: min(370px, 72%);
    margin-top: 22px;
    margin-bottom: 16px;
  }

  .fake-chat-body {
    gap: 6px;
    padding: 11px 12px;
  }

  .fake-photo {
    height: 108px;
  }

  .fake-chat {
    transform: rotate(-1.4deg) scale(0.94);
  }

  .auth-card {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .auth-tabs {
    margin: 20px 0 18px;
  }

  .auth-form {
    gap: 13px;
  }

  .field-pair {
    gap: 10px;
  }
}
