/* ============================================================
   AUTOKOMENTAR — Auth Pages Premium Design System v2.0
   Accessible Light Theme with high-contrast elements
   ============================================================ */

:root {
  --c-bg-light: #f8fafc;
  --c-bg-glow: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
               radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 45%);
  --c-surface: #ffffff;
  --c-ink: #0f172a;        /* Deep slate/black for absolute maximum legibility */
  --c-muted: #475569;      /* Accessible gray/slate (WCAG AA 4.5:1 compliant) */
  --c-primary: #1e40af;    /* Darker, higher-contrast royal blue for accessible links */
  --c-violet: #6d28d9;     /* Deep rich violet */
  --c-line: #94a3b8;       /* Visible Slate-300 border for input fields */
  --c-line-focus: #1d4ed8;
  --grad-main: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
  --ease-out: cubic-bezier(.2,.8,.2,1);
}

body.auth-saas {
  min-height: 100vh;
  margin: 0;
  color: var(--c-ink);
  background-color: var(--c-bg-light);
  font-family: 'Geist Variable', system-ui, -apple-system, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-saas .auth-wrap {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background-color: var(--c-bg-light);
  background-image: var(--c-bg-glow);
  background-attachment: fixed;
  overflow: hidden;
}

/* Floating ambient blobs (very soft and elegant light-theme background elements) */
.auth-saas .auth-wrap::before,
.auth-saas .auth-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}
.auth-saas .auth-wrap::before {
  width: 320px;
  height: 320px;
  top: -80px;
  left: -40px;
  background: rgba(99, 102, 241, 0.16);
}
.auth-saas .auth-wrap::after {
  width: 420px;
  height: 420px;
  bottom: -120px;
  right: -60px;
  background: rgba(168, 85, 247, 0.12);
}

/* Solid White Auth Card (High contrast against subtle light background) */
.auth-saas .auth-card {
  width: min(100%, 460px);
  padding: 44px 40px;
  border: 1px solid #cbd5e1;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  animation: cardFadeIn 0.5s var(--ease-out);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Brand Logo */
.auth-saas .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--c-ink) !important;
  text-decoration: none;
  margin-bottom: 24px;
  justify-content: center;
}
.auth-saas .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.16);
}
.auth-saas .logo em {
  font-style: normal;
  color: var(--c-violet);
  font-weight: 800;
}

/* Form Headings */
.auth-saas .auth-card h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--c-ink);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  text-align: center;
}
.auth-saas .auth-card > p {
  color: var(--c-muted);
  font-size: 14.5px;
  font-weight: 500;
  margin: 0 0 28px;
  text-align: center;
  line-height: 1.5;
}

/* Form elements */
.auth-saas .fgroup {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-saas .fgroup label {
  color: var(--c-ink);
  font-weight: 700;
  font-size: 14px;
}
.auth-saas .inp {
  min-height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--c-line);
  border-radius: 12px;
  font-size: 15px;
  color: var(--c-ink);
  background: #ffffff;
  transition: all 0.2s var(--ease-out);
}
.auth-saas .inp::placeholder {
  color: #64748b; /* Distinct and high-contrast placeholder */
}
.auth-saas .inp:focus {
  outline: none;
  border-color: var(--c-line-focus);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

/* Primary Button */
.auth-saas .btn-primary {
  min-height: 50px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  background: var(--grad-main);
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.25);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.auth-saas .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.35);
  opacity: 0.98;
}
.auth-saas .btn-primary:active {
  transform: translateY(0);
}
.auth-saas .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Error messages */
.auth-saas .form-err {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  background: #fef2f2;
  color: #991b1b;
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 20px;
  line-height: 1.5;
  animation: errorShake 0.4s ease-in-out;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Alternative action & Back links */
.auth-saas .auth-alt {
  font-size: 14px;
  color: var(--c-muted);
  text-align: center;
  margin: 20px 0 12px;
}
.auth-saas .auth-alt a {
  color: var(--c-primary);
  font-weight: 800;
  text-decoration: none;
}
.auth-saas .auth-alt a:hover {
  text-decoration: underline;
}
.auth-saas .auth-back {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-muted);
  text-align: center;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
}
.auth-saas .auth-back:hover {
  color: var(--c-primary);
  text-decoration: underline;
}

/* Responsive adjustments */
@media(max-width: 520px) {
  .auth-saas .auth-wrap {
    padding: 20px 12px;
  }
  .auth-saas .auth-card {
    padding: 32px 24px;
    border-radius: 20px;
  }
  .auth-saas .auth-card h1 {
    font-size: 22px;
  }
}

@media(prefers-reduced-motion: reduce) {
  .auth-saas * {
    transition: none !important;
    animation: none !important;
  }
}
