/* Universal sign-in pages (mockup "Avvocale — Login"): every tenant signs in
   through this one door, so there is no studio identity here. Same tokens as
   the generic dashboard (Foro palette, Clarity City). Markup: templates/
   includes/_auth-page.html.twig around Drupal's own forms; scoped to
   html.av-auth so the shared styles.css/globals.css rules stay out. */

html.av-auth{
  --bg:#f1f2f0; --surface:#fafbf9; --surface-2:#f4f5f3; --surface-3:#e8eae6;
  --ink:#161d19; --ink-2:#38423c; --ink-3:#5b655f; --ink-4:#6c756f;
  --line:#dfe2dd; --line-soft:#e9ebe7; --line-strong:#cbd0ca;
  --accent:#24503d; --accent-hi:#1b3e2f; --accent-ink:#24503d; --accent-soft:#e3ece6; --ring:rgba(36,80,61,.22); --on-accent:#f4f8f5;
  --band:#17302a; --band-ink:#e9efeb; --band-ink-2:#9fb3a8; --band-line:rgba(159,208,181,.13);
  --danger:#972d2d; --danger-soft:#f5e4e4; --danger-border:#e3c2c2;
  --warn:#7f5410; --warn-soft:#f3ead9;
  --shadow-card:0 1px 2px rgba(22,29,25,.05),0 24px 60px -24px rgba(22,29,25,.35);
  --font:"Clarity City",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --r:8px; --r-card:14px;
  --ease:cubic-bezier(.16,1,.3,1);
  color-scheme:light;
  background:var(--bg);
}
html.av-auth[data-theme="dark"]{
  --bg:#0e1311; --surface:#131917; --surface-2:#18201d; --surface-3:#1f2824;
  --ink:#e6ece8; --ink-2:#bac4be; --ink-3:#8c978f; --ink-4:#7d8881;
  --line:#242d29; --line-soft:#1c2421; --line-strong:#323d38;
  --accent:#8cc3a6; --accent-hi:#a5d3ba; --accent-ink:#9fd0b5; --accent-soft:#18281f; --ring:rgba(140,195,166,.28); --on-accent:#0e1311;
  --band:#112019; --band-ink:#e6ece8; --band-ink-2:#83968b; --band-line:rgba(140,195,166,.09);
  --danger:#e48d8d; --danger-soft:#2e1818; --danger-border:#5a2e2e;
  --warn:#d8ad68; --warn-soft:#2a2214;
  --shadow-card:0 0 0 1px rgba(255,255,255,.03),0 30px 70px -20px rgba(0,0,0,.8);
  color-scheme:dark;
}

html.av-auth *{box-sizing:border-box}
html.av-auth body{margin:0;min-height:100dvh;background:var(--bg);color:var(--ink);font:14px/1.5 var(--font);-webkit-font-smoothing:antialiased;font-variant-numeric:lining-nums;position:relative}
html.av-auth body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.5;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08  0 0 0 0 .1  0 0 0 0 .15  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
html.av-auth .dialog-off-canvas-main-canvas{min-height:100dvh;display:flex;flex-direction:column}
html.av-auth button,html.av-auth input{font:inherit;color:inherit}
html.av-auth .av-ic{width:16px;height:16px;flex:none}

/* The band: the dashboard header colour grown into a field; arches echo the old login. */
html.av-auth .av-band{position:absolute;inset:0 0 auto 0;height:min(46vh,420px);background:var(--band);overflow:hidden;z-index:0}
html.av-auth .av-band svg{position:absolute;left:50%;bottom:-2px;width:max(1600px,120vw);height:auto;transform:translateX(-50%);color:var(--band-line)}
html.av-auth .av-band::after{content:"";position:absolute;inset:auto 0 0 0;height:120px;background:linear-gradient(to bottom,transparent,rgba(0,0,0,.12))}

html.av-auth .av-theme{position:absolute;top:16px;right:16px;z-index:2;display:grid;place-items:center;width:36px;height:36px;padding:0;border-radius:var(--r);border:0;background:transparent;color:var(--band-ink-2);cursor:pointer;transition:background .15s,color .15s}
html.av-auth .av-theme:hover{background:rgba(255,255,255,.07);color:var(--band-ink)}
html.av-auth .av-theme:focus-visible{outline:2px solid var(--band-ink-2);outline-offset:2px}

html.av-auth .av-auth-main{position:relative;z-index:1;flex:1;display:flex;flex-direction:column;align-items:center;padding:clamp(48px,11vh,112px) 16px 24px}

html.av-auth .av-lockup{display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:26px;color:var(--band-ink);text-align:center}
/* The logo's chat bubble (not a circle): the shadow follows its shape. */
html.av-auth .av-lockup img{width:56px;height:56px;display:block;filter:saturate(.72) brightness(.97) drop-shadow(0 8px 14px rgba(0,0,0,.4))}
html.av-auth .av-lockup b{font-size:20px;font-weight:700;letter-spacing:.02em;line-height:1}
html.av-auth .av-lockup span{font-size:13px;color:var(--band-ink-2);margin-top:-4px}

html.av-auth .av-card{width:100%;max-width:400px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-card);padding:30px 30px 26px;animation:av-rise .6s var(--ease) both}
@keyframes av-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
/* The firm this tenant's sign-in page belongs to (tenant sites only). */
html.av-auth .av-firm{text-align:center;margin:0 0 18px;padding:0 0 16px;border-bottom:1px solid var(--line-soft);color:var(--ink-2);font-weight:600;font-size:16px;line-height:1.3;text-wrap:balance}
html.av-auth .av-card h1{margin:0 0 4px;font-size:21px;font-weight:600;letter-spacing:-.015em;color:var(--ink)}
html.av-auth .av-lead{margin:0 0 22px;color:var(--ink-3);font-size:13.5px;text-wrap:pretty}

/* Drupal status messages (core markup has no type classes) → the mockup's alert */
html.av-auth [data-drupal-messages] > [role="contentinfo"]{display:flex;gap:9px;align-items:flex-start;padding:10px 12px;margin:0 0 18px;border:1px solid var(--line);background:var(--accent-soft);color:var(--accent-ink);border-radius:var(--r);font-size:13px;line-height:1.4}
html.av-auth [data-drupal-messages] > [role="contentinfo"]::before{content:"";flex:none;width:16px;height:16px;margin-top:1px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E") no-repeat center/contain;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E") no-repeat center/contain}
html.av-auth [data-drupal-messages] > [role="contentinfo"]:has([role="alert"]){border-color:var(--danger-border);background:var(--danger-soft);color:var(--danger)}
html.av-auth [data-drupal-messages] > [role="contentinfo"][aria-label="Warning message"]{background:var(--warn-soft);color:var(--warn)}
html.av-auth [data-drupal-messages] > [role="contentinfo"] a{color:inherit;text-decoration:underline;text-underline-offset:2px}
html.av-auth [data-drupal-messages] > [role="contentinfo"] ul{margin:0;padding-left:16px}
html.av-auth .block-local-tasks-block,html.av-auth nav.tabs{display:none}

/* Fields */
html.av-auth .av-card form{margin:0}
html.av-auth .av-card .form-item{position:relative;margin:0 0 16px}
html.av-auth .av-card .form-item > label,html.av-auth .av-row > label{display:block;font-size:12.5px;font-weight:600;color:var(--ink-2);margin:0 0 6px}
html.av-auth .av-card .form-required::after{content:none}
html.av-auth .av-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
html.av-auth .av-row .av-link{white-space:nowrap}
html.av-auth .av-card input.form-text,html.av-auth .av-card input.form-email,html.av-auth .av-card input[type="password"]{width:100%;height:42px;margin:0;padding:0 12px 0 38px;border:1px solid var(--line-strong);border-radius:var(--r);background:var(--surface);color:var(--ink);font-size:14px;box-shadow:0 1px 2px rgba(22,29,25,.04);transition:border-color .15s,box-shadow .15s}
html.av-auth .av-card input::placeholder{color:var(--ink-4)}
html.av-auth .av-card input.form-text:hover,html.av-auth .av-card input.form-email:hover,html.av-auth .av-card input[type="password"]:hover{border-color:var(--ink-4)}
html.av-auth .av-card input.form-text:focus,html.av-auth .av-card input.form-email:focus,html.av-auth .av-card input[type="password"]:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
html.av-auth .av-card .description{margin-top:6px;font-size:12.5px;color:var(--ink-3)}

/* Leading icons (user / lock), centred on the 42px input at the bottom of the field */
html.av-auth .av-inp{position:relative}
html.av-auth .av-inp > .av-ic{position:absolute;left:12px;top:50%;margin-top:-8px;color:var(--ink-4);pointer-events:none;transition:color .15s}
html.av-auth .av-inp:focus-within > .av-ic{color:var(--accent-ink)}
html.av-auth .av-inp.pw input{padding-right:44px}
html.av-auth .av-peek{position:absolute;right:4px;top:50%;margin-top:-17px;width:34px;height:34px;display:grid;place-items:center;padding:0;border:0;border-radius:6px;background:none;color:var(--ink-3);cursor:pointer}
html.av-auth .av-peek:hover{background:var(--surface-3);color:var(--ink)}
html.av-auth .av-peek:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}

html.av-auth .form-item.av-bad input,html.av-auth .av-card input.error{border-color:var(--danger)}
html.av-auth .form-item.av-bad input:focus,html.av-auth .av-card input.error:focus{border-color:var(--danger);box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 22%,transparent)}
html.av-auth .av-err,html.av-auth .av-caps{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:12.5px;color:var(--danger)}
html.av-auth .av-caps{color:var(--warn)}
html.av-auth .av-err .av-ic,html.av-auth .av-caps .av-ic{width:14px;height:14px}

html.av-auth .av-link{color:var(--accent-ink);font-size:12.5px;font-weight:500;text-decoration:none;border-radius:3px}
html.av-auth .av-link:hover{text-decoration:underline;text-underline-offset:3px}
html.av-auth .av-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* Without JS the "forgot password" link stays under the password field. */
html.av-auth .form-item + .av-forgot{display:block;margin:-8px 0 16px;text-align:right}

/* Submit (Drupal renders an <input>, so the spinner sits on its wrapper) */
html.av-auth .av-card .form-actions{position:relative;margin:4px 0 0;display:flex;align-items:center;justify-content:center}
html.av-auth .av-card .form-actions .form-submit{width:100%;height:44px;margin:0;padding:0 16px;border:1px solid var(--accent);border-radius:var(--r);background:var(--accent);color:var(--on-accent);font-size:14.5px;font-weight:600;cursor:pointer;box-shadow:0 1px 2px rgba(22,29,25,.14),inset 0 1px 0 rgba(255,255,255,.12);transition:background .15s,transform .1s}
html.av-auth .av-card .form-actions .form-submit:hover{background:var(--accent-hi)}
html.av-auth .av-card .form-actions .form-submit:active{transform:translateY(1px)}
html.av-auth .av-card .form-actions .form-submit:focus-visible{outline:none;box-shadow:0 0 0 3px var(--ring)}
html.av-auth .av-card .form-actions .form-submit + .form-submit,html.av-auth .av-card .form-actions .button + a{margin-left:8px}
html.av-auth .av-card .form-actions a{color:var(--accent-ink);font-size:13px;white-space:nowrap}
html.av-auth .av-card .form-actions.av-busy .form-submit{color:transparent;cursor:progress}
html.av-auth .av-card .form-actions.av-busy::after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;border:2px solid var(--on-accent);border-right-color:transparent;animation:av-sp .7s linear infinite}
@keyframes av-sp{to{transform:rotate(360deg)}}

html.av-auth .av-secure{display:flex;align-items:center;justify-content:center;gap:7px;margin:18px 0 0;padding-top:16px;border-top:1px solid var(--line-soft);font-size:12px;color:var(--ink-3);text-align:center}
html.av-auth .av-secure .av-ic{width:14px;height:14px;color:var(--ink-4)}
html.av-auth .av-help{margin:20px 0 0;font-size:13px;color:var(--ink-3);text-align:center}
html.av-auth .av-help + .av-help{margin-top:8px}

html.av-auth .av-auth-foot{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:10px 24px;flex-wrap:wrap;max-width:1360px;width:100%;margin:0 auto;padding:16px 32px 22px;font-size:12.5px;color:var(--ink-3)}
html.av-auth .av-made-by{display:inline-flex;align-items:center;gap:6px;color:inherit;text-decoration:none;border-radius:3px}
html.av-auth .av-shaka{display:inline-block;width:78px;height:14px;background:var(--ink-2);-webkit-mask:var(--shaka) no-repeat center/contain;mask:var(--shaka) no-repeat center/contain;transition:background .2s}
html.av-auth .av-made-by:hover .av-shaka{background:var(--ink)}
html.av-auth .av-auth-foot a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

@media (max-width:520px){
  html.av-auth .av-card{padding:24px 20px 22px}
  html.av-auth .av-auth-foot{justify-content:center;padding:14px 16px 20px}
}
@media (prefers-reduced-motion:reduce){html.av-auth .av-card{animation:none}html.av-auth .av-card .form-actions.av-busy::after{animation-duration:1.6s}}

/* The name in the logo's light typeface (an image cut from the logo, in the band's white). */
html.av-auth .av-lockup img.av-wordmark{width:auto;height:26px;filter:none}
