/* Sunlectric accounts: sign-in dialog, header avatar and menu, /account/ and /v/ pages.
   Works on every page type (static pages, Desk, Studio), so it uses its own fallbacks for the brand colours. */
.acc-dlg, .acc-menu, .acc-toast, .acc-page {
  --acc-ink: var(--ink, #00396A);
  --acc-amber: #FFA900;
  --acc-bg: var(--paper, #FFFFFF);
  --acc-fg: var(--text, #1B2430);
  --acc-muted: var(--muted, #5B6675);
  --acc-line: var(--line, #D9DEE5);
  --acc-err: #B42318;
  --acc-ok: #0F7B3E;
}
.acc-dlg {
  border: 0; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  background: var(--acc-bg); color: var(--acc-fg); box-shadow: 0 24px 60px rgba(0, 20, 40, .28); font: 1rem/1.5 "Noto Sans", system-ui, sans-serif;
}
.acc-dlg::backdrop { background: rgba(0, 25, 50, .45); }
.acc-dlg-in { position: relative; padding: 24px 22px 20px; overflow: auto; max-height: calc(100dvh - 24px); box-sizing: border-box; }
.acc-x { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--acc-muted); border-radius: 50%; }
.acc-x:hover, .acc-x:focus-visible { background: rgba(0, 57, 106, .08); color: var(--acc-ink); }
.acc-h { margin: 0 32px 6px 0; font: 700 1.3rem/1.25 Poppins, "Noto Sans", sans-serif; color: var(--acc-ink); }
.acc-lead { margin: 0 0 16px; color: var(--acc-fg); }
.acc-small { font-size: .85rem; color: var(--acc-muted); margin: 10px 0 0; }
.acc-small a, .acc-lead a { color: var(--acc-ink); }
.acc-gbtn { min-height: 44px; display: flex; justify-content: center; margin: 6px 0 4px; }
.acc-err { color: var(--acc-err); font-size: .9rem; margin: 8px 0 0; }
.acc-dev { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; margin-top: 12px; padding: 10px; border: 1px dashed var(--acc-line); border-radius: 10px; }
.acc-dev p { grid-column: 1 / -1; margin: 0; }
.acc-dev input, .acc-dev select { min-width: 0; padding: 8px; border: 1px solid var(--acc-line); border-radius: 8px; font: inherit; }

.acc-form { display: grid; gap: 12px; }
.acc-f { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; color: var(--acc-fg); min-width: 0; }
.acc-f small { font-weight: 400; color: var(--acc-muted); }
.acc-f input, .acc-mob {
  font: 400 1rem/1.4 "Noto Sans", system-ui, sans-serif; padding: 10px 12px; border: 1px solid var(--acc-line); border-radius: 10px;
  background: #fff; color: #1B2430; min-width: 0; width: 100%; box-sizing: border-box;
}
.acc-mob { display: flex; align-items: center; gap: 8px; padding: 0 0 0 12px; }
.acc-mob span { color: var(--acc-muted); }
.acc-mob input, .acc-f .acc-mob input:focus { border: 0; padding: 10px 12px 10px 0; outline: none; }
.acc-mob:focus-within, .acc-f input:focus { outline: 2px solid var(--acc-amber); outline-offset: 1px; border-color: var(--acc-ink); }
.acc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .acc-row { grid-template-columns: 1fr; } }
.acc-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.acc-check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--acc-ink); }
.acc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.acc-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 1.5px solid var(--acc-ink); background: transparent; color: var(--acc-ink); font: 600 .95rem/1.2 "Noto Sans", system-ui, sans-serif;
  text-decoration: none; cursor: pointer; box-sizing: border-box;
}
.acc-btn:hover { background: rgba(0, 57, 106, .06); }
.acc-btn:focus-visible { outline: 3px solid var(--acc-amber); outline-offset: 2px; }
.acc-btn-p { background: #00396A; border-color: #00396A; color: #fff; }
.acc-btn-p:hover { background: #002a4f; }
[data-scheme="midnight"] .acc-btn-p { border-color: #9CC7FF; }
.acc-btn-warn { border-color: var(--acc-err); color: var(--acc-err); }
.acc-btn-s { min-height: 36px; padding: 6px 14px; font-size: .85rem; }
.acc-btn[disabled], .acc-btn:disabled { opacity: .55; cursor: not-allowed; }
.acc-saved { color: var(--acc-ok); font-weight: 600; }

/* header avatar + menu (the header hides its account icon on phones; with accounts on it stays) */
.sh .sh-acct.acc-ready { display: inline-flex; align-items: center; justify-content: center; }
.sh-acct.acc-on { padding: 0; overflow: hidden; }
.acc-av { width: 32px; height: 32px; border-radius: 50%; display: block; object-fit: cover; }
.acc-av-t { display: grid; place-items: center; background: #FFA900; color: #00396A; font: 700 .8rem/1 Poppins, sans-serif; }
.acc-menu {
  position: absolute; z-index: 1000; min-width: 220px; max-width: calc(100vw - 16px); background: var(--acc-bg); color: var(--acc-fg);
  border: 1px solid var(--acc-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 20, 40, .18); padding: 6px; font: .95rem/1.4 "Noto Sans", sans-serif;
}
.acc-menu[hidden] { display: none; }
.acc-menu a, .acc-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; border: 0; background: none; color: inherit; font: inherit; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.acc-menu a:hover, .acc-menu button:hover, .acc-menu a:focus-visible, .acc-menu button:focus-visible { background: rgba(0, 57, 106, .08); outline: none; }
.acc-menu-who { margin: 0; padding: 8px 12px 10px; border-bottom: 1px solid var(--acc-line); display: grid; gap: 2px; }
.acc-menu-who span { font-size: .85rem; color: var(--acc-muted); }
.acc-role { justify-self: start; text-transform: capitalize; background: #FFF3D6; color: #6B4500 !important; border-radius: 999px; padding: 1px 8px; font-weight: 600; }

.acc-toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 1001;
  background: #00396A; color: #fff; padding: 10px 18px; border-radius: 999px; font: 600 .9rem/1.3 "Noto Sans", sans-serif; transition: .2s; max-width: calc(100vw - 32px);
}
.acc-toast.on { opacity: 1; transform: translate(-50%, 0); }
html.se-has-bar .acc-toast { bottom: 84px; }
@media (max-width: 700px) { html.se-has-bar .acc-toast { bottom: 132px; } }

/* /account/ and /v/ */
.acc-page { padding-bottom: 40px; }
.acc-card { background: var(--surface, var(--card, #fff)); border: 1px solid var(--acc-line); border-radius: 14px; padding: 18px; margin: 0 0 16px; color: var(--acc-fg); }
.acc-card h2 { margin: 0 0 10px; font: 700 1.15rem/1.3 Poppins, "Noto Sans", sans-serif; color: var(--acc-ink); }
.acc-card-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.acc-card-h .acc-small { margin: 0; }
.acc-signin .acc-gbtn { justify-content: flex-start; }
.acc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.acc-list li { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--acc-line); border-radius: 10px; }
.acc-list li > div:first-child { display: grid; gap: 2px; min-width: 0; }
.acc-list .acc-small { margin: 0; }
.acc-li-a { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .85rem; overflow-wrap: anywhere; }
.acc-table-wrap { overflow-x: auto; }
.acc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.acc-table th, .acc-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--acc-line); }
.acc-table th { color: var(--acc-muted); font-weight: 600; }
.acc-verify-f { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 8px; }
.acc-verify-f .acc-f { flex: 1 1 260px; }
.acc-vcard.is-ok { border-color: var(--acc-ok); box-shadow: inset 4px 0 0 var(--acc-ok); }
.acc-vcard.is-bad { border-color: var(--acc-err); box-shadow: inset 4px 0 0 var(--acc-err); }
.acc-vstat { font: 700 1.2rem/1.3 Poppins, sans-serif; margin: 0 0 10px; }
.is-ok .acc-vstat { color: var(--acc-ok); }
.is-bad .acc-vstat { color: var(--acc-err); }
.acc-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.acc-dl dt { color: var(--acc-muted); }
.acc-dl dd { margin: 0; font-weight: 600; min-width: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .acc-dlg, :root:not([data-theme="light"]) .acc-menu { --acc-bg: #0f1d2c; --acc-fg: #E8EEF5; --acc-muted: #A8B3C2; --acc-line: #2A3A4D; --acc-ink: #9CC7FF; --acc-err: #FF9C94; }
}
[data-scheme="midnight"] .acc-dlg, [data-scheme="midnight"] .acc-menu, [data-scheme="midnight"] .acc-page,
:root[data-theme="dark"]:where(:not([data-scheme]),[data-scheme="sunrise"]) .acc-page { --acc-bg: #0f1d2c; --acc-fg: #E8EEF5; --acc-muted: #A8B3C2; --acc-line: #2A3A4D; --acc-ink: #9CC7FF; --acc-err: #FF9C94; }
/* Studio's header carries two extra buttons; on the narrowest phones make room for the account button */
@media (max-width: 380px) { .sh-studio:has(.sh-acct.acc-ready) .sh-logo { width: 96px; } .sh-studio:has(.sh-acct.acc-ready) .sh-row { gap: 4px; } }
