/* ==========================================================
   Auth Pages — Applicora branded auth UI
   ========================================================== */

/* Applicora brand tokens */
:root {
  --auth-navy: #0F2B46;
  --auth-navy-light: #163a5c;
  --auth-navy-dark: #091d30;
  --auth-green: #22C55E;
  --auth-green-hover: #16A34A;
  --auth-text: #1e293b;
  --auth-text-secondary: #64748b;
  --auth-text-muted: #94a3b8;
  --auth-border: #e2e8f0;
  --auth-border-hover: #cbd5e1;
  --auth-input-bg: #ffffff;
  --auth-radius: 10px;
  --auth-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Reset ---- */

*, *::before, *::after {
  box-sizing: border-box;
}

/* ---- Base layout ---- */

body.auth-page {
  margin: 0;
  font-family: var(--auth-font);
  color: var(--auth-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #ffffff;
}

/* ---- Split layout ---- */

.auth-split {
  display: flex;
  min-height: 100vh;
}

/* Left branded panel */
.auth-panel {
  flex: 0 0 45%;
  max-width: 45%;
  background: linear-gradient(160deg, var(--auth-navy) 0%, var(--auth-navy-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

/* Decorative circles */
.auth-panel::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.06);
  top: -100px;
  right: -100px;
}

.auth-panel::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  bottom: -80px;
  left: -80px;
}

.auth-panel-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 380px;
}

.auth-panel-logo {
  margin-bottom: 2.5rem;
}

.auth-panel-logo img {
  height: 44px;
  width: auto;
}

.auth-panel-headline {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.auth-panel-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* Feature list on panel */
.auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-block;
  text-align: left;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9375rem;
  padding: 0.625rem 0;
}

.auth-features li i {
  color: var(--auth-green);
  font-size: 1.125rem;
  flex-shrink: 0;
}

/* Right form panel */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: #ffffff;
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

/* ---- Centered layout (for simple pages like forgot-password, success) ---- */

.auth-centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #f8fafc;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 2.5rem 2.25rem;
}

/* ---- Brand (form side) ---- */

.auth-brand {
  margin-bottom: 2rem;
}

.auth-brand img {
  height: 36px;
  width: auto;
}

.auth-brand-tagline {
  font-size: 0.8125rem;
  color: var(--auth-text-muted);
  margin-top: 0.25rem;
  font-weight: 400;
}

.auth-brand--center {
  text-align: center;
}

/* ---- Headings ---- */

.auth-heading {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--auth-text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.auth-subheading {
  font-size: 0.9375rem;
  color: var(--auth-text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-header--center {
  text-align: center;
}

/* ---- Icon (forgot-password, success pages) ---- */

.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #f0fdf4;
  color: var(--auth-green);
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

.auth-icon--blue {
  background: #eff6ff;
  color: #2563eb;
}

.auth-icon--navy {
  background: #eef2f7;
  color: var(--auth-navy);
}

/* ---- Form controls ---- */

.auth-input-group {
  margin-bottom: 1.125rem;
}

.auth-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--auth-text);
  margin-bottom: 0.5rem;
}

.auth-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.5;
}

.auth-input::placeholder {
  color: var(--auth-text-muted);
}

.auth-input:hover {
  border-color: var(--auth-border-hover);
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-navy);
  box-shadow: 0 0 0 3px rgba(15, 43, 70, 0.1);
}

.auth-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

select.auth-input {
  cursor: pointer;
  padding-right: 2.25rem;
  background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 fill=%22%2364748b%22 viewBox=%220 0 16 16%22%3E%3Cpath fill-rule=%22evenodd%22 d=%22M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%22/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.auth-helper {
  font-size: 0.8125rem;
  color: var(--auth-text-muted);
  margin-top: 0.375rem;
  line-height: 1.4;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* ---- Buttons ---- */

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6875rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--auth-font);
  border: none;
  border-radius: var(--auth-radius);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.5;
  gap: 0.5rem;
}

.auth-btn--primary {
  background: var(--auth-green);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.3);
}

.auth-btn--primary:hover {
  background: var(--auth-green-hover);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

.auth-btn--green {
  background: var(--auth-green);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.3);
}

.auth-btn--green:hover {
  background: var(--auth-green-hover);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

/* ---- Social / outline buttons ---- */

.auth-btn--social {
  background: #ffffff;
  color: var(--auth-text);
  border: 1px solid var(--auth-border);
  font-weight: 500;
  gap: 0.75rem;
  box-shadow: none;
}

.auth-btn--social:hover {
  background: #f8fafc;
  border-color: var(--auth-border-hover);
  color: var(--auth-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.auth-btn--social + .auth-btn--social {
  margin-top: 0.625rem;
}

/* ---- Divider ---- */

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

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

.auth-divider-text {
  padding: 0 1rem;
  font-size: 0.8125rem;
  color: var(--auth-text-muted);
}

/* ---- Links ---- */

.auth-link {
  color: var(--auth-navy);
  text-decoration: none;
  font-weight: 500;
}

.auth-link:hover {
  text-decoration: underline;
  color: var(--auth-navy-light);
}

.auth-forgot-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--auth-navy);
  text-decoration: none;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

/* ---- Footer ---- */

.auth-footer {
  text-align: center;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: var(--auth-text-secondary);
}

.auth-footer a {
  color: var(--auth-navy);
  font-weight: 600;
  text-decoration: none;
}

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

/* ---- Checkbox ---- */

.auth-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--auth-text-secondary);
  cursor: pointer;
}

.auth-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--auth-navy);
  cursor: pointer;
  flex-shrink: 0;
}

/* ---- Alerts ---- */

.auth-alert {
  padding: 0.875rem 1rem;
  border-radius: var(--auth-radius);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.auth-alert i {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.auth-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.auth-alert--error a {
  color: #991b1b;
  font-weight: 600;
}

.auth-alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.auth-alert--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.auth-alert--info a {
  color: #1e40af;
  font-weight: 600;
}

/* ---- Legal text ---- */

.auth-legal {
  font-size: 0.8125rem;
  color: var(--auth-text-muted);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.auth-legal a {
  color: var(--auth-text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-legal a:hover {
  color: var(--auth-text);
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .auth-panel {
    display: none;
  }

  .auth-form-panel {
    padding: 2rem 1.5rem;
  }

  .auth-brand--center {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .auth-form-panel {
    padding: 1.5rem 1.25rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  }

  .auth-heading {
    font-size: 1.375rem;
  }
}

/* ==========================================================
   B2B Additions — Radio option styling for sign-up form
   ========================================================== */

.auth-radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.625rem 0.875rem;
  background: white;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  transition: all 0.15s ease;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3f3f46;
}

.auth-radio-option:hover {
  border-color: #0F2B46;
  background: #fafafa;
}

.auth-radio-option input[type="radio"] {
  margin-right: 0.625rem;
  width: 16px;
  height: 16px;
  accent-color: #0F2B46;
}

.auth-radio-option:has(input:checked) {
  border-color: #0F2B46;
  background: #f0f4f8;
}
