/* Tela de acesso: formulário à esquerda e apresentação do Pruno à direita. */
body.auth-pending { display: block; min-height: 100svh; padding: 0; background: var(--surface); }
.auth-pending > :is(.sidebar, .workspace, dialog) { display: none; }
.auth-gate {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  width: 100%; max-width: none; min-height: 100svh; margin: 0; padding: 0;
}
.auth-panel {
  display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 100svh;
  padding: clamp(20px, 3.5vw, 40px) clamp(20px, 5vw, 64px);
  background: var(--surface);
}
.auth-top .brand { font-size: 1.0625rem; }
.auth-content { align-self: center; justify-self: center; width: min(100%, 24rem); padding-block: 40px; }
.auth-heading { display: grid; gap: 6px; }
.auth-heading h1 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.025em; }
.auth-lede { margin: 0; color: var(--muted); font-size: var(--text-body); }
.auth-form { display: grid; gap: 16px; margin-top: 28px; }
.auth-form label { display: grid; min-width: 0; gap: 6px; font-size: var(--text-small); font-weight: var(--weight-medium); }
.auth-form input { width: 100%; min-width: 0; min-height: 40px; font-size: var(--text-body); font-weight: 400; }
.auth-email {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-control);
  background: var(--table-header); overflow-wrap: anywhere; font-weight: 400;
}
.auth-password-field { display: grid; gap: 6px; }
.auth-password { display: flex; position: relative; min-width: 0; }
.auth-password input { padding-right: 5rem; }
.auth-visibility {
  position: absolute; top: 4px; right: 4px; bottom: 4px; min-height: 0; padding: 0 10px;
  border-color: transparent; border-radius: 7px; background: transparent; box-shadow: none;
  color: var(--muted); font-size: var(--text-caption);
}
.auth-visibility:hover { background: var(--hover); border-color: transparent; color: var(--ink); }
.auth-form :is(.auth-forgot, .auth-switch, .auth-back) {
  min-height: 0; padding: 2px 4px; border: 0; border-radius: 6px; background: transparent; box-shadow: none;
  color: var(--action-hover); font-size: var(--text-small); font-weight: var(--weight-medium);
}
.auth-form :is(.auth-forgot, .auth-switch, .auth-back):hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.auth-forgot { justify-self: end; margin-inline-end: -4px; }
.auth-form .primary { min-height: 40px; margin-top: 4px; }
.auth-alternate { margin: 4px 0 0; color: var(--muted); font-size: var(--text-small); text-align: center; }
.auth-help, .auth-form [role="alert"] { margin: -6px 0 0; font-size: var(--text-small); color: var(--muted); }
.auth-form [role="alert"] {
  margin: 0; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  border-radius: var(--radius-control); background: var(--danger-soft); color: var(--danger);
}
.auth-recovery [role="status"]:not([hidden]) { margin: 0; }
.auth-foot { justify-self: start; margin: 0; color: var(--muted); font-size: var(--text-caption); text-align: start; }

.auth-showcase {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 36px;
  min-width: 0; padding: clamp(32px, 5vw, 72px); overflow: hidden;
  border-inline-start: 1px solid var(--line);
  background:
    linear-gradient(to right, color-mix(in srgb, var(--action) 9%, transparent) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, color-mix(in srgb, var(--action) 9%, transparent) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--action) 14%, transparent), transparent 60%),
    var(--paper);
}
.auth-showcase::after {
  content: ""; position: absolute; inset: auto 0 0; height: 35%; pointer-events: none;
  background: linear-gradient(to top, var(--paper), transparent);
}
.auth-showcase-copy { position: relative; z-index: 1; display: grid; gap: 12px; max-width: 30rem; }
.auth-showcase-eyebrow { margin: 0; color: var(--action-hover); font-size: var(--text-small); font-weight: var(--weight-medium); }
.auth-showcase-title { margin: 0; font-size: clamp(1.75rem, 2.8vw, 2.5rem); font-weight: var(--weight-semibold); line-height: 1.1; letter-spacing: -.03em; }
.auth-showcase-text { margin: 0; color: var(--muted); font-size: var(--text-section); line-height: 1.5; }
.auth-preview {
  position: relative; z-index: 1; display: grid; gap: 14px; width: min(100%, 26rem); padding: 20px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 24px 48px -16px rgb(0 0 0 / 14%);
}
.auth-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: var(--text-small); }
.auth-preview-badge { padding: 1px 7px; border-radius: var(--radius-small); background: var(--positive-soft); color: var(--positive); font-size: var(--text-caption); font-weight: var(--weight-medium); }
.auth-preview-total { font-size: 1.75rem; font-weight: var(--weight-semibold); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.auth-preview-bars { display: flex; align-items: flex-end; gap: 8px; height: 88px; padding-bottom: 1px; border-bottom: 1px solid var(--line); }
.auth-preview-bars span { flex: 1; border-radius: 4px 4px 1px 1px; background: color-mix(in srgb, var(--action) 28%, var(--surface)); }
.auth-preview-bars span.current { background: var(--action); }
.auth-preview-bars span:nth-child(1) { height: 38%; }
.auth-preview-bars span:nth-child(2) { height: 46%; }
.auth-preview-bars span:nth-child(3) { height: 44%; }
.auth-preview-bars span:nth-child(4) { height: 58%; }
.auth-preview-bars span:nth-child(5) { height: 63%; }
.auth-preview-bars span:nth-child(6) { height: 61%; }
.auth-preview-bars span:nth-child(7) { height: 72%; }
.auth-preview-bars span:nth-child(8) { height: 78%; }
.auth-preview-bars span:nth-child(9) { height: 84%; }
.auth-preview-rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: var(--text-small); }
.auth-preview-rows li { display: flex; align-items: center; gap: 8px; }
.auth-preview-rows b { margin-inline-start: auto; font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.auth-preview-rows .dot { width: 8px; height: 8px; border-radius: 50%; }
.auth-preview-rows .dot.accounts { background: var(--action); }
.auth-preview-rows .dot.investments { background: #8b6cc4; }
.auth-preview-rows .dot.assets { background: #0f9f8f; }
.auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.auth-user-avatar {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  background: var(--selected); color: var(--action-hover); border-radius: 50%;
  font-size: var(--text-caption); font-weight: var(--weight-semibold);
}
.auth-user-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--text-small); font-weight: var(--weight-medium); text-decoration: none;
}
.auth-user-name:hover { color: var(--action-hover); }
.auth-user button { flex: none; background: var(--surface); }
.auth-user button:hover { background: var(--hover); }
.account-panel { container-type: inline-size; }
.account-panel > .section-header { align-items: center; }
.account-settings {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start;
  max-width: 1180px; margin-top: 16px;
}
.account-form {
  display: grid; gap: 14px; min-width: 0; margin: 0; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-control);
}
.account-form label { display: grid; gap: 5px; min-width: 0; font-size: var(--text-small); font-weight: var(--weight-medium); }
.account-form input { width: 100%; min-width: 0; font-weight: 400; }
.account-form small { margin-top: -10px; color: var(--muted); }
.account-form button { justify-self: start; }
#profile-email-address, #profile-email-status { overflow-wrap: anywhere; margin: 0; }
#profile-admin-link { margin-top: 8px; }
.account-form :is(.account-error, .account-status) { margin: 0; font-size: var(--text-small); overflow-wrap: anywhere; }
.account-error { color: var(--danger); }
.account-status { color: var(--positive); }
@container (max-width: 930px) {
  .account-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 620px) {
  .account-settings { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .auth-gate { grid-template-columns: minmax(0, 1fr); }
  .auth-showcase { display: none; }
}
@media (max-width: 520px) {
  .auth-panel { padding: 20px; }
  .auth-content { align-self: start; padding-block: 48px 32px; }
  .auth-heading h1 { font-size: 1.5rem; }
}
@media (pointer: coarse) {
  .auth-form input { min-height: 44px; font-size: 1rem; }
  .auth-form :is(.auth-forgot, .auth-switch, .auth-back) { min-height: 36px; }
}
