/* dmap — kiểu chung (theo mẫu v63). Không dùng phông hay thư viện ngoài. */
:root { --ink:#1f2937; --mute:#6b7280; --line:#e5e7eb; --bg:#f3f4f6; --pri:#0f766e; --yelbg:#fffbeb; --blubg:#eff6ff; --blu:#1e40af; --grnbg:#f0fdf4; --grn:#166534; --red:#b91c1c; --redbg:#fef2f2; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--pri); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--mute); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.inline { display: inline; margin: 0; }

/* nút */
.btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #d1d5db; background: #fff; border-radius: 6px; padding: 5px 12px; font: inherit; font-size: 13px; white-space: nowrap; color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #9ca3af; text-decoration: none; }
.btn.pri { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn.pri:hover { background: #115e59; }
.btn.red { color: var(--red); border-color: #fecaca; }
.btn.sm { padding: 2px 9px; font-size: 12px; }
.btn.wide { width: 100%; justify-content: center; margin-top: 12px; padding: 8px 12px; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--pri); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* nhãn */
.tag { display: inline-block; font-size: 12px; padding: 0 8px; border-radius: 4px; white-space: nowrap; }
.tag.g { background: var(--grnbg); color: var(--grn); } .tag.n { background: #f3f4f6; color: #374151; } .tag.y { background: var(--yelbg); color: #92400e; } .tag.r { background: var(--redbg); color: #991b1b; } .tag.b { background: var(--blubg); color: var(--blu); }
.tags { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }

/* thông báo */
.msg { border-radius: 8px; padding: 9px 13px; font-size: 13px; margin: 0 0 10px; text-align: left; }
.msg.ok { background: var(--grnbg); border: 1px solid #bbf7d0; color: var(--grn); }
.msg.info { background: var(--blubg); border: 1px solid #bfdbfe; color: var(--blu); }
.msg.err { background: var(--redbg); border: 1px solid #fecaca; color: #991b1b; }
.msg ul { margin: 4px 0 0; padding-left: 20px; }

/* ô nhập */
.inp { border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 13px; width: 220px; max-width: 100%; background: #fff; color: var(--ink); }
.inp:focus { outline: 2px solid rgba(15,118,110,.35); border-color: var(--pri); }
.inp.full { width: 100%; } .inp.w160 { width: 160px; } .inp.w120 { width: 120px; }
.inp.tall { height: 90px; resize: vertical; }
.inp.big { width: 100%; text-align: center; font-size: 15px; padding: 9px 10px; }
.inp.code { letter-spacing: 10px; font-size: 22px; font-weight: 600; }

/* bảng */
table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
th { text-align: center; font-weight: 600; color: var(--mute); padding: 7px 8px; border-bottom: 1px solid var(--line); background: #f9fafb; }
th.l { text-align: left; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.r { text-align: right; } td.c { text-align: center; }
tr.err td { background: #fef2f2; } tr.warn td { background: #fffbeb; }
.table-wrap { overflow-x: auto; }

/* khung ứng dụng */
.app { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-width: 1240px; margin: 16px auto; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.logo { width: 34px; height: 34px; border-radius: 8px; background: var(--pri); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.logo-center { margin: 0 auto; }
.crumb { color: var(--mute); font-size: 13px; } .crumb b { color: var(--ink); }
.who { margin-left: auto; font-size: 12px; color: var(--mute); display: flex; gap: 8px; align-items: center; }
.main { padding: 16px 20px; min-width: 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs a { padding: 6px 14px; font-size: 13px; color: var(--mute); border-bottom: 2px solid transparent; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--pri); border-color: var(--pri); font-weight: 600; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.foot { margin-top: 8px; }
.undo { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 10px; }
.empty { padding: 20px 0; text-align: center; }

/* khung hộp thoại (trong trang, không dùng JS) */
.modal { background: #fff; border: 1px solid #99f6e4; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.08); margin: 8px 0 0; }
.modal.narrow { max-width: 520px; }
.modal .mh { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.modal .mh b { font-size: 16px; }
.modal .mb { padding: 12px 16px; font-size: 13px; }
.modal .mf { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 6px; align-items: center; }
.form { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.form.narrow-label { grid-template-columns: 80px 1fr; }
.radios { display: flex; flex-direction: column; gap: 4px; }
.radios input { accent-color: var(--pri); }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }

/* trang giữa (A1, A2, đăng nhập, lỗi) */
.center-page { max-width: 420px; margin: 60px auto; padding: 24px 20px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.brand { font-size: 18px; font-weight: 700; margin: 8px 0 2px; }
.lead-center { margin: 0 0 14px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.links-row { margin-top: 12px; display: flex; gap: 6px; justify-content: center; align-items: center; }

@media (max-width: 760px) {
  .app { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .who span { display: none; }
  .center-page { margin: 20px 12px; }
}

/* Ô mật khẩu có nút con mắt (mẫu v65) */
.pw { position: relative; }
.pw .inp { padding-right: 44px; width: 100%; box-sizing: border-box; }
.eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; background: transparent; color: #64748b; display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; padding: 0; }
.eye:hover, .eye:focus-visible { background: #f1f5f9; color: #0f766e; }
.eye svg { width: 18px; height: 18px; }
.eye .eye-off { display: none; }
.eye.on .eye-on { display: none; }
.eye.on .eye-off { display: block; }
.fe { color: #b91c1c; font-size: 13px; margin: -4px 0 2px; text-align: left; }
.center-link { text-align: center; margin-top: 12px; font-size: 13px; }
.linkbtn { background: none; border: 0; color: #0f766e; cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
