:root {
  --ink: #18233a; --ink-2: #2c3a57; --text: #1e2533; --muted: #667085; --line: #e3e6ec; --line-2: #d0d5dd;
  --bg: #f4f5f7; --paper: #ffffff; --paper-2: #fafbfc;
  --primary: #2f5bd3; --primary-ink: #ffffff; --primary-soft: #eaf0fd;
  --ok: #157a4a; --ok-soft: #e5f4ec; --warn: #a65b00; --warn-soft: #fff3df; --err: #b42318; --err-soft: #fdecea;
  --info: #3b5bab; --info-soft: #ecf0fa; --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; }
body { font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--paper);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--text); }
.btn:hover { background: var(--paper-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.danger { color: var(--err); border-color: #f1b8b2; }
.btn.small { padding: 3px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .opt:focus-visible, .tcard:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- login ---- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 20% -10%, #dfe7fb 0, transparent 60%), var(--bg); }
.login form { width: 100%; max-width: 380px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; box-shadow: 0 8px 30px rgba(16, 24, 40, .08); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff; display: grid;
  place-items: center; font-size: 15px; }
.login h1 { font-size: 20px; margin: 18px 0 4px; }
.login p { margin: 0 0 18px; color: var(--muted); }
.field-in { display: block; margin-bottom: 14px; }
.field-in span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.field-in input, .field-in select, .field-in textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 9px 11px; background: var(--paper); }
.field-in input:focus, .field-in select:focus, .field-in textarea:focus { outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft); }
.err { color: var(--err); font-size: 13px; min-height: 18px; margin: 0 0 10px; }

/* ---- khung ---- */
.shell { display: grid; grid-template-rows: 56px minmax(0, 1fr); height: 100%; }
.topbar { background: var(--ink); color: #e6e9f0; display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.topbar .brand .mark { background: #fff; color: var(--ink); }
.topbar nav { display: flex; gap: 4px; margin-left: 18px; }
.topbar nav a { color: #c5cbd8; text-decoration: none; padding: 6px 12px; border-radius: 7px; }
.topbar nav a.on, .topbar nav a:hover { background: var(--ink-2); color: #fff; }
.topbar .who { margin-left: auto; font-size: 13px; color: #c5cbd8; }
.topbar .who b { color: #fff; font-weight: 600; }
.topbar .btn { background: transparent; border-color: #45536f; color: #e6e9f0; }
.topbar .btn:hover { background: var(--ink-2); }
.page { overflow: auto; padding: 24px; }
.wrap { max-width: 1280px; margin: 0 auto; }
.wrap.narrow { max-width: 880px; }
h2.title { font-size: 22px; margin: 0 0 4px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card > .hd { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card > .hd h3 { margin: 0; font-size: 15px; }
.card > .hd .step-no { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: grid;
  place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.card > .bd { padding: 18px; }

/* ---- steps 1-2 ---- */
.tcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tcard { text-align: left; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--paper); padding: 16px;
  cursor: pointer; display: flex; gap: 12px; align-items: flex-start; }
.tcard:hover { border-color: #a9b9e6; }
.tcard.on { border-color: var(--primary); background: var(--primary-soft); }
.tcard .ic { width: 36px; height: 44px; border: 1.5px solid currentColor; border-radius: 4px; color: var(--ink-2); flex: none;
  background: repeating-linear-gradient(to bottom, transparent 0 8px, #c9d0de 8px 9px); }
.tcard b { display: block; }
.drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 34px 20px; text-align: center; background: var(--paper-2);
  cursor: pointer; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop.disabled { opacity: .5; cursor: not-allowed; }
.drop .big { font-size: 15px; font-weight: 600; }
.filechip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.notice { border-radius: 8px; padding: 10px 14px; margin-top: 12px; font-size: 13px; }
.notice.err { background: var(--err-soft); color: var(--err); min-height: 0; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.info { background: var(--info-soft); color: var(--info); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }

/* ---- document list ---- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { border: 1px solid var(--line-2); background: var(--paper); border-radius: 999px; padding: 4px 12px; cursor: pointer;
  font-size: 13px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { color: var(--muted); margin-left: 4px; }
.chip.on .n { color: #c5cbd8; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted);
  font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr.row-link { cursor: pointer; }
table.list tr.row-link:hover td { background: var(--paper-2); }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.s-wait { background: #eef0f4; color: #4a5468; }
.pill.s-run { background: var(--info-soft); color: var(--info); }
.pill.s-act { background: var(--warn-soft); color: var(--warn); }
.pill.s-bad { background: var(--err-soft); color: var(--err); }
.pill.s-ok { background: var(--ok-soft); color: var(--ok); }

/* ---- detail: step bar ---- */
.dochead { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dochead h2 { margin: 0; font-size: 20px; }
.dochead .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dochead .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.stepper { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.stepper .st { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; position: relative;
  min-width: 0; }
.stepper .st .n { font-size: 11px; color: var(--muted); font-weight: 600; }
.stepper .st .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .st .r { font-size: 11px; color: var(--muted); }
.stepper .st.done { border-color: #b8dfc9; background: var(--ok-soft); }
.stepper .st.done .n::after { content: " ✓"; color: var(--ok); }
.stepper .st.now { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }

/* ---- review ---- */
.review { display: grid; grid-template-columns: minmax(340px, 44%) 1fr; gap: 16px; align-items: start; }
.viewer { position: sticky; top: 0; background: #262b36; border-radius: var(--radius); padding: 12px; color: #c9cdd6;
  max-height: calc(100vh - 110px); overflow: auto; }
.viewer .cap { font-size: 12px; margin: 0 0 6px; display: flex; justify-content: space-between; gap: 8px; }
.viewer .zoom { width: 100%; display: block; background: #fff; border-radius: 4px; margin-bottom: 12px; }
.viewer .pg { position: relative; margin-bottom: 10px; }
.viewer .pg img { width: 100%; display: block; border-radius: 4px; background: #fff; }
.viewer .hl { position: absolute; border: 3px solid #ffb020; background: rgba(255, 176, 32, .12); pointer-events: none;
  border-radius: 3px; }
.viewer .lock { font-size: 11px; color: #9aa3b5; }
.toolbar { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 0 0 12px; display: flex; gap: 8px;
  flex-wrap: wrap; align-items: center; }
.toolbar .count { font-size: 13px; color: var(--muted); margin-right: auto; }
.toolbar .count b { color: var(--text); }
.group { margin-bottom: 14px; }
.group > h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-2); }
.fld { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px;
  border-left-width: 4px; }
.fld.st-ocr { border-left-color: #8fd1ae; }
.fld.st-suggested { border-left-color: #f0b548; }
.fld.st-suggested.confirmed, .fld.confirmed { border-left-color: var(--primary); }
.fld.focus { box-shadow: 0 0 0 2px var(--primary-soft); border-color: #a9b9e6; }
.fld .top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.fld .top .lab { font-weight: 600; color: var(--ink-2); }
.fld .top .req { color: var(--err); }
.fld .top .tag { margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.tag.t-ocr { background: var(--ok-soft); color: var(--ok); }
.tag.t-sug { background: var(--warn-soft); color: var(--warn); }
.tag.t-ok { background: var(--primary-soft); color: var(--primary); }
.tag.t-man { background: #eef0f4; color: #4a5468; }
.fld textarea { width: 100%; resize: vertical; min-height: 36px; border: 1px solid var(--line-2); border-radius: 7px;
  padding: 7px 9px; margin-top: 6px; font-size: 15px; line-height: 1.35; background: var(--paper); }
.fld textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.fld textarea[readonly] { background: var(--paper-2); border-color: var(--line); }
.fld .why { font-size: 12px; color: var(--warn); margin-top: 5px; }
.fld .live { font-size: 12px; color: var(--err); margin-top: 3px; }
.fld .live:empty { display: none; }
.fld .alts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; align-items: center; }
.fld .alts .k { font-size: 11px; color: var(--muted); }
.opt { border: 1px solid var(--line-2); background: var(--paper-2); border-radius: 7px; padding: 3px 9px; cursor: pointer;
  font-size: 13px; text-align: left; }
.opt:hover { border-color: var(--primary); }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.opt kbd { font: 10px ui-monospace, monospace; color: var(--muted); margin-right: 4px; }
.opt small { color: var(--muted); margin-left: 6px; font-size: 11px; }
.fld .acts { display: flex; justify-content: flex-end; margin-top: 6px; }
.keys { font-size: 12px; color: var(--muted); margin-top: 8px; }
kbd { font: 11px ui-monospace, monospace; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px;
  padding: 0 4px; background: var(--paper); }

/* ---- approve / archive / export ---- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.row-in { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row-in .field-in { margin-bottom: 0; flex: 1; min-width: 180px; }
.checklist { list-style: none; margin: 0 0 14px; padding: 0; }
.checklist li { padding: 6px 0; display: flex; gap: 8px; }
.checklist li::before { content: "○"; color: var(--muted); width: 16px; }
.checklist li.ok::before { content: "✓"; color: var(--ok); font-weight: 700; }
.checklist li.no { color: var(--err); }
.checklist li.no::before { content: "✕"; color: var(--err); }
.pdfframe { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.history { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.history li { padding: 7px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 110px 1fr; gap: 10px; }
.history li:last-child { border-bottom: 0; }
.spin { width: 16px; height: 16px; border: 2px solid var(--info-soft); border-top-color: var(--info); border-radius: 50%;
  animation: spin 0.9s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.progressline { display: flex; align-items: center; gap: 10px; }

/* ---- dialogs / toasts ---- */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(16, 24, 40, .25); }
dialog::backdrop { background: rgba(16, 24, 40, .45); }
dialog .dh { padding: 16px 20px 0; font-weight: 700; font-size: 16px; }
dialog .db { padding: 10px 20px 4px; color: var(--text); }
dialog .df { padding: 14px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 9px; font-size: 13px; z-index: 50; max-width: calc(100vw - 32px); }
.toast a { color: #a9c1ff; }

@media (max-width: 1000px) {
  .review { grid-template-columns: 1fr; }
  .viewer { position: static; max-height: none; }
  .stepper { grid-template-columns: repeat(4, 1fr); }
  .history li { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 640px) {
  .page { padding: 16px; }
  .topbar nav { display: none; }
  .stepper { grid-template-columns: repeat(2, 1fr); }
  table.list th:nth-child(3), table.list td:nth-child(3) { display: none; }
}

/* ---- form laid out like the paper certificate ---- */
.formcol { min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.legend .lg::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px;
  vertical-align: -2px; border: 1px solid #d5d0c0; }
.legend .ocr::before { background: transparent; border-bottom: 2px dotted #7a8a86; }
.legend .sug::before { background: #ffe7b3; }
.legend .ok::before { background: #dfe8ff; }
.legend .man::before { background: #ececf1; }
.paper { --serif: "Times New Roman", Times, Georgia, serif; background: #fffdf6; border: 1px solid #cfc8b2; border-radius: 4px;
  padding: 26px 30px 30px; box-shadow: inset 0 0 0 7px #fffdf6, inset 0 0 0 9px #8fb0a6, inset 0 0 0 11px #fffdf6,
  inset 0 0 0 12px #8fb0a6; font-family: var(--serif); color: #1b1b1b; }
.paper .ph { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; min-height: 54px; }
.paper .nation { text-align: center; }
.paper .nation b { display: block; font-size: 14.5px; letter-spacing: .2px; }
.paper .nation u { display: block; font-weight: 700; font-size: 13.5px; text-underline-offset: 3px; }
.paper .so { justify-self: end; width: 100%; max-width: 160px; }
.paper .ph::before { content: ""; }
.paper .emblem { width: 58px; height: 58px; border-radius: 50%; margin: 10px auto 4px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #d83a30, #a3201b); border: 3px solid #e8c45a; color: #ffd84a;
  font-size: 30px; line-height: 1; font-family: Arial, sans-serif; }
.paper .ptitle { text-align: center; font-size: 25px; color: #22584f; letter-spacing: .6px; margin: 6px 0 18px; font-weight: 700; }
.paper .prow { display: flex; gap: 18px; }
.paper .pf { flex: 1 1 0; min-width: 0; display: block; margin: 0 -5px 8px; padding: 3px 5px 2px; border-radius: 5px;
  cursor: text; transition: background .12s; }
.paper .pl { display: block; font-weight: 700; font-size: 13.5px; }
.paper .pl .req { color: #c62828; font-style: normal; margin-left: 2px; }
.paper .pv { display: block; width: 100%; border: 0; border-bottom: 1.5px dotted #7d8b87; background: transparent; resize: none;
  padding: 2px 3px 3px; font: 15px/1.4 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #10307a; overflow: hidden;
  min-height: 27px; }
.paper .pv:focus { outline: none; border-bottom: 1.5px solid var(--primary); }
.paper .pf.s-sug { background: #ffe7b3; }
.paper .pf.s-ok { background: #dfe8ff; }
.paper .pf.s-man { background: #ececf1; }
.paper .pf.bad .pv { border-bottom: 1.5px solid var(--err); }
.paper .pf.focus { box-shadow: 0 0 0 2px var(--primary); }
.paper .psec { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #22584f; margin: 12px 0 6px;
  padding-top: 10px; border-top: 1px solid #e4dcc6; }
.paper .prule { border: 0; border-top: 1px solid #e4dcc6; margin: 10px 0 12px; }
.paper .pcols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.paper .psign { display: flex; justify-content: space-around; gap: 24px; margin-top: 16px; text-align: center; }
.paper .psign.end { justify-content: flex-end; }
.paper .sg { width: 46%; min-width: 210px; }
.paper .sg > b { display: block; font-size: 13.5px; }
.paper .sg > small { display: block; font-style: italic; color: #555; font-size: 11.5px; margin-bottom: 6px; }
.paper .sig { margin: 0 0 6px; }
.paper .sig img { display: block; max-width: 100%; max-height: 150px; margin: 0 auto; mix-blend-mode: multiply; }
.paper .sig figcaption, .paper .sig.none { font: italic 10.5px -apple-system, "Segoe UI", sans-serif; color: var(--muted); }
.paper .sig.none { padding: 18px 0; }
.paper .sg .pl { font-weight: 400; font-size: 11px; color: var(--muted); font-family: -apple-system, "Segoe UI", sans-serif; }
.paper .sg .pv { text-align: center; }
.inspector { position: sticky; bottom: 0; z-index: 2; margin-top: 12px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px 12px; box-shadow: 0 -8px 24px rgba(16, 24, 40, .08); }
.inspector:empty { display: none; }
.inspector .ih { display: flex; gap: 8px; align-items: center; }
.inspector .ih .req { font-size: 11px; color: var(--err); }
.inspector .tag { margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.inspector .why { font-size: 12.5px; color: var(--warn); margin-top: 5px; }
.inspector .live { font-size: 12.5px; color: var(--err); margin-top: 4px; }
.inspector .alts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; align-items: center; }
.inspector .alts .k { font-size: 11px; color: var(--muted); }
.inspector .iacts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 9px; }
.inspector .iacts .keys { margin-left: auto; }
.small { font-size: 12px; }
.tag.t-sug { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 760px) {
  .paper { padding: 20px 16px; }
  .paper .prow { flex-wrap: wrap; gap: 0 14px; }
  .paper .prow .pf { flex-basis: 45%; }
  .paper .pcols { grid-template-columns: 1fr; gap: 0; }
  .paper .ph { grid-template-columns: 1fr; }
  .paper .ph::before { display: none; }
  .paper .so { justify-self: stretch; max-width: none; }
  .inspector .iacts .keys { display: none; }
}

.btn.primary kbd { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }

/* ---- logo / branding ---- */
.brand .logo { width: 30px; height: 30px; flex: none; color: currentColor; }
.topbar .brand { color: #fff; }
.topbar .brand .logo { color: #dfe6ff; }

/* ---- login ---- */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; background: var(--bg); }
.auth-side { position: relative; overflow: hidden; color: #dfe5f2; padding: 40px 48px; display: flex; flex-direction: column;
  background: radial-gradient(900px 520px at 110% 0%, rgba(70, 112, 232, .45), transparent 60%),
              radial-gradient(700px 500px at -20% 110%, rgba(60, 207, 142, .18), transparent 60%), var(--ink); }
.auth-side::after { content: ""; position: absolute; right: -90px; bottom: -70px; width: 360px; height: 460px; border-radius: 18px;
  transform: rotate(-12deg); opacity: .07; border: 2px solid #fff;
  background: repeating-linear-gradient(to bottom, transparent 0 34px, #fff 34px 36px); }
.auth-side .brand { color: #fff; font-size: 17px; }
.auth-side .brand .logo { width: 36px; height: 36px; color: #dfe6ff; }
.auth-copy { margin: auto 0; max-width: 470px; position: relative; z-index: 1; }
.auth-copy h1 { font-size: 34px; line-height: 1.22; margin: 0 0 28px; color: #fff; letter-spacing: -.3px; font-weight: 700; }
.auth-copy h1 em { font-style: normal; color: #9fb8ff; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.auth-points li { display: grid; grid-template-columns: 22px 1fr; column-gap: 12px; }
.auth-points li::before { content: "✓"; grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; display: grid;
  place-items: center; font-size: 12px; font-weight: 700; color: #0d2b1e; background: #3ccf8e; margin-top: 1px; }
.auth-points b { color: #fff; font-weight: 600; }
.auth-points span { color: #aab4c8; font-size: 13.5px; }
.auth-foot { font-size: 12px; color: #8792a8; position: relative; z-index: 1; }
.auth-main { display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.2px; }
.auth-card .sub { margin: 0 0 26px; color: var(--muted); }
.auth-card .field-in input { padding: 11px 12px; font-size: 15px; border-radius: 9px; }
.pw { position: relative; }
.pw input { padding-right: 64px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent;
  color: var(--primary); font-weight: 600; font-size: 13px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.pw-toggle:hover { background: var(--primary-soft); }
.caps { margin: -6px 0 10px; font-size: 12.5px; color: var(--warn); }
.auth-card .notice.err { margin: 0 0 14px; }
.btn.block { width: 100%; justify-content: center; padding: 11px 14px; font-size: 15px; border-radius: 9px; }
.help-note { margin: 18px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

/* ---- upload file list ---- */
.filelist { list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.filelist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 14px;
  border-top: 1px solid var(--line); background: var(--paper); }
.filelist li:first-child { border-top: 0; }
.filelist .fn { min-width: 0; overflow-wrap: anywhere; }
.filelist .fmsg { display: block; color: var(--err); font-size: 12.5px; }
.filelist .fs { white-space: nowrap; font-size: 13px; color: var(--muted); }
.filelist li.fl-ok { background: var(--ok-soft); }
.filelist li.fl-ok .fs a { color: var(--ok); font-weight: 600; }
.filelist li.fl-err { background: var(--err-soft); }
.filelist li.fl-err .fs { color: var(--err); }
.fl-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---- next-document banner / duplicate files ---- */
.flash { position: sticky; top: 0; z-index: 6; box-shadow: 0 6px 18px rgba(16, 24, 40, .12);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px;
  padding: 12px 16px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); border: 1px solid #b8dfc9;
  font-size: 14px; animation: flash-in .35s ease-out; }
.flash-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.flash-x { border: 0; background: transparent; color: var(--ok); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.flash-x:hover { background: rgba(21, 122, 74, .12); }
@keyframes flash-in { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.filelist li.fl-dup { background: var(--warn-soft); }
.filelist li.fl-dup .fmsg { color: var(--warn); }
.filelist li.fl-dup .fs { display: flex; gap: 6px; }

/* suggestions in the inspector: one suggestion per line */
.inspector .alts { display: flex; flex-direction: column; align-items: stretch; gap: 5px; margin-top: 8px; }
.inspector .alts .k { font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.inspector .opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; font-size: 14px; }
.inspector .opt kbd { margin: 0; flex: none; }
.inspector .opt .ov { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.inspector .opt.sel::after { content: "✓ đang chọn"; flex: none; font-size: 11px; font-weight: 600; color: var(--primary); }

/* ---- GTS logo ---- */
.logo-badge { flex: none; width: 34px; height: 34px; border-radius: 9px; background: #fff; display: grid; place-items: center;
  padding: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.logo-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
.auth-side .brand .logo-badge { width: 46px; height: 46px; border-radius: 12px; padding: 4px; }
.auth-logo { display: block; width: 150px; height: auto; margin: 0 0 22px; }
@media (max-width: 860px) { .auth-logo { width: 130px; margin: 0 auto 20px; } }
