/**
 * SadiFlow — modern auth pages (login, register)
 */

.sf-auth-page {
  --auth-font: "Inter", var(--font-family-base);
  font-family: var(--auth-font);
}

.sf-auth-page .sf-main {
  padding: 0;
}

.sf-auth-page .sf-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(218, 220, 224, 0.8);
  box-shadow: none;
}

.sf-auth-page .sf-nav-primary,
.sf-auth-page .sf-nav-tools,
.sf-auth-page .sf-nav-search,
.sf-auth-page .sf-nav-actions,
.sf-auth-page .navbar-toggler,
.sf-auth-page .navbar-nav {
  display: none !important;
}

.sf-auth-page .sf-navbar .container-fluid {
  justify-content: center;
}

.sf-auth-flash {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.sf-auth-flash--success {
  background-color: rgba(26, 127, 55, 0.08);
  border: 1px solid rgba(26, 127, 55, 0.25);
  color: #1a7f37;
}

.sf-auth-flash--info {
  background-color: rgba(11, 87, 208, 0.08);
  border: 1px solid rgba(11, 87, 208, 0.25);
  color: #0b57d0;
}

.sf-auth-flash--warning {
  background-color: rgba(227, 116, 0, 0.08);
  border: 1px solid rgba(227, 116, 0, 0.25);
  color: #c26400;
}

.sf-auth-flash--danger,
.sf-auth-flash--error {
  background-color: rgba(197, 34, 31, 0.08);
  border: 1px solid rgba(197, 34, 31, 0.25);
  color: var(--color-accent-red);
}

.sf-auth-modern {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: calc(100vh - var(--navbar-height));
  width: 100%;
}

.sf-auth-modern__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
  color: #fff;
  background: linear-gradient(155deg, #0b57d0 0%, #0948ad 42%, #062e6f 100%);
  overflow: hidden;
}

.sf-auth-modern__brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14) 0, transparent 42%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.08) 0, transparent 35%),
    radial-gradient(circle at 70% 85%, rgba(255, 255, 255, 0.06) 0, transparent 40%);
  pointer-events: none;
}

.sf-auth-modern__brand-inner {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}

.sf-auth-modern__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.sf-auth-modern__headline {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.sf-auth-modern__lead {
  margin: 0 0 2rem;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.sf-auth-modern__features {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sf-auth-modern__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.sf-auth-modern__feature-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.sf-auth-modern__feature-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sf-auth-modern__feature strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.sf-auth-modern__feature > div span {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
}

.sf-auth-modern__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(circle at top right, rgba(11, 87, 208, 0.05) 0, transparent 28%),
    var(--color-background);
}

.sf-auth-modern__card {
  width: 100%;
  max-width: 26rem;
  padding: clamp(1.75rem, 3vw, 2.25rem);
  background: var(--color-surface);
  border: 1px solid rgba(218, 220, 224, 0.9);
  border-radius: 20px;
  box-shadow:
    0 1px 2px rgba(5, 18, 33, 0.04),
    0 12px 40px rgba(5, 18, 33, 0.08);
}

.sf-auth-modern__mobile-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.sf-auth-modern__header {
  margin-bottom: 1.75rem;
}

.sf-auth-modern__header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.sf-auth-modern__header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.sf-auth-field {
  margin-bottom: 1.15rem;
}

.sf-auth-field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.sf-auth-field label .sf-required {
  color: var(--color-accent-red);
  margin-left: 0.15rem;
}

/* Flex input group — avoids padding/icon overlap with global .sf-form styles */
.sf-auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 3rem;
  padding: 0 0.85rem 0 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sf-auth-input-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(11, 87, 208, 0.12);
}

.sf-auth-input-wrap__icon {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.sf-auth-form .sf-auth-input-wrap .form-control {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.65rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.sf-auth-form .sf-auth-input-wrap .form-control:focus {
  border: 0;
  box-shadow: none;
  outline: none;
}

.sf-auth-input-wrap--password {
  padding-right: 0.5rem;
}

.sf-auth-toggle-password {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
}

.sf-auth-toggle-password svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.sf-auth-toggle-password:hover {
  color: var(--color-primary);
  background: rgba(11, 87, 208, 0.06);
}

/* Standalone fields on register (direct children only — not inside icon wrap) */
.sf-auth-form .sf-auth-field > .form-control,
.sf-auth-form .sf-auth-field > .form-select {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sf-auth-form .sf-auth-field > .form-control:focus,
.sf-auth-form .sf-auth-field > .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(11, 87, 208, 0.12);
  outline: none;
}

.sf-auth-form .sf-form-error-summary {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background-color: rgba(197, 34, 31, 0.08);
  border: 1px solid rgba(197, 34, 31, 0.25);
  border-radius: 12px;
  color: var(--color-accent-red);
  font-size: 0.875rem;
  line-height: 1.45;
}

.sf-auth-form .sf-form-error-summary strong {
  display: block;
  margin-bottom: 0.15rem;
  font-weight: 600;
}

.sf-auth-form .sf-form-error-summary ul {
  margin: 0;
  padding-left: 1.1rem;
}

.sf-auth-form .sf-form-error-summary li + li {
  margin-top: 0.25rem;
}

.sf-auth-form .sf-field-error {
  font-size: 0.8125rem;
  color: var(--color-accent-red);
  margin-top: 0.35rem;
}

.sf-auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.25rem 0 1.5rem;
}

.sf-auth-forgot {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.sf-auth-forgot:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.sf-auth-submit {
  width: 100%;
  min-height: 3rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #0b57d0 0%, #0948ad 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 20px rgba(11, 87, 208, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sf-auth-submit:hover {
  background: linear-gradient(180deg, #0948ad 0%, #083d9a 100%);
  box-shadow: 0 10px 24px rgba(11, 87, 208, 0.32);
  transform: translateY(-1px);
}

.sf-auth-submit:active {
  transform: translateY(0);
}

.sf-auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.sf-auth-footer a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.sf-auth-footer a:hover {
  text-decoration: underline;
}

.sf-auth-invite-banner {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(11, 87, 208, 0.08);
  border: 1px solid rgba(11, 87, 208, 0.14);
  font-size: 0.875rem;
  line-height: 1.5;
}

.sf-auth-modern--simple {
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--navbar-height));
}

.sf-auth-modern--simple .sf-auth-modern__main {
  min-height: calc(100vh - var(--navbar-height));
}

.sf-auth-modern--simple .sf-auth-modern__card {
  max-width: 28rem;
}

.sf-auth-modern__header.text-center h1,
.sf-auth-modern__header.text-center p {
  text-align: center;
}

.sf-auth-status-note {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  text-align: center;
}

@media (max-width: 991.98px) {
  .sf-auth-modern {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .sf-auth-modern__brand {
    display: none;
  }

  .sf-auth-modern__main {
    min-height: calc(100vh - var(--navbar-height));
    align-items: flex-start;
    padding-top: 2rem;
  }

  .sf-auth-modern__card {
    box-shadow: 0 8px 28px rgba(5, 18, 33, 0.06);
  }
}
