/* Giao diện phân tầng: dải tiêu đề màu gạch, thẻ số liệu, lối tắt bằng icon, mục xếp tầng có icon */

:root {
  --t-brick: #A0432A;  --t-brick-bg: #F6E1D6;
  --t-olive: #5F7A43;  --t-olive-bg: #E4EBD9;
  --t-ochre: #A9742A;  --t-ochre-bg: #F5E8CC;
  --t-slate: #4F7185;  --t-slate-bg: #DFE9EE;
  --grad-brand: linear-gradient(160deg, #B5532F 0%, #8E3620 100%);
}

.t-brick { --c: var(--t-brick); --bg-c: var(--t-brick-bg); }
.t-olive { --c: var(--t-olive); --bg-c: var(--t-olive-bg); }
.t-ochre { --c: var(--t-ochre); --bg-c: var(--t-ochre-bg); }
.t-slate { --c: var(--t-slate); --bg-c: var(--t-slate-bg); }

.ic-chip {
  width: 40px; height: 40px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: var(--bg-c, var(--surface-2)); color: var(--c, var(--ink-2));
}
.ic-chip svg { width: 20px; height: 20px; }

/* Thanh trên cùng: cùng màu với dải tiêu đề */
.top {
  background: var(--grad-brand);
  color: #FFF6EE;
  border-bottom: 0;
}
.top-title b { color: #FFF6EE; text-wrap: balance; }
.top-title small { color: rgba(255, 246, 238, .78); }
/* Biểu tượng ngựa tách nền, không chữ, cao bằng khối hai dòng chữ bên cạnh */
.top-title img.mini { width: auto; height: 50px; max-width: 48px; object-fit: contain; background: none; border-radius: 0; box-shadow: none; }
.top .sync {
  color: #FFF6EE; background: rgba(255, 255, 255, .16);
  padding: 5px 10px; border-radius: 999px;
}

/* Dải tiêu đề: lời chào và thẻ số liệu */
.hub {
  position: relative; overflow: hidden;
  margin: -16px -16px 0; padding: 12px 20px 56px;
  background: var(--grad-brand); color: #FFF6EE;
  border-radius: 0 0 30px 30px;
}
.hub::after {
  content: ""; position: absolute; right: -80px; top: -90px;
  width: 240px; height: 240px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 70%);
}
.hub > * { position: relative; z-index: 1; }
.hub .eyebrow { color: rgba(255, 246, 238, .8); margin: 0; font-size: 12px; }
.hub h1 { color: #FFF6EE; font-size: 26px; margin-top: 4px; }

.hub-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stat {
  min-width: 0; display: flex; flex-direction: column; gap: 2px;
  padding: 12px 10px; border-radius: 18px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
}
.stat > span:not(.stat-ic) { font-size: 12px; opacity: .9; line-height: 1.3; }
.stat b { font-family: var(--font-head); font-size: 24px; line-height: 1.1; margin: 6px 0 4px; }
.stat b.sm { font-family: var(--font-body); font-size: 15px; font-weight: 700; }
.stat-ic {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: #FFF8F0; color: var(--c);
}
.stat-ic svg { width: 16px; height: 16px; }
.stat .pulse { display: inline-block; vertical-align: middle; margin-right: 6px; background: #9BD67A; }
button.stat { font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.stat:active { transform: scale(.97); }

/* Thẻ lối tắt đè lên dải tiêu đề */
.qa-card {
  position: relative; z-index: 2; margin: -34px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 14px 6px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 34px -24px rgba(80, 40, 20, .5);
}
.qa {
  appearance: none; border: 0; background: none; cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0;
  padding: 4px 2px; color: var(--ink); text-decoration: none;
  font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.25;
}
.qa .ic-chip { width: 52px; height: 52px; border-radius: 18px; }
.qa .ic-chip svg { width: 24px; height: 24px; }
.qa-dot {
  position: absolute; top: 0; left: calc(50% + 14px); min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 999px; font-style: normal;
  background: var(--t-brick); color: #FFF8F0; border: 2px solid var(--surface);
  font: 700 11px/16px var(--font-body); text-align: center;
}

/* Lớp nổi: thẻ trạng thái ca đè lên dải tiêu đề */
.lift { margin-top: -34px; position: relative; z-index: 2; }
.lift .hero-card { box-shadow: 0 18px 34px -24px rgba(80, 40, 20, .5); }

/* Tiêu đề mục xếp tầng */
.tier-h {
  display: flex; align-items: center; gap: 10px;
  margin: 28px 2px 12px; scroll-margin-top: 16px;
}
.tier-h .ic-chip { width: 32px; height: 32px; border-radius: 11px; }
.tier-h .ic-chip svg { width: 17px; height: 17px; }
.tier-h h3 { font-size: 18px; flex: 1; }
.count-pill {
  min-width: 26px; padding: 3px 9px; border-radius: 999px; text-align: center;
  background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 700;
}

/* Việc cần duyệt: có vạch màu bên trái để nhận ra mức ưu tiên */
.job-mini { border-left: 4px solid var(--t-brick); }

/* Thanh điều hướng: tab đang chọn là nền màu gạch */
.tab.on {
  color: #FFF8F0;
  background: var(--grad-brand);
  box-shadow: 0 8px 16px -10px rgba(120, 45, 25, .8);
}
.tab svg { width: 22px; height: 22px; }

@media (min-width: 900px) {
  .hub { margin: -28px -36px 0; padding: 22px 36px 60px; border-radius: 0 0 28px 28px; }
}

/* Quy ước lương: giỏ chọn quy ước, khối sửa quy ước, dòng tiền phụ */
.cart { display: grid; gap: 8px; margin-top: 10px; }
.cart-row {
  display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 12px 14px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.cart-row input { width: 18px; height: 18px; accent-color: var(--brick); flex: none; }
.cart-row small { font-size: 12.5px; }
.conv-edit, .conv-new {
  padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line);
}
.conv-del { display: flex; align-items: flex-end; }
.sub-h { font-family: var(--font-body); font-size: 15px; font-weight: 700; margin: 18px 0 0; color: var(--ink-2); }
.pay-line.sub { padding-left: 14px; color: var(--ink-2); font-size: 14px; }

/* Khối gập: câu hỏi cần chốt không chiếm chỗ khi không cần đọc */
.fold { margin-top: 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; font-weight: 700; font-family: var(--font-head); font-size: 18px;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary svg { width: 20px; height: 20px; color: var(--t-slate); }
.fold > summary > span:nth-child(2) { flex: 1; }
.fold > .stack { padding: 0 12px 12px; }

/* Khu vực việc: ô Công trình / Xưởng, thanh chọn khu vực, tag, số thứ tự */
.zones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zone {
  appearance: none; font: inherit; color: var(--ink); cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 14px; border-radius: 22px; background: var(--surface);
  border: 1px solid var(--line); border-top: 4px solid var(--c);
  box-shadow: var(--soft);
}
.zone b { font-family: var(--font-head); font-size: 17px; line-height: 1.2; }
.zone-n { font-size: 12.5px; color: var(--muted); }
.zone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-height: 66px; }
.zone-list li { display: flex; gap: 6px; align-items: baseline; font-size: 13px; min-width: 0; }
.zone-list .zt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.zone-more { font-size: 13px; font-weight: 700; color: var(--c); margin-top: auto; }
.prio { font-weight: 700; color: var(--brick); font-size: 12px; flex: none; }

.seg-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--surface-2); border-radius: 16px;
}
.seg-tab {
  appearance: none; border: 0; cursor: pointer; min-height: 44px; border-radius: 12px;
  background: transparent; color: var(--muted); font: inherit; font-weight: 700;
}
.seg-tab.on { background: var(--surface); color: var(--brick); box-shadow: var(--soft); }

.tagbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tagchip {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
}
.tagchip.on { background: var(--brick); border-color: var(--brick); color: #FFF8F0; }

/* Bảng kế hoạch & dự báo: số không xuống dòng trên điện thoại */
.plan-tbl td, .plan-tbl th { white-space: nowrap; font-size: 13px; padding: 6px 4px; }
.plan-tbl td:first-child { white-space: normal; min-width: 84px; }

/* Bảng chấm công theo ngày: cùng kiểu với bảng kế hoạch; dòng ghi chú nằm ngay dưới ngày, chữ nhỏ */
.ts-tbl td, .ts-tbl th { white-space: nowrap; font-size: 13px; padding: 6px 4px; vertical-align: top; }
.ts-tbl td:nth-child(2) { white-space: normal; min-width: 96px; }
.ts-tbl .fine { white-space: normal; }
.ts-tbl .ts-note td { white-space: normal; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); padding-top: 0; }

/* Thông báo chủ xưởng */
.tab { position: relative; }
.tab .nbadge { position: absolute; top: 2px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brick); color: #FFF8F0; font: 700 11px/18px var(--font-body); text-align: center; font-style: normal; }
.notice-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; margin-bottom: 10px; }
.notice-row .notice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.notice-row.is-new { box-shadow: inset 3px 0 0 var(--brick); }
.notice-row.is-read { opacity: .66; }
.notice-row.is-late { border-color: var(--brick); }
.notice-row .late-t { color: var(--brick); }

/* Báo cáo nhân viên: cột lương theo ngày */
.rpt-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: 8px; }
.rpt-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.rpt-col i { display: block; width: 100%; background: var(--t-olive); border-radius: 4px 4px 0 0; min-height: 4px; }
.rpt-col span { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Dòng bấm được (mở bảng chấm công) */
.pay-line.link { cursor: pointer; }
.pay-line.link:focus-visible { outline: 2px solid var(--brick); outline-offset: 2px; }

/* Thông báo: chữ đọc được trên nền sáng + thẻ tóm tắt việc cần kiểm tra */
.notice-intro { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; line-height: 1.5; }
.notice-row .muted { color: var(--ink-2); }
.notice-sum { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; color: var(--ink); }
.notice-sum span { font-size: 13.5px; color: var(--ink-2); }
.notice-sum.has-todo { box-shadow: inset 4px 0 0 var(--brick); }

/* Đoạn giới thiệu nằm trên nền tối của dải tiêu đề: cùng màu với dòng "Chủ xưởng" */
.hub .notice-intro { color: rgba(255, 246, 238, .8); }

/* Trang chủ chủ xưởng: dải cam, thẻ số liệu nổi lên, chuông thông báo */
.hub {
  background: linear-gradient(160deg, #9c3e1a 0%, #c85a2a 58%, #e08a4f 100%);
  color: #fff7ef;
  border-radius: 0 0 28px 28px;
  padding: 18px 18px 46px;
  margin: -12px -12px 0;
}
.hub-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hub-brand { display: flex; align-items: center; gap: 10px; }
.hub-brand b { display: block; font-family: Georgia, 'Times New Roman', serif; font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.hub-brand small { display: block; opacity: .85; font-size: 12px; }
.hub-logo { width: 42px; height: 42px; object-fit: contain; background: rgba(255,247,239,.12); border-radius: 12px; padding: 4px; }
.hub-bell {
  position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,247,239,.45);
  background: rgba(255,247,239,.12); color: #fff7ef; display: grid; place-items: center; cursor: pointer;
}
.hub-bell svg { width: 20px; height: 20px; }
.hub-bell i {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: #e5322d; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.hub h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 27px; font-weight: 600; margin: 22px 0 2px; color: #fff7ef; }
.hub-sub { margin: 0; font-size: 15px; opacity: .92; }
.hub-stats-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px -6px 0; position: relative; z-index: 1;
}
.hub-stats-4 .stat {
  background: #fffaf5; color: #3a2116; border: 0; border-radius: 16px; padding: 12px 8px 10px; text-align: left;
  box-shadow: 0 6px 16px rgba(80,30,10,.14); cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.hub-stats-4 .stat b { font-size: 22px; line-height: 1.1; }
.hub-stats-4 .stat b.sm { font-size: 14px; }
.hub-stats-4 .stat span:last-child { font-size: 12px; color: #6b4a3a; }
.hub-stats-4 .stat-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
.hub-stats-4 .stat-ic svg { width: 16px; height: 16px; }
.hub + .qa-card { margin-top: 14px; }
.hub-stats-4 .stat:focus-visible, .hub-bell:focus-visible { outline: 2px solid #fff7ef; outline-offset: 2px; }
/* Thanh tab có 5 mục (chủ xưởng): chia đều theo số mục, không xuống dòng */
.tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.hub-stats-4 .stat { text-decoration: none; color: #3a2116; }
.hub-stats-4 .stat b { text-decoration: none; }

/* Thanh tab dưới: mục đang chọn là viên cam đậm, chữ trắng (theo ảnh mẫu) */
.tabbar { border-radius: 26px; padding: 8px; box-shadow: 0 16px 34px -16px rgba(80, 30, 10, .45); }
.tab { border-radius: 20px; min-height: 60px; font-size: 11px; }
.tab.on { color: #fff7ef; background: linear-gradient(160deg, #a8431d, #c85a2a); box-shadow: 0 6px 14px -6px rgba(140, 50, 20, .7); }
.tab.on svg { stroke: #fff7ef; }
/* Thẻ nội dung: bo góc lớn, bóng nhẹ, nền kem như ảnh mẫu */
.card { border-radius: 22px; box-shadow: 0 8px 22px -16px rgba(90, 40, 20, .35); }
.hub + .qa-card { border-radius: 24px; }

/* Trang chủ: chip ngày, tiêu đề mục, ô check-in, ô tổng quan (theo ảnh mẫu) */
.hub-date { display: inline-block; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: rgba(255,247,239,.16); font-size: 13px; color: #fff7ef; }
.hub-h { font-family: Georgia, 'Times New Roman', serif; font-size: 19px; color: var(--ink); margin: 22px 0 10px; font-weight: 600; }
.ci-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.ci-cell { background: var(--surface); border-radius: 18px; padding: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ci-cell b { font-size: 22px; color: var(--ink); line-height: 1.1; }
.ci-cell span { font-size: 12px; color: var(--ink-2); }
.ci-av { display: flex; margin-top: 6px; }
.ci-av i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; margin-right: -6px; border: 2px solid var(--surface); background: var(--brick); }
.ci-av i:nth-child(2n) { background: var(--olive); }
.ci-av i:nth-child(3n) { background: var(--slate); }
.ci-cell.t-ochre .ci-av i { background: var(--ochre); }
.ov-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ov-cell { background: var(--surface); border-radius: 18px; padding: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ov-cell span { font-size: 12px; color: var(--ink-2); }
.ov-cell b { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }

/* Nút tài khoản trên trang chủ và chọn hình nền */
.hub-tools { display: flex; align-items: center; gap: 10px; }
.hub-av {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,247,239,.7); cursor: pointer;
  background: #fff7ef; color: var(--brick); font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: 700;
}
.hub-av:focus-visible { outline: 2px solid #fff7ef; outline-offset: 2px; }
.bg-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.bg-sw { height: 56px; border-radius: 16px; border: 2px solid transparent; cursor: pointer; }
.bg-sw.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }

/* Khi có ảnh nền riêng: bỏ lớp sáng trang trí, chữ đầu trang sáng để đọc được trên ảnh */
.hub[style*="url("]::after { display: none; }
.top[style*="url("], .top[style*="linear-gradient"] { color: #fff7ef; }
.top[style*="url("] small, .top[style*="linear-gradient"] small { color: rgba(255, 247, 239, .85); }
.top[style*="url("] .sync, .top[style*="linear-gradient"] .sync { background: rgba(255, 247, 239, .16); color: #fff7ef; }

/* Danh sách việc dạng ngang: ảnh/ô màu ở đầu, tiến độ bằng pin */
.job-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
/* Danh sách việc: 4 ô mỗi hàng, hết hàng thì xuống dòng; mỗi ô hiện gọn các trạng thái (giờ còn lại, trễ, pin, % đã làm, Mời vào) */
.job-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 4px 0 10px; align-items: start; }
.job-grid > .job-tile { flex: none; min-width: 0; border-radius: 14px; }
.job-grid > .job-tile .jt-img { height: 48px; padding: 4px; }
.job-grid > .job-tile .jt-img b { font-size: 11px; }
.job-grid > .job-tile .jt-body { padding: 6px; gap: 3px; }
.job-grid > .job-tile .jt-title { font-size: 11px; line-height: 1.25; -webkit-line-clamp: 2; }
.job-grid > .job-tile .jt-meta { font-size: 10px; line-height: 1.3; }
.job-grid > .job-tile .jt-prog { font-size: 10px; white-space: normal; line-height: 1.3; }
.job-grid > .job-tile .jt-prog b { font-size: 10px; }
.job-grid > .job-tile .batt { padding: 2px; gap: 1px; margin: 0 4px 0 0; }
.job-grid > .job-tile .batt i { width: 5px; height: 8px; }
.job-grid > .job-tile .batt::after { height: 5px; }
.job-grid > .job-tile .stage-row { display: none; }
/* Khu vực: mỗi hàng 4 thẻ gọn, hết hàng thì xuống dòng, không có thanh kéo ngang */
.job-grid-all { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 4px 0 10px; }
.job-grid-all > .job-tile { flex: none; min-width: 0; border-radius: 16px; }
.job-grid-all > .job-tile .jt-img { height: 64px; padding: 6px; }
.job-grid-all > .job-tile .jt-body { padding: 8px; gap: 4px; }
.job-grid-all > .job-tile .jt-title { font-size: 12px; -webkit-line-clamp: 2; }
.job-grid-all > .job-tile .jt-meta,
.job-grid-all > .job-tile .jt-prog,
.job-grid-all > .job-tile .stage-row { display: none; }
.job-grid-all > .job-tile .jt-paint { font-size: 11px; padding: 5px 8px; border-radius: 10px; }
.job-tile {
  flex: 0 0 200px; scroll-snap-align: start; display: flex; flex-direction: column; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0; overflow: hidden;
  box-shadow: 0 8px 20px -16px rgba(90, 40, 20, .4); cursor: pointer; color: var(--ink); font: inherit;
}
.job-tile:focus-visible { outline: 2px solid var(--brick); outline-offset: 2px; }
.jt-img { height: 96px; display: grid; place-items: end start; padding: 10px; color: rgba(255,247,239,.9); }
.jt-img b { font-family: var(--font-head); font-size: 15px; letter-spacing: .04em; background: rgba(40,16,6,.28); padding: 2px 8px; border-radius: 8px; }
.jt-img.t-brick { background: linear-gradient(150deg, #9c3e1a, #d0703a); }
.jt-img.t-olive { background: linear-gradient(150deg, #3f5230, #8aa46a); }
.jt-img.t-ochre { background: linear-gradient(150deg, #8a6220, #d9a94e); }
.jt-img.t-slate { background: linear-gradient(150deg, #2f4a5c, #7fa1b4); }
/* Ảnh đầu thẻ việc: tông cam vàng chuyển màu, mỗi việc một sắc từ đậm đến nhạt */
.jt-img.jt-s0 { background: linear-gradient(150deg, #7a2f10, #a84a1c); }
.jt-img.jt-s1 { background: linear-gradient(150deg, #a84a1c, #cf6b2e); }
.jt-img.jt-s2 { background: linear-gradient(150deg, #c9622a, #e88f3e); }
.jt-img.jt-s3 { background: linear-gradient(150deg, #dc7a31, #f2ad52); color: #4a2210; }
.jt-img.jt-s4 { background: linear-gradient(150deg, #e9994a, #f7c770); color: #4a2210; }
.jt-img.jt-s5 { background: linear-gradient(150deg, #f2b25a, #fbd98e); color: #4a2210; }
.jt-body { display: flex; flex-direction: column; gap: 6px; padding: 12px; min-width: 0; }
.jt-title { font-weight: 700; font-size: 15px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.jt-meta { font-size: 12px; color: var(--muted); line-height: 1.35; }
.jt-prog { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.jt-prog b { font-size: 13px; color: var(--ink-2); }
.jt-prog .batt { display: inline-flex; vertical-align: middle; margin: -2px 6px 0 0; }
.jt-paint { display: block; align-self: flex-end; width: fit-content; max-width: 100%; margin-top: 8px; padding: 8px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; color: #FFF8F0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(180deg, #BA5D40 0%, #9A3E27 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(60, 20, 8, .18), 0 8px 16px -10px rgba(120, 45, 25, .7); }
.jt-paint b { color: #FFF8F0; font-weight: 700; }
.job-grid > .job-tile .jt-paint { font-size: 10px; padding: 4px 6px; border-radius: 9px; }
.done-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.done-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.done-row:focus-visible { outline: 2px solid var(--brick); outline-offset: 2px; }
.done-ok { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--olive); color: #fff; font-weight: 700; }
.done-body { display: flex; flex-direction: column; min-width: 0; }
.done-body b { font-size: 14px; line-height: 1.3; }
.more-list { margin-top: 10px; }
.more-list > summary { list-style: none; display: inline-flex; cursor: pointer; }
.more-list > summary::-webkit-details-marker { display: none; }
.done-pick { position: relative; margin-left: auto; }
.tier-h .done-month { white-space: nowrap; font-size: 13px; padding: 6px 12px; }
.done-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 170px; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 30px -18px rgba(80, 40, 20, .5); }
.done-opt { text-align: left; padding: 9px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; color: var(--ink); white-space: nowrap; cursor: pointer; }
.done-opt:focus-visible { outline: 2px solid var(--brick); outline-offset: 1px; }
.done-opt.on { background: var(--brick); color: #FFF8F0; font-weight: 700; }
.page-h.split { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.batt { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1.5px solid var(--ink-2); border-radius: 5px; }
.batt::after { content: ''; width: 3px; height: 8px; border-radius: 0 2px 2px 0; background: var(--ink-2); margin-left: 1px; }
.batt i { width: 9px; height: 12px; border-radius: 2px; background: var(--line); }
.batt i.on { background: var(--olive); }
.jt-body .chip { align-self: flex-start; }
.login .btn-xl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.login .btn-xl b { font-size: 17px; }
.login .btn-xl small { font-size: 13px; opacity: .8; font-weight: 500; }
.av-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
/* Logo cam đậm trong suốt: đặt trực tiếp trên nền app, không khung, không bóng */
.login-logo { box-shadow: none; border-radius: 0; background: none; }
.brand img.brand-logo { background: none; border-radius: 0; }

/* ===== Trang chủ nhân viên: giao diện bảng điều hành (thẻ nổi, icon 3D mềm, ánh sáng nhẹ) ===== */
.hub-s { padding: 14px 20px 64px; box-shadow: 0 26px 40px -30px rgba(90, 35, 12, .7); }
.hub-s::before {
  content: ""; position: absolute; left: -70px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%;
  pointer-events: none; background: radial-gradient(circle, rgba(255, 214, 160, .32), rgba(255, 214, 160, 0) 70%);
}
.hs-greet { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.hs-greet h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 28px; font-weight: 600; margin: 0; color: #FFF6EE; line-height: 1.15; }
.hs-greet .hub-sub { margin: 4px 0 0; }
/* Mặt trời cười động: tia xoay chậm, mặt nhấp nhô, miệng cười mở, mắt chớp, ánh sáng thở */
.hs-sun { flex: 0 0 auto; display: block; width: 58px; height: 58px; }
.hs-sun svg { width: 100%; height: 100%; overflow: visible; animation: hsGlow 2.6s ease-in-out infinite; }
.hs-ray { fill: #ffd27a; }
.hs-rays { transform-box: view-box; transform-origin: 32px 32px; animation: hsSpin 16s linear infinite; }
.hs-face { transform-box: view-box; transform-origin: 32px 32px; animation: hsBob 2.6s ease-in-out infinite; }
.hs-smile { transform-box: fill-box; transform-origin: center; animation: hsSmile 2.6s ease-in-out infinite; }
.hs-eye { transform-box: fill-box; transform-origin: center; animation: hsBlink 5s infinite; }
@keyframes hsSpin { to { transform: rotate(360deg); } }
@keyframes hsBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes hsSmile { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.12, 1.4); } }
@keyframes hsBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes hsGlow {
  0%, 100% { filter: drop-shadow(0 4px 8px rgba(255, 170, 60, .45)); }
  50% { filter: drop-shadow(0 8px 18px rgba(255, 190, 80, .9)); }
}
.hs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hs-stat {
  min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 12px; border-radius: 22px; color: #3a2116; text-align: left; font: inherit; cursor: pointer;
  background: linear-gradient(180deg, #fffdf9, #f7ede2); border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 16px 26px -18px rgba(90, 40, 20, .55), inset 0 1px 0 #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.hs-stat:active { transform: translateY(2px) scale(.985); box-shadow: 0 8px 16px -14px rgba(90, 40, 20, .5), inset 0 1px 0 #fff; }
.hs-stat span:not(.hs-ic) { font-size: 12px; color: #7a5a48; line-height: 1.3; }
.hs-stat b { font-family: Georgia, 'Times New Roman', serif; font-size: 24px; line-height: 1.1; color: #3a2116; }
.hs-stat b.sm { font-family: inherit; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.hs-ic {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: #fffaf4; margin-bottom: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 16px -10px rgba(60, 20, 10, .7);
}
.hs-ic svg { width: 20px; height: 20px; }
.hs-ic.t-olive { background: linear-gradient(160deg, #8fa86a, #4f6b38); }
.hs-ic.t-brick { background: linear-gradient(160deg, #e5865f, #b1482a); }
.hs-ic.t-ochre { background: linear-gradient(160deg, #f2cb7f, #c48a2e); }
.hs-wrap { margin-top: 18px; }
.hs-wrap .hero-card, .hs-body .job-tile { box-shadow: 0 18px 30px -22px rgba(80, 40, 20, .45); }
.hs-goal { display: flex; align-items: center; gap: 16px; }
.hs-ring {
  flex: 0 0 auto; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#c85a2a calc(var(--p, 0) * 1%), #f0e2d2 0);
  box-shadow: 0 10px 18px -12px rgba(120, 50, 20, .6);
}
.hs-ring b {
  width: 60px; height: 60px; border-radius: 50%; background: #fffaf4; display: grid; place-items: center;
  font-family: Georgia, 'Times New Roman', serif; font-size: 17px; color: #3a2116;
}
@keyframes hsIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hs-body > * { animation: hsIn .45s ease both; }
.hs-body > *:nth-child(2) { animation-delay: .05s; }
.hs-body > *:nth-child(3) { animation-delay: .1s; }
.hs-body > *:nth-child(4) { animation-delay: .15s; }
/* Mặt trăng buổi tối: ánh sáng dịu, sao nhấp nháy */
.hs-moon svg { animation: hsMoonGlow 3s ease-in-out infinite; }
@keyframes hsMoonGlow {
  0%, 100% { filter: drop-shadow(0 4px 10px rgba(235, 225, 255, .45)); }
  50% { filter: drop-shadow(0 8px 18px rgba(240, 232, 255, .85)); }
}
.hs-star { transform-box: fill-box; transform-origin: center; animation: hsTwinkle 2.4s ease-in-out infinite; }
.hs-star.s2 { animation-delay: .8s; }
.hs-star.s3 { animation-delay: 1.6s; }
@keyframes hsTwinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }

@media (prefers-reduced-motion: reduce) {
  .hs-body > *, .hs-sun svg, .hs-moon svg, .hs-rays, .hs-face, .hs-smile, .hs-eye, .hs-star { animation: none; }
  .hs-stat { transition: none; }
}

/* Giai đoạn công việc: 4 nút mờ 20%, giai đoạn hiện tại sáng 100% */
.stage-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stg {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; line-height: 1.4;
  color: #3a2116; background: #f0e4d6; opacity: .2; white-space: nowrap;
}
.stg.on { opacity: 1; font-weight: 700; box-shadow: 0 4px 10px -6px rgba(80, 30, 10, .6); }
.stg-wait.on { background: #d8dde3; color: #33414d; }
.stg-doing.on { background: #c9dcae; color: #2e4421; }
.stg-due.on { background: #f5d48a; color: #5a3a08; }
.stg-late.on { background: #f2b8a6; color: #7a2410; }
