/* A Conta (A14) no login da Arkens (A17): casca mínima da Trilho (cabeçalho de 52 px, sem trilho de aplicações),
   coluna de 232 px e cartões de 760 px, com as medidas da tela 05-account. Cores e fontes só pelos tokens. */

@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-text); font-size: var(--size-body); line-height: var(--line-body); -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--font-mono); font-size: var(--size-caption); }
.muted { color: var(--text-2); }
.strong { font-weight: 700; font-size: var(--size-card); }
.stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.shell { max-width: 1440px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.header { height: var(--h-header); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px 0 14px; border-bottom: 1px solid var(--line); }
.trail, .me { display: flex; align-items: center; gap: 14px; }
.me { gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.symbol { width: 26px; height: 16px; display: block; fill: var(--text); }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.sep { color: var(--line-4); }
.here { font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.avatar.big { width: 40px; height: 40px; font-size: 13px; }
.ghost, .lang { height: 32px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-control); background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--size-small); font-weight: 600; text-decoration: none; cursor: pointer; }
.ghost:hover, .lang:hover { color: var(--text); }

.body { display: flex; flex-wrap: wrap; flex-grow: 1; }
.side { width: var(--w-settings-nav); flex: 0 0 var(--w-settings-nav); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 8px; gap: 2px; }
.side .group { font-size: var(--size-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-4); padding: 8px 10px 4px; }
.side a { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 10px; border-radius: var(--radius-control); color: var(--text-2); text-decoration: none; }
.side a[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.count { color: var(--text-4); font-weight: 400; }

.main { flex: 999 1 560px; min-width: 0; padding: 28px 40px 40px; }
.content { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
h1 { margin: 0 0 8px; font-size: 20px; line-height: 26px; font-weight: 700; }
h2 { margin: 0; font-size: var(--size-card); font-weight: 700; }

.card { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); display: flex; flex-direction: column; }
.card-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head.person { display: flex; align-items: center; gap: 14px; }
.card-head.split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.row.last { border-bottom: 0; }
.row.column { flex-direction: column; align-items: stretch; gap: 10px; }
.row .label { font-weight: 600; }
.row-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.inline { display: flex; gap: 8px; align-items: flex-start; width: 100%; flex-wrap: wrap; }
.inline input { flex: 1 1 220px; }

.button, .primary { height: 30px; padding: 0 12px; border-radius: var(--radius-control); font: inherit; font-size: var(--size-small); font-weight: 600; cursor: pointer; white-space: nowrap; }
.button { border: 1px solid var(--line-2); background: var(--surface); color: var(--text); }
.button:hover { border-color: var(--line-4); }
.primary { border: 0; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.text { height: 26px; padding: 0 10px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: var(--size-small); font-weight: 600; cursor: pointer; }
.text:hover { color: var(--bad); }
input, select { height: 32px; padding: 0 10px; border: 1px solid var(--line-3); border-radius: var(--radius-control); background: var(--bg); color: var(--text); font: inherit; }
input:focus, select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Chave: estado com texto ao lado, nunca só cor (A14). */
.switch { width: 40px; height: 22px; padding: 2px; border: 1px solid var(--line-3); border-radius: 11px; background: var(--surface-3); cursor: pointer; display: inline-flex; }
.switch::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform 0.12s; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after { background: var(--on-accent); transform: translateX(18px); }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }

.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-tile); overflow: hidden; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .dim { color: var(--text-4); }

.session { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.session:last-child { border-bottom: 0; }
.session .icon { width: 32px; height: 32px; border-radius: var(--radius-control); background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; }
.session .icon svg, .list svg { width: 16px; height: 16px; stroke: var(--text-2); fill: none; stroke-width: 1.5; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: var(--radius-pill); background: var(--ok-soft); color: var(--ok); font-size: var(--size-small); font-weight: 600; margin-left: 8px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.totp-setup { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 16px; width: 100%; align-items: start; }
.qr { width: 148px; height: 148px; background: #fff; border-radius: var(--radius-tile); padding: 8px; }
.qr canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.secret { word-break: break-all; }

.error { margin: 0; color: var(--bad); font-size: var(--size-small); }
.error:empty { display: none; }
.note { color: var(--text-3); font-size: var(--size-small); }

.dialog { border: 1px solid var(--line-2); border-radius: var(--radius-dialog); background: var(--surface); color: var(--text); padding: 0; width: min(400px, calc(100vw - 32px)); }
.dialog::backdrop { background: var(--overlay); }
.dialog-form { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.dialog-form label { font-size: var(--size-small); font-weight: 600; }
.dialog-form-field { display: flex; flex-direction: column; gap: 10px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
