.account-page { max-width: 980px; min-height:55vh; }
.account-card { max-width:620px; margin:2rem auto; padding:clamp(1rem,4vw,2rem); border:1px solid #dce1e8; border-radius:18px; background:#fff; box-shadow:0 12px 35px #1112; }
.account-page .account-card { display:block; }
.account-status { padding:.8rem 1rem; border-radius:10px; background:#eef3f8; color:#263348; }
.account-status.is-error { background:#fff0f0; color:#a21d1d; }
.account-mode-switch { display:flex; gap:.5rem; margin:1rem 0 1.5rem; }
.account-mode-switch button,.account-secondary,.account-text-button,.account-danger { border:1px solid #d6dce5; border-radius:9px; padding:.65rem .9rem; background:transparent; color:inherit; cursor:pointer; }
.account-mode-switch button.active { background:#e10600; color:#fff; border-color:#e10600; font-weight:750; box-shadow:0 4px 12px #e1060030; }
.account-mode-switch button:not(.active) { background:#f2f4f7; color:#282d35; font-weight:650; }
.account-form { display:grid; gap:.65rem; }
.account-form .account-remember{display:flex;align-items:flex-start;gap:.6rem;margin:.05rem 0;color:var(--f1-dark,#171b22);font-size:.88rem;font-weight:650;line-height:1.4;cursor:pointer}.account-form .account-remember input{flex:0 0 1.1rem;width:1.1rem;min-height:1.1rem;height:1.1rem;margin:.1rem 0 0;accent-color:#e10600}.account-form .account-remember span{flex:1}
.account-form input { width:100%; min-height:46px; padding:.7rem; border:1px solid #bac3d0; border-radius:8px; background:#fff; color:#171b22; }
.password-preview-wrap { position:relative; width:100%; min-width:0; }
.password-preview-wrap > input { box-sizing:border-box; padding-right:3.1rem; }
.password-preview-toggle { position:absolute; top:50%; right:.38rem; display:grid; width:36px; height:36px; place-items:center; padding:0; transform:translateY(-50%); border:0; border-radius:8px; background:transparent; color:#717986; cursor:pointer; }
.password-preview-toggle:hover { background:#eef1f5; color:#252b34; }
.password-preview-toggle:focus-visible { outline:2px solid #e10600; outline-offset:1px; }
.account-help { color:#6d7480; font-size:.9rem; }
.account-submit { min-height:46px; border:0; border-radius:9px; padding:.7rem 1rem; background:#e10600; color:white; font-weight:700; cursor:pointer; }
.account-text-button { margin-top:.7rem; color:#b00000; }
.account-user-line { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.account-favorites { display:grid; gap:.55rem; margin:1rem 0; }
.account-favorite { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem; border:1px solid #dce1e8; border-radius:10px; }
.account-favorite a { color:inherit; font-weight:700; }
.account-favorite button { border:0; background:transparent; color:#b00000; cursor:pointer; }
.account-danger { color:#a21d1d; border-color:#d7a0a0; }
.account-nav-link { display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:.4rem .75rem; border:1px solid #e10600; border-radius:999px; background:#e10600; color:#fff !important; text-decoration:none; font-size:.9rem; font-weight:750; white-space:nowrap; box-shadow:0 3px 12px #e1060030; }
.account-nav-link:hover { background:#b90000; border-color:#b90000; color:#fff !important; }
.account-favorites-link { font-weight:700; }
.account-settings { margin:1.25rem 0 1.75rem; padding:1rem; border:1px solid #dce1e8; border-radius:12px; background:#f8f9fb; }
.account-settings h2 { margin-top:0; }
.account-settings > button { margin:.25rem .5rem .25rem 0; }
html[data-theme="dark"] .account-settings { background:#222630; border-color:#474e5b; }
html[data-theme="dark"] .account-favorite { background:#20242d; color:#f1f3f6; }
html[data-theme="dark"] .account-favorite button { color:#ff7772; }
.account-favorite-button { margin:.75rem 0 1rem; padding:.65rem 1rem; border:1px solid #b7bec9; border-radius:10px; background:#fff; color:#171b22; font-weight:700; cursor:pointer; }
.account-favorite-button.is-saved { border-color:#e10600; color:#b00000; }
.favorites-page-card { max-width:none; width:100%; }
.account-favorites.favorites-grid { display:grid; width:100%; grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr)); align-items:stretch; gap:1rem; margin:1.2rem 0; }
.account-favorites.favorites-grid .favorite-card-wrap { min-width:0; }
.account-favorites.favorites-grid .favorite-card-wrap > :is(.pilot-card,.team-card) { min-height:100%; }
.favorites-empty { grid-column:1/-1; padding:1.1rem; border:1px dashed #cbd2dc; border-radius:12px; color:#697383; text-align:center; }
@media(max-width:600px) { .account-favorites.favorites-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.7rem; } .account-favorites.favorites-grid .favorite-star { top:.4rem; right:.4rem; } }
@media(max-width:380px) { .account-favorites.favorites-grid { grid-template-columns:minmax(0,1fr); } }
.team-favorite-button { margin:0 0 1rem; }
html[data-theme="dark"] .account-card { background:#1a1d24; border-color:#353a45; color:#f1f3f6; }
html[data-theme="dark"] .account-status { background:#242a34; color:#e6ebf2; }
html[data-theme="dark"] .account-form input,html[data-theme="dark"] .account-favorite-button { background:#222630; color:#f1f3f6; border-color:#474e5b; }
html[data-theme="dark"] .account-form .account-remember{color:#edf0f5}
html[data-theme="dark"] .password-preview-toggle { color:#c5ccd6; }
html[data-theme="dark"] .password-preview-toggle:hover { background:#343a46; color:#fff; }
html[data-theme="dark"] .account-favorite { border-color:#383e4b; }
html[data-theme="dark"] .account-mode-switch button { color:#f1f3f6; }
html[data-theme="dark"] .account-mode-switch button:not(.active) { background:#282d37; color:#f1f3f6; }
html[data-theme="dark"] .account-mode-switch button.active { color:#fff; }
html[data-theme="dark"] .account-nav-link { border-color:#e10600; color:#fff !important; }
@media(max-width:600px){.account-card{margin:1rem auto}.account-nav-link{font-size:.78rem;padding:.35rem .55rem}.account-favorite{align-items:flex-start}}



/* Favorite stars on driver and team cards */
.favorite-card-wrap { position:relative; min-width:0; height:100%; }
.favorite-card-wrap > .pilot-card, .favorite-card-wrap > .team-card { width:100%; height:100%; box-sizing:border-box; }
.favorite-star { position:absolute; z-index:3; top:.55rem; right:.55rem; display:grid; place-items:center; width:34px; height:34px; padding:0; border:1px solid #d4d9e1; border-radius:50%; background:rgba(255,255,255,.97); color:#667080; box-shadow:0 2px 7px #1018281a; font:400 1.18rem/1 Arial,sans-serif; cursor:pointer; transition:transform .16s ease,background .16s ease,color .16s ease,border-color .16s ease; }
.favorite-star:hover { transform:scale(1.04); color:#e10600; border-color:#e10600; }
.favorite-star.is-saved { color:#e10600; background:#fff0ef; border-color:#e10600; }
.favorite-star:focus-visible { outline:2px solid #e10600; outline-offset:2px; }
html[data-theme="dark"] .favorite-star { background:#252a34; border-color:#555d6a; color:#d1d6df; }
html[data-theme="dark"] .favorite-star.is-saved { color:#ff5c57; background:#3a2225; border-color:#ff5c57; }
html[data-theme="dark"] .favorite-star:hover { color:#ff5c57; }

/* Account settings, MFA and reset states */
.account-page { max-width:980px; }
.account-card { max-width:650px; }
.account-card h2 { margin:0 0 .55rem; }
.account-mode-switch { display:grid; grid-template-columns:1fr 1fr; gap:.6rem; margin:1.25rem 0 1.4rem; }
.account-mode-switch button { min-height:46px; }
.account-mfa-option { display:grid; gap:.35rem; padding:.9rem 1rem; border:1px solid #e4c9c7; border-radius:11px; background:#fff8f7; }
.account-mfa-option label { display:flex; align-items:flex-start; gap:.65rem; font-weight:700; line-height:1.45; }
.account-form .account-mfa-option input[type="checkbox"] { flex:0 0 1.15rem; width:1.15rem; height:1.15rem; min-height:1.15rem; margin:.12rem 0 0; accent-color:#e10600; }
.account-mfa-option .account-help { margin:0 0 0 1.8rem; }
.account-subform { margin-top:1rem; padding:1rem; border:1px solid #dce1e8; border-radius:12px; background:#f8f9fb; }
.account-subform h3 { margin:.1rem 0; }
.account-form-actions { display:flex; flex-wrap:wrap; gap:.65rem; }
.account-form-actions > * { flex:1 1 180px; }
#mfaCode { max-width:250px; font-size:1.4rem; font-weight:750; letter-spacing:.35em; text-align:center; }
[hidden] { display:none !important; }
html[data-theme="dark"] .account-mfa-option, html[data-theme="dark"] .account-subform { background:#222630; border-color:#474e5b; }

.account-mode-switch button { min-height:46px; font-weight:700; }
.account-mode-switch button.active { background:#e10600; color:#fff; border-color:#e10600; }
.account-mfa-option { display:grid; gap:.35rem; padding:.9rem 1rem; border:1px solid #e4c9c7; border-radius:11px; background:#fff8f7; }
.account-mfa-option label { display:flex; align-items:flex-start; gap:.65rem; font-weight:700; line-height:1.45; }
.account-form .account-mfa-option input[type="checkbox"] { flex:0 0 1.15rem; width:1.15rem; height:1.15rem; min-height:1.15rem; margin:.12rem 0 0; accent-color:#e10600; }
.account-mfa-option .account-help { margin:0 0 0 1.8rem; }
.account-subform { margin-top:1rem; padding:1rem; border:1px solid #dce1e8; border-radius:12px; background:#f8f9fb; }
.account-subform h3 { margin:.1rem 0; }
.account-form-actions { display:flex; flex-wrap:wrap; gap:.65rem; }
.account-form-actions > * { flex:1 1 180px; }
#mfaCode { max-width:250px; font-size:1.4rem; font-weight:750; letter-spacing:.35em; text-align:center; }
[hidden] { display:none !important; }
html[data-theme="dark"] .account-mfa-option, html[data-theme="dark"] .account-subform { background:#222630; border-color:#474e5b; }

.account-account-cta { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.account-reminder-toggle { display:flex; align-items:flex-start; gap:.7rem; margin:.85rem 0; padding:.9rem 1rem; border:1px solid #d9dee7; border-radius:10px; background:#fff; color:var(--f1-dark,#171b22); font-weight:700; line-height:1.45; cursor:pointer; }
.account-reminder-toggle input { flex:0 0 1.15rem; width:1.15rem; height:1.15rem; min-height:1.15rem; margin:.12rem 0 0; accent-color:#e10600; }
.account-reminder-toggle span { flex:1; }
.account-mail-test { margin-top:1rem; padding:.9rem 1rem; border:1px solid #dce1e8; border-radius:10px; background:#fff; }
.account-mail-test h3 { margin:.1rem 0 .35rem; font-size:1rem; }
.account-mail-test .account-help { margin:.2rem 0 .75rem; }
.account-reminder-test { margin-top:1rem; padding-top:1rem; border-top:1px solid #dce1e8; }
.account-reminder-test h4 { margin:.1rem 0 .35rem; font-size:.98rem; }
html[data-theme="dark"] .account-reminder-toggle { background:#1a1d24; border-color:#474e5b; color:#f1f3f6; }
html[data-theme="dark"] .account-mail-test { background:#1a1d24; border-color:#474e5b; }
html[data-theme="dark"] .account-reminder-test { border-color:#474e5b; }
.visitor-stats-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.7rem; margin:.9rem 0; }
.visitor-stats-summary > div { display:grid; gap:.25rem; min-width:0; padding:.85rem; border:1px solid var(--f1-border,#dce1e8); border-radius:11px; background:var(--f1-light,#f3f5f7); }
.visitor-stats-summary span { color:var(--f1-gray,#687386); font-size:.82rem; }
.visitor-stats-summary strong { font-size:1.55rem; }
.visitor-stats-columns { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(220px,.8fr); gap:1rem; margin-top:1rem; }
.visitor-stats-columns h3 { margin:.2rem 0 .6rem; font-size:1rem; }
.visitor-stats-table-wrap { max-width:100%; overflow:auto; border:1px solid var(--f1-border,#dce1e8); border-radius:10px; }
.visitor-stats-table { width:100%; border-collapse:collapse; font-size:.84rem; }
.visitor-stats-table th,.visitor-stats-table td { padding:.55rem .65rem; border-bottom:1px solid var(--f1-border,#dce1e8); text-align:left; white-space:nowrap; }
.visitor-stats-table th { background:var(--f1-light,#f3f5f7); font-size:.78rem; }
.visitor-top-pages { display:grid; gap:.35rem; margin:0; padding-left:1.5rem; }
.visitor-top-pages li { padding:.35rem 0; }
html[data-theme="dark"] .visitor-stats-summary > div { border-color:#474e5b; background:#222630; }
html[data-theme="dark"] .visitor-stats-summary span { color:#b8c0cc; }
html[data-theme="dark"] .visitor-stats-table-wrap { border-color:#474e5b; }
html[data-theme="dark"] .visitor-stats-table th,html[data-theme="dark"] .visitor-stats-table td { border-color:#3a414c; }
html[data-theme="dark"] .visitor-stats-table th { background:#242933; }
@media(max-width:680px){.visitor-stats-summary{grid-template-columns:1fr}.visitor-stats-columns{grid-template-columns:1fr}}

.account-totp-setup { margin-top:1rem; padding:1rem; border:1px solid var(--f1-border); border-radius:14px; background:var(--f1-light); }
.account-totp-setup h3 { margin:.1rem 0 .6rem; }
.account-totp-qr { display:grid; width:240px; min-height:240px; max-width:100%; place-items:center; margin:1rem auto; padding:10px; border-radius:12px; background:#fff; }
.account-totp-qr canvas,.account-totp-qr img { max-width:100%; height:auto; }
.account-totp-secret { display:block; overflow-wrap:anywhere; margin:.5rem 0 1rem; padding:.7rem; border:1px solid var(--f1-border); border-radius:8px; background:var(--f1-white); color:var(--f1-dark); font-size:.95rem; font-weight:750; letter-spacing:.08em; text-align:center; }
html[data-theme="dark"] .account-totp-setup { border-color:#414956; background:#20252e; }
@media(max-width:600px){.account-totp-qr{width:220px;min-height:220px}}
.account-mfa-option{border:1px solid #e4c9c7;border-radius:11px;padding:.9rem 1rem;background:#fff8f7}.account-mfa-option legend{padding:0 .35rem;font-weight:800}.account-mfa-option input[type=radio]{accent-color:#e10600}.account-delete-confirm{display:flex;align-items:flex-start;gap:.55rem}.account-delete-confirm input{width:auto;min-height:auto;margin-top:.3rem;accent-color:#e10600}html[data-theme="dark"] .account-mfa-option{background:#222630;border-color:#474e5b}

/* MFA is configured after sign-in, as a compact choice in account settings. */
.account-settings #enableTotpMfa,.account-settings #enableMfa{display:inline-flex;min-height:48px;align-items:center;justify-content:center;gap:.5rem;margin:.35rem .5rem .35rem 0;padding:.75rem 1rem;border-radius:10px;font-weight:750}
.account-settings #enableTotpMfa::before{content:"▦";font-size:1.05rem}
.account-settings #enableMfa::before{content:"✉";font-size:1.05rem}
.account-settings #disableMfa{display:block;margin-top:.55rem}
.account-settings #mfaAccountStatus{display:inline-block;padding:.18rem .55rem;border-radius:999px;background:#e9edf2;color:#394252;font-size:.88rem}
html[data-theme="dark"] .account-settings #mfaAccountStatus{background:#343b47;color:#f1f3f6}
.account-text-button[hidden]{display:none!important}
