/* What every page shares: the design tokens, the base of the document and the
   TRACTIAN top bar with its two menus. The access pages (login, recovery,
   administration) load before a session exists, so this sheet is public: it
   says nothing about the collections. dashboard.css and auth.css come after
   it and hold what is theirs alone. */
:root{--text-2xs:.8125rem;--text-xs:.875rem;--text-sm:.9375rem;--text-base:1rem;--text-md:1.0625rem;--text-lg:1.125rem;--text-xl:1.25rem;--text-2xl:1.5rem;--text-3xl:1.75rem;--leading-tight:1.3;--leading-normal:1.5;--leading-loose:1.6;--space-1:.25rem;--space-2:.5rem;--space-3:.75rem;--space-4:1rem;--space-5:1.25rem;--space-6:1.5rem;--space-8:2rem;--space-10:2.5rem;--section-gap:var(--space-5);--field-min:12rem;--content-max:120rem;--control-h:2.75rem;--control-h-sm:2.5rem;--header-h:3.5rem;--header-bg:#17192c;--header-border:#34375c;--header-active:#0d2853;--header-ink:#b9bac0;--header-ink-subtle:#8b8d9a;--header-hover:rgba(255,255,255,.06);--header-focus:#4386f7;--bg:#f3f6f8;--surface:#fff;--ink:#17212b;--muted:#5c6a78;--border:#dce4ea;--blue:#0067b9;--blue-soft:#e8f3fb;--orange:#d65f00;--orange-soft:#fff1e6;--teal:#187a72;--purple:#7254a5;--gold:#a46b12;--danger:#a53c2d;--shadow:0 8px 24px rgba(30,49,66,.07);--radius:14px;--radius-sm:10px;--radius-xs:8px;--font-sans:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,monospace;--replay-canvas-h:45rem;font-family:var(--font-sans);color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-size:var(--text-base);line-height:var(--leading-normal)}
button,input,select{font:inherit}
button{cursor:pointer}

/* The page is written in Portuguese and stays hidden until it has been put in
   the chosen language, so nobody reads a flash of the wrong one. On the
   dashboard the inline script in <head> gives up after four seconds
   regardless. */
html[data-i18n-pending] body{visibility:hidden}

/* The way past the top bar for whoever arrives by keyboard. It sits above the
   bar: under it, the focused link was there and nobody could see it. */
.skip-link{position:absolute;left:-999px;top:8px;padding:8px;background:#fff}
.skip-link:focus{left:8px;z-index:50}

/* Top bar. The logo and the controls on the right never give way; on the
   dashboard the navigation and the title between them do (dashboard.css). */
.app-header{position:sticky;top:0;z-index:30;height:var(--header-h);display:flex;align-items:center;gap:var(--space-6);padding:0 var(--space-6);border-bottom:1px solid var(--header-border);background:var(--header-bg);color:#fff}
.brand{display:flex;flex:none;align-items:center;border-radius:4px;color:#fff}
.brand-logo{display:block;width:clamp(6rem,30vw,9.375rem);aspect-ratio:15/2;background:currentColor;-webkit-mask:url(logo-tractian-wide.svg) center/contain no-repeat;mask:url(logo-tractian-wide.svg) center/contain no-repeat}
.header-actions{display:flex;flex:none;align-items:center;gap:var(--space-3);margin-left:auto}
.header-icon-button{display:grid;flex:none;place-items:center;min-width:2rem;min-height:2rem;padding:0;border:0;border-radius:6px;background:transparent;color:var(--header-ink)}
.header-icon-button:hover{background:var(--header-hover);color:#fff}
.header-icon-button svg{width:1.125rem;height:1.125rem;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.app-header :focus-visible{outline:2px solid var(--header-focus);outline-offset:2px}
@media(max-width:760px){.app-header{gap:var(--space-4);padding-inline:var(--space-4)}.header-actions{gap:var(--space-2)}}
@media(max-width:400px){.header-actions{gap:var(--space-1)}}

/* The menus of the top bar: the language and the account open the same panel
   with the same rows, and header_menu.mjs gives both the same keys. */
.header-menu{position:relative;flex:none}
.header-menu[hidden],.header-menu-list[hidden]{display:none}
.header-menu-list{position:absolute;top:calc(100% + var(--space-2));right:0;z-index:40;min-width:11rem;margin:0;padding:var(--space-1);border:1px solid var(--header-border);border-radius:8px;background:var(--header-bg);box-shadow:0 12px 32px rgba(10,12,24,.35);list-style:none}
.header-menu-item{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:2.25rem;padding:0 var(--space-3);border:0;border-radius:6px;background:transparent;color:var(--header-ink);font-size:var(--text-sm);font-weight:400;line-height:var(--leading-tight);text-align:left;text-decoration:none;white-space:nowrap}
.header-menu-item:hover,.header-menu-item:focus-visible{background:var(--header-hover);color:#fff}
.header-menu-item[aria-checked="true"]{background:var(--header-active);color:#fff}
.header-menu-item:focus-visible{outline:2px solid var(--header-focus);outline-offset:-2px}
.header-menu-item:disabled{opacity:.55;cursor:default}
.header-menu-separator{height:1px;margin:var(--space-1) 0;background:var(--header-border)}

/* Language: the flag and the code of the one in use, each one named in its
   own words in the list. */
.lang-button{display:flex;align-items:center;gap:var(--space-2);min-height:2rem;padding:0 var(--space-2);border:0;border-radius:6px;background:transparent;color:var(--header-ink);font-size:var(--text-sm);font-weight:500}
.lang-button:hover,.lang-button[aria-expanded="true"]{background:var(--header-hover);color:#fff}
.lang-flag{display:block;flex:none;width:1.25rem;height:.9375rem;border-radius:2px;box-shadow:0 0 0 1px rgba(255,255,255,.2);object-fit:cover}
.lang-code{letter-spacing:.04em}
.lang-caret{width:.875rem;height:.875rem;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s ease}
.lang-button[aria-expanded="true"] .lang-caret{transform:rotate(180deg)}
.lang-name{flex:1}
.lang-short{color:var(--header-ink-subtle);font-size:var(--text-2xs);letter-spacing:.06em}
.header-menu-item[aria-checked="true"] .lang-short{color:var(--header-ink)}
@media(prefers-reduced-motion:reduce){.lang-caret{transition:none}}

/* Account: one icon in the bar. Who is signed in, the password, the
   administration and the way out wait under it, so the bar keeps its room
   for the navigation whatever the length of the address. */
.account-button{display:grid;flex:none;place-items:center;min-width:2rem;min-height:2rem;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff}
.account-button:hover,.account-button[aria-expanded="true"]{background:rgba(255,255,255,.24)}
.account-button svg{width:1.125rem;height:1.125rem;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.account-list{width:max-content;min-width:14rem;max-width:min(22rem,calc(100vw - var(--space-8)))}
.account-identity{display:grid;gap:.125rem;margin-bottom:var(--space-1);padding:var(--space-2) var(--space-3) var(--space-3);border-bottom:1px solid var(--header-border)}
.account-caption{color:var(--header-ink-subtle);font-size:var(--text-2xs);line-height:var(--leading-tight)}
.account-email{color:#fff;font-size:var(--text-sm);font-weight:600;line-height:var(--leading-tight);overflow-wrap:anywhere}
