/* Shared layout for the sign-in, Settings and Reports pages. */
html,body{overflow:auto}
.auth{display:grid;place-items:center;min-height:100vh;background:var(--desk)}
.auth-card{width:min(360px,92vw);background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:26px 26px 18px}
.auth-card .brand{margin-bottom:18px}
.auth-card h1{font-size:calc(16px*var(--z));margin:0 0 14px;font-weight:600}
.auth-card label{display:grid;gap:5px;margin-bottom:12px;color:var(--muted);font-size:calc(11px*var(--z))}
.auth-card .in{height:calc(32px*var(--z));font-size:calc(12px*var(--z));padding:0 9px;background:var(--surface-2)}
.auth-card .ctl.primary{width:100%;height:calc(32px*var(--z));justify-content:center}
.auth-card .err{color:var(--neg);min-height:calc(16px*var(--z));font-size:calc(11px*var(--z));margin:0 0 8px}
.auth-card .foot{color:var(--faint);font-size:calc(10px*var(--z));margin:16px 0 0;text-align:center}
.page-top{height:calc(40px*var(--z));display:flex;align-items:center;gap:10px;padding:0 14px;border-bottom:1px solid var(--line);background:var(--surface)}
.page-top a{text-decoration:none}
.shell{display:grid;grid-template-columns:220px 1fr}
.shell aside{border-right:1px solid var(--line);padding:10px 8px;background:var(--surface);overflow:auto}
.shell aside button{display:block;width:100%;border:0;background:none;text-align:left;padding:7px 10px;border-radius:4px;color:color-mix(in srgb,var(--fg) 85%,var(--surface));cursor:pointer;font-size:calc(11px*var(--z))}
.shell aside button:hover{background:var(--surface-2);color:var(--fg)}
.shell aside button.on{background:var(--surface-2);color:var(--fg);font-weight:500}
/* Group headers sit quieter than the items and a faint rule opens each new group, so groups read apart at a glance. */
.shell aside .mh{color:var(--faint);font-weight:600;padding:6px 10px 3px}
.shell aside .mh:not(:first-child){margin-top:4px;padding-top:8px;border-top:1px solid var(--line)}
.settings main{padding:26px 36px;max-width:900px}
.settings h1{font-size:calc(18px*var(--z));font-weight:600;margin:0 0 4px}
.settings .lead{color:var(--muted);margin:0 0 16px}
.srow{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:46px;border-bottom:1px solid var(--line);padding:6px 0}
.srow small{display:block;color:var(--muted);font-size:calc(10px*var(--z));margin-top:2px}
.srow .in{height:calc(26px*var(--z));width:230px;font-size:calc(11px*var(--z))}
.srow .acts{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.panel{border:1px solid var(--line);border-radius:6px;padding:12px 14px;margin:12px 0;background:var(--surface)}
.panel h3{margin:0 0 8px;font-size:calc(12px*var(--z))}
.panel .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.panel label{display:grid;gap:4px;font-size:calc(10px*var(--z));color:var(--muted)}
.panel .in{height:calc(26px*var(--z));font-size:calc(11px*var(--z));width:100%}
.panel textarea.in{height:120px;font:10.5px var(--mono);padding:6px}
.notice{color:var(--warn);font-size:calc(10.5px*var(--z))}
.okmsg{color:var(--pos);font-size:calc(10.5px*var(--z))}
.code{font:11px var(--mono);background:var(--surface-2);padding:6px 8px;border-radius:4px;word-break:break-all;user-select:all}
[hidden]{display:none!important}
/* Connections: in-row sync progress and open panel buttons */
.syncing{display:flex;align-items:center;gap:8px;margin:6px 0 0}
.spin{flex:none;width:calc(12px*var(--z));height:calc(12px*var(--z));border:2px solid var(--line-2);border-top-color:var(--accent);border-radius:50%;animation:tm-spin .8s linear infinite}
@keyframes tm-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spin{animation:none}}
.ctl.btn[aria-expanded="true"]{background:var(--accent-weak);border-color:var(--accent)}
.panel.mfa{display:flex;gap:16px;align-items:flex-start}.panel.mfa>div:last-child{flex:1;min-width:0}
.panel.mfa .qr{flex:none;width:168px;height:168px;border-radius:6px;overflow:hidden}.panel.mfa .qr svg{display:block;width:100%;height:100%}  /* white quiet zone stays for scanners in dark mode */
@media (max-width:600px){.panel.mfa{flex-direction:column;align-items:center}}
.auth-card .fld{display:flex;gap:4px;align-items:center}.auth-card .fld .in{flex:1;min-width:0}
.auth-card .codes{display:grid;grid-template-columns:repeat(2,1fr);gap:6px 16px;margin:10px 0;font-family:var(--mono, ui-monospace, monospace);font-size:calc(13px*var(--z));color:var(--fg)}
/* Preserve the established compact settings typography and component sizes. */
.settings-pane{min-width:0}.settings-mobile-nav{display:none}
.settings .settings-content{min-width:0}.settings .settings-content table{display:block;overflow-x:auto;max-width:100%}
.settings .srow>div:first-child{min-width:0}.settings .srow .acts{max-width:60%}
.settings .recovery-notice{border-color:var(--warn)}
.mfa-link{display:inline-flex;margin:8px 0;max-width:100%}
@media(max-width:800px){
 .settings .shell{grid-template-columns:minmax(0,1fr)}.settings .shell aside{display:none}
 .settings-mobile-nav{display:grid;gap:4px;padding:10px 14px 0;color:var(--muted)}
 .settings main{padding:18px 14px}.settings .page-top #who{max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .settings .srow{align-items:flex-start;flex-direction:column;gap:6px}.settings .srow .acts{max-width:100%;width:100%;justify-content:flex-start}
 .settings .srow .in{max-width:100%}.settings .panel .grid{grid-template-columns:minmax(0,1fr)}
}
