/* Shared account creation, sign-in, and password recovery styling. */

.auth-page {
  --auth-ink: #29364b;
  --auth-muted: #68758a;
  --auth-primary: #5268a5;
  --auth-border: #e1e6ef;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: #f8f9fc;
  color: var(--auth-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page [hidden] { display: none !important; }
.auth-page a { color: var(--auth-primary); text-decoration: none; }
.auth-page a:hover { color: #384e89; }
.auth-page :focus-visible { outline: 3px solid #889bcf; outline-offset: 4px; }
.auth-page button, .auth-page input, .auth-page textarea { font: inherit; }
.auth-layout { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px 0; }
.auth-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--auth-ink) !important; font-size: 1.65rem; font-weight: 700; letter-spacing: -0.055em; line-height: 1.1; }
.auth-brand-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--auth-primary); border-radius: 12px; color: #fff; }
.auth-brand-icon svg { width: 28px; height: 28px; }
.auth-brand-dot { color: var(--auth-primary); }
.auth-brand small { display: block; margin-top: 5px; font-size: 0.82rem; font-weight: 400; color: var(--auth-muted); letter-spacing: 0; }
.auth-back { display: inline-flex; align-items: center; gap: 9px; font-size: 0.88rem; color: var(--auth-muted) !important; padding-block: 10px; }
.auth-back:hover { color: var(--auth-primary) !important; }
.auth-skip { position: fixed; left: 16px; top: 10px; transform: translateY(-150%); padding: 10px 16px; background: #fff; border: 1px solid var(--auth-primary); border-radius: 8px; z-index: 2; }
.auth-skip:focus { transform: none; }
.auth-shell { display: grid; grid-template-columns: 1fr 1.04fr; width: 100%; margin: auto 0; border: 1px solid var(--auth-border); border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 20px 65px -30px rgba(44, 62, 100, 0.15); }
.auth-story { display: flex; flex-direction: column; padding: 48px 44px 34px; background: radial-gradient(ellipse at 0 0, #e8eef9 0, transparent 65%), #f1f4fa; border-right: 1px solid #e7ebf3; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #5d7291; font-size: 0.82rem; letter-spacing: 0.08em; font-weight: 600; }
.auth-eyebrow > span { width: 7px; height: 7px; background: #7f9c97; border-radius: 50%; }
.auth-story h1 { margin: 22px 0 19px; font-size: clamp(1.8rem, 3.2vw, 2.55rem); line-height: 1.25; font-weight: 600; letter-spacing: -0.05em; color: var(--auth-ink); }
.auth-story h1 > span { color: var(--auth-primary); }
.auth-story-copy { font-size: 0.95rem; color: var(--auth-muted); line-height: 1.9; max-width: 335px; margin: 0; }
.auth-capabilities { display: grid; gap: 19px; margin: 36px 0; }
.auth-capabilities > div { display: flex; align-items: center; gap: 13px; }
.auth-feature-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; background: rgba(255,255,255,0.75); color: #627aa9; border: 1px solid #e2e8f3; border-radius: 11px; }
.auth-feature-icon svg { width: 22px; height: 22px; }
.auth-capabilities strong { display: block; color: #42526c; font-size: 0.92rem; font-weight: 600; }
.auth-capabilities p { margin: 3px 0 0; font-size: 0.86rem; color: var(--auth-muted); }
.auth-story-note { display: flex; align-items: center; gap: 8px; padding-top: 22px; margin-top: auto; border-top: 1px solid #dfe6f1; color: var(--auth-muted); font-size: 0.85rem; }
.auth-story-note > span { color: #4c816c; }
.auth-signin { display: flex; align-items: center; justify-content: center; padding: 48px; }
.auth-form-wrap { width: 100%; max-width: 380px; }
.auth-form-eyebrow { color: var(--auth-muted); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.09em; }
.auth-signin h2 { margin: 13px 0 8px; font-size: 2rem; letter-spacing: -0.045em; font-weight: 600; color: var(--auth-ink); line-height: 1.3; }
.auth-form-intro { color: var(--auth-muted); font-size: 0.92rem; margin-bottom: 30px; }
.auth-google { display: flex; flex-direction: column; align-items: center; min-height: 44px; }
.auth-google noscript { color: var(--auth-muted); font-size: 0.85rem; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--auth-muted); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-border); }
.auth-field { margin-bottom: 22px; }
.auth-field label { display: block; color: #40516b; font-size: 0.9rem; font-weight: 600; margin-bottom: 9px; }
.auth-form input, .auth-form textarea { width: 100%; height: 49px; padding: 12px 14px; background: #fff; border: 1px solid #d9e0ec; border-radius: 9px; font-size: 0.95rem; color: var(--auth-ink); box-shadow: 0 1px 2px rgba(40,55,88,0.02); transition: border-color 140ms ease, box-shadow 140ms ease; }
.auth-form input::placeholder, .auth-form textarea::placeholder { color: #7c8799; opacity: 1; }
.auth-form input:focus, .auth-form textarea:focus { border-color: #8296cc; box-shadow: 0 0 0 3px #edf1fa; outline: none; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-label-row a { font-size: 0.85rem; }
.auth-label-row a:hover { text-decoration: underline; }
.auth-password-wrap { position: relative; }
.auth-password-wrap input { padding-right: 50px; }
.auth-password-toggle { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 41px; top: 4px; right: 4px; background: transparent; border: 0; border-radius: 6px; color: #728099; cursor: pointer; }
.auth-password-toggle:hover, .auth-password-toggle[aria-pressed="true"] { background: #f0f3f9; color: var(--auth-primary); }
.auth-password-toggle svg { width: 21px; height: 21px; }
.auth-caps-hint { margin: 8px 0 0; font-size: 0.85rem; color: #946728; }
.auth-page .auth-submit { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 49px; padding: 13px 17px; border: 1px solid var(--auth-primary); border-radius: 9px; background: var(--auth-primary); color: #fff; font-size: 0.92rem; font-weight: 600; box-shadow: 0 4px 10px rgba(82,104,165,0.1); cursor: pointer; transition: background-color 140ms ease; }
.auth-page .auth-submit:hover { background: #42588f; border-color: #42588f; }
.auth-page .auth-submit:disabled { opacity: 0.75; cursor: wait; }
.auth-access-note { margin: 22px 0 27px; font-size: 0.88rem; line-height: 1.8; color: var(--auth-muted); text-align: center; }
.auth-access-note a { font-weight: 600; }
.auth-access-note a:hover { text-decoration: underline; }
.auth-help { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 8px; padding-top: 22px; border-top: 1px solid #edf0f5; font-size: 0.86rem; color: var(--auth-muted); }
.auth-help a { font-weight: 500; }
.auth-alert { padding: 13px 15px; margin: -5px 0 22px; border: 1px solid; border-radius: 9px; font-size: 0.92rem; line-height: 1.8; }
.auth-alert-info { color: #49628c; background: #f1f5fc; border-color: #dfe7f7; }
.auth-alert-error { color: #9c4650; background: #fff5f5; border-color: #f0dfe1; }
.auth-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding: 27px 0; color: var(--auth-muted); font-size: 0.82rem; }
.auth-footer > span:last-child { display: inline-flex; gap: 9px; }
/* Registration fields keep the same controls with a compact desktop grid. */
.auth-form textarea { height: auto; min-height: 80px; resize: vertical; }
.auth-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.auth-field-grid .auth-field { min-width: 0; margin-bottom: 0; }
.auth-register .auth-form-wrap { max-width: 410px; }
.auth-register .auth-signin { padding-block: 40px; }
.auth-register .auth-field { margin-bottom: 20px; }
.auth-register .auth-field-grid .auth-field { margin-bottom: 0; }
.auth-register .auth-form-intro { margin-bottom: 26px; }
@media (max-width: 575.98px) {
  .auth-field-grid { grid-template-columns: 1fr; gap: 20px; }
  .auth-register .auth-signin { padding-block: 30px; }
}

@media (min-width: 1400px) { .auth-header { padding-block: 40px; } .auth-shell { min-height: 615px; } }
@media (max-width: 991.98px) { .auth-layout { padding-inline: 28px; } .auth-story { padding: 37px 28px 30px; } .auth-signin { padding: 37px 30px; } .auth-eyebrow { font-size: 0.6rem; letter-spacing: 0.05em; } .auth-story-copy { font-size: 0.83rem; } }
@media (max-width: 767.98px) {
  .auth-layout { max-width: 540px; padding-inline: 22px; }
  .auth-header { padding-block: 25px; }
  .auth-brand { font-size: 1.4rem; }
  .auth-brand-icon { width: 38px; height: 38px; }
  .auth-brand small { display: none; }
  .auth-back { font-size: 0.75rem; }
  .auth-shell { grid-template-columns: 1fr; margin-block: 10px 20px; border-radius: 18px; }
  .auth-story { padding: 25px 28px; border-right: 0; border-bottom: 1px solid var(--auth-border); }
  .auth-story h1 { font-size: 1.5rem; margin: 10px 0; line-height: 1.4; }
  .auth-story h1 br { display: none; }
  .auth-story h1 > span::before { content: ' '; }
  .auth-story-copy { font-size: 0.8rem; max-width: 100%; line-height: 1.8; }
  .auth-capabilities, .auth-story-note { display: none; }
  .auth-signin { padding: 32px 28px; }
  .auth-form-wrap { max-width: none; }
  .auth-form-eyebrow { display: none; }
  .auth-signin h2 { margin-top: 0; font-size: 1.75rem; }
  .auth-form-intro { font-size: 0.83rem; margin-bottom: 26px; }
  .auth-form input, .auth-form textarea { font-size: 1rem; }
  .auth-footer { justify-content: center; text-align: center; padding: 0 0 22px; }
}
@media (max-width: 359.98px) { .auth-layout { padding-inline: 16px; } .auth-brand-icon { display: none; } .auth-signin, .auth-story { padding-inline: 22px; } .auth-label-row { gap: 6px; } .auth-label-row a { font-size: 0.7rem; } }
@media (prefers-reduced-motion: reduce) { .auth-page *, .auth-page *::before, .auth-page *::after { transition: none !important; animation: none !important; } }

/* Multi-company workspace selection styles */
.auth-company-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 150ms ease;
  margin-bottom: 10px;
}
.auth-company-card:hover {
  border-color: var(--auth-primary);
  background: #f7f9fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(82, 104, 165, 0.12);
}
.auth-company-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-company-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f0f4fa;
  color: var(--auth-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-company-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
  margin-bottom: 2px;
}
.auth-company-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #64748b;
}
.auth-role-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e9effa;
  color: #3b5998;
  font-weight: 600;
  font-size: 0.72rem;
}
.auth-company-arrow {
  color: var(--auth-primary);
  font-size: 1.1rem;
  font-weight: bold;
}

