/*
 * Raptool Queue — shared look for every sign-in screen
 * (login, signup, forgot, reset, account).
 * Soft blurred teal background, translucent "frosted glass" card with square
 * corners, a navy circle with an outline person icon overlapping the card top,
 * underline-only inputs and a navy button with spaced capitals.
 * No frameworks, no external fonts or images — icons are inline SVG (see auth.js).
 */

:root {
  --auth-navy: #0d2350;
  --auth-navy-hover: #14316d;
  --auth-card: linear-gradient(160deg, rgba(46, 110, 128, 0.88) 0%, rgba(24, 78, 94, 0.92) 100%);
  --auth-line: rgba(255, 255, 255, 0.72);
  --auth-text: #ffffff;
  --auth-soft: rgba(255, 255, 255, 0.86);
  --auth-error: #ffd0d0;
  --auth-ok: #c9f5da;
  --auth-font: Montserrat, "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body.auth-body {
  min-height: 100vh;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background-color: #86b0bc;
  -webkit-tap-highlight-color: transparent;
}

/* Blurred gradient background, fixed behind everything */
body.auth-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(48% 42% at 6% 52%, #c2e6ed 0, rgba(194, 230, 237, 0) 100%),
    radial-gradient(46% 38% at 97% 12%, #c9ecf3 0, rgba(201, 236, 243, 0) 100%),
    radial-gradient(44% 40% at 4% 4%, #6a97a4 0, rgba(106, 151, 164, 0) 100%),
    radial-gradient(52% 44% at 88% 90%, #5e8892 0, rgba(94, 136, 146, 0) 100%),
    radial-gradient(46% 34% at 46% 102%, #9ec3cc 0, rgba(158, 195, 204, 0) 100%),
    linear-gradient(135deg, #7ba5b1 0%, #a8ccd6 100%);
  filter: blur(14px);
  transform: scale(1.08);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 92px 16px 48px;
}

/* ---- the card ---- */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--auth-card);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  box-shadow: 0 24px 60px rgba(8, 36, 52, 0.35);
  padding: 76px 36px 36px;
}
.auth-card.wide { max-width: 460px; }

.auth-avatar {
  position: absolute;
  top: -56px;
  left: 50%;
  margin-left: -56px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--auth-navy);
  box-shadow: 0 10px 26px rgba(8, 20, 50, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-avatar svg { width: 72px; height: 72px; }

.auth-title {
  margin: 0 0 6px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--auth-text);
}
.auth-sub {
  margin: 0 0 22px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--auth-soft);
}

/* ---- underline-only fields ---- */
.auth-field { position: relative; margin: 0 0 6px; }
.auth-field .ico {
  position: absolute;
  left: 2px;
  top: 14px;
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}
.auth-field .ico svg { width: 100%; height: 100%; display: block; }

.auth-input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 10px 4px 8px 42px;
  font: inherit;
  font-size: 16px;
  color: var(--auth-text);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--auth-line);
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.auth-input::placeholder { color: rgba(255, 255, 255, 0.82); opacity: 1; }
.auth-input:focus { border-bottom-color: #fff; box-shadow: 0 1.5px 0 0 #fff; }
.auth-input[aria-invalid="true"] { border-bottom-color: var(--auth-error); }
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #2a6577 inset;
  transition: background-color 9999s ease-in-out 0s;
}

.field-err {
  min-height: 0;
  margin: 4px 0 0 42px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--auth-error);
}
.field-err:empty { display: none; }

.auth-field-gap { height: 12px; }

/* Visually hidden (labels, honeypot) — still in the accessibility tree except the honeypot */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.hp-field {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ---- remember me / forgot ---- */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 20px 0 18px;
  font-size: 0.88rem;
}
.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
  color: var(--auth-soft);
  user-select: none;
}
.auth-check input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  background: rgba(13, 35, 80, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 0;
  cursor: pointer;
  position: relative;
}
.auth-check input:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.auth-check input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.auth-link {
  color: #fff;
  font-style: italic;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.auth-link:hover { text-decoration: underline; }
.auth-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.auth-link.plain { font-style: normal; text-decoration: underline; }

/* ---- buttons ---- */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--auth-navy);
  border: 1.5px solid var(--auth-navy);
  border-radius: 0;
  cursor: pointer;
}
.auth-btn:hover { background: var(--auth-navy-hover); border-color: var(--auth-navy-hover); }
.auth-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.auth-btn:disabled { opacity: 0.6; cursor: wait; }
.auth-btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  min-height: 46px;
}
.auth-btn.ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
.auth-actions { display: grid; gap: 12px; }
.auth-or {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--auth-soft);
}

/* ---- messages ---- */
.auth-alert {
  margin: 0 0 14px;
  padding: 11px 14px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #fff;
  background: rgba(13, 35, 80, 0.6);
  border-left: 4px solid #ffb4b4;
}
.auth-alert.ok { border-left-color: #8fe3b0; }
.auth-alert.hidden, .hidden { display: none !important; }

.auth-panel { text-align: center; padding: 6px 0 4px; }
.auth-panel .big-ico { width: 54px; height: 54px; margin: 0 auto 14px; display: block; }
.auth-panel .big-ico svg { width: 100%; height: 100%; }
.auth-panel h2 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 600; }
.auth-panel p { margin: 0 0 20px; font-size: 0.95rem; line-height: 1.5; color: var(--auth-soft); }

.auth-foot { margin-top: 18px; text-align: center; }

.who {
  margin: 0 0 18px;
  padding: 10px 14px;
  background: rgba(13, 35, 80, 0.4);
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
}
.who strong { display: block; font-size: 1rem; }

/* password strength hint */
.strength { margin: 6px 0 0 42px; display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--auth-soft); }
.strength .bars { display: inline-flex; gap: 3px; }
.strength .bars i { width: 26px; height: 4px; background: rgba(255, 255, 255, 0.28); display: block; }
.strength[data-level="1"] .bars i:nth-child(-n+1) { background: #ffb4b4; }
.strength[data-level="2"] .bars i:nth-child(-n+2) { background: #ffe08a; }
.strength[data-level="3"] .bars i:nth-child(-n+3) { background: #b6efc8; }
.strength[data-level="4"] .bars i:nth-child(-n+4) { background: #8fe3b0; }

/* ---- language selector (top-right of the page) ---- */
.auth-lang {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  background: rgba(13, 35, 80, 0.78);
  color: #fff;
  height: 44px;
}
.auth-lang .ico { position: absolute; left: 10px; top: 13px; width: 18px; height: 18px; pointer-events: none; }
.auth-lang .ico svg { width: 100%; height: 100%; display: block; }
.auth-lang select {
  height: 44px;
  padding: 0 14px 0 34px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  min-width: 118px;
}
.auth-lang select option { color: #0d2350; background: #fff; }
.auth-lang select:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.auth-lang::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 19px;
  width: 6px; height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

@media (max-width: 440px) {
  .auth-page { padding: 84px 14px 40px; }
  .auth-card { padding: 72px 22px 28px; }
}

@media (prefers-reduced-motion: no-preference) {
  .auth-btn, .auth-input { transition: background-color .15s ease, border-color .15s ease; }
}

/* 3.1.0: Raptool Account line, company picker and sign-in notices */
.auth-account-line { margin: 4px 0 14px; text-align: center; font-size: 13px; color: rgba(255,255,255,.85); letter-spacing: .02em; }
.auth-pick { display: flex; flex-direction: column; gap: 12px; }
.auth-pick-title { margin: 0 0 4px; color: #fff; font-size: 15px; line-height: 1.45; text-align: center; }
.auth-pick-list { display: flex; flex-direction: column; gap: 10px; }
.auth-pick-item { text-align: left; justify-content: flex-start; text-transform: none; letter-spacing: 0; }
.auth-alert.ok { background: rgba(255,255,255,.16); }
.hidden { display: none !important; }
.auth-back-top { position: fixed; top: 14px; left: 14px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 8px;
  border-radius: 12px; color: #fff; text-decoration: none; font-size: 15px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.auth-back-top svg { width: 22px; height: 22px; }
/* custom dropdown (assets/common.js) inside the language selector */
.auth-lang .rq-dd-btn { height: 44px; min-height: 44px; padding: 0 12px 0 34px; font-size: 16px; color: #fff; background: transparent;
  border: 1px solid rgba(255,255,255,.45); border-radius: 12px; min-width: 128px; }
.auth-lang { border-radius: 12px; }
.auth-lang::after { display: none; }
.auth-lang .rq-dd-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
