/* Hugo House — bố cục kiểu Lark (tách từ Mytonic Work), nhận diện theo website hugohouse.edu.vn:
   xanh teal #2F7A74 / #275C69 làm chủ, xanh đậm #1F4A55 làm nền tối, vàng #F7D146 điểm nhấn, chữ tiêu đề Baloo 2 */
:root {
  --brand: #2F7A74;           /* màu thương hiệu, dùng cho mảng lớn, logo, nền */
  --accent: #275C69;          /* màu nút, link, chữ — đậm hơn để đạt chuẩn dễ đọc */
  --accent-soft: #2F7A7417; --accent-ink: #1B4550; --accent-line: #A9D3CF;
  --stage: #1F4A55;           /* mực xanh đậm: nền "sân khấu" */
  --coral: #FF6B57; --sun: #F7D146; --rose: #E0457B; --mint: #9FD6D0;
  --art: linear-gradient(90deg, #2F7A74 0%, #9FD6D0 45%, #F7D146 100%);
  --display: 'Baloo 2', 'Be Vietnam Pro', system-ui, sans-serif;
  --ink: #1F2329; --ink2: #3B4048; --muted: #5F6368; --line: #E4E6EA; --line2: #F0F1F3;
  --bg: #F4F7F7; --card: #FFFFFF; --late: #C62828; --ok: #1B6B3A; --info: #1F5BA8;
  --radius: 12px; --side: 240px;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-family: var(--display); font-size: 32px; line-height: 1.05; margin: 0; font-weight: 800; letter-spacing: -.01em; }
.display { font-family: var(--display); font-weight: 800; }
h2 { font-family: var(--display); font-size: 21px; line-height: 1.15; margin: 0; font-weight: 800; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 600; }
input, select, textarea { border: 1px solid #D5D8DD; border-radius: 8px; padding: 0 10px; min-height: 38px; background: #fff; width: 100%; }
textarea { padding: 8px 10px; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); flex-shrink: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
select:disabled, input:disabled { background: #F5F6F7; color: var(--muted); }

.muted { color: var(--muted); } .sm { font-size: 13px; } .xs { font-size: 12px; } .b { font-weight: 600; }
.block { display: block; } .grow { flex: 1; min-width: 0; } .late { color: var(--late); } .ok { color: var(--ok); } .info { color: var(--info); }
.pre { white-space: pre-wrap; margin: 0; } .struck { text-decoration: line-through; color: var(--muted); } .r { text-align: right; }
.inline { display: inline-flex; align-items: center; gap: 8px; }
.row-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 8px;
  border: 1px solid #D5D8DD; background: #fff; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: #F7F8FA; } .btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: var(--accent-ink); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.lg { min-height: 46px; padding: 0 22px; font-size: 15px; } .btn.block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; cursor: pointer; position: relative; flex-shrink: 0; }
.icon-btn:hover { background: #EEF0F3; }
.icon-btn.star.on { color: #C77700; }
.link { color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 500; }
.link-like { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 12px; white-space: nowrap; background: #EEF0F3; color: var(--ink2); }
.chip.grey { background: #EEF0F3; color: var(--ink2); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; flex-shrink: 0; }
.sq { width: 20px; height: 20px; border-radius: 5px; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sq.lg { width: 32px; height: 32px; font-size: 16px; border-radius: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1.5px solid #D5D8DD; background: #fff; cursor: pointer; font-weight: 500; font-size: 13px; }
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Khung ---------- */
.shell { display: flex; min-height: 100vh; min-height: 100svh; }
.side { width: var(--side); flex-shrink: 0; color: #fff; padding: 14px 10px;
  background:
    radial-gradient(120% 40% at 0% 0%, rgba(47,122,116,.55), transparent 70%),
    radial-gradient(90% 30% at 100% 100%, rgba(255,107,87,.28), transparent 70%),
    radial-gradient(70% 25% at 0% 85%, rgba(224,69,123,.18), transparent 70%),
    var(--stage); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; padding-left: 0; padding-right: 0; padding-bottom: 0; }
/* Đầu menu đứng yên; chỉ danh sách cuộn (chừa đáy cho thanh Safari / vạch home) */
.side-head { flex: none; padding: 0 10px; }
.side-user { display: none; }
.side-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1px; padding: 0 10px calc(env(safe-area-inset-bottom) + 24px);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.side-scroll > * { flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 8px 8px 18px; position: relative; }
.brand::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 3px; border-radius: 2px; background: var(--art); opacity: .9; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-tag { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .28em; color: var(--mint); margin-top: 3px; }
.logo-full { height: 34px; width: auto; display: block; margin: 0 auto; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #3A8F88, var(--accent) 60%, #1B4550); color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo.lg { width: 56px; height: 56px; font-size: 28px; border-radius: 14px; margin: 0 auto 12px; }
.brand-name { font-weight: 700; font-size: 15px; }
.nl { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 8px; color: rgba(255,255,255,.82); font-size: 14px; position: relative; }
.nl:hover { background: rgba(255,255,255,.08); color: #fff; }
.nl.on { background: rgba(47,122,116,.32); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(127,227,216,.25); }
.nl.on::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0; background: linear-gradient(var(--sun), var(--coral)); }
.nb { margin-left: auto; font-size: 12px; background: rgba(255,255,255,.14); color: #fff; border-radius: 10px; padding: 0 8px; font-weight: 600; }
.nb.red { background: var(--coral); color: #2A0F0A; }
.ns { font-size: 11px; font-weight: 600; color: #5F6670; padding: 14px 10px 4px; letter-spacing: .06em; }
.side .ns { font-family: var(--display); font-size: 13px; font-weight: 800; color: var(--mint); padding: 16px 10px 4px; letter-spacing: .14em; opacity: .9; }
.side .sq { box-shadow: 0 0 0 1.5px rgba(255,255,255,.25); }
.side .icon-btn { color: rgba(255,255,255,.85); } .side .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 6px 0; border-top: 1px solid rgba(255,255,255,.12); }
.side-foot .muted { color: rgba(255,255,255,.6); }
.side .muted { color: rgba(255,255,255,.6); }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: rgba(244,247,247,.92);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.searchbox { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 520px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); cursor: text; text-align: left; }
kbd { font-size: 11px; border: 1px solid #D5D8DD; border-radius: 4px; padding: 1px 6px; font-family: inherit; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bell { border: 1px solid var(--line); background: #fff; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--late); color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; min-width: 200px; z-index: 30; }
.menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 6px; cursor: pointer; }
.menu button:hover { background: #F0F1F3; }
.content { flex: 1; padding: 24px 28px 48px; }
.page-head h1 { position: relative; padding-bottom: 6px; }
.page-head h1::after { content: ''; position: absolute; left: 0; bottom: 0; width: 44px; height: 4px; border-radius: 2px; background: var(--art); }
.bottombar { display: none; }
.only-mobile { display: none; }
.scrim { display: none; }

/* ---------- Trang ---------- */
.page { display: flex; flex-direction: column; gap: 18px; min-width: 0; flex: 1; }
.page.narrow { max-width: 1000px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.crumb { font-size: 13px; color: var(--muted); } .crumb a:hover { color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 16px 20px; } .pad { padding: 12px 16px; } .pad-sm { padding: 8px; } .pad-x { padding-left: 16px; padding-right: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line2); }
.card-head.flat { padding: 0 0 8px; border: 0; }
.card.pad > h2, .card.pad > h3 { margin-bottom: 10px; }
.cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.grow1 { flex: 1 1 300px; min-width: 0; } .grow2 { flex: 2 1 520px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.stat:hover { border-color: #C9CDD3; } .stat.sel { border: 2px solid var(--accent); padding: 15px 17px; }
.btnlike { cursor: pointer; font: inherit; color: inherit; }
.num { font-size: 30px; font-weight: 700; line-height: 1.2; } .num-lg { font-size: 30px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.table-wrap .tbl { min-width: 640px; }
.table-wrap .tbl td:first-child { min-width: 170px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tr.clickable { cursor: pointer; } .tbl tr.clickable:hover td { background: #F7F8FA; }
.tbl tr.grp td { background: #F7F8FA; font-weight: 600; font-size: 13px; }
.th-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; font-weight: 600; }
.progress { display: inline-flex; align-items: center; gap: 8px; }
.progress .bar { width: 90px; height: 6px; border-radius: 3px; background: #EEF0F3; overflow: hidden; display: inline-block; }
.progress .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--mint)); }
.progress .pct { font-size: 12px; color: var(--muted); }
.barrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.barlabel { width: 92px; font-size: 13px; } .bartrack { flex: 1; height: 10px; border-radius: 5px; background: var(--line2); overflow: hidden; }
.bartrack span { display: block; height: 100%; border-radius: 5px; }
.listrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.listrow:last-child { border-bottom: 0; }
a.listrow:hover { color: var(--accent); }
.datebox { width: 40px; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); } .empty-title { font-weight: 600; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.errorbox { background: #FDE8E4; color: #A33A1F; border-radius: 8px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.spinner { width: 28px; height: 28px; margin: 48px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs button { min-height: 42px; padding: 0 14px; border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; color: var(--ink2); }
.tabs button.on { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
.tab-count { margin-left: 6px; font-size: 12px; color: var(--muted); }

/* ---------- Việc của tôi ---------- */
.taskrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 18px; border-bottom: 1px solid var(--line2); }
.taskrow:last-child { border-bottom: 0; } .taskrow.sel { background: var(--accent-soft); }
.taskrow-title { flex: 1 1 260px; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.taskrow-title:hover span:first-child { color: var(--accent); }
.due { width: 150px; text-align: right; font-size: 13px; white-space: nowrap; }

/* ---------- Thông báo ---------- */
.notif { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line2); background: #fff; cursor: pointer; }
.notif:hover { background: #F7F8FA; } .notif.unread { background: #F5F6FF; } .notif.unread .grow > span:first-child { font-weight: 600; }
.udot { width: 8px; height: 8px; border-radius: 50%; margin-top: 13px; flex-shrink: 0; } .notif.unread .udot { background: var(--accent); }

/* ---------- Show ---------- */
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.show-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.h3link { font-size: 16px; font-weight: 600; } .h3link:hover { color: var(--accent); }
.show-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.show-head > .grow { flex: 1 1 420px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink2); margin: 6px 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.avatars { display: flex; align-items: center; } .avatars .avatar { border: 2px solid var(--bg); margin-left: -6px; }
.stepper { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
.step { flex: 1 1 120px; display: flex; flex-direction: column; gap: 4px; }
.step-bar { height: 6px; border-radius: 3px; background: var(--line); }
.step.done .step-bar { background: var(--ok); } .step.now .step-bar { background: var(--accent); } .step.now .b { color: var(--accent); }
.with-drawer { display: flex; gap: 20px; align-items: flex-start; }

.kanban-wrap { display: flex; flex-direction: column; gap: 8px; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.kcol { background: #EEF0F3; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.kcol.over { outline: 2px dashed var(--accent); background: var(--accent-soft); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.kcard { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; }
.kcard:hover { border-color: #B9BEC7; } .kcard.sel { outline: 2px solid var(--accent); }
.kcard-title { font-weight: 500; line-height: 1.35; }
.kcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.mm-wrap { overflow-x: auto; }
.mm { display: flex; align-items: center; min-width: 760px; }
.mm-root { padding: 14px 18px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--accent-ink)); color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; margin-right: 32px; position: relative; }
.mm-root::after { content: ''; position: absolute; right: -32px; top: 50%; width: 32px; height: 2px; background: #B9BEC7; }
.mm-branches { display: flex; flex-direction: column; gap: 12px; border-left: 2px solid #B9BEC7; padding: 6px 0; }
.mm-branch { display: flex; align-items: flex-start; position: relative; padding-left: 24px; }
.mm-branch::before { content: ''; position: absolute; left: 0; top: 18px; width: 24px; height: 2px; background: #B9BEC7; }
.mm-team { padding: 7px 12px; border-radius: 10px; border: 2px solid; background: #fff; font-weight: 600; width: 130px; flex-shrink: 0; }
.mm-leaves { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 20px; }
.mm-leaf { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: #F5F6F7; border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.mm-leaf:hover { border-color: var(--accent); }

.tl-wrap { overflow-x: auto; }
.tl { position: relative; padding-bottom: 8px; }
.tl-head, .tl-row { display: flex; align-items: center; min-height: 34px; border-bottom: 1px solid var(--line2); }
.tl-head { position: sticky; top: 0; background: #fff; z-index: 2; }
.tl-label { width: 220px; flex-shrink: 0; padding: 0 12px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: sticky; left: 0; background: #fff; z-index: 1; }
.tl-row.stage { background: #F7F8FA; } .tl-row.stage .tl-label { background: #F7F8FA; }
.tl-grid { position: relative; height: 34px; }
.tl-grid > span:not(.tl-bar):not(.tl-stage):not(.tl-dep) { position: absolute; top: 0; height: 34px; line-height: 34px; padding-left: 6px; font-size: 11px; color: var(--muted); border-left: 1px solid var(--line2); }
.tl-bar { position: absolute; top: 7px; height: 20px; border-radius: 6px; font-size: 11px; line-height: 20px; padding: 0 8px; white-space: nowrap; overflow: hidden; color: var(--ink2); background: #E8EAED; }
.tl-bar.doing { background: #DCE6F7; color: #1F5BA8; } .tl-bar.review { background: #FFF1DC; color: #8A4B00; } .tl-bar.done { background: #E3F4EA; color: var(--ok); }
.tl-bar.is-late { background: #FDE8E4; color: #A33A1F; }
.tl-stage { position: absolute; top: 12px; height: 10px; border-radius: 5px; background: var(--accent); opacity: .35; }
.tl-dep { position: absolute; top: 8px; font-size: 13px; color: var(--muted); }
.tl-today, .tl-show { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--late); pointer-events: none; }
.tl-show { border-left: 2px solid var(--ink); }

/* ---------- Khung chi tiết việc ---------- */
.drawer { width: 400px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: sticky; top: 76px;
  max-height: calc(100vh - 96px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.drawer-head { display: flex; align-items: flex-start; gap: 8px; }
.drawer-head h2 { flex: 1; font-size: 17px; line-height: 1.35; }
.title-input { flex: 1; font-size: 17px; font-weight: 600; border-color: transparent; padding: 4px 6px; }
.title-input:hover { border-color: #D5D8DD; }
.hold-banner { background: #EEF0F3; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.props { display: grid; grid-template-columns: 92px 1fr; gap: 8px 10px; align-items: center; font-size: 13px; }
.props .pl { color: var(--muted); }
.props select, .props input { min-height: 34px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dsec { border-top: 1px solid var(--line2); padding-top: 12px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 16px; background: #F0F1F3; font-size: 13px; }
.x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 4px; }
.inline-form { display: flex; gap: 8px; margin-top: 8px; }
.inline-form input, .inline-form select { min-height: 34px; }
.check-row { display: flex; align-items: center; justify-content: space-between; }
.check-row label, .check { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.dep { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.file { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; font-size: 13px; color: var(--accent); }
.comment { display: flex; gap: 10px; padding: 8px 0; }
.comment-form { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; margin-top: 6px; }
.mention-pop { position: absolute; bottom: 100%; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.12); padding: 4px; z-index: 5; min-width: 240px; }
.mention-pop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border: 0; background: none; cursor: pointer; text-align: left; border-radius: 6px; }
.mention-pop button:hover { background: #F0F1F3; }
.hist { padding: 2px 0; }

/* ---------- Báo cáo & KPI ---------- */
.team-list { flex: 0 1 280px; min-width: 240px; padding: 6px; }
.team-btn, .person-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; }
.team-btn:hover, .person-btn:hover { background: #F0F1F3; } .team-btn.on, .person-btn.on { background: var(--accent-soft); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.field-inner { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; color: var(--ink2); font-weight: 500; }
.field-hint { font-size: 12px; color: var(--muted); }
.comment-line { padding: 6px 0; border-bottom: 1px solid var(--line2); }
.score-edit { display: inline-flex; align-items: center; gap: 6px; }
.score-edit input { width: 64px; min-height: 32px; text-align: right; }

/* ---------- Hộp thoại ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,22,26,.42); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line2); }
.modal-body { padding: 8px 20px 18px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line2); }
.form .field:first-child { margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-lg { min-height: 46px; font-size: 16px; margin-top: 10px; }
.search-res { margin-top: 10px; }
.res { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; }
.res:hover { background: #F0F1F3; } .res.static { cursor: default; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.team-pick { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.team-pick select { width: 130px; margin-left: auto; min-height: 32px; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #2B2F36; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.2); font-size: 14px; }
.toast.err { background: #A33A1F; }

/* ---------- Lời mời bật Face ID ---------- */
.nudge { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: linear-gradient(100deg, #E3F6F4, #FFF4E6 70%, #FFE8E4); border: 1px solid var(--accent-line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.nudge > svg { color: var(--accent); }

/* ---------- Đăng nhập ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px 16px; position: relative; overflow: hidden;
  background:
    radial-gradient(42vmax 42vmax at 12% 18%, rgba(159,214,208,.45), transparent 60%),
    radial-gradient(34vmax 34vmax at 88% 86%, rgba(247,209,70,.30), transparent 62%),
    linear-gradient(160deg, #2F7A74, #275C69 55%, #1B4550); }
.login::before { content: ''; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 0 0 9vmax rgba(255,255,255,.04), 0 0 0 18vmax rgba(255,255,255,.03); pointer-events: none; }
.login::after { content: none; } /* Hugo House: bỏ dải sóng âm của bản Mytonic */
.login > * { position: relative; z-index: 1; }
.login-brand { text-align: center; color: #fff; }
.login-brand .logo-full { height: 44px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.18)); }
.login-note { font-size: 12px; color: var(--muted); margin-top: -2px; }
/* Bố cục đối xứng: khối trên (Mytonic + WORK) và khối dưới (Mars) cùng chiều cao, cùng cách khung 36px
   → tâm khung trùng tâm vòng tròn nền. Bản quyền nằm ngoài luồng (không lệch tâm). Màn thấp: thu nhỏ theo --s */
.login { --s: 1; --bh: calc(var(--s) * 82px); gap: 0; padding: 52px 16px; }
.login-brand { height: var(--bh); margin-bottom: calc(var(--s) * 36px); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; flex: none; }
.login-brand .logo-full { height: calc(var(--s) * 44px); }
.login-brand .tag { font-size: calc(var(--s) * 18px); margin-top: calc(var(--s) * 8px); }
.login-mars { position: relative; height: var(--bh); margin-top: calc(var(--s) * 36px); display: flex; flex-direction: column; align-items: center; flex: none; }
.login-mars img { display: block; height: calc(var(--s) * 58px); width: auto; opacity: .95; filter: drop-shadow(0 6px 18px rgba(0,0,0,.18)); }
.login-foot { position: absolute; top: calc(var(--s) * 58px + 14px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; color: rgba(255,255,255,.7); text-align: center; }
.login > .login-card { flex: none; }
@media (max-height: 699px) { .login { --s: .8; padding-top: 36px; padding-bottom: 36px; } }
@media (max-height: 599px) { .login { --s: .66; padding-top: 20px; padding-bottom: 20px; } .login-card { padding-top: 20px; padding-bottom: 20px; gap: 8px; }
  .login-card h1 { font-size: 24px; } .login-card .logo.lg { width: 44px; height: 44px; } .login-card p { margin: 0; } }
@media (max-height: 519px) { .login { --s: .56; } }
.login-brand .tag { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: .4em; margin-top: 8px; color: #fff; opacity: .92; }
.login-card h1 { font-size: 30px; }
.login-card { background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.6); box-shadow: 0 30px 60px -20px rgba(4,40,38,.45); border-radius: 20px; padding: 32px; width: 100%; max-width: 420px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
/* Khung đăng nhập / khoá gọn (08/10): rộng tối đa 320px, chữ và nút nhỏ lại; Mars + bản quyền dưới khung, tránh vùng sóng âm */
.login { padding: 120px 16px; }
.login-card { width: min(320px, 100vw - 56px); max-width: none; padding: 22px 20px 20px; border-radius: 20px; gap: 10px; }
.login-card h1, .login-step-head h1 { font-size: 21px; line-height: 1.15; }
.login-sub { font-size: min(13px, 3.4vw); color: var(--muted); white-space: nowrap; margin-top: -4px; }
.login-card p { font-size: 13px; margin: 0; }
.login-card .methods { gap: 10px; margin-top: 4px; }
.login-card .btn.method, .login-card .btn.lg { min-height: 44px; height: 44px; font-size: 14.5px; border-radius: 12px; }
.login-card .btn.method { padding: 0 12px; gap: 8px; white-space: nowrap; }
.login-card .btn.method .mi { position: static; transform: none; flex: none; }
.login-card .btn.method.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.login-card .btn.method.primary:hover { background: var(--brand); }
.login-card .logo.lg { width: 44px; height: 44px; margin-bottom: 4px; border-radius: 12px; }
.login-note { font-size: 12px; line-height: 1.4; }
.login-brand { margin-bottom: calc(var(--s) * 28px); }
.login-mars { margin-top: calc(var(--s) * 28px); }
.login-mars img { height: calc(var(--s) * 48px); }
.login-foot { top: calc(var(--s) * 48px + 18px); color: rgba(255,255,255,.72); font-size: 12px; }
@media (max-height: 699px) { .login { --s: .8; padding-top: 40px; padding-bottom: 80px; } .login::after { height: 80px; } .login-card .logo.lg { display: none; } }
@media (max-height: 599px) { .login { --s: .66; padding-top: 28px; padding-bottom: 56px; } .login::after { height: 56px; } .login-card { padding: 18px 18px 16px; gap: 8px; } }
@media (max-height: 519px) { .login { --s: .56; } }
.btn.google { gap: 10px; }
.dev-login { text-align: left; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.dev-login summary { cursor: pointer; font-size: 12px; color: var(--muted); list-style: none; text-align: center; }
.dev-login summary::-webkit-details-marker { display: none; }
.dev-login[open] summary { margin-bottom: 8px; }

/* ---------- Điện thoại & máy tính bảng ---------- */
@media (max-width: 1100px) {
  .with-drawer { display: block; }
  .drawer { position: fixed; inset: 0 0 0 auto; width: min(440px, 100%); max-height: none; top: 0; border-radius: 0; z-index: 40; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
}
@media (max-width: 760px) {
  .side { position: fixed; left: 0; top: 0; bottom: auto; z-index: 45; transform: translateX(-100%); transition: transform .2s; width: 280px; box-shadow: none;
    height: 100vh; height: 100dvh; height: min(100dvh, var(--vvh, 100dvh)); max-width: calc(100vw - 56px); touch-action: pan-y; }
  /* Chừa đáy rộng: Safari iOS có thanh công cụ nổi đè lên trang → mục cuối vẫn cuộn lên trên thanh được */
  .side-scroll { padding-bottom: calc(env(safe-area-inset-bottom) + 96px); }
  .side-foot { display: none; }
  .side-head { padding-top: env(safe-area-inset-top); border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 10px; }
  .side-head .brand { padding-bottom: 14px; }
  .side-x { width: 40px; height: 40px; }
  .side-user { display: flex; align-items: center; gap: 6px; padding: 2px 0 0 8px; min-width: 0; }
  .side-user .grow { min-width: 0; margin-left: 4px; }
  .side-user .muted { color: rgba(255,255,255,.6); }
  .side-scroll { padding-top: 8px; }
  .side.open { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.15); }
  .toasts { left: 16px; right: 16px; bottom: 84px; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 44; touch-action: none; }
  .only-mobile { display: inline-flex; }
  .topbar { padding: 10px 12px; } .searchbox kbd { display: none; }
  .content { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 27px; }
  .bottombar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 4px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bottombar a, .bottombar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border: 0; background: none; font-size: 11px; color: var(--muted); position: relative; cursor: pointer; }
  .bottombar .on { color: var(--accent); font-weight: 600; }
  .bottombar .badge { top: 2px; right: auto; left: 52%; }
  /* Kéo xuống: thanh dưới thu nhỏ (chỉ icon), kéo lên hiện lại */
  .bottombar { transition: padding .2s ease; }
  .bottombar a, .bottombar button { transition: min-height .2s ease, font-size .2s ease; }
  .bottombar .fab { transition: transform .2s ease, margin .2s ease; }
  .shell.bar-compact .bottombar { padding-top: 0; padding-bottom: calc(2px + env(safe-area-inset-bottom)); }
  .shell.bar-compact .bottombar a, .shell.bar-compact .bottombar button:not(.fab) { min-height: 38px; font-size: 0; gap: 0; }
  .shell.bar-compact .bottombar .fab { transform: scale(.72); margin-top: -14px; margin-bottom: -10px; }
  .bottombar .fab { flex: 0 0 56px; height: 56px; min-height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--accent-ink)); color: #fff; margin-top: -22px; box-shadow: 0 6px 16px rgba(0,128,122,.45), 0 0 0 3px #fff; }
  .topbar-right .btn.primary { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .due { width: auto; text-align: left; }
  .taskrow { padding: 10px 14px; }
  .drawer { width: 100%; }
  .kanban { grid-template-columns: repeat(4, 78vw); scroll-snap-type: x mandatory; } .kcol { scroll-snap-align: start; }
  .team-list { flex-basis: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .num { font-size: 24px; }
}

/* ---------- Điểm nhấn nghệ thuật ---------- */
.stats .stat { position: relative; overflow: hidden; }
.stats .stat::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--brand); }
.stats .stat:nth-child(2)::before { background: var(--coral); }
.stats .stat:nth-child(3)::before { background: var(--sun); }
.stats .stat:nth-child(4)::before { background: var(--rose); }
.stats .stat::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 110px; height: 110px; border-radius: 50%; background: var(--accent-soft); pointer-events: none; }
.stats .stat:nth-child(2)::after { background: #FF6B5714; } .stats .stat:nth-child(3)::after { background: #F7D1461C; } .stats .stat:nth-child(4)::after { background: #E0457B12; }
::selection { background: #9FD6D066; }

/* ---------- Chat ---------- */
.content:has(> .chat) { padding: 0; }
.shell.in-chat .content { padding: 0; }
.chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100dvh - 65px); background: var(--card); }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #FAFCFC; }
.chat-list-head { padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.chat-list-head h1 { font-size: 30px; }
.chat-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 10px; color: var(--muted); }
.chat-search input { border: 0; min-height: 36px; padding: 0; background: transparent; }
.chat-search input:focus { outline: none; }
.chat-search:focus-within { outline: 2px solid var(--accent); }
.chat-list-body { overflow-y: auto; padding: 0 8px 16px; flex: 1; }
.chat-list-body .ns { display: flex; padding: 14px 8px 4px; }
.pad-s { padding: 4px 8px 8px; }
.chat-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; min-height: 52px; }
.chat-item:hover { background: #EEF4F4; }
.chat-item.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--brand); }
.chat-item .grow { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chat-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item.unread .chat-name { font-weight: 700; }
.chat-item.unread .clamp1 { color: var(--ink2); }
.clamp1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cbadge { flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.cbadge.at { background: var(--coral); color: #2A0F0A; }
.ch-show { position: relative; flex-shrink: 0; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--accent-ink)); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.ch-show .dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; box-shadow: 0 0 0 2px #fff; }
.icon-btn.sm { width: 28px; height: 28px; }
.chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; color: var(--muted);
  background: radial-gradient(60% 50% at 50% 40%, var(--accent-soft), transparent); }
.chat-empty .b { color: var(--ink); font-family: var(--display); font-size: 22px; }

.chat-conv { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); min-height: 60px; }
.chat-title { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.1; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px 0 8px; overscroll-behavior: contain; }
.chat-start { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px 18px; text-align: center; }
.chat-start .b { font-family: var(--display); font-size: 22px; }
.older { display: block; margin: 6px auto 12px; }
.day-sep { display: flex; align-items: center; gap: 10px; margin: 14px 18px 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.msg { position: relative; display: flex; gap: 10px; padding: 6px 18px 2px; }
.msg.grouped { padding-top: 1px; }
.msg:hover, .msg.sel { background: #F5F9F9; }
.msg-av { width: 34px; flex-shrink: 0; display: flex; justify-content: center; }
.msg-time-s { font-size: 10px; color: var(--muted); visibility: hidden; padding-top: 4px; }
.msg:hover .msg-time-s { visibility: visible; }
.msg-main { min-width: 0; flex: 1; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.msg-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.mention { background: #FFF1D6; color: #8A4B00; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.msg-quote { display: flex; align-items: baseline; gap: 5px; font-size: 12.5px; color: var(--muted); border-left: 3px solid var(--accent-line); padding: 2px 8px; margin: 2px 0 4px; max-width: 560px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-quote svg { flex-shrink: 0; align-self: center; }
.msg.pending { opacity: .65; }
.msg.failed .msg-body { color: var(--late); }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 1px 8px; font-size: 12.5px; cursor: pointer; min-height: 26px; }
.react.mine { border-color: var(--brand); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.msg-tools { position: absolute; right: 16px; top: -14px; display: none; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 2px; box-shadow: 0 4px 14px rgba(0,0,0,.08); z-index: 2; }
.msg:hover .msg-tools, .msg.sel .msg-tools, .msg-tools.open { display: flex; }
.msg-tools .emoji { border: 0; background: none; font-size: 18px; width: 34px; height: 32px; border-radius: 8px; cursor: pointer; }
.msg-tools .emoji:hover { background: #F0F3F3; }
.msg-sys { margin: 8px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sys-line { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink2); background: #EEF6F5; border-radius: 14px; padding: 4px 12px; max-width: 100%; }
.sys-line svg { color: var(--accent); flex-shrink: 0; }
.task-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 8px 10px; margin-top: 6px; background: #fff; max-width: 420px; width: 100%; }
.task-card:hover { border-color: var(--accent-line); background: #FAFDFD; }
.new-below { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 16px; padding: 6px 14px;
  background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(0,128,122,.35); cursor: pointer; z-index: 3; }

.composer { border-top: 1px solid var(--line); padding: 10px 16px 12px; position: relative; background: var(--card); }
.composer-row { display: flex; align-items: flex-end; gap: 8px; border: 1px solid #D5DCDC; border-radius: 12px; padding: 6px 6px 6px 12px; background: #fff; }
.composer-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea { border: 0; padding: 6px 0; min-height: 24px; max-height: 180px; resize: none; line-height: 1.45; background: transparent; }
.composer textarea:focus { outline: none; }
.send { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; border: 0; background: #E3EAEA; color: #8A9696; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.send.ready { background: linear-gradient(135deg, var(--brand), var(--accent-ink)); color: #fff; }
.composer-hint { margin-top: 4px; padding-left: 4px; }
.composer-ctx { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); background: #F2F7F7; border-radius: 8px 8px 0 0; padding: 4px 6px 4px 10px; margin: 0 4px; }
.mention-pop { position: absolute; left: 16px; bottom: calc(100% - 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 4px; min-width: 260px; z-index: 5; }
.mention-pop button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 7px; text-align: left; cursor: pointer; }
.mention-pop button.on, .mention-pop button:hover { background: var(--accent-soft); }

@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100dvh - 59px - 64px - env(safe-area-inset-bottom)); }
  .shell.in-conv .bottombar { display: none; }
  .shell.in-conv .chat { height: calc(100dvh - 59px); }
  .chat.has-conv .chat-list { display: none; }
  .chat:not(.has-conv) .chat-empty { display: none; }
  .chat-head { padding: 8px 10px; }
  .msg { padding-left: 12px; padding-right: 12px; }
  .msg-tools { right: 8px; top: auto; bottom: calc(100% - 6px); }
  .composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .composer textarea { font-size: 16px; } /* tránh iPhone tự phóng to khi gõ */
  .chat-head .btn.sm { padding: 0 8px; font-size: 12px; }
}

/* ---------- Cài đặt thông báo ---------- */
.install-hint { background: #FFF8E6; border: 1px solid #F3DDA6; border-radius: 10px; padding: 12px 14px; font-size: 13.5px; }
.install-hint ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.prefs { width: 100%; border-collapse: collapse; margin-top: 4px; }
.prefs th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.prefs td { padding: 8px; border-bottom: 1px solid var(--line2); }
.prefs th:not(:first-child), .prefs td:not(:first-child) { text-align: center; width: 110px; }

/* ---------- Nhóm chat tự tạo ---------- */
.ch-group { background: linear-gradient(135deg, #5B2BB5, #1F5BA8); }
.modal .res input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }

/* ---------- Tiện ích dùng chung (trang Đối thủ, Khách hàng) ---------- */
.row { display: flex; align-items: center; } .row.gap { gap: 8px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.h3 { font-size: 18px; } .up { text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.card.list { padding: 4px 0; } .card.list > .empty { padding: 24px; }
.hint-box { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink); border-radius: 10px; padding: 10px 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.tags .tag { background: #FFF4E5; color: #8A4B00; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.chip.warn { background: #FFF1E6; color: #B4461B; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: #EEF0F3; padding: 3px; border-radius: 10px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.seg button.on { background: #fff; box-shadow: 0 1px 2px #0002; color: var(--accent-ink); font-weight: 600; }
.search-inline { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #D5D8DD; border-radius: 8px; padding: 0 10px; min-width: 220px; }
.search-inline input { border: 0; padding: 0; min-height: 36px; } .search-inline input:focus { outline: none; }
.search-inline:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.filters { margin: 4px 0; }

/* ---------- Theo dõi đối thủ ---------- */
.intel-sum { padding: 14px 18px; }
.intel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 10px; }
.intel-bar { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line2); }
.intel-bar .sq, .intel-date .sq { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.intel-row { display: flex; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line2); align-items: flex-start; }
.intel-row:last-child { border-bottom: 0; }
.intel-row > .grow > * + * { margin-top: 3px; }
.intel-date { width: 116px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding-top: 2px; }

/* ---------- Khách hàng (CRM) ---------- */
.pipe { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.pipe button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: #fff; border: 1px solid var(--line);
  border-top: 3px solid var(--accent); border-radius: 10px; padding: 8px 10px; cursor: pointer; text-align: left; }
.pipe button.on { background: var(--accent-soft); border-color: var(--accent-line); }
.pipe-n { font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1; }
.crm-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line2); }
.crm-row:last-child { border-bottom: 0; } .crm-row:hover { background: #FAFBFB; }
.crm-av { width: 38px; height: 38px; border-radius: 10px; background: var(--stage); color: var(--mint); display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 20px; flex-shrink: 0; }
.crm-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.crm-cols .card, .card.pre { padding: 14px 18px; }
.act-form { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 14px; border-bottom: 1px solid var(--line2); margin: 8px 0; }
.act-form .row input, .act-form .row select { width: auto; flex: 1; min-width: 130px; }
.act-form .btn { align-self: flex-end; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 2px solid var(--accent-line); padding: 4px 0 12px 14px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.contact { padding: 8px 0; border-bottom: 1px solid var(--line2); } .contact:last-child { border-bottom: 0; }
.contact a { color: var(--accent); }

/* ---------- File trong chat ---------- */
.msg-files { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; max-width: 420px; }
.msg-imgs { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-img { display: block; width: 160px; height: 160px; border-radius: 10px; overflow: hidden; background: #EEF0F3; border: 1px solid var(--line); }
.msg-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-img-ph { display: block; width: 100%; height: 100%; animation: pulse 1.2s infinite alternate; background: #E4E6EA; }
@keyframes pulse { to { opacity: .5; } }
.file-chip { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.file-chip:hover { border-color: var(--accent-line); background: #FAFDFD; }
.file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-ic { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff;
  background: #5F6368; flex-shrink: 0; letter-spacing: .02em; }
.file-ic.ft-PDF { background: #D93025; } .file-ic.ft-DOC { background: #2B579A; } .file-ic.ft-XLS { background: #217346; }
.file-ic.ft-PPT { background: #C43E1C; } .file-ic.ft-ZIP { background: #6B4E16; } .file-ic.ft-ẢNH { background: var(--brand); }
.attach-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; margin-bottom: 12px; }
.attach-item { display: flex; align-items: center; gap: 10px; }
.attach-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.bar.thin { display: block; height: 4px; border-radius: 2px; background: #EEF0F3; overflow: hidden; margin-top: 4px; }
.bar.thin span { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.composer-row > .icon-btn { align-self: flex-end; flex-shrink: 0; }

@media (max-width: 900px) {
  .pipe { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .crm-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .intel-row { flex-direction: column; gap: 4px; padding: 12px 14px; } .intel-date { width: auto; }
  .crm-row { padding: 12px 14px; }
  .msg-img { width: 120px; height: 120px; }
  .search-inline { min-width: 0; width: 100%; }
}

/* ---------- Tài chính show ---------- */
.fin { display: flex; flex-direction: column; gap: 16px; }
.fin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip.ok { background: #E3F4EA; color: #1B6B3A; }
.chip.lockchip { background: #EEF0F3; color: var(--ink); }
.fin-alerts { background: #FDE8E4; border: 1px solid #F3B8AC; color: #7A2A16; border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.fin-tiles .fin-tile .num { font-size: 26px; }
.fin-tile.bad .num { color: var(--late); } .fin-tile.ok .num { color: var(--ok); } .fin-tile.warn .num { color: #B4461B; }
.fin-tbl td, .fin-tbl th { font-variant-numeric: tabular-nums; }
.fin-tbl .r { text-align: right; white-space: nowrap; }
.fin-tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: #FAFBFB; }
.fin-tbl tr.fin-cat td { background: #F4F7F7; font-weight: 600; font-size: 13px; }
.fin-tbl td.fin-line { padding-left: 24px; }
.fin-tbl td.fin-line .chip { margin-left: 6px; }
.fin-tbl .icon-btn.sm { width: 30px; height: 30px; }
.fin-flag { display: inline-flex; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.fin-flag.bad { background: #FDE8E4; color: #A33A1F; } .fin-flag.warn { background: #FFF1DC; color: #8A4B00; }
.fin-rev { padding: 12px 18px; border-bottom: 1px solid var(--line2); }
.fin-rev:last-child { border-bottom: 0; }
.fin-rev .link-like:disabled { cursor: default; }
.fin-inst { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-left: 12px; border-left: 3px solid var(--accent-line); }
.fin-inst-row { display: grid; grid-template-columns: 130px 150px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.fin-inst-row.late { color: var(--late); }
.fin-inst-edit { display: flex; flex-direction: column; gap: 8px; background: #F7F8FA; border-radius: 10px; padding: 10px 12px; }
.fin-inst-line { display: grid; grid-template-columns: 160px 1fr 38px; gap: 8px; align-items: center; }
.fin-closed { justify-content: flex-start; gap: 8px; align-self: end; min-height: 38px; }
.fin-filter { flex-wrap: wrap; }
.fin-cash tr.fin-now td { background: #F2FBFA; }
.fin-barcol { width: 120px; }
.fin-bars { display: flex; flex-direction: column; gap: 2px; width: 110px; }
.fin-bars span { display: block; height: 5px; border-radius: 3px; min-width: 0; }
.fin-bars .in { background: var(--brand); } .fin-bars .out { background: var(--coral); }
.fin-ver summary { cursor: pointer; padding: 6px 0; font-size: 13px; }
@media (max-width: 760px) {
  .fin-inst-row { grid-template-columns: 1fr 1fr; }
  .fin-inst-line { grid-template-columns: 1fr 1fr 38px; }
  .fin-barcol { display: none; }
}

/* ---------- Đề nghị chi + Cài đặt tài chính ---------- */
.req-tbl td { vertical-align: top; }
select.fit { width: auto; }
.form-card { display: flex; flex-direction: column; gap: 12px; }
.req-calc { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; background: #F4F7F7; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.req-calc .big { font-size: 18px; color: var(--accent-ink); }
.req-diff { border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.req-diff.out { background: #FFF1DC; color: #8A4B00; } .req-diff.in { background: #E3F4EA; color: #1B6B3A; }
.req-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: st; }
.req-steps li { counter-increment: st; font-size: 13px; padding: 6px 12px 6px 8px; border-radius: 16px; background: #EEF0F3; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.req-steps li::before { content: counter(st); width: 20px; height: 20px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.req-steps li.done { background: #E3F4EA; color: #1B6B3A; } .req-steps li.done::before { content: '✓'; }
.req-steps li.now { background: var(--accent); color: #fff; font-weight: 600; } .req-steps li.now::before { color: var(--accent-ink); }
.req-actions { display: flex; flex-direction: column; gap: 8px; border: 2px solid var(--accent-line); background: #F2FBFA; }
.req-amounts { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.req-amounts > div { display: flex; flex-direction: column; } .req-amounts b { font-size: 16px; font-variant-numeric: tabular-nums; }
.req-amounts .req-pay b { font-size: 22px; color: var(--accent-ink); }
.req-props { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 14px 0 0; font-size: 14px; }
.req-props dt { color: var(--muted); font-size: 13px; } .req-props dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.req-bank { border: 1px dashed var(--accent-line); border-radius: 10px; padding: 8px 12px; }
.req-bank legend { font-size: 12px; color: var(--accent-ink); font-weight: 600; padding: 0 4px; }
.row-gap.nowrap { flex-wrap: nowrap; }
.self-end { align-self: flex-end; margin-bottom: 4px; }
.stack-xs { display: flex; flex-direction: column; gap: 2px; }
.tiers { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin: 8px 0; }
.tier { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #F7F8FA; border-radius: 10px; padding: 8px 10px; width: 100%; }
.tier input[inputmode=numeric] { width: 150px; }
.tier-range { min-width: 150px; font-size: 13px; font-weight: 600; }
.tier-steps { display: inline-flex; gap: 14px; margin-left: auto; }
.team-tier { padding: 6px 0; border-bottom: 1px solid var(--line2); }
.team-tier .check .sq { margin-right: 2px; }
.pad-top { margin-top: 14px; }
.vat-new { width: 90px; min-height: 30px; }
.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; z-index: 2; }
@media (max-width: 760px) {
  .req-props { grid-template-columns: 1fr; gap: 2px; } .req-props dd { margin-bottom: 8px; }
  .tier-steps { margin-left: 0; } .tier input[inputmode=numeric] { width: 120px; }
  .row-gap.nowrap { flex-wrap: wrap; }
}

/* ---------- Hướng dẫn sử dụng ---------- */
.help-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent); padding: 3px 9px 3px 4px;
  border: 1px solid var(--accent-line); border-radius: 14px; background: #fff; white-space: nowrap; vertical-align: middle; }
.page-head > .help-link { margin-right: auto; }
.help-link span { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.help-link:hover { background: var(--accent-soft); }
h1 + .help-link { margin-left: 4px; }
.help-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.help-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; max-height: calc(100vh - 110px); overflow: auto; padding-bottom: 12px; }
.help-nav .ns { color: var(--muted); margin: 10px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.help-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 14px; }
.help-item:hover { background: #EEF0F3; } .help-item.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.help-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.flows { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.flow { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.flow:hover { border-color: var(--accent-line); background: #F7FCFB; }
.flow ol { margin: 0; padding: 0; list-style: none; counter-reset: f; display: flex; flex-direction: column; gap: 6px; }
.flow li { counter-increment: f; display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; font-size: 13px; }
.flow li::before { content: counter(f); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 10px; }
.help-card { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.help-card:hover { border-color: var(--accent-line); }
.help-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.help-article { display: flex; flex-direction: column; gap: 10px; }
.help-article .row-between.wrap { flex-wrap: wrap; }
.help-summary { margin: 0; font-size: 15px; color: var(--ink2); }
.help-sec { border-top: 1px solid var(--line2); padding-top: 12px; }
.help-sec h3 { font-size: 15px; margin-bottom: 6px; } .help-sec p { margin: 0 0 6px; line-height: 1.6; }
.help-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; line-height: 1.55; }
.help-steps li::marker { color: var(--accent); font-weight: 700; }
.help-tips { margin-top: 8px; background: #FFF8E6; border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.help-pager { border-top: 1px solid var(--line2); padding-top: 10px; gap: 12px; }
.only-mobile-inline { display: none; }
@media (max-width: 860px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-nav { position: static; max-height: none; }
  .help-layout.reading .help-nav { display: none; }
  .only-mobile-inline { display: inline-flex; align-items: center; gap: 4px; }
}

/* ---------- Chấm công › Cài đặt (#/att): giao diện tối mặc định, ưu tiên điện thoại ---------- */
.content.att-dark {
  --ink: #E8EEEE; --ink2: #C5D0D0; --muted: #93A3A3; --line: #24403F; --line2: #1B3433;
  --bg: #0B1C1C; --card: #112827; --accent: #2EC4BB; --accent-ink: #9FD6D0; --accent-soft: #2EC4BB1F; --accent-line: #2E6E6A;
  --field: #0E2221; --field-line: #2D4F4D; --hover: #183634;
  background: var(--bg); color: var(--ink);
}
.content.att-dark input, .content.att-dark select, .content.att-dark textarea { background: var(--field); border-color: var(--field-line); color: var(--ink); color-scheme: dark; }
.content.att-dark select:disabled, .content.att-dark input:disabled { background: #0C1D1D; color: var(--muted); }
.content.att-dark .btn { background: var(--card); border-color: var(--field-line); color: var(--ink); }
.content.att-dark .btn:hover, .content.att-dark .icon-btn:hover { background: var(--hover); }
.content.att-dark .btn.primary { background: var(--accent); border-color: var(--accent); color: #1F4A55; }
.content.att-dark .btn.primary:hover { background: var(--accent-ink); }
.content.att-dark .btn.ghost { background: transparent; border-color: transparent; }
.content.att-dark .chip, .content.att-dark .chip.grey { background: #1E3A39; color: var(--ink2); }
.content.att-dark .pill { background: var(--card); border-color: var(--field-line); }
.content.att-dark .pill.on { background: var(--accent); border-color: var(--accent); color: #1F4A55; }
.content.att-dark .tbl tr.grp td, .content.att-dark .tbl tr.clickable:hover td { background: var(--hover); }
.content.att-dark .errorbox { background: #3A1A14; color: #FFB4A3; }
.content.att-dark .hint-box { color: var(--ink2); }
.content.att-dark .modal { background: var(--card); color: var(--ink); }
.att .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.att .seg button { min-height: 32px; padding: 0 10px; border: 0; background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.att .seg button.on { background: var(--accent); color: #fff; }
.content.att-dark .att .seg button.on { color: #1F4A55; }
.att .hint-box.warn { background: #F7D1461F; border-color: #F7D14680; color: inherit; }
.att .warn-text { color: #C77700; font-weight: 600; } .content.att-dark .att .warn-text { color: var(--sun); }
.att .listrow.wrap, .att .row-between.wrap { flex-wrap: wrap; }
.att .grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 14px; }
.att .att-form { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 4px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.att .att-form .grid-auto { width: 100%; }
.att .inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att .inline-form input, .att .inline-form select { width: auto; flex: 1 1 140px; }
.att-matrix-wrap, .att .tbl-wrap { overflow-x: auto; margin-top: 8px; -webkit-overflow-scrolling: touch; }
.att-matrix { min-width: 760px; }
.att-matrix th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 190px; }
.att-matrix td { text-align: center; white-space: nowrap; }
.att-matrix td.on { background: var(--accent-soft); }
.att-matrix td .check { justify-content: center; padding: 0; }
.att-matrix tr.grp-first th, .att-matrix tr.grp-first td { border-top: 2px solid var(--line); }
.att-matrix .scope-sel { min-height: 28px; font-size: 12px; padding: 0 4px; width: auto; margin-top: 4px; }
.att-steps { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.att-step { padding: 10px 12px; border-left: 3px solid var(--accent); }
.att-step.dragging { opacity: .5; }
.att-step-head { display: flex; align-items: center; gap: 8px; }
.att-step-head .handle { cursor: grab; color: var(--muted); font-weight: 700; letter-spacing: -2px; user-select: none; padding: 4px; }
.att-step-head .step-no { font-weight: 700; font-size: 13px; white-space: nowrap; }
.att-conds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.att-conds .cond { display: inline-flex; gap: 4px; align-items: center; }
.att-conds .cond select, .att-conds .cond input { width: auto; min-height: 32px; }
.att-conds .num-in { width: 64px !important; }
.att .icon-btn.sm { width: 30px; height: 30px; }
.att-route li.skipped { opacity: .6; }
.att-route li.escalated { border-left-color: var(--sun); }
.att .grow1 { flex: 1 1 320px; min-width: 0; } .att .grow2 { flex: 2 1 480px; min-width: 0; }
.att-pol-list { flex: 1 1 260px; max-width: 360px; }
.att .pol-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px; border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.att .pol-item:hover { background: var(--accent-soft); } .att .pol-item.on { border-color: var(--accent); background: var(--accent-soft); }
.att .chip.st-draft { background: #8A8F9826; } .att .chip.st-pending { background: #F7D14633; } .att .chip.st-active { background: #2EC4BB33; } .att .chip.st-retired { opacity: .7; }
.att .chip.law-label { background: #F7D14633; color: inherit; font-weight: 600; }
.att .sig-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.att-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.att .param-grp { border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px 10px; margin: 0; min-width: 0; }
.att .param-grp legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.att .param { padding: 2px 0 6px; border-radius: 6px; }
.att .param.changed { box-shadow: inset 3px 0 0 var(--sun); padding-left: 8px; }
.att .param .law { color: var(--accent-ink); }
.att .check.wd { padding: 2px 0; }
.att-diff { margin: 14px 0; }
.att-diff select { width: auto; }
.att .money-in { width: 140px; }
.att .hday { min-width: 120px; }
@media (max-width: 760px) {
  .att .page-head { align-items: flex-start; }
  .att-pol-list { max-width: none; }
  .att .grid2 { grid-template-columns: 1fr; }
  .att .att-step-head input { min-width: 0; }
}

/* Tài chính show: đề xuất phiên bản ngân sách chờ BGĐ duyệt, điều kiện quyết toán */
.chip.fin-pending { background: #F7D14633; color: #7A4F00; }
.fin-pending-val { color: #9A6400; font-weight: 600; }
.fin-ver.pending { border-left: 3px solid var(--sun); padding-left: 8px; }
.fin-ver.rejected summary { opacity: .75; }
.fin-changes { margin: 6px 0 10px; padding-left: 18px; font-size: 13px; }
.fin-changes li { margin-bottom: 6px; }
.fin-blockers ul { margin: 4px 0 0; padding-left: 18px; }
.att .time-in { width: auto; min-height: 32px; margin-left: 6px; }
.att .att-team-pol .sq { margin-right: 2px; }

/* ---------- Bảng tin ---------- */
.ann-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #FDE8E4; color: #7A2A16; border: 1px solid #F3B8AC;
  border-left: 5px solid var(--late); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.ann-banner > svg { color: var(--late); }
.ann-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-left: 4px solid var(--line); transition: box-shadow .15s; }
.ann-card:hover { box-shadow: 0 2px 10px #0000000F; }
.ann-card.lv-important { border-left-color: #E09A2B; } .ann-card.lv-urgent { border-left-color: var(--late); }
.ann-card.unread .ann-title { color: var(--accent-ink); }
.ann-title { font-size: 19px; margin: 0; overflow-wrap: anywhere; }
.ann-excerpt { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann-detail { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 16px; border-top: 4px solid var(--line); }
.ann-detail.lv-important { border-top-color: #E09A2B; } .ann-detail.lv-urgent { border-top-color: var(--late); }
.ann-h { font-size: 28px; overflow-wrap: anywhere; }
.ann-files { border-top: 1px solid var(--line2); }
.ann-stat-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px; margin: 8px 0 14px; }
.ann-big { font-size: 30px; line-height: 1; }
.ann-people { max-height: 360px; overflow: auto; }
.ann-preview { border: 1px solid #D5D8DD; border-radius: 8px; padding: 8px 12px; min-height: 160px; }
.ann-teams { margin-top: 8px; gap: 4px 16px; }
.md { overflow-wrap: anywhere; line-height: 1.6; font-size: 15px; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote { margin: 0 0 10px; }
.md h3, .md h4, .md h5 { margin: 14px 0 6px; } .md h3 { font-size: 18px; } .md h4 { font-size: 16px; } .md h5 { font-size: 15px; }
.md ul, .md ol { padding-left: 22px; }
.md blockquote { border-left: 3px solid var(--accent-line); padding: 2px 0 2px 12px; color: var(--ink2); }
.md code { background: #EEF0F3; border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.md a { color: var(--accent); text-decoration: underline; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---------- Phân quyền ---------- */
.acl-roles { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; margin-top: 12px; }
.acl-role-list { padding: 10px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 8px; }
.acl-role { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; }
.acl-role:hover { background: #F4F6F7; } .acl-role.on { background: var(--accent-soft); border-color: var(--accent-line); }
.acl-role-detail .h2-sm { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.acl-perm { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.acl-perm.on { background: #F6FBFA; }
.acl-perm .check { align-items: flex-start; }
.acl-perm .chip { margin-left: 6px; }
.scope-sel { width: auto; min-height: 30px; font-size: 13px; padding: 0 6px; }
.chip.acl-sens { background: #FDE8E4; color: #A33A1F; }
.info-box { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 8px; padding: 10px 12px; }
.acl-person { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-top: 1px solid var(--line2); background: none; cursor: pointer; flex-wrap: wrap; }
.acl-person:hover { background: #F7F8FA; }
.acl-chips { justify-content: flex-end; }
.acl-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr auto; gap: 8px; margin-top: 8px; }
.acl-form:has(> select + select) { grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr auto; }
.acl-eff td { vertical-align: top; }
@media (max-width: 760px) {
  .acl-roles { grid-template-columns: 1fr; }
  .acl-role-list { position: static; }
  .acl-form, .acl-form:has(> select + select) { grid-template-columns: 1fr 1fr; }
  .acl-form > select:first-child, .acl-form > button { grid-column: 1 / -1; }
}

/* ---------- Menu: nhóm Cài đặt sổ ra mục con ---------- */
.nl-group { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; text-align: left; margin-top: 10px; }
.nl-group.has-on { color: #fff; font-weight: 600; }
.nl-chev { margin-left: auto; transition: transform .15s; opacity: .8; }
.nl-group .nb + .nl-chev { margin-left: 6px; }
.nl-chev.open { transform: rotate(90deg); }
.nl-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 14px; padding-left: 10px; border-left: 1px solid rgba(127,227,216,.22); }
.nl.sub { min-height: 34px; font-size: 13.5px; }
.nl.sub.on::before { left: -21px; }

/* ---------- Menu gọn: mọi nhóm dùng chung kiểu nhóm "Cài đặt" (.nl-group / .nl-sub) ---------- */
.side .nl-group { margin-top: 6px; }
.nl .nl-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl .nb { margin-left: 0; }
.nl-sub .sq { width: 18px; height: 18px; font-size: 10px; border-radius: 4px; }
.nl-mini-toggle { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; text-align: left; color: rgba(255,255,255,.55); font-size: 13px; min-height: 32px; margin-bottom: 4px; }
.nl-mini-toggle:hover { color: #fff; }
/* Menu nổi khi menu chỉ còn icon */
.nl-fly { position: fixed; z-index: 60; min-width: 220px; max-height: 70vh; overflow-y: auto; padding: 8px; border-radius: 12px;
  background: var(--stage); border: 1px solid rgba(127,227,216,.25); box-shadow: 0 16px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 2px; }
.nl-fly-title { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); padding: 4px 10px 6px; }
.nl-fly .nl.on::before { display: none; }
/* Menu chỉ còn icon (máy tính) */
@media (min-width: 761px) {
  .shell.mini { --side: 68px; }
  .shell.mini .side { width: 68px; overflow-x: hidden; }
  .shell.mini .side-head, .shell.mini .side-scroll { padding-left: 8px; padding-right: 8px; }
  .shell.mini .side .brand { padding: 8px 2px 18px; }
  .shell.mini .side .brand-logo { height: 22px; width: 26px; object-fit: cover; object-position: left center; margin: 0 auto; }
  .shell.mini .side .brand-tag, .shell.mini .side-scroll > .ns { display: none; }
  /* chỉ áp cho mục trực tiếp của menu — menu nổi (.nl-fly) giữ nguyên chữ */
  .shell.mini .side-scroll > .nl { justify-content: center; padding: 0; gap: 0; }
  .shell.mini .side-scroll > .nl .nl-label, .shell.mini .side-scroll > .nl .nl-chev, .shell.mini .side .side-foot .nl-label { display: none; }
  .shell.mini .side-scroll > .nl .nb { position: absolute; top: 3px; right: 6px; font-size: 10px; padding: 0 5px; line-height: 16px; }
  .shell.mini .side-scroll > .nl.on::before { left: -8px; }
  .shell.mini .side .side-foot { flex-direction: column; padding: 12px 0 0; }
}
@media (max-width: 760px) {
  .nl-mini-toggle { display: none; }
  .bottombar .badge.soft { background: var(--accent); }
}

/* Đăng nhập bằng mã email */
.email-code { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.email-code .form { gap: 10px; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted, #6b7280); font-size: 12px; margin: 4px 0; }
.login-or::before, .login-or::after { content: ''; flex: 1; border-top: 1px solid var(--line, #e5e7eb); }
.otp-input { font-size: 24px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.otp-input::placeholder { letter-spacing: normal; font-size: 16px; }

/* Màn khoá: "Đổi người sử dụng" là dòng chữ nhỏ, nhạt, không viền / nền, cuối thẻ */
.switch-user { align-self: center; margin-top: 2px; padding: 6px 10px; border: 0; background: none; box-shadow: none;
  font-size: 13px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.switch-user:hover { text-decoration: underline; }
.login > .overlay { position: fixed; z-index: 50; }
.login .modal { text-align: left; max-width: 400px; }
.confirm-text { margin: 10px 0 0; font-size: 15px; overflow-wrap: anywhere; }

/* Màn đăng nhập / khoá theo chế độ tối của máy */
@media (prefers-color-scheme: dark) {
  .login-card, .login .modal {
    --ink: #E8EEEE; --ink2: #C9D3D3; --muted: #9AABAA; --line: #2B4443; --line2: #22393A;
    color: var(--ink); color-scheme: dark;
  }
  .login-card { background: rgba(14,30,30,.96); border-color: rgba(127,227,216,.14); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
  .login .modal { background: #112423; }
  .login .overlay { background: rgba(0,0,0,.55); }
  .login-card .btn:not(.primary), .login .modal .btn:not(.primary) { background: #18302F; border-color: #2E4A49; color: var(--ink); }
  .login-card .btn:not(.primary):hover, .login .modal .btn:not(.primary):hover { background: #20403E; }
  .login-card .btn.primary, .login .modal .btn.primary { color: #1F4A55; background: var(--mint); border-color: var(--mint); }
  .login-card input, .login-card select { background: #0C1D1D; border-color: #2E4A49; color: var(--ink); }
  .login-card .errorbox { background: #3A1A14; color: #FFB4A3; }
  .login .icon-btn { color: var(--ink); }
}

.email-code .form { display: flex; flex-direction: column; gap: 10px; }

/* Màn đăng nhập kiểu TikTok: danh sách nút cách đăng nhập cùng kiểu, icon trái, chữ giữa */
.methods { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.btn.method { position: relative; width: 100%; min-height: 52px; padding: 0 48px; font-size: 15px; font-weight: 600; border-color: #D5D8DD; border-radius: 12px; background: #fff; }
.btn.method:hover { background: #F7F8FA; }
.btn.method .mi { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); }
.btn.method .last-tag { position: absolute; right: 10px; top: -9px; font-size: 11px; line-height: 16px; font-weight: 600; padding: 0 8px; border-radius: 999px; background: var(--accent); color: #fff; }
@media (max-width: 380px) { .btn.method { padding: 0 44px; font-size: 14px; } .btn.method .mi { left: 14px; } }
@media (max-width: 359px) { .login-card { padding: 24px 18px; } .btn.method { padding: 0 12px 0 44px; } }
.login-step-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40px; }
.login-step-head h1 { font-size: 26px; padding: 0 40px; }
.back-btn { position: absolute; left: -8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.back-btn:hover { background: var(--line2); }
@media (prefers-color-scheme: dark) {
  .login-card .btn.method .last-tag { background: var(--mint); color: #1F4A55; }
}

/* Tích hợp Google Drive */
.integ-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.integ-head { display: flex; align-items: center; gap: 14px; }
.integ-logo { width: 48px; height: 48px; border-radius: 12px; background: #F4F7F7; display: grid; place-items: center; flex-shrink: 0; }
.integ-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.integ-steps { margin: 0; padding-left: 20px; line-height: 1.7; }
.integ-log ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.integ-log li.error { color: var(--late); } .integ-log li.warn { color: #9A6700; }
.integ-log summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.chip.bad { background: #FDE8E4; color: #A33A1F; }
.bad-text { color: var(--late); }
.qbar { display: block; height: 8px; border-radius: 99px; background: var(--line2); overflow: hidden; margin-top: 6px; }
.qbar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.qbar.amber > span { background: #E6A700; } .qbar.red > span { background: var(--late); }
.qbar.small { width: 120px; margin: 0; flex-shrink: 0; }
.drive-files, .drive-empty { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.drive-empty { align-items: flex-start; }
.drive-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.drive-ups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.drive-ups li { display: flex; align-items: center; gap: 10px; font-size: 13px; min-width: 0; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.drive-files .ficon { vertical-align: -3px; margin-right: 6px; }
.drive-none { padding: 8px 0; }

/* Nhân sự chia theo phòng ban + bảng quyền từng người */
.people-group { display: flex; flex-direction: column; gap: 8px; }
.people-group-head { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 15px; }
.people-group-head .sq { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tbl tr.clickable { cursor: pointer; } .tbl tr.clickable:hover td { background: #FAFBFB; }
.nowrap { white-space: nowrap; }
.mperms { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.mperms-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.role-chip { background: #fff; border: 1px solid; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.role-chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0 2px; }
.mperms-help { margin: 0; line-height: 1.6; }
.mperms-group { padding: 6px 16px; }
.mperms-head { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); padding: 10px 0 8px; border-bottom: 1px solid var(--line2); }
.mperm { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line2); cursor: pointer; line-height: 1.5; }
.mperm:last-child { border-bottom: 0; }
.mperm input[type=checkbox] { width: 22px; height: 22px; flex-shrink: 0; }
.mperm.locked { cursor: default; opacity: .75; }
.mperm-lock { margin-left: 6px; color: var(--muted); vertical-align: -1px; }
.tag-role, .tag-extra, .tag-denied, .tag-pending { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-role { background: #EEF1F0; color: #3F5A55; }
.tag-extra { background: #E3F4EA; color: #1B6B3A; }
.tag-denied { background: #FDE8E4; color: #A33A1F; }
.tag-pending { background: #FFF4D6; color: #8A5A00; }

/* ---------- Hỏi nhanh trong nghiệp vụ: khung chat trượt bên phải (điện thoại: toàn màn hình) ---------- */
.qc-wrap { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
.qc-backdrop { position: absolute; inset: 0; background: rgba(20,22,26,.18); pointer-events: auto; }
.qc-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--card); pointer-events: auto;
  box-shadow: -10px 0 32px rgba(0,0,0,.18); display: flex; flex-direction: column; animation: qc-in .18s ease-out; }
.qc-panel > .chat-conv { flex: 1; height: 100%; }
.qc-loading { flex: 1; display: flex; align-items: center; justify-content: center; }
.chat-conv.embed .chat-head { padding: 8px 10px 8px 14px; min-height: 54px; gap: 6px; }
.chat-conv.embed .chat-title { font-size: 17px; }
@keyframes qc-in { from { transform: translateX(24px); } to { transform: none; } }
@media (max-width: 760px) {
  .qc-panel { width: 100%; animation-name: qc-up; padding-bottom: env(safe-area-inset-bottom); }
  @keyframes qc-up { from { transform: translateY(24px); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .qc-panel { animation: none; } }
.msg-icon { color: var(--muted); vertical-align: middle; margin-left: 2px; width: 26px; height: 26px; }
.msg-icon:hover { color: var(--accent-ink, var(--brand)); background: var(--accent-soft); }
.with-msg { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.ask-wrap { position: relative; display: inline-block; }
.ask-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 35; min-width: 260px; max-width: min(320px, calc(100vw - 32px)); max-height: 340px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 6px; }
.modal .ask-pop, .card .ask-pop { left: 0; right: auto; }
.page-head .ask-pop { right: 0; left: auto; }
.ask-head { padding: 4px 8px 6px; }
.ask-empty { padding: 8px; }
.ask-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 8px; text-align: left; color: inherit; cursor: pointer; }
.ask-item:hover, .ask-item:focus-visible { background: var(--accent-soft); }
.ref-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-left: 3px solid var(--accent, var(--brand)); border-radius: 10px;
  padding: 7px 10px; margin-top: 6px; background: var(--card); max-width: 420px; width: 100%; color: inherit; text-decoration: none; }
a.ref-card:hover { border-color: var(--accent-line); }
.ref-card .grow { min-width: 0; }
.ref-card .clamp1 { display: block; }
.ref-card.hidden { border-left-color: var(--line); }
.composer-ref { background: var(--accent-soft); }
.req-comments .cmt-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.req-comments .cmt { display: flex; gap: 10px; align-items: flex-start; }
.cmt-new { display: flex; gap: 8px; align-items: flex-end; }
.cmt-new textarea { flex: 1; min-height: 44px; resize: vertical; }
.team-color { border: 2px solid transparent; cursor: pointer; }
.team-color.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }

/* ---------- Chấm công 1 chạm (Face ID + GPS + QR) ---------- */
.only-mobile-block { display: none; }
@media (max-width: 760px) { .only-mobile-block { display: block; } }
.punch-home { margin: 0 0 16px; }
.punch-home > .link { display: block; text-align: center; margin-top: 8px; }
.punch { position: relative; display: flex; flex-direction: column; gap: 10px; }
.punch-btn { width: 100%; min-height: 132px; border: 0; border-radius: 22px; cursor: pointer; color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; padding: 18px; font: inherit; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(135deg, #3A8F88, var(--accent) 55%, #0A4F4C); box-shadow: 0 14px 30px -12px rgba(0,128,122,.6); transition: transform .12s; }
.punch-btn.out { background: linear-gradient(135deg, #FF8A65, #E8573F 55%, #9C2F1F); box-shadow: 0 14px 30px -12px rgba(200,70,40,.55); }
.punch-btn:active { transform: scale(.98); }
.punch-btn:disabled { opacity: .85; cursor: progress; }
.punch-lbl { font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1; }
.punch-sub { font-size: 13px; opacity: .9; }
.punch.compact .punch-btn { min-height: 96px; } .punch.compact .punch-lbl { font-size: 24px; }
.punch-spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.punch-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; font-size: 13px; text-align: center; }
.queue-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: #FFF4E5; color: #8A4B00; font-weight: 600; font-size: 12px; }
.warn-chip { background: #FFF4E5; color: #8A4B00; margin-left: 4px; }
.late-chip { background: #FDE8E4; color: #A33A1F; }
.punch-done { position: absolute; inset: 0 0 auto 0; min-height: 132px; border-radius: 22px; background: #1B6B3A; color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 14px; animation: pop .25s ease-out; z-index: 2; }
.punch-done.flag { background: #B26A00; } .punch-done.queued { background: #37474F; }
.punch-done b { font-family: var(--display); font-size: 26px; font-weight: 900; }
.punch-done span { font-size: 13px; opacity: .92; }
.punch-check { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; margin-bottom: 4px; }
@keyframes pop { from { transform: scale(.94); } to { transform: none; } }
/* Face ID khi chấm công */
.punch-btn.scanning { box-shadow: 0 0 0 4px rgba(31,91,168,.25), 0 0 0 10px rgba(31,91,168,.10); animation: uvpulse 1.2s ease-in-out infinite; }
@keyframes uvpulse { 50% { box-shadow: 0 0 0 6px rgba(31,91,168,.32), 0 0 0 16px rgba(31,91,168,.06); } }
.punch-done .uv-ok, .punch-done .uv-no { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-weight: 700; opacity: 1; }
.punch-done .uv-ok { background: rgba(255,255,255,.18); } .punch-done .uv-no { background: #fff; color: #8A4B00; }
.faceid-nudge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: #EEF4FC; color: #173F73; }
.faceid-nudge.req { background: #FFF4E5; color: #8A4B00; } .faceid-nudge .btn { white-space: nowrap; }
.uv-chip { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; font-size: 11px; }
.uv-chip.ok { background: #E3F4EA; color: var(--ok); } .uv-chip.no { background: #FFF4E5; color: #8A4B00; } .uv-chip.ex { background: #EDEFF2; color: #455A64; }
.uv-day { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; margin: 0 4px; }
.uv-day.ok { color: var(--ok); } .uv-day.no { color: #B26A00; }
.cal-uv { position: absolute; top: 6px; left: 6px; width: 7px; height: 7px; border-radius: 2px; background: #B26A00; }
.uv-pct { font-weight: 700; } .uv-pct.ok { color: var(--ok); } .uv-pct.mid { color: #B26A00; } .uv-pct.low { color: var(--late); }
.uv-mode { flex-wrap: wrap; justify-content: flex-end; }
.uv-exempt-form { display: grid; gap: 8px; margin-top: 10px; } .uv-exempt-form select, .uv-exempt-form input:not([type=date]) { width: 100%; }
@media (prefers-reduced-motion: reduce) { .punch-done, .punch-btn { animation: none; transition: none; } }
.punch-row .dir-dot { flex: none; min-width: 38px; text-align: center; font-size: 12px; font-weight: 700; padding: 3px 6px; border-radius: 8px; background: #E3F4EA; color: #1B6B3A; }
.punch-row .dir-dot.out { background: #FDE8E4; color: #A33A1F; }
.punch-row .reasons { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.punch-row .reasons .chip { margin: 0; }
.okbox { display: flex; gap: 8px; align-items: center; background: #E3F4EA; color: #1B6B3A; padding: 10px 12px; border-radius: 10px; }
.consent ul { padding-left: 18px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.selfie-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.selfie-preview { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; }
.flag-row { border-bottom: 1px solid var(--line); padding: 6px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.flag-row .listrow { border: 0; padding-bottom: 0; }
/* Màn hình mã QR toàn màn hình (trưởng show) */
.qr-screen { position: fixed; inset: 0; z-index: 70; background: #1F4A55; color: #fff; display: flex; flex-direction: column; }
.qr-head { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; border-bottom: 1px solid rgba(255,255,255,.12); }
.qr-head .icon-btn { color: #fff; } .qr-head .xs { opacity: .75; }
.qr-head .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; }
.qr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.qr-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; }
.qr-svg { width: min(78vmin, 560px); aspect-ratio: 1; background: #fff; border-radius: 16px; padding: 10px; }
.qr-svg svg { width: 100%; height: 100%; display: block; }
.qr-timer { width: min(78vmin, 560px); position: relative; height: 26px; border-radius: 13px; background: rgba(255,255,255,.12); overflow: hidden; }
.qr-bar { position: absolute; inset: 0 auto 0 0; background: var(--mint); opacity: .55; transition: width 1s linear; }
.qr-timer span { position: relative; display: block; text-align: center; line-height: 26px; font-size: 13px; font-weight: 600; }
.qr-list { background: #fff; color: var(--ink); overflow-y: auto; padding: 14px; }
@media (max-width: 760px) {
  .qr-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .qr-head .grow .xs { display: none; }
  .qr-list { border-radius: 16px 16px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
/* Bản đồ chọn vùng chấm công (ảnh nền OpenStreetMap) */
.mappick { position: relative; height: 260px; border-radius: 12px; overflow: hidden; background: #E8EEF0; touch-action: none; cursor: crosshair; user-select: none; }
.mappick img { position: absolute; width: 256px; height: 256px; pointer-events: none; }
.mappick .pin { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #E8573F; border: 2px solid #fff; box-shadow: 0 1px 4px #0006; }
.mappick .ring { position: absolute; border-radius: 50%; border: 2px solid #E8573F; background: rgba(232,87,63,.15); pointer-events: none; }
.mappick .map-ctl { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; }
.mappick .map-ctl button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #1d2327; font-size: 18px; cursor: pointer; }
.mappick .attrib { position: absolute; right: 4px; bottom: 2px; font-size: 10px; background: rgba(255,255,255,.8); padding: 0 4px; border-radius: 4px; }
/* Hộp thoại trên điện thoại: bàn phím mở thì vùng nội dung co theo màn hình còn lại (dvh), vẫn cuộn được */
@media (max-width: 760px) {
  .overlay { padding: 12px 8px; }
  .modal-body { max-height: calc(100dvh - 150px); }
}
.mappick .map-empty { position: absolute; left: 8px; bottom: 8px; font-size: 12px; background: rgba(255,255,255,.92); padding: 3px 8px; border-radius: 6px; color: #9A5B00; }
.btn-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block;
  animation: spin .7s linear infinite; margin-right: 6px; vertical-align: -2px; flex-shrink: 0; }
.site-loc { display: flex; flex-direction: column; gap: 8px; }
.site-loc .row-gap.nowrap { flex-wrap: nowrap; align-items: center; } .site-loc .row-gap.nowrap input { min-width: 0; }
.site-loc .row-gap.wrap { align-items: flex-end; } .site-loc .row-gap.wrap > .field { flex: 1; min-width: 220px; }
.site-loc .site-gps { margin-bottom: 10px; }
.field-note { font-size: 13px; border-radius: 8px; padding: 8px 10px; }
.field-note.warn { color: #8A4B00; background: #FFF6E5; } .field-note.ok { color: #1B6B3A; background: #E8F6EE; }
.field-note ul { margin: 6px 0; padding-left: 18px; }


/* ===== Chấm công đợt 3: công của tôi, hôm nay, lịch ca, điểm chấm công ===== */
.okbox { flex-wrap: wrap; }
.suggest-req { justify-content: space-between; }
.ok-text { color: var(--ok); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
/* màu trạng thái ngày công (dùng chung chip, lịch, chú thích) */
.st-ok { --st: #1B6B3A; --stb: #E3F4EA; } .st-late { --st: #8A4B00; --stb: #FFF1D6; } .st-missing { --st: #A33A1F; --stb: #FDE3DE; }
.st-not_in { --st: #A33A1F; --stb: #FFF; } .st-working { --st: #1B4550; --stb: #DDF3F1; } .st-leave { --st: #1F5BA8; --stb: #E3ECFA; }
.st-field { --st: #0D7C72; --stb: #D7F2EE; } .st-trip { --st: #6B3FA0; --stb: #EEE6F8; } .st-holiday { --st: #B4235A; --stb: #FBE4EE; }
.st-off { --st: #6B7280; --stb: #F1F2F4; } .st-future, .st-none { --st: var(--muted); --stb: transparent; }
.ts-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: var(--st); background: var(--stb); white-space: nowrap; }
.ts-chip.st-not_in { border: 1px dashed var(--st); }
.today-sheet .ts-grid, .day-detail .ts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; margin: 10px 0 6px; }
.ts-grid > div { display: flex; flex-direction: column; gap: 2px; background: var(--line2); border-radius: 10px; padding: 8px 10px; }
.ts-grid b { font-size: 17px; }
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; } .cal-nav b { min-width: 120px; text-align: center; }
.sum-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 12px; }
.sum-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sum-card span { font-size: 12px; color: var(--muted); } .sum-card b { font-size: 20px; } .sum-card small { font-size: 12px; color: var(--muted); font-weight: 500; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.cal-wd, .sched-wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-cell { position: relative; min-height: 74px; border: 1px solid var(--line2); border-radius: 10px; background: var(--stb, transparent); color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px; cursor: pointer; text-align: left; font: inherit; }
.cal-cell.empty { background: transparent; border: 0; cursor: default; }
.cal-cell:hover { border-color: var(--accent-line); } .cal-cell.today { box-shadow: inset 0 0 0 2px var(--accent); } .cal-cell.sel { outline: 2px solid var(--st, var(--accent)); }
.cal-n { font-weight: 700; font-size: 13px; } .cal-t { font-size: 11px; color: var(--st); font-weight: 600; line-height: 1.25; }
.cal-badge { font-size: 10px; font-weight: 700; color: #8A4B00; } .cal-flag { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 2px 16px; font-size: 12px; color: var(--muted); }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 5px; } .cal-legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--stb); border: 1px solid var(--st); }
.week-list { padding: 4px 0; } .day-row { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; padding: 10px 14px; }
.day-row .day-l { min-width: 70px; } .day-row:hover { background: var(--line2); }
.day-detail h3 { margin: 10px 0 4px; }
.chip.rs-pending { background: #FFF1D6; color: #8A4B00; } .chip.rs-approved { background: #E3F4EA; color: #1B6B3A; } .chip.rs-rejected { background: #FDE3DE; color: #A33A1F; }
.attach { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* bảng Hôm nay */
.board-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.board-filters select, .board-filters input[type=date] { max-width: 240px; }
.grp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.grp-chips button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; }
.grp-chips button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.grp-chips .g-late b, .grp-chips .g-absent b { color: var(--late); } .grp-chips button.on b { color: #fff; }
.board { padding: 2px 0; } .board-row { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; padding: 10px 14px; gap: 12px; }
.board-row:hover { background: var(--line2); } .board-time { text-align: right; min-width: 92px; }
.export-box .field { margin: 0; }
/* lịch ca */
.sched { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sched-day { min-height: 120px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.sched-month .sched-day { min-height: 92px; } .sched-day.today { border-color: var(--accent); }
.sched-day.droppable { border-style: dashed; } .sched-n { font-size: 12px; font-weight: 700; color: var(--muted); } .sched-n .only-mobile-inline { margin-right: 4px; }
.shift-card { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 1px solid #7c3aed40; border-left: 4px solid #7c3aed;
  background: #F4EEFE; border-radius: 8px; padding: 5px 7px; font: inherit; font-size: 12px; cursor: pointer; color: var(--ink); width: 100%; }
.shift-card.draft { border-style: dashed; background: var(--card); } .shift-card.warn { border-left-color: var(--coral); }
.shift-card[draggable=true] { cursor: grab; }
.chip.as-assigned { background: #FFF1D6; color: #8A4B00; } .chip.as-accepted { background: #E3F4EA; color: #1B6B3A; } .chip.as-swap_requested { background: #FDE3DE; color: #A33A1F; }
/* điểm chấm công: Wi-Fi */
.wifi-check { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.office-row { align-items: flex-start; }
.nets { flex-basis: 100%; margin: 4px 0 2px 0; padding: 8px 10px; background: var(--line2); border-radius: 10px; }
.nets-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .nets-head .btn { margin-left: auto; }
.net-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.chip.net-static_ip { background: #E3ECFA; color: #1F5BA8; } .chip.net-ddns { background: #EEE6F8; color: #6B3FA0; } .chip.net-learned { background: #FFF1D6; color: #8A4B00; }
.home-sites { margin-top: 14px; } .home-list .listrow select { max-width: 200px; }
.leave-types .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.content.att-dark .nets { background: #ffffff0d; }
@media (max-width: 760px) {
  .sum-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sum-card { padding: 8px 10px; } .sum-card b { font-size: 17px; }
  .cal { gap: 2px; padding: 4px; } .cal-cell { min-height: 54px; padding: 4px 3px; border-radius: 8px; }
  .cal-t { font-size: 9.5px; } .cal-badge { display: none; }
  .sched { grid-template-columns: 1fr; } .sched-wd { display: none; } .sched-day { min-height: 0; }
  .sched-month { grid-template-columns: repeat(7, minmax(0, 1fr)); } .sched-month .sched-wd { display: block; }
  .sched-month .shift-card span:not(:first-child) { display: none; }
  .board-time { min-width: 70px; } .page-head .row-gap { flex-wrap: wrap; }
}

/* ===== Chấm công 3b: tấm chấm nhanh, máy chấm công, tự đóng ===== */
.qp-wrap { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 60; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.qp-sheet { pointer-events: auto; width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 14px 40px #0003; padding: 12px; animation: qp-up .22s ease-out; }
.qp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .qp-head b { font-size: 15px; }
.qp-sheet .punch.compact { margin: 0; } .qp-sheet .punch-meta { display: none; }
@keyframes qp-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 761px) { .qp-wrap { bottom: 24px; justify-content: flex-end; padding-right: 24px; } }
.warn-card { border-color: #F7D14699; background: #FFF9EB; }
.content.att-dark .warn-card { background: #F7D14614; }
.term-row { align-items: flex-start; } .import-cols { margin-top: 10px; } .import-tbl tr.bad td { color: var(--muted); }
.cal-auto { font-size: 9.5px; font-weight: 700; color: #6B3FA0; text-transform: uppercase; letter-spacing: .02em; }
.chip.auto-chip { background: #EEE6F8; color: #6B3FA0; }
.um-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 14px; align-items: center; padding: 10px 0; border-top: 1px solid #F7D14655; }
.um-info { display: flex; flex-direction: column; gap: 2px; } .um-act { display: flex; gap: 8px; align-items: center; } .um-act > :first-child { flex: 1; min-width: 0; }
@media (max-width: 760px) { .um-row { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .term-row > .grow { flex-basis: calc(100% - 40px); } .term-row > .btn { margin-left: 30px; } }

/* ===================== Bán hàng ===================== */
.skanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); grid-template-columns: none; gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kb-col { background: #EEF1F3; border-radius: 12px; min-height: 160px; display: flex; flex-direction: column; border: 2px solid transparent; }
.kb-col.over { border-color: var(--accent-line); background: var(--accent-soft); }
.kb-head { padding: 10px 12px 8px; border-top: 4px solid #64748B; border-radius: 12px 12px 0 0; }
.kb-list { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 10px; }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; cursor: grab; }
.kb-card > a { display: flex; flex-direction: column; gap: 3px; }
.kb-money { display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; }
.kb-card.overdue { border-left: 3px solid var(--late); }
.kb-card.dragging { opacity: .45; }
.kb-move { min-height: 30px; font-size: 12px; padding: 0 6px; color: var(--muted); }
.kb-empty { text-align: center; padding: 18px 0; border: 1px dashed #CBD2D9; border-radius: 10px; }
.stage-seg { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
.stage-seg button { white-space: nowrap; }
.q-lines { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; }
.q-line { display: grid; grid-template-columns: 22px 180px minmax(160px, 1fr) 64px 80px 150px 130px 34px; gap: 8px; align-items: end; padding-bottom: 8px; border-bottom: 1px solid var(--line2); }
.q-line.with-cost { grid-template-columns: 22px 170px minmax(150px, 1fr) 60px 74px 130px 130px 130px 34px; }
.q-no { align-self: center; text-align: center; }
.q-nocost { color: var(--muted); white-space: nowrap; } .q-nocost input { width: 14px; height: 14px; }
.q-line.no-cost .q-num input[aria-label='Giá vốn đơn vị'] { border-color: #E8A39A; background: #FFF8F7; }
.q-num, .q-amt { display: flex; flex-direction: column; gap: 2px; }
.q-amt { text-align: right; align-items: flex-end; justify-content: flex-end; min-height: 38px; }
.q-total { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; max-width: 460px; margin-left: auto; }
.q-total .big { font-size: 17px; }
.r { text-align: right; }
.inst-row { display: grid; grid-template-columns: 52px auto 110px 150px minmax(140px, 1fr) 120px 34px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line2); }
.ar-list { display: flex; flex-direction: column; }
.ar-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.ar-row.overdue { background: #FFF6F5; } .ar-row.overdue .ar-amt { color: var(--late); }
.ar-due { display: flex; flex-direction: column; min-width: 92px; }
.ar-amt { min-width: 130px; text-align: right; }
.ct-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.ct-row.hl { background: var(--accent-soft); }
.hbar { flex: 1; height: 10px; background: #EEF0F3; border-radius: 5px; position: relative; overflow: visible; min-width: 60px; }
.hbar > span { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.hbar.tgt > i { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--coral); }
.dash-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.dash-lbl { width: 150px; flex-shrink: 0; font-size: 13px; }
.dash-v { min-width: 90px; text-align: right; font-size: 13px; }
/* Báo giá in / PDF */
.qdoc { background: #fff; color: #111; max-width: 820px; width: 100%; margin: 0 auto; padding: 40px 44px; border: 1px solid var(--line); border-radius: 6px; position: relative; font-size: 13px; }
.qdoc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 3px solid #2F7A74; }
.qdoc.mars .qdoc-head { border-bottom-color: #111; }
.qdoc-logo { height: 44px; max-width: 220px; object-fit: contain; }
.qdoc-co { display: flex; flex-direction: column; text-align: right; font-size: 12px; color: #444; }
.qdoc-title { text-align: center; margin: 24px 0 4px; font-size: 30px; letter-spacing: .08em; }
.qdoc-title::after { display: none; }
.qdoc-sub { text-align: center; color: #555; margin-bottom: 18px; }
.qdoc-draft { position: absolute; top: 140px; right: 44px; border: 2px solid #C62828; color: #C62828; font-weight: 800; padding: 2px 10px; transform: rotate(-8deg); }
.qdoc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.qdoc-parties > div, .qdoc-foot > div, .qdoc-note { display: flex; flex-direction: column; gap: 2px; }
.qdoc-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #777; }
.qdoc-tbl { width: 100%; border-collapse: collapse; }
.qdoc-tbl th { background: #F1F5F5; text-align: left; font-size: 12px; padding: 8px; border-bottom: 1px solid #ccc; }
.qdoc.mars .qdoc-tbl th { background: #F2F2F2; }
.qdoc-tbl td { padding: 8px; border-bottom: 1px solid #e5e5e5; vertical-align: top; }
.qdoc-tbl tfoot td { border: 0; padding: 5px 8px; text-align: right; }
.qdoc-tbl tfoot tr.sum td { font-weight: 800; font-size: 15px; border-top: 2px solid #111; }
.qdoc-cat { display: block; font-size: 11px; color: #777; }
.qdoc-note { margin-top: 16px; white-space: pre-wrap; }
.qdoc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.qdoc-sign { text-align: center; align-items: center; min-height: 110px; }
@media print {
  @page { size: A4; margin: 12mm; }
  body.print-doc { background: #fff; }
  body.print-doc .side, body.print-doc .topbar, body.print-doc .bottombar, body.print-doc .no-print, body.print-doc .toasts,
  body.print-doc .qp-wrap, body.print-doc .qc-wrap, body.print-doc .scrim, body.print-doc .content > :not(.page) { display: none !important; }
  body.print-doc .shell, body.print-doc .main-col, body.print-doc .content { display: block !important; padding: 0 !important; margin: 0 !important; overflow: visible !important; height: auto !important; }
  body.print-doc .qdoc { border: 0; padding: 0; max-width: none; }
  .qdoc-tbl tr { break-inside: avoid; }
}
@media (max-width: 760px) {
  .skanban { grid-auto-columns: 82%; scroll-snap-type: x mandatory; } .kb-col { scroll-snap-align: start; }
  .q-line, .q-line.with-cost { grid-template-columns: 1fr 1fr; align-items: stretch; background: #FAFBFB; padding: 10px; border: 1px solid var(--line2); border-radius: 10px; }
  .q-line .q-no { display: none; } .q-line .q-desc { grid-column: 1 / -1; } .q-line > select { grid-column: 1 / -1; }
  .q-amt { align-items: flex-start; text-align: left; }
  .inst-row { grid-template-columns: 1fr 1fr; background: #FAFBFB; padding: 10px; border-radius: 10px; margin-bottom: 6px; }
  .ar-row { flex-wrap: wrap; gap: 8px 12px; } .ar-row > .grow { flex-basis: 100%; } .ar-amt { min-width: 0; text-align: left; }
  .ct-row { flex-wrap: wrap; } .ct-row > .grow { flex-basis: 100%; }
  .filters .search-inline { flex-basis: 100%; order: 3; }
  .dash-lbl { width: 96px; } .dash-v { min-width: 70px; }
  .qdoc { padding: 20px 16px; } .qdoc-parties, .qdoc-foot { grid-template-columns: 1fr; } .qdoc-co { display: none; }
  .qdoc-tbl th:nth-child(4), .qdoc-tbl td:nth-child(4) { display: none; } .qdoc-tbl tfoot td[colspan] { text-align: left; }
}

/* ===================== Nghệ sĩ & booking ===================== */
.t-photo { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.t-ph { background: linear-gradient(135deg, #1F4A55, #275C69); color: #fff; font-weight: 800; font-family: var(--display); }
.t-warn { background: #FFF6E9; border: 1px solid #F3C98B; color: #8A4B00; border-radius: 10px; padding: 8px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.t-month { min-width: 120px; text-align: center; font-size: 15px; }
.t-legend { display: inline-flex; gap: 6px; align-items: center; }
.t-legend .t-ev { --c: #5F6368; width: auto; }
.t-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.t-cal-h { background: #F7F8FA; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; }
.t-cal-d { background: #fff; min-height: 96px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.t-cal-d.out { background: #FAFBFB; } .t-cal-d.out .t-cal-n { color: #B0B5BB; }
.t-cal-d.today .t-cal-n { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 6px; }
.t-cal-n { font-size: 12px; font-weight: 600; align-self: flex-start; }
.t-ev { --c: #275C69; display: block; width: 100%; text-align: left; font-size: 11.5px; line-height: 1.3; padding: 2px 5px; border-radius: 5px; cursor: pointer;
  border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); color: #1F2329; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-ev.hold { border-style: dashed; background: #fff; }
.t-ev.confirmed { background: var(--c); color: #fff; } .t-ev.confirmed .t-ev-a { color: #fff; }
.t-ev.done { background: #EEF0F3; border-color: #C9CDD3; color: var(--muted); }
.t-ev-a { font-weight: 700; color: var(--c); }
.t-agenda { display: none; flex-direction: column; gap: 8px; }
.t-ag-day { display: flex; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.t-ag-day.today { border-color: var(--accent); }
.t-ag-date { display: flex; flex-direction: column; align-items: center; min-width: 34px; }
.t-ag-date b { font-size: 20px; font-family: var(--display); }
.t-ag-list { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.t-ag-ev { --c: #275C69; text-align: left; border: 0; border-left: 4px solid var(--c); background: #F7F8FA; border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.t-ag-ev.hold { border-left-style: dashed; background: #fff; outline: 1px dashed #C9CDD3; }
.t-artists { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.t-artist { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.t-artist:hover { border-color: #C9CDD3; }
.t-hero { display: flex; gap: 16px; align-items: center; padding: 16px 20px; flex-wrap: wrap; }
.t-dl { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; margin: 0; font-size: 13px; }
.t-dl dt { color: var(--muted); } .t-dl dd { margin: 0; }
.t-rider { margin: 10px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.t-rider-row { display: grid; grid-template-columns: 180px 1fr 80px 1fr 34px; gap: 6px; margin-bottom: 6px; }
.t-crew-row { display: grid; grid-template-columns: 1fr 1fr 140px 34px; gap: 6px; margin-bottom: 6px; }
.t-pay-row { display: grid; grid-template-columns: 70px 150px 150px 1fr 34px; gap: 6px; margin: 6px 0; }
.t-itin-row { display: grid; grid-template-columns: 150px 110px 150px 1fr 34px; gap: 6px; margin-bottom: 6px; }
.t-pair-row { display: grid; grid-template-columns: 1fr auto 1fr 80px auto 34px; gap: 6px; align-items: center; max-width: 640px; }
.t-date { display: flex; flex-direction: column; align-items: center; min-width: 42px; padding: 4px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); }
.t-date b { font-size: 18px; line-height: 1; font-family: var(--display); }
.t-money { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; background: #F7F8FA; border-radius: 10px; padding: 12px; margin: 10px 0; }
.t-money > div { display: flex; flex-direction: column; }
.t-check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.t-heat td { text-align: center; font-weight: 600; } .t-heat td:first-child { text-align: left; }
.qdoc-list { margin: 4px 0 0; padding-left: 18px; columns: 2; font-size: 12.5px; }
.pre { white-space: pre-wrap; }
@media (max-width: 760px) {
  .t-cal { display: none; } .t-agenda { display: flex; }
  .t-rider-row, .t-crew-row, .t-pay-row, .t-itin-row { grid-template-columns: 1fr 1fr; background: #FAFBFB; padding: 8px; border-radius: 10px; }
  .t-pair-row { grid-template-columns: 1fr auto 1fr; }
  .t-hero h1 { font-size: 26px; }
  .t-dl { grid-template-columns: 100px 1fr; }
  .qdoc-list { columns: 1; }
}

/* ===================== Ngày show ===================== */
.sd-total { font-size: 15px; min-height: 38px; display: flex; align-items: center; }
.sd-ros-wrap { overflow-x: auto; }
.sd-ros { width: 100%; border-collapse: collapse; min-width: 1100px; }
.sd-ros th { text-align: left; font-size: 12px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sd-ros td { padding: 6px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.sd-ros tr.dragging td { opacity: .4; background: var(--accent-soft); }
.sd-ros tr[draggable="true"] td.sd-handle { cursor: grab; }
.sd-ros input, .sd-ros select, .sd-ros textarea { min-height: 34px; font-size: 13px; }
.sd-ros textarea { margin-top: 4px; min-height: 30px; }
.sd-handle { width: 54px; text-align: center; color: var(--muted); }
.sd-grip { font-size: 14px; letter-spacing: -2px; display: block; }
.sd-move { display: flex; gap: 2px; justify-content: center; } .sd-move .icon-btn { width: 22px; height: 22px; font-size: 10px; min-height: 0; }
.sd-time { white-space: nowrap; width: 70px; } .sd-time b { display: block; font-size: 15px; }
.sd-dur { width: 70px; } .sd-title { min-width: 220px; }
.sd-sug { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.sd-sug-i { display: flex; flex-direction: column; gap: 2px; padding: 12px; text-align: left; cursor: pointer; }
.sd-sug-i:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.sd-cs .qdoc-co b { font-size: 14px; }
.sd-calls td:first-child { white-space: nowrap; }
.sd-cs-artist { border-left: 3px solid #6B3FA0; padding: 6px 10px; margin: 6px 0; background: #FAF8FD; }
.sd-stats .stat { cursor: pointer; }
.sd-zone { color: #fff; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; }
.sd-qr svg { width: 100%; height: 100%; display: block; }
.sd-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #EEF0F3; display: inline-block; }
.sd-inc-time { min-width: 46px; }
.sd-scan { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.sd-cam { display: flex; flex-direction: column; gap: 8px; } .sd-cam video { width: 100%; border-radius: 12px; background: #000; max-height: 360px; object-fit: cover; }
.sd-result { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; font-size: 15px; }
.sd-result.ok { background: #E3F4EA; color: #1B6B3A; border: 2px solid #1B6B3A; }
.sd-result.used { background: #FFF1E6; color: #8A4B00; border: 2px solid #E08A2B; }
.sd-result.bad { background: #FDECEC; color: #A33A1F; border: 2px solid #C62828; }
.sd-result-icon { font-size: 34px; font-weight: 800; width: 48px; text-align: center; }
.sd-result-msg { font-size: 18px; display: block; }
/* Đang diễn: toàn màn hình nền tối */
body.live-mode .side, body.live-mode .topbar, body.live-mode .bottombar, body.live-mode .qp-wrap { display: none !important; }
body.live-mode .content { padding: 0 !important; }
.sd-live { position: fixed; inset: 0; z-index: 50; background: #061E1D; color: #fff; display: flex; flex-direction: column; }
.sd-live-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #ffffff1f; }
.sd-live-head .icon-btn { color: #fff; }
.sd-dot { color: #FF6B57; font-weight: 800; letter-spacing: .06em; animation: sdblink 1.4s infinite; }
@keyframes sdblink { 50% { opacity: .45; } }
.sd-live-n { color: #9FB9B7; }
.sd-clock { font-family: var(--display); font-size: 26px; font-weight: 800; }
.sd-live-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; }
.sd-live-label { font-size: 13px; letter-spacing: .12em; color: #9FD6D0; font-weight: 700; }
.sd-live-title { font-size: clamp(34px, 6vw, 72px); color: #fff; } .sd-live-title::after { display: none; }
.sd-live-who { font-size: 20px; color: #F7D146; }
.sd-count { font-family: var(--display); font-size: clamp(80px, 16vw, 200px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sd-count.soon { color: #F7D146; } .sd-count.over { color: #FF6B57; }
.sd-bar { width: min(720px, 90%); height: 10px; background: #ffffff1f; border-radius: 5px; overflow: hidden; }
.sd-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2F7A74, #9FD6D0); }
.sd-cues { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; color: #CFE3E1; font-size: 14px; }
.sd-cues b { color: #9FD6D0; margin-right: 4px; }
.sd-next { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 12px 24px; border: 1px solid #ffffff2a; border-radius: 14px; min-width: min(560px, 90%); }
.sd-next b { font-size: 24px; } .sd-next .muted { color: #9FB9B7; }
.sd-live-foot { display: flex; gap: 12px; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid #ffffff1f; }
.sd-live-foot .btn { flex: 1; min-height: 64px; font-size: 20px; } .sd-live-foot .btn:not(.primary) { background: transparent; color: #fff; border-color: #ffffff4d; flex: 0 0 140px; }
.sd-next-btn { background: #2F7A74 !important; }
/* Vé mời */
.sd-ticket-page { min-height: 100vh; background: radial-gradient(circle at 30% 0%, #0B4E4B, #061E1D 60%); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.sd-ticket { background: #fff; border-radius: 22px; padding: 24px 22px; width: min(400px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 20px 60px #0008; }
.sd-ticket-logo { height: 30px; filter: invert(1) brightness(.3); margin-bottom: 8px; }
.sd-ticket-kicker { font-size: 12px; letter-spacing: .14em; color: var(--accent); font-weight: 800; }
.sd-ticket h1 { font-size: 26px; } .sd-ticket h1::after { display: none; }
.sd-ticket-meta { color: var(--muted); font-size: 14px; }
.sd-ticket-qr { padding: 12px; border: 2px dashed #CFE3E1; border-radius: 16px; margin: 10px 0; }
.sd-ticket-name { font-size: 20px; font-weight: 800; } .sd-ticket-org { color: var(--muted); }
.sd-ticket-seats { font-weight: 700; color: var(--accent-ink); }
.sd-ticket-used { color: var(--late); font-weight: 700; margin-top: 6px; } .sd-ticket-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.sd-ticket-map { margin-top: 8px; font-size: 13px; color: var(--accent); text-decoration: underline; }
/* Thẻ ra vào (in) */
.sd-passes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.sd-pass { background: #fff; border: 1px solid #ccc; border-top: 10px solid #1F2329; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; break-inside: avoid; text-align: center; }
.sd-pass-logo { height: 20px; } .sd-pass-show { font-size: 12px; color: #555; }
.sd-pass-kind { font-size: 13px; letter-spacing: .12em; font-weight: 800; }
.sd-pass-name { font-size: 18px; font-weight: 800; } .sd-pass-org { font-size: 12px; color: #555; }
.sd-pass-zones { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
@media print { .sd-passes { grid-template-columns: repeat(3, 1fr); } .sd-pass { page-break-inside: avoid; } }
@media (max-width: 760px) {
  .sd-live-foot .btn:not(.primary) { flex: 0 0 96px; }
  .sd-clock { font-size: 18px; }
  .sd-ros { min-width: 980px; }
}

/* Nhãn bản staging */
/* Dải mỏng trên cùng màn hình (không che menu / nút) */
.env-badge { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; background: #B3261E; pointer-events: none; }
.env-badge::after { content: attr(data-label); position: absolute; top: 0; right: 12px; background: #B3261E; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1; padding: 2px 8px 3px; border-radius: 0 0 6px 6px; letter-spacing: .02em; }
@media (max-width: 760px) { .env-badge::after { left: 50%; right: auto; transform: translateX(-50%); } }

/* ===== Phòng thu ===== */
.btn.danger { border-color: #F1B8AC; color: #A33A1F; } .btn.danger:hover { background: #FDE8E4; }
.st-title { min-width: 150px; text-align: center; }
.st-legend { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.st-legend .st-ev { position: static; display: inline-block; padding: 2px 8px; height: auto; font-weight: 600; }
.st-cal { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; }
.st-grid { display: grid; position: relative; min-width: max-content; }
.st-corner, .st-head { position: sticky; top: 0; z-index: 3; background: var(--card); border-bottom: 1px solid var(--line); }
.st-corner { left: 0; z-index: 4; }
.st-head { padding: 8px 6px; font-size: 13px; font-weight: 600; text-align: center; border-left: 1px solid var(--line2); display: flex; flex-direction: column; gap: 2px; min-height: 40px; justify-content: flex-end; }
.st-head.first { border-left: 2px solid var(--line); }
.st-head.today { color: var(--accent-ink); background: #F2FBFA; }
.st-dayname { font-size: 12px; text-align: left; }
.st-hours { grid-row: 2; grid-column: 1; position: sticky; left: 0; z-index: 2; background: var(--card); border-right: 1px solid var(--line); }
.st-hour { font-size: 11px; color: var(--muted); text-align: right; padding: 0 6px; border-top: 1px solid var(--line2); box-sizing: border-box; }
.st-lane { grid-row: 2; position: relative; border-left: 1px solid var(--line2);
  background-image: repeating-linear-gradient(to bottom, var(--line2) 0 1px, transparent 1px 44px); }
.st-lane.first { border-left: 2px solid var(--line); }
.st-lane.dropping { background-color: #F7FBFB; }
.st-closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #F4F5F7 0 6px, #EEF0F3 6px 12px); opacity: .7; pointer-events: none; }
.st-ev { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 3px 6px; text-align: left; font-size: 12px; line-height: 1.25; overflow: hidden;
  border: 1px solid; border-left-width: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; color: var(--ink); }
.st-ev[draggable="true"] { cursor: grab; }
.st-ev.dragging { opacity: .45; }
.st-ev b { font-size: 11px; }
.st-ev-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ev-m { font-size: 11px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ev.hold { background: #FFF6E9; border-color: #F3C98B; border-left-color: #E09A2B; }
.st-ev.confirmed { background: #EAF1FB; border-color: #B9CEEE; border-left-color: #1F5BA8; }
.st-ev.in_session { background: #E3F4EA; border-color: #A7D8B9; border-left-color: #1B6B3A; }
.st-ev.done { background: #F1F2F4; border-color: #DADDE2; border-left-color: #8A9099; color: var(--ink2); }
.st-ev.cancelled, .st-ev.no_show { background: repeating-linear-gradient(135deg, #FDF1EE 0 6px, #FBE6E1 6px 12px); border-color: #F1B8AC; border-left-color: #C62828; color: #8A3A2A; text-decoration: line-through; }
.st-form { border: 0; padding: 0; margin: 0; min-width: 0; }
.st-money { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin-top: 10px; background: #F7FBFB; }
.st-money > div { display: flex; flex-direction: column; } .st-money b { font-size: 18px; }
.st-status { margin-bottom: 10px; }
.st-actions .btn { white-space: nowrap; }
.st-sess { margin-top: 8px; }
.st-params .st-val { border: 0; background: transparent; padding: 4px 6px; border-radius: 6px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; text-align: left; font: inherit; color: inherit; }
.st-params .st-val:hover { background: var(--accent-soft); }
.st-params .st-val svg { opacity: .45; }
.st-stats2 { margin-top: 14px; }
.studio section.card { margin-top: 14px; }
/* Session của tôi — điện thoại trước */
.st-my { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.st-my-d { font-size: 14px; margin: 6px 0; color: var(--ink2); }
.st-my-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; border-left: 4px solid var(--line); }
.st-my-card.confirmed { border-left-color: #1F5BA8; } .st-my-card.in_session { border-left-color: #1B6B3A; background: #F6FCF8; }
.st-my-card.hold { border-left-color: #E09A2B; } .st-my-card.done { opacity: .75; }
.st-my-time { font-size: 18px; } .st-my-title { font-weight: 600; font-size: 16px; }
.st-block { background: #F4F5F7; color: var(--ink2); border-radius: 8px; padding: 8px 10px; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.st-note summary { cursor: pointer; font-size: 13px; color: var(--accent-ink); padding: 4px 0; }
.st-note textarea { width: 100%; margin-top: 6px; }
.st-out { background: #1B6B3A; border-color: #1B6B3A; }
@media (max-width: 760px) {
  .st-title { min-width: 0; }
  .st-legend { display: none; }
}

/* ---------- Hướng dẫn trong app: bảng trượt "?", bài, thẻ "Có gì mới" ---------- */
button.help-link { border: 0; background: none; cursor: pointer; font-family: inherit; }
.help-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(20,22,26,.28); }
.help-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--card, #fff); display: flex; flex-direction: column;
  box-shadow: -10px 0 32px rgba(0,0,0,.18); animation: qc-in .18s ease-out; outline: none; }
.help-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px 16px; font-size: 16px; }
.help-q { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.help-panel-search { margin: 0 16px 8px; }
.help-panel-body { flex: 1; overflow-y: auto; padding: 6px 16px 16px; -webkit-overflow-scrolling: touch; }
.help-panel-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.help-doc-title { font-size: 20px; margin: 4px 0 6px; line-height: 1.3; }
.help-doc-meta { margin-bottom: 12px; flex-wrap: wrap; }
.help-md { font-size: 15px; }
.help-md h3 { font-size: 17px; } .help-md h4 { font-size: 16px; border-top: 1px solid var(--line2, #EEF0F3); padding-top: 12px; margin-top: 16px; }
.help-md ol li::marker { color: var(--accent); font-weight: 700; }
.help-md li { margin-bottom: 4px; } .help-md li > ul { margin: 4px 0 0; }
.help-md blockquote { background: #FFF8E6; border-left-color: #F2C14E; border-radius: 0 8px 8px 0; padding: 6px 12px; color: var(--ink); }
.help-md figure { margin: 10px 0 14px; text-align: center; }
.help-md figure img { max-width: min(100%, 320px); height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.help-md figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.md-table { overflow-x: auto; margin: 0 0 12px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md-table th, .md-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.md-table th { background: #F4F6F8; font-weight: 600; }
.help-related { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.help-related .h4 { font-size: 14px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.help-list { display: flex; flex-direction: column; gap: 6px; }
.help-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.help-row:hover, .help-row.on { border-color: var(--accent-line); background: #F7FCFB; }
.help-row .help-ic { width: 30px; height: 30px; }
.whats-new { position: fixed; right: 20px; bottom: 20px; z-index: 35; width: 340px; padding: 12px 12px 10px 14px; box-shadow: 0 12px 32px rgba(0,0,0,.16);
  display: flex; flex-direction: column; gap: 8px; animation: qc-up .2s ease-out; }
.wn-dot { width: 8px; height: 8px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 4px rgba(229,72,77,.15); }
.wn-list { display: flex; flex-direction: column; gap: 4px; }
.wn-item { display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px; border-radius: 8px; border: 0; background: #F6F7F9; cursor: pointer; font: inherit; color: inherit; }
.wn-item:hover { background: var(--accent-soft); }
.wn-item .chip { flex-shrink: 0; }
@keyframes qc-up { from { transform: translateY(24px); } to { transform: none; } }
@media (max-width: 760px) {
  .help-panel { width: 100%; animation-name: qc-up; }
  .whats-new { left: 12px; right: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .help-panel, .whats-new { animation: none; } }
.wn-item .chip.info { background: #E6EEFA; color: #1F5BA8; }
.wn-item .grow, .help-row .grow { min-width: 0; }
.help-panel .search-inline { width: auto; max-width: none; display: flex; }
.help-panel .search-inline input { min-width: 0; width: 100%; flex: 1; }
.wn-item { width: 100%; min-width: 0; } .wn-item .clamp1 { display: block; }

/* Nút đang gửi: vòng xoay nhỏ + khoá */
.btn.is-busy { cursor: progress; opacity: .85; }
.btn-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block;
  animation: spin .7s linear infinite; margin-right: 6px; vertical-align: -2px; flex-shrink: 0; }
.field-note { font-size: 13px; color: var(--muted); margin: -4px 0 4px; }
.field-note.warn { color: #9A5B00; background: #FFF6E5; border-radius: 8px; padding: 8px 10px; margin: 0; }

/* ===================== Đợt E: kho thiết bị, nhà cung cấp, dashboard lợi nhuận ===================== */
.qr-svg { flex-shrink: 0; background: #fff; border-radius: 6px; }
.qr-svg svg { width: 100%; height: 100%; display: block; }
.qr-scan { display: grid; gap: 12px; }
.qr-cam { display: grid; gap: 8px; } .qr-cam video { width: 100%; max-height: 60vh; border-radius: 12px; background: #000; object-fit: cover; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.w-check { width: 32px; } .w-bar { width: 140px; } .w-num { width: 64px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.seg .seg-btn { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; min-height: 36px; }
.seg .seg-btn.on { background: #fff; box-shadow: 0 1px 2px #0002; color: var(--accent-ink); font-weight: 600; }
.seg .seg-btn.on.bad { color: #A33A1F; } .seg .seg-btn.on.warn { color: #B4461B; } .seg .seg-btn.on.ok { color: #1B6B3A; }
.seg.sm .seg-btn { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.check-chip input { margin: 0; }
.asset-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.asset-actions .btn { justify-content: center; min-height: 52px; }
.asset-photo { width: 100%; max-height: 240px; object-fit: contain; border-radius: 10px; background: var(--line2); margin-bottom: 8px; }
.asset-bk { padding: 8px 0; border-bottom: 1px solid var(--line2); display: grid; gap: 4px; }
.asset-bk:last-child { border-bottom: 0; }
.asset-grp { margin-bottom: 8px; flex-wrap: wrap; }
.asset-item .page-head { align-items: flex-start; }
.file-row { padding: 8px 16px; border-bottom: 1px solid var(--line2); gap: 8px; flex-wrap: wrap; }
/* Lịch đặt thiết bị (dòng thời gian theo thiết bị) */
.cal-grid { min-width: 760px; --name: 220px; }
.cal-head, .cal-row { display: grid; grid-template-columns: var(--name) 1fr; border-bottom: 1px solid var(--line2); }
.cal-head { position: sticky; top: 0; background: #fff; z-index: 1; font-size: 12px; color: var(--muted); }
.cal-name { padding: 8px 10px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-right: 1px solid var(--line2); color: var(--ink); }
.cal-head .cal-track { display: grid; grid-template-columns: repeat(var(--days), 1fr); }
.cal-head .cal-track span { padding: 8px 0; text-align: center; border-left: 1px solid var(--line2); }
.cal-head .cal-track span.today { color: var(--accent-ink); font-weight: 700; background: #E6F6F5; }
.cal-row .cal-track { position: relative; min-height: 38px;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / var(--days) - 1px), var(--line2) calc(100% / var(--days) - 1px), var(--line2) calc(100% / var(--days))); }
.cal-bar { position: absolute; top: 6px; height: 26px; border-radius: 6px; padding: 0 6px; font-size: 12px; line-height: 26px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; color: #fff; background: var(--info); }
.cal-bar.out { background: #E08A1E; } .cal-bar.overdue { background: var(--late); } .cal-bar.returned { background: #9AA3AE; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--info); }
.cal-dot.out { background: #E08A1E; } .cal-dot.overdue, .cal-dot.neg { background: var(--late); } .cal-dot.returned { background: #9AA3AE; }
.cal-dot.rev { background: #B7DCDA; } .cal-dot.pro { background: var(--accent); }
/* Tem QR (in A4, 3 cột) */
.asset-labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
.asset-label { display: flex; gap: 10px; align-items: center; border: 1px dashed #B9C0C8; border-radius: 8px; padding: 8px; break-inside: avoid; background: #fff; }
.asset-label-txt { display: grid; gap: 2px; font-size: 12px; min-width: 0; } .asset-label-txt b { font-size: 15px; }
@media print {
  .asset-labels { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .asset-label { page-break-inside: avoid; }
}
/* Nhà cung cấp */
.vendor-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.vendor-card { display: grid; gap: 8px; padding: 14px 16px; color: var(--ink); }
.vendor-card:hover { border-color: var(--accent); }
.vendor-card.blacklist { border-color: #F1B8AC; background: #FFF8F6; }
.vendor-card.paused { opacity: .7; }
.vendor-name { font-size: 15px; }
.stars { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.stars-bar { width: 72px; height: 8px; border-radius: 4px; background: var(--line2); overflow: hidden; }
.stars-bar span { display: block; height: 100%; background: #F2A900; }
.vendor-score { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.vendor-rating { padding: 10px 0; border-bottom: 1px solid var(--line2); display: grid; gap: 4px; }
.vendor-picker { position: relative; }
.vp-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 280px; overflow: auto; padding: 4px; }
.vp-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px; border-radius: 8px; cursor: pointer; min-height: 44px; }
.vp-item:hover, .vp-item[aria-selected="true"] { background: var(--line2); }
.vp-item.black b { color: var(--late); }
.vp-add { color: var(--accent-ink); font-weight: 600; border-top: 1px solid var(--line2); border-radius: 0 0 8px 8px; }
.vp-empty { padding: 8px 10px; }
/* Dashboard lợi nhuận */
.hbar.neg > span { background: var(--late); }
.trend { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 180px; margin: 8px 0; }
.trend-col { display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; }
.trend-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; }
.tb { width: 40%; min-height: 1px; border-radius: 3px 3px 0 0; }
.tb.rev { background: #B7DCDA; } .tb.pro { background: var(--accent); } .tb.pro.neg { background: var(--late); }
.profit-tbl td { vertical-align: top; }
@media (max-width: 640px) {
  .asset-actions { grid-template-columns: 1fr 1fr; } .asset-actions .btn:first-child { grid-column: 1 / -1; }
  .kv { grid-template-columns: 1fr; gap: 0 0; } .kv dt { margin-top: 8px; font-size: 12px; }
  .cal-grid { --name: 140px; }
  .w-bar { display: none; }
  .profit-tbl th:nth-child(3), .profit-tbl td:nth-child(3), .profit-tbl th:nth-child(4), .profit-tbl td:nth-child(4) { display: none; }
  .trend { height: 140px; gap: 3px; }
}
.mono { white-space: nowrap; }
.w-check input { width: auto; min-height: 0; }
.assets .filters > select, .vendors .filters > select, .profit .filters > select, .asset-list .filters > select, .asset-cal .filters > select,
.profit .filters > input[type=date], .asset-cal .filters > input[type=date] { width: auto; flex: 0 1 auto; max-width: 100%; }
.assets .filters > input.grow, .vendors .filters > input.grow, .asset-list .filters > input.grow { min-width: 220px; }
@media (max-width: 640px) {
  .assets .filters > select, .vendors .filters > select, .asset-list .filters > select, .profit .filters > select { flex: 1 1 45%; }
  .table-wrap .asset-tbl, .asset-tbl tbody { display: block; min-width: 0; width: 100%; }
  .asset-tbl thead, .asset-tbl .c-chk, .asset-tbl .c-grp { display: none; }
  .asset-tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name cond" "code qty" "loc val" "due due"; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line2); }
  .asset-tbl td { display: block; border: 0; padding: 0; text-align: left; min-width: 0; }
  .asset-tbl .c-name { grid-area: name; } .asset-tbl .c-cond { grid-area: cond; justify-self: end; }
  .asset-tbl .c-code { grid-area: code; font-size: 12px; color: var(--muted); } .asset-tbl .c-qty { grid-area: qty; justify-self: end; font-size: 13px; }
  .asset-tbl .c-loc { grid-area: loc; font-size: 13px; } .asset-tbl .c-val { grid-area: val; justify-self: end; font-size: 13px; } .asset-tbl .c-due { grid-area: due; font-size: 13px; }
}
.profit .card-head { flex-wrap: wrap; }

/* ===== Đợt D: nhà tài trợ, báo cáo nghiệm thu, giấy phép, lịch truyền thông ===== */
.chip.info { background: #E6EEFA; color: #1F5BA8; }
.warnbox { background: #FFF6E5; border: 1px solid #F3D19B; color: #7A4F00; border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.sp-pct.wide { display: flex; width: 100%; } .sp-pct.wide .bar { flex: 1; width: auto; height: 8px; border-radius: 4px; }
.sp-pct .pct { font-weight: 700; color: var(--ink2); min-width: 36px; text-align: right; }
.sp-pct.full .bar span { background: linear-gradient(90deg, #1B6B3A, #3FB37F); }
.sp-shows { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sp-show-card { display: grid; gap: 10px; padding: 14px 16px; color: var(--ink); }
.sp-show-card:hover { border-color: var(--accent); } .sp-show-card.pm-alert { border-color: #F1B8AC; background: #FFF8F6; }
.sp-deal-mini { display: grid; gap: 6px; }
.sp-mini { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sp-pkg { display: inline-block; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.sp-head { display: grid; gap: 6px; } .sp-head b { white-space: nowrap; }
.sp-deal { padding: 0; overflow: hidden; }
.sp-deal-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 6px; }
.sp-toggle { border: 0; background: #EEF0F3; border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.sp-client { font-size: 16px; }
.sp-value { text-align: right; font-weight: 800; font-size: 15px; white-space: nowrap; }
.sp-deal-bar { padding: 4px 16px 12px; } .sp-deal-bar .sp-pct { flex: 1 1 220px; }
.sp-delivs { border-top: 1px solid var(--line); background: #FAFBFB; padding: 4px 0 8px; }
.sp-deliv { display: grid; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line2); }
.sp-deliv.done { background: #F4FBF7; } .sp-deliv.waived { opacity: .65; }
.sp-deliv-main { display: flex; align-items: center; gap: 10px; }
.sp-qty { white-space: nowrap; font-size: 15px; }
.sp-evs { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-ev { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px 8px 3px 4px; font-size: 12px; max-width: 100%; }
.sp-ev img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; display: block; }
.sp-ev-t a { color: var(--accent); font-weight: 600; } .sp-ev-n { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-ev .icon-btn { width: 22px; height: 22px; }
.sp-deliv-act .btn.sm { min-height: 30px; }
.sp-add { margin: 8px 16px 0; }
.sp-ticket-row { display: grid; grid-template-columns: 1.4fr 1.4fr 70px auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.sp-ticket-row.two { grid-template-columns: 1fr 1.6fr auto; }
.sp-guests { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; margin: 8px 0; }
.sp-set-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line2); background: none; padding: 9px 2px; cursor: pointer; }
.sp-set-row.off { opacity: .55; } .sp-set-row:hover { background: #F7F9F9; }
.sp-doc-title { font-size: 26px; }
.sp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 18px; }
.sp-kpis > div { border: 1px solid #e5e5e5; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sp-kpis b { font-size: 22px; }
.qdoc.mytonic .sp-kpis b { color: #275C69; }
.sp-doc-h { font-size: 15px; font-family: inherit; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .04em; color: #333; }
.sp-doc-tbl .chip { font-size: 11px; }
.sp-doc-tbl a, .qdoc a { color: #1B4550; text-decoration: underline; word-break: break-all; }
.sp-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sp-photo { margin: 0; break-inside: avoid; }
.sp-photo img, .sp-photo-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; background: #F1F5F5; }
.sp-photo-ph { display: grid; place-items: center; align-content: center; gap: 4px; color: #1B4550; font-size: 12px; text-decoration: none !important; }
.sp-photo figcaption { font-size: 11px; color: #555; margin-top: 4px; }
.sp-report .qdoc { margin-top: 12px; }
.sp-links { display: grid; gap: 8px; } .sp-links input[type=number] { width: 70px; min-height: 30px; }
.sp-newlink { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; background: #E8F6F5; padding: 10px; border-radius: 10px; }
.sp-newlink .muted { grid-column: 1 / -1; }
.sp-linklist { display: grid; }
.sp-public { min-height: 100vh; background: #F4F7F7; padding: 16px; }
.sp-public-bar { max-width: 820px; margin: 0 auto 10px; }
.sp-public-err { max-width: 460px; margin: 15vh auto 0; text-align: center; display: grid; gap: 14px; justify-items: center; }
.dc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 12px; }
.dc-card { display: grid; gap: 4px; color: var(--ink); } .dc-card:hover { border-color: var(--accent); }
.dc-card.alert { border-color: #F1B8AC; background: #FFF8F6; }
.pm-row { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.pm-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pm-sum > div { display: grid; } .pm-sum b { font-size: 20px; }
.pm-list { padding: 0; overflow: hidden; }
.pm-item { display: grid; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line2); width: 100%; text-align: left; background: none; border-left: 4px solid transparent; }
.pm-item.overdue { border-left-color: #F0A35E; } .pm-item.alert { border-left-color: var(--late); background: #FFF8F6; }
.pm-item.approved { background: #F4FBF7; } .pm-item.not_needed { opacity: .6; }
.pm-item.tpl { cursor: pointer; border-left: 0; } .pm-item.tpl:hover { background: #F7F9F9; } .pm-item.off { opacity: .55; }
.pm-item-main { display: flex; align-items: flex-start; gap: 12px; }
.pm-due { display: grid; text-align: right; white-space: nowrap; }
.cc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.cc-day { min-height: 96px; border: 1px solid var(--line2); border-radius: 10px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-grid.week .cc-day { min-height: 320px; }
.cc-day.out { background: #FAFBFB; opacity: .55; } .cc-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cc-dn { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 12px; color: var(--ink2); padding: 0 2px; }
.cc-add { border: 0; background: transparent; color: var(--accent); font-weight: 800; cursor: pointer; width: 22px; height: 22px; border-radius: 6px; opacity: 0; }
.cc-day:hover .cc-add, .cc-add:focus-visible { opacity: 1; background: var(--accent-soft); }
.cc-post { display: grid; grid-template-columns: 4px 1fr; gap: 0 5px; align-items: center; border: 0; text-align: left; cursor: pointer; font-size: 11.5px; line-height: 1.25;
  background: color-mix(in srgb, var(--st) 12%, #fff); border-radius: 6px; padding: 3px 5px 3px 3px; color: var(--ink); min-width: 0; }
.cc-post:hover { background: color-mix(in srgb, var(--st) 22%, #fff); }
.cc-post.posted { opacity: .8; } .cc-post.late { box-shadow: inset 0 0 0 1px var(--late); }
.cc-ch { grid-row: span 2; width: 4px; align-self: stretch; border-radius: 2px; background: var(--ch); }
.cc-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cc-grid.week .cc-t { white-space: normal; }
.cc-meta { font-size: 10.5px; color: var(--muted); grid-column: 2; }
.cc-list { padding: 0; overflow: hidden; }
.cc-list-day { background: #F6F8F8; font-weight: 700; font-size: 12px; padding: 6px 14px; color: var(--ink2); border-top: 1px solid var(--line); }
.cc-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 10px 14px; cursor: pointer; border-top: 1px solid var(--line2); }
.cc-row:hover { background: #F7F9F9; } .cc-row.late b { color: var(--late); }
.cc-chdot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cc-detail { display: grid; gap: 10px; }
.cc-brief { white-space: pre-wrap; background: #F7F9F9; border-radius: 10px; padding: 10px 12px; }
.cc-metrics { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; } .cc-metrics > div { display: grid; } .cc-metrics b { font-size: 20px; }
.cc-hist { display: grid; gap: 3px; border-top: 1px solid var(--line2); padding-top: 8px; }
@media (max-width: 760px) {
  .sp-shows { grid-template-columns: 1fr; }
  .sp-deal-bar { flex-direction: column; align-items: stretch; } .sp-deal-bar .sp-pct { flex: none; }
  .sp-deal-head { flex-wrap: wrap; } .sp-value { width: 100%; text-align: left; padding-left: 40px; }
  .sp-deliv-main { flex-wrap: wrap; } .sp-deliv-main > .grow { flex-basis: 100%; }
  .sp-ticket-row { grid-template-columns: 1fr 64px auto; } .sp-ticket-row > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .sp-ticket-row.two { grid-template-columns: 1fr auto; } .sp-ticket-row.two > :nth-child(2) { grid-column: 1; }
  .sp-kpis { grid-template-columns: 1fr 1fr; } .sp-gallery { grid-template-columns: 1fr 1fr; }
  .sp-public { padding: 8px; }
  .pm-sum { grid-template-columns: 1fr 1fr; }
  .pm-item-main { flex-wrap: wrap; } .pm-item-main > .grow { flex-basis: 100%; } .pm-due { text-align: left; }
  .cc-grid { padding: 4px; gap: 2px; } .cc-day { min-height: 58px; padding: 2px; }
  .cc-grid.week { grid-template-columns: 1fr; } .cc-grid.week .cal-wd { display: none; } .cc-grid.week .cc-day { min-height: 0; }
  .cc-grid.month .cc-t { display: none; } .cc-grid.month .cc-post { grid-template-columns: 1fr; padding: 0; height: 6px; background: var(--st); }
  .cc-grid.month .cc-ch { display: none; }
}
@media print {
  .sp-public { padding: 0; background: #fff; }
  .sp-kpis > div, .sp-photo { break-inside: avoid; }
}
.content-cal .filters select { width: auto; flex: 1 1 170px; min-width: 0; }

/* ---------- Lõi Hugo House (phiếu 03): Tổ chức, Nhân sự, Phân công, Phân quyền, Cấu hình ---------- */
.org-row, .person-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line2); color: inherit; }
.org-row:last-child, .person-row:last-child { border-bottom: 0; }
.org-row.closed { opacity: .6; }
.org-row[data-kind="campus"] .org-name { font-size: 16px; }
a.person-row:hover { background: var(--line2); }
.core-person .kv { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.core-person .kv > div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; margin-top: 6px; }
.section-title { font-size: 16px; margin: 20px 0 8px; }
.asg-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 120px; }
.asg-person { display: flex; align-items: center; gap: 4px; }
.icon-btn.xs { width: 24px; height: 24px; } .btn.xs { min-height: 26px; padding: 0 8px; font-size: 12px; }
.asg-grid td { vertical-align: top; }
.config-row { display: flex; flex-direction: column; gap: 6px; }
.config-row input, .config-row select { width: auto; flex: 1 1 140px; }
@media (max-width: 640px) {
  .core-org .filters select, .core-people .filters select, .core-grants .filters select { flex: 1 1 100%; }
  .org-row .btn.sm { padding: 0 6px; }
  /* Phân công lớp: mỗi lớp một thẻ, bỏ cuộn ngang */
  .asg-grid thead { display: none; }
  .asg-grid, .asg-grid tbody, .asg-grid tr, .asg-grid td { display: block; width: 100%; }
  .asg-grid tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .asg-grid td { border: 0; padding: 4px 12px; }
  .asg-grid td[data-label] { display: flex; gap: 8px; align-items: flex-start; }
  .asg-grid td[data-label]::before { content: attr(data-label); flex: 0 0 88px; font-size: 12px; color: var(--muted); padding-top: 2px; }
  .asg-grid .asg-cell { flex-direction: row; flex-wrap: wrap; align-items: center; min-width: 0; }
}
