:root {
  --blue: #1238a8; --blue-600: #0c2a85; --blue-700: #081f66; --blue-50: #eef3ff; --blue-100: #dbe6ff; --sky: #2f6bff;
  --ink: #111a2e; --muted: #5a6478; --line: #e4e9f2; --bg: #f5f7fc; --white: #fff;
  --green: #0f7a43; --green-50: #e9f9f0; --red: #b42318; --red-50: #fef1f0; --amber: #a15c07; --amber-50: #fff6e0;
  --radius: 16px; --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 24px rgba(18,56,168,.07); --shadow-lg: 0 18px 50px rgba(8,31,102,.16);
  font-family: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1; width: 100%; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; font-weight: 800; } h2 { font-size: 1.25rem; font-weight: 700; } h3 { font-size: 1.05rem; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .tiny { font-size: .77rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; word-break: break-all; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; } .row.end { justify-content: flex-end; } .row.top { align-items: flex-start; } .row.center { justify-content: center; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .g2, .g4 { grid-template-columns: 1fr; } }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }

/* Thanh trên */
.topbar { background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar .inner { max-width: 1200px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 14px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { height: 54px; width: auto; display: block; }
.brand .bt { border-left: 1px solid var(--line); padding-left: 12px; line-height: 1.2; min-width: 0; }
.brand .bt b { display: block; font-size: 1.02rem; font-weight: 800; color: var(--blue-600); }
.brand .bt small { display: block; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.topbar nav a { text-decoration: none; color: var(--ink); padding: 9px 14px; border-radius: 10px; font-size: .93rem; font-weight: 600; white-space: nowrap; }
.topbar nav a:hover { background: var(--blue-50); color: var(--blue); }
.topbar nav a.active { background: var(--blue-50); color: var(--blue); }
.topbar nav a.cta { background: var(--blue); color: #fff; } .topbar nav a.cta:hover { background: var(--blue-600); color: #fff; }
.menu-btn { display: none; margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 42px; height: 42px; font-size: 20px; cursor: pointer; }
@media (max-width: 820px) {
  .brand img { height: 44px; } .brand .bt small { display: none; }
  .menu-btn { display: block; }
  .topbar nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; box-shadow: var(--shadow-lg); }
  .topbar nav.open { display: flex; } .topbar nav a { padding: 13px 14px; font-size: 1rem; }
}

.container { max-width: 1200px; margin: 0 auto; padding: 26px 20px 60px; }
.narrow { max-width: 720px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card, .grid > .card + .card { margin-top: 0; }
.card h2 { margin-bottom: 12px; }
.section-title { font-weight: 700; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 20px 0 8px; }

/* Nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #d5dcea; background: var(--white); color: var(--ink); padding: 10px 17px; border-radius: 11px; transition: .15s; min-height: 42px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c9d3e0; background: #fafcff; }
.btn.primary { background: linear-gradient(180deg, #1a45c2, var(--blue)); border-color: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(18,56,168,.25); }
.btn.primary:hover { background: var(--blue-600); }
.btn.danger { color: var(--red); border-color: #f2c9c5; } .btn.danger:hover { background: var(--red-50); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--blue); }
.btn.sm { padding: 6px 11px; font-size: .86rem; min-height: 34px; border-radius: 9px; } .btn.lg { padding: 14px 24px; font-size: 1.05rem; min-height: 52px; border-radius: 13px; }
.btn.block { width: 100%; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* Biểu mẫu */
label.f { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 4px; }
label.f .req { color: var(--red); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; border: 1px solid #cfd8e6; border-radius: 11px; padding: 11px 13px; min-height: 44px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-100); border-color: var(--blue); }
textarea { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.check input { margin-top: 4px; width: 17px; height: 17px; flex: none; accent-color: var(--blue); }
.otp-input { font-size: 1.9rem !important; letter-spacing: .45em; text-align: center; max-width: 280px; font-weight: 800; padding: 12px !important; }

/* Nhãn trạng thái */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: #eef1f5; color: #475467; white-space: nowrap; }
.badge.blue { background: var(--blue-50); color: var(--blue); } .badge.green { background: var(--green-50); color: var(--green); }
.badge.red { background: var(--red-50); color: var(--red); } .badge.amber { background: var(--amber-50); color: var(--amber); }

.alert { border-radius: 10px; padding: 12px 14px; margin: 10px 0; background: var(--blue-50); color: #0b3c7a; border: 1px solid var(--blue-100); white-space: pre-line; }
.alert.err { background: var(--red-50); color: var(--red); border-color: #f6d0cc; }
.alert.ok { background: var(--green-50); color: var(--green); border-color: #c4ecd3; }
.alert.warn { background: var(--amber-50); color: var(--amber); border-color: #f8e3b5; }

table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #f8fbff; }
.table-wrap { overflow-x: auto; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }

/* Bước (stepper) */
.stepper { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 14px 0; }
.stepper .st { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.stepper .st .n { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #cfd8e3; display: grid; place-items: center; background: #fff; }
.stepper .st.active { color: var(--ink); } .stepper .st.active .n { background: var(--blue); border-color: var(--blue); color: #fff; }
.stepper .st.done .n { background: var(--blue); border-color: var(--blue); color: #fff; }
.stepper .bar { width: 36px; height: 2px; background: #dbe2ea; }
@media (max-width: 640px) { .stepper .st .lbl { display: none; } .stepper .st.active .lbl { display: inline; } }

/* Toast + modal */
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast .t { background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 90vw; white-space: pre-line; }
#toast .t.err { background: var(--red); } #toast .t.ok { background: var(--green); }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: min(640px, 100%); max-height: 92vh; overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(980px, 100%); }

/* Người nhận */
.rcp { display: flex; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.rcp .ord { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rcp .ord input { width: 46px; text-align: center; font-weight: 700; padding: 8px 4px; }
.rcp .box { flex: 1; background: #f6f8fb; border-radius: 12px; padding: 12px; border-left: 5px solid var(--c, var(--blue)); }
.rcp .adv { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #d4dbe5; }

/* Trình soạn vị trí ký */
.designer { display: grid; grid-template-columns: 280px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; min-height: 70vh; }
.designer .side { border-right: 1px solid var(--line); padding: 12px; overflow: auto; max-height: 80vh; }
.designer .stage { background: #dfe4ea; overflow: auto; max-height: 80vh; padding: 16px; position: relative; }
@media (max-width: 860px) { .designer { grid-template-columns: 1fr; } .designer .side { max-height: none; border-right: 0; border-bottom: 1px solid var(--line); } }
.tool { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 1px solid transparent; border-radius: 10px; background: none; font: inherit; cursor: pointer; text-align: left; }
.tool .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--blue-100); display: grid; place-items: center; font-size: 17px; flex: none; }
.tool:hover { background: var(--blue-50); } .tool.active { border-color: var(--blue); background: var(--blue-50); }
.page-wrap { position: relative; margin: 0 auto 16px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.page-wrap canvas { display: block; width: 100%; height: 100%; }
.page-wrap .layer { position: absolute; inset: 0; }
.page-wrap .pno { position: absolute; top: -2px; right: -40px; font-size: .75rem; color: #555; }
.page-wrap.placing { cursor: crosshair; }
.fld { position: absolute; border: 1.5px dashed var(--c, var(--blue)); background: color-mix(in srgb, var(--c, #0b4fa3) 14%, transparent); border-radius: 4px; font-size: 10px; color: #111; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.1; overflow: hidden; user-select: none; }
.fld.edit { cursor: move; }
.fld .x { position: absolute; top: 0; right: 0; width: 16px; height: 16px; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; line-height: 16px; padding: 0; cursor: pointer; border-radius: 0 3px 0 4px; }
.fld .rs { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; background: var(--c, var(--blue)); cursor: nwse-resize; }
.fld.mine { border-style: solid; background: rgba(255, 213, 79, .35); border-color: #e0a100; animation: pulse 1.6s ease-in-out infinite; }
.fld.mine.filled { animation: none; background: rgba(21, 128, 61, .12); border-color: var(--green); }
.fld input[type=text] { width: 100%; height: 100%; border: 0; background: rgba(255,255,255,.85); padding: 0 3px; font-size: 11px; border-radius: 0; }
.fld input[type=checkbox] { width: 80%; height: 80%; margin: 0; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(224, 161, 0, .25); } }
.legend { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); vertical-align: middle; }

/* Ký */
.sigpad { user-select: none; -webkit-user-select: none; border: 2px dashed #b9c6d6; border-radius: 12px; background: #fff; touch-action: none; width: 100%; height: 220px; display: block; cursor: crosshair; }
.sig-preview { background: repeating-conic-gradient(#f3f5f8 0 25%, #fff 0 50%) 0 0/16px 16px; border: 1px solid var(--line); border-radius: 10px; min-height: 90px; display: grid; place-items: center; padding: 8px; }
.sig-preview img { max-width: 100%; max-height: 140px; }
.font-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.font-pick button { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; font-size: 26px; cursor: pointer; color: #0a2a7a; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.font-pick button.active { border-color: var(--blue); outline: 2px solid var(--blue-100); }
.cam { background: #0d1326; border-radius: 14px; overflow: hidden; position: relative; aspect-ratio: 4/3; max-width: 520px; width: 100%; }
.cam video, .cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam .guide { position: absolute; inset: 12% 22%; border: 3px dashed rgba(255,255,255,.7); border-radius: 50%; pointer-events: none; }
.cam .guide.card { inset: 18% 8%; border-radius: 14px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbs .th { width: 150px; } .thumbs .th img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.legal-box { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fbfcfe; }
.legal-box h4 { margin: 12px 0 4px; color: var(--blue); } .legal-box p { margin: 0 0 6px; }
.doc-tile { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.doc-tile .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font-weight: 800; flex: none; }
.list-gap > * + * { margin-top: 10px; }

.dropzone { border: 2px dashed #b9c6d6; border-radius: 14px; padding: 28px; text-align: center; background: #fafcff; cursor: pointer; }
.dropzone.over { border-color: var(--blue); background: var(--blue-50); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; font-size: .92rem; } .kv > div:nth-child(odd) { color: var(--muted); }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 16px; }
.timeline .ev { position: relative; padding: 6px 0; font-size: .9rem; }
.timeline .ev::before { content: ""; position: absolute; left: -22px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.spinner.dark { border-color: #cdd6e2; border-top-color: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }

.sticky-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); padding: 12px 0; margin-top: 18px; z-index: 5; }

/* ===== Trang chủ ===== */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #3d7bff 0%, transparent 60%), linear-gradient(135deg, #081f66 0%, #1238a8 55%, #1d55d8 100%); color: #fff; }
.hero .inner { max-width: 1200px; margin: 0 auto; padding: 64px 20px 72px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero .tag { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.12; margin: 18px 0 14px; font-weight: 800; }
.hero p.lead { font-size: 1.1rem; opacity: .93; max-width: 560px; margin: 0 0 26px; }
.hero .btn { border: 0; } .hero .btn.white { background: #fff; color: var(--blue-600); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.hero .btn.glass { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.hero .trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; font-size: .86rem; opacity: .92; }
.hero .trust span { display: inline-flex; gap: 6px; align-items: center; }
.mock { background: #fff; color: var(--ink); border-radius: 20px; padding: 20px; box-shadow: var(--shadow-lg); transform: rotate(1.2deg); }
.mock .ln { height: 9px; border-radius: 5px; background: #e8edf7; margin: 9px 0; }
.mock .sigbox { border: 2px dashed #9db5f5; background: var(--blue-50); border-radius: 12px; padding: 12px; text-align: center; margin-top: 14px; }
.mock .sigbox .sg { font-family: "Dancing Script", cursive; font-size: 34px; color: var(--blue-600); line-height: 1; }
.mock .okrow { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--green); font-weight: 700; margin-top: 12px; }
@media (max-width: 900px) { .hero .inner { grid-template-columns: 1fr; padding: 44px 20px 52px; } .mock { display: none; } }
.section { max-width: 1200px; margin: 0 auto; padding: 54px 20px 0; }
.section > h2 { font-size: 1.7rem; font-weight: 800; text-align: center; margin-bottom: 6px; }
.section > p.sub { text-align: center; color: var(--muted); max-width: 680px; margin: 0 auto 28px; }
.action { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: .18s; height: 100%; }
.action:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #b9ccff; }
.action .more { margin-top: auto; color: var(--blue); font-weight: 700; }
.icon-badge { width: 52px; height: 52px; border-radius: 15px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font-size: 24px; flex: none; }
.icon-badge.solid { background: linear-gradient(135deg, #1a45c2, #2f6bff); color: #fff; }
.steps { counter-reset: st; }
.steps .card { position: relative; padding-top: 30px; }
.steps .card::before { counter-increment: st; content: counter(st); position: absolute; top: -16px; left: 20px; width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(18,56,168,.35); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); }
details.acc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-bottom: 10px; }
details.acc summary { cursor: pointer; font-weight: 700; padding: 15px 0; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.acc summary::after { content: "+"; color: var(--blue); font-size: 1.3rem; line-height: 1; }
details.acc[open] summary::after { content: "–"; }
details.acc p { margin: 0 0 16px; color: #2c3650; }
.easy { background: linear-gradient(180deg, #f2f6ff, #fff); border: 1px solid var(--blue-100); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.easy ul { margin: 6px 0 0; padding-left: 0; list-style: none; } .easy li { padding: 5px 0 5px 28px; position: relative; }
.easy li::before { content: "✓"; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 800; }

/* ===== Chân trang ===== */
.site-footer { background: #081a52; color: #cfd9f5; margin-top: 60px; }
.site-footer .inner { max-width: 1200px; margin: 0 auto; padding: 40px 20px 22px; display: grid; grid-template-columns: 1.2fr 1.4fr .8fr; gap: 34px; }
.site-footer img { height: 84px; display: block; margin-bottom: 14px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: .95rem; letter-spacing: .03em; }
.site-footer p, .site-footer li { font-size: .88rem; margin: 0 0 7px; line-height: 1.55; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #fff; text-decoration: none; } .site-footer a:hover { text-decoration: underline; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.14); text-align: center; font-size: .78rem; padding: 14px 20px; color: #a9b7e0; }
@media (max-width: 860px) { .site-footer .inner { grid-template-columns: 1fr; gap: 22px; } }

/* ===== Quản trị ===== */
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side-nav { background: #081a52; color: #cfd9f5; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; }
.side-nav .lg { padding: 4px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 12px; }
.side-nav .lg img { height: 48px; display: block; } .side-nav .lg b { display: block; color: #fff; margin-top: 8px; font-size: .95rem; } .side-nav .lg small { font-size: .7rem; letter-spacing: .05em; }
.side-nav a { display: flex; align-items: center; gap: 11px; color: #d6defa; text-decoration: none; padding: 11px 12px; border-radius: 11px; font-weight: 600; font-size: .93rem; margin-bottom: 2px; }
.side-nav a:hover { background: rgba(255,255,255,.09); color: #fff; } .side-nav a.active { background: #fff; color: var(--blue-600); }
.side-nav a .cnt { margin-left: auto; background: #ffb020; color: #3b2500; border-radius: 999px; font-size: .72rem; padding: 1px 8px; font-weight: 800; }
.side-nav .who { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 12px 8px 0; font-size: .82rem; }
.side-nav .who b { color: #fff; display: block; }
.admin-main { min-width: 0; } .admin-main .container { max-width: 1280px; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .side-nav { position: static; height: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 8px; gap: 4px; align-items: center; }
  .side-nav .lg { border: 0; margin: 0; padding: 0 6px 0 0; } .side-nav .lg b, .side-nav .lg small { display: none; } .side-nav .lg img { height: 34px; }
  .side-nav a { white-space: nowrap; padding: 9px 11px; margin: 0; } .side-nav .who { display: none; }
}
.stat { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; transition: .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat .num { font-size: 1.9rem; font-weight: 800; line-height: 1; } .stat .lb { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.icon-badge.amber { background: var(--amber-50); color: var(--amber); } .icon-badge.green { background: var(--green-50); color: var(--green); } .icon-badge.red { background: var(--red-50); color: var(--red); }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; } .page-head p { margin: 4px 0 0; color: var(--muted); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); } .empty .big { font-size: 40px; }

/* ===== Chụp / tải ảnh ===== */
.photo-slot { border: 2px dashed #c3d0ea; border-radius: 16px; padding: 18px; background: #fafcff; }
.photo-slot.done { border-style: solid; border-color: #9ad9b6; background: var(--green-50); }
.photo-slot .ph-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; max-width: 520px; }
@media (max-width: 520px) { .photo-slot .ph-actions { grid-template-columns: 1fr; } }
.photo-slot .preview { max-width: 320px; width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.photo-slot .tip { font-size: .86rem; color: var(--muted); margin: 6px 0 0; }
.cam .shutter { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 64px; height: 64px; border-radius: 50%; border: 5px solid #fff; background: #ff4b4b; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.cam .flip { position: absolute; right: 12px; bottom: 22px; background: rgba(0,0,0,.5); color: #fff; border: 0; border-radius: 999px; padding: 9px 13px; cursor: pointer; font: inherit; font-size: .85rem; }
.cam .camtxt { position: absolute; left: 0; right: 0; top: 0; padding: 9px 12px; color: #fff; font-size: .85rem; background: linear-gradient(rgba(0,0,0,.55), transparent); text-align: center; }
.progress-note { display: flex; gap: 10px; align-items: center; background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; }
.sticky-actions { box-shadow: 0 -8px 24px rgba(16,24,40,.06); padding-left: 4px; padding-right: 4px; }
@media (max-width: 640px) { .sticky-actions .btn.lg { flex: 1; } .container { padding: 18px 14px 50px; } .card { padding: 16px; } }
