:root {
  --auth-ink: #0f172a;
  --auth-panel: #ffffff;
  --auth-light: #f8fafc;
  --auth-line: #d6dde8;
  --auth-muted: #546176;
  --auth-accent: #0891b2;
  --auth-accent-dark: #0e7490;
  --auth-purple: #b353ef;
}

@supports (color: oklch(71% 0.2 305.5 / 1)) {
  :root {
    --auth-purple: oklch(71% 0.2 305.5 / 1);
  }
}

* {
  box-sizing: border-box;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Source Sans 3", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--auth-ink);
  background: linear-gradient(115deg, #eef3f8 0%, #f7fafd 48%, #eaf0f8 100%);
  padding: 24px;
}

.auth-shell {
  width: min(980px, 100%);
  min-height: 560px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #d8e0ee;
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
  display: grid;
  grid-template-columns: 40% 60%;
  background: var(--auth-panel);
}

.auth-left {
  padding: 38px 30px;
  background: linear-gradient(160deg, #0f172a 0%, #132544 60%, #1f3760 100%);
  color: #ecf4ff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.auth-left::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  right: -120px;
  bottom: -130px;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.55) 0%, rgba(8, 145, 178, 0) 70%);
}

.product-panel {
  border: 1px solid rgba(174, 202, 234, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 18px 16px;
  backdrop-filter: blur(2px);
  max-width: 320px;
  align-self: flex-start;
}

.product-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, #22d3ee 0%, #0e7490 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.35);
  position: relative;
}

.product-logo::before {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 10px;
  width: 6px;
  height: 14px;
  border-radius: 4px 4px 2px 2px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 10px -4px 0 rgba(255, 255, 255, 0.95), 20px -10px 0 rgba(255, 255, 255, 0.95);
}

.product-title {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #ffffff;
}

.product-title .conta {
  color: var(--auth-purple);
}

.product-subtitle {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: #c7d8ee;
  line-height: 1.35;
}

.auth-headline {
  margin-top: auto;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.2;
  max-width: 12ch;
}

.auth-copy {
  margin-top: 16px;
  max-width: 30ch;
  font-size: 1rem;
  line-height: 1.45;
  color: #c9d8ee;
  margin-bottom: auto;
}

.brand-footer {
  margin-top: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 1;
  padding-top: 18px;
}

.brand-copy {
  text-align: left;
  line-height: 1.1;
}

.brand-copy .brand-link {
  color: #c7d9ef;
  text-decoration: none;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.8rem;
}

.brand-copy .brand-link:hover {
  text-decoration: underline;
}

.auth-right {
  background: var(--auth-light);
  display: grid;
  place-items: center;
  padding: 30px;
}

.auth-card {
  width: min(430px, 100%);
  background: var(--auth-panel);
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  padding: 24px;
}

.auth-card h1 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.42rem;
}

.auth-subtitle {
  margin: 8px 0 18px;
  color: var(--auth-muted);
}

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

.auth-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  padding: 0 11px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field:focus-within {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.16);
}

.field .icon {
  font-size: 0.92rem;
  color: #6f7e95;
  width: 16px;
  text-align: center;
}

.field input {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 11px 0;
  font: inherit;
}

.field input:focus {
  outline: none;
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--auth-ink);
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  box-shadow: 0 0 0 1000px #ffffff inset;
  caret-color: var(--auth-ink);
  transition: background-color 9999s ease-in-out 0s;
}

.auth-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
  font-size: 0.9rem;
  gap: 10px;
}

.auth-actions a,
.auth-link {
  color: var(--auth-accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.auth-actions a:hover,
.auth-link:hover {
  text-decoration: underline;
}

.btn-auth {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--auth-accent);
  cursor: pointer;
  transition: background 0.18s ease;
}

.btn-auth:hover {
  background: var(--auth-accent-dark);
}

.status-box {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #0c4a6e;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 10px;
  border-radius: 8px;
}

.status-box.success {
  color: #14532d;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.status-box.danger {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #fecaca;
}

.help-error {
  display: none;
  color: #c0392b;
  font-size: 0.82rem;
}

#wrong-msg {
  display: none;
}

#cod-msg {
  display: none;
}

@media (max-width: 860px) {
  body.auth-page {
    padding: 16px;
    display: block;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-left {
    padding: 28px 22px;
    justify-content: flex-start;
  }

  .product-panel,
  .auth-headline,
  .auth-copy {
    max-width: none;
  }

  .auth-headline {
    font-size: 1.5rem;
    margin-top: 18px;
  }

  .brand-footer {
    margin-top: 18px;
    align-self: flex-start;
    padding-top: 0;
  }

  .auth-right {
    padding: 20px;
  }

  .auth-card {
    padding: 20px;
  }
}
