/* Nhận diện Cty TNHH Thoại Anh — dùng chung backoffice + lookup (spec 2026-10-12 giao diện mục 2–4).
   Hai bản backoffice/static và lookup/static phải giống hệt từng byte (tests/test_brand_assets.py). */
:root {
  --accent: #3c3c8e; --accent-dark: #2b2b6b; --accent-light: #eeeef8; --brand-red: #e0353d;
  --ink: #1d2733; --muted: #5f6b7a; --line: #d9dee5; --line-soft: #e8ecf1;
  --bg: #f4f6f9; --surface: #fff; --head: #eef2f7; --stripe: #f8fafc; --hover: var(--accent-light);
  --warn-bg: #fff4e0; --warn: #8a5300; --warn-line: #e8a33d;
  --radius: 8px; --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 1px 3px rgba(16, 32, 56, .08);
  --focus: 0 0 0 3px rgba(60, 60, 142, .3);
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 system-ui, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
main { max-width: 1100px; margin: 0 auto; padding: 28px 16px 56px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 18px; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.inline { display: inline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Dải logo hai tầng: tầng 1 trắng + vạch chàm/đỏ; tầng 2 menu chàm (chỉ backoffice) */
.logo-band { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 8px 20px; background: #fff; }
.logo-band .logo { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; text-decoration: none; min-width: 0; }
.logo-band .logo img { display: block; width: 194px; max-width: 100%; height: auto; }
.logo-band .badge { color: var(--muted); font-size: .85em; }
.logo-band .right { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.accent-bar { height: 4px; background: linear-gradient(90deg, var(--accent) 70%, var(--brand-red) 70%); }
.menu-bar { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 6px 20px 0; background: var(--accent-dark); }
.menu-bar a { color: #e4e4f5; text-decoration: none; padding: 7px 12px 9px; border-radius: 6px 6px 0 0; }
.menu-bar a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.menu-bar a[aria-current] { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600;
  box-shadow: inset 0 -3px var(--brand-red); }

/* Nút và ô nhập */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 500;
  min-height: 36px; padding: 6px 16px; border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 6px; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
button:hover, .btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--accent); border-color: var(--line); }
.btn-ghost:hover { background: var(--accent-light); color: var(--accent-dark); border-color: var(--line); }
button:disabled, button:disabled:hover { opacity: .55; cursor: not-allowed; background: var(--surface); color: var(--muted); border-color: var(--line); }
input, select { font: inherit; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: inherit; max-width: 100%; transition: border-color .15s; }
input:hover, select:hover { border-color: #b8c1cc; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[type="file"] { padding: 5px; }

/* Khối nội dung, bảng, thông báo */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; margin-bottom: 16px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.narrow { max-width: 400px; margin: 56px auto; }
.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap { box-shadow: none; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
thead th { background: var(--head); font-weight: 600; font-size: .9em; color: #3a4757; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody th { background: var(--stripe); font-weight: 600; }
tbody tr:nth-child(even) td { background: var(--stripe); }
tbody tr:hover td { background: var(--hover); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.grouped tbody tr td { background: none; } /* bảng có ô gộp: không tô sọc */
.grouped tbody td[rowspan] { vertical-align: middle; border-right: 1px solid var(--line-soft); }
.alert { background: var(--warn-bg); color: var(--warn); border: 1px solid #f0d29a; border-left: 4px solid var(--warn-line); padding: 10px 14px; border-radius: 6px; }
.info { background: var(--accent-light); border: 1px solid #c9c9e8; border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; }
.contact { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .9em; text-align: center; }
.demo-banner { background: var(--warn-line); color: #1d1300; text-align: center; font-weight: 600;
  padding: 6px 12px; font-size: 14px; }

@media (max-width: 600px) {
  main { padding: 20px 12px 40px; }
  h1 { font-size: 1.35rem; }
  .logo-band { padding: 8px 12px; }
  .menu-bar { padding: 6px 12px 0; }
  .card { padding: 16px; }
  .table-wrap td, .table-wrap th { white-space: nowrap; }
  .narrow { margin: 24px auto; }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .card, .table-wrap { box-shadow: none; border-color: #999; }
  th, td { border: 1px solid #999; }
  thead th, tbody th, tbody tr:nth-child(even) td, tbody tr:hover td { background: none; }
  .alert, .info { border-left-width: 1px; }
}
