@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700&display=swap");

:root {
  --bw-brand: #1a56db;
  --bw-brand-dark: #1e40af;
  --bw-success: #22c55e;
  --bw-success-dark: #16a34a;
  --bw-bg: #ffffff;
  --bw-surface: #fafafa;
  --bw-ink: #111827;
  --bw-text: #374151;
  --bw-text-muted: #6b7280;
  --bw-border: #e5e7eb;
  --bw-radius: 12px;
}

body.sneat-login-page {
  margin: 0 !important;
  font-family: Inter, system-ui, sans-serif !important;
  background: var(--bw-bg) !important;
  color: var(--bw-text) !important;
}

/* Frappe login.js toggles sections — hide non-active flows by default */
body.sneat-login-page section.for-forgot,
body.sneat-login-page section.for-signup,
body.sneat-login-page section.for-login-with-email-link,
body.sneat-login-page section.for-email-login {
  display: none;
}

body.sneat-login-page section.for-login {
  display: block;
}

body.sneat-login-page .sneat-auth__panel .page-card {
  width: 100%;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  max-width: none !important;
}

body.sneat-login-page .page-breadcrumbs,
body.sneat-login-page .page-header-wrapper,
body.sneat-login-page .page-footer,
body.sneat-login-page .web-footer,
body.sneat-login-page .footer-logo-extension,
body.sneat-login-page .navbar,
body.sneat-login-page a[href*="frappeframework.com"],
body.sneat-login-page img[src*="frappe-framework-logo"] {
  display: none !important;
}

body.sneat-login-page .page-content-wrapper,
body.sneat-login-page main.sneat-login-main {
  min-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

body.sneat-login-page .page_content {
  padding: 0 !important;
  margin: 0 !important;
}

body.sneat-login-page .for-login .page-card,
body.sneat-login-page .for-forgot .page-card,
body.sneat-login-page .for-signup .page-card,
body.sneat-login-page .for-login-with-email-link .page-card,
body.sneat-login-page .for-email-login .page-card {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  max-width: none !important;
}

body.sneat-login-page .sneat-auth__panel .page-card {
  width: 100%;
}

.sneat-auth {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  min-height: 100vh !important;
  width: 100% !important;
}

.sneat-auth__form-side {
  display: flex;
  flex-direction: column;
  background: var(--bw-bg);
}

.sneat-auth__panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 26rem;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.sneat-auth__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 32px 0;
}

.sneat-auth__back {
  font-size: 14px;
  color: var(--bw-text-muted);
  text-decoration: none;
}

.sneat-auth__back:hover {
  color: var(--bw-ink);
}

.sneat-auth__brand {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 24px;
}

.sneat-auth__wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: Outfit, Inter, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bw-ink);
}

.sneat-auth__wordmark {
  display: inline-flex;
  align-items: center;
}

.sneat-auth__wordmark-logo {
  max-height: 52px;
  max-width: min(320px, 90vw);
  object-fit: contain;
}

.sneat-auth__product-logo {
  max-height: 48px;
  max-width: min(300px, 88vw);
}

.sneat-auth__org-logo {
  max-height: 96px;
  max-width: min(280px, 100%);
  object-fit: contain;
}

.sneat-auth__cortexcraft-logo {
  max-height: 72px;
  border-radius: 8px;
}

.sneat-auth__org-name {
  margin: 0 0 8px !important;
  font-family: Outfit, Inter, sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bw-ink) !important;
}

.sneat-auth__host-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--bw-border);
  background: var(--bw-surface);
  font-size: 12px;
  color: var(--bw-text-muted);
  margin-bottom: 20px;
}

.sneat-auth__host-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bw-success);
}

.sneat-auth__welcome h1 {
  margin: 0 0 8px;
  font-family: Outfit, Inter, sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bw-ink);
}

.sneat-auth__welcome p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--bw-text-muted);
}

.sneat-field {
  margin-bottom: 16px;
}

.sneat-field .form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bw-ink);
}

.sneat-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius);
  background: #fff;
  font-size: 14px;
  color: var(--bw-ink);
  box-sizing: border-box;
}

.sneat-input:focus {
  outline: none;
  border-color: var(--bw-brand);
  box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.12);
}

.sneat-password-wrap {
  position: relative;
}

.sneat-password-wrap .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--bw-text-muted);
}

.sneat-form-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 14px;
}

.sneat-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bw-text-muted);
  margin: 0;
}

.forgot-password-message a {
  color: var(--bw-brand);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.sneat-form-actions .btn-login {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: var(--bw-radius);
  background: var(--bw-success) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(34, 197, 94, 0.55);
}

.sneat-form-actions .btn-login:hover {
  filter: brightness(1.06);
}

.sneat-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  color: var(--bw-text-muted);
}

.sneat-divider::before,
.sneat-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bw-border);
}

.sneat-social .btn-login-option {
  border: 1px solid var(--bw-border) !important;
  border-radius: var(--bw-radius) !important;
  background: #fff !important;
  color: var(--bw-ink) !important;
  font-size: 14px;
  margin-bottom: 8px;
}

.sneat-signup {
  margin-top: 24px;
  font-size: 14px;
  color: var(--bw-text-muted);
}

.sneat-signup a {
  color: var(--bw-brand);
  font-weight: 500;
}

.sneat-auth__illustration {
  position: relative;
  display: none;
  overflow: hidden;
  min-height: 100vh;
  background: #0f172a;
}

@media (min-width: 992px) {
  .sneat-auth__illustration {
    display: block;
  }
}

.sneat-auth__illustration-bg {
  position: absolute;
  inset: 0;
  background:
    url("/assets/helpdesk/images/cortexdesk-login-hero.png") center right / cover no-repeat,
    linear-gradient(135deg, #1e3a8a 0%, #0f172a 55%, #020617 100%);
}

.sneat-auth__illustration-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 10%,
    rgba(10, 14, 26, 0.02) 28%,
    rgba(10, 14, 26, 0.35) 100%
  );
}

.sneat-auth__illustration-grid {
  display: none;
}

.sneat-auth__quote {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  padding: 48px;
  color: #fff;
  background: linear-gradient(
    to top,
    rgba(2, 6, 23, 0.82) 0%,
    rgba(2, 6, 23, 0.35) 42%,
    transparent 72%
  );
}

.sneat-auth__quote blockquote {
  margin: 0;
  max-width: 28rem;
}

.sneat-auth__quote p {
  font-family: Outfit, Inter, sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.sneat-auth__quote footer {
  margin-top: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 991px) {
  .sneat-auth {
    grid-template-columns: 1fr !important;
  }
}
