/* Account / login styles. Kept in this file so a later motion.sites
   prompt can restyle the screen without touching the rest of the site.
   No filter or backdrop-filter animations (Chrome 109 safety). */

.account-btn { position: relative; }
.account-btn .account-dot {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #2F6F5E);
  box-shadow: 0 0 0 2px var(--topbar-bg, #fff);
}
.account-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 0 0 8px;
  font-size: 0.92rem;
}
.account-status .account-email { font-weight: 600; word-break: break-all; }
.account-status .account-sync { color: var(--muted, #667); font-size: 0.85rem; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }

#auth-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(420px, calc(100vw - 24px));
  width: 100%;
}
#auth-dialog::backdrop {
  background: rgba(10, 12, 16, 0.48);
}
.auth-card {
  background: var(--sheet-bg, var(--card, #fff));
  color: var(--text, #1a1a1a);
  border-radius: 20px;
  padding: 22px 22px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line, rgba(0,0,0,0.08));
}
html[data-theme="dark"] .auth-card {
  background: #171a21;
  color: #f2efe8;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.auth-card h2 {
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.auth-lead {
  margin: 0 0 16px;
  color: var(--muted, #667);
  font-size: 0.92rem;
  line-height: 1.45;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 3px;
  border-radius: 12px;
  background: var(--chip-bg, rgba(0,0,0,0.06));
}
html[data-theme="dark"] .auth-tabs { background: rgba(255,255,255,0.06); }
.auth-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.auth-tab.is-on {
  background: var(--card, #fff);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
html[data-theme="dark"] .auth-tab.is-on { background: #2a2f39; }
.auth-card label {
  display: block;
  margin: 0 0 12px;
}
.auth-card .field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 4px;
}
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line, #ccc);
  background: var(--input-bg, #fff);
  color: inherit;
}
html[data-theme="dark"] .auth-card input[type="email"],
html[data-theme="dark"] .auth-card input[type="password"] {
  background: #101217;
  border-color: rgba(255,255,255,0.12);
}
.auth-card input:focus {
  outline: 2px solid var(--accent, #2F6F5E);
  outline-offset: 1px;
}
.auth-error {
  min-height: 1.2em;
  margin: 0 0 10px;
  color: #b42318;
  font-size: 0.9rem;
}
html[data-theme="dark"] .auth-error { color: #ffb4a8; }
.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-actions .btn { width: 100%; justify-content: center; }
.auth-note {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--muted, #667);
  line-height: 1.4;
}

/* Never cover the exam screen */
body[data-route="exam"] #account-btn,
body[data-route="exam"] #auth-dialog,
body.is-strict-exam #account-btn,
body.is-strict-exam #auth-dialog {
  display: none !important;
}
