﻿/* Bảng màu navy + đỏ bordeaux (logo ACA LEGAL từ 20/11/2026: navy #1F3557, đỏ bordeaux #7A1F2E; trước đó vàng đồng #B8975A, bản cũ ở _backup/theme-bordeaux-2011).
   Tên biến --gold* giữ nguyên để khỏi sửa hàng trăm chỗ, nay mang màu bordeaux. Chữ phủ gradient trên nền tối dùng --accent-text-grad (trắng → hồng nhạt). */
:root {
    --navy-deep: #15253d;
    --navy: #1f3557;
    --navy-2: #2a4568;
    --navy-3: #34507a;
    --gold: #7a1f2e;
    --gold-light: #ecc5cb;
    --bronze: #5c1622;
    --gold-grad: linear-gradient(135deg, #9a3346 0%, #7a1f2e 55%, #631826 100%);
    --accent-text-grad: linear-gradient(135deg, #ffffff 0%, #f3dade 55%, #e3aab4 100%);
    --gold-soft: #f6e9eb;
    --bg: #f4f5f7;
    --card: #ffffff;
    --text: #1d2433;
    --muted: #6b7385;
    --line: #e3e6ec;
    --ok: #1f7a4d;
    --ok-bg: #e3f4ea;
    --warn: #9a5b00;
    --warn-bg: #fdf0d9;
    --fail: #b42318;
    --fail-bg: #fde7e5;
    --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* Chặn mọi tràn ngang trên điện thoại (clip không tạo scroll container nên header sticky vẫn chạy) */
body { overflow-x: clip; }
img { max-width: 100%; }
body {
    font-family: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--bronze); }
h1, h2, h3 { font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Lora", Georgia, serif; line-height: 1.3; margin: 0 0 .5em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.08rem; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.nowrap { white-space: nowrap; }
code { background: var(--gold-soft); padding: 1px 6px; border-radius: 4px; }

.wordmark {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Lora", Georgia, serif; font-weight: 700; letter-spacing: 2px;
    background: var(--accent-text-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Khung ứng dụng: menu dọc bên trái + vùng nội dung */
:root { --side-w: 256px; }
.nav-toggle { display: none; }
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w); z-index: 40;
    display: flex; flex-direction: column; color: #d9dfec;
    background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 55%, #1a2c48 100%);
    border-right: 1px solid rgba(122,31,46,.18); box-shadow: 4px 0 18px rgba(21,37,61,.18);
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-brand:hover { color: #fff; }
.side-brand img { height: 42px; width: auto; }
.side-brand strong { display: block; font-size: 1.15rem; line-height: 1.2; }
.side-brand small { display: block; font-size: .66rem; line-height: 1.35; color: #d9c3c8; letter-spacing: .2px; }
.side-scroll { flex: 1; overflow-y: auto; padding: 12px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.side-group { margin-top: 18px; }
.side-label { padding: 0 10px 6px; font-size: .7rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #8794ad; }
.side-link {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin-bottom: 2px; border-radius: 10px;
    color: #d9dfec; font-size: .92rem; font-weight: 500; line-height: 1.3;
}
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link .ico, .side-cta .ico {
    width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center;
    background: rgba(255,255,255,.07); color: var(--gold-light);
}
.side-link.active { background: rgba(122,31,46,.15); color: var(--gold-light); box-shadow: inset 3px 0 0 var(--gold); }
.side-link.active .ico { background: var(--gold-grad); color: #fff; }
.side-link.soon { opacity: .5; cursor: default; }
.side-link.sub { padding-left: 30px; font-size: .92em; }
.proc-box { border: 1px dashed #7a1f2e; border-radius: 10px; padding: 10px 12px; margin: 6px 0 12px; background: #fffaf0; }
.proc-list td, .proc-list th { vertical-align: top; }
.proc-days { white-space: nowrap; font-weight: 600; }
.proc-sec { margin-top: 14px; }
.proc-sec h3 { font-size: 1rem; margin: 0 0 6px; }
.proc-sec .prose { white-space: pre-line; }
.side-link.sub .ico { width: 24px; height: 24px; }
.side-link.sub .ico .svg { width: 15px; height: 15px; }
.side-link.sub.sub2 { padding-left: 50px; font-size: .88em; }
.side-link.sub.sub3 { padding-left: 68px; font-size: .84em; }
.side-link.sub.sub3 .ico { width: 21px; height: 21px; }
.side-link.sub.sub3 .ico .svg { width: 13px; height: 13px; }
.sub-tabs.sub-tabs-3 { margin-top: -6px; flex-wrap: wrap; }
.sub-tabs.sub-tabs-3 a { font-size: .85em; }
.sub-tabs a .svg { vertical-align: -2px; margin-right: 5px; }
.sub-tabs.sub-tabs-2 { margin-top: -6px; }
.sub-tabs.sub-tabs-2 a { font-size: .9em; }
.side-link.soon:hover { background: transparent; color: #d9dfec; }
.soon-tag { margin-left: auto; flex: none; font-size: .62rem; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); text-transform: uppercase; letter-spacing: .5px; }
.side-cta {
    display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 9px 10px; border-radius: 11px;
    background: var(--gold-grad); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(122,31,46,.35);
}
.side-cta:hover { color: #fff; filter: brightness(1.06); }
.side-cta.is-soon { cursor: default; opacity: .8; }
.side-cta.is-soon:hover { filter: none; }
.side-cta.is-soon .soon-tag { border-color: rgba(255,255,255,.4); color: #fff; }
.side-cta .ico { background: rgba(255,255,255,.16); color: #fff; }
.side-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.12); }
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: #fff; font-family: "Montserrat", sans-serif; font-weight: 800; }
.who { flex: 1; min-width: 0; line-height: 1.25; }
.who small { display: block; font-size: .75rem; color: #8f9ab3; }
.who strong { display: block; color: #fff; font-size: .92rem; }
.side-logout { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: #d9dfec; border: 1px solid rgba(255,255,255,.15); }
.side-logout:hover { background: rgba(255,255,255,.08); color: var(--gold-light); }
.side-backdrop { display: none; }

.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.main > main { flex: 1; }
.mainbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 10px 28px;
    background: linear-gradient(90deg, rgba(255,255,255,.96) 60%, rgba(247,238,219,.92) 100%); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.mainbar-title { min-width: 0; line-height: 1.25; }
.mainbar-title small { display: block; font-size: .78rem; color: var(--muted); }
.mainbar-title strong { display: block; font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Lora", Georgia, serif; font-size: 1.35rem; color: var(--navy); }
/* Trợ lý Trinh (nhân vật gốc của TND) cạnh lời chào */
.trinh-wrap { position: relative; flex: none; }
.trinh { display: block; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; filter: drop-shadow(0 4px 10px rgba(21,37,61,.25)); transition: transform .2s; }
.trinh:hover { transform: translateY(-2px) scale(1.04); }
.trinh.wave { animation: trinh-wave .7s ease; }
.trinh { position: relative; overflow: hidden; border: 2px solid #7a1f2e; box-sizing: border-box; }
.trinh img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.trinh .trinh-shut { position: absolute; inset: 0; opacity: 0; animation: trinh-wink 4.5s infinite; }
/* nháy một mắt: giữ ~0,4 giây rồi mở */
@keyframes trinh-wink { 0%, 88% { opacity: 0 } 89%, 97% { opacity: 1 } 98%, 100% { opacity: 0 } }
/* bị "sờ" thì nháy mắt ngay */
.trinh.tickled .trinh-shut { animation: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .trinh .trinh-shut { animation: none } }
@keyframes trinh-wave { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-8deg) } 60% { transform: rotate(6deg) } }
.trinh-bubble { position: absolute; left: 0; top: calc(100% + 10px); z-index: 30; width: min(320px, 80vw); background: #fff; border: 1px solid var(--gold); border-radius: 12px; padding: 10px 12px; font-size: .85rem; line-height: 1.45; color: var(--navy); box-shadow: 0 14px 34px rgba(21,37,61,.18); }
.trinh-bubble::before { content: ""; position: absolute; top: -7px; left: 22px; width: 12px; height: 12px; background: #fff; border-left: 1px solid var(--gold); border-top: 1px solid var(--gold); transform: rotate(45deg); }
.trinh-bubble q { quotes: none; }
/* nút đổi trợ lý: biểu tượng nhỏ ở góc dưới phải ảnh */
.tl-swap { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid #fff; background: var(--navy); color: #ecc5cb; font-size: 11px; line-height: 16px; text-align: center; cursor: pointer; opacity: .75; box-shadow: 0 1px 4px rgba(21,37,61,.3); transition: opacity .15s, transform .15s; }
.tl-swap:hover, .tl-swap[aria-expanded="true"] { opacity: 1; transform: rotate(180deg); }
.tl-menu { position: absolute; left: 40px; top: calc(100% + 4px); z-index: 31; display: flex; flex-direction: column; min-width: 130px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: 0 10px 26px rgba(21,37,61,.16); }
.tl-menu[hidden] { display: none; }
.tl-menu button { white-space: nowrap; font: inherit; font-size: .8rem; text-align: left; cursor: pointer; padding: 5px 10px; border: 0; border-radius: 6px; background: none; color: var(--navy); }
.tl-menu button:hover { background: var(--gold-soft); }
.tl-menu button[aria-checked="true"] { font-weight: 700; }
.tl-menu button[aria-checked="true"]::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .3em; vertical-align: -.15em; background-color: currentColor; -webkit-mask: var(--ti-check) center / contain no-repeat; mask: var(--ti-check) center / contain no-repeat; color: var(--bronze); }.trinh-bubble > span { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--bronze); }
.mainbar-usage em b { color: var(--navy-2); font-weight: 700; }
.mainbar-usage { display: block; font-size: .8rem; line-height: 1.4; color: var(--navy-2); margin: 2px 0 3px; cursor: help; }
.mainbar-usage em { margin-left: 4px; }
.mainbar-usage #usage-line { font-weight: 600; }
.mainbar-usage em { color: var(--bronze); font-style: normal; }
.mainbar-usage em::before { content: "– "; color: var(--muted); }
.mainbar-tag { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--bronze); }
.mainbar-tag::before { content: ""; width: 18px; height: 2px; background: var(--gold); }
.mainbar-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.mainbar-actions .btn { padding: 9px 16px; }
.nav-burger { display: none; cursor: pointer; width: 40px; height: 40px; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--navy); background: #fff; flex: none; }

/* Hero */
.hero { background: radial-gradient(ellipse at 15% 0%, var(--navy-3) 0%, var(--navy-2) 35%, var(--navy) 65%, var(--navy-deep) 100%); color: #fff; padding: 56px 0 64px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; background: var(--accent-text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--gold-light); text-transform: uppercase; font-size: .78rem; letter-spacing: 2px; font-weight: 600; }
.hero h1 { font-size: 2.4rem; margin: 10px 0 14px; }
.hero p { color: #c9d1e3; max-width: 560px; }
.hero-search { display: flex; margin-top: 22px; background: #fff; border-radius: 10px; padding: 5px; max-width: 580px; }
.hero-search input { flex: 1; width: 100%; border: 0; padding: 12px 14px; font: inherit; outline: none; min-width: 0; }
.hero-search button { flex: none; }
/* Cột grid mặc định không co nhỏ hơn nội dung -> cho phép co để không tràn */
.hero-inner > *, .grid-2 > *, .features > *, .cards > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
.hero-search button, .searchbar button, .btn {
    background: var(--gold-grad); color: #fff; border: 0; border-radius: 8px; padding: 10px 20px;
    font: inherit; font-weight: 700; cursor: pointer; display: inline-block; box-shadow: 0 2px 8px rgba(122,31,46,.25);
}
.hero-search button:hover, .searchbar button:hover, .btn:hover { filter: brightness(1.07); color: #fff; }
.stats { display: grid; gap: 12px; }
.stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 14px 20px; color: #c9d1e3; }
.stat { border-left: 3px solid var(--gold); }
.stat span { display: block; font-family: "Montserrat", sans-serif; font-size: 1.9rem; font-weight: 800; line-height: 1.2; background: var(--accent-text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Page */
.page { padding: 36px 20px 56px; }
.narrow { max-width: 880px; }
.page-title { font-size: 1.9rem; color: var(--navy); }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.back { display: inline-block; margin-bottom: 10px; font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-head a { font-size: .88rem; }
.empty { text-align: center; color: var(--muted); padding: 40px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: -70px 0 28px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--text); box-shadow: 0 8px 24px rgba(19,35,63,.08); transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(19,35,63,.14); color: var(--text); }
.feature-icon { font-size: 26px; width: 48px; height: 48px; border-radius: 12px; background: var(--gold-soft); display: grid; place-items: center; margin-bottom: 12px; }
.feature p { color: var(--muted); margin: 0; font-size: .92rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a { font-weight: 500; }
.meta, .meta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.meta-row { margin: 0 0 12px; font-size: .9rem; }
.tag { background: #eef1f7; color: var(--navy-2); padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.status { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.warn { background: var(--warn-bg); color: var(--warn); }

/* Search & filters */
.searchbar { display: flex; gap: 10px; margin: 8px 0 14px; flex-wrap: wrap; }
.searchbar input, .searchbar select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.searchbar input { flex: 1; min-width: 220px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 20px; }
.chip { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: .88rem; }
.chip.active { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }

/* Table */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; background: #f8f9fb; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fbfaf6; }

.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.info-grid label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.prose { white-space: pre-line; }

/* Forms (biểu mẫu) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.form-card { display: flex; flex-direction: column; margin: 0; }
.form-card p { flex: 1; font-size: .9rem; }
.form-code { font-size: .75rem; color: var(--bronze); font-weight: 700; letter-spacing: 1px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; }
.btn-sm { font-size: .85rem; font-weight: 600; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--gold); color: var(--navy); }
.btn-sm:hover { background: var(--gold-grad); color: #fff; }
.paper { background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.06); padding: 48px 56px; white-space: pre-wrap; font-family: "Times New Roman", serif; font-size: 16px; line-height: 1.7; }

/* Q&A */
.qa h3 { margin-top: 8px; }
.question { white-space: pre-line; }
.answer { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 0 8px 8px 0; white-space: pre-line; }
.alert { background: var(--ok-bg); color: var(--ok); padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.form .field { margin-bottom: 14px; }
.form label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .9rem; }
.form input, .form select, .form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid rgba(122,31,46,.45); border-color: var(--gold); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-error { color: var(--fail); font-size: .85rem; }
.input-validation-error { border-color: var(--fail) !important; }
.plain { padding-left: 18px; }

/* Status */
.checks { display: grid; gap: 12px; margin-top: 20px; }
.check { display: flex; gap: 14px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.check > span { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.check.ok > span { background: var(--ok-bg); color: var(--ok); }
.check.fail > span { background: var(--fail-bg); color: var(--fail); }
.check.fail { border-color: #f5c2bd; }
.code { background: #f4f5f7; padding: 10px; border-radius: 8px; font-size: .8rem; white-space: pre-wrap; margin: 8px 0 0; }

/* Footer */
.footer { background: transparent; padding: 18px 0 22px; font-size: .82rem; border-top: 1px solid var(--line); }
.footer .wordmark { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 40px; }

/* Login */
.login-body {
    min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
    background: radial-gradient(ellipse at 20% 0%, var(--navy-3) 0%, var(--navy-2) 30%, var(--navy) 60%, var(--navy-deep) 100%);
}
.login-wrap { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.login-logo { width: 360px; max-width: 86%; height: auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }
.login-box {
    width: 100%; border-radius: 16px; padding: 28px 26px; color: #e6eaf2;
    background: rgba(255,255,255,.05); border: 1px solid rgba(122,31,46,.3);
    box-shadow: 0 20px 50px rgba(0,0,0,.35); backdrop-filter: blur(6px);
}
.login-box h1 { font-size: 1.3rem; color: var(--gold-light); margin-bottom: 4px; }
.login-box .muted { font-size: .9rem; margin-top: 0; color: #aab4c8; }
.login-box .form label { color: #ecc5cb; }
.login-box .form input { background: rgba(255,255,255,.95); border-color: transparent; }
.login-btn { width: 100%; padding: 12px; font-size: 1rem; }
.login-error { background: var(--fail-bg); color: var(--fail); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .9rem; font-weight: 500; }

/* Án lệ & chủ đề */
.crumb { font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--bronze); font-weight: 700; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-outline, .btn-danger {
    display: inline-block; padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
    background: #fff; border: 1px solid var(--gold); color: var(--navy);
}
.btn-outline:hover { background: var(--gold-soft); color: var(--navy); }
.btn-danger { border-color: #f0b4ae; color: var(--fail); }
.btn-danger:hover { background: var(--fail-bg); }
button.btn-sm { background: #fff; cursor: pointer; font: inherit; font-size: .85rem; }
.btn-sm-danger { border-color: #f0b4ae !important; color: var(--fail) !important; }
.btn-sm-danger:hover { background: var(--fail-bg) !important; }
.status.fail { background: var(--fail-bg); color: var(--fail); }
.lead { font-size: 1.08rem; color: var(--navy-2); margin: -4px 0 16px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: 1 / -1; }
.info-grid .tag { display: inline-block; margin: 2px 4px 2px 0; }
.table-stack .tag { display: inline-block; margin: 0 4px 4px 0; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.toc a { font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.toc a.toc-empty { color: #a9afbd; }
.section-card { scroll-margin-top: 90px; }
.section-card h2 { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.sec-no {
    display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; margin-right: 8px;
    background: var(--gold-soft); color: var(--bronze); font-family: "Montserrat", sans-serif; font-size: .78rem; font-weight: 800;
}
.section-card h2 .sec-no { margin-right: 0; }
.section-card.is-key { border-left: 4px solid var(--gold); background: #fffdf7; }
.notes-card { background: #f8f9fb; }
.kw { display: flex; gap: 8px; flex-wrap: wrap; }
.form textarea { resize: vertical; line-height: 1.55; }
.form .field > label .sec-no { width: 22px; min-width: 22px; height: 22px; font-size: .7rem; }
.req { color: var(--fail); }
.check-inline { display: flex !important; gap: 8px; align-items: center; font-weight: 500 !important; }
.check-inline input { width: auto !important; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(244,245,247,.95); padding: 12px 0; border-top: 1px solid var(--line); z-index: 5; }
.topic-picker details { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fff; }
.topic-picker summary { cursor: pointer; padding: 10px 14px; }
.topic-list { padding: 4px 14px 12px; display: grid; gap: 2px; }
.topic-item { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-weight: 400 !important; margin: 0 !important; cursor: pointer; }
.topic-item input { width: auto !important; margin-top: 5px; }
.topic-item.depth-1 { padding-left: 22px; }
.topic-item.depth-2 { padding-left: 44px; }
.topic-item.depth-3 { padding-left: 66px; }
.topic-root { color: var(--muted); font-size: .9rem; }
.topic-add { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.topic-add .field { margin-bottom: 0; }
.topic-add .grow { flex: 1 1 260px; }
.topic-add .narrow-field { width: 110px; }
.topic-table .row-root td { background: #faf7ef; font-weight: 600; }
.topic-table .row-hidden td { color: #a9afbd; }
.topic-table .actions form { margin: 0; }

.engine { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.engine input { width: auto !important; margin-top: 5px; }
.engine .status { display: inline-block; margin-top: 4px; }
.setup { margin-top: 14px; }
.section-title { margin: 26px 0 12px; color: var(--navy); }
.import-note { border-left: 4px solid var(--gold); background: #fffdf7; }
.import-note ul { margin: 8px 0 0; }
.raw-text { max-height: 420px; overflow: auto; }
.model-table td { vertical-align: middle; }
.model-table input { width: auto !important; }
.model-name { margin: 0 !important; font-weight: 400 !important; cursor: pointer; }
.model-table tr:has(input:checked) td { background: var(--gold-soft); }
.current-file { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; border-radius: 10px; background: var(--gold-soft); }
.current-file[hidden], .field[hidden] { display: none; }
.read-progress { border-left: 4px solid var(--gold); }
.progress-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.progress-text { flex: 1; min-width: 180px; }
.spinner { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 3px solid var(--gold-soft); border-top-color: var(--bronze); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.read-error .login-error { margin-bottom: 10px; }
.suggest-ai-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #eef4ff; color: var(--navy-2); font-size: .9rem; }
/* Danh sách án lệ dạng bảng ngang */
.page.wide { max-width: none; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 6px; }
.filter-bar input, .filter-bar select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.filter-bar .grow { flex: 1 1 320px; min-width: 0; }
.date-range { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }
.list-count { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.h-scroll { overflow-x: auto; }
.grid-table { min-width: 1700px; table-layout: fixed; }
/* Hàng tiêu đề: chữ thường, tự xuống dòng, số mục tách riêng – không tràn sang cột bên */
.grid-table .head-row th {
    background: var(--navy); color: #eef2f8; text-transform: none; letter-spacing: .1px;
    font-size: .82rem; font-weight: 600; line-height: 1.3; white-space: normal;
    padding: 11px 12px; vertical-align: middle; border-bottom: 2px solid var(--gold); border-right: 1px solid rgba(255,255,255,.08);
}
.th-in { display: flex; align-items: center; gap: 8px; }
.th-in.th-center { justify-content: center; text-align: left; }
.th-no {
    flex: none; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px;
    background: var(--gold-grad); color: #fff; font-family: "Montserrat", sans-serif; font-size: .68rem; font-weight: 800;
    user-select: none;
}
.th-no-icon { background: rgba(255,255,255,.14); color: var(--gold-light); }
.grid-table .col-name { width: 210px; }
.grid-table .col-text { width: 260px; }
.grid-table .col-date { width: 150px; }
.grid-table .col-topic { width: 200px; }
.grid-table .col-level { width: 120px; }
.grid-table .col-court { width: 200px; }
.judgment-table { min-width: 2000px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.level-tag { display: inline-block; font-size: .76rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #e7f0fb; color: #1f4f86; }
.level-tag.appeal { background: #f3e9fb; color: #6b2f8f; }
.level-tag:hover { filter: brightness(.95); }
.topic-tag { font-size: .74rem; font-weight: 600; line-height: 1.35; }
.topic-tag:hover { background: var(--navy); color: var(--gold-light); }
.grid-table .col-kw { width: 220px; }
.grid-table .col-view { width: 120px; text-align: center; }
.grid-table .col-act { width: 140px; }
.grid-table td { font-size: .88rem; }
.grid-table .filter-row th { background: #f8eef0; padding: 6px 8px; text-transform: none; letter-spacing: 0; font-weight: 400; vertical-align: top; border-bottom: 1px solid var(--line); }
.grid-table .filter-row input, .grid-table .filter-row select { width: 100%; padding: 6px 8px; border: 1px solid #ddd6c4; border-radius: 6px; font: inherit; font-size: .8rem; background: #fff; }
.grid-table .filter-row input:focus, .grid-table .filter-row select:focus { outline: 2px solid rgba(122,31,46,.45); border-color: var(--gold); }
.grid-table .filter-row input.bad { border-color: var(--fail); background: var(--fail-bg); }
/* Lọc ngày: 1 nút gọn, bấm mở khung chọn */
.date-btn {
    width: 100%; display: flex; align-items: center; gap: 6px; padding: 6px 8px; cursor: pointer;
    border: 1px solid #ddd6c4; border-radius: 6px; background: #fff; font: inherit; font-size: .8rem; color: var(--muted);
    white-space: nowrap; overflow: hidden;
}
.date-btn-text { overflow: hidden; text-overflow: ellipsis; }
.date-btn:hover { border-color: var(--gold); }
.date-btn.on { color: var(--navy); font-weight: 600; border-color: var(--gold); background: var(--gold-soft); }
.date-btn.bad { border-color: var(--fail); background: var(--fail-bg); color: var(--fail); }
.date-pop {
    position: fixed; z-index: 60; width: 290px; padding: 14px; border-radius: 12px; background: #fff;
    border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(21,37,61,.22); text-align: left; font-weight: 400;
}
.date-pop-title { font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.date-pop-row { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px !important; font-size: .85rem; color: var(--muted); }
.date-in { display: flex; align-items: center; gap: 4px; position: relative; width: 190px; }
.date-in input[type=text] { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .85rem; }
.cal-btn { flex: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.cal-btn:hover { border-color: var(--gold); background: var(--gold-soft); }
.grid-table .filter-row .date-pop .cal-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.date-quick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0 8px; }
.date-quick .btn-sm { background: #fff; cursor: pointer; font: inherit; font-size: .8rem; }
.date-year { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .8rem; }
.date-pop-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.date-pop-actions .btn-sm { cursor: pointer; font: inherit; font-size: .82rem; background: #fff; }
.date-pop-actions .date-apply { background: var(--gold-grad); color: #fff; border-color: transparent; font-weight: 700; }
.grid-table .filter-go { width: 100%; }
.sticky-col { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 1px 0 0 var(--line); }
.grid-table .head-row .sticky-col { background: var(--navy); z-index: 3; }
.grid-table .filter-row .sticky-col { background: #f8eef0; z-index: 3; }
.grid-table tr:hover td.sticky-col { background: #fbfaf6; }
.row-title { font-weight: 600; display: block; margin-bottom: 4px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.kw-cell { display: flex; flex-wrap: wrap; gap: 4px; }
.kw-chip { font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--navy-2); }
.kw-chip:hover { background: var(--gold-grad); color: #fff; }
.view-btn { font: inherit; font-size: .85rem; cursor: pointer; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--gold); background: #fff; color: var(--navy); }
.view-btn:hover { background: var(--gold-grad); color: #fff; }
.tiny { font-size: .72rem; margin-top: 3px; }
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 18px 0 0; flex-wrap: wrap; }
.pager-cur { padding: 5px 12px; border-radius: 6px; background: var(--navy); color: var(--gold-light); font-weight: 700; font-size: .85rem; }
.sec-dialog { width: min(900px, calc(100vw - 32px)); max-height: 86vh; padding: 0; border: 0; border-radius: 14px; box-shadow: 0 30px 80px rgba(21,37,61,.45); }
.sec-dialog::backdrop { background: rgba(21,37,61,.55); }
.sec-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.sec-dialog-head h2 { margin: 2px 0 0; color: var(--navy); }
.sec-dialog-body { padding: 18px 22px 26px; overflow-y: auto; max-height: calc(86vh - 80px); line-height: 1.7; }

/* Tệp tải về */
.dl-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.file-list { list-style: none; margin: 0 0 12px; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.file-list li:last-child { border-bottom: 0; }
.file-list form { margin: 0; }
.file-ico { flex: none; width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; font: 800 .7rem "Montserrat", sans-serif; background: #eef1f7; color: var(--navy-2); }
.file-ico.pdf { background: var(--fail-bg); color: var(--fail); }
.file-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.attach-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.attach-form input[type=file] { font-size: .85rem; max-width: 100%; }

.note-warn { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; margin: 6px 0 12px; }
.howto { margin: 0 0 12px; }
.howto summary { cursor: pointer; color: var(--navy-2); font-weight: 600; }
.howto ol { margin: 8px 0 0; padding-left: 20px; }
.key-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.key-form .field { margin-bottom: 0; }
.key-form .grow { flex: 1 1 280px; }
.pending-table .actions form { margin: 0; }
.pending-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 1.3 Quản lý luật */
.grid-table .col-num { width: 150px; }
.grid-table .col-type { width: 110px; }
.grid-table .col-title { width: 300px; }
.grid-table .col-issuer, .grid-table .col-signer { width: 190px; }
.grid-table .col-status { width: 150px; }
.grid-table .col-count { width: 120px; }
.law-table .col-date { width: 120px; }
.nowrap { white-space: nowrap; }
mark.flag-mark { background: #fff3b0; padding: 0 4px; border-radius: 3px; }
.flag-badge { display: inline-block; margin-top: 4px; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: #fff3b0; color: #7a5a00; font-weight: 600; white-space: nowrap; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.related-list li:last-child { border-bottom: 0; }
.art-filter { margin-bottom: 12px; }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-left: auto; }
.legend-box { width: 14px; height: 14px; border-radius: 3px; background: #fff3b0; border: 1px solid #e8cf5a; }
.art-list { display: flex; flex-direction: column; }
.art-chapter { margin: 18px 0 6px; font: 700 .8rem "Montserrat", sans-serif; letter-spacing: .5px; color: var(--bronze); text-transform: uppercase; }
.art-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; border-radius: 6px; }
.art-row.flagged { background: #fff8c5; border-left-color: #e2b500; }
.art-row.just-saved { box-shadow: 0 0 0 2px var(--gold); }
.art-main { flex: 1; min-width: 0; }
.art-title { display: block; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--navy); text-align: left; cursor: pointer; }
.art-title:hover { text-decoration: underline; }
.art-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.art-snippet { margin-top: 2px; }
.art-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 300px; }
.note-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.note-badge.change { background: #fde2d8; color: #9a3412; }
.note-badge.guide { background: #dbeafe; color: #1e3a8a; }
.note-badge.related { background: #e5e7eb; color: #374151; }
mark.cite { background: #fef3c7; color: inherit; border-bottom: 1px dotted #b45309; padding: 0 1px; }
mark.cite-hit { background: #fcd34d; color: #111827; font-weight: 700; padding: 0 2px; border-radius: 3px; }
.rel-item { border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 10px; margin: 6px 0; background: #fafafa; }
.rel-item > summary { cursor: pointer; }
.rel-item > summary .muted { margin-top: 2px; }
.rel-item[open] > .prose { margin-top: 8px; white-space: pre-line; }
.art-dialog { width: min(980px, calc(100vw - 32px)); }
.art-kw-edit { background: #f8eef0; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.art-kw-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.art-kw-row input { flex: 1 1 320px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.art-sec-title { font-size: 1rem; color: var(--navy); margin: 14px 0 6px; }
.art-original { background: #fafafa; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.note-card { border: 1px solid var(--line); border-left: 4px solid #e2b500; border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; background: #fffbe6; }
.note-card.change { border-left-color: #ea580c; }
.note-card.guide { border-left-color: #2563eb; }
.note-head { margin-bottom: 6px; }
.note-remark { margin-top: 6px; }
.art-dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.preview-art { padding: 6px 0; border-bottom: 1px solid var(--line); }
.preview-art summary { cursor: pointer; }
.preview-art .prose { padding: 6px 0 4px 14px; }
.art-original-box summary { cursor: pointer; }
.art-original-box .prose { margin-top: 8px; max-height: 320px; overflow-y: auto; }
.kind-pick { display: flex; flex-direction: column; gap: 6px; }
.danger-zone { margin-top: 18px; text-align: right; }
/* Ô chọn từ khóa có gợi ý (kw-picker.js) */
.kwp { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 8px 10px; margin: 4px 0 8px; }
.kwp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.kwp-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--navy-2); }
.kwp-x { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--navy-2); padding: 0 4px; }
.kwp-x:hover { color: var(--fail); }
.kwp-entry { position: relative; }
.kwp-input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.kwp-drop { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(21,37,61,.15); max-height: 260px; overflow-y: auto; }
.kwp-opt { padding: 7px 10px; cursor: pointer; font-size: .88rem; }
.kwp-opt:hover, .kwp-opt.on { background: var(--gold-soft); }
.kwp-new { border-top: 1px solid var(--line); color: var(--navy-2); font-style: italic; }
.kwp-sugg { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.kwp-group { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.kwp-label { font-size: .75rem; color: var(--muted); margin-right: 2px; }
.kwp-add { font: inherit; font-size: .78rem; cursor: pointer; padding: 2px 9px; border-radius: 999px; border: 1px dashed var(--gold); background: #fffdf7; color: var(--navy); }
.kwp-add:hover { background: var(--gold-grad); color: #fff; border-style: solid; }
/* ===== Phòng họp ===== */
.adv-ava { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 800 .95rem "Montserrat", sans-serif; color: #fff; background: linear-gradient(135deg, #5c1622, #7a1f2e); box-shadow: 0 2px 6px rgba(21,37,61,.2); }
.adv-ava.male { background: linear-gradient(135deg, #2a4568, #2c5278); }
.adv-ava.big { width: 52px; height: 52px; font-size: 1.3rem; }
/* ảnh chân dung trợ lý có chớp mắt */
.adv-photo { position: relative; flex: none; display: inline-block; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; border: 2px solid #7a1f2e; box-sizing: border-box; background: #eee; }
.adv-photo.big { width: 64px; height: 64px; }
.adv-photo.preview { width: 120px; height: 120px; margin-top: 8px; }
.adv-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.adv-photo .adv-blink { position: absolute; inset: 0; opacity: 0; animation: adv-blink 5.2s infinite; }
@keyframes adv-blink { 0%, 90% { opacity: 0 } 91.5%, 94% { opacity: 1 } 95.5%, 100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .adv-photo .adv-blink { animation: none } }
.op-head .adv-photo { width: 40px; height: 40px; }
.eye-tool { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.eye-stage { position: relative; width: 320px; max-width: 100%; cursor: crosshair; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.eye-stage img { display: block; width: 100%; height: auto; }
.eye-dot { position: absolute; transform: translate(-50%, -50%); border: 2px solid #22c55e; border-radius: 50%; box-shadow: 0 0 0 1px #fff; pointer-events: none; }
.eye-dot[hidden] { display: none; }
.eye-side { flex: 1; min-width: 200px; }
.eye-side input[type=range] { width: 100%; }
.consent { background: #fffdf7; border: 1px dashed var(--gold); border-radius: 8px; padding: 8px 10px; }
.add-member { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.add-member select { padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; max-width: 220px; }
.adv-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.adv-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); }
.adv-chip small, .member-item small, .op-who small { display: block; font-size: .74rem; color: var(--muted); }
.adv-chip.off { opacity: .5; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.adv-card.off { opacity: .6; }
.adv-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.adv-head h2 { margin: 0; }
.meeting-list { list-style: none; margin: 0; padding: 0; }
.meeting-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.member-pick { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.member-item input { width: auto; }
.doc-filter { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; margin-bottom: 8px; }
.doc-picker details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.doc-picker summary { cursor: pointer; }
.doc-list { max-height: 320px; overflow-y: auto; padding: 4px 0 4px 6px; }
.doc-item { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; padding: 3px 0; cursor: pointer; }
.doc-item input { width: auto; margin-top: 3px; }
.doc-item.child { padding-left: 22px; color: var(--muted); }
.room-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.room .mt { margin-top: 14px; }
.material-text { max-height: 420px; overflow-y: auto; margin-top: 8px; }
.room-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin: 6px 0 12px; background: #fffdf7; border: 1px solid var(--gold); border-radius: 12px; }
.room-bar [hidden], .room [hidden] { display: none !important; }
.chair-pick { display: inline-flex; gap: 6px; align-items: center; }
.chair-pick select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.round-title { font-size: 1.1rem; color: var(--navy); margin: 18px 0 8px; }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.op-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; box-shadow: 0 2px 10px rgba(21,37,61,.05); }
.op-card.speaking { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(122,31,46,.35); }
.op-head { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.op-who { flex: 1; min-width: 0; }
.op-body { padding: 8px 0; flex: 1; font-size: .92rem; line-height: 1.6; }
.op-text p { margin: 0 0 4px; }
.op-text h4 { margin: 8px 0 4px; font-size: .95rem; color: var(--navy); }
.op-text ul { margin: 2px 0 6px 18px; padding: 0; }
.op-text .gap { height: 6px; }
.op-text .cite { font-size: .78rem; font-weight: 700; color: var(--bronze); }
.op-foot { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; border-top: 1px dashed var(--line); padding-top: 6px; }
.op-src { width: 100%; }
.op-src pre { white-space: pre-wrap; margin: 4px 0 0; font-family: inherit; color: var(--muted); }
.ai-label { font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #eef1f7; color: var(--navy-2); }
.thinking { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .88rem; }
@media (max-width: 900px) { .room-top { grid-template-columns: 1fr; } .op-grid { grid-template-columns: 1fr; } }
@media print { .room-bar, .js-ask, .op-src summary { display: none !important; } .op-card { break-inside: avoid; box-shadow: none; } .op-grid { grid-template-columns: 1fr; } }

/* NĐ/TT hiện ngay dưới luật cha trong danh sách */
.law-table tr.child-row td { background: #fbfaf6; font-size: .86rem; border-top: 0; }
.law-table tr.child-row td.sticky-col { padding-left: 22px; }
.child-mark { color: var(--bronze); font-weight: 700; margin-right: 2px; }
.links-table td { vertical-align: top; }
.links-table .quote { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.link-card { border-left: 4px solid #e2b500; background: #fffbe6; }
.art-preview-list { max-height: 320px; overflow-y: auto; margin-top: 6px; }

@media print {
    .sidebar, .mainbar, .side-backdrop, .footer, .no-print { display: none !important; }
    .main { margin-left: 0; }
    body { background: #fff; }
    .card { border: 0; padding: 0; break-inside: auto; }
    .section-card.is-key { border-left: 0; background: #fff; }
}

@media (max-width: 900px) {
    .hero-inner, .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .features { grid-template-columns: minmax(0, 1fr); margin-top: -40px; }
    .info-grid { grid-template-columns: 1fr 1fr; }
    .hero { padding: 36px 0 60px; }
    .hero h1 { font-size: clamp(1.45rem, 6.5vw, 1.9rem); }
    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .stat { padding: 10px 12px; font-size: .78rem; line-height: 1.3; }
    .stat span { font-size: 1.5rem; }
    .page-title { font-size: 1.5rem; }
    /* Menu trái thành ngăn kéo, mở bằng nút ☰ */
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
    .nav-toggle:checked ~ .sidebar { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.35); }
    .nav-toggle:checked ~ .side-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(21,37,61,.45); }
    .main { margin-left: 0; }
    .nav-burger { display: grid; }
    .mainbar { padding: 10px 16px; min-height: 64px; gap: 12px; }
    .mainbar-title strong { font-size: 1.1rem; }
    .mainbar-tag { display: none; }
    .row-2, .field-grid, .field-grid.three { grid-template-columns: 1fr; }
    .art-row { flex-wrap: wrap; }
    .art-actions { max-width: none; justify-content: flex-start; }
    .paper { padding: 24px; }
}

@media (max-width: 480px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .page { padding: 24px 16px 40px; }
    .card { padding: 16px; }
    .hero-search button { padding: 10px 14px; }
    .searchbar input { min-width: 0; flex: 1 1 100%; }
    .searchbar select { flex: 1 1 auto; min-width: 0; }
    .searchbar button { flex: none; }

    /* Bảng -> dạng thẻ trên điện thoại */
    .table-wrap:has(.table-stack) { background: transparent; border: 0; overflow: visible; }
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
    .table-stack td { padding: 0; border: 0 !important; width: auto; font-size: .88rem; }
    .table-stack tr:hover td { background: transparent; }
    .table-stack .cell-code { order: -2; width: 100%; font-size: .78rem; font-weight: 700; color: var(--bronze); letter-spacing: .5px; }
    .table-stack .cell-title { order: -1; width: 100%; font-size: 1rem; line-height: 1.4; margin-bottom: 4px; }
    .table-stack .cell-title a { font-weight: 600; }
    .table-stack td[data-label="Ban hành"]::before, .table-stack td[data-label="Hiệu lực"]::before { content: attr(data-label) ": "; color: var(--muted); }
    .info-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .toolbar { width: 100%; }
    .topic-add .narrow-field { width: 100%; }
    .topic-table th:nth-child(2), .topic-table td:nth-child(2) { display: none; }
    .paper { padding: 18px 14px; font-size: 15px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .mainbar-actions .btn-outline { display: none; }
    .mainbar-actions .btn { padding: 8px 12px; font-size: .88rem; }
    .mainbar-title small { display: none; }
    .trinh { width: 44px; height: 44px; }
}

/* Phòng họp: người chủ trì, cảnh báo dẫn ngoài phân vùng */
.chair-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--gold-grad); color: #fff; vertical-align: middle; }
.op-card.is-chair { box-shadow: 0 0 0 1px #7a1f2e inset; }
.cite-warn { margin: 0 0 6px; padding: 6px 10px; border-left: 3px solid #5c1622; background: rgba(236,197,203, .15); color: #8a5a1c; }

/* Phòng họp: danh sách cuộc họp, trạng thái */
.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.status-tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(122,31,46, .45); text-decoration: none; font-size: .88rem; color: inherit; }
.status-tabs a span { opacity: .7; margin-left: 4px; }
.status-tabs a.on { background: var(--gold-grad); color: #fff; border-color: transparent; font-weight: 600; }
.status.live { background: rgba(46, 160, 67, .14); color: #2e8b47; }
.meeting-table td { vertical-align: top; }
.meeting-table .col-meeting { min-width: 260px; max-width: 420px; }
.meeting-table .step { display: inline-block; margin: 0 6px 3px 0; opacity: .55; }
.meeting-table .step.done { opacity: 1; font-weight: 600; }
.meeting-table tr.row-ended td { opacity: .85; }
.room.ended .js-ask { display: none; }

/* Quản lý vụ việc (trang giữ chỗ) */
.matter-kinds { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.matter-kinds li { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(122,31,46, .25); }
.matter-kinds li.on { border-color: #7a1f2e; background: rgba(236,197,203, .08); }

/* Vụ việc: danh sách, chi tiết, workflow */
.progress { height: 4px; background: rgba(127, 127, 127, .2); border-radius: 4px; margin-top: 5px; overflow: hidden; max-width: 140px; }
.progress span { display: block; height: 100%; background: var(--gold-grad); }
.due { font-weight: 600; }
.due.soon { color: #b7791f; }
.due.over { color: #c0392b; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.kv dt { opacity: .7; }
.kv dd { margin: 0; }
.stepper { list-style: none; margin: 14px 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: none; }
.stepper li { flex: 1 1 130px; }
.stepper a { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(122,31,46, .3); text-decoration: none; color: inherit; height: 100%; }
.stepper .n { font-weight: 700; font-size: .8rem; opacity: .7; }
.stepper .t { font-size: .85rem; font-weight: 600; line-height: 1.25; }
.stepper .c { font-size: .72rem; opacity: .65; }
.stepper li.past a { opacity: .7; }
.stepper li.now a { background: var(--gold-grad); color: #fff; border-color: transparent; }
.stepper li.opt a { border-style: dashed; }
.deadlines, .events, .steps { list-style: none; margin: 0; padding: 0; }
.deadlines li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(127, 127, 127, .15); }
.deadlines .dl-date { min-width: 96px; display: flex; flex-direction: column; }
.deadlines li.over .dl-date { color: #c0392b; }
.deadlines li.soon .dl-date { color: #b7791f; }
.deadlines li.done { opacity: .5; }
.deadlines .who { display: inline-block; font-size: .7rem; padding: 1px 7px; border-radius: 8px; margin-right: 6px; }
.deadlines .who.me { background: rgba(192, 57, 43, .12); color: #c0392b; }
.deadlines .who.court { background: rgba(127, 127, 127, .15); }
.events li { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed rgba(127, 127, 127, .15); }
.events li span:nth-child(2) { flex: 1; }
.inline { display: inline; }
.link-btn { background: none; border: 0; color: inherit; opacity: .5; cursor: pointer; padding: 0 4px; }
.link-btn:hover { opacity: 1; color: #c0392b; }
.stage-card.now { box-shadow: 0 0 0 1px #7a1f2e inset; }
.stage-card.past { opacity: .85; }
.steps .step { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(127, 127, 127, .12); }
.steps .step select { width: auto; min-width: 104px; padding: 3px 6px; font-size: .82rem; }
.steps .st-title { flex: 1 1 280px; }
.steps .step.xong .st-title { text-decoration: line-through; opacity: .65; }
.steps .step.bo-qua .st-title { opacity: .45; }
.steps .step.dang .st-title { font-weight: 600; }
.add-step { display: flex; gap: 8px; margin-top: 8px; }
.add-step input { flex: 1; }
.conflict-hits { list-style: none; padding: 0; margin: 6px 0; }
.conflict-hits li { padding: 6px 10px; border-left: 3px solid rgba(127, 127, 127, .4); margin-bottom: 6px; }
.conflict-hits li.risk { border-left-color: #c0392b; background: rgba(192, 57, 43, .06); }
.print-only { display: none; }
@media print { .print-only { display: inline; } }

/* Vụ việc: chuyển kiểu xem + bảng workflow tổng hợp */
.view-switch { display: inline-flex; border: 1px solid rgba(122,31,46, .5); border-radius: 999px; overflow: hidden; margin-right: 6px; }
.view-switch a { padding: 7px 14px; font-size: .86rem; text-decoration: none; color: inherit; }
.view-switch a.on { background: var(--gold-grad); color: #fff; font-weight: 600; }
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.board-col { flex: 0 0 236px; background: rgba(127, 127, 127, .07); border-radius: 12px; padding: 8px; min-height: 120px; border: 1px solid transparent; transition: border-color .15s, background .15s; }
.board-col.opt { border-style: dashed; border-color: rgba(127, 127, 127, .25); }
.board-col.over { border-color: #7a1f2e; background: rgba(236,197,203, .14); }
.board-col header { display: flex; align-items: center; gap: 6px; padding: 2px 4px 8px; font-size: .86rem; }
.board-col header strong { flex: 1; line-height: 1.25; }
.board-col .count { font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: rgba(127, 127, 127, .18); }
.board-col .count.over { background: rgba(192, 57, 43, .14); color: #c0392b; }
.board-cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.board-card { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: 10px; background: var(--card, #fff); border: 1px solid rgba(127, 127, 127, .2); text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.board-card[draggable=true] { cursor: grab; }
.board-card:hover { border-color: #7a1f2e; }
.board-card.dragging { opacity: .45; }
.board-card.closed { opacity: .6; }
.board-card .bc-code { font-size: .74rem; font-weight: 700; opacity: .75; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.board-card .bc-code .status { font-size: .66rem; padding: 0 7px; }
.board-card strong { font-size: .88rem; line-height: 1.3; }
.board-card .bc-due { font-size: .8rem; }
.board-card .progress { max-width: none; }
.board-empty { text-align: center; padding: 10px 0; }
@media (max-width: 760px) { .board-col { flex-basis: 78vw; } }

/* Vụ việc: tài liệu chứng minh sự kiện */
.events .ev-body { flex: 1; }
.ev-files { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 2px; }
.ev-file { display: flex; gap: 6px; align-items: baseline; font-size: .86rem; }
.ev-file a { text-decoration: none; }
.ev-add { display: block; margin-top: 2px; }
.add-file { font-size: .8rem; opacity: .75; cursor: pointer; }
.add-file:hover { opacity: 1; color: #b7791f; }

/* Vụ việc: văn bản đương sự cần có (cửa sổ Thời hạn) */
.reminder { margin: 6px 0; }
.dl-docs { font-size: .8rem; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.dl-doc { padding: 1px 8px; border-radius: 8px; background: rgba(192, 57, 43, .08); }
.dl-doc em { font-style: normal; opacity: .7; }
.dl-doc.co, .dl-doc.khong-can { background: rgba(46, 160, 67, .12); text-decoration: none; }
.docs-head { font-size: .95rem; margin: 16px 0 4px; }
.docs-head.warn { color: #c0392b; }
.docs { list-style: none; margin: 0; padding: 0; }
.docs .doc { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(127, 127, 127, .12); }
.docs .doc select { width: auto; min-width: 104px; padding: 3px 6px; font-size: .82rem; }
.docs .doc-title { flex: 1 1 240px; }
.docs .doc > .tiny { flex-basis: 100%; padding-left: 114px; }
.docs .doc.co .doc-title { text-decoration: line-through; opacity: .65; }
.docs .doc.khong-can .doc-title { opacity: .45; }
.docs .req { font-size: .66rem; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: rgba(192, 57, 43, .12); color: #c0392b; vertical-align: middle; }
@media (max-width: 760px) { .docs .doc > .tiny { padding-left: 0; } }
.docs .doc-files { flex-basis: 100%; padding-left: 114px; display: flex; flex-direction: column; gap: 2px; }
.docs .doc-files:empty { display: none; }
.docs .doc .add-file { padding-left: 114px; flex-basis: 100%; }
.docs .doc.busy { opacity: .6; }
.docs .doc.co .doc-files a { text-decoration: none; }
@media (max-width: 760px) { .docs .doc-files, .docs .doc .add-file { padding-left: 0; } }
.add-file.disabled, .add-file.disabled:hover { opacity: .3; cursor: not-allowed; color: inherit; }

/* Vụ việc: nút chuyển tiến trình dưới thanh tiến trình */
.stage-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 16px; padding: 10px 12px; border-radius: 10px; background: rgba(236,197,203, .1); border: 1px solid rgba(122,31,46, .3); }
.stage-nav .stage-now { flex: 1 1 260px; }
.stage-nav .stage-jump select { width: auto; padding: 5px 8px; font-size: .84rem; }

/* Lịch làm việc */
.side-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #c0392b; color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 18px; }
.appt-box { margin: 6px 0 12px; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(122,31,46, .6); background: rgba(236,197,203, .06); }
.appt-fields { margin-top: 8px; }
.ev-appt { display: block; font-size: .85rem; margin-top: 2px; color: #8a5a1c; }

.agenda-day.today { box-shadow: 0 0 0 2px #7a1f2e inset; }
.agenda-day.past { opacity: .6; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(127, 127, 127, .15); }
.agenda li.remind { background: rgba(236,197,203, .12); }
.agenda .ag-time { min-width: 64px; font-weight: 700; font-size: 1.05rem; }
.agenda .ag-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.agenda .ag-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
@media (max-width: 700px) { .agenda li { flex-wrap: wrap; } .agenda .ag-act { width: 100%; } }

/* Lịch làm việc: lưới tuần, lưới tháng */
.cal-bar { align-items: center; }
.cal-legend { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cal-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; }
.dot.k-dan-su { background: #b8975a; } .dot.k-hinh-su { background: #c0392b; } .dot.k-hanh-chinh { background: #2e7d6b; } .dot.k-ngoai-to-tung { background: #3d5fa8; } .dot.remind { background: #e3cfa5; border: 1px solid #b7791f; }
.cal-chip { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px 4px 8px; margin-bottom: 4px; border-radius: 6px; font-size: .78rem; line-height: 1.25;
    text-decoration: none; color: inherit; background: rgba(122,31,46, .14); border-left: 3px solid #7a1f2e; overflow: hidden; }
.cal-chip.k-hinh-su { background: rgba(192, 57, 43, .09); border-left-color: #c0392b; }
.cal-chip.k-hanh-chinh { background: rgba(46, 125, 107, .09); border-left-color: #2e7d6b; }
.cal-chip.remind { box-shadow: 0 0 0 1px #b7791f inset; }
.cal-chip:hover { filter: brightness(.95); }
.cal-chip .t { font-weight: 700; }
.cal-chip .x, .cal-chip .p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip .p { opacity: .75; font-size: .72rem; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 6px; overflow-x: auto; }
.cal-col { border: 1px solid rgba(127, 127, 127, .2); border-radius: 10px; min-height: 260px; display: flex; flex-direction: column; background: var(--card, #fff); }
.cal-col.weekend { background: rgba(127, 127, 127, .05); }
.cal-col.today { border-color: #7a1f2e; box-shadow: 0 0 0 1px #7a1f2e inset; }
.cal-col.past { opacity: .65; }
.cal-head { padding: 6px 8px; border-bottom: 1px solid rgba(127, 127, 127, .15); font-size: .82rem; display: flex; justify-content: space-between; }
.cal-col.today .cal-head { background: var(--gold-grad); color: #fff; border-radius: 9px 9px 0 0; }
.cal-body { padding: 6px; flex: 1; }
.cal-empty { display: block; text-align: center; margin-top: 20px; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid rgba(127, 127, 127, .2); border-radius: 10px; overflow: hidden; }
.cal-dow { padding: 6px; font-size: .78rem; font-weight: 600; text-align: center; background: rgba(127, 127, 127, .08); }
.cal-cell { min-height: 108px; padding: 4px; border-top: 1px solid rgba(127, 127, 127, .15); border-left: 1px solid rgba(127, 127, 127, .15); background: var(--card, #fff); min-width: 0; }
.cal-cell:nth-child(7n+1) { border-left: 0; }
.cal-cell.weekend { background: rgba(127, 127, 127, .04); }
.cal-cell.other { opacity: .45; }
.cal-cell.past .cal-chip { opacity: .7; }
.cal-num { display: inline-block; min-width: 24px; padding: 1px 6px; margin-bottom: 3px; border-radius: 12px; font-size: .8rem; font-weight: 600; text-decoration: none; color: inherit; }
.cal-cell.today .cal-num { background: var(--gold-grad); color: #fff; }
.cal-more { display: block; font-size: .72rem; text-decoration: none; opacity: .8; }
@media (max-width: 760px) {
    .cal-month .cal-chip .x { display: none; }
    .cal-cell { min-height: 72px; }
    .cal-legend { margin-left: 0; }
}

/* Lịch: tên vụ việc nổi bật */
.cal-chip .t em { font-style: normal; font-weight: 500; opacity: .8; margin-left: 4px; }
.cal-chip .m { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; font-size: .8rem;
    margin: 2px 0 1px; padding: 2px 5px; border-radius: 4px; background: #fff3cd; color: #5c3d00; line-height: 1.25; }
.cal-chip.k-hinh-su .m { background: #fde2df; color: #7b1d12; }
.cal-chip.k-hanh-chinh .m { background: #dcf1ec; color: #1d5246; }
.cal-chip .c { font-size: .7rem; font-weight: 600; opacity: .75; }
.cal-month .cal-chip .m { font-size: .74rem; -webkit-line-clamp: 2; }
.ag-matter { display: inline-block; align-self: flex-start; font-weight: 700; font-size: .98rem; text-decoration: none; padding: 3px 10px; border-radius: 6px;
    background: #fff3cd; color: #5c3d00; border-left: 4px solid #7a1f2e; }
.ag-matter.k-hinh-su { background: #fde2df; color: #7b1d12; border-left-color: #c0392b; }
.ag-matter.k-hanh-chinh { background: #dcf1ec; color: #1d5246; border-left-color: #2e7d6b; }
.ag-matter .code { font-size: .75rem; font-weight: 600; opacity: .75; margin-right: 4px; }
@media (max-width: 760px) { .cal-month .cal-chip .t em, .cal-month .cal-chip .c { display: none; } }
.cal-chip.k-ngoai-to-tung { background: rgba(61, 95, 168, .09); border-left-color: #3d5fa8; }
.cal-chip.k-ngoai-to-tung .m { background: #e1e8f7; color: #22386b; }
.ag-matter.k-ngoai-to-tung { background: #e1e8f7; color: #22386b; border-left-color: #3d5fa8; }
/* Việc cần làm của công ty trên Lịch làm việc (14/11/2026): tím, kỳ sau dự kiến thì nhạt */
.cal-chip.k-viec { background: rgba(108, 76, 160, .09); border-left-color: #6c4ca0; }
.cal-chip.k-viec .m { background: #ece4f7; color: #3e2a63; }
.cal-chip.k-viec.projected { opacity: .6; border-left-style: dashed; }
.ag-matter.k-viec { background: #ece4f7; color: #3e2a63; border-left-color: #6c4ca0; }

/* Trang Việc cần làm */
.obl-top { display: flex; flex-direction: column; gap: 8px; }
.obl-top .status { margin-right: 6px; }
.obl-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.obl-filter button { border: 1px solid var(--line, #d9dee7); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: .85rem; cursor: pointer; }
.obl-filter button.on { background: var(--navy, #1f3557); color: #fff; border-color: var(--navy, #1f3557); }
.obl { border-left: 4px solid #c9d2e0; margin-bottom: 10px; }
.obl.obl-qua-han { border-left-color: #c0392b; }
.obl.obl-sap-den { border-left-color: #b7791f; }
.obl.obl-sap-toi { border-left-color: #2e7d6b; }
.obl.obl-xong, .obl.obl-tat { opacity: .75; }
.obl.obl-hl { box-shadow: 0 0 0 3px #ecc5cb; }
.obl-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 6px; }
.obl-head h3 { margin: 4px 0 2px; font-size: 1.05rem; }
.obl-due { text-align: right; white-space: nowrap; }
.obl-due strong { font-size: 1.05rem; }
.obl-grp { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #eef1f6; color: #33415c; }
.obl-grp.g-luat-su { background: #fff3cd; color: #5c3d00; }
.obl-grp.g-thue { background: #e1e8f7; color: #22386b; }
.obl-grp.g-rua-tien { background: #fde2df; color: #7b1d12; }
.obl-f { display: grid; grid-template-columns: 170px 1fr; gap: 8px; font-size: .9rem; padding: 3px 0; }
.obl-l { color: #5b6577; font-weight: 600; }
.obl-v { white-space: pre-line; }
.obl-log { display: block; }
.obl-more { margin-top: 6px; }
.obl-more > summary, .obl-editbox > summary { cursor: pointer; font-size: .88rem; color: var(--navy-2, #2a4568); }
.obl-editbox { margin: 8px 0; }
.obl-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.obl-done { display: flex; gap: 6px; margin-top: 8px; }
.obl-done input { flex: 1; min-width: 0; }
.obl-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.obl-edit label { display: flex; flex-direction: column; font-size: .85rem; gap: 3px; }
.obl-edit .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .obl-f { grid-template-columns: 1fr; gap: 0; } .obl-head { flex-direction: column; } .obl-due { text-align: left; } }

/* Workflow giãn theo chiều rộng màn hình máy tính: mọi tiến trình hiện đủ trên một hàng, không phải cuộn ngang */
@media (min-width: 1024px) {
    .board { overflow-x: visible; }
    .board-col { flex: 1 1 0; min-width: 0; }
    .board-card strong.clamp-2 { -webkit-line-clamp: 3; }
    .stepper { flex-wrap: nowrap; }
    .stepper li { flex: 1 1 0; min-width: 0; }
    .stepper .t { overflow-wrap: anywhere; }
    /* tiêu đề cột: chữ chạy liền, số đếm theo sau (không chiếm một cột riêng làm chữ rớt từng từ) */
    .board-col { padding: 7px 6px; }
    .board-col header { display: block; padding: 2px 3px 8px; line-height: 1.3; }
    .board-col header strong { display: inline; }
    .board-col header .count { display: inline-block; margin-left: 4px; vertical-align: 1px; }
    .board-card { padding: 8px 8px; }
    .filter-bar .grow { flex: 1 1 260px; }
    .filter-bar select { max-width: 320px; }
}

/* Lịch làm việc kiểu Tuần / Tháng: thu gọn phần trên, lịch chiếm trọn màn hình */
.cal-page.compact { padding-top: 10px; padding-bottom: 12px; }
.cal-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.cal-toolbar .cal-title { font-size: 1.25rem; margin: 0 6px 0 0; color: var(--navy); white-space: nowrap; cursor: help; }
.cal-toolbar .cal-title span { color: var(--muted); font-weight: 500; }
.cal-toolbar .cal-nav { display: inline-flex; gap: 4px; }
.cal-toolbar select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .88rem; background: #fff; }
.cal-toolbar .cal-legend { margin-left: auto; gap: 2px; }
.cal-toolbar .cal-legend .dot { margin-left: 6px; margin-right: 2px; }
.cal-remind { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); white-space: nowrap; }
.cal-page.compact .cal-month { grid-template-rows: auto; }
.cal-page.compact .cal-month.fit .cal-cell { min-height: 0; overflow: hidden; }
.cal-page.compact .cal-month .cal-chip { padding: 2px 5px 2px 7px; margin-bottom: 3px; }
.cal-page.compact .cal-month .cal-chip .m { -webkit-line-clamp: 1; }
.cal-page.compact .cal-dow { padding: 4px; }
.cal-page.compact .cal-col { min-height: 0; }
.cal-page.compact .cal-week.fit .cal-col { overflow-y: auto; }
.cal-toolbar .btn-outline.btn-sm { padding: 4px 10px; min-height: 0; line-height: 1.3; font-size: .85rem; }
.cal-toolbar .view-switch a { padding: 4px 11px; font-size: .85rem; }
.cal-page.compact .cal-month .cal-chip .t, .cal-page.compact .cal-month .cal-chip .m { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1500px) { .cal-toolbar .cal-legend .lg { display: none; } .cal-toolbar .cal-legend .dot { margin-left: 3px; } }
.cal-page.compact .cal-month.fit .cal-chip .c { display: none; }

/* Câu nói hôm nay – góc phải thanh trên cùng, cùng dòng với trợ lý (mỗi ngày một câu, vòng 31 câu) */
.mainbar-quote { margin: 0 0 0 auto; max-width: min(520px, 42%); padding: 6px 0 6px 14px; border-left: 3px solid var(--gold); text-align: left; cursor: help; flex: 0 1 auto; min-width: 0; }
.mainbar-quote figcaption { font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; color: var(--bronze); font-weight: 700; }
.mainbar-quote blockquote { margin: 2px 0 1px; font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Lora", Georgia, serif; font-style: italic; font-size: .92rem; line-height: 1.35; color: var(--navy);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mainbar-quote cite { display: block; font-style: normal; font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .mainbar-quote { display: none; } }
@media print { .mainbar-quote { display: none; } }

/* Văn bản tố tụng – danh mục */
.doc-cat h3 { margin: 0 0 6px; font-size: 1rem; }
.doc-cat-list { list-style: none; margin: 0; padding: 0; }
.doc-cat-list li { padding: 8px 0; border-bottom: 1px solid rgba(127, 127, 127, .14); }
.doc-cat-list li:last-child { border-bottom: 0; }
.doc-cat-list .dc-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doc-cat-list .dc-head .status { font-size: .7rem; padding: 0 8px; text-decoration: none; }
.doc-cat-list .dc-tip { margin-top: 3px; color: var(--navy-2); }
@media (min-width: 1280px) { .doc-cat-list { columns: 2; column-gap: 28px; } .doc-cat-list li { break-inside: avoid; } }

/* Menu trái dạng cụm: chỉ cụm đang thao tác mở, các cụm khác thu gọn (bấm tên cụm để mở) */
.sidebar .side-group { margin-top: 6px; }
.sidebar .side-group.open { margin-bottom: 6px; }
.sidebar .side-label { display: flex; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .7rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #8794ad; cursor: pointer; text-align: left; }
.sidebar .side-label:hover, .sidebar .side-label:focus-visible { background: rgba(255,255,255,.06); color: #d9dfec; outline: none; }
.sidebar .side-label::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; opacity: .8; }
.sidebar .side-group.open > .side-label { color: var(--gold-light); }
.sidebar .side-group.open > .side-label::after { transform: rotate(45deg); }
.sidebar .side-group:not(.open) > .side-link { display: none; }
/* đầu mục tiến trình: dải navy chữ vàng, có số thứ tự – tách hẳn khỏi tên văn bản */
.doc-cat { padding-top: 0; overflow: hidden; }
.doc-cat h3.dc-stage { display: flex; align-items: center; gap: 10px; margin: 0 -22px 10px; padding: 11px 22px; background: var(--navy); color: var(--gold-light);
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Lora", Georgia, serif; font-size: 1.08rem; letter-spacing: .2px; border-bottom: 3px solid var(--gold); }
.doc-cat h3.dc-stage .dc-no { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-grad); color: #fff;
    font-family: "Be Vietnam Pro", sans-serif; font-size: .85rem; font-weight: 800; }
.doc-cat h3.dc-stage .dc-count { margin-left: auto; font-family: "Be Vietnam Pro", sans-serif; font-size: .74rem; font-weight: 600; color: #c9d2e3; }
/* số thứ tự văn bản trong tiến trình: 1.1, 1.2, … */
.doc-cat-list .dc-num { flex: none; min-width: 34px; padding: 1px 7px; border-radius: 6px; background: rgba(122,31,46, .18); color: #8a5a17; font-size: .78rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.doc-cat-list li > .muted, .doc-cat-list li > .dc-tip { padding-left: 42px; }
.doc-cat h3.dc-stage .dc-no { width: auto; min-width: 28px; padding: 0 6px; border-radius: 14px; }
.doc-cat-list .dc-head { flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
.doc-cat-list .dc-head .dc-num { margin-top: 1px; }
.doc-cat-list .dc-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }

/* Thông tin công ty – bảng luật sư nhập trực tiếp */
.company-lawyers td { padding: 4px; vertical-align: middle; }
.company-lawyers input, .company-lawyers select { width: 100%; min-width: 92px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .86rem; background: #fff; }
.company-lawyers td:nth-child(2) input { min-width: 170px; }
.company-lawyers .ln-no { color: var(--muted); font-weight: 700; text-align: center; }.note-ok { background: rgba(46, 125, 107, .1); color: #1d5246; border-radius: 10px; padding: 10px 12px; margin: 6px 0 12px; }

/* Biểu mẫu – xem trước file Word */
.form-view-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 12px; }
.dx-paper { background: #fff; color: #111; max-width: 820px; margin: 0 auto 30px; padding: 48px 56px; box-shadow: 0 2px 14px rgba(0, 0, 0, .12); border-radius: 4px;
    font-family: "Times New Roman", Times, serif; font-size: 15px; line-height: 1.45; overflow-x: auto; }
.dx-paper.landscape { max-width: 1160px; }
/* chú thích cuối trang trong bản xem trước (mẫu nhà nước) */
.dx-paper .dx-notes { margin-top: 26px; padding-top: 8px; border-top: 1px solid #111; width: 100%; font-size: 10.5pt; line-height: 1.45; }
.dx-paper .dx-notes p { margin: 0 0 4px; }
.dx-paper sup { font-size: .68em; line-height: 0; }
/* cửa sổ xem nhanh biểu mẫu */
.fp-dialog { width: min(1000px, calc(100vw - 24px)); }
.fp-dialog .sec-dialog-body { background: #eef1f5; }
.fp-head { margin: 0 auto 10px; max-width: 820px; }
.fp-actions { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.fp-paper { padding: 32px 40px; margin-bottom: 0; }
@media (max-width: 640px) { .fp-paper { padding: 18px 14px; font-size: 11pt; } }
a.fp-btn { cursor: pointer; }
.dx-paper p { margin: 0 0 4px; }
.dx-t { border-collapse: collapse; width: 100%; margin: 6px 0 10px; }
.dx-t td { border: 1px solid #999; padding: 4px 6px; vertical-align: top; }
.dx-t td p { margin: 0; }
.dx-t td.dx-merged { border-top: 0; }
.dx-paper > .dx-t:first-child td, .dx-paper .dx-t.no-border td { border: 0; }
/* mẫu đã chuẩn hoá NĐ 30: cỡ chữ theo pt, đường kẻ dưới tiêu ngữ, tab dẫn chấm cuối dòng */
.dx-paper { font-size: 13pt; }
.dx-paper p.dx-rule { height: 0; margin: 0 0 6px; border-top: 1px solid #111; }
.dx-paper p.dx-fill { display: flex; align-items: baseline; }
/* Vụ việc – link mẫu của công ty cạnh tên văn bản */
.doc-tpl { margin-left: 8px; font-size: .74rem; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(122,31,46, .6); text-decoration: none; color: inherit; white-space: nowrap; }
.doc-tpl:hover { background: rgba(236,197,203, .25); }
/* Biểu mẫu – chọn khách hàng, hồ sơ để điền */
.fc-search { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0 12px; }
.fc-search input { flex: 1 1 280px; max-width: 520px; padding: 8px 12px; border: 1px solid rgba(0, 0, 0, .18); border-radius: 8px; font: inherit; }
.fc-list { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.fc-client { border: 1px solid rgba(122,31,46, .45); border-radius: 10px; padding: 6px 12px 8px; margin: 0; }
.fc-client legend { padding: 0 6px; }
.fc-matter { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-radius: 6px; cursor: pointer; }
.fc-matter:hover { background: rgba(236,197,203, .18); }
.fc-matter input { margin-top: 4px; }
.fc-matter > span { display: flex; flex-direction: column; }
.fc-actions { margin-top: 14px; }
.dx-paper .dx-bullet { display: inline-block; width: 24px; margin-left: 24px; }
.dx-paper p.dx-fill > .dx-lead { flex: 1 1 24px; min-width: 24px; border-bottom: 1px dotted #555; margin-left: 2px; }
@media (max-width: 700px) { .dx-paper { padding: 20px 16px; font-size: 12pt; } }
/* danh sách mẫu trong trang Biểu mẫu công ty */
.form-links { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.form-links a { font-size: .78rem; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(122,31,46, .55); text-decoration: none; color: inherit; white-space: nowrap; }
.form-links a:hover { background: rgba(236,197,203, .25); }
.form-links a.dl { background: var(--gold-grad); color: #fff; border-color: transparent; font-weight: 600; }
.tpls-sub { margin: 14px 0 4px; font-size: .95rem; color: var(--navy); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.doc-cat-list .form-links { padding-left: 42px; }

/* Biểu mẫu – sửa mẫu, phiên bản */
.form-edit { margin: 8px 0 14px; padding: 10px 14px; }
.form-edit > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.fe-steps { margin: 10px 0 8px 18px; padding: 0; }
.fe-steps li { margin: 4px 0; }
.fe-steps code { font-size: .85em; background: rgba(0, 0, 0, .05); padding: 0 4px; border-radius: 4px; }
.fe-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.fe-upload input[type=text] { flex: 1 1 260px; padding: 7px 10px; border: 1px solid rgba(0, 0, 0, .18); border-radius: 8px; font: inherit; }
.fe-hist { width: 100%; border-collapse: collapse; font-size: .9rem; }
.fe-hist th, .fe-hist td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(0, 0, 0, .08); vertical-align: top; }
.fe-hist tr.on td { background: rgba(236,197,203, .18); }
form.inline { display: inline; }
.fe-act { background: none; border: 0; padding: 0 0 0 10px; font: inherit; color: #b07a22; cursor: pointer; text-decoration: underline; }
@media (max-width: 700px) { .fe-hist th:nth-child(3), .fe-hist td:nth-child(3) { display: none; } }

/* Biểu mẫu – sửa nhanh trên phần mềm */
.fe-quick { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 10px 0 4px; }
.qe-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0; }
.qe-tools input[type=search] { flex: 1 1 260px; max-width: 480px; padding: 7px 10px; border: 1px solid rgba(0, 0, 0, .18); border-radius: 8px; font: inherit; }
.qe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qe-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; align-items: start; padding: 6px 8px; border: 1px solid rgba(0, 0, 0, .08); border-radius: 8px; background: #fff; }
.qe-row.dirty { border-color: #7a1f2e; background: rgba(236,197,203, .14); }
.qe-row.del { opacity: .45; }
.qe-row.del textarea { text-decoration: line-through; }
.qe-meta { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; font-size: .75rem; }
.qe-no { font-weight: 600; min-width: 26px; color: #5c1622; }
.qe-text { width: 100%; resize: vertical; min-height: 34px; padding: 6px 8px; border: 1px solid rgba(0, 0, 0, .14); border-radius: 6px; font-family: "Times New Roman", Times, serif; font-size: 13pt; line-height: 1.35; overflow: hidden; color: #111; background: #fff; }
.qe-text.b { font-weight: 700; }
.qe-text.c { text-align: center; }
.qe-text.r { text-align: right; }
.qe-act { display: flex; gap: 4px; }
.qe-act button { border: 1px solid rgba(122,31,46, .6); background: #fff; border-radius: 999px; padding: 2px 9px; font-size: .78rem; cursor: pointer; color: #333; }
.qe-act .qe-del:hover { border-color: #c0392b; color: #c0392b; }
.qe-save { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; margin-top: 10px; background: var(--bg, #f4f4f2); border-top: 1px solid rgba(0, 0, 0, .1); }
.qe-save input[type=text] { flex: 1 1 260px; padding: 7px 10px; border: 1px solid rgba(0, 0, 0, .18); border-radius: 8px; font: inherit; }
@media (max-width: 700px) { .qe-row { grid-template-columns: 1fr; } }

/* Yêu cầu PCCC theo loại cơ sở (Matters/YeuCauPccc) – 20/10/2026 */
.pc-req th { width: 30%; text-align: left; vertical-align: top; font-weight: 600; color: var(--muted, #5b6573); }
.pc-req td { vertical-align: top; }
.pc-req tr.pc-hi th, .pc-req tr.pc-hi td { background: rgba(122,31,46, .10); }
@media (max-width: 700px) { .pc-req th, .pc-req td { display: block; width: auto; } .pc-req th { padding-bottom: 0; border-bottom: 0; } }
/* Tra cứu trách nhiệm PCCC (Matters/TraCuuPccc) – 20/10/2026 */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.pc-checks { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 4px 0 12px; }
.pc-summary { font-size: 1.05rem; font-weight: 600; }
.pc-h { margin: 18px 0 6px; }
.pc-res td { vertical-align: top; }
.pc-res tr.pc-off { opacity: .6; }
.status.pc-yes { background: rgba(192, 57, 43, .12); color: #c0392b; }
.status.pc-no { background: rgba(39, 174, 96, .12); color: #1e8449; }
.status.pc-unk { background: rgba(122,31,46, .2); color: #8a5a12; }.pc-search { position: relative; margin-bottom: 6px; }
.pc-hits { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: var(--card, #fff); border: 1px solid var(--line, #d7dbe0); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 320px; overflow: auto; }
.pc-hit { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
button.pc-hit:hover, button.pc-hit:focus { background: rgba(122,31,46, .18); outline: none; }
/* Căn cứ bấm được (CitationLinker) – 20/10/2026 */
a.cite-art { border-bottom: 1px dashed currentColor; text-decoration: none; cursor: pointer; }
a.cite-law { text-decoration: none; border-bottom: 1px dotted currentColor; }
.note-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.note-card.change { border-left: 4px solid #9a3412; }
.note-card.guide { border-left: 4px solid #1e3a8a; }
.note-card.related { border-left: 4px solid #6b7280; }
/* Tiếp nhận hồ sơ Thủ tục PCCC từ tra cứu – 20/10/2026 */
.pc-intake .pc-file { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0 14px; }
.pc-file-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.pc-file-row select { width: auto; }
.pc-forms li { margin: 4px 0; }
/* ===== Tra cứu trách nhiệm PCCC – giao diện làm lại 20/10/2026 (pcx-) ===== */
.pcx .pcx-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; margin-bottom: 18px; overflow: hidden; }
.pcx .pcx-form.is-collapsed { display: none; }
.pcx-step { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.pcx-step-h { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); font-size: 1.02rem; margin-bottom: 12px; flex-wrap: wrap; }
.pcx-n { width: 28px; height: 28px; border-radius: 50%; background: var(--gold-grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; flex: none; }
.pcx-step-note { font-weight: 400; font-size: .8rem; color: var(--muted); }
.pcx-search { position: relative; }
.pcx-search input[type=search] { width: 100%; font-size: 1.05rem; padding: 13px 14px 13px 42px; border: 2px solid var(--gold); border-radius: 10px; background: #fffdf8; }
.pcx-search input[type=search]:focus { outline: none; box-shadow: 0 0 0 4px rgba(122,31,46, .22); }
.pcx-search-ico { position: absolute; left: 14px; top: 13px; font-size: 1rem; opacity: .65; pointer-events: none; }
.pcx-or { margin-top: 8px; }
.pcx-or select { width: 100%; color: var(--muted); }
.pcx-chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--gold-soft); border: 1px solid rgba(122,31,46, .55); }
.pcx-chosen-name { font-weight: 700; color: var(--navy); }
.pcx-chosen-name::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .3em; vertical-align: -.15em; background-color: currentColor; -webkit-mask: var(--ti-check) center / contain no-repeat; mask: var(--ti-check) center / contain no-repeat; color: var(--ok); }
.pcx-chosen-x { border: 1px solid var(--gold); background: #fff; border-radius: 8px; padding: 5px 12px; cursor: pointer; font-weight: 600; color: var(--navy); }
.pcx-chosen-x:hover { background: var(--gold-grad); }
.pcx-name { margin-top: 14px; max-width: 520px; }
.pcx-f label { display: block; font-size: .84rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.pcx-f label .muted { font-weight: 400; }
.pcx-f input[type=text], .pcx-f select { width: 100%; }
.pcx-hint { font-size: .76rem; color: var(--muted); margin-top: 4px; }
.pcx-unit { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.pcx-unit:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(122,31,46, .2); }
.pcx-unit input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; padding: 9px 10px; font-size: 1rem; background: transparent; }
.pcx-unit input:focus { outline: none; }
.pcx-unit span { display: flex; align-items: center; padding: 0 11px; background: #f6f7f9; color: var(--muted); font-size: .85rem; border-left: 1px solid var(--line); white-space: nowrap; }
.pcx-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.pcx-seg label { cursor: pointer; }
.pcx-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pcx-seg span { display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .92rem; transition: background .15s, border-color .15s; }
.pcx-seg label:hover span { border-color: var(--gold); }
.pcx-seg input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.pcx-seg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(122,31,46, .35); }
.pcx-group + .pcx-group { margin-top: 16px; }
.pcx-group-t { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.pcx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; }
.pcx-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pcx-tg { cursor: pointer; }
.pcx-tg input { position: absolute; opacity: 0; pointer-events: none; }
.pcx-tg span { display: inline-block; padding: 7px 13px; border-radius: 8px; border: 1px dashed var(--line); font-size: .86rem; background: #fff; }
.pcx-tg span::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .3em; vertical-align: -.15em; background-color: currentColor; -webkit-mask: var(--ti-plus) center / contain no-repeat; mask: var(--ti-plus) center / contain no-repeat; color: var(--muted); }
.pcx-tg input:checked + span { border-style: solid; border-color: var(--gold); background: var(--gold-soft); font-weight: 600; }
.pcx-tg input:checked + span::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .3em; vertical-align: -.15em; background-color: currentColor; -webkit-mask: var(--ti-check) center / contain no-repeat; mask: var(--ti-check) center / contain no-repeat; color: var(--ok); }
.pcx-tg small { font-weight: 400; color: var(--muted); }
.pcx-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; background: #fafbfc; position: sticky; bottom: 0; }
.pcx-go { font-size: 1.02rem; padding: 11px 26px; }
.pcx-reset { font-size: .86rem; color: var(--muted); }
.pcx-recap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
/* kết quả */
.pcx-hero { border-top: 4px solid var(--navy); }
.pcx-hero-k { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.pcx-summary { font-size: 1.08rem; font-weight: 600; color: var(--navy); margin: 4px 0 16px; line-height: 1.5; }
.pcx-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.pcx-tile { border-radius: 10px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
.pcx-tile-t { font-size: .78rem; color: var(--muted); font-weight: 600; }
.pcx-tile-v { font-size: 1.35rem; font-weight: 800; margin: 2px 0; }
.pcx-tile-s { font-size: .72rem; color: var(--muted); }
.pcx-tile.yes { background: var(--fail-bg); border-color: #f3c3bd; } .pcx-tile.yes .pcx-tile-v { color: var(--fail); }
.pcx-tile.no { background: var(--ok-bg); border-color: #bfe3cc; } .pcx-tile.no .pcx-tile-v { color: var(--ok); }
.pcx-tile.unk { background: var(--warn-bg); border-color: #f2d7a6; } .pcx-tile.unk .pcx-tile-v { color: var(--warn); }
.pcx-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.pcx-cta .pcx-hint { flex-basis: 100%; }
.pcx-sec h2 { display: flex; align-items: center; gap: 8px; font-size: 1.08rem; }
.pcx-count { background: var(--navy); color: #fff; border-radius: 999px; font-size: .74rem; padding: 1px 9px; }
.pcx-item { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.pcx-sec h2 + .pcx-item { border-top: 0; }
.pcx-item.is-unk { background: linear-gradient(90deg, rgba(253, 240, 217, .6), transparent 60%); }
.pcx-item.is-off { opacity: .65; }
.pcx-item-t { font-weight: 700; color: var(--text); }
.pcx-item-d { font-size: .9rem; margin-top: 3px; line-height: 1.55; }
.pcx-item-m { font-size: .86rem; margin-top: 5px; }
.pcx-k { display: inline-block; font-size: .74rem; font-weight: 700; color: var(--muted); margin-right: 4px; }
.pcx-basis { color: var(--muted); }
.pcx-proc { font-size: .78rem; font-weight: 600; margin-left: 6px; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--gold); text-decoration: none; white-space: nowrap; }
.pcx-b { display: inline-block; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pcx-b.yes { background: var(--fail-bg); color: var(--fail); }
.pcx-b.no { background: var(--ok-bg); color: var(--ok); }
.pcx-b.unk { background: var(--warn-bg); color: var(--warn); }
.pcx-b.note { background: #eef1f6; color: var(--navy); }
.pcx-off { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.pcx-off summary { cursor: pointer; font-size: .84rem; color: var(--muted); }
@media (max-width: 760px) {
    .pcx-step { padding: 16px; }
    .pcx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pcx-item { grid-template-columns: 1fr; gap: 4px; }
    .pcx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pcx-actions { padding: 12px 16px; }
}
@media print { .pcx-tiles { grid-template-columns: repeat(4, 1fr); } .pcx-off { display: none; } }
/* 4 chế độ file mẫu: Xem · Tải mẫu · Tải mẫu điền sẵn · Sửa nhanh (20/10/2026) */
.form-modes { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.form-modes .fm-off { opacity: .45; cursor: not-allowed; }
.pc-forms .form-modes { margin: 2px 0 6px; }

/* Hồ sơ Thủ tục PCCC: đoạn tra cứu trong "Yêu cầu của khách hàng", nội dung bước PCCC – 20/10/2026 */
.pccc-req { line-height: 1.55; }
.pccc-req .pr-sum { margin-bottom: 4px; }
.pccc-req .pr-h { font-weight: 700; margin: 10px 0 4px; color: #5c1622; }
.pccc-req .pr-h-no { color: #6b7c90; }
.pccc-req .pr-li { margin: 3px 0; padding: 3px 0 3px 10px; border-left: 3px solid rgba(122,31,46, .55); }
.pccc-req .pr-li b { font-weight: 600; }
.pccc-req .pr-li.pr-no { border-left-color: rgba(107, 124, 144, .45); }
.pccc-req .pr-miss { margin-top: 8px; color: #b3541e; }
.pccc-req .pr-gap { height: 6px; }
.pccc-req mark.pr-th, .pccc-note mark.pr-th { background: rgba(122,31,46, .22); color: inherit; padding: 0 3px; border-radius: 3px; }
.pccc-req .pn-k, .pccc-note .pn-k { font-weight: 600; color: #5c1622; }
.st-note { margin: 4px 0 2px; }
.st-note > summary { cursor: pointer; font-size: .82em; color: #5c1622; }
.pccc-note { margin: 4px 0 2px; padding: 6px 10px; border-left: 3px solid rgba(122,31,46, .55); background: rgba(122,31,46, .07); border-radius: 0 6px 6px 0; line-height: 1.5; }
.pccc-note .pr-basis { margin-top: 4px; font-size: .92em; opacity: .8; }
.pccc-note .pr-where { margin-bottom: 3px; }
.pccc-note .pr-sep { border: 0; border-top: 1px dashed rgba(127, 127, 127, .4); margin: 6px 0; }

/* Thư tư vấn PCCC kèm báo giá (Matters/ThuTuVanPccc) – 21/10/2026 */
.ttv-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; margin-bottom: 10px; background: inherit; border-bottom: 1px solid rgba(127, 127, 127, .25); }
.ttv-bar .ttv-chk { font-size: .88em; display: inline-flex; gap: 6px; align-items: center; }
.ttv-bar .ttv-back { margin-left: auto; font-size: .9em; }
.ttv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.ttv-edit fieldset { border: 1px solid rgba(122,31,46, .35); border-radius: 8px; padding: 10px 12px 12px; margin: 0 0 12px; }
.ttv-edit legend { font-weight: 700; color: #5c1622; padding: 0 6px; }
.ttv-edit textarea, .ttv-edit input[type=text] { width: 100%; box-sizing: border-box; }
.ttv-edit textarea { line-height: 1.5; }
.ttv-hint { font-size: .82em; opacity: .75; margin: 0 0 6px; }
.ttv-row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.ttv-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ttv-quote-wrap { overflow-x: auto; }
.ttv-quote { width: 100%; border-collapse: collapse; font-size: .9em; }
.ttv-quote th { text-align: left; font-weight: 600; padding: 4px; border-bottom: 1px solid rgba(127, 127, 127, .35); white-space: nowrap; }
.ttv-quote td { padding: 3px 4px; vertical-align: top; border-bottom: 1px dashed rgba(127, 127, 127, .2); }
.ttv-quote td .q-name { min-width: 220px; }
.ttv-quote td .q-unit { width: 56px; } .ttv-quote td .q-qty { width: 46px; } .ttv-quote td .q-price { width: 110px; text-align: right; }
.ttv-quote .r { text-align: right; white-space: nowrap; }
.ttv-view { position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; }
.ttv-view-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin-bottom: 6px; }
.ttv-paper { padding: 36px 40px; font-size: 12pt; }
@media (max-width: 1000px) { .ttv-grid { grid-template-columns: 1fr; } .ttv-view { position: static; max-height: none; } .ttv-row3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ttv-row3, .ttv-row2 { grid-template-columns: 1fr; } .ttv-paper { padding: 18px 14px; } }

/* Phòng họp – Chủ đề phổ biến (MeetingRoom/Topics) – 21/10/2026 */
.mtopics .mt-index { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; font-size: .92em; }
.mt-topic { scroll-margin-top: 70px; }
.mt-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid rgba(122,31,46, .3); padding-bottom: 8px; margin-bottom: 10px; }
.mt-head h2 { margin: 0 0 4px; }
.mt-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mt-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.mt-sec h3 { margin: 0 0 6px; font-size: 1em; color: #5c1622; }
.mt-docs { margin: 0 0 8px; padding-left: 18px; font-size: .92em; }
.mt-docs li { margin: 2px 0; }
.mt-notes, .mt-script { white-space: pre-line; font-size: .9em; line-height: 1.55; }
.mt-script { white-space: normal; }
.mt-script > div { margin: 2px 0; }
.mt-script .mt-step { font-weight: 600; margin-top: 8px; }
.mt-script .mt-q { padding: 3px 8px; margin: 3px 0 3px 10px; border-left: 3px solid rgba(122,31,46, .55); background: rgba(122,31,46, .08); border-radius: 0 6px 6px 0; }
.mt-choose .mt-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 900px) { .mt-grid { grid-template-columns: 1fr; } }

/* Phòng họp – sơ đồ của cuộc họp (Meetings.Diagram) – 21/10/2026 */
.meeting-diagram-card { grid-column: 1 / -1; }
.meeting-diagram { overflow-x: auto; background: #fff; border-radius: 8px; padding: 6px; }
.meeting-diagram svg { display: block; width: 100%; height: auto; min-width: 760px; }
@media print { .meeting-diagram svg { min-width: 0; } }

/* icon trong nút (Phòng họp: Chủ đề phổ biến, Tổ tư vấn) */
.btn-ico{vertical-align:-3px;margin-right:4px;flex:none}

/* Của tôi › Tài khoản điện tử */
.acc-search input{min-width:200px}
.acc-group{margin:22px 0 10px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.acc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px}
.acc-card{margin:0;display:flex;flex-direction:column;gap:8px}
.acc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.acc-head h3{margin:0;font-size:1.02rem}
.acc-row{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.acc-k{min-width:112px;color:#5f5e5a;font-size:.86rem}
.acc-pw{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap}
.acc-pw-val{font-family:Consolas,monospace;word-break:break-all}
.acc-pw-ask input{width:150px}
.acc-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.acc-guide summary{cursor:pointer;font-weight:600}
.acc-guide ol{margin:6px 0 0 18px;padding:0}
.acc-notes{margin:0;white-space:pre-line}
@media (max-width:600px){.acc-grid{grid-template-columns:1fr}.acc-k{min-width:0;width:100%}}

/* nội dung tư vấn nhiều dòng (vd Mua bảo hiểm cháy, nổ): dòng tiêu đề + hạng mục con */
.pccc-note .pr-row { margin: 3px 0; }
.pccc-note .pr-sub { padding-left: 16px; margin: 1px 0; }

/* Của tôi › Việc riêng */
.task-add .grow { flex: 1 1 260px; }
.task-group { margin: 20px 0 8px; font-size: 1.05rem; }
.task-group.task-late { color: #a32d2d; }
.task-group.task-today { color: #5c1622; }
.task-list { padding: 4px 14px; }
.task-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #ece9e1; }
.task-row:last-child { border-bottom: 0; }
.task-row.pri-cao { box-shadow: inset 3px 0 0 #a32d2d; padding-left: 8px; }
.task-check, .task-act { margin: 0; }
.task-box { width: 22px; height: 22px; border: 2px solid #5c1622; border-radius: 5px; background: #fff; cursor: pointer; padding: 0; line-height: 18px; color: #fff; font-weight: 700; }
.task-box:hover { background: #fdf3df; }
.task-box.checked { background: #0f6e56; border-color: #0f6e56; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 600; color: inherit; text-decoration: none; word-break: break-word; }
.task-title:hover { text-decoration: underline; }
.task-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .82rem; margin-top: 2px; }
.task-tag { padding: 0 6px; border-radius: 8px; font-weight: 600; }
.tag-high { background: #fcebeb; color: #a32d2d; }
.tag-doing { background: #e8f6f0; color: #0f6e56; }
.task-late { color: #a32d2d; font-weight: 600; }
.task-row.is-done .task-title { text-decoration: line-through; color: #8a877f; font-weight: 400; }
.task-done summary { cursor: pointer; font-weight: 600; margin: 18px 0 8px; }

.acc-import { margin: 10px 0 4px; }
.acc-import summary { cursor: pointer; font-weight: 600; }


.task-pin { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-left: 4px solid #5c1622; }


/* Phòng họp – nút mở phiên Claude riêng của cuộc họp (25/10/2026): nổi bật màu xanh lá để dễ nhận biết */
.claude-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 10px; padding: 12px 14px; border: 2px solid #2fb36b; border-radius: 12px; background: linear-gradient(90deg, rgba(47,179,107,.16), rgba(47,179,107,.04)); }
.btn-claude { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 18px; border-radius: 10px; background: linear-gradient(135deg, #34c77a, #1f8f52); color: #fff !important; font-weight: 700; text-decoration: none; box-shadow: 0 0 0 3px rgba(52,199,122,.35), 0 4px 14px rgba(31,143,82,.35); }
.btn-claude:hover { filter: brightness(1.08); }
.meeting-intro { margin: 4px 0 8px; padding: 2px 0 2px 10px; border-left: 4px solid #7a1f2e; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #9a5d1c; }
.btn-claude small { font-weight: 500; font-size: .78rem; opacity: .95; }
.claude-link-edit { margin: 0 0 10px; }
.claude-link-edit .form { max-width: 640px; }
/* ===== Cổng tư vấn khách hàng (Modules/ClientPortal, /ancu) – giao diện riêng, không menu ===== */
.portal-body { margin: 0; min-height: 100vh; background: #f4f1ea; color: #1d2733; font-family: 'Be Vietnam Pro', system-ui, sans-serif; display: flex; flex-direction: column; }
.portal-head { background: #15253d; border-bottom: 3px solid #7a1f2e; }
.portal-head-in { max-width: 980px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.portal-mark { height: 42px; width: auto; }
.portal-brand { display: flex; flex-direction: column; color: #ecc5cb; }
.portal-brand .wordmark { font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Lora", Georgia, serif; font-weight: 700; letter-spacing: .08em; background: var(--accent-text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.15rem; }
.portal-brand small { color: #c9d3de; font-size: .75rem; }
.portal-main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 18px 16px 28px; box-sizing: border-box; }
.portal-title { font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Lora", Georgia, serif; color: #1f3557; font-size: 1.55rem; margin: 4px 0 2px; }
.portal-card { background: #fff; border-radius: 12px; padding: 16px 18px; margin: 12px 0; box-shadow: 0 1px 3px rgba(21,37,61,.08), 0 6px 18px rgba(21,37,61,.05); }
.portal-card.narrow { max-width: 520px; }
.portal-card h2 { font-size: 1.15rem; color: #1f3557; margin: 0 0 8px; }
.portal-card h3 { font-size: .98rem; color: #2a4568; margin: 14px 0 6px; }
.portal-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.portal-foot { text-align: center; padding: 14px 16px 20px; }
.portal-table td, .portal-table th { vertical-align: top; }
/* Form cổng tư vấn: 2 cột trên máy tính, 1 cột trên điện thoại (27/10/2026) */
.portal-card.narrow { margin-left: auto; margin-right: auto; }
/* trang có thẻ hẹp (nhập mật khẩu, xin truy cập, chờ duyệt…): logo, tiêu đề, dòng giới thiệu căn giữa theo thẻ */
.portal-body:has(.portal-card.narrow) .portal-head-in { justify-content: center; }
.portal-main:has(> .portal-card.narrow) .portal-title { text-align: center; }
.portal-main:has(> .portal-card.narrow) .meeting-intro { text-align: center; border-left: 0; padding: 4px 0 8px; margin-bottom: 14px; position: relative; }
.portal-main:has(> .portal-card.narrow) .meeting-intro::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 64px; height: 3px; margin-left: -32px; border-radius: 2px; background: var(--gold-grad); }
.portal-card h2 { font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Lora", Georgia, serif; }
.pform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.pform-grid .span2 { grid-column: 1 / -1; }
.pform .field { margin-bottom: 12px; }
.pform label { color: #2a4568; }
.pform input:not([type=file]), .pform textarea { border-color: #d8dde3; background: #fbfcfd; }
.pform input:focus, .pform textarea:focus { background: #fff; }
.pdrop { border: 1.5px dashed #7a1f2e; border-radius: 10px; padding: 10px 12px; background: #fffdf8; }
.pdrop label { margin-bottom: 0; }
.pdrop .hint { display: block; font-size: .78rem; color: #7a8592; margin: 1px 0 6px; }
.pform .pdrop input[type=file] { border: 0; padding: 4px 0 0; background: transparent; font-size: .85rem; color: #5a6672; }
.pform input[type=file]::file-selector-button { border: 0; border-radius: 6px; background: #1f3557; color: #ecc5cb; padding: 7px 12px; margin-right: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.pdrop-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: .8rem; color: #2a4568; }
.pdrop-list li { padding: 2px 0; border-top: 1px dotted #ecd2d7; overflow-wrap: anywhere; }
.pdrop-list li::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .3em; vertical-align: -.15em; background-color: currentColor; -webkit-mask: var(--ti-check) center / contain no-repeat; mask: var(--ti-check) center / contain no-repeat; color: #2fb36b; font-weight: 700; }
.pform-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 4px; }
.pform-foot p { margin: 0; flex: 1; }
.pform-foot .btn, .pform-foot .btn-outline { flex: none; min-width: 170px; }
.pform-wide { width: 100%; }
/* Hồ sơ kèm theo chia mục theo cổng (vd An Cư) – 03/11/2026 */
.pdossier { border: 1px solid #ecd2d7; border-radius: 12px; padding: 10px 12px 12px; margin: 0 0 12px; background: #fffaf0; min-width: 0; }
.pdossier legend { padding: 0 6px; font-weight: 600; color: #2a4568; }
.pdossier legend .small { font-weight: 400; }
.pdossier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pdossier-grid .pdrop { background: #fff; }
.phint { display: block; font-size: .82rem; color: #5a6672; background: #f4f7fa; border-left: 3px solid #7a1f2e; border-radius: 6px; padding: 6px 10px; margin: 2px 0 6px; }
.phint ol { margin: 4px 0 0; padding-left: 1.4em; }
.phint li { margin: 1px 0; }
/* Cổng tư vấn – phản hồi luật sư, chờ bổ sung, danh sách yêu cầu (03/11/2026) */
.pstatus.pstatus-cho-bo-sung { background: #fde2e1; color: #a1261f; }
.pfeedback { border: 1.5px solid #7a1f2e; border-left-width: 4px; border-radius: 10px; background: #fffaf0; padding: 10px 12px; margin: 12px 0; }
.pfeedback.done { background: #fbfbf8; border-color: #e3d6b8; }
.pfeedback.late.open { border-color: #d9534f; background: #fff6f5; }
.pfeedback-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; color: #1f3557; }
.pfeedback .prose { margin: 4px 0; }
.pneeds { margin: 2px 0 6px; padding-left: 0; list-style: none; font-size: .9rem; }
.pneeds li { padding: 2px 0; }
.pneeds .ti { color: #5c1622; }
.pdue { display: inline-block; font-size: .8rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #fdf0d9; color: #8a4b0f; white-space: nowrap; }
.pdue.late { background: #fde2e1; color: #a1261f; }
.pdue.ok { background: #d9f2e3; color: #17663a; }
.pwait-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 10px 0; border-radius: 10px; background: #fff4dc; border: 1px solid #cdb27e; color: #6b3a07; text-decoration: none; }
.pwait-banner.late { background: #fde8e6; border-color: #e7a19c; color: #8f1f19; }
.pwait-banner > .ti { font-size: 1.3rem; }
.pwait-banner .pwait-go { margin-left: auto; font-weight: 600; white-space: nowrap; }
.need-card { border: 1.5px solid #cdb27e; }
.pdrop.need { border-color: #d9534f; background: #fff6f5; }
.pneed-tag { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 700; color: #fff; background: #d9534f; border-radius: 999px; padding: 1px 7px; vertical-align: 1px; }
.pclose summary { cursor: pointer; font-weight: 600; color: #2a4568; }
.pclose[open] summary { margin-bottom: 8px; }
.ptabs { display: flex; gap: 6px; margin: 12px 0 0; border-bottom: 2px solid #ebdfe1; }
.ptabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px 10px 0 0; color: #2a4568; text-decoration: none; font-weight: 600; margin-bottom: -2px; border: 2px solid transparent; }
.ptabs a.on { background: #fff; border-color: #ebdfe1; border-bottom-color: #fff; color: #1f3557; }
.ptab-count { font-size: .75rem; background: #e8edf3; border-radius: 999px; padding: 0 7px; }
.ptabs + .portal-card { margin-top: 0; border-top-left-radius: 0; }
.pcounters { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.pcounter { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid #e3e8ee; background: #f8fafc; cursor: pointer; font: inherit; color: #2a4568; text-align: left; }
.pcounter .pc-n { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.pcounter .pc-l { font-size: .8rem; }
.pcounter.on { border-color: #5c1622; background: #fffaf0; box-shadow: 0 0 0 2px rgba(122,31,46,.25); }
.pcounter-cho-bo-sung .pc-n { color: #a1261f; }
.pfilters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.pfilters input[type=search] { flex: 1 1 220px; }
.pfilters select { flex: 0 1 200px; }
.pf-date { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: #5a6672; margin: 0; }
.plist-table { font-size: .86rem; }
.plist-table th, .plist-table td { padding: 9px 8px; }
.plist-table .pstatus, .plist-table .pdue { white-space: nowrap; }
.plist-table td:nth-child(4) { min-width: 160px; }
.plist-table .pchk { width: 28px; padding-right: 0; }
.plist-table tr.picked td { background: #eef4fb; }
.pbulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 6px 10px; margin-bottom: 8px; border-radius: 8px; background: #f8fafc; border: 1px solid #e3e8ee; }
.pbulk.active { background: #eef4fb; border-color: #b9cfe8; }
.pbulk-all { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .88rem; font-weight: 600; cursor: pointer; }
.pbulk-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pbulk .btn-danger { background: #c0392b; color: #fff; border: 1px solid #c0392b; }
.pbulk button:disabled { opacity: .45; cursor: default; }
.pcounter-trash { border-style: dashed; }
.pcounter-trash .pc-l .ti { vertical-align: -.1em; }
.plist-table tr.row-wait td { background: #fffaf0; }
.plist-table tr.row-late td { background: #fff4f3; }
.punseen { display: inline-block; margin-left: 4px; font-size: .7rem; font-weight: 700; color: #fff; background: #d9534f; border-radius: 999px; padding: 0 6px; }
.fb-needs { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.fb-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 14px; }
.flabel { display: block; font-weight: 600; margin-bottom: 4px; }
.portal-user { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
    .portal-head-in { padding: 10px 14px; }
    .portal-mark { height: 34px; }
    .portal-main { padding: 12px 12px 22px; }
    .portal-title { font-size: 1.22rem; line-height: 1.3; }
    .portal-body .meeting-intro { font-size: .8rem; }
    .portal-card { padding: 14px 14px; margin: 10px 0; border-radius: 10px; }
    .pform-grid { grid-template-columns: minmax(0, 1fr); }
    .pform-foot { flex-direction: column; align-items: stretch; }
    .pform-foot .btn, .pform-foot .btn-outline { width: 100%; min-width: 0; padding-top: 12px; padding-bottom: 12px; }
    .pform input:not([type=file]), .pform textarea { font-size: 16px; }
    .portal-foot { font-size: .72rem; }
}
.req { color: #b4232c; }
.pstatus { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #e8edf3; color: #2a4568; margin-right: 4px; text-decoration: none; }
.pstatus-moi { background: #fde8c8; color: #8a4b0f; }
.pstatus-dang-xu-ly { background: #dde9fb; color: #1d4f91; }
.pstatus-da-tra-loi { background: #d9f2e3; color: #17663a; }
.pstatus-da-dong { background: #ececec; color: #555; }
.pdev { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .8rem; font-weight: 600; }
.pdev-cho-duyet { background: #fde8c8; color: #8a4b0f; }
.pdev-duoc-phep { background: #d9f2e3; color: #17663a; }
.pdev-tu-choi, .pdev-khoa { background: #f8d7da; color: #8b1e27; }
.pfiles { list-style: none; padding: 0; margin: 4px 0; }
.pfiles li { padding: 4px 0; border-bottom: 1px dashed #e3e6ea; word-break: break-word; }
.pnote { border-left: 3px solid #7a1f2e; padding: 4px 0 4px 10px; margin: 10px 0; }
.answer-card { border-top: 3px solid #2fb36b; }
.portal-pending { border: 2px solid #c9a96e; background: #fffaf0; }
.pdev-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #f3e1e4; }
.pw-once { background: #fffaf0; border: 2px dashed #7a1f2e; border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.pw-once code { font-size: 1.3rem; font-weight: 700; letter-spacing: .06em; margin-right: 8px; }
.portal-room-card { border: 2px solid #7a1f2e; }
.prc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.prc-head h2 { margin: 0; }
.prc-list { margin: 6px 0 0; padding-left: 18px; }
.plog-sai-mat-khau td, .plog-bi-chan td, .plog-email-loi td { color: #8b1e27; }

/* ===== Soạn văn bản trả lời theo mẫu (cổng tư vấn) ===== */
.prc-templates { border-top: 1px solid #ecd2d7; margin-top: 12px; padding-top: 10px; }
.prc-templates h3 { margin: 0 0 6px; font-size: 1rem; }
.ptpl-more { margin: 6px 0; }
.ptpl-more > summary { cursor: pointer; color: #9a5d1c; }
.issue-row { border: 1px solid #ecd2d7; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fffdf8; }
.issue-row .issue-del { margin-top: 4px; }
.rd-doc { background: #fff; color: #111; border: 1px solid #ddd; box-shadow: 0 2px 10px rgba(0,0,0,.08); border-radius: 4px; padding: 36px 48px; max-width: 820px;
    font-family: "Times New Roman", Times, serif; font-size: 15px; line-height: 1.45; }
.rd-doc .rd-p { margin: 0 0 6px; white-space: pre-wrap; }
.rd-doc .rd-c { text-align: center; }
.rd-doc .rd-r { text-align: right; }
.rd-doc .rd-j { text-align: justify; }
.rd-doc .rd-ind { text-indent: 2.2em; }
.rd-doc .rd-li { padding-left: 1.6em; position: relative; }
.rd-doc .rd-li::before { content: "–"; position: absolute; left: .4em; }
.rd-doc .rd-tbl { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.rd-doc .rd-tbl td { vertical-align: top; padding: 2px 6px; width: 50%; }
.rd-doc mark { background: #ffe58a; padding: 0 2px; }
.rd-edit textarea { width: 100%; font-family: "Times New Roman", Times, serif; font-size: 15px; margin-bottom: 6px; }
.rd-cells { border: 1px dashed #ccc; border-radius: 6px; margin: 0 0 8px; padding: 6px 8px; }
.rd-cells input { width: 100%; margin-bottom: 4px; }
@media (max-width: 640px) { .rd-doc { padding: 16px 14px; font-size: 14px; } .rd-doc .rd-tbl td { display: block; width: auto; } }
.rd-doc .rd-c.rd-li, .rd-doc .rd-r.rd-li { padding-left: 0; } .rd-doc .rd-c.rd-li::before, .rd-doc .rd-r.rd-li::before { content: none; }

/* ===== Điện thoại & máy tính bảng (25/10/2026) – mọi trang xem mượt trên điện thoại =====
   Đi kèm Content/mobile.js: bọc bảng chưa có khung cuộn (.tbl-scroll), gắn lớp m-cards + data-label cho bảng >= 5 cột,
   thêm nút "Lọc theo cột" (.m-filter-btn) cho bảng có hàng lọc. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
select { max-width: 100%; }
.card, .op-card, .portal-card { overflow-wrap: break-word; }
.tbl-scroll { overflow-x: auto; max-width: 100%; }
.tbl-scroll, .h-scroll, .table-wrap, .board, .meeting-diagram, .ttv-quote-wrap, .status-tabs, .stepper { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.m-filter-btn { display: none; }
.adv-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }

@media (max-width: 900px) {
    /* menu ngăn kéo: không rộng quá màn hình, khoá cuộn trang phía sau khi đang mở */
    .sidebar { width: min(var(--side-w), 86vw); }
    body:has(.nav-toggle:checked) { overflow: hidden; }
    .card-head, .form-actions { flex-wrap: wrap; gap: 6px 12px; }
    .pcx-actions { flex-wrap: wrap; }
}

@media (max-width: 760px) {
    .page { padding-top: 20px; }
    .page-title { font-size: 1.35rem; }
    .page-head { gap: 10px; }
    .page-head .toolbar { width: 100%; }

    /* hàng tab trạng thái / lĩnh vực: một hàng cuộn ngang thay vì nhiều hàng chồng nhau */
    .status-tabs, .status-tabs.sub-tabs-3 { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
    .status-tabs::-webkit-scrollbar { display: none; }
    .status-tabs a { flex: none; white-space: nowrap; }

    /* thanh lọc: ô tìm chiếm cả dòng, các ô chọn chia đều */
    .filter-bar > * { max-width: 100%; }
    .filter-bar .grow { flex: 1 1 100%; }
    .filter-bar select { flex: 1 1 140px; min-width: 0; }
    .searchbar input { min-width: 0; flex: 1 1 100%; }

    /* tiến trình vụ việc: dải cuộn ngang */
    .stepper { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
    .stepper li { flex: 0 0 150px; scroll-snap-align: start; }

    .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .kv dt { font-size: .78rem; margin-top: 8px; }
    .kv dd { overflow-wrap: anywhere; }

    /* lịch tuần: các ngày xếp dọc */
    .cal-week { grid-template-columns: minmax(0, 1fr); overflow: visible; }
    .cal-col, .cal-page.compact .cal-col { min-height: 0; }
    .cal-empty { margin: 6px 0; }
    .cal-toolbar .cal-title { white-space: normal; font-size: 1.1rem; }

    /* hộp thoại gần toàn màn hình */
    .sec-dialog, .art-dialog, .fp-dialog { width: calc(100vw - 16px); max-height: 92vh; border-radius: 12px; }
    .sec-dialog-head { padding: 14px 16px 10px; }
    .sec-dialog-body { padding: 14px 16px 20px; max-height: calc(92vh - 70px); }

    /* nút nhỏ dễ bấm bằng ngón tay */
    .btn-sm, .view-btn { padding: 7px 12px; }
    .side-link { padding-top: 10px; padding-bottom: 10px; }

    /* Bảng nhiều cột -> mỗi hàng một thẻ (mobile.js gắn m-cards và nhãn cột) */
    .m-cards-wrap { background: transparent; border: 0; border-radius: 0; overflow: visible; }
    table.m-cards { min-width: 0 !important; width: 100%; table-layout: auto; }
    table.m-cards, table.m-cards > tbody { display: block; }
    table.m-cards > thead { display: none; }
    table.m-cards > tbody > tr { display: flex; flex-wrap: wrap; gap: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(21,37,61,.05); }
    table.m-cards > tbody > tr > td { display: block; flex: 1 1 calc(50% - 14px); min-width: 0; max-width: none; width: auto !important; padding: 0; border: 0 !important; background: transparent !important; position: static; box-shadow: none; text-align: left; font-size: .88rem; overflow-wrap: anywhere; }
    table.m-cards > tbody > tr > td:first-child, table.m-cards > tbody > tr > td.m-full, table.m-cards > tbody > tr > td.col-meeting { flex-basis: 100%; min-width: 0; }
    table.m-cards > tbody > tr > td:has(.clamp, .clamp-2, .kw-cell) { flex-basis: 100%; }
    table.m-cards > tbody > tr > td.col-view { text-align: left; }
    table.m-cards > tbody > tr > td:first-child { font-size: 1rem; }
    table.m-cards > tbody > tr > td.m-empty { display: none; }
    table.m-cards > tbody > tr > td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 1px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
    table.m-cards > tbody > tr > td:first-child::before { display: none; }
    table.m-cards > tbody > tr.child-row { margin-left: 14px; background: #fbfaf6; }
    /* hàng lọc theo cột: mở bằng nút "Lọc theo cột", hiện thành khung 2 cột */
    .m-filter-btn { display: inline-block; margin: 0 0 10px; }
    table.m-cards.show-filters > thead { display: block; margin-bottom: 10px; }
    table.m-cards.show-filters > thead > tr:not(.filter-row) { display: none; }
    table.m-cards.show-filters > thead > tr.filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; padding: 10px 12px; background: #f8eef0; border: 1px solid var(--line); border-radius: var(--radius); }
    table.m-cards.show-filters > thead > tr.filter-row > th { display: block; padding: 0 !important; border: 0 !important; background: transparent !important; position: static; box-shadow: none; }
    table.m-cards tr.filter-row > th[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); }
    table.m-cards tr.filter-row > th:last-child { grid-column: 1 / -1; }
    table.m-cards tr.filter-row > th:last-child::before { display: none; }
}

@media (max-width: 480px) {
    .mainbar { gap: 10px; padding: 8px 12px; min-height: 58px; }
    .mainbar-usage em { display: none; }
    .doc-cat h3.dc-stage { margin: 0 -16px 10px; padding: 10px 16px; }
    .sticky-actions .btn, .sticky-actions .btn-outline { padding: 9px 14px; }
}

/* iPhone/iPad tự phóng to khi chạm vào ô nhập có chữ nhỏ hơn 16px -> giữ ô nhập 16px trên thiết bị iOS */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 900px) {
        input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea { font-size: 16px !important; }
    }
}
.pfile-tools { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-left: 6px; } .issue-quote { background: #fffaf0; border-left: 3px solid #7a1f2e !important; font-style: italic; } .issue-src { font-weight: normal; }
/* Thẻ Cổng tư vấn trên trang cuộc họp: mỗi yêu cầu một dòng */
.prc-rows { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 6px; }
.prc-rows th { text-align: left; font-weight: 600; color: #6b5a3a; border-bottom: 2px solid #ecd2d7; padding: 6px 8px; white-space: nowrap; }
.prc-rows td { border-bottom: 1px solid #f3e4e7; padding: 6px 8px; vertical-align: middle; }
.prc-rows td:nth-child(2) { width: 45%; }
.prc-rows tr.prc-new td { background: #fff7e6; font-weight: 600; }
@media (max-width: 720px) {
  .prc-rows thead { display: none; }
  .prc-rows, .prc-rows tbody, .prc-rows tr, .prc-rows td { display: block; width: auto !important; }
  .prc-rows tr { border: 1px solid #ecd2d7; border-radius: 8px; margin-bottom: 8px; padding: 4px 0; }
  .prc-rows td { border: 0; padding: 3px 10px; }
  .prc-rows td[data-label]::before { content: attr(data-label) ": "; color: #8a7a5a; font-weight: normal; }
}
.diagram-list { list-style: none; margin: 0; padding: 0; } .diagram-list li { padding: 8px 0; border-bottom: 1px solid #f1dfe2; } .diagram-list li:last-child { border-bottom: 0; }
/* Skill làm việc với Claude (Phòng họp) */
.skill-laws { width: 100%; border-collapse: collapse; }
.skill-laws th, .skill-laws td { border-bottom: 1px solid #f1dfe2; padding: 6px; vertical-align: top; text-align: left; }
.skill-laws td:nth-child(3) { width: 42%; }
.skill-laws textarea { width: 100%; }
.skill-found { max-height: 420px; overflow-y: auto; border: 1px solid #f1dfe2; border-radius: 8px; padding: 6px 10px; }
.skill-found .check { display: block; padding: 4px 0; border-bottom: 1px dotted #f1dfe2; }
.skill-preview { white-space: pre-wrap; font-size: .85rem; background: #f8f6f1; padding: 10px; border-radius: 6px; max-height: 600px; overflow: auto; }
.field-row { display: flex; gap: 6px; } .field-row input { flex: 1; }
@media (max-width: 640px) { .skill-laws thead { display: none; } .skill-laws td { display: block; width: auto !important; border: 0; } .skill-laws tr { display: block; border-bottom: 1px solid #f1dfe2; } }
.skill-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 6px 0; } .skill-filters select, .skill-filters input[type=number] { max-width: 260px; } .skill-hit { display: block; margin-left: 24px; color: #2d6a4f; font-size: .85rem; } .skill-topics { display: block; margin-left: 24px; }
/* Skill: danh sách kết quả tìm văn bản – mỗi văn bản một dòng (26/10/2026: bỏ lớp .check vốn là thẻ trạng thái) */
.skill-found { padding: 0; }
.skill-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-bottom: 1px solid #f3e4e7; cursor: pointer; font-weight: 400; margin: 0; }
.skill-row:hover { background: #fffaf0; }
.skill-row input[type=checkbox] { width: 18px !important; height: 18px; flex: none; margin-top: 2px; }
.skill-row-body { flex: 1; min-width: 0; }
.skill-row-title { line-height: 1.35; }
.skill-row-meta { font-size: .8rem; color: #7a6c55; margin-top: 2px; }
.skill-row-hit { font-size: .85rem; color: #2d6a4f; margin-top: 2px; }
.skill-filters { align-items: center; }
.skill-filters select, .skill-filters input[type=number] { width: auto !important; min-width: 180px; padding: 6px 10px; }
.skill-opt { margin: 0; white-space: nowrap; }
.skill-opt input[type=checkbox] { width: 18px !important; height: 18px; }
/* Menu Đối tác (26/10/2026) */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.partner-card { border-top: 4px solid #7a1f2e; display: flex; flex-direction: column; gap: 10px; }
.partner-card h2 { margin: 2px 0 4px; }
.partner-field { display: inline-block; font: 600 .75rem Arial, sans-serif; text-transform: uppercase; letter-spacing: .04em; color: #9a5d1c; background: #fff4dc; border-radius: 10px; padding: 2px 10px; }
.partner-program { font-weight: 600; color: #2a4568; font-size: .9rem; text-transform: uppercase; margin-bottom: 2px; }
.partner-stats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.partner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
@media (max-width: 640px) { .partner-grid { grid-template-columns: 1fr; } }

/* ===== Đối tác: quản lý yêu cầu trợ giúp + giao việc cho AI theo văn bản đã chọn (26/10/2026) ===== */
.req-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 12px; }
.req-search { display: flex; gap: 6px; margin-left: auto; }
.req-search input { min-width: 240px; }
.req-table td { vertical-align: top; }
.req-table tr.req-new td { background: #fff7e6; }
.req-files { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.req-files li { margin: 1px 0; word-break: break-word; }
.ai-files { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.ai-files-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.ai-file { display: flex !important; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; padding: 4px 0; border-top: 1px dashed #eee; font-weight: 500 !important; cursor: pointer; }
.ai-file input { width: auto !important; }
.ai-file-off { opacity: .55; cursor: default; }
.ai-kinds { border: 0; padding: 0; margin: 0 0 8px; }
.ai-kinds legend { font-weight: 600; margin-bottom: 4px; }
.ai-kinds .check-inline { margin: 2px 0; }
.ai-task { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.ai-task summary { cursor: pointer; }
.ai-result { white-space: pre-wrap; background: #fbfaf6; border-left: 3px solid #7a1f2e; padding: 8px 12px; margin-top: 6px; }
@media (max-width: 700px) { .req-search { margin-left: 0; width: 100%; } .req-search input { min-width: 0; flex: 1; } }
/* nút Làm việc với Claude trên trang yêu cầu đối tác (26/10/2026) */
button.btn-claude { border: 0; cursor: pointer; font-family: inherit; font-size: 1rem; text-align: left; }
.claude-go { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 6px; }
#cl-text { width: 100%; font-family: Consolas, monospace; font-size: .82rem; }

/* skill theo tên gọi của đối tác (26/10/2026) */
.skill-tabs, .partner-skills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; }

/* trang một đối tác: 3 tab (26/10/2026) */
.partner-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--line); margin: 4px 0 14px; }
.partner-tabs a { padding: 8px 14px; border-radius: 8px 8px 0 0; text-decoration: none; color: inherit; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.partner-tabs a.on { background: #1f3557; color: #ecc5cb; }
.partner-tabs a:not(.on):hover { background: rgba(122,31,46,.15); }
.partner-tabs .side-badge { position: static; }
a.partner-head { display: block; color: inherit; text-decoration: none; }
div.ai-file a { font-weight: 500; }
.partner-tabs .side-badge { margin-left: 0; }
/* bảng yêu cầu đối tác: nút và trạng thái không xuống dòng */
.req-table .pstatus, .req-table .req-open { white-space: nowrap; display: inline-block; }
/* ⚙ Cài đặt đối tác: một nút, mục lục các phần (26/10/2026) */
.partner-tabs .partner-settings { margin-left: auto; }
.settings-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.settings-toc a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; font-size: .88rem; background: #fff; }
.settings-toc a:hover { border-color: #7a1f2e; }
.settings-group { margin: 18px 0 8px; font-size: 1.15rem; }
details#nhat-ky > summary { cursor: pointer; }
/* người hỏi & email nhận trả lời (27/10/2026) */
.asker-table input[type=text], .asker-table input[type=email] { width: 100%; min-width: 120px; }
.asker-table td { vertical-align: top; }
/* bấm tên người hỏi trong danh sách yêu cầu đối tác (27/10/2026) */
.link-btn { background: none; border: 0; padding: 0; color: #2a4568; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline dotted; text-align: left; }
.asker-dlg { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; width: min(460px, 92vw); }
.asker-dlg::backdrop { background: rgba(21,37,61,.45); }
/* Danh sách yêu cầu: nút gọn "📎 n văn bản" mở cửa sổ xem / tải tệp (LS Duy 02/11/2026) */
.files-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #2a4568; font: 600 .8rem Montserrat, sans-serif; white-space: nowrap; cursor: pointer; }
.files-chip:hover { border-color: #7a1f2e; background: #fff8ea; }
.files-dlg { width: min(620px, 94vw); }
.files-dlg h2 { font-size: 1.05rem; margin: 0 0 10px; }
.files-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow: auto; }
.files-list li { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-top: 1px solid #eef0f3; font-size: .88rem; }
.files-list li:first-child { border-top: 0; }
.files-list .fd-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-list .fd-dl { flex: 0 0 auto; text-decoration: none; }
.text-warn { color: #a85b0b; font-weight: 600; }

/* ===== Nhắc hẹn (Views/Matters/_Reminders.cshtml – trang chi tiết vụ việc + hộp 🔔 ở danh sách vụ việc) ===== */
.rmx { display: flex; flex-direction: column; gap: 12px; }
.rmx-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rmx-count { font-size: .82rem; color: var(--muted); }
.rmx-pill { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.rmx-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #b8bfcc; }
.rmx-pill.on { border-color: rgba(31,122,77,.35); background: var(--ok-bg); color: var(--ok); }
.rmx-pill.on .dot { background: #2e9b5f; box-shadow: 0 0 0 3px rgba(46,155,95,.18); }
.rmx-pill:hover { filter: brightness(.98); }

.rmx-empty { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px dashed var(--gold); border-radius: 12px; background: var(--gold-soft); }
.rmx-empty-ico { font-size: 1.6rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: #fff; flex: none; }

.rmx-item { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--navy-3); border-radius: 12px; background: #fff; }
.rmx-date { flex: none; width: 66px; height: 66px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--navy); color: #fff; }
.rmx-date .d { font-family: "Montserrat", sans-serif; font-size: 1.55rem; font-weight: 800; line-height: 1; background: var(--accent-text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rmx-date .m { font-size: .68rem; margin-top: 4px; opacity: .85; white-space: nowrap; }
.rmx-soon { border-left-color: var(--gold); }
.rmx-soon .rmx-date { background: var(--gold-grad); }
.rmx-soon .rmx-date .d { background: none; color: #fff; }
.rmx-soon .rmx-date .m { color: #fff; }
.rmx-late { border-left-color: var(--fail); }
.rmx-late .rmx-date { background: var(--fail); }
.rmx-late .rmx-date .d { background: none; color: #fff; }
.rmx-off { border-left-color: #c5cad4; background: #fafbfc; }
.rmx-off .rmx-date { background: #e6e9ef; color: var(--muted); }
.rmx-off .rmx-date .d { background: none; color: var(--muted); }
.rmx-off .rmx-title { color: var(--muted); }

.rmx-main { flex: 1; min-width: 0; }
.rmx-title { font-weight: 700; color: var(--navy); line-height: 1.4; }
.rmx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.rmx-tag { font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #eef1f7; color: var(--navy-2); }
.rmx-tag.soft { background: none; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.rmx-soon .rmx-left { background: var(--warn-bg); color: var(--warn); }
.rmx-late .rmx-left { background: var(--fail-bg); color: var(--fail); }
.rmx-later .rmx-left { background: rgba(46,160,67,.12); color: #2e8b47; }
.rmx-tasks { margin: 8px 0 0; padding: 0; list-style: none; font-size: .88rem; }
.rmx-tasks li { position: relative; padding: 2px 0 2px 20px; }
.rmx-tasks li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 9px; height: 9px; border: 1.5px solid var(--gold); border-radius: 3px; }
.rmx-meta { margin-top: 8px; font-size: .78rem; color: var(--muted); word-break: break-word; }
.rmx-err { margin-top: 6px; font-size: .8rem; color: var(--fail); background: var(--fail-bg); padding: 4px 8px; border-radius: 6px; }

.rmx-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.rmx-actions form { margin: 0; }
.rmx-btn { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; line-height: 1.4; list-style: none; user-select: none; }
.rmx-btn::-webkit-details-marker { display: none; }
.rmx-btn:hover { border-color: var(--gold); background: var(--gold-soft); }
.rmx-btn.primary { border: 0; background: var(--gold-grad); color: #fff; }
.rmx-btn.primary:hover { filter: brightness(1.05); }
.rmx-btn.danger { color: var(--fail); }
.rmx-btn.danger:hover { border-color: #f0b4ae; background: var(--fail-bg); }
.rmx-edit[open] { flex-basis: 100%; order: 99; }
.rmx-edit[open] > summary { background: var(--navy); color: #fff; border-color: var(--navy); }

.rmx-add > summary { align-self: flex-start; }
.rmx-add[open] > summary { margin-bottom: 10px; }
.rmx-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8f9fb; }
.rmx-form .wide, .rmx-form .rmx-seg { grid-column: 1 / -1; }
.rmx-f { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.rmx-f > span { font-size: .78rem; font-weight: 600; color: var(--navy-2); }
.rmx-f > span b { font-weight: 600; }
.rmx-f > span em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.rmx-f input, .rmx-f textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .92rem; background: #fff; }
.rmx-f input:focus, .rmx-f textarea:focus { outline: 2px solid rgba(122,31,46,.45); border-color: var(--gold); }
.rmx-check { display: flex; align-items: center; gap: 8px; font-size: .85rem; cursor: pointer; }
.rmx-check input { width: 16px; height: 16px; accent-color: var(--bronze); margin: 0; }
.rmx-form-foot { display: flex; justify-content: flex-end; }
.rmx-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #e9ecf2; gap: 3px; justify-self: start; }
.rmx-seg label { margin: 0; cursor: pointer; }
.rmx-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rmx-seg span { display: block; padding: 6px 14px; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.rmx-seg input:checked + span { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(21,37,61,.15); }
.rmx-seg input:focus-visible + span { outline: 2px solid var(--gold); }

/* hộp 🔔 ở danh sách vụ việc */
.rm-dialog { width: min(720px, calc(100vw - 24px)); }
.rm-dialog .sec-dialog-body { background: #f4f5f7; }
.rm-dialog .sec-dialog-head .muted { font-size: .82rem; }
.rm-open { white-space: nowrap; }
.rm-open.has { border-color: var(--gold); background: var(--gold-soft); }

@media (max-width: 640px) {
    .rmx-item { flex-direction: column; gap: 10px; padding: 12px; }
    .rmx-date { width: auto; height: auto; flex-direction: row; gap: 8px; padding: 6px 12px; justify-content: flex-start; align-self: flex-start; }
    .rmx-date .d { font-size: 1.15rem; }
    .rmx-date .m { margin-top: 0; }
    .rmx-form { grid-template-columns: 1fr; padding: 12px; }
    .rmx-seg { display: flex; }
    .rmx-seg label { flex: 1; }
    .rmx-seg span { text-align: center; padding: 8px 6px; }
    .rmx-f input, .rmx-f textarea { font-size: 16px; }
}
/* Hộp thư yêu cầu (Đối tác › Yêu cầu) + danh sách bài (Nhà báo & Công Luận): ngăn dạng tab, thanh thao tác hàng loạt gắn trên bảng (LS Duy 02/11/2026) */
.inbox-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 6px 0 14px; }
.inbox-tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1 1 auto; min-width: 0; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.inbox-tabs::-webkit-scrollbar { display: none; }
.inbox-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px 11px; color: var(--muted); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0; }
.inbox-tabs a:hover { color: var(--navy); background: #f8f9fb; }
.inbox-tabs a.on { color: var(--navy-deep); border-bottom-color: var(--gold); }
.inbox-tabs .ib-ico { font-size: .85rem; opacity: .75; }
.inbox-tabs .ib-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #eef1f5; color: var(--muted); font-size: .75rem; text-align: center; }
.inbox-tabs a.on .ib-count { background: var(--navy); color: #fff; }
.inbox-tabs .ib-count.hot { background: #5c1622; color: #fff; }
.inbox-tabs a.trash { margin-left: 10px; }
.inbox-search { display: flex; align-items: center; margin: 0 0 6px auto; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 2px 4px 2px 14px; }
.inbox-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(122,31,46,.18); }
.inbox-search input { border: 0; outline: 0; background: transparent; width: 190px; padding: 6px 0; font: inherit; font-size: .9rem; }
.inbox-search button { border: 0; background: transparent; cursor: pointer; padding: 6px 10px; border-radius: 999px; }
.inbox-search button:hover { background: var(--gold-soft); }
.inbox-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 9px 14px; background: #f8f9fb; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.inbox-bar.active { background: #fff8ea; border-color: #ecd3a3; }
.inbox-bar .ib-all { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; color: var(--navy); cursor: pointer; margin: 0; }
.inbox-bar input[type=checkbox], .ib-chk input { width: 17px; height: 17px; accent-color: #5c1622; cursor: pointer; margin: 0; }
.inbox-bar .ib-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.ib-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.ib-btn:hover:not(:disabled) { border-color: var(--gold); background: var(--gold-soft); }
.ib-btn.danger { color: var(--fail); }
.ib-btn.danger:hover:not(:disabled) { border-color: #f0b4ae; background: var(--fail-bg); }
.ib-btn:disabled { opacity: .45; cursor: default; }
.inbox-table { border-radius: 0 0 var(--radius) var(--radius); }
.inbox-table .ib-chk { width: 44px; padding-right: 0; text-align: center; }
.inbox-table tr.picked td { background: #fff3db !important; }
.inbox-table tbody tr:hover td { background: #fafbfc; }
.inbox-empty { padding: 36px 16px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
@media (max-width: 700px) {
    .inbox-tabs { width: 100%; }
    .inbox-tabs a.trash { margin-left: 0; }
    .inbox-search { width: 100%; }
    .inbox-search input { width: auto; min-width: 0; flex: 1; }
    .inbox-bar .ib-actions { margin-left: 0; width: 100%; }
    .ib-btn { flex: 1 1 auto; justify-content: center; }
}
/* ===== Đồng bộ giao diện Quản lý văn bản & Quản lý vụ việc (LS Duy 02/11/2026) =====
   Cùng kiểu với hộp thư yêu cầu: tab tình trạng gạch chân + số đếm, chip lĩnh vực, tiêu đề bảng sáng, ô gọn. */
/* Tab tình trạng (Tất cả / Đang xử lý / …) */
.status-tabs:not(.sub-tabs) { gap: 2px; margin: 12px 0 14px; border-bottom: 1px solid var(--line); }
.status-tabs:not(.sub-tabs) a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px 10px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: #4a5a6e; font-weight: 500; }
.status-tabs:not(.sub-tabs) a:hover { color: var(--navy); background: #faf6ec; }
.status-tabs:not(.sub-tabs) a.on { background: none; color: var(--navy); font-weight: 700; border-bottom-color: #5c1622; }
.status-tabs:not(.sub-tabs) a span { opacity: 1; margin: 0; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #eef1f5; color: #5b6b7f; font-size: .72rem; font-weight: 700; text-align: center; }
.status-tabs:not(.sub-tabs) a.on span { background: var(--navy); color: var(--gold-light); }
/* Chip lĩnh vực / phân nhóm (hàng trên tab tình trạng) */
.status-tabs.sub-tabs { gap: 6px; margin: 4px 0 10px; }
.status-tabs.sub-tabs a { padding: 5px 13px; font-size: .84rem; border: 1px solid var(--line); background: #fff; color: #3c4b5e; }
.status-tabs.sub-tabs a:hover { border-color: #7a1f2e; color: var(--navy); }
.status-tabs.sub-tabs a.on { background: var(--navy); color: var(--gold-light); border-color: var(--navy); font-weight: 600; }
.status-tabs.sub-tabs a.on .svg { color: var(--gold-light); }

/* Tiêu đề bảng: nền sáng, chữ in hoa nhỏ, gạch vàng – giống mọi bảng khác */
.table th { color: #4a5a6e; letter-spacing: .4px; border-bottom: 2px solid #ecd2d7; }
.grid-table .head-row th { background: #f6f7f9; color: #3c4b5e; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 12px; border-bottom: 2px solid #ecd2d7; border-right: 1px solid #eceef2; }
.grid-table .head-row .sticky-col { background: #f6f7f9; }
.th-no { min-width: 20px; height: 20px; padding: 0 4px; border-radius: 5px; background: #fff; color: #7a1f2e; border: 1px solid #ecc5cb; font-size: .64rem; }
.th-no-icon { background: #fff; color: #9aa5b4; border-color: #e3e6eb; }
.grid-table .filter-row th, .grid-table .filter-row .sticky-col { background: #fcfbf7; }
.grid-table td { padding: 11px 12px; line-height: 1.45; }
.grid-table .col-num { width: 190px; }
.grid-table .row-title { color: var(--navy); }
.grid-table td.empty, .table td.empty { text-align: left; padding: 28px 18px; }
.table tbody tr:hover td, .grid-table tr:hover td.sticky-col { background: #fbf8f0; }

/* Bảng vụ việc: cột đủ rộng để tên khách hàng, cơ quan không rớt từng chữ */
@media (min-width: 761px) {
    .matter-table th { white-space: nowrap; }
    .matter-table .col-client { min-width: 125px; }
    .matter-table .col-court { min-width: 140px; }
    .matter-table .col-stage { min-width: 100px; }
    .matter-table .col-due { min-width: 135px; }
    .matter-table .col-meeting { min-width: 210px; }
    .matter-table th, .matter-table td { padding-left: 10px; padding-right: 10px; }
}
.matter-table td { font-size: .9rem; }
.matter-table .rm-open { padding: 4px 10px; font-size: .8rem; }
.matter-table .progress { margin-top: 6px; }

/* Đầu trang: tiêu đề và nút thẳng hàng, khoảng cách đều */
.page-head { margin-bottom: 14px; }
.page-head .crumb { margin-bottom: 4px; }
.page-head .toolbar { gap: 8px; }

/* Cài đặt › Thương hiệu: xem trước và tải logo (LS Duy 03/11/2026) */
.brand-logos { display: grid; gap: 12px; margin-top: 14px; }
.brand-logo-row { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.brand-logo-preview { flex: 0 0 150px; height: 90px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.brand-logo-preview.dark { background: var(--navy-deep); border-color: var(--navy-deep); }
.brand-logo-preview img { max-height: 76px; max-width: 136px; }
.brand-logo-info { flex: 1; min-width: 0; }
.brand-logo-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.brand-logo-form input[type=file] { max-width: 100%; font-size: .85em; }
@media (max-width: 640px) { .brand-logo-row { flex-direction: column; align-items: stretch; } .brand-logo-preview { flex-basis: auto; } }
/* Cấu hình › Thông tin công ty: bộ logo ACA LAW để xem và tải về (LS Duy 11/11/2026) */
.company-logo-group { font-size: 1.02rem; margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.company-logo-group .small { font-weight: 400; margin-left: 6px; }
.company-logo-note { display: grid; gap: 4px; background: var(--gold-soft); border-radius: 10px; padding: 10px 12px; margin: 8px 0 14px; }
.company-logo-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.12); }
.company-logo { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 12px; }
.company-logo-preview { flex: 0 0 320px; height: 160px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid var(--line); padding: 10px; }
.company-logo-preview img { max-width: 100%; max-height: 100%; }
.company-logo-preview.full { padding: 0; border: 0; height: auto; }
.company-logo-preview.full img { width: 100%; border-radius: 8px; }
.company-logo-body { flex: 1; min-width: 0; }
.company-logo-files { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 6px; }
.company-logo-admin summary { cursor: pointer; color: var(--navy-2); }
@media (max-width: 640px) { .company-logo { flex-direction: column; align-items: stretch; } .company-logo-preview { flex-basis: auto; } }.dot.k-viec { background: #6c4ca0; }

.obl-cycle .obl-v { color: #2f3b52; } .obl-cycle .obl-l i { margin-right: 3px; }

/* Hẹn trả lời yêu cầu của đối tác (16/11/2026) */
.cal-chip.k-hen { background: rgba(14, 116, 144, .09); border-left-color: #0e7490; }
.cal-chip.k-hen .m { background: #dff3f7; color: #0b4f61; }
.cal-chip.k-hen.late { border-left-color: #c0392b; }
.ag-matter.k-hen { background: #dff3f7; color: #0b4f61; border-left-color: #0e7490; }
.dot.k-hen { background: #0e7490; }
.reply-due > summary { cursor: pointer; }
.reply-due.set { border-left: 4px solid #0e7490; }
.reply-due.late { border-left: 4px solid #c0392b; }
.reply-due-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rd-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-quick .rd-pick.on { background: var(--navy, #1f3557); color: #fff; }
.rd-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.rd-row label { display: flex; flex-direction: column; font-size: .85rem; gap: 3px; }
.rd-row .rd-note { flex: 1; min-width: 220px; }
.rd-tag { color: #0b4f61; margin-top: 2px; }
.rd-tag.late { color: #b42318; font-weight: 600; }

/* Quản lý – sổ sách của tổ chức hành nghề luật sư (LS Duy 20/11/2026) */
.mgmt-card { display: block; color: inherit; text-decoration: none; }
.mgmt-card h3 { margin: 0 0 6px; font-size: 1.02rem; display: flex; gap: 6px; align-items: center; }
.mgmt-card:hover { border-color: var(--gold, #b8975a); }
.mgmt-table th, .mgmt-table td { font-size: .86rem; padding: 8px 10px; }
.mgmt-table th { text-transform: none; letter-spacing: 0; vertical-align: middle; }
.mgmt-table .center { text-align: center; }
.mgmt-table .nowrap { white-space: nowrap; }
.mgmt-table tr.mgmt-editing td { background: #fff7e3; }
.obl-filter a { border: 1px solid var(--line, #d9dee7); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: .85rem; color: inherit; text-decoration: none; }
.obl-filter a.on { background: var(--navy, #1f3557); color: #fff; border-color: var(--navy, #1f3557); }
/* Quản lý – rà theme 20/11/2026: nhãn menu, form nhập, bảng cột nhóm, ô chọn năm */
.sidebar .side-label .side-badge { margin: 0 8px 0 auto; letter-spacing: 0; }
.sidebar .side-label:has(.side-badge)::after { margin-left: 0; }
.mgmt-card h3 .status { margin-left: auto; font-size: .72rem; }
.mgmt-card .small { line-height: 1.5; }
.mgmt-table th[colspan], .mgmt-table thead tr + tr th { border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; }
.mgmt-table th.center, .mgmt-table th[colspan] { text-align: center; }
.mgmt-table td .btn-sm { display: inline-flex; align-items: center; padding: 4px 8px; text-decoration: none; }
.mgmt-table td form { margin: 0 0 0 4px; }
.mgmt-sum { margin-top: 12px; line-height: 1.6; }
.mgmt-import { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 12px; }
.mgmt-import .btn-sm { display: inline-flex; gap: 4px; align-items: center; }
.mgmt-year { padding: 7px 10px; border: 1px solid var(--gold); border-radius: 8px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--navy); background: #fff; cursor: pointer; }
.mgmt-formcard h2 { display: flex; gap: 8px; align-items: center; }
.mgmt-form .mgmt-sec { margin: 6px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--navy); }
.mgmt-form .grid-3 + .mgmt-sec { margin-top: 12px; }
.mgmt-form .span-all { grid-column: 1 / -1; }
.mgmt-form .field-hint { margin-top: 4px; font-size: .78rem; line-height: 1.4; color: var(--muted); }
.mgmt-form .field-hint.task-late { color: var(--fail); }
.mgmt-form .mgmt-check { display: flex; align-items: center; gap: 8px; font-weight: 500; padding: 10px 0; }
.mgmt-form .mgmt-check input { width: auto; }
.mgmt-form .form-actions { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
/* Quản lý – ô nhập nền hồng để tách khỏi nền thẻ (LS Duy 20/11/2026); ô AI vừa điền có viền xanh */
.mgmt-form input:not([type=checkbox]):not([type=radio]):not([type=file]), .mgmt-form select, .mgmt-form textarea { background: #fdeef1; border-color: #efc9d1; }
.mgmt-form input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, .mgmt-form select:focus, .mgmt-form textarea:focus { background: #fff6f8; }
.mgmt-form .ai-filled { border-color: #2f8f5b !important; box-shadow: 0 0 0 2px rgba(47,143,91,.18); }
.mgmt-form .ok-text { color: var(--ok); }
.mgmt-import-box { margin: 0 0 14px; padding: 12px 14px 10px; border: 1px dashed #e3b6c0; border-radius: 10px; background: #fffafb; }
.mgmt-import-box .mgmt-sec { border-bottom: 0; padding-bottom: 0; margin: 0 0 4px; display: flex; gap: 6px; align-items: center; }
.mgmt-import-box p { margin: 0 0 8px; }
.mgmt-import-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.mgmt-import-row input[type=file] { flex: 1 1 260px; min-width: 0; padding: 8px; border: 1px solid #efc9d1; border-radius: 8px; background: #fdeef1; font: inherit; font-size: .88rem; }
.mgmt-import-row select { width: auto; }
.mgmt-engines { display: inline-flex; gap: 12px; }
.mgmt-engines .mgmt-check, .mgmt-import-box .mgmt-check { padding: 0; }
.mgmt-file-now { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 8px; }
#mf-msg { margin-top: 4px; }
/* Văn bản của tôi – ngăn Tài liệu vụ việc / Trả lời đối tác (20/11/2026) */
.mine-tabs { margin: 2px 0 12px; }

/* Website – quản trị nội dung acalaw.vn (LS Duy 21/11/2026) */
.web-soon { opacity: .7; }
.web-demo { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 16px 0; }
.web-demo h3 { margin: 0 0 4px; font-size: 1rem; display: flex; gap: 8px; align-items: center; }
.web-recent { list-style: none; margin: 0; padding: 0; }
.web-recent li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.web-recent li:last-child { border-bottom: 0; }
.web-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 14px; }
.web-filter select, .web-filter input[type=search] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.web-filter input[type=search] { min-width: 220px; }
/* Website › Liên hệ (LS Duy 21/11/2026) */
.web-filter input[type=text] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.web-contact-form { display: grid; gap: 6px; min-width: 220px; }
.web-contact-form select, .web-contact-form textarea { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .9rem; }
.web-table td { vertical-align: middle; }
.web-thumb-cell { width: 96px; }
.web-thumb { display: block; width: 88px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.web-thumb-auto { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2a4568, #15253d); color: #e3cfa5; font-size: 1.4rem; }
.web-thumb-auto.big { width: 200px; height: 112px; font-size: 2.2rem; }
.web-title { font-weight: 600; color: var(--navy); text-decoration: none; }
.web-title:hover { color: #7A1F2E; }
.web-img-row { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; margin-bottom: 10px; }
.web-img-now img { width: 200px; height: 112px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; margin-bottom: 6px; }
.web-img-preview { margin-top: 8px; max-width: 320px; border-radius: 10px; border: 1px solid var(--line); }
.web-slug { display: flex; align-items: center; gap: 4px; }
.web-slug input { flex: 1; }
@media (max-width: 680px) { .web-img-row { grid-template-columns: 1fr; } }
.web-preview { max-width: 820px; padding: 26px 30px; }
.web-pv-crumb { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.web-pv-cat { display: inline-flex; gap: 6px; align-items: center; background: #1F3557; color: #fff; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.web-pv-title { font-size: 1.7rem; line-height: 1.3; color: var(--navy); margin: 10px 0; }
.web-pv-meta { display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.web-pv-banner { width: 100%; height: 300px; object-fit: cover; border-radius: 12px; margin-bottom: 18px; display: block; }
.web-pv-auto { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; background: linear-gradient(135deg, #2a4568, #1F3557 60%, #15253d); color: #e3cfa5; font-size: 3rem; }
.web-pv-auto span { font-size: .85rem; color: #c9d1e3; }
.web-pv-content { font-size: 1.02rem; line-height: 1.75; color: #2d3748; }
.web-pv-content p { margin: 0 0 12px; }
.web-pv-lead { font-size: 1.08rem; }
.web-pv-li { position: relative; padding-left: 20px; }
.web-pv-li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: #7A1F2E; }
.web-pv-note { padding: 12px 14px; background: #f6f7fa; border-left: 3px solid #b8975a; border-radius: 8px; font-size: .88rem; color: #5a6475; }
.web-table td:nth-child(2) { min-width: 260px; }
.web-acts { width: 150px; }
.web-acts .btn-sm, .web-acts form { margin: 2px 0; }

/* Kế toán – sổ quản trị (LS Duy duyệt 23/11/2026, docs/18-dac-ta-menu-ke-toan.md) */
.acc-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; margin: 14px 0 16px; }
.acc-kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); color: inherit; text-decoration: none; }
a.acc-kpi:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(21,37,61,.08); }
.acc-kpi-label { display: flex; gap: 6px; align-items: center; font-size: .82rem; font-weight: 600; color: var(--navy); }
.acc-kpi-num { font-family: "Palatino Linotype", Palatino, Georgia, serif; font-size: 1.35rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.acc-pos { color: #1e7b45; }
.acc-neg { color: #b42318; }
.acc-r { text-align: right; }
.acc-money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.acc-table td, .acc-table th { vertical-align: middle; }
.acc-table tfoot th { background: #f6f3ea; color: var(--navy); }
.acc-table tr.acc-sumrow td { background: #f6f3ea; font-weight: 600; color: var(--navy); }
.acc-table tr.acc-draft td { background: #fffaf0; }
.acc-table tr.acc-draft td:first-child { border-left: 3px solid var(--gold); }
.acc-matrix td, .acc-matrix th { font-size: .8rem; padding: 6px 7px; }
.acc-h2 { font-family: "Palatino Linotype", Palatino, Georgia, serif; font-size: 1.1rem; color: var(--navy); margin: 14px 0 4px; letter-spacing: .3px; }
.acc-h3 { margin: 0 0 10px; font-size: 1rem; display: flex; gap: 6px; align-items: center; color: var(--navy); }
.acc-more { margin-left: auto; font-weight: 400; }
.acc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.acc-two > .card { margin: 0; }
@media (max-width: 860px) { .acc-two { grid-template-columns: 1fr; } }
.acc-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 14px; }
.acc-filter select, .acc-filter input[type=search], .acc-filter input[type=month], .acc-filter input[type=date] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.acc-filter input[type=search] { min-width: 220px; }
.acc-sumline { margin: 4px 0 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.acc-actions { margin: 0 0 16px; flex-wrap: wrap; }
.acc-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.acc-cancel input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .85rem; min-width: 180px; }
.acc-danger-zone { margin-top: 16px; }
.acc-big { font-size: 1.15rem !important; font-weight: 700; color: var(--navy); }
.mgmt-form .acc-money-input { text-align: right; font-variant-numeric: tabular-nums; }
.acc-dots input, .acc-edit input, .acc-edit select { width: 100%; padding: 6px 8px; border: 1px solid #efc9d1; border-radius: 7px; background: #fdeef1; font: inherit; font-size: .86rem; box-sizing: border-box; }
.acc-edit tr.acc-newrow td { background: #fffaf0; }
.acc-files { list-style: none; margin: 0; padding: 0; }
.acc-files li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 0; }
.acc-warnbox { margin: 0 0 14px; padding: 12px 16px; background: #fff7e3; border: 1px solid #f0d58c; border-left: 4px solid #c58a12; border-radius: 10px; }
.acc-warnbox ul { margin: 6px 0; padding-left: 20px; }
.acc-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 10px 20px; }
.acc-dl > div { display: flex; flex-direction: column; gap: 2px; font-size: .92rem; }
.acc-dl .muted { font-size: .78rem; }
.acc-count { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.acc-count input { padding: 7px 10px; border: 1px solid #efc9d1; border-radius: 8px; background: #fdeef1; font: inherit; text-align: right; }
.acc-checks { display: grid; gap: 10px; }
.acc-check { margin: 0; padding: 0; border-left: 4px solid #2e8b47; }
.acc-check.warn { border-left-color: #c58a12; }
.acc-check.red { border-left-color: #b42318; }
.acc-check summary { display: flex; gap: 10px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; }
.acc-check summary::-webkit-details-marker { display: none; }
.acc-check-no { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--gold-light); font-size: .8rem; font-weight: 700; flex: none; }
.acc-check-title { flex: 1; font-weight: 600; color: var(--navy); }
.acc-check-hint { padding: 0 16px 8px 52px; }
.acc-check .web-recent { padding: 0 16px 10px 52px; }
@media print { .sidebar, .page-head .toolbar, .acc-filter, .status-tabs, .acc-count { display: none !important; } }
.acc-filter select { max-width: 300px; }
@media (min-width: 761px) { .acc-table:not(.acc-matrix) { min-width: 760px; } }

/* Kế toán – hàng nút tới các mục trên trang Tổng quan (LS Duy 23/11/2026) */
.acc-nav{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(170px,100%),1fr));gap:12px;margin:0 0 18px}
.acc-nav-item{display:flex;flex-direction:column;gap:4px;padding:14px 16px;color:inherit;text-decoration:none;border-top:3px solid var(--gold,#b8975a)}
.acc-nav-item i{font-size:1.6rem;color:var(--navy,#1f2d4d)}
.acc-nav-item strong{font-size:1rem;color:var(--navy,#1f2d4d)}
.acc-nav-item:hover{border-color:var(--gold,#b8975a);box-shadow:0 4px 14px rgba(0,0,0,.08)}