/* Biz authentication shell — scoped to auth pages only */

:root {
  --auth-bg-top: #eef1f4;
  --auth-bg-bottom: #e7ecef;
  --auth-card-bg: #ffffff;
  --auth-card-border: #d9e2de;
  --auth-card-shadow: 0 18px 48px rgba(20, 35, 45, 0.12);
  --auth-text: #1c2b24;
  --auth-muted: #5f7268;
  --auth-border: #cfd9d4;
  --auth-border-focus: #1f6b45;
  --auth-primary: #1b6b43;
  --auth-primary-hover: #155537;
  --auth-primary-active: #11452c;
  --auth-primary-disabled: #8fb39d;
  --auth-danger-bg: #fdf2f2;
  --auth-danger-border: #f0c7c7;
  --auth-danger-text: #9b1c1c;
  --auth-success-bg: #eef8f1;
  --auth-success-border: #b7dbc4;
  --auth-success-text: #1f6b43;
  --auth-info-bg: #f3f7f5;
  --auth-info-border: #c9dbd1;
  --auth-info-text: #355246;
  --auth-warning-text: #8a5a12;
  --auth-radius: 20px;
  --auth-field-radius: 10px;
  --auth-font: IRANSans, Tahoma, "Segoe UI", sans-serif;
}

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

html,
body.auth-page {
  margin: 0;
  min-height: 100%;
}

body.auth-page {
  font-family: var(--auth-font);
  color: var(--auth-text);
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(27, 107, 67, 0.07), transparent 55%),
    linear-gradient(180deg, var(--auth-bg-top), var(--auth-bg-bottom));
  -webkit-font-smoothing: antialiased;
}

.auth-page__shell,
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 24px;
}

/* Single split card: banner | form */
.auth-split {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--auth-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-card-shadow);
  overflow: hidden;
  animation: auth-fade-up 650ms ease both;
}

.auth-banner {
  position: relative;
  padding: 32px 28px 28px;
  color: #f4faf7;
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(155deg, #0e3a2a 0%, #145239 50%, #1d7348 100%);
  overflow: hidden;
}

.auth-banner__glow {
  position: absolute;
  inset: auto -20% -35% 20%;
  height: 70%;
  background:
    radial-gradient(circle at 30% 40%, rgba(183, 235, 200, 0.18), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.08), transparent 40%);
  pointer-events: none;
}

.auth-banner__brand,
.auth-banner__headline,
.auth-banner__lede,
.auth-banner__panel {
  position: relative;
  z-index: 1;
}

.auth-banner__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-banner__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
}

.auth-banner__name {
  font-size: 1.15rem;
  font-weight: 700;
}

.auth-banner__sub {
  margin-top: 2px;
  font-size: 0.8rem;
  color: rgba(244, 250, 247, 0.78);
}

.auth-banner__headline {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.55;
  max-width: 16ch;
}

.auth-banner__lede {
  margin: 12px 0 0;
  font-size: 0.94rem;
  line-height: 1.85;
  color: rgba(244, 250, 247, 0.86);
  max-width: 32ch;
}

.auth-banner__panel {
  margin-top: 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 14px 14px 12px;
  backdrop-filter: blur(6px);
}

.auth-banner__panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: rgba(244, 250, 247, 0.78);
}

.auth-banner__panel-head strong {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 600;
}

.auth-banner__chart {
  width: 100%;
  height: auto;
  display: block;
}

.auth-banner__chart .chart-line {
  fill: none;
  stroke: #d7f5e2;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: auth-chart-draw 1400ms ease 200ms forwards;
}

.auth-banner__chart .chart-area {
  fill: url(#authChartFill);
  opacity: 0;
  animation: auth-fade-up 900ms ease 450ms forwards;
}

.auth-banner__chart .chart-bar {
  fill: rgba(255, 255, 255, 0.22);
  transform-origin: bottom;
  animation: auth-bar-rise 800ms ease both;
}

.auth-banner__chart .chart-bar:nth-child(1) { animation-delay: 160ms; }
.auth-banner__chart .chart-bar:nth-child(2) { animation-delay: 240ms; }
.auth-banner__chart .chart-bar:nth-child(3) { animation-delay: 320ms; }
.auth-banner__chart .chart-bar:nth-child(4) { animation-delay: 400ms; }
.auth-banner__chart .chart-bar:nth-child(5) { animation-delay: 480ms; }
.auth-banner__chart .chart-bar:nth-child(6) { animation-delay: 560ms; }

.auth-banner__ai {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(8, 32, 22, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-banner__ai-mark {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(183, 235, 200, 0.18);
  color: #d7f5e2;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-banner__ai p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.7;
  color: rgba(244, 250, 247, 0.92);
}

.auth-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 34px 32px;
  background: #fff;
  min-width: 0;
}

.auth-pane__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.auth-pane__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.auth-pane__title {
  margin: 0;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.5;
}

.auth-pane__subtitle {
  margin: 6px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--auth-muted);
  line-height: 1.7;
}

/* Standalone auth cards (recovery / reset) */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 40, 28, 0.08);
  padding: 28px 28px 24px;
}

.auth-card__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-card__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.auth-card__title {
  margin: 0;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--auth-text);
}

.auth-card__subtitle {
  margin: 6px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--auth-muted);
  line-height: 1.7;
}

.auth-alert {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: center;
}

.auth-alert--error {
  background: var(--auth-danger-bg);
  border-color: var(--auth-danger-border);
  color: var(--auth-danger-text);
}

.auth-alert--success {
  background: var(--auth-success-bg);
  border-color: var(--auth-success-border);
  color: var(--auth-success-text);
}

.auth-alert--info,
.auth-alert--warning {
  background: var(--auth-info-bg);
  border-color: var(--auth-info-border);
  color: var(--auth-info-text);
}

.auth-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field > label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--auth-text);
}

.auth-field__hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--auth-muted);
}

.auth-input,
.auth-password__input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-field-radius);
  background: #f7f9f8;
  color: var(--auth-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-input:hover,
.auth-password__input:hover {
  border-color: #b7c6bf;
}

.auth-input:focus,
.auth-password__input:focus {
  outline: none;
  border-color: var(--auth-border-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27, 107, 67, 0.16);
}

.auth-input--ltr,
.auth-password__input {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.auth-password {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password__input {
  padding-right: 44px;
}

.auth-password__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.auth-password__toggle:hover,
.auth-password__toggle:focus-visible {
  color: var(--auth-primary);
  background: rgba(27, 107, 67, 0.08);
  outline: none;
}

.auth-password__toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.auth-password__toggle .icon-hide {
  display: none;
}

.auth-password__toggle[aria-pressed="true"] .icon-show {
  display: none;
}

.auth-password__toggle[aria-pressed="true"] .icon-hide {
  display: block;
}

.auth-caps-warning {
  margin: 0;
  font-size: 0.8rem;
  color: var(--auth-warning-text);
  line-height: 1.6;
}

.auth-caps-warning[hidden] {
  display: none;
}

.auth-links {
  display: flex;
  justify-content: flex-start;
  margin-top: 2px;
}

.auth-links a,
.auth-actions a {
  color: var(--auth-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-links a:hover,
.auth-actions a:hover,
.auth-links a:focus-visible,
.auth-actions a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.auth-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 107, 67, 0.2);
}

.auth-btn--primary {
  background: var(--auth-primary);
  color: #fff;
}

.auth-btn--primary:hover {
  background: var(--auth-primary-hover);
}

.auth-btn--primary:active {
  background: var(--auth-primary-active);
}

.auth-btn--primary:disabled,
.auth-btn--primary[aria-disabled="true"] {
  background: var(--auth-primary-disabled);
  cursor: not-allowed;
}

.auth-btn--secondary {
  background: #fff;
  color: var(--auth-primary);
  border-color: var(--auth-border);
}

.auth-btn--secondary:hover {
  background: #f5f8f6;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.auth-actions--split {
  margin-top: 18px;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--auth-muted);
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-primary);
}

.auth-strength,
.auth-match {
  margin: 0;
  font-size: 0.8rem;
  color: var(--auth-muted);
  line-height: 1.6;
}

.auth-footer {
  margin: 18px 0 0;
  text-align: center;
  color: #7a8a82;
  font-size: 0.8rem;
}

@keyframes auth-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-chart-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes auth-bar-rise {
  from { transform: scaleY(0.35); opacity: 0.35; }
  to { transform: scaleY(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-split,
  .auth-banner__chart .chart-line,
  .auth-banner__chart .chart-area,
  .auth-banner__chart .chart-bar {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

@media (max-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr;
    max-width: 440px;
  }

  .auth-banner {
    padding: 24px 20px 20px;
  }

  .auth-banner__headline {
    max-width: none;
    font-size: 1.35rem;
  }

  .auth-banner__lede {
    max-width: none;
  }

  .auth-pane {
    padding: 28px 22px 24px;
  }
}

@media (max-width: 480px) {
  .auth-shell,
  .auth-page__shell {
    padding: 16px 12px 18px;
    justify-content: flex-start;
  }

  .auth-split {
    border-radius: 16px;
  }

  .auth-banner {
    padding: 20px 16px 16px;
  }

  .auth-pane {
    padding: 22px 16px 20px;
  }

  .auth-pane__logo,
  .auth-card__logo {
    width: 56px;
    height: 56px;
  }

  .auth-card {
    padding: 24px 18px 20px;
    border-radius: 12px;
  }

  .auth-card__title,
  .auth-pane__title {
    font-size: 1.2rem;
  }
}
