.account-page { min-height: 100svh; display: flex; flex-direction: column; margin: 0; background: var(--ui-page); }
.account-page::before { content: none; }
.account-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(1200px, 100%); margin: 0 auto; padding: 28px 36px; }
.account-header .brand-mark { color: var(--ui-text); text-decoration: none; }
.account-main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); align-items: center; gap: clamp(48px, 8vw, 120px); flex: 1; width: min(1180px, 100%); margin: 0 auto; padding: 34px 40px 64px; }
.account-panel { width: min(410px, 100%); padding: 24px 0; }
.account-intro { min-width: 0; align-self: center; }
.account-lens { display: block; width: calc(100% + 35px); max-height: 390px; margin: -15px 0 20px -25px; overflow: visible; }
.account-lens-plates { transform-origin: 300px 210px; animation: account-lens-drift 12s ease-in-out infinite alternate; }
@keyframes account-lens-drift { to { transform: translateY(-8px) rotate(3deg); } }
.account-symbol { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 0 18px; border: 1px solid var(--ui-border); border-radius: 15px; color: var(--ui-accent); background: var(--ui-soft); }
.account-symbol svg { width: 26px; height: 26px; }
.account-panel h1 { margin: 0; color: var(--ui-text); font-size: 32px; font-weight: 600; letter-spacing: -.04em; line-height: 1.4; }
.account-description { margin: 10px 0 28px; color: var(--ui-muted); font-size: 14px; line-height: 1.7; }
.account-form { display: flex; flex-direction: column; gap: 9px; }
.account-form[hidden] { display: none; }
.account-mode-link { display: block; width: 100%; min-height: 46px; margin: 12px auto 0; padding: 10px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-accent); background: transparent; font-size: 13px; cursor: pointer; text-underline-offset: 4px; }
.account-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.account-forgot { border: 0; padding: 4px 0; color: var(--ui-accent); background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.account-forgot:hover { text-decoration: underline; text-underline-offset: 4px; }
.account-mode-link:hover:not(:disabled) { text-decoration: underline; }
.account-mode-link[hidden] { display: none; }
.account-form label { margin-top: 8px; font-size: 13px; font-weight: 600; }
.account-form input { width: 100%; min-width: 0; min-height: 46px; margin: 0 0 8px; padding: 11px 13px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-text); background: var(--ui-surface); box-shadow: none; font-size: 16px; }
.account-form input::placeholder { color: var(--ui-muted); font-size: 13px; }
.account-form input:focus { border-color: var(--ui-accent); }
.account-code-row { display: flex; gap: 10px; }
.account-code-row input { flex: 1; margin-bottom: 0; }
.account-send { min-width: 108px; min-height: 46px; padding: 0 12px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-accent); background: var(--ui-soft); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.account-field-note { margin: 1px 0 12px; color: var(--ui-muted); font-size: 12px; line-height: 1.6; }
.account-submit { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; margin-top: 4px; border: 0; border-radius: 10px; color: var(--ui-action-ink); background: var(--ui-action); font-size: 14px; font-weight: 600; cursor: pointer; }
.account-submit:hover:not(:disabled) { filter: brightness(.96); }
.account-form button:disabled { cursor: default; opacity: .55; }
.account-message { min-height: 22px; margin: 14px 0 0; color: var(--ui-muted); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.account-message.error { color: #b73b45; }
:root[data-theme="dark"] .account-message.error { color: #ff9ba5; }
.account-terms { margin: 14px 0 20px; color: var(--ui-muted); font-size: 12px; text-align: center; line-height: 1.8; }
.account-terms a { color: var(--ui-text); text-underline-offset: 3px; }
.account-invite-link { display: block; padding-top: 20px; border-top: 1px solid var(--ui-border); color: var(--ui-muted); text-align: center; text-decoration: none; font-size: 13px; }
.account-invite-link:hover { color: var(--ui-accent); }
.account-footer { padding: 20px 24px; color: var(--ui-muted); text-align: center; font-size: 12px; }
[data-account-controls] { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.product-page .nav-links .account-login-link { padding: 9px 17px; border: 1px solid var(--ui-border); border-radius: 11px; color: var(--ui-text); background: var(--ui-surface); }
.account-email { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ui-muted); font-size: 12px; vertical-align: middle; }
.account-profile-link { display: inline-flex; padding: 0 !important; border-radius: 50%; text-decoration: none; }
.account-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; color: var(--ui-accent); background: var(--ui-accent-soft); border: 1px solid var(--ui-border); font-size: 15px; font-weight: 600; line-height: 1; }
.account-profile-link:focus-visible, .account-forgot:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 4px; }
.account-signout { border: 0; background: transparent; font-size: 12px; cursor: pointer; }
.account-nav-error { max-width: 170px; color: var(--ui-muted); font-size: 12px; }
.beta-account-option { margin: 12px 0 0; color: var(--ui-muted); font-size: 13px; text-align: center; }
.beta-account-option a { color: var(--ui-accent); text-underline-offset: 3px; }
.admin-login-page #adminEmail { min-height: 48px; padding: 12px 14px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-text); background: var(--ui-surface); font-size: 16px; }
@media (max-width: 700px) {
  .account-header { padding: 20px 22px; }
  .account-main { display: flex; justify-content: center; padding: 24px 26px 40px; }
  .account-intro { display: none; }
  .account-panel { padding: 24px 0; }
  .account-panel h1 { font-size: 28px; }
  .product-page .nav-links { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
  .account-email { max-width: 112px; }
  [data-account-controls] { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .account-lens-plates { animation: none; } }

.account-invite-label { color: var(--ui-muted); font-size: 12px; white-space: nowrap; }
.service-access-dialog { width: min(440px, calc(100% - 36px)); box-sizing: border-box; padding: 32px; border: 1px solid var(--ui-border); border-radius: 22px; color: var(--ui-text); background: var(--ui-surface); box-shadow: var(--ui-shadow); }
.service-access-dialog::backdrop { background: rgb(8 18 30 / 55%); backdrop-filter: blur(4px); }
.service-access-dialog h2 { margin: 0 0 12px; font-size: 23px; letter-spacing: -.03em; }
.service-access-dialog p { margin: 0 0 24px; color: var(--ui-muted); font-size: 14px; line-height: 1.8; }
.service-access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.service-access-actions a, .service-access-actions button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 9px 15px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-text); background: var(--ui-soft); text-decoration: none; font: inherit; font-size: 13px; cursor: pointer; }
.service-access-actions a:first-child { background: var(--ui-action); color: var(--ui-action-ink); border-color: transparent; }
.service-access-actions button { border-color: transparent; background: transparent; color: var(--ui-muted); }
.service-access-actions [hidden] { display: none; }
.service-access-invite-form { display: grid; gap: 10px; margin-bottom: 16px; }
.service-access-invite-form[hidden] { display: none; }
.service-access-invite-form label { font-size: 13px; font-weight: 600; }
.service-access-invite-form input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 11px 13px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-text); background: var(--ui-surface); font-size: 16px; }
.service-access-invite-form input:focus { border-color: var(--ui-accent); }
.service-access-invite-form button { min-height: 44px; border: 0; border-radius: 10px; color: var(--ui-action-ink); background: var(--ui-action); font: inherit; font-size: 14px; cursor: pointer; }
.service-access-invite-form button:disabled { opacity: .6; cursor: wait; }
.service-access-dialog .service-access-invite-message { margin: 0; color: var(--ui-muted); font-size: 13px; }
.service-access-invite-message:empty { display: none; }
.account-service-notice { position: fixed; bottom: 28px; left: 50%; z-index: 10000; transform: translateX(-50%); padding: 12px 20px; border: 1px solid var(--ui-border); border-radius: 12px; color: var(--ui-text); background: var(--ui-surface); box-shadow: var(--ui-shadow); font-size: 14px; }
