.auth-shell{min-height:100dvh;max-width:none;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 18px;background:var(--cream)}.auth-card{width:100%;max-width:440px;padding:34px;border:1px solid var(--line);border-radius:18px;background:var(--card,#fff);box-shadow:0 18px 60px #123a2110}.auth-brand{display:flex;align-items:center;gap:10px;font-size:22px;font-weight:750;color:var(--ink)}.auth-brand>span{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--green);color:#fff}.auth-card h1{font-size:27px;margin:28px 0 10px}.auth-card p{color:var(--muted);font-size:13px;line-height:1.7}.auth-card label{display:flex;flex-direction:column;gap:7px;margin:18px 0;font-size:13px;color:var(--ink)}.auth-card input{min-height:46px;padding:10px 12px;width:100%;font-size:16px}.auth-card form>.button{width:100%;font-size:14px}.auth-message{min-height:24px;overflow-wrap:anywhere}.auth-links{display:flex;flex-wrap:wrap;gap:14px;margin-top:20px}.auth-links button{font-size:12px;color:var(--accent,var(--green));padding:4px 0}.auth-foot{font-size:12px;color:var(--muted);margin-top:22px}.legacy-backups:not(:empty){border-top:1px solid var(--line);margin-top:24px;padding-top:10px}.legacy-backups button{display:block;text-align:left;overflow-wrap:anywhere}.cloud-bar{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);z-index:60;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 14px;max-width:95vw;width:max-content;padding:8px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card,#fff);color:var(--ink);box-shadow:0 4px 18px #0001;font-size:11px}.cloud-bar span:first-child{max-width:180px;overflow:hidden;text-overflow:ellipsis}.cloud-bar button{font-size:11px;color:var(--accent,var(--green));text-decoration:underline}.cloud-error{border-color:#ba4c35;color:#ba4c35}.cloud-error span[role=status]{max-width:380px}@media(max-width:700px){.cloud-bar{bottom:70px;padding:6px 10px;font-size:10px}.auth-card{padding:25px}.cloud-bar span:first-child{max-width:145px}}
.auth-password-control{position:relative;margin-top:-11px}.auth-password-control input{min-width:0;width:100%;padding-right:52px}.auth-password-control button{position:absolute;right:1px;top:1px;bottom:1px;width:44px;min-height:44px;display:grid;place-items:center;padding:0;border:0;border-radius:7px;color:var(--accent,var(--green));background:transparent}.auth-password-control button svg{width:22px;height:22px;pointer-events:none}.auth-card .auth-password-note{font-size:11px;margin:7px 0 0}
/* Company access management */
body.access-open{overflow:hidden}.access-overlay{position:fixed;inset:0;z-index:10000;background:#0a201966;backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:16px}.access-dialog{background:var(--card,#fff);color:var(--ink,#142f28);width:min(800px,100%);max-height:calc(100dvh - 32px);border:1px solid var(--line,#d6e3df);border-radius:18px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 70px #09291c33}.access-header{padding:22px 24px 16px;display:flex;gap:12px;justify-content:space-between;border-bottom:1px solid var(--line,#d6e3df)}.access-header h2{font-size:24px;margin:5px 0}.access-header p,.access-help{font-size:13px;color:var(--muted,#56746c);line-height:1.5;margin:6px 0}.access-body{padding:0 24px 22px;overflow:auto;overscroll-behavior:contain;min-height:0}.access-body h3{font-size:17px;margin:0 0 14px}.access-inbox,.access-invite,.access-members{padding-top:22px}.access-inbox article,.access-member{padding:16px;border:1px solid var(--line,#d6e3df);border-radius:12px;margin:10px 0;background:var(--surface,#f4f8f6)}.access-inbox p,.access-member p{margin:4px 0;font-size:13px;color:var(--muted,#56746c)}.access-member b,.access-inbox b{overflow-wrap:anywhere}.access-inbox small,.access-member small{font-size:12px;color:var(--muted,#56746c);line-height:1.5}.access-companies{border:1px solid var(--line,#d6e3df);border-radius:10px;padding:12px;margin:14px 0}.access-companies legend{font-size:13px;padding:0 5px}.access-companies label,.permission-checks label{display:flex;align-items:center;gap:9px;font-size:13px;line-height:1.5;padding:7px 0}.access-dialog input[type=checkbox]{width:17px;height:17px;min-height:17px;flex-shrink:0;accent-color:#087f5b}.permission-checks{display:grid;grid-template-columns:1fr 1fr;gap:0 18px;padding:10px 0}.access-dialog summary{cursor:pointer;font-size:13px;font-weight:600;padding:10px 0}.access-permissions{margin:12px 0;border-bottom:1px solid var(--line,#d6e3df)}.access-permissions p{font-size:12px;color:var(--muted,#56746c)}.access-list-heading,.access-member-heading{display:flex;align-items:start;justify-content:space-between;gap:12px}.access-list-heading .field{max-width:280px;min-width:160px;font-size:12px}.access-state{font-size:11px;line-height:1.5;padding:4px 8px;border-radius:7px;background:#e2eae6;color:#426058;flex-shrink:0}.access-state.active{background:#d8f4e9;color:#075a40}.access-state.pending{background:#fff0cc;color:#735113}.access-actions{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-top:12px}.access-footer{border-top:1px solid var(--line,#d6e3df);padding:12px 24px;display:flex;justify-content:space-between;gap:12px;align-items:center}.access-footer span{font-size:12px;color:var(--muted,#56746c)}.access-empty{padding:20px 4px;color:var(--muted,#56746c);font-size:14px;line-height:1.6}.access-message{font-size:13px;line-height:1.5;overflow-wrap:anywhere}.access-message:empty{display:none}.access-confirm{padding:10px;margin-top:12px;border:1px solid #c87f72;border-radius:8px}.access-entry-button{white-space:nowrap}.company-access-badge{font-size:11px;color:var(--muted)}
@media(max-width:600px){.access-overlay{padding:8px}.access-dialog{max-height:calc(100dvh - 16px);border-radius:13px}.access-header{padding:16px}.access-header h2{font-size:21px}.access-body{padding:0 16px 16px}.access-footer{padding:10px 16px}.permission-checks{grid-template-columns:1fr}.access-list-heading{flex-direction:column}.access-list-heading .field{max-width:none;width:100%}.access-member-heading{flex-wrap:wrap}.access-footer span{max-width:180px}}
body.account-security-open{overflow:hidden}.account-security-dialog{width:min(480px,100%)}.account-settings-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px}.account-password-form{padding-top:18px}.account-password-form>label{display:block;font-size:13px;margin:16px 0 7px}.account-password-form .auth-password-control input{width:100%;min-height:46px;font-size:16px}.account-password-form .auth-password-note{font-size:12px;line-height:1.6;color:var(--muted)}.account-password-form .security-message{font-size:13px;line-height:1.5;min-height:20px}.account-password-form .access-actions{justify-content:flex-end;padding-bottom:2px}.account-password-form .access-help{margin-top:16px}

.auth-shell {
 background:radial-gradient(ellipse at 50% 0%,#dcebd8,transparent 55%),#f4f7f2;
}
.auth-card {
 padding:clamp(24px,6vw,42px);
 border-radius:26px;
 box-shadow:0 24px 64px #154e3b1c;
}
.auth-brand { gap:13px; }
.auth-brand > .auth-wordmark {
 display:inline; width:auto; height:auto; color:inherit; background:none;
 font-size:24px; letter-spacing:-.04em;
}
.auth-brand svg { flex:none; }
.auth-intro .auth-brand svg { animation:auth-logo-in .5s ease-out both; }
.auth-intro .auth-brand path {
 stroke-dasharray:1;
 animation:auth-check-in .55s .18s ease-out both;
}
.auth-intro .auth-card > :not(.auth-brand), .auth-intro .auth-foot {
 animation:auth-form-in .35s .65s ease-out both;
}
.auth-intro .auth-card:focus-within > * { animation:none; }
@keyframes auth-logo-in { from { opacity:0; transform:scale(.75) rotate(-9deg); } }
@keyframes auth-check-in { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }
@keyframes auth-form-in { from { opacity:0; transform:translateY(8px); } }
html[data-theme="dark"] .auth-shell {
 background:radial-gradient(ellipse at 50% 0%,#224637,transparent 55%),#111a16;
}
@media (prefers-reduced-motion:reduce) {
 .auth-intro .auth-card *, .auth-intro .auth-foot { animation:none; }
}

.auth-brand {
 min-height:108px;
 padding:20px;
 border-radius:18px;
 background:radial-gradient(ellipse at 100% 0%,#d8ebaf88,transparent 65%),var(--surface,#eef6ee);
}
@media(max-width:400px) {
 .auth-brand { min-height:82px; padding:14px; }
}

/* Account creation contact fields share the existing auth form styles. */
.auth-name-fields,.auth-phone-fields{display:grid;gap:12px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.auth-phone-fields{grid-template-columns:112px minmax(0,1fr)}
.auth-name-fields>label,.auth-phone-fields>label{min-width:0;margin-bottom:0}
.auth-card .auth-contact-note{font-size:12px;margin:8px 0 18px}
.auth-phone-fields input{min-width:0}
@media(max-width:380px){.auth-name-fields{grid-template-columns:minmax(0,1fr);gap:0}.auth-phone-fields{grid-template-columns:96px minmax(0,1fr);gap:10px}}
