/* Sign-in / password screens of the tenant sites (shared by all templates). One calm full-height card: no site header,
   no footer, no chat widget. It fits a 320x568 phone without scrolling and re-centres when the keyboard opens
   (dvh + interactive-widget=resizes-content). Colours come from the site's own design tokens via the --au-* variables
   the layout sets. */
@font-face { font-family: "Vazirmatn"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/fonts/vazirmatn-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E; }
@font-face { font-family: "Vazirmatn"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/fonts/vazirmatn-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2122, U+2191, U+2193, U+2212; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.au-body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--au-text); font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 480px at 85% -10%, color-mix(in srgb, var(--au-accent) 16%, transparent), transparent 70%),
    radial-gradient(700px 420px at 0% 110%, color-mix(in srgb, var(--au-accent) 9%, transparent), transparent 70%),
    var(--au-bg);
}
.au-main { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.au-back {
  position: fixed; top: max(12px, env(safe-area-inset-top)); inset-inline-start: 14px; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  color: var(--au-muted); background: var(--au-surface); border: 1px solid var(--au-border); text-decoration: none;
  transition: color .2s, border-color .2s, transform .2s;
}
.au-back:hover { color: var(--au-text); border-color: var(--au-accent); }
.au-back:active { transform: scale(.94); }
.au-back svg { width: 20px; height: 20px; }

.au-card {
  width: min(100%, 400px); background: var(--au-surface); border: 1px solid var(--au-border); border-radius: var(--au-radius, 18px);
  padding: clamp(18px, 4.2vh, 32px) clamp(18px, 5vw, 28px); box-shadow: 0 24px 60px -28px rgba(0, 0, 0, .35);
  display: grid; gap: clamp(10px, 1.8vh, 16px);
  animation: au-in .35s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes au-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.au-brand { display: flex; align-items: center; gap: 12px; }
.au-logo { width: 44px; height: 44px; flex: none; border-radius: 12px; object-fit: cover; background: color-mix(in srgb, var(--au-accent) 14%, var(--au-surface)); display: grid; place-items: center; font-weight: 800; color: var(--au-accent); font-size: 1.2rem; }
.au-brand b { font-size: .95rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.au-card h1 { margin: 0; font-size: clamp(1.25rem, 4.6vw, 1.5rem); line-height: 1.5; font-weight: 800; }
.au-sub { margin: 0; color: var(--au-muted); font-size: .9rem; line-height: 1.9; }
.au-form { display: grid; gap: clamp(10px, 1.8vh, 14px); }
.au-field { display: grid; gap: 6px; }
.au-field label { font-size: .85rem; font-weight: 600; }
.au-field input {
  width: 100%; min-height: 48px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--au-text); background: var(--au-bg);
  border: 1px solid var(--au-border); border-radius: calc(var(--au-radius, 18px) * .6); outline: none; transition: border-color .2s, box-shadow .2s;
}
.au-field input.ltr, .au-field input[dir="ltr"] { direction: ltr; text-align: left; }
.au-field input:focus { border-color: var(--au-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-accent) 22%, transparent); }
.au-field input[aria-invalid="true"], .au-field input.input-validation-error { border-color: #d9534f; }
.au-pw { position: relative; }
.au-pw input { padding-inline-end: 52px; }
.au-eye { position: absolute; inset-block: 0; inset-inline-end: 0; width: 48px; display: grid; place-items: center; border: 0; background: none; color: var(--au-muted); cursor: pointer; border-radius: inherit; }
.au-eye:hover, .au-eye:focus-visible { color: var(--au-text); }
.au-eye svg { width: 20px; height: 20px; }
.au-eye .au-eye-off { display: none; }
.au-eye[aria-pressed="true"] .au-eye-on { display: none; }
.au-eye[aria-pressed="true"] .au-eye-off { display: block; }

.au-btn {
  min-height: 50px; padding: 0 18px; border-radius: calc(var(--au-radius, 18px) * .6); border: 1px solid var(--au-accent); background: var(--au-accent); color: var(--au-ink, #fff);
  font: inherit; font-weight: 700; cursor: pointer; display: inline-grid; place-items: center; text-decoration: none; transition: filter .2s, transform .15s;
}
.au-btn:hover { filter: brightness(1.06); }
.au-btn:active { transform: scale(.985); }
.au-btn[disabled] { opacity: .55; cursor: not-allowed; }
.au-btn-quiet { background: transparent; color: var(--au-muted); border-color: var(--au-border); font-weight: 600; min-height: 44px; }
.au-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; margin: 0; }
.au-links a, .au-card a.au-link { color: var(--au-accent); text-decoration: none; font-weight: 600; padding: 6px 0; }
.au-links a:hover { text-decoration: underline; }
.au-center { text-align: center; justify-content: center; }

.au-error, .au-form .validation-summary-errors {
  margin: 0; padding: 10px 12px; font-size: .85rem; line-height: 1.8; color: #b42318; background: rgba(217, 83, 79, .1);
  border: 1px solid rgba(217, 83, 79, .35); border-radius: calc(var(--au-radius, 18px) * .5);
}
.au-form .validation-summary-errors ul { margin: 0; padding-inline-start: 18px; }
.au-form .validation-summary-valid { display: none; }
.au-field .field-validation-error { color: #b42318; font-size: .8rem; }
.au-ok { margin: 0; padding: 10px 12px; font-size: .88rem; line-height: 1.8; color: #1e7a46; background: rgba(40, 167, 100, .1); border: 1px solid rgba(40, 167, 100, .35); border-radius: calc(var(--au-radius, 18px) * .5); }
.au-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .8rem; color: var(--au-muted); }
.au-rules li { display: flex; align-items: center; gap: 8px; transition: color .2s; }
.au-rules li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid var(--au-border); transition: background .2s, border-color .2s; }
.au-rules li[data-ok="true"] { color: #1e7a46; }
.au-rules li[data-ok="true"]::before { background: #28a764; border-color: #28a764; box-shadow: inset 0 0 0 3px var(--au-surface); }
.au-meter { height: 4px; border-radius: 4px; background: var(--au-border); overflow: hidden; }
.au-meter i { display: block; height: 100%; width: 0; background: #d9534f; transition: width .25s, background .25s; }
.au-meter[data-level="2"] i { width: 66%; background: #e0a106; }
.au-meter[data-level="3"] i { width: 100%; background: #28a764; }
.au-meter[data-level="1"] i { width: 33%; }

@media (max-height: 640px) { .au-sub { display: none; } .au-card { padding-block: 16px; gap: 8px; } .au-field input { min-height: 44px; } .au-btn { min-height: 46px; } }
@media (prefers-reduced-motion: reduce) { .au-card { animation: none; } * { transition-duration: .01ms !important; } }

/* Registration: two short fields side by side when there is room, so five fields still fit a 720px-high screen. */
.au-card-wide { width: min(100%, 520px); }
.au-row2 { display: grid; gap: inherit; }
@media (min-width: 560px) { .au-row2 { grid-template-columns: 1fr 1fr; } }
