/* Shared login/register screens. */
#body-wrapper {
  min-height: 100vh;
  padding-bottom: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(24, 84, 164, 0.18), transparent 28rem),
    radial-gradient(circle at 72% 0%, rgba(24, 84, 164, 0.14), transparent 34rem),
    linear-gradient(180deg, #070d15 0%, #03070d 100%);
}

#content-wrapper {
  margin-top: 0;
  padding: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 30%, rgba(24, 84, 164, 0.18), transparent 28rem),
    radial-gradient(circle at 72% 0%, rgba(24, 84, 164, 0.14), transparent 34rem),
    linear-gradient(180deg, #070d15 0%, #03070d 100%);
}

#content,
.page {
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(20rem, 0.95fr) minmax(24rem, 1.05fr);
  min-height: 100vh;
  color: #f5f7fb;
}

.auth-visual {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: clamp(2rem, 6vw, 5.5rem);
  overflow: hidden;
  border-right: 1px solid rgba(130, 160, 195, 0.2);
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 60% 58%, rgba(0, 99, 255, 0.26), transparent 22rem),
    linear-gradient(90deg, rgba(5, 12, 22, 0.96), rgba(7, 15, 28, 0.78)),
    repeating-radial-gradient(circle at 78% 32%, rgba(39, 118, 255, 0.23) 0 1px, transparent 1px 12px);
}

.auth-visual::after {
  content: "";
  position: absolute;
  right: -10rem;
  bottom: 14%;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(35, 114, 255, 0.45);
  border-radius: 50%;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  max-width: 30rem;
}

.auth-visual-logo {
  width: 8.7rem;
  margin-bottom: 2.5rem;
}

.auth-visual h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

.auth-shell-register .auth-visual h1 {
  max-width: 32rem;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

.auth-visual h1 span {
  display: block;
  color: #1684ff;
}

.auth-visual p {
  max-width: 24rem;
  margin: 1.4rem 0 0;
  color: #b4bece;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.45;
}

.auth-banner-placeholder {
  display: grid;
  place-items: center;
  width: min(100%, 25rem);
  min-height: 14rem;
  margin-top: 2rem;
  border: 1px dashed rgba(110, 155, 220, 0.35);
  border-radius: 8px;
  background: rgba(10, 22, 38, 0.42);
  color: rgba(190, 205, 226, 0.58);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.auth-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.auth-card {
  width: min(100%, 32rem);
  border: 1px solid rgba(160, 180, 205, 0.24);
  border-radius: 8px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background:
    linear-gradient(180deg, rgba(17, 27, 41, 0.78), rgba(7, 13, 22, 0.88));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.auth-heading {
  margin-bottom: 1.35rem;
  text-align: center;
}

.auth-heading h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
}

.auth-heading p {
  margin: 0.5rem 0 0;
  color: #aeb8c8;
  font-size: 0.98rem;
}

.auth-form {
  display: grid;
  gap: 0.95rem;
}

.auth-field,
.auth-fieldset {
  display: grid;
  gap: 0.5rem;
}

.auth-fieldset {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-label {
  margin: 0;
  color: #f6f8fb;
  font-size: 0.98rem;
  font-weight: 600;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  top: 50%;
  left: 1.15rem;
  color: #a9b4c6;
  font-size: 1.25rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 3.15rem;
  border: 1px solid rgba(155, 175, 202, 0.34);
  border-radius: 8px;
  padding: 0 1rem 0 3.85rem;
  background: rgba(9, 17, 29, 0.58);
  color: #f6f8fb;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-shell-register .auth-card {
  width: min(100%, 31rem);
  padding: clamp(1.15rem, 2.4vw, 1.65rem);
}

.auth-shell-register .auth-heading {
  margin-bottom: 1rem;
}

.auth-shell-register .auth-heading h1 {
  font-size: clamp(1.45rem, 2.6vw, 1.75rem);
}

.auth-shell-register .auth-heading p {
  margin-top: 0.35rem;
  font-size: 0.92rem;
}

.auth-shell-register .auth-form {
  gap: 0.65rem;
}

.auth-shell-register .auth-field,
.auth-shell-register .auth-fieldset {
  gap: 0.35rem;
}

.auth-shell-register .auth-label {
  font-size: 0.88rem;
}

.auth-shell-register .auth-input {
  height: 2.7rem;
  padding-left: 3.25rem;
  font-size: 0.94rem;
}

.auth-shell-register .auth-input-icon {
  left: 0.95rem;
  font-size: 1.08rem;
}

.auth-shell-register .auth-submit,
.auth-shell-register .auth-google {
  min-height: 2.8rem;
  font-size: 0.96rem;
}

.auth-shell-register .auth-alt-link {
  margin-top: 0;
  font-size: 0.94rem;
}

.auth-input::placeholder {
  color: #7f899a;
}

.auth-input:focus {
  border-color: #1778ff;
  background: rgba(10, 20, 34, 0.82);
  box-shadow: 0 0 0 0.18rem rgba(23, 120, 255, 0.18);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: -0.15rem;
  color: #f6f8fb;
}

.auth-options a,
.auth-alt-link a {
  color: #1987ff;
  text-decoration: none;
}

.auth-options a:hover,
.auth-alt-link a:hover {
  color: #56a7ff;
  text-decoration: none;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  cursor: pointer;
}

.auth-check input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #0876f8;
}

.auth-submit,
.auth-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.15rem;
  border-radius: 8px;
  font-size: 1.02rem;
  font-weight: 700;
}

.auth-submit {
  border: 1px solid rgba(49, 132, 255, 0.8);
  background: linear-gradient(180deg, #0d7cff 0%, #045cda 100%);
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}

.auth-submit:hover {
  box-shadow: 0 14px 28px rgba(2, 93, 222, 0.3);
  transform: translateY(-1px);
}

.auth-separator {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  color: #9da8b8;
}

.auth-separator::before,
.auth-separator::after {
  content: "";
  height: 1px;
  background: rgba(160, 180, 205, 0.18);
}

.auth-google {
  gap: 0.85rem;
  border: 1px solid rgba(155, 175, 202, 0.28);
  background: rgba(9, 17, 29, 0.44);
  color: #f6f8fb;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.auth-google:hover {
  border-color: rgba(155, 175, 202, 0.48);
  background: rgba(14, 25, 42, 0.72);
  color: #fff;
  text-decoration: none;
}

.auth-google i {
  color: #fff;
  font-size: 1.45rem;
}

.auth-alt-link {
  margin: 0.25rem 0 0;
  color: #aeb8c8;
  text-align: center;
  font-size: 1.02rem;
}

[data-theme="light"] #body-wrapper,
[data-theme="light"] #content-wrapper {
  background:
    radial-gradient(circle at 18% 30%, rgba(24, 84, 164, 0.12), transparent 28rem),
    radial-gradient(circle at 72% 0%, rgba(24, 84, 164, 0.1), transparent 34rem),
    linear-gradient(180deg, #f6f9fd 0%, #eaf1f9 100%);
}

[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(31, 41, 55, 0.12);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
}

[data-theme="light"] .auth-heading h1,
[data-theme="light"] .auth-label,
[data-theme="light"] .auth-options {
  color: #0f172a;
}

[data-theme="light"] .auth-heading p,
[data-theme="light"] .auth-alt-link,
[data-theme="light"] .auth-separator {
  color: #64748b;
}

[data-theme="light"] .auth-input,
[data-theme="light"] .auth-google {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .auth-input::placeholder {
  color: #94a3b8;
}

[data-theme="light"] .auth-google:hover {
  background: #f8fafc;
  color: #0f172a;
}

[data-theme="light"] .auth-google i {
  color: #1854A4;
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: auto;
    padding: 2rem 1.25rem;
    border-right: 0;
    border-bottom: 1px solid rgba(130, 160, 195, 0.2);
  }

  .auth-banner-placeholder {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding: 1.25rem;
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 1.25rem;
  }

  .auth-fieldset {
    grid-template-columns: 1fr;
  }

  .auth-options {
    align-items: flex-start;
    flex-direction: column;
  }
}
