.auth-shell { width: min(100% - 40px, 420px); margin: 64px auto 32px; }
.auth-brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 25px; font-weight: 750; }
.auth-brand img { flex: 0 0 48px; border-radius: 50%; }
.auth-main { padding: 32px 0; }
.auth-main h1 { font-size: 23px; margin-bottom: 24px; }
.auth-main h2 { font-size: 19px; margin-bottom: 12px; }
.auth-telegram { width: 100%; min-height: 48px; margin-bottom: 24px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.auth-tabs button { flex: 1; min-height: 44px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.auth-tabs button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--brand); }
.account-form { display: grid; gap: 10px; width: 100%; max-width: 420px; }
.account-form label { color: var(--text); font-size: 14px; line-height: 1.45; }
.account-form input { width: 100%; min-width: 0; min-height: 46px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--surface); color: var(--text); }
.account-form input:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.account-form .btn { margin-top: 8px; min-height: 46px; white-space: normal; text-align: center; }
.account-form input + label { margin-top: 8px; }
.account-note { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 8px 0 16px; overflow-wrap: anywhere; }
.account-message { margin: 12px 0; font-size: 14px; line-height: 1.6; color: var(--green); overflow-wrap: anywhere; }
.account-message:empty { display: none; }
.account-message.error { color: var(--red); }
.auth-recovery { margin-top: 18px; }
.auth-footer { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-footer a { color: var(--muted); font-size: 12px; text-decoration: none; }
#authBack { margin-top: 20px; }
#telegramLinkOffer .btn { width: 100%; margin: 12px 0; }
.settings-section { padding: 24px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.settings-section > h2 { margin-bottom: 16px; }
.account-qr { display: block; width: 220px; height: 220px; max-width: 100%; object-fit: contain; padding: 8px; background: white; }
#accountTotpSecret { font-family: monospace; font-size: 13px; }
#accountBackupValues { padding: 16px 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.account-session { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.account-session > div { min-width: 0; }
.account-session strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.account-session p { margin-top: 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.website #closeAppBtn { display: none; }
.site-settings-nav { display: none !important; }
@media (max-width: 480px) { .auth-shell { margin-top: 32px; } }
@media (min-width: 960px) {
  .website .app-shell { width: min(100% - 64px, 1280px); padding: 0 0 40px 232px; }
  .website .app-chrome { margin-left: -232px; padding-right: 0; }
  .website .title-bar { min-height: 64px; }
  .website .account-bar { min-height: 72px; }
  .website .view-stack { padding: 28px 0 0 28px; }
  .website .app-drawer { right: max(32px, calc((100vw - 1280px) / 2)); }
  .website .bottom-nav { position: fixed; left: max(32px, calc((100vw - 1280px) / 2)); right: auto; top: 164px; bottom: auto; width: 212px; max-width: none; margin: 0; transform: none; display: flex; flex-direction: column; align-items: stretch; gap: 4px; border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0; }
  .website .bottom-link { display: flex; flex-direction: row; justify-content: flex-start; gap: 14px; min-height: 48px; padding: 12px 16px; font-size: 14px; border-radius: 6px; }
  .website .bottom-link span { font-size: 14px; }
  .website .site-settings-nav { display: flex !important; }
  .website .app-view[data-view="home"] { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
  .website [data-view="home"] > .plan-overview { grid-column: 1; grid-row: span 3; margin: 0; }
  .website [data-view="home"] > .feature-link, .website [data-view="home"] > .home-promo, .website [data-view="home"] > .home-devices-panel { grid-column: 2; margin: 0; }
  .website [data-view="home"] > .notice { grid-column: 1 / -1; }
  .website .account-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 36px; }
  .website .account-settings > .view-heading, .website .account-settings > .account-message { grid-column: 1 / -1; }
  .website .settings-section { margin: 0; }
  .website .account-settings > #accountLogout { justify-self: start; }
  .website .toast { max-width: 600px; }
}
