/* ToolMakersHub Accounts — follows docs/brand-guidelines.md (tokens, Inter, pill buttons, light/dark). */
:root {
    --logo-from: #00b4db; --logo-to: #00d4aa;
    --brand: #007a99; --brand-2: #00b4db; --brand-ink: #ffffff;
    --bg: #ffffff; --surface: #ffffff; --surface-2: #f4f5f9;
    --text: #1d1f2b; --muted: #636779; --border: #dcdfe8;
    --danger: #b42318; --danger-bg: #fef3f2; --ok: #067647; --ok-bg: #ecfdf3; --warn: #b54708;
    --shadow: 0 10px 40px rgba(20, 21, 28, .08);
    color-scheme: light;
}
[data-theme="dark"] {
    --brand: #22c7e6; --brand-2: #2dd4bf; --brand-ink: #14151c;
    --bg: #14151c; --surface: #1b1d26; --surface-2: #262935;
    --text: #e8e9f0; --muted: #9a9db0; --border: #353846;
    --danger: #fda29b; --danger-bg: #3a1d1b; --ok: #75e0a7; --ok-bg: #11291e; --warn: #fec84b;
    --shadow: 0 10px 40px rgba(0, 0, 0, .35);
    color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    font: 15px/1.55 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg); color: var(--text);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; }
.topbar-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -.04em; font-size: 19px; margin-right: auto; }
.topbar-brand:hover { text-decoration: none; }
.topbar-brand svg { width: 34px; height: auto; }
.hub { background: linear-gradient(90deg, var(--logo-from), var(--logo-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.word-product { color: var(--muted); font-weight: 600; letter-spacing: -.02em; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.avatar { width: 36px; height: 36px; border-radius: 999px; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--logo-from), var(--logo-to)); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }

/* Auth card */
main { flex: 1; }
.auth-wrap { display: grid; place-items: start center; padding: 24px 16px 56px; }
.card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow); }
.card-head { text-align: center; margin-bottom: 22px; }
.card-head svg { width: 52px; height: auto; }
h1 { font-size: 24px; line-height: 1.25; letter-spacing: -.02em; margin: 12px 0 6px; }
.sub { color: var(--muted); margin: 0; }
.continue-to { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }

.provider { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 16px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.provider:hover { background: var(--surface-2); text-decoration: none; }
.provider svg { width: 20px; height: 20px; flex: none; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .row-label { display: flex; justify-content: space-between; align-items: baseline; }
.field .row-label a { font-size: 13px; font-weight: 500; }
input[type=text], input[type=email], input[type=password] {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--bg); color: var(--text); font: inherit;
}
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }
.reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.error { color: var(--danger); font-size: 13px; margin: 6px 0 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 16px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-block { width: 100%; padding: 12px 20px; }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }

.fine { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.legal { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 0; }
.alert { border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.trust { display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 18px; }
.trust svg { width: 14px; height: 14px; }

/* Account page */
.account { max-width: 860px; margin: 0 auto; padding: 8px 20px 64px; }
.account-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 24px; }
.account-head h1 { margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; margin-bottom: 18px; }
.panel h2 { font-size: 17px; margin: 0 0 4px; letter-spacing: -.01em; }
.panel > .sub { margin-bottom: 16px; font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.list .meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--danger-bg); color: var(--danger); }
.logo-tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.logo-tile svg { width: 20px; height: 20px; }
.panel.danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
details summary { cursor: pointer; font-weight: 600; color: var(--danger); }
details[open] summary { margin-bottom: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

footer { padding: 18px 24px; background: var(--surface-2); color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; }
footer a { color: var(--muted); }

@media (max-width: 640px) {
    .topbar { padding: 12px 14px; }
    .card { padding: 26px 18px; border-radius: 18px; box-shadow: none; }
    .grid-2 { grid-template-columns: 1fr; }
    .panel { padding: 18px 16px; }
    .list li { flex-wrap: wrap; }
    .word-product { display: none; }
}

/* Utilities (no inline styles: the CSP blocks them) */
.mt { margin-top: 18px; }
.mt-sm { margin-top: 10px; }
.inline-form { display: inline; }
.push-right { margin-left: auto; }
.h3 { font-size: 15px; margin: 0 0 10px; }
.meta { color: var(--muted); font-size: 13px; }
