:root {
  --primary: #3C8DBC;
  --primary-dark: #2C6E96;
  --primary-soft: #EAF3F8;
  --ink: #1E2A32;
  --slate: #7C8B96;
  --slate-light: #B3C0C9;
  --line: #E4EBF0;
  --white: #FFFFFF;
  --danger: #D9534F;
  --danger-bg: #FDF2F2;
  --danger-border: #F5C6CB;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body.auth-page {
  background: var(--white);
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.rings {
  position: absolute;
  top: -180px;
  right: -180px;
  width: 520px;
  height: 520px;
  pointer-events: none;
}

.rings svg { width: 100%; height: 100%; }

.rings-bl {
  position: absolute;
  bottom: -160px;
  left: -160px;
  width: 420px;
  height: 420px;
  pointer-events: none;
}

.rings-bl svg { width: 100%; height: 100%; }

.page {
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
}

.badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.4px;
  color: var(--primary);
  text-align: center;
  line-height: 1.2;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(30, 42, 50, 0.08);
  padding: 34px 32px;
}

.card h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.3px;
  text-align: center;
  color: var(--ink);
  margin-bottom: 26px;
}

.field { margin-bottom: 16px; }

.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(60, 141, 188, 0.13);
}

.field-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 13px 14px;
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  font-size: 14.5px;
  width: 100%;
}

.field-wrap input::placeholder { color: var(--slate-light); }

.field-wrap .icon {
  padding-left: 14px;
  color: var(--slate-light);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.field-wrap .icon svg { width: 17px; height: 17px; }

.field-wrap button.toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding-right: 14px;
  color: var(--slate-light);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.field-wrap button.toggle:hover { color: var(--primary); }

.field-wrap button.toggle svg { width: 18px; height: 18px; }

.actions {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 22px;
}

.actions-center {
  justify-content: center;
  margin: 18px 0 0;
}

a.link {
  font-size: 13px;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
}

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

button.submit {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button.submit:hover { background: var(--primary-dark); }
button.submit:active { transform: translateY(1px); }
button.submit svg { width: 16px; height: 16px; }

.auth-alert {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
  position: relative;
  line-height: 1.4;
}

.auth-alert .close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--danger);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
}

.auth-alert .close:hover { opacity: 1; }

@media (max-width: 480px) {
  .card { padding: 26px 22px; }
}
