/* GIAO TIẾN PLUS – tông xanh dương & trắng, chữ dễ đọc, nút lớn dễ bấm */
:root {
  --blue: #1d4ed8; --blue-d: #1e3a8a; --blue-l: #dbeafe; --blue-xl: #eff6ff;
  --ink: #0f172a; --ink2: #334155; --muted: #64748b; --line: #e2e8f0; --bg: #f4f7fc; --card: #ffffff;
  --green: #15803d; --green-l: #dcfce7; --red: #b91c1c; --red-l: #fee2e2; --amber: #b45309; --amber-l: #fef3c7;
  --orange: #c2410c; --orange-l: #ffedd5; --violet: #6d28d9; --violet-l: #ede9fe; --gray: #475569; --gray-l: #f1f5f9;
  --r: 14px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
  --side: 264px; --top: 64px; --bottom: 68px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: "Be Vietnam Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--blue); text-decoration: none; }
h1 { font-size: 1.5rem; margin: 0; line-height: 1.25; }
h2 { font-size: 1.15rem; } h3 { font-size: 1.02rem; margin: 0; } h4 { margin: 16px 0 8px; font-size: .95rem; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
input.dirty { border-color: var(--amber); background: #fffbeb; }
textarea { resize: vertical; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blue); }
input[type=range] { width: 100%; accent-color: var(--blue); height: 32px; }
code { background: var(--gray-l); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
code.wrap, .wrap { white-space: pre-wrap; word-break: break-all; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .lg { font-size: 1.15rem; } .nowrap { white-space: nowrap; } .grow { flex: 1; min-width: 0; }
.pre { white-space: pre-wrap; margin: 0 0 8px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.ic { flex: none; }

/* Nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-weight: 600; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover:not(:disabled) { background: var(--blue-d); }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: #fff; border-color: #cbd5e1; color: var(--ink2); } .btn-ghost:hover:not(:disabled) { background: var(--blue-xl); border-color: var(--blue); color: var(--blue); }
.btn-danger-ghost { background: #fff; border-color: #fecaca; color: var(--red); } .btn-danger-ghost:hover { background: var(--red-l); }
.btn.block { width: 100%; } .btn.lg { min-height: 54px; font-size: 1.05rem; margin: 8px 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.link { background: none; border: none; color: var(--blue); cursor: pointer; padding: 4px 0; font-weight: 600; text-align: left; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: none; background: transparent; cursor: pointer; color: var(--ink2); position: relative; }
.icon-btn:hover { background: var(--blue-xl); color: var(--blue); }
td .btn { min-height: 38px; padding: 6px 10px; margin: 2px 2px 2px 0; }

/* Khung */
.app { min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: linear-gradient(180deg, #1e40af, #1d4ed8 60%, #2563eb); color: #fff; display: flex; flex-direction: column; z-index: 20; }
.side nav { flex: 1; overflow-y: auto; padding: 6px 10px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px; color: inherit; }
.brand b { display: block; letter-spacing: .5px; } .brand small { display: block; font-size: .68rem; opacity: .85; letter-spacing: .4px; }
.brand img { border-radius: 10px; background: #fff; }
.nav-i { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0; border-radius: 10px; color: #e0e7ff; font-weight: 500; position: relative; min-height: 44px; }
.nav-i:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-i.on { background: #fff; color: var(--blue-d); font-weight: 700; }
.nav-i span { flex: 1; }
.ph { font-style: normal; font-size: .66rem; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: rgba(255, 255, 255, .2); }
.nav-i.on .ph { background: var(--violet-l); color: var(--violet); }
.dotn { width: 9px; height: 9px; border-radius: 50%; background: #f43f5e; display: inline-block; }
.nav-i .dotn { position: absolute; left: 30px; top: 9px; }
.dotn.static { flex: none; }
.side-foot { padding: 10px 16px; font-size: .75rem; opacity: .75; }
.main { margin-left: var(--side); min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 15; height: var(--top); display: flex; align-items: center; gap: 8px; padding: 0 20px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .brand { padding: 0; color: var(--blue-d); }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); }
.search input { border: none !important; background: transparent !important; box-shadow: none !important; min-height: 42px !important; padding: 0 !important; }
.bell { margin-left: auto; }
.bubble { position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: #e11d48; color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.me { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 4px 8px; border-radius: 12px; }
.me:hover { background: var(--blue-xl); }
.me b { display: block; font-size: .9rem; } .me small { display: block; color: var(--muted); font-size: .75rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--blue-l); color: var(--blue-d); font-weight: 700; flex: none; }
.banner { padding: 6px 20px; font-size: .82rem; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.banner.demo { background: var(--amber-l); color: #92400e; }
.banner.off { background: var(--red-l); color: var(--red); }
.content { padding: 20px 24px 40px; max-width: 1400px; margin: 0 auto; }
.bottom, .only-m { display: none; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-h p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; margin-bottom: 6px; }
h2.sec { margin: 24px 0 12px; }

/* Thẻ, lưới */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px 0; }
.card-actions { display: flex; gap: 8px; align-items: center; }
.card-b { padding: 14px 16px 16px; }
.card.mine { border-color: #93c5fd; box-shadow: 0 0 0 3px var(--blue-xl), var(--shadow); }
.card.muted-card { background: #fafbff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
.grid2.wide-left { grid-template-columns: 1.6fr 1fr; } .grid2.wide-right { grid-template-columns: 1fr 1.8fr; }
.grid2 > *, .main, .content { min-width: 0; }
.main { overflow-x: clip; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); cursor: pointer; }
.stat:disabled { cursor: default; opacity: 1; }
.stat:hover:not(:disabled) { border-color: currentColor; }
.stat .ic { padding: 9px; width: 42px; height: 42px; border-radius: 12px; }
.stat-v { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-l { font-size: .85rem; color: var(--ink2); } .stat-h { font-size: .75rem; color: var(--muted); }
.stat.tone-blue .ic { background: var(--blue-l); color: var(--blue); } .stat.tone-red .ic { background: var(--red-l); color: var(--red); }
.stat.tone-green .ic { background: var(--green-l); color: var(--green); } .stat.tone-amber .ic { background: var(--amber-l); color: var(--amber); }
.stat.tone-violet .ic { background: var(--violet-l); color: var(--violet); } .stat.tone-gray .ic { background: var(--gray-l); color: var(--gray); }
.stat.tone-red .stat-v { color: var(--red); }

/* Danh sách */
.list { display: flex; flex-direction: column; }
.row, .row-link { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--ink); min-height: 56px; }
.row-link { cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; }
.row-link:hover { background: var(--blue-xl); }
.list > :last-child { border-bottom: none; }
.list.compact .row { min-height: 44px; padding: 8px 2px; }
.list.cards { gap: 10px; }
.list.cards > .row, .list.cards > .row-link { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.list.cards > .row-link:hover { border-color: #93c5fd; background: #fff; }
.t { font-weight: 600; } .t.unread { font-weight: 800; color: var(--blue-d); }
.meta { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.excerpt { font-size: .88rem; color: var(--ink2); margin-top: 4px; }
.right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.notif.unread { background: #f8fbff !important; border-color: #bfdbfe !important; }
.nicon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.nicon.tone-red { background: var(--red-l); color: var(--red); } .nicon.tone-amber { background: var(--amber-l); color: var(--amber); }
.nicon.tone-green { background: var(--green-l); color: var(--green); } .nicon.tone-blue { background: var(--blue-l); color: var(--blue); }
.mini-counts { flex-direction: row; gap: 2px; font-weight: 700; }

/* Nhãn trạng thái */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badges.big { margin-bottom: 14px; } .badges.big .badge { font-size: .85rem; padding: 4px 12px; }
.tone-blue.badge { background: var(--blue-l); color: var(--blue-d); } .tone-green.badge { background: var(--green-l); color: var(--green); }
.tone-red.badge { background: var(--red-l); color: var(--red); } .tone-amber.badge { background: var(--amber-l); color: var(--amber); }
.tone-orange.badge { background: var(--orange-l); color: var(--orange); } .tone-violet.badge { background: var(--violet-l); color: var(--violet); }
.tone-gray.badge { background: var(--gray-l); color: var(--gray); }
span.tone-green, td.tone-green { color: var(--green); } span.tone-red, td.tone-red { color: var(--red); font-weight: 700; } span.tone-amber { color: var(--amber); } span.tone-gray { color: var(--muted); }

/* Thanh tiến độ, biểu đồ */
.pbar { height: 8px; background: var(--gray-l); border-radius: 99px; overflow: hidden; margin-top: 6px; min-width: 60px; }
td .pbar { display: inline-block; width: 70px; vertical-align: middle; margin: 0 6px 0 0; }
.pbar-v { height: 100%; background: var(--blue); border-radius: 99px; transition: width .3s; }
.pbar-v.tone-red { background: #ef4444; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: var(--ink2); margin-bottom: 10px; }
.legend.col { flex-direction: column; gap: 4px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.dot.tone-green, .sbar-seg.tone-green { background: #22c55e; } .dot.tone-blue, .sbar-seg.tone-blue { background: #3b82f6; }
.dot.tone-red, .sbar-seg.tone-red { background: #ef4444; } .dot.tone-amber { background: #f59e0b; } .dot.tone-gray { background: #cbd5e1; } .dot.tone-violet { background: #8b5cf6; }
.sbar-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; margin: 8px 0; }
.sbar-l { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbar-track { display: flex; height: 24px; background: var(--gray-l); border-radius: 6px; overflow: hidden; }
.sbar-seg { color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; min-width: 18px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-bg { stroke: var(--gray-l); }
.donut-seg.tone-green { stroke: #22c55e; } .donut-seg.tone-blue { stroke: #3b82f6; } .donut-seg.tone-red { stroke: #ef4444; } .donut-seg.tone-amber { stroke: #f59e0b; } .donut-seg.tone-gray { stroke: #cbd5e1; }
.donut-t { font-size: 8px; font-weight: 800; fill: var(--ink); }

/* Tabs, bộ lọc */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: none; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; white-space: nowrap; min-height: 44px; }
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }
.cnt { background: var(--blue-l); color: var(--blue-d); border-radius: 99px; padding: 0 7px; font-size: .75rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid #cbd5e1; background: #fff; border-radius: 99px; padding: 6px 14px; min-height: 38px; cursor: pointer; font-weight: 600; color: var(--ink2); }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 420px; }
.toolbar.wrap { flex-wrap: wrap; } .toolbar label { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.toolbar select { max-width: 280px; }

/* Bảng */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; background: #f8fafc; color: var(--ink2); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.dim td { opacity: .55; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .c { text-align: center; }
.matrix tr.grp td { background: var(--blue-xl); font-weight: 700; color: var(--blue-d); }
.matrix th.c { white-space: normal; min-width: 90px; font-size: .8rem; }

/* Biểu mẫu */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-l { font-weight: 600; font-size: .92rem; } .req { color: var(--red); font-style: normal; margin-left: 3px; }
.field-h { font-size: .8rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.picker { border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.picker-top { display: flex; gap: 8px; align-items: center; padding: 8px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.picker-list { max-height: 260px; overflow-y: auto; padding: 4px 8px; }
.picker-gh { display: flex; justify-content: space-between; padding: 8px 2px 2px; font-size: .88rem; color: var(--blue-d); }
.picker-i { display: flex; gap: 10px; align-items: center; padding: 6px 2px; min-height: 40px; cursor: pointer; }
.picker-i small { display: block; color: var(--muted); font-size: .78rem; }
.role-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.role-row select { flex: 1; }
.progress-edit { margin: 10px 0; }
.code-in { display: flex; gap: 8px; } .code-in input { font-size: 1.4rem !important; letter-spacing: 6px; text-align: center; max-width: 220px; }
.msg { padding: 10px 14px; border-radius: 10px; margin: 10px 0; font-weight: 500; }
.msg.err { background: var(--red-l); color: var(--red); } .msg.ok { background: var(--green-l); color: var(--green); }
.msg.warn { background: var(--amber-l); color: #92400e; } .msg.info { background: var(--blue-xl); color: var(--blue-d); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 12px 0 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.file { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--blue-l); }
.timeline li { padding: 0 0 12px 14px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.comments { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; margin-bottom: 10px; }
.cmt { display: flex; gap: 10px; } .cmt > div { background: var(--gray-l); padding: 8px 12px; border-radius: 12px; flex: 1; }
.cmt.me > div { background: var(--blue-xl); }
.cmt-in { display: flex; gap: 8px; align-items: flex-end; }
.livecode { text-align: center; } .livecode .code { font-size: 3.6rem; font-weight: 800; letter-spacing: 8px; color: var(--blue-d); font-variant-numeric: tabular-nums; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.seg button { border: none; background: #fff; padding: 8px 10px; min-height: 40px; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--ink2); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: none; }
.seg button.on.tone-green { background: #22c55e; color: #fff; } .seg button.on.tone-amber { background: #f59e0b; color: #fff; }
.seg button.on.tone-blue { background: #3b82f6; color: #fff; } .seg button.on.tone-red { background: #ef4444; color: #fff; }
.seg button.dirty { box-shadow: inset 0 -3px 0 #0f172a; }
.sticky-save { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 8px; align-items: center; justify-content: flex-end; background: #fff; border: 1px solid #93c5fd; border-radius: var(--r); padding: 10px 14px; box-shadow: 0 8px 30px rgba(29, 78, 216, .18); margin-top: 12px; }
.sticky-save span { margin-right: auto; font-weight: 600; }
.tempw { font-size: 1.6rem; font-weight: 800; letter-spacing: 2px; text-align: center; background: var(--blue-xl); padding: 12px; border-radius: 10px; user-select: all; }
details summary { cursor: pointer; color: var(--blue); }

/* Trạng thái tải / lỗi / trống */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 36px 16px; text-align: center; color: var(--muted); }
.state p { margin: 0; max-width: 520px; }
.state.err { color: var(--red); } .state.err b { color: var(--ink); }
.spin { width: 30px; height: 30px; border: 3px solid var(--blue-l); border-top-color: var(--blue); border-radius: 50%; animation: sp 0.8s linear infinite; display: inline-block; }
.spin.sm { width: 16px; height: 16px; border-width: 2px; vertical-align: middle; }
.btn-primary .spin, .btn-success .spin, .btn-danger .spin { border-color: rgba(255, 255, 255, .4); border-top-color: #fff; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Hộp thoại, thông báo nhanh */
.modal-bg, .sheet-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(15, 23, 42, .3); }
.modal.wide { width: min(900px, 100%); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-h h2 { margin: 0; }
.modal-b { padding: 16px 18px; overflow-y: auto; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: 90vw; }
.toast.err { background: var(--red); }

/* Đăng nhập */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; background: radial-gradient(circle at 20% 0%, #bfdbfe, transparent 50%), linear-gradient(160deg, #eff6ff, #ffffff 60%); }
.login-card { width: min(520px, 100%); background: #fff; border-radius: 22px; padding: 28px; box-shadow: 0 20px 60px rgba(29, 78, 216, .15); border: 1px solid #dbeafe; }
.brand.big { padding: 0 0 6px; color: var(--blue-d); } .brand.big b { font-size: 1.5rem; } .brand.big small { font-size: .78rem; color: var(--blue); font-weight: 700; }
.brand.big img { box-shadow: 0 4px 14px rgba(29, 78, 216, .25); }
.or { text-align: center; color: var(--muted); margin: 14px 0; font-size: .85rem; }
.gsi { display: flex; justify-content: center; min-height: 44px; }
.demo-box { margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--amber-l); color: #78350f; font-size: .88rem; }
.demo-acc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.demo-acc button { text-align: left; border: 1px solid #fcd34d; background: #fff; border-radius: 10px; padding: 6px 10px; cursor: pointer; min-height: 44px; }
.demo-acc button:hover { border-color: var(--amber); }
.demo-acc b { display: block; font-size: .85rem; color: var(--ink); } .demo-acc small { color: var(--muted); font-size: .75rem; }

/* Bảng chọn phân hệ trên điện thoại */
.sheet-bg { place-items: end stretch; padding: 0; }
.sheet { background: #fff; border-radius: 22px 22px 0 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 85vh; overflow-y: auto; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; background: var(--blue-xl); color: var(--blue-d); text-align: center; font-size: .82rem; font-weight: 600; position: relative; min-height: 88px; justify-content: center; }
.sheet-grid a.on { background: var(--blue); color: #fff; }
.sheet-grid .ph { position: absolute; top: 6px; right: 6px; background: var(--violet-l); color: var(--violet); }
.sheet-acc { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 14px; margin-top: 10px; border-top: 1px solid var(--line); font-weight: 600; }

/* Máy tính bảng */
@media (max-width: 1100px) {
  :root { --side: 228px; }
  .grid2, .grid2.wide-left, .grid2.wide-right { grid-template-columns: 1fr; }
}
/* Điện thoại: thanh điều hướng dưới, ẩn menu trái */
@media (max-width: 860px) {
  .side { display: none; }
  .main { margin-left: 0; padding-bottom: calc(var(--bottom) + env(safe-area-inset-bottom)); }
  .top { padding: 0 8px 0 12px; gap: 2px; }
  .top .search, .only-d { display: none; }
  .only-m { display: inline-flex; }
  .top .brand b { font-size: .95rem; }
  .bell { margin-left: auto; }
  .content { padding: 14px 12px 24px; }
  h1 { font-size: 1.3rem; }
  .bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--bottom) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(15, 23, 42, .06); }
  .bottom a, .bottom button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); background: none; border: none; position: relative; cursor: pointer; }
  .bottom .on { color: var(--blue); }
  .bottom .on .ic { background: var(--blue-l); border-radius: 99px; width: 52px; padding: 2px 0; height: 26px; }
  .bottom .dotn { position: absolute; top: 8px; left: calc(50% + 8px); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; } .stat .ic { display: none; } .stat-v { font-size: 1.4rem; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .sbar-row { grid-template-columns: 100px 1fr; }
  .row-link.task, .list.cards > .row-link { flex-direction: column; align-items: stretch; }
  .row-link.task .right, .list.cards > .row-link .right { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; }
  .modal-bg { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .modal-f { padding-bottom: calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .toolbar { flex-wrap: wrap; } .toolbar input[type=search] { max-width: none; }
  .demo-acc { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 20px; }
  .att-row .seg { width: 100%; } .seg button { flex: 1; padding: 8px 4px; }
  .toasts { bottom: calc(var(--bottom) + 16px); }
  .sticky-save { bottom: calc(var(--bottom) + 10px); flex-wrap: wrap; }
  .livecode .code { font-size: 2.6rem; }
}
@media print {
  .side, .top, .bottom, .banner, .no-print, .page-actions, .tabs, .btn, .toolbar { display: none !important; }
  .main { margin: 0; } .content { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  body, html { background: #fff; }
}
