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

:root {
  --auth-bg: #edf3fb;
  --auth-panel: rgba(255, 255, 255, 0.88);
  --auth-panel-strong: #ffffff;
  --auth-border: rgba(148, 163, 184, 0.25);
  --auth-text: #0f172a;
  --auth-muted: #5b6b82;
  --auth-primary: #2563eb;
  --auth-primary-dark: #1d4ed8;
  --auth-primary-soft: rgba(37, 99, 235, 0.12);
  --auth-shadow: 0 30px 80px rgba(15, 23, 42, 0.14);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--app-font, "Plus Jakarta Sans", "Segoe UI", sans-serif);
  color: var(--auth-text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 22%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.1), transparent 24%),
    linear-gradient(180deg, #f2f4f8 0%, #e8edf5 100%);
}

.auth-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  padding: 26px 20px;
  display: grid;
  align-items: center;
}

.auth-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
  gap: 20px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
}

.auth-panel {
  padding: 22px 24px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
}

.auth-panel__brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
}

.auth-panel__brand-logo {
  display: block;
  width: 260px;
  height: 260px;
  object-fit: contain;
  flex-shrink: 0;
}

.auth-panel__brand-title {
  font-family: "Space Grotesk", var(--app-font, "Plus Jakarta Sans", "Segoe UI", sans-serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.auth-panel__brand-tagline {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.84rem;
}

.auth-showcase {
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(160deg, #3d3bf1 0%, #4238f4 48%, #2f36df 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.auth-showcase::before,
.auth-showcase::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-showcase::before {
  width: 280px;
  height: 280px;
  top: -90px;
  right: -70px;
}

.auth-showcase::after {
  width: 220px;
  height: 220px;
  bottom: -90px;
  left: -70px;
}

.auth-showcase__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  min-height: 100%;
}

.auth-showcase__eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.auth-showcase h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.1rem, 3vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.auth-showcase__copy {
  max-width: 44ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.auth-showcase__preview {
  margin-top: 8px;
}

.auth-preview-dashboard {
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
  color: var(--auth-text);
}

.auth-preview-dashboard__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-preview-dashboard__top strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--auth-text);
}

.auth-preview-dashboard__eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--auth-primary-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-preview-dashboard__badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--auth-primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-preview-dashboard__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.auth-mini-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--auth-text);
}

.auth-mini-stat--primary {
  background: linear-gradient(145deg, var(--auth-primary), var(--auth-primary-dark));
  color: #ffffff;
}

.auth-mini-stat span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
  color: var(--auth-muted);
}

.auth-mini-stat strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--auth-text);
}

.auth-mini-stat--primary span,
.auth-mini-stat--primary strong {
  color: #ffffff;
}

.auth-preview-dashboard__activity {
  display: grid;
  gap: 8px;
}

.auth-preview-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.88rem;
  color: var(--auth-text);
}

.auth-preview-row span:first-child {
  color: color-mix(in srgb, var(--auth-text) 76%, white 24%);
}

.auth-preview-row span:nth-child(2) {
  color: var(--auth-muted);
}

.auth-preview-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-preview-status--sent {
  background: rgba(37, 99, 235, 0.12);
  color: var(--auth-primary-dark);
}

.auth-preview-status--paid {
  background: rgba(21, 128, 61, 0.12);
  color: #157347;
}

.auth-preview-status--overdue {
  background: rgba(220, 38, 38, 0.12);
  color: #b42318;
}

.auth-panel {
  backdrop-filter: blur(18px);
}

.auth-panel__top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.auth-eyebrow {
  margin: 0 0 8px;
  color: var(--auth-primary-dark);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-panel h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.auth-subtitle {
  margin: 12px 0 22px;
  color: var(--auth-muted);
  line-height: 1.65;
}

.auth-mode-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  margin: 0 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  white-space: nowrap;
}

.auth-mode-btn {
  border: none;
  background: transparent;
  color: var(--auth-muted);
  padding: 10px 20px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.auth-mode-btn.is-active {
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

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

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

.auth-field label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--auth-muted);
}

.auth-field input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--auth-panel-strong);
  color: var(--auth-text);
  border-radius: 15px;
  padding: 14px 15px;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.auth-field--confirm.is-hidden {
  display: none;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-muted);
  font-size: 0.94rem;
  cursor: pointer;
}

.auth-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--auth-primary);
}

.auth-feedback {
  min-height: 22px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--auth-muted);
}

.auth-feedback.is-error {
  color: #b42318;
}

.auth-feedback.is-success {
  color: #157347;
}

.auth-submit {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.auth-submit:disabled {
  opacity: 0.68;
  cursor: wait;
  transform: none;
}

.auth-footer {
  margin: 20px 0 0;
  color: var(--auth-muted);
  font-size: 0.95rem;
}

.auth-inline-btn {
  border: none;
  background: transparent;
  color: var(--auth-primary-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.auth-inline-btn:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .auth-shell {
    padding: 20px 16px 26px;
  }

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

  .auth-showcase h1 {
    max-width: none;
  }

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

  .auth-preview-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .auth-frame {
    padding: 10px;
    border-radius: 22px;
  }

  .auth-panel,
  .auth-showcase {
    padding: 16px;
    border-radius: 20px;
  }

  .auth-mode-switch {
    width: 100%;
  }

  .auth-mode-btn {
    width: 100%;
    white-space: nowrap;
  }

  .auth-panel__brand {
    margin-bottom: 24px;
  }

  .auth-panel__brand-logo {
    width: 120px;
    height: 120px;
  }
}
