/* SecKit — styles */
:root {
  --brand: #10b981; --brand-2: #06b6d4; --brand-grad: linear-gradient(135deg, #10b981, #06b6d4);
  --pos: #22c55e; --amber: #f59e0b; --neg: #ef4444;
  --radius: 16px; --radius-sm: 11px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
[data-theme="dark"] {
  --bg: #0a0e14; --surface: #111722; --surface-2: #18202e; --surface-3: #212b3b;
  --text: #e6edf6; --muted: #8b97a8; --border: #212b3b; --card: #0f1620;
}
[data-theme="light"] {
  --bg: #eef2f7; --surface: #ffffff; --surface-2: #f1f5f9; --surface-3: #e2e8f0;
  --text: #0f172a; --muted: #64748b; --border: #e2e8f0; --card: #ffffff;
  --shadow: 0 10px 30px -14px rgba(15, 23, 42, .16);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; }
[data-theme="dark"] body { background-image: radial-gradient(circle at 15% 0, rgba(16, 185, 129, .07), transparent 40%), radial-gradient(circle at 85% 100%, rgba(6, 182, 212, .07), transparent 40%); }
a { color: inherit; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: var(--brand); color: #042; padding: 8px 14px; border-radius: 8px; }
.app { display: flex; min-height: 100vh; }

/* sidebar */
.sidebar { width: 250px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.brand { font-size: 1.4rem; font-weight: 900; letter-spacing: -.5px; padding: 6px 10px 20px; display: flex; align-items: center; gap: 7px; }
.brand-mark { font-size: 1.45rem; }
.brand-accent { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: none; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: .92rem; border-radius: var(--radius-sm); cursor: pointer; text-align: left; transition: .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.ni-ic { width: 20px; text-align: center; }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; display: flex; flex-direction: column; gap: 10px; font-size: .8rem; }
.priv { color: var(--muted); }
.ghost-link { color: var(--brand); text-decoration: none; font-weight: 700; }
.ghost-link:hover { text-decoration: underline; }

/* main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 26px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar-title { font-size: 1.3rem; font-weight: 800; margin-right: auto; letter-spacing: -.4px; }
.menu-btn { display: none; }
.view { padding: 26px; flex: 1; max-width: 820px; width: 100%; }

/* buttons */
.btn { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.btn.sm { padding: 7px 13px; font-size: .85rem; }
.btn-primary { background: var(--brand-grad); border: none; color: #04221a; box-shadow: 0 8px 18px -10px var(--brand); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; }
.icon-btn { background: var(--surface-2); border: 1px solid var(--border); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 1rem; color: var(--text); display: inline-flex; align-items: center; justify-content: center; transition: .15s; flex-shrink: 0; }
.icon-btn:hover { border-color: var(--brand); }
.icon-btn.sm { width: 30px; height: 30px; font-size: .8rem; border-radius: 8px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.sub { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.note { color: var(--muted); font-size: .8rem; margin-top: 14px; line-height: 1.5; }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.field input, .field textarea, input[type=text], input[type=password] { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 12px 14px; border-radius: 10px; font: inherit; width: 100%; }
.field textarea { resize: vertical; font-family: var(--mono); font-size: .88rem; }
.field input:focus, .field textarea:focus, input:focus { outline: none; border-color: var(--brand); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* password input */
.pw-input { display: flex; gap: 8px; margin-bottom: 14px; }
.pw-input input { flex: 1; font-family: var(--mono); }

/* strength result */
.result-empty { color: var(--muted); padding: 24px 0; text-align: center; }
.score-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.score-row b { font-size: 1.1rem; }
.meter { flex: 1; height: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; transition: width .25s, background .25s; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-grid > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.stat-grid span { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.stat-grid b { font-size: 1.25rem; font-weight: 800; }
.result-empty + *, .card h3 { font-size: .95rem; font-weight: 800; margin: 4px 0 8px; }
.crack-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.crack-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; background: var(--surface-2); border-radius: 9px; font-size: .85rem; }
.crack-list li span { color: var(--muted); }
.crack-list li b { font-family: var(--mono); }
.alerts { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.alert { padding: 9px 13px; border-radius: 9px; font-size: .85rem; }
.alert.warn { background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); }
.alert.tip { background: var(--surface-2); color: var(--muted); }

/* tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { border: 1px solid var(--border); background: var(--surface); color: var(--muted); padding: 9px 18px; border-radius: 99px; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; }
.tab.on { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }

/* generator output */
.output-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.out { flex: 1; font-family: var(--mono); font-size: 1.15rem; font-weight: 600; word-break: break-all; min-height: 1.4em; color: var(--brand); }
.out-strength { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; min-height: 14px; }
.out-strength .meter { max-width: 160px; }
.range-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; font-size: .9rem; font-weight: 600; }
.range-row input[type=range] { width: 100%; accent-color: var(--brand); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chk { display: flex; align-items: center; gap: 9px; font-size: .88rem; cursor: pointer; }
.chk input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
.mini-sel { background: var(--surface-3); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: .82rem; }

/* breach */
.checking { padding: 18px 0; color: var(--muted); }
#bresult { margin-top: 16px; }
.breach-bad, .breach-good { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 12px; }
.breach-bad { background: color-mix(in srgb, var(--neg) 12%, transparent); border: 1px solid color-mix(in srgb, var(--neg) 40%, transparent); }
.breach-good { background: color-mix(in srgb, var(--pos) 12%, transparent); border: 1px solid color-mix(in srgb, var(--pos) 40%, transparent); font-size: 1.6rem; }
.breach-good b, .breach-bad b { font-size: 1rem; }
.breach-good p, .breach-bad p { font-size: .85rem; color: var(--muted); margin-top: 3px; }
.bb-num { font-size: 2rem; font-weight: 900; color: var(--neg); font-family: var(--mono); line-height: 1; }
#bcheck { margin-top: 4px; }

/* totp */
.totp-list { display: flex; flex-direction: column; gap: 10px; }
.totp { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; box-shadow: var(--shadow); }
.totp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.totp-main b { font-weight: 700; }
.totp-main small { color: var(--muted); font-size: .78rem; }
.totp-code { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; letter-spacing: 2px; color: var(--brand); cursor: pointer; }
.totp-ring { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--muted); background: conic-gradient(var(--brand) var(--p), var(--surface-3) 0); }
.totp-ring span { width: 26px; height: 26px; border-radius: 50%; background: var(--card); display: grid; place-items: center; }

/* hash */
.hash-out { display: flex; flex-direction: column; gap: 10px; }
.hash-row { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.hash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hash-head b { font-size: .82rem; color: var(--brand); }
.hash-row code { font-family: var(--mono); font-size: .8rem; word-break: break-all; color: var(--text); }

/* checklist / score */
.score-head { display: flex; align-items: center; gap: 22px; }
.ring { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) var(--p), var(--surface-3) 0); flex-shrink: 0; }
.ring span { width: 72px; height: 72px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 1.5rem; font-weight: 900; }
.ring small { font-size: .8rem; font-weight: 700; }
.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: .15s; box-shadow: var(--shadow); }
.check-item:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.check-item.done { background: color-mix(in srgb, var(--pos) 8%, var(--card)); }
.check-item.done span { color: var(--muted); text-decoration: line-through; }
.check-item input { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; }
.check-item span { font-size: .92rem; }

/* empty */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-ic { font-size: 2.6rem; margin-bottom: 10px; }

/* toast */
.toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--surface-3); color: var(--text); border: 1px solid var(--border); padding: 11px 20px; border-radius: 11px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); animation: slideup .25s ease; }
.toast.ok { border-left: 4px solid var(--pos); } .toast.err { border-left: 4px solid var(--neg); }
.toast.hide { opacity: 0; transition: .3s; }
@keyframes slideup { from { transform: translateY(14px); opacity: 0; } }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 18px 26px; margin-top: auto; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; max-width: 820px; margin: 0 auto; }
.foot-socials { display: flex; gap: 8px; }
.foot-socials a { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: .15s; }
.foot-socials a:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.footer-bottom { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); max-width: 820px; margin-inline: auto; }

/* responsive */
@media (max-width: 720px) {
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: inline-flex; }
  .view { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .checks, .row2, .stat-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
