:root {
  --bg: #f5f5f7;
  --bg-soft: #fbfbfd;
  --card: #ffffff;
  --border: #e6e6eb;
  --text: #1d1d1f;
  --text-soft: #424245;
  --text-mute: #86868b;
  --brand: #0071e3;
  --brand-hover: #0077ed;
  --brand-soft: #e8f1ff;
  --ok: #28a745;
  --ok-soft: #e8f6ec;
  --bad: #ff3b30;
  --bad-soft: #ffeceb;
}

* { box-sizing: border-box; }
html, body { min-height: 100vh; margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; letter-spacing: 0; cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

body.is-app {
  background:
    radial-gradient(680px 380px at 12% -8%, rgba(120, 170, 255, 0.35) 0%, transparent 60%),
    radial-gradient(680px 420px at 92% 8%, rgba(255, 170, 200, 0.30) 0%, transparent 60%),
    linear-gradient(180deg, #f5f6fa 0%, #eceef3 100%);
}

.page { max-width: 1180px; display: flex; flex-direction: column; gap: 16px; margin: 0 auto; padding: 28px 18px 40px; }
.card { padding: 22px; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 22px; background: rgba(255, 255, 255, 0.72); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 18px 40px -20px rgba(20, 30, 60, 0.16); backdrop-filter: saturate(180%) blur(22px); }

.ad-card { padding: 14px 20px; border: 1px solid rgba(0, 113, 227, 0.15); border-radius: 18px; background: var(--brand-soft); color: var(--brand); font-size: 14.5px; font-weight: 500; text-align: center; }
.ad-card a { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.hero__head { display: flex; align-items: center; gap: 12px; }
.hero__logo { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; background: radial-gradient(120% 120% at 30% 20%, #ffffff 0%, #f2f2f5 60%, #e6e7eb 100%); box-shadow: 0 8px 16px -10px rgba(20, 30, 60, 0.30); }
.hero__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 600; }
.badge { padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 600; }
.hero__desc { margin: 10px 0 16px; color: var(--text-mute); font-size: 14px; }
.hero__warning { color: var(--bad); }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { padding: 6px 14px; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 999px; background: rgba(255, 255, 255, 0.85); color: var(--text-soft); font-size: 13px; }
.stat b { margin-left: 4px; color: var(--text); font-weight: 700; }
.stat--ok b { color: var(--ok); }
.stat--bad b { color: var(--bad); }

.list__head { display: flex; justify-content: space-between; margin-bottom: 16px; }
.list__title { margin: 0; font-size: 17px; font-weight: 600; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 999px; background: #fff; font-size: 13px; }
.btn-ghost:hover { border-color: rgba(0, 113, 227, 0.35); background: var(--brand-soft); color: var(--brand); }
.btn-ghost:focus-visible, .btn-copy:focus-visible, a:focus-visible { outline: 3px solid rgba(0, 113, 227, 0.3); outline-offset: 2px; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.is-loading svg { animation: spin 0.8s linear infinite; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.acct { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 16px; background: rgba(255, 255, 255, 0.92); transition: transform 0.18s; }
.acct:hover { border-color: rgba(0, 113, 227, 0.18); transform: translateY(-1px); }
.acct__head { display: flex; align-items: flex-start; justify-content: space-between; }
.acct__user { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.acct__email { overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.acct__region { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.04); color: var(--text-mute); font-size: 11px; }
.acct__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(0, 0, 0, 0.05); font-size: 13px; }
.acct__label { flex-shrink: 0; color: var(--text-mute); font-size: 12px; }
.acct__pwd { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pwd__mask, .pwd__plain { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13.5px; font-weight: 500; }
.pwd__plain { color: var(--bad); }
.acct__time { color: var(--text-soft); font-size: 12.5px; text-align: right; }
.acct__foot { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid rgba(0, 0, 0, 0.05); }

.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.04); font-size: 12.5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-mute); }
.dot.is-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.18); }
.dot.is-bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.18); }
.status:has(.is-ok) { background: var(--ok-soft); }
.status:has(.is-bad) { background: var(--bad-soft); }
.is-ok-text { color: #1e7e34; font-weight: 500; }
.is-bad-text { color: #c81e0f; font-weight: 500; }

.btn-copy { height: 24px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 0; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 500; white-space: nowrap; }
.btn-copy:hover { background: var(--brand); color: #fff; }
.state { padding: 28px 0; color: var(--text-mute); font-size: 13px; text-align: center; }

.footer { margin-top: 20px; padding-top: 16px; color: var(--text-mute); font-size: 13px; text-align: center; }
.footer p { margin: 0 0 8px; }
.footer-links a { margin: 0 6px; color: var(--text-mute); text-decoration: none; }
.footer-links a:hover { color: var(--brand); text-decoration: underline; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 999; padding: 12px 20px; border-radius: 14px; background: rgba(29, 29, 31, 0.95); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); color: #fff; font-size: 13px; line-height: 1.5; text-align: center; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateX(-50%); transition: 0.2s; }
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast__title { font-size: 14px; font-weight: 700; }
.toast__subtitle { margin-top: 4px; color: #ff8a80; font-size: 12px; }

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .page { padding: 18px 14px 28px; }
  .card { padding: 18px; }
  .acct__head { gap: 8px; }
  .toast { max-width: calc(100vw - 28px); white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
