/* Shared by the client portal and the admin: app tile, spacing tokens, sign-in family.
   One tile style in both apps: ink square, 32px, radius 10px, white glyph. Only the glyph changes. */
#A{
  /* proximity: related items sit closer, groups sit further, unrelated sections further still */
  --sp-rel:8px;--sp-grp:16px;--sp-sec:30px;
  /* SHAPE RULE: a clickable thing is a pill (--pill) or a round icon button; a thing that is NOT clickable
     (tag, status chip, badge, counter, hint, tooltip, toast, step, label) is a small-radius rectangle (--r-static) and has no
     hover, no press, no focus ring. One token, so a tag can never be mistaken for a button. Avatars, status dots and icon tiles are exempt. */
  --r-static:5px;
}
#A[data-app="admin"]{--sp-rel:6px;--sp-grp:12px;--sp-sec:22px}
#A .brand b.apptile,#A .apptile{width:32px;height:32px;border-radius:10px;background:var(--ink);color:#fff;display:grid;place-items:center;flex:none}
#A .apptile svg{width:20px;height:20px}
#A .apptile.lg{width:52px;height:52px;border-radius:16px}#A .apptile.lg svg{width:32px;height:32px}

/* ===== sign-in family: portal (code + provider) and admin (provider only) ===== */
#A.authmode>*:not(#auth){display:none!important}
#auth{display:none}
#A.authmode #auth{display:flex;min-height:100dvh;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-sec);padding:24px 16px 40px}
#A .au-card{width:min(400px,100%);background:var(--surface);border-radius:var(--card);padding:28px 26px 24px;display:flex;flex-direction:column;gap:var(--sp-grp);box-shadow:var(--sh2)}#A .au-card.in{animation:aIn .2s ease-out}
#A .au-head{display:flex;flex-direction:column;align-items:flex-start;gap:var(--sp-rel)}
#A .au-head .apptile{margin-bottom:var(--sp-rel)}
#A .au-card h1{font-size:var(--t-h1,26px);line-height:1.2;font-weight:600;letter-spacing:-.2px}
#A .au-card .au-sub{font-size:var(--t-body,16px);color:var(--ink2);line-height:1.5}
#A .au-fld{display:flex;flex-direction:column;gap:6px}
#A .au-fld label{font-size:var(--t-xs,13.5px);font-weight:600;color:var(--ink2)}
#A .au-fld input{height:46px;border:0;border-radius:var(--pill);background:var(--wash);padding:0 18px;font:inherit;font-size:var(--t-body,16px);color:var(--ink);width:100%;direction:ltr;text-align:left}
#A .au-fld input.code{text-align:center;letter-spacing:3px;font-weight:600;text-transform:uppercase}
#A .au-fld input::placeholder{color:#8A8A90;letter-spacing:0;font-weight:400}
#A .au-fld input[aria-invalid=true]{box-shadow:inset 0 0 0 1.5px #B3261A;background:#FFF6F4}
#A .au-fld small{font-size:var(--t-xs,13.5px);color:var(--ink3);line-height:1.4}
#A .au-btns{display:flex;flex-direction:column;gap:var(--sp-rel)}
#A .au-btn{height:46px;border-radius:var(--pill);display:flex;align-items:center;justify-content:center;gap:10px;font-weight:600;font-size:var(--t-sm,15px);background:var(--wash);color:var(--ink);width:100%;transition:background .12s,transform .08s}
#A .au-btn:hover{background:#E4E4E4}#A .au-btn:active{transform:scale(.98)}
#A .au-btn.pri{background:var(--ink);color:#fff}#A .au-btn.pri:hover{background:#2B2B2E}
#A .au-btn[disabled]{opacity:.5;cursor:not-allowed}
#A .au-btn svg{width:20px;height:20px}
#A .au-or{display:flex;align-items:center;gap:12px;color:var(--ink3);font-size:var(--t-xs,13.5px)}#A .au-or::before,#A .au-or::after{content:"";flex:1;height:1px;background:var(--line)}
#A .au-note{display:flex;gap:10px;align-items:flex-start;border-radius:var(--row,14px);padding:10px 12px;font-size:var(--t-sm,15px);line-height:1.45;background:var(--wash);color:var(--ink)}
#A .au-note svg{margin-top:2px}#A .au-note.err{background:var(--red-soft);color:#6B1A0E}#A .au-note.ok{background:var(--gold-soft);color:var(--gold-ink)}
#A .au-note b{font-weight:600}
#A .au-link{font-size:var(--t-sm,15px);color:var(--ink2);text-decoration:underline;text-underline-offset:3px;text-align:center;align-self:center;padding:6px 4px}#A .au-link:hover{color:var(--ink)}
#A .au-foot{font-size:var(--t-xs,13.5px);color:var(--ink3);text-align:center;line-height:1.5}
#A .au-mail{direction:ltr;unicode-bidi:isolate;font-weight:600}
#A .au-demo{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;max-width:560px}
#A .au-demo .lbl{width:100%;text-align:center;font-size:var(--t-xs,13.5px);color:var(--ink3)}
#A .au-demo button{height:30px;padding:0 12px;border-radius:var(--pill);background:var(--surface);font-size:var(--t-xs,13.5px);font-weight:600;color:var(--ink2)}#A .au-demo button[aria-pressed=true]{background:var(--ink);color:#fff}
#A .au-done{width:52px;height:52px;border-radius:16px;background:var(--gold);color:var(--ink);display:grid;place-items:center}
@media (max-width:480px){#A.authmode #auth{justify-content:flex-start;padding-top:24px}#A .au-card{padding:24px 18px 20px}}
@media (prefers-reduced-motion:reduce){#A .au-card.in{animation:none}#A .au-spin{animation:none}}
#A #au-h:focus{outline:none}
#A a.signout{text-decoration:none}

#A .au-lock{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:12px 14px;border-radius:var(--row,14px);background:var(--wash)}#A .au-lock b{font-size:30px;letter-spacing:1px;font-variant-numeric:tabular-nums;direction:ltr}#A .au-lock small{font-size:var(--t-xs,13.5px);color:var(--ink3)}
#A .au-demo .sep{width:1px;height:20px;background:#C4C4C8;margin:0 4px}
#A .au-foot a{color:var(--ink2);text-decoration:underline;text-underline-offset:3px}

/* busy spinner, honest-state parts, deep-link chip, demo rows */
#A .au-spin{width:18px;height:18px;border-radius:50%;border:2.5px solid currentColor;border-top-color:transparent;animation:auspin .8s linear infinite;flex:none}
@keyframes auspin{to{transform:rotate(360deg)}}
#A .au-btn[aria-busy=true]{opacity:1;cursor:progress}#A .au-btn.pri[aria-busy=true]{background:#2B2B2E}#A .au-btn:not(.pri)[aria-busy=true]{color:var(--ink2)}
#A .au-fld input[readonly]{color:var(--ink2)}
#A .au-next{display:flex;gap:10px;align-items:flex-start;border-radius:var(--row,14px);padding:10px 12px;font-size:var(--t-sm,15px);line-height:1.45;background:var(--wash);color:var(--ink)}#A .au-next svg{margin-top:2px}#A .au-next b{font-weight:600}
#A .au-tips{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--sp-rel)}
#A .au-tips li{display:flex;gap:10px;align-items:flex-start;font-size:var(--t-sm,15px);line-height:1.45;color:var(--ink2)}#A .au-tips svg{margin-top:2px;color:var(--ink)}
#A .au-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#A .au-drow{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;width:100%;margin-top:6px}
#A .au-demo .au-drow .lbl{font-weight:600}
/* a disabled button that carries information (countdown, "request a new link") must stay readable: AA, not a 50% fade */
#A .au-btn[disabled]:not(.pri):not([aria-busy=true]){opacity:1;color:var(--ink2)}
#A .au-btn.pri[disabled]:not([aria-busy=true]){opacity:1;background:#6B6B70;color:#fff}
