:root { color-scheme: light; font-family: "Segoe UI", system-ui, sans-serif; color: #172033; background: #f4f6fa; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
header { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; background: #fff; border-bottom: 1px solid #e5e9f2; }
header h1 { margin-bottom: 2px; }
.header-note { margin: 0; color: #667085; font-size: 13px; }
h1 { font-size: 22px; margin: 0; }
h2 { margin-top: 0; }
main { max-width: 1040px; margin: 32px auto; padding: 0 20px; }
.card { background: #fff; border: 1px solid #e3e7ef; border-radius: 12px; padding: 24px; box-shadow: 0 8px 28px rgba(30,45,80,.06); }
.narrow { max-width: 520px; margin: 70px auto; }
.hidden { display: none !important; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, textarea, select { width: 100%; border: 1px solid #bac3d2; border-radius: 7px; padding: 10px 12px; font: inherit; }
textarea { min-height: 280px; resize: vertical; }
button { border: 1px solid #aab3c2; background: #fff; border-radius: 7px; padding: 9px 15px; font: inherit; cursor: pointer; }
button.primary { background: #315ed6; color: #fff; border-color: #315ed6; }
button.danger { color: #b42318; border-color: #f0b7b2; }
button:disabled { opacity: .55; cursor: wait; }
.row { display: flex; gap: 10px; align-items: center; }
.row > input { flex: 1; }
.status { min-height: 24px; margin-top: 14px; color: #475467; }
.error { color: #b42318; }
.success { color: #067647; }
.workspace { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.vault-card { max-width: 1180px; margin: 0 auto; }
.vault-toolbar { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.tabs { display: flex; gap: 4px; padding: 3px; background: #eef2f8; border-radius: 9px; }
.tabs button { border: 0; background: transparent; }
.tabs button.active { background: #fff; color: #234bb4; box-shadow: 0 1px 4px rgba(30,45,80,.14); }
.memo-list { list-style: none; padding: 0; margin: 12px 0; }
.memo-list button { width: 100%; text-align: left; border: 0; border-bottom: 1px solid #edf0f5; border-radius: 0; padding: 12px 8px; }
.memo-list button.selected { background: #eef4ff; color: #234bb4; font-weight: 600; }
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.header-actions { margin: 0; }
.warning { background: #fffaeb; border: 1px solid #fedf89; padding: 12px; border-radius: 8px; }
.compact { margin-bottom: 0; }
.recovery { white-space: pre-wrap; font: 16px/1.7 Consolas, monospace; background: #f8fafc; padding: 16px; border-radius: 8px; user-select: all; }
.kit-grid { display: grid; grid-template-columns: 1fr 230px; gap: 20px; align-items: center; }
.recovery-qr svg { display: block; width: 100%; height: auto; }
.connect-qr { width: min(330px, 100%); margin: 22px auto; }
.connect-qr svg { display: block; width: 100%; }
.approval-code { display: block; margin: 14px 0; padding: 12px; border: 2px solid #2563eb; border-radius: 8px; background: #eff6ff; color: #111827; font: 700 30px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .18em; text-align: center; }
.approval-camera { width: 100%; max-height: 360px; border-radius: 8px; background: #101828; margin-bottom: 12px; }
.approval-details { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e5e9f2; }
.fingerprint { display: block; margin: 10px 0; padding: 14px; border: 2px solid #2563eb; border-radius: 8px; background: #eff6ff; color: #111827; font: 700 28px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .06em; text-align: center; }
.checkbox-label { display: flex; gap: 9px; align-items: center; font-weight: 400; margin: 10px 0; }
.checkbox-label input { width: auto; }
.recovery-copy + .recovery-copy { margin-top: 30px; padding-top: 24px; border-top: 2px dashed #98a2b3; }
.word-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { font-weight: 400; display: flex; gap: 9px; align-items: center; }
.check input { width: auto; }
.recovery-input { min-height: 140px; font-family: Consolas, monospace; }
.draft-notice { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #eff8ff; border: 1px solid #b2ddff; border-radius: 8px; padding: 10px; }
.draft-notice span { flex: 1; }
.conflicts { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e5e9f2; }
.conflicts h2 { font-size: 18px; }
.conflicts ul { list-style: none; padding: 0; }
.conflicts li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf0f5; }
.admin-main { max-width: 1280px; }
.admin-section { margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: 2fr 1.5fr 150px auto; gap: 12px; align-items: end; }
.form-grid label { margin-top: 0; }
.form-action { padding-bottom: 1px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin-bottom: 5px; }
.section-heading p { margin-top: 0; color: #667085; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 920px; }
th, td { padding: 11px 9px; text-align: left; border-bottom: 1px solid #e7ebf2; vertical-align: top; }
th { color: #475467; font-size: 13px; background: #f8fafc; }
td small { display: block; color: #667085; margin-top: 3px; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-actions button, .device-list button, .passkey-list button { padding: 6px 9px; font-size: 13px; }
.device-list, .passkey-list, .audit-list { list-style: none; padding: 0; margin: 4px 0; }
.device-list li, .passkey-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px; border-bottom: 1px solid #edf0f5; }
.device-help, .device-meta, .connection-history p { color: #667085; font-size: 13px; }
.device-meta { display: block; margin-top: 3px; }
.connection-history { margin: 14px 0; padding: 10px 12px; border: 1px solid #dfe4ec; border-radius: 8px; background: #f8fafc; }
.connection-history summary { cursor: pointer; font-weight: 600; }
.audit-list li { padding: 8px 3px; border-bottom: 1px solid #edf0f5; font-family: Consolas, monospace; font-size: 13px; }
.management-section { padding: 4px 0 18px; border-bottom: 1px solid #e5e9f2; }
.management-section + .management-section { margin-top: 18px; }
.danger-zone { border: 1px solid #f0b7b2; border-radius: 9px; padding: 16px; }
dialog { width: min(920px, 94vw); max-height: 92vh; overflow: auto; border: 0; border-radius: 12px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20,30,50,.55); }
@media (max-width: 760px) { .workspace, .form-grid, .kit-grid, .word-checks { grid-template-columns: 1fr; } .vault-toolbar { display: block; } header { padding: 14px 18px; } .section-heading { display: block; } .device-list li, .passkey-list li, .conflicts li { align-items: flex-start; flex-direction: column; } }
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body * { visibility: hidden; }
  #recovery-print, #recovery-print * { visibility: visible; }
  #recovery-print { position: absolute; inset: 0; }
  .recovery-copy { page-break-after: always; break-after: page; }
  .recovery-copy:last-child { page-break-after: auto; break-after: auto; }
  .recovery { font-size: 13px; line-height: 1.45; }
  .kit-grid { grid-template-columns: 1fr 190px; }
}
