/* Trang đăng nhập tập trung (thiết kế "Login tập trung", HTTTN v3). CSP chặn style inline: mọi kiểu nằm ở file này. */

/* Manrope (OFL), tự host vì CSP chỉ cho nạp tài nguyên cùng origin. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-vietnamese-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #03112b;
  --ink: #00020e;
  --text: #0a0a0a;
  --body: #263541;
  --muted: #6a757e;
  --border: #e2e6e9;
  --subtle: #f1f6fa;
  --primary: #06a1f6;
  --primary-strong: #0581c5;
  --primary-deep: #046194;
  --primary-tint: #cdecfd;
  --danger-bg: #fdecea;
  --danger: #8a1c14;
  --ok-bg: #e9f7ef;
  --ok: #1e5a35;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--text);
  font: 14px/1.5 "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

a { color: var(--primary-strong); text-decoration: none; font-weight: 600; }
a:hover { color: var(--primary-deep); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

svg.i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Khung hai cột: panel thương hiệu (trái) + form (phải) ---- */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }

.brand {
  position: relative;
  overflow: hidden;
  flex: 1 1 520px;
  min-height: 420px;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  color: #fff;
  background-color: var(--navy);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(6, 161, 246, .35) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(30, 46, 192, .45) 0%, transparent 45%);
}
.brand-mark { position: absolute; right: -60px; bottom: -40px; width: 420px; height: 420px; color: #fff; opacity: .05; }
.brand-logo { position: relative; height: 40px; width: auto; align-self: flex-start; }
.brand-body { position: relative; max-width: 520px; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px;
  border: 1px solid rgba(155, 217, 251, .4); border-radius: 999px; background: rgba(6, 161, 246, .12);
  color: #cdecfd; font-size: 12px; font-weight: 700; letter-spacing: .5px;
}
.brand-title { margin: 20px 0 12px; font-size: 40px; line-height: 1.2; font-weight: 800; }
.brand-lead { margin: 0; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .75); }
.brand-points { margin: 32px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.brand-points li { display: flex; gap: 12px; align-items: flex-start; }
.brand-points .badge {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(6, 161, 246, .18); color: #6ac7fa;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-points strong { display: block; font-weight: 700; }
.brand-points span.desc { color: rgba(255, 255, 255, .7); }
.brand-foot { position: relative; font-size: 12px; color: rgba(255, 255, 255, .55); }

.panel {
  flex: 1 1 480px;
  min-width: 0;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background-color: #fff;
  background-image: radial-gradient(circle at top right, var(--primary-tint) 0%, transparent 30%);
}
.panel-body { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.panel-foot {
  width: 100%; max-width: 400px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: var(--muted);
}

/* ---- Nội dung form ---- */
h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.25; font-weight: 800; color: var(--ink); }
.place { margin: 0; font-size: 14px; color: var(--muted); }
.place strong { color: var(--ink); }
.unit {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 3px 10px; border-radius: 999px;
  background: #e6f6fe; color: #024062; font-size: 12px; font-weight: 700;
}

form { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 14px; font-weight: 600; color: var(--ink); }

.input {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(6, 161, 246, .18); }
.input svg.i { color: var(--muted); }
.input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 14px; color: var(--text); }
.input input:focus-visible { outline: none; }
.input.with-action { padding-right: 4px; }
.reveal {
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.reveal:hover { background: var(--subtle); color: var(--ink); }
.reveal[hidden] { display: none; }

/* Ô nhập không có biểu tượng (mã OTP, mật khẩu mới...) dùng chung kiểu viền */
.panel-body input:not([type="checkbox"]):not([type="hidden"]):not(.bare) {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); font-size: 14px; color: var(--text);
}
.panel-body input:not([type="checkbox"]):not([type="hidden"]):not(.bare):focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(6, 161, 246, .18);
}

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

button, a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; padding: 0 16px;
  border: 0; border-radius: var(--radius); background: var(--primary); color: #fff; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; box-shadow: 0 4px 12px rgba(6, 161, 246, .3);
}
button:hover, a.button:hover { background: var(--primary-strong); color: #fff; text-decoration: none; }
button.secondary {
  background: #fff; color: var(--primary-strong); border: 1px solid var(--border); box-shadow: none; font-size: 14px;
}
button.secondary:hover { background: var(--subtle); color: var(--primary-deep); }

.error, .notice, .hint { display: flex; gap: 10px; margin: 0; padding: 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.error { background: var(--danger-bg); color: var(--danger); }
.notice { background: var(--ok-bg); color: var(--ok); }
.hint { background: var(--subtle); color: var(--body); }
.hint svg.i { color: var(--primary-strong); margin-top: 2px; }

.links { margin: 0; text-align: center; font-size: 14px; }

/* Cài ứng dụng xác thực, mã khôi phục */
.steps { margin: 0; padding-left: 20px; color: var(--body); }
.steps li + li { margin-top: 4px; }
.qr { display: block; margin: 0 auto; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: #fff; image-rendering: pixelated; }
code.key { word-break: break-all; font-size: 13px; color: var(--ink); }
.codes { columns: 2; margin: 0; padding: 12px 12px 12px 36px; border-radius: 10px; background: var(--subtle); font-size: 15px; }
.codes code { letter-spacing: .04em; }

/* ---- Màn hình hẹp: panel thương hiệu thu gọn lên trên ---- */
@media (max-width: 720px) {
  .brand { min-height: 0; padding: 24px 16px; gap: 16px; flex-basis: 100%; }
  .brand-mark, .brand-points, .brand-lead, .brand-foot { display: none; }
  .brand-title { margin: 12px 0 0; font-size: 24px; }
  .panel { padding: 32px 16px; justify-content: flex-start; flex-basis: 100%; }
  h1 { font-size: 24px; }
}
