/* Auth UI - compact, soft, smooth */
:root {
  --auth-maxw: 520px;
  --auth-text: #0f172a;
  --auth-muted: #64748b;
  --auth-border: #dbe3ef;
  --auth-bg: #eef3fb;
  --auth-input-bg: #f5f8fd;
  --auth-primary: #0b1736;
  --auth-primary-soft: #1e2d56;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: 'Manrope', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--auth-text);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  background: radial-gradient(circle at 20% 15%, rgba(96, 165, 250, 0.12), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(99, 102, 241, 0.1), transparent 32%), var(--auth-bg);
}

.auth-container {
  width: 100%;
  max-width: var(--auth-maxw);
}

.auth-card {
  border: 1px solid var(--auth-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  animation: authFadeIn 0.45s ease;
}

.auth-form {
  padding: 18px;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 10px;
}

.auth-logo-link {
  display: inline-flex;
  text-decoration: none;
  margin-bottom: 6px;
}

.auth-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0b1736, #1f325f);
  color: #fff;
  box-shadow: 0 6px 16px rgba(11, 23, 54, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-logo:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 18px rgba(11, 23, 54, 0.3);
}

.auth-title {
  margin: 2px 0 4px;
  font-size: clamp(24px, 3.1vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #0b1736;
}

.auth-subtitle {
  margin: 0;
  color: var(--auth-muted);
  font-size: 13px;
}

.form-group {
  margin-bottom: 10px;
}

.form-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0b1736;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  padding: 0 14px 0 40px;
  background: var(--auth-input-bg);
  color: var(--auth-text);
  font-size: 14px;
  line-height: 1;
  transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-input::placeholder {
  color: #94a3b8;
  font-size: 14px;
}

.form-input:focus {
  outline: none;
  border-color: #b2c3de;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(66, 103, 178, 0.1);
  transform: translateY(-1px);
}

select.form-input {
  font-size: 14px;
  color: #0b1736;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ba9be;
  font-size: 14px;
  transition: color 0.2s ease;
}

.input-wrapper:focus-within .input-icon {
  color: #6d86b1;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #95a4bc;
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

.form-options {
  margin: 4px 2px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.checkbox-wrapper,
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-muted);
  font-size: 13px;
}

.checkbox-wrapper input[type='checkbox'],
.checkbox input[type='checkbox'] {
  width: 15px;
  height: 15px;
  accent-color: #0b1736;
}

.form-link,
.link {
  color: #1e2d56;
  font-weight: 800;
  text-decoration: none;
  font-size: 13px;
}

.form-link:hover,
.link:hover {
  text-decoration: underline;
}

.auth-status {
  display: none;
  margin: 8px 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 9px 10px;
  font-size: 13px;
  line-height: 1.35;
  animation: authFadeIn 0.2s ease;
}

.auth-status.is-visible {
  display: block;
}

.auth-status.is-success {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

.auth-status.is-error {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.32);
}

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

.btn-auth,
.auth-form .btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary,
.auth-form .btn--primary {
  background: linear-gradient(150deg, var(--auth-primary), var(--auth-primary-soft));
  border-color: var(--auth-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 23, 54, 0.24);
}

.btn-primary:hover,
.auth-form .btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(11, 23, 54, 0.3);
}

.btn-primary:active,
.auth-form .btn--primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: #fff;
  color: #0b1736;
  border-color: var(--auth-border);
}

.btn-outline:hover {
  background: #f8fbff;
  border-color: #c6d3e8;
}

.auth-footer {
  margin-top: 10px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-footer a {
  color: #0b1736;
  font-weight: 800;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .auth-page {
    padding: 12px;
  }

  .auth-form {
    padding: 14px 12px;
  }

  .auth-title {
    font-size: 27px;
  }

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