/* Account area: sign-in forms, dashboard and admin. Builds on site.css. */
.inline { display: inline; margin: 0; }
.top .actions form { margin: 0; }
.flashes { margin-top: 4px; }
.flash { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 10px; font-size: 15px; }
.flash-ok { background: #e7f6ec; color: #17603a; border: 1px solid #c6e9d3; }
.flash-error { background: #fdecec; color: #9b2424; border: 1px solid #f5cccc; }

.app { padding: 26px 0 90px; }
.app h1 { font-size: clamp(34px, 5vw, 46px); max-width: none; margin-bottom: 8px; }
.app h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 14px; font-family: var(--sans); font-weight: 700; }
.app .sub { color: var(--body); margin: 0 0 26px; }
.narrow { max-width: 460px; margin: 0 auto; }
.mid { max-width: 760px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 26px; margin-bottom: 18px; }
.card > :last-child { margin-bottom: 0; }
.auth-card { padding: 32px; }
.auth-card h1 { font-size: 38px; }
.muted { color: var(--mute); font-size: 14.5px; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.spread h1 { margin: 0; }

/* forms */
label { display: block; font-weight: 600; font-size: 14.5px; margin: 16px 0 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--body); }
label.check input { margin-top: 4px; width: 17px; height: 17px; flex: none; accent-color: var(--brand); }
input[type=email], input[type=password], input[type=text], input[type=number], input[type=search], textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #d3d6dc; border-radius: 8px; font: 16px/1.4 var(--sans);
  background: #fff; color: var(--ink); }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { min-height: 76px; resize: vertical; }
.hint { color: var(--mute); font-size: 13.5px; margin-top: 6px; }
.form-actions { margin-top: 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn-block { width: 100%; }
.btn[disabled], button[disabled] { opacity: .55; cursor: not-allowed; }
.btn-danger { background: #c23b3b; color: #fff; } .btn-danger:hover { background: #a82f2f; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; }
.captcha-wrap { margin-top: 18px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--mute); font-size: 13px; margin: 22px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.js-error { color: #9b2424; font-size: 14px; margin-top: 10px; min-height: 1em; }

/* lists and tables */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--mute); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.table a { font-weight: 600; text-decoration: none; } .table a:hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; }
.num { font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: #eef0f3; color: var(--body); white-space: nowrap; }
.pill-ok { background: #e7f6ec; color: #17603a; } .pill-warn { background: #fff3d6; color: #7a5500; }
.pill-bad { background: #fdecec; color: #9b2424; } .pill-brand { background: var(--brand-soft); color: #22305e; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-family: var(--display); letter-spacing: -.02em; }
.stat span { color: var(--mute); font-size: 13.5px; }
.empty { text-align: center; padding: 34px 10px; color: var(--body); }

.banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #fff3d6; border: 1px solid #f0d98f; color: #5c4300; border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; }
.banner form { margin: 0; }
.secret { background: #fff8e1; border: 1px solid #f0d98f; }
.secret pre, .copybox { background: var(--night); color: #e8ecf5; border-radius: 8px; padding: 12px 14px; font: 14px/1.5 var(--mono);
  overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 10px 0; }

/* security page */
details.section { background: var(--white); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
details.section > summary { list-style: none; cursor: pointer; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary h2 { margin: 0; }
details.section > summary::after { content: "+"; font-size: 22px; color: var(--mute); }
details.section[open] > summary::after { content: "−"; }
details.section .body { padding: 0 24px 22px; }
.qr { width: 190px; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.codes { columns: 2; list-style: none; padding: 0; font: 17px/2 var(--mono); }
.keyrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.keyrow:last-child { border-bottom: 0; }
.subnav { display: flex; gap: 8px; margin-bottom: 20px; }
.subnav a { text-decoration: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--body); }
.subnav a.on { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 15px; margin: 0; }
.kv dt { color: var(--mute); } .kv dd { margin: 0; }
.danger { border-color: #f1c9c9; }

@media (max-width: 880px) {
  .top .actions .hide-sm { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .top { gap: 12px; } .top .actions { gap: 12px; }
  .top .actions .textlink:not(.hide-sm) { display: inline; }   /* keep "Sign in" / "Dashboard" on phones */
  .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 8px; }
  .codes { columns: 1; }
  .auth-card { padding: 22px; }
}
