/* Flygo ID: màu theo bộ mockup v2 (27/11/2026). Sáng / tối theo cài đặt của máy. Chữ dùng phông hệ thống: trang đăng nhập
   không tải gì từ máy chủ ngoài. */
:root { color-scheme: light dark;
  --bg: #F4F6FA; --bggrad: linear-gradient(160deg, #E9F0FF 0%, #F4F6FA 45%, #F3EEFF 100%); --surface: #FFFFFF; --soft: #EEF1F6; --ink: #101828; --muted: #566175; --line: #D5DBE6;
  --accent: #2F5BEA; --accent-ink: #2448C4; --accent-bg: #E8EEFF; --grad: linear-gradient(145deg, #16255C 0%, #2F5BEA 100%); --navy: #16255C;
  --ok: #0B6B3C; --ok-bg: #DFF5E8; --warn: #8A5200; --warn-bg: #FFF0D2; --bad: #B3261E; --bad-bg: #FCE6E4; --tag-bg: #EEF1F6; --tag-ink: #344054; }
@media (prefers-color-scheme: dark) { :root {
  --bg: #0D1117; --bggrad: linear-gradient(160deg, #111C3A 0%, #0D1117 50%, #1A1230 100%); --surface: #151B24; --soft: #1D2531; --ink: #E6EAF2; --muted: #A3AEC2; --line: #2F3A4D;
  --accent: #3F63E0; --accent-ink: #A9BEFF; --accent-bg: #1B2A52; --grad: linear-gradient(145deg, #0B1230 0%, #2A46B0 100%); --navy: #101A3F;
  --ok: #6FDCA4; --ok-bg: #11301F; --warn: #F2C572; --warn-bg: #33280F; --bad: #FF9A91; --bad-bg: #3A1715; --tag-bg: #1D2531; --tag-ink: #C9D2E3; } }
* { box-sizing: border-box }
body { margin: 0; min-height: 100vh; background: var(--bg); background-image: var(--bggrad); background-attachment: fixed; color: var(--ink); font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif }
a { color: var(--accent-ink) }
h1 { margin: 0; font-size: 26px; font-weight: 700 } h2 { margin: 0; font-size: 17px; font-weight: 600 } p { margin: 0 }
.muted { color: var(--muted) } .small { font-size: 13px } .mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all }
/* Đăng nhập: máy tính chia đôi (mảng giới thiệu + biểu mẫu); điện thoại chỉ còn logo và biểu mẫu. */
.auth { min-height: 100vh; display: flex }
.auth-brand { flex: 1 1 0; min-width: 0; background: var(--grad); color: #FFFFFF; padding: 40px; display: flex; flex-direction: column; gap: 28px; justify-content: space-between }
.auth-brand h2 { font-size: 34px; line-height: 1.2; font-weight: 700; max-width: 420px } .auth-brand p { font-size: 16px; color: #D5DEFF; max-width: 420px }
.auth-brand .brand .logo { background: #FFFFFF; color: #16255C }
.pills { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: #D5DEFF } .pills span { border: 1px solid #5670C7; border-radius: 999px; padding: 6px 12px }
.auth-form { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 40px 24px }
.auth-form .box { background: transparent; border: 0; padding: 0; gap: 18px }
.auth-form .brand { display: none }
@media (max-width: 860px) { .auth-brand { display: none } .auth-form { align-items: flex-start; padding: 32px 20px } .auth-form .brand { display: flex } }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px }
.box { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 18px }
.logo { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none }
.page { max-width: 760px; margin: 0 auto; padding: 28px 16px 56px; display: flex; flex-direction: column; gap: 20px }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end }
.between { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0 }
.stack { display: flex; flex-direction: column; gap: 10px }
.stack > .field, .box > .field { flex: none }
label { font-size: 13px; font-weight: 500 }
input { height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; background: var(--surface); color: var(--ink); width: 100% }
input[type=checkbox] { accent-color: var(--accent) }
input[readonly] { background: var(--soft); color: var(--muted) }
button, a.btn { min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 500 15px/1.2 inherit; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600 }
button.wide { width: 100% } button.danger { color: var(--bad) }
.pair { display: flex; flex-wrap: wrap; gap: 10px } .pair > button { flex: 1 1 150px }
button.link { border: 0; background: none; color: var(--accent-ink); padding: 0 4px; text-decoration: underline; min-height: 32px }
button:disabled { opacity: .5; cursor: not-allowed }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px } .or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line) }
.tag { display: inline-block; white-space: nowrap; font-size: 13px; font-weight: 500; border-radius: 999px; padding: 2px 10px; background: var(--tag-bg); color: var(--tag-ink) }
.tag.ok { background: var(--ok-bg); color: var(--ok) } .tag.bad { background: var(--bad-bg); color: var(--bad) } .tag.warn { background: var(--warn-bg); color: var(--warn) } .tag.blue { background: var(--accent-bg); color: var(--accent-ink) }
.note { border-radius: 12px; padding: 12px 14px; font-size: 14px; background: var(--accent-bg); color: var(--accent-ink) }
.note.bad { background: var(--bad-bg); color: var(--bad) } .note.ok { background: var(--ok-bg); color: var(--ok) } .note.warn { background: var(--warn-bg); color: var(--warn) }
.item { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line) } .item:first-child { border-top: 0; padding-top: 0 }
.item > div { min-width: 0; flex: 1 1 220px }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 14px }
.qr { align-self: flex-start; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 10px } .qr svg { display: block; width: 176px; height: 176px }
[hidden] { display: none !important }
.rcode { font: 600 20px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-align: center; padding: 14px 10px; border: 1px dashed var(--line, #c8cfdb); border-radius: 12px; user-select: all; overflow-wrap: anywhere; margin: 0 }
/* Biểu tượng nét trong nút (SVG nội tuyến, màu theo chữ). */
.ico { width: 20px; height: 20px; flex: none } .ico.sm { width: 16px; height: 16px } .ico.lg { width: 28px; height: 28px }
button.link.ilink { display: inline-flex; gap: 4px; vertical-align: middle; padding: 0 2px }
/* Đăng nhập bằng mã QR (máy tính): mã ở giữa, số đối chiếu bên cạnh. */
.qr-stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 22px }
.qr.qr-login { align-self: center; padding: 10px; border-radius: 14px; min-width: 212px; min-height: 212px; display: flex; align-items: center; justify-content: center }
.qr.qr-login svg { width: 190px; height: 190px }
.qr.qr-login.dim svg { opacity: .12; filter: blur(2px) }
.match { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 13px }
.match strong { font: 700 44px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); letter-spacing: .04em; background: var(--accent-bg); border-radius: 14px; padding: 8px 16px; min-width: 96px; text-align: center }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--muted) } .steps strong { color: var(--ink) }
/* Xác nhận trên điện thoại. */
.device { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft) } .device .ico { color: var(--accent-ink); margin-top: 2px }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px }
.choices button { min-height: 64px; font: 700 26px/1 ui-monospace, SFMono-Regular, Menlo, monospace }
.result { align-items: center; text-align: center; padding: 8px 0 }
.badge { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ok-bg); color: var(--ok) } .badge .ico { width: 32px; height: 32px }
.badge.bad { background: var(--bad-bg); color: var(--bad) }
/* Ghép máy / ký lệnh: thẻ máy, vân tay lớn, bảng thông tin hai cột, đếm ngược */
.devcard { display: flex; flex-direction: column; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft) }
.devcard .head { display: flex; align-items: center; gap: 12px } .devcard .head strong { font-size: 18px; line-height: 1.3 }
.fp { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line) }
.fp span { color: var(--muted); font-size: 13px }
.fp strong { font: 700 34px/1.15 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: var(--ink) }
.facts { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 8px 16px; margin: 0; font-size: 14px }
.facts dt { color: var(--muted) } .facts dd { margin: 0; font-weight: 500; word-break: break-word }
.facts dd.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px }
.expiry { font-size: 13px; color: var(--muted); text-align: center } .expiry.soon { color: var(--bad) }
.btnrow { display: flex; flex-direction: column; gap: 10px }
/* đăng nhập bằng mã QR: mã QR, số đối chiếu và trạng thái căn giữa */
#qr { text-align: center } #qr > .qr { align-self: center }
