/* Isolated profile preview. Uses the existing public theme tokens. */
.profile-enabled .nav-list .nav-button:disabled { display:none; }
.profile-enabled[data-user-role="colaborador"] #view-faturamento .billing-actions > .segmented-control,
.profile-enabled[data-user-role="colaborador"] #billing-collaborator-selector,
.profile-enabled[data-user-role="colaborador"] #billing-client-selector,
.profile-enabled[data-user-role="colaborador"] #billing-discount-selector { display:none; }
.profile-enabled .topbar { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:16px; }
.profile-enabled .topbar > div:first-child { min-width:0; }
.profile-enabled .topbar-actions { justify-content:flex-end; align-items:center; }
.user-account-shortcut { display:flex; grid-column:3; grid-row:1; align-items:center; justify-content:center; justify-self:end; flex-shrink:0; width:48px; height:48px; min-height:48px; padding:3px; background:linear-gradient(135deg,#aa56ff,#6ea8ff,#a100ff); border:0; color:var(--ink); border-radius:50%; }
.user-account-shortcut:hover { box-shadow:0 0 0 4px var(--raised-soft); }
.user-avatar { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; border-radius:50%; background:var(--brand-soft); border:1px solid var(--line-strong); color:var(--brand-readable); font-weight:700; }
.user-avatar img { width:100%; height:100%; object-fit:cover; }
.user-avatar-small { width:38px; height:38px; font-size:14px; }
.user-account-shortcut .user-avatar-small { width:42px; height:42px; border:2px solid var(--paper); background:var(--raised); }
.user-avatar-large { width:88px; height:88px; font-size:28px; }
.user-profile { max-width:1100px; margin:0 auto; }
.user-profile-notice { margin:0 0 24px; color:var(--muted); font-size:14px; line-height:1.6; }
.user-profile-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:22px; align-items:start; }
.user-profile-panel { min-width:0; background:var(--paper); border:1px solid var(--line); border-radius:16px; padding:26px; }
.user-profile-heading { display:flex; align-items:flex-start; gap:12px; margin-bottom:26px; }
.user-section-icon { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; flex-shrink:0; border-radius:10px; background:var(--brand-soft); color:var(--brand-readable); font-size:12px; font-weight:700; }
.user-profile-heading h2 { margin:0 0 5px; color:var(--heading); font-size:18px; }
.user-profile-heading p,.user-profile-help { margin:0; color:var(--muted); font-size:13px; line-height:1.6; }
.user-profile-identity { display:flex; align-items:center; gap:18px; margin-bottom:22px; }
.user-profile-identity > div { min-width:0; }
.user-profile-identity strong { display:block; color:var(--heading); font-size:21px; overflow-wrap:anywhere; }
.user-role { display:inline-block; margin-top:8px; border-radius:20px; padding:4px 10px; color:var(--brand-readable); background:var(--brand-soft); font-size:12px; }
.user-photo-actions { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.user-upload { display:inline-flex; position:relative; align-items:center; cursor:pointer; overflow:hidden; font-weight:600; }
.user-upload input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.user-upload:focus-within { outline:2px solid var(--brand-readable); outline-offset:2px; }
.user-name-label { display:block; margin:28px 0 8px; }
.user-name-label input { width:100%; margin-top:9px; }
.user-profile-side { display:grid; gap:22px; min-width:0; }
.user-profile-facts { display:grid; gap:18px; margin:0 0 24px; }
.user-profile-facts dt { color:var(--muted); font-size:12px; margin-bottom:5px; }
.user-profile-facts dd { margin:0; color:var(--ink); font-size:14px; overflow-wrap:anywhere; }
.user-profile-panel #user-reset-profile-password { margin-bottom:8px; }
.user-theme-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:0; margin:0 0 12px; gap:10px; border:0; }
.user-theme-options label { position:relative; padding:10px 8px; border:1px solid var(--line-strong); border-radius:10px; text-align:center; font-size:12px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; }
.user-theme-options input { position:absolute; opacity:0; width:1px; height:1px; }
.user-theme-options label:has(input:checked) { border-color:var(--brand); box-shadow:0 0 0 1px var(--brand); background:var(--brand-soft); }
.user-theme-options label:has(input:focus-visible) { outline:2px solid var(--brand-readable); outline-offset:3px; }
.user-theme-preview { display:block; width:100%; height:44px; border:1px solid #93829f; border-radius:6px; }
.user-preview-light { background:linear-gradient(90deg,#e6dcf1 22%,#faf8fc 22%); }
.user-preview-dark { background:linear-gradient(90deg,#39264c 22%,#160e21 22%); }
.user-preview-system { background:linear-gradient(90deg,#f7f5fa 50%,#21162f 50%); }
.user-profile-footer { display:flex; justify-content:space-between; gap:18px; align-items:center; padding:20px 0; margin-top:8px; }
.user-profile-footer > div { display:flex; gap:10px; flex-shrink:0; }
#user-profile-message { color:var(--muted); font-size:13px; line-height:1.5; margin:0; }
#user-profile-message.is-error { color:var(--status-light-text,#b42318); }
:root:not([data-theme="light"]) #user-profile-message.is-error { color:#ffb4ae; }
.user-visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(max-width:1280px) {
  .profile-enabled .topbar { grid-template-columns:minmax(0,1fr) auto; }
  .profile-enabled .topbar-actions { grid-row:2; grid-column:1 / -1; }
  .user-account-shortcut { grid-column:2; }
}
@media(max-width:900px) { .user-profile-grid { grid-template-columns:1fr; } }
@media(max-width:980px) { .profile-enabled .nav-list { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:140px; } }
@media(max-width:540px) { .user-profile-panel { padding:20px 16px; } .user-profile-footer { flex-direction:column; align-items:stretch; } .user-profile-footer > div { display:grid; grid-template-columns:1fr 1.5fr; } .user-profile-heading { margin-bottom:22px; } .user-avatar-large { width:72px; height:72px; font-size:24px; } }

.profile-enabled .user-account-shortcut[hidden] {display:none;}
.profile-enabled .sidebar label[for="active-user"],
.profile-enabled .sidebar #active-user {display:none;}
.user-profile [aria-busy="true"] {cursor:wait;}
