/* Account access is part of the application flow; the form itself opens only on demand. */
.account-progress { display: flex; align-items: center; justify-content: center; gap: 10px; color: #16724a; font-size: .85rem; }
.account-progress[hidden], .account-tabs[hidden] { display: none; }
.account-spinner { width: 22px; height: 22px; border: 3px solid #d1fae5; border-top-color: #16a34a; border-radius: 50%; animation: account-spin .8s linear infinite; }
@keyframes account-spin { to { transform: rotate(360deg); } }
.application-account-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 13px 16px; border: 1px solid #d9e3f0; border-radius: 12px; background: linear-gradient(100deg, #f8fbff, #fff); }
.application-account-copy { display: flex; align-items: center; gap: 11px; min-width: 0; }
.application-account-copy strong { display: block; color: var(--text); font-size: .92rem; }
.application-account-copy small { display: block; margin-top: 2px; color: var(--text-muted); font-size: .78rem; line-height: 1.35; }
.application-account-icon { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; border-radius: 50%; background: #eaf2ff; color: var(--accent-dark); font-size: 14px; }
.application-account-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.account-primary-button, .account-link-button { min-height: 36px; padding: 8px 13px; border-radius: 8px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.account-primary-button { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.account-primary-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.account-link-button { border: 1px solid #cbd5e1; background: #fff; color: var(--accent-dark); }
.account-link-button:hover { border-color: var(--accent); background: #f8fbff; }

.wz-auth-gate { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 10px; padding: 12px 14px; border: 1px dashed #b9cbe3; border-radius: 10px; background: #f8fbff; }
.wz-auth-gate strong, .wz-auth-gate span { display: block; }
.wz-auth-gate strong { color: var(--text); font-size: .85rem; }
.wz-auth-gate span { margin-top: 3px; color: var(--text-muted); font-size: .76rem; line-height: 1.35; }
.wz-auth-gate[hidden] { display: none; }

.account-dialog { width: min(440px, calc(100vw - 32px)); margin: auto; padding: 0; border: 0; border-radius: 16px; color: var(--text); background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .28); }
.account-dialog::backdrop { background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); }
.account-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 24px 0; }
.account-dialog-head h2 { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.account-eyebrow { margin: 0 0 4px; color: var(--accent-dark); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.account-dialog-close { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 25px; line-height: 1; cursor: pointer; }
.account-dialog-close:hover { background: #f1f5f9; color: var(--text); }
.account-dialog-lead { margin: 10px 24px 18px; color: var(--text-muted); font-size: .85rem; line-height: 1.45; }
.account-tabs { display: flex; gap: 4px; margin: 0 24px 18px; padding: 4px; border-radius: 9px; background: #f1f5f9; }
.account-tabs button { flex: 1; min-height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); font: inherit; font-size: .83rem; font-weight: 600; cursor: pointer; }
.account-tabs button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.14); }
#account-form { display: grid; gap: 13px; padding: 0 24px; }
#account-form[hidden], #account-form [hidden], .account-dialog-links[hidden] { display: none; }
#account-form label { display: grid; gap: 6px; color: var(--label); font-size: .8rem; font-weight: 600; }
#account-form input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: .9rem; }
#account-form input:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(59,130,246,.14); }
.account-submit { width: 100%; margin-top: 3px; }
.account-dialog-links { display: flex; justify-content: space-between; gap: 10px; padding: 15px 24px 0; }
.account-dialog-links button { padding: 0; border: 0; background: transparent; color: var(--accent-dark); font: inherit; font-size: .76rem; cursor: pointer; text-align: left; }
.account-dialog-links button:hover { text-decoration: underline; }
.account-message { min-height: 20px; margin: 12px 24px 22px; color: #b42318; font-size: .8rem; line-height: 1.4; white-space: pre-line; }
.account-message.is-success { color: #16724a; }

@media (max-width: 600px) {
  .application-account-bar, .wz-auth-gate { align-items: flex-start; flex-direction: column; }
  .application-account-actions { width: 100%; }
  .application-account-actions button { flex: 1; }
  .wz-auth-gate .account-primary-button { width: 100%; }
  .account-dialog-head { padding: 20px 20px 0; }
  .account-dialog-lead, .account-tabs { margin-left: 20px; margin-right: 20px; }
  #account-form { padding: 0 20px; }
  .account-dialog-links { padding-left: 20px; padding-right: 20px; flex-direction: column; }
  .account-message { margin-left: 20px; margin-right: 20px; }
}
