/* Account pages and the compact in-app account menu. */
[hidden] { display: none !important; }
#app-shell:not([hidden]) { display: flex; flex-direction: column; height: 100%; min-height: 0; }
#auth-screen { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  overflow: auto; padding: 32px 16px 20px; background: radial-gradient(circle at 50% 0%, #e9f2ff 0%, #f5f8fd 52%, #f8fafd 100%);
  user-select: text; }
.auth-card { width: min(100%, 432px); background: #fff; border: 1px solid #e4eaf2; border-radius: 20px;
  box-shadow: 0 18px 54px rgba(36, 70, 120, .10); padding: 40px 42px 35px; flex-shrink: 0; margin-top: auto; }
.auth-brand { display: flex; align-items: center; gap: 15px; margin-bottom: 36px; color: #1a73e8; }
.auth-brand > div { display: flex; flex-direction: column; }
.auth-brand-name { color: #1c2737; font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
.auth-brand-subtitle { color: #66758b; font-size: 13px; margin-top: 2px; }
.auth-panel h1 { font-size: 27px; line-height: 1.2; letter-spacing: -.6px; font-weight: 650; margin: 0 0 7px; }
.auth-intro { color: #607086; line-height: 1.5; font-size: 14px; margin: 0 0 25px; }
.auth-panel form { display: flex; flex-direction: column; }
.auth-panel label { color: #33445c; font-size: 13px; font-weight: 600; margin: 0 0 7px; }
.auth-panel input { width: 100%; height: 43px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff;
  padding: 0 13px; font: inherit; font-size: 15px; color: #1d2939; outline: none; margin-bottom: 17px; }
.auth-panel input:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26, 115, 232, .12); }
.auth-panel input:disabled { background: #f6f8fb; }
.auth-primary { border: 0; border-radius: 9px; background: #1a73e8; color: #fff; min-height: 44px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 3px; }
.auth-primary:hover { background: #155fc3; }
.auth-primary:disabled { opacity: .6; cursor: wait; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 19px; }
.auth-links button { color: #1967d2; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 3px 0; }
.auth-links button:hover { text-decoration: underline; }
.auth-form-error { min-height: 0; color: #b42318; font-size: 13px; line-height: 1.4; margin: -5px 0 10px; }
.auth-form-error:empty { display: none; }
.auth-alert { padding: 11px 13px; color: #9b251b; background: #fff0ee; border: 1px solid #f2c8c3;
  border-radius: 9px; line-height: 1.45; font-size: 13px; margin: -16px 0 22px; }
.auth-footnote { color: #64748b; font-size: 12px; line-height: 1.45; margin-top: 16px; }
.auth-options { display: grid; gap: 10px; }
.auth-options button { border: 1px solid #d9e2ee; border-radius: 9px; background: #f8fbff; color: #1e3f66;
  text-align: left; padding: 14px 15px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.auth-options button:hover { border-color: #1a73e8; background: #eef5ff; }
.auth-copyright { color: #91a0b4; font-size: 12px; margin-top: 22px; margin-bottom: auto; flex-shrink: 0; }
.profile-trigger { flex: 0 0 auto; width: 40px; height: 40px; border: 0; background: transparent;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.profile-trigger:hover, .profile-trigger[aria-expanded="true"] { background: #edf3fb; }
.profile-avatar { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #306bc4; color: #fff; font-size: 15px; font-weight: 650; }
#editor-profile-button { margin-left: auto; }
.profile-menu { position: fixed; top: 56px; right: 19px; z-index: 300; width: min(258px, calc(100vw - 24px));
  border-radius: 12px; border: 1px solid #e0e6ed; background: #fff; padding: 8px;
  box-shadow: 0 12px 35px rgba(27, 45, 70, .18); font: 14px/1.4 Arial, sans-serif; }
.profile-identity { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 13px; border-bottom: 1px solid #ebeff4; margin-bottom: 5px; }
.profile-identity strong { overflow-wrap: anywhere; }
.profile-identity span { color: #697789; font-size: 12px; overflow-wrap: anywhere; }
.profile-menu button { width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px;
  border-radius: 7px; color: #26364b; font: inherit; cursor: pointer; }
.profile-menu button:hover { background: #f1f5fa; }
.settings-dialog { border: 1px solid #dfe5ed; border-radius: 14px; width: min(440px, calc(100vw - 32px));
  padding: 25px; color: #26364b; box-shadow: 0 14px 48px #0003; font: 14px/1.5 Arial, sans-serif; }
.settings-dialog::backdrop { background: #0007; }
.settings-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 19px; }
.settings-head h2 { font-size: 21px; margin: 0; }
.settings-head button { border: 0; background: none; font-size: 28px; line-height: 1; color: #64748b; cursor: pointer; }
.settings-dialog p { color: #65758a; margin: 8px 0; }
.settings-dialog h3 { font-size: 16px; margin-bottom: 5px; }
.settings-account { display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.settings-account span { color: #64748b; }
.settings-divider { border-top: 1px solid #e5eaf0; margin: 22px 0; }
#settings-import-ai { border: 1px solid #bfd3f0; border-radius: 7px; padding: 9px 12px; background: #f2f7ff;
  color: #1766ca; font: 600 13px/1.3 Arial, sans-serif; cursor: pointer; margin-top: 10px; }
#settings-import-ai:hover { background: #e5f0ff; }
.simple-dialog { width: min(390px, calc(100vw - 32px)); border: 1px solid #dfe5ed; border-radius: 13px;
  padding: 26px; background: #fff; color: #27364a; box-shadow: 0 14px 42px #0003; font: 14px/1.45 Arial, sans-serif; }
.simple-dialog::backdrop { background: #0007; }
.simple-dialog h2 { font-size: 20px; margin: 0 0 18px; }
.simple-dialog p { color: #627187; margin: 0 0 22px; }
.simple-dialog label { display: block; font-weight: 600; margin-bottom: 7px; }
.simple-dialog input { width: 100%; padding: 10px 11px; border: 1px solid #cbd5e1; border-radius: 7px;
  font: inherit; outline: none; }
.simple-dialog input:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px #1a73e820; }
.simple-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.simple-dialog-actions button { border: 1px solid #d4deeb; border-radius: 7px; background: #fff; color: #34445a;
  padding: 9px 14px; font: 600 13px/1.3 Arial, sans-serif; cursor: pointer; }
.simple-dialog-actions button:hover { background: #f4f7fb; }
.simple-dialog-actions .simple-dialog-primary { color: #fff; background: #1a73e8; border-color: #1a73e8; }
.simple-dialog-actions .simple-dialog-danger { color: #fff; background: #c5362c; border-color: #c5362c; }
@media (max-width: 520px) { .auth-card { padding: 30px 25px; } .auth-brand { margin-bottom: 28px; } .auth-panel h1 { font-size: 24px; } }
@media print { #auth-screen, .profile-menu, .settings-dialog, .profile-trigger { display: none !important; }
  #app-shell:not([hidden]) { display: block !important; height: auto !important; } }
