/* OfficeFlowAi auth — split layout with photo panel */
:root {
  --auth-header: #06312a;
  --auth-accent: #2ec4a0;
  --auth-accent-hover: #26b090;
  --auth-mint: #e8f6f3;
  --auth-mint-2: #f3fbf9;
  --auth-text: #1f3d38;
  --auth-muted: #6b8580;
  --auth-border: #d7e8e4;
  --auth-card-w: 420px;
}

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

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

body.auth-page {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  font-family: "Open Sans", system-ui, -apple-system, sans-serif;
  color: var(--auth-text);
  background: var(--auth-mint);
}

.auth-layout {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* ---- Left photo panel ---- */
.auth-aside {
  position: relative;
  flex: 1 1 48%;
  min-width: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem 2rem 2rem;
  overflow: hidden;
  background-color: #06312a;
  background-image: url("/static/assets/img/brand/auth-finance-bg.png");
  background-size: cover;
  background-position: center;
}

.auth-aside__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 40, 32, 0.72) 0%, rgba(6, 49, 42, 0.55) 42%, rgba(4, 40, 32, 0.88) 100%),
    linear-gradient(90deg, rgba(4, 40, 32, 0.45), transparent 55%);
}

.auth-aside__brand {
  position: relative;
  z-index: 2;
}

.auth-aside__brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #ffffff !important;
}

.auth-aside__copy {
  position: relative;
  z-index: 2;
  max-width: 380px;
  margin-top: auto;
  padding-bottom: 0.25rem;
}

.auth-aside__eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78) !important;
}

.auth-aside__headline,
.auth-aside h1,
.auth-aside h2,
.auth-aside h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 700;
  line-height: 1.22;
  color: #ffffff !important;
}

.auth-aside__text,
.auth-aside p.auth-aside__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88) !important;
}

.auth-aside__stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.auth-aside__stat {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  backdrop-filter: blur(6px);
}

.auth-aside__stat strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #b8f0df !important;
}

.auth-aside__stat span {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.75) !important;
}

/* ---- Right form panel ---- */
.auth-panel {
  flex: 1 1 52%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(700px 400px at 80% 0%, #d7f3ec 0%, transparent 55%),
    linear-gradient(165deg, var(--auth-mint), var(--auth-mint-2));
  overflow: hidden;
}

.auth-panel__mobile-brand {
  display: none;
  align-items: center;
  padding: 0.9rem 1.15rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--auth-border);
  font-weight: 700;
  color: var(--auth-header);
  font-size: 1rem;
}

.auth-panel__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  min-height: 0;
  overflow: hidden;
}

.auth-shell {
  width: 100%;
  max-width: var(--auth-card-w);
}

.auth-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(6, 49, 42, 0.1);
  overflow: hidden;
}

.auth-card__header {
  background: var(--auth-header);
  color: #fff;
  padding: 1.25rem 1.4rem 1.15rem;
}

.auth-card__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65) !important;
}

.auth-card__title,
.auth-card h1 {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff !important;
}

.auth-card__subtitle {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78) !important;
}

.auth-card__body {
  padding: 1.25rem 1.4rem 0.95rem;
}

.auth-card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0 1.4rem 1.2rem;
  font-size: 0.85rem;
  color: var(--auth-muted);
  text-align: center;
}

.auth-card__footer a {
  color: var(--auth-header);
  font-weight: 700;
  text-decoration: none;
}

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

.auth-form .form-group { margin-bottom: 0.85rem; }

.auth-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--auth-muted);
  margin-bottom: 0.3rem;
}

.auth-form .form-control,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input.form-control {
  width: 100%;
  height: auto !important;
  border: 1px solid var(--auth-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.92rem;
  color: var(--auth-text);
  box-shadow: none !important;
}

.auth-form .form-control:focus,
.auth-form input:focus {
  border-color: var(--auth-accent) !important;
  box-shadow: 0 0 0 3px rgba(46, 196, 160, 0.18) !important;
}

.auth-form .text-error,
.auth-form .text-danger,
.auth-form .errorlist {
  display: block;
  color: #c0392b;
  font-size: 0.78rem;
  margin-top: 0.2rem;
  list-style: none;
  padding: 0;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.15rem 0 1.1rem;
}

.auth-options .custom-control-label,
.auth-options label {
  font-size: 0.82rem;
  color: var(--auth-muted);
  font-weight: 500;
}

.auth-link {
  font-size: 0.82rem;
  color: var(--auth-header);
  font-weight: 600;
  text-decoration: none;
}

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

.auth-actions {
  display: flex;
  justify-content: center;
}

.btn-auth {
  background: var(--auth-accent) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700;
  border-radius: 10px !important;
  padding: 0.7rem 1.6rem !important;
  min-width: 140px;
  box-shadow: 0 8px 18px rgba(46, 196, 160, 0.28);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-auth:hover,
.btn-auth:focus {
  background: var(--auth-accent-hover) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.auth-alert {
  font-size: 0.82rem;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.75rem;
}

.auth-muted-copy {
  color: var(--auth-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 1rem;
  text-align: center;
}

.password-field { position: relative; }
.password-field .form-control { padding-right: 2.6rem !important; }
.password-field .password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  color: #8898aa;
  cursor: pointer;
}
.password-field .password-toggle:hover { color: var(--auth-header); }

@media (max-width: 900px) {
  .auth-aside { display: none; }
  .auth-panel { flex: 1 1 100%; }
  .auth-panel__mobile-brand { display: flex; }
}

@media (max-height: 700px) {
  .auth-card__header { padding: 1rem 1.2rem 0.9rem; }
  .auth-card__title { font-size: 1.3rem; }
  .auth-card__body { padding: 1rem 1.2rem 0.75rem; }
  .auth-aside__stats { display: none; }
}
