/**
 * Account page (account.html): sign-in forms, profile, cloud save and security cards.
 */
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% -10%, #1d2f4a 0%, #0e1522 45%, #07090d 100%) fixed;
}
.acc-wrap { max-width: 980px; margin: 0 auto; padding: 76px 20px 48px; }
.acc-header { margin-bottom: 18px; }
.acc-sub { margin: 0; color: var(--text-dim); }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 16px; align-items: start; }
.acc-stack { display: flex; flex-direction: column; gap: 16px; }
.acc-card { padding: 22px; }
.acc-card h2 { margin: 0 0 12px; font-size: 18px; }
.acc-card h3 { margin: 0 0 8px; font-size: 15px; }
.acc-loading { color: var(--text-dim); text-align: center; }
.acc-note { margin: 12px 0 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.acc-empty { margin: 0; color: var(--text-faint); font-size: 13px; }
.acc-foot { margin-top: 20px; text-align: center; color: var(--text-faint); font-size: 12.5px; }
.acc-foot a { color: var(--text-dim); }

/* ---------- sign in ---------- */
.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #dadce0;
    background: #fff;
    color: #1f1f1f;
    font: 600 15px/1 'Roboto', var(--font);
    transition: background 120ms ease, box-shadow 120ms ease;
}
.google-btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.google-btn:hover:not(:disabled) { background: #f7f8f8; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.google-btn:disabled { opacity: 0.6; cursor: progress; }
.acc-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--text-faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.acc-or::before, .acc-or::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }
.acc-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border); }
.acc-tab { padding: 9px 12px; border-radius: 999px; border: none; background: transparent; color: var(--text-dim); font-weight: 800; font-size: 14px; }
.acc-tab:hover { color: var(--text); }
.acc-tab.active { background: var(--gold); color: #2a1600; }
.acc-form { display: flex; flex-direction: column; gap: 12px; }
.acc-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.acc-field input, .pw-wrap input {
    width: 100%;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}
.acc-field input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text-dim); font-size: 12px; font-weight: 700; }
.pw-toggle:hover { color: var(--text); }
.pw-rules ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 12.5px; color: var(--text-dim); }
.pw-rules li::before { content: '○'; display: inline-block; width: 18px; color: var(--text-faint); }
.pw-rules li.ok { color: var(--text); }
.pw-rules li.ok::before { content: '✓'; color: var(--primary); font-weight: 900; }
.pw-meter { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.pw-meter i { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--danger); transition: width 200ms ease, background 200ms ease; }
.pw-meter i[data-level="2"] { background: var(--gold); }
.pw-meter i[data-level="3"], .pw-meter i[data-level="4"] { background: var(--primary); }
.acc-link { align-self: center; padding: 4px; border: none; background: none; color: var(--blue); font-size: 13px; font-weight: 700; text-decoration: underline; }
.acc-msg { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.45; background: rgba(255, 91, 107, 0.12); border: 1px solid rgba(255, 91, 107, 0.45); color: #ffc2c8; }
.acc-msg--ok { background: rgba(47, 208, 122, 0.12); border-color: rgba(47, 208, 122, 0.45); color: #b8f5d2; }
.acc-msg--info { background: rgba(90, 169, 255, 0.12); border-color: rgba(90, 169, 255, 0.45); color: #cfe5ff; }

/* ---------- signed in ---------- */
.acc-profile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.acc-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(160deg, var(--blue), var(--divine-deep)); color: #fff; font-weight: 800; font-size: 24px; }
.acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-who { min-width: 0; }
.acc-name { font-weight: 800; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-email { color: var(--text-dim); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.acc-chip { padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border); font-size: 11.5px; font-weight: 700; color: var(--text-dim); }
.acc-chip--ok { color: var(--primary); border-color: rgba(47, 208, 122, 0.4); }
.acc-chip--warn { color: var(--gold); border-color: rgba(255, 200, 61, 0.45); }
.acc-profile-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.acc-verify { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255, 200, 61, 0.1); border: 1px solid rgba(255, 200, 61, 0.4); color: #ffe6a3; font-size: 13px; line-height: 1.45; }
.acc-verify-actions { display: flex; gap: 6px; }

.acc-sync-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.acc-sync-head h2 { margin: 0; }
.acc-sync-status { margin: 0; color: var(--text-dim); font-size: 14px; font-weight: 700; }
.acc-sync-status.is-ok { color: var(--primary); }
.acc-sync-status.is-warn { color: var(--gold); }
.acc-sync-status.is-error { color: #ff8a95; }
.acc-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-side { padding: 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.acc-when { margin: -4px 0 8px; color: var(--text-dim); font-size: 12px; }
.acc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.acc-actions .btn { text-decoration: none; }
.acc-sync .acc-msg { margin-top: 12px; }
.acc-backup { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 14px; border-radius: var(--radius); border: 1px dashed var(--border-strong); }
.acc-backup > div { flex: 1 1 260px; }
.acc-backup .acc-note { margin: 0 0 8px; }

.acc-security .acc-form { max-width: 420px; }
.acc-danger { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.acc-danger summary { cursor: pointer; color: #ff8a95; font-weight: 800; font-size: 14px; }
.acc-danger .acc-form { margin-top: 12px; }

@media (max-width: 760px) {
    .acc-wrap { padding: 72px 14px 40px; }
    .acc-grid, .acc-compare { grid-template-columns: 1fr; }
    .acc-card { padding: 18px 16px; }
    .acc-profile { grid-template-columns: auto 1fr; }
    .acc-profile-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
