:root {
  --bg: #f7f1e8;
  --panel: #ffffff;
  --panel-2: #fdf6ec;
  --text: #0f1b1a;
  --muted: #5b6b6a;
  --accent: #0b7e77;
  --accent-strong: #08655f;
  --accent-warm: #f2a23a;
  --border: rgba(15, 27, 26, 0.12);
  --shadow: 0 28px 60px rgba(15, 27, 26, 0.16);
  --shadow-soft: 0 16px 36px rgba(15, 27, 26, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

html[data-theme="dark"] {
  --bg: #0c1514;
  --panel: #121f1d;
  --panel-2: #0f1a19;
  --text: #f3f4f4;
  --muted: #95a3a2;
  --accent: #25a39b;
  --accent-strong: #1a8d86;
  --accent-warm: #f2a23a;
  --border: rgba(243, 244, 244, 0.12);
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 85% 10%, rgba(11, 126, 119, 0.2), transparent 45%),
    radial-gradient(circle at 10% 20%, rgba(242, 162, 58, 0.2), transparent 40%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
  background-attachment: fixed;
}

html[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 85% 10%, rgba(37, 163, 155, 0.14), transparent 55%),
    radial-gradient(circle at 12% 20%, rgba(242, 162, 58, 0.12), transparent 50%),
    linear-gradient(130deg, rgba(7, 12, 12, 0.45), rgba(7, 12, 12, 0));
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
  color: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  padding: 48px clamp(20px, 4vw, 64px);
}

.auth-aside {
  background: linear-gradient(140deg, rgba(11, 126, 119, 0.14), rgba(242, 162, 58, 0.1));
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.auth-aside::after {
  content: "";
  position: absolute;
  inset: 24% -10% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 126, 119, 0.35), transparent 70%);
  filter: blur(8px);
}

html[data-theme="dark"] .auth-aside {
  background: linear-gradient(140deg, rgba(37, 163, 155, 0.18), rgba(12, 20, 19, 0.88));
}

html[data-theme="dark"] .auth-aside::after {
  background: radial-gradient(circle, rgba(37, 163, 155, 0.24), transparent 70%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.auth-aside h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(28px, 3vw, 40px);
  margin: 0;
}

.auth-aside p {
  margin: 0;
  color: var(--muted);
}

.pill-list {
  display: grid;
  gap: 12px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .pill {
  background: rgba(18, 31, 29, 0.9);
}

.pill span {
  font-weight: 600;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(440px, 100%);
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: clamp(28px, 4vw, 36px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 24px;
}

.auth-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.auth-head h2 {
  margin: 8px 0 6px;
  font-size: 26px;
}

.auth-head p {
  margin: 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(11, 126, 119, 0.12);
  color: var(--accent-strong);
}

.theme-switch {
  position: relative;
  width: 72px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-switch:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.theme-switch .icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  z-index: 1;
  color: var(--muted);
  opacity: 0.55;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.theme-switch .switch-thumb {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}

html[data-theme="dark"] .theme-switch .switch-thumb {
  transform: translateX(32px);
}

html[data-theme="light"] .theme-switch .icon-sun,
html[data-theme="dark"] .theme-switch .icon-moon {
  color: var(--accent-strong);
  opacity: 1;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(242, 162, 58, 0.5);
  background: rgba(242, 162, 58, 0.12);
  color: var(--text);
  font-size: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 600;
  font-size: 14px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 126, 119, 0.18);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.form-row a {
  color: var(--accent-strong);
  font-weight: 600;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(11, 126, 119, 0.2);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
}

.auth-actions {
  display: grid;
  gap: 12px;
}

.auth-footer {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.auth-footer a {
  color: var(--accent-strong);
  font-weight: 600;
}

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

@media (max-width: 600px) {
  .auth-shell {
    padding: 24px 16px;
  }

  .auth-aside {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
