/* khối main body chưa các nội dung chính */
.wrapper {
    max-width: 550px;
    margin: 0 auto;
    height: 100vh;
}

body {
    background-color: #e9e9e9;
    /* 🚫 Chặn select text trên mobile */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    user-select: none;          /* Standard */
    -webkit-touch-callout: none; /* iOS Safari - chặn long-press menu */
}

/* ✅ Cho phép select text trong input, textarea */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

/* Khối nội dung chính */
.content {
    max-width: 550px;
    margin: 0 auto;
    padding: 5px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    height: 100vh;
}


/* Thông báo lỗi */
.error-message {
    color: red;
    margin-bottom: 15px;
    text-align: center;
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 480px) {
    .content {
        padding: 15px;
    }

    h2 {
        font-size: 20px;
    }
}

/* Nút checkin/checkout nổi bật */
.button-check {
    background-color: #28a745;
    color: white;
    font-size: 20px;
    font-weight: bold;
    padding: 20px;
    border: none;
    border-radius: 12px;
    width: 100%;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.button-check:hover {
    background-color: #218838;
}

.btn-green {
    background-color: #28a745;
    color: white;
    font-size: 30px;
    font-weight: bold;
    padding: 20px 25px;
    border: none;
    border-radius: 8px;
    margin: 10px 0;
    width: 100%;
}

.btn-red {
    background-color: #dc3545;
    color: white;
    font-size: 30px;
    font-weight: bold;
    padding: 20px 25px;
    border: none;
    border-radius: 8px;
    margin: 10px 0;
    width: 100%;
}

.success-msg {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
    margin-top: 20px;
}

.missing-badge {
    display: inline-block;
    background-color: #ffe0e0;
    color: #d63031;
    padding: 10px;
    margin: 4px 6px 0 0;
    border-radius: 10px;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive cho bảng trên màn hình nhỏ */
@media (max-width: 480px) {

    table th,
    table td {
        padding: 8px;
        font-size: 16px;
    }
}

#popupAlert {
    position: fixed;
    top: 20px;
    /* cách mép trên màn hình */
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    /* nhỏ hơn chiều ngang màn hình điện thoại */
    max-width: 450px;
    background-color: #ffc4c4;
    /* màu vàng nhạt kiểu sticky note */
    border: 2px solid #fb2d2d;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    padding: 20px;
}

#popupContent {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#popupMessage {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
}

#closePopupBtn {
    padding: 8px 16px;
    font-size: 20px;
    font-weight: bold;
    background-color: #fb2d2d;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#closePopupBtn:hover {
    background-color: #b50505;
}

/* =====================================
   Product grid/card responsive utilities
   ===================================== */
.product-grid {
    display: grid;
    gap: 10px;
}

.product-grid.xlarge {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
}

/* card trong grid nên fill hết ô để tránh rơi 1 cột không cần thiết */
.product-grid.xlarge > .product-card {
    width: 100%;
    max-width: none;
    min-width: 0;
}

/* mobile portrait: ưu tiên 2 cột ổn định */
@media (max-width: 640px) {
    .product-grid.xlarge {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}

/* fallback cho màn cực hẹp */
@media (max-width: 339px) {
    .product-grid.xlarge {
        grid-template-columns: 1fr !important;
    }
}

/* mobile portrait: luôn ưu tiên 2 cột cho menu nhanh ở home */
@media (max-width: 768px) and (orientation: portrait) {
    .product-grid.xlarge {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* ========== Timesheet — thống kê tháng (2 cột + tổng full width) ========== */
.ts-stats {
    margin-top: 8px;
}

.ts-stats__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
}

.ts-stats__cell {
    padding: 8px;
    background: #fff;
    border-radius: 10px;
    box-sizing: border-box;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.ts-stats__cell--right {
    text-align: right;
}

/* Nhãn KPI một dòng (ô hẹp mobile) */
.ts-stats__kpi-label {
    white-space: nowrap;
}

/* Hỗ trợ / Tạm ứng: ngay trên TỔNG LƯƠNG, chỉ hiện ô có giá trị */
.ts-stats__extras {
    margin-top: 12px;
}

.ts-stats__extras-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
}

.ts-stats__extras-grid > .ts-stats__cell:only-child {
    grid-column: 1 / -1;
}

.ts-stats__confirm {
    margin-top: 12px;
    padding: 8px;
    text-align: center;
}

.ts-stats__total {
    margin-top: 12px;
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
    border: 2px solid #006fe6;
    border-radius: 12px;
    box-sizing: border-box;
    text-align: center;
}

/* Timesheet → ô “Đã tạm ứng” là link sang trang chi tiết */
a.ts-stats__cell--link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
}

.ts-stats__extras-grid > a.ts-stats__cell--link:only-child {
    grid-column: 1 / -1;
}

/* ========== Trang Tạm ứng (advance.php) — bám style timesheet / thẻ gọn ========== */
.adv-summary {
    padding: 0;
}

/* Tiêu đề chính thẻ nội dung attendance (spotlight / advance / leave) */
.att-sheet-hero-title {
    margin-bottom: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #005a8c;
    letter-spacing: 0.03em;
    line-height: 1.25;
}

.adv-summary__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
}

.adv-summary__item {
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.adv-summary__item--pending {
    background: #fff8e6;
    border-color: #f0c36d;
}

.adv-summary__item--done {
    background: #eefaf4;
    border-color: #9fd4b8;
}

.adv-summary__label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    line-height: 1.25;
}

.adv-summary__value {
    font-size: 22px;
    line-height: 1.2;
}

.adv-section-title {
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.adv-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.adv-card {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    background: #fff;
}

.adv-card--open {
    border-left: 4px solid #e67700;
}

.adv-card--deducted {
    border-left: 4px solid #2a9d8f;
    opacity: 0.97;
}

.adv-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.adv-card__amount {
    margin-bottom: 8px;
    font-size: 26px;
}

.adv-badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1.2;
}

.adv-badge--wait {
    background: #ffe8cc;
    color: #b45309;
}

.adv-badge--ok {
    background: #d8f3ea;
    color: #1d6f5c;
}

.adv-card__meta {
    margin: 0;
}

.adv-card__row {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 58%);
    gap: 8px 10px;
    font-size: 14px;
    line-height: 1.35;
    margin: 0;
    padding: 6px 0;
    border-top: 1px solid #f0f0f0;
}

.adv-card__row:first-of-type {
    border-top: none;
    padding-top: 0;
}

.adv-card__row dt {
    margin: 0;
    font-weight: 600;
    color: #666;
}

.adv-card__row dd {
    margin: 0;
    text-align: right;
    word-break: break-word;
}

.adv-card__row--note dd {
    text-align: left;
    grid-column: 1 / -1;
}

@media (max-width: 380px) {
    .adv-summary__grid {
        grid-template-columns: 1fr;
    }

    .adv-card__row {
        grid-template-columns: 1fr;
    }

    .adv-card__row dd {
        text-align: left;
    }
}

/* Trang chủ — block Nhân viên nổi bật (đồng bộ font với thống kê tháng) */
.home-spotlight__section {
    margin-top: 0;
}

.home-spotlight__title {
    font-size: 17px;
    font-weight: 700;
    color: #005a8c;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.3;
}

.home-spotlight__subtitle {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.home-spotlight__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-spotlight__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    line-height: 1.35;
}

.home-spotlight__row:last-child {
    border-bottom: none;
}

.home-spotlight__rank {
    flex: 0 0 1.5em;
    color: #666;
    font-weight: 600;
}

.home-spotlight__name {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    font-weight: 600;
    color: #333;
}

.home-spotlight__val {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 52%;
    text-align: right;
    font-size: 15px;
    line-height: 1.35;
    white-space: normal;
}

.home-spotlight__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #ccc, transparent);
    margin: 16px 0;
}

/* Dropdown chọn năm — trang bảng xếp hạng */
.spotlight-dd {
    position: relative;
    max-width: 240px;
    margin: 14px auto 0;
    text-align: center;
}

.spotlight-dd__toggle {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 20px;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    color: inherit;
}

.spotlight-dd__year {
    font-size: 22px;
    color: #005a8c;
}

.spotlight-dd__chev {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    color: #005a8c;
    transition: transform 0.2s ease;
}

.spotlight-dd.is-open .spotlight-dd__chev {
    transform: rotate(180deg);
}

.spotlight-dd__menu {
    display: none;
    list-style: none;
    margin: 6px 0 0;
    padding: 4px 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: 100%;
    max-width: 220px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.spotlight-dd.is-open .spotlight-dd__menu {
    display: block;
}

.spotlight-dd__menu li {
    margin: 0;
    padding: 0;
}

.spotlight-dd__menu a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    font-size: 17px;
    font-weight: 600;
}

.spotlight-dd__menu a:hover {
    background: #f5f8fb;
}

.spotlight-dd__menu a.is-active {
    background: #e8f4fc;
    color: #005a8c;
    font-weight: 700;
}

/* Bảng xếp hạng — panel + hàng có avatar / phòng ban */
.spotlight-panel {
    margin-top: 18px;
    padding: 14px 12px 12px;
    background: #fafbfc;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.spotlight-panel:first-of-type {
    margin-top: 6px;
}

/* Thống kê cá nhân — cuối trang spotlight (một panel, avatar cạnh tiêu đề) */
.spotlight-personal {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e5eaf0;
}

.spotlight-personal .spotlight-panel {
    margin-top: 0;
}

.spotlight-panel--personal {
    padding-top: 14px;
}

/* Khối cá nhân + .bgblue: nền đậm — chữ/số và ranh giới sáng */
.spotlight-personal .spotlight-panel.bgblue {
    border-color: rgba(255, 255, 255, 0.22);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal__name {
    color: #fff;
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal__dept {
    color: rgba(255, 255, 255, 0.88);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal__meta {
    color: rgba(255, 255, 255, 0.72);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal__stats {
    border-top-color: rgba(255, 255, 255, 0.25);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal-stat {
    border-bottom-color: rgba(255, 255, 255, 0.18);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal-stat__label {
    color: rgba(255, 255, 255, 0.94);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal__avatar-wrap .spotlight-rank-item__avatar {
    border-color: rgba(255, 255, 255, 0.45);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal__avatar-wrap .spotlight-rank-item__avatar--empty {
    border-color: rgba(255, 255, 255, 0.42);
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-rank-item__val--work {
    color: #bbdefb;
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-rank-item__val--ot {
    color: #e1bee7;
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal-stat__val--piecework {
    color: #b2dfdb;
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal-stat__val--early {
    color: #ffcc80;
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-rank-item__val--late-low {
    color: #c8e6c9;
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal-stat--late-least.is-late-detail-open {
    background: rgba(255, 255, 255, 0.12);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-rank-item__late-detail-text {
    color: rgba(255, 255, 255, 0.88);
}

.spotlight-personal .spotlight-panel.bgblue .spotlight-personal-stat__row.js-spotlight-late-score-toggle:focus-visible {
    outline-color: rgba(255, 255, 255, 0.85);
}

.spotlight-personal__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.spotlight-personal__avatar-wrap {
    flex-shrink: 0;
    line-height: 0;
}

.spotlight-personal__avatar-wrap .spotlight-rank-item__avatar {
    margin-right: 0;
    width: 56px;
    height: 56px;
}

.spotlight-personal__avatar-wrap .spotlight-rank-item__avatar--empty svg {
    width: 28px;
    height: 28px;
}

.spotlight-personal__head-text {
    flex: 1;
    min-width: 0;
}

.spotlight-personal__name {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: #0d3d5c;
    letter-spacing: 0.01em;
}

.spotlight-personal__dept {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #5a6570;
}

.spotlight-personal__meta {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #8a96a3;
    letter-spacing: 0.01em;
}

.spotlight-personal__stats {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    border-top: 1px solid #eef1f5;
}

.spotlight-personal-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 2px;
    border-bottom: 1px solid #eef1f5;
    font-size: 15px;
    line-height: 1.35;
}

.spotlight-personal-stat:last-child {
    border-bottom: none;
}

.spotlight-personal-stat__label {
    font-weight: 600;
    color: #333;
}

.spotlight-personal-stat__val {
    flex-shrink: 0;
    text-align: right;
    font-size: 15px;
    line-height: 1.3;
}

.spotlight-personal-stat__unit {
    font-weight: 600;
    font-size: 13px;
    opacity: 0.92;
}

.spotlight-personal-stat__val--early {
    color: #e65100;
}

.spotlight-personal-stat__val--piecework {
    color: #00695c;
}

.spotlight-panel__heading {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-align: center;
    color: #0d3d5c;
    line-height: 1.35;
}

/* Cùng tông với cột số liệu từng block */
.spotlight-panel__heading--late-low {
    color: #0d8050;
}

.spotlight-panel__heading--late-high {
    color: #c62828;
}

.spotlight-panel__heading--work {
    color: #1565c0;
}

.spotlight-panel__heading--ot {
    color: #5e35b1;
}

.spotlight-panel__heading--piecework {
    color: #00695c;
}

.spotlight-panel__heading--unpaid {
    color: #b71c1c;
}

.spotlight-rank-item__val--unpaid .spotlight-rank-item__val-line--unit {
    color: #b71c1c;
    opacity: 0.88;
}

.spotlight-rank-item__val--unpaid {
    color: #b71c1c;
}

.spotlight-panel__empty {
    margin: 6px 0 0;
}

.spotlight-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spotlight-rank-item {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 8px;
    border-bottom: 1px solid #eef1f5;
    font-size: 15px;
    line-height: 1.35;
    background: #fff;
}

.spotlight-rank-item:last-child {
    border-bottom: none;
}

/* Hàng điểm ít muộn: cả dòng ấn để mở chi tiết */
.spotlight-rank-item--late-least {
    flex-direction: column;
    align-items: stretch;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(13, 128, 80, 0.12);
}

.spotlight-rank-item--late-least.is-late-detail-open {
    background: #f4faf7;
}

.spotlight-rank-item--late-most {
    flex-direction: column;
    align-items: stretch;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(198, 40, 40, 0.1);
}

.spotlight-rank-item--late-most.is-late-detail-open {
    background: #fff8f8;
}

.spotlight-rank-item--late-most .spotlight-rank-item__val-line--unit {
    color: #c62828;
    opacity: 0.88;
}

.spotlight-rank-item--late-most .spotlight-rank-item__row.js-spotlight-late-score-toggle:focus-visible {
    outline: 2px solid #c62828;
    outline-offset: 2px;
    border-radius: 4px;
}

.spotlight-rank-item__row {
    display: flex;
    align-items: center;
    width: 100%;
}

.spotlight-rank-item__late-detail {
    width: 100%;
    flex-basis: 100%;
    margin: 0;
    padding: 6px 6px 2px;
    box-sizing: border-box;
}

.spotlight-rank-item__late-detail--personal {
    padding-top: 4px;
}

.spotlight-rank-item__late-detail-text {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    color: #5a6a7a;
    text-align: center;
}

.spotlight-rank-item__late-detail--personal .spotlight-rank-item__late-detail-subst {
    margin-top: 8px;
}

/* Số điểm to hơn một bậc so với đơn vị "điểm" */
.spotlight-rank-item__val-line--score {
    font-size: 14px;
}

.spotlight-personal-stat .spotlight-rank-item__val-line--score {
    font-size: 16px;
}

.spotlight-personal-stat--late-least {
    flex-wrap: wrap;
    align-items: stretch;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(13, 128, 80, 0.1);
}

.spotlight-personal-stat--late-least.is-late-detail-open {
    background: #f8fbfb;
    margin: 0 -4px;
    padding-left: 6px;
    padding-right: 6px;
    border-radius: 6px;
}

.spotlight-personal-stat__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.spotlight-rank-item__row.js-spotlight-late-score-toggle:focus-visible,
.spotlight-personal-stat__row.js-spotlight-late-score-toggle:focus-visible {
    outline: 2px solid #0d8050;
    outline-offset: 2px;
    border-radius: 4px;
}

.spotlight-rank-item__avatar {
    flex-shrink: 0;
    margin-right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e4eaf0;
    background: #f0f3f7;
}

/* Chưa có ảnh đại diện — SVG (không cần Font Awesome) */
.spotlight-rank-item__avatar--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-style: dashed;
    border-color: #c5ccd6;
    color: #98a4b3;
    line-height: 0;
}

.spotlight-rank-item__avatar--empty svg {
    flex-shrink: 0;
    display: block;
}

.spotlight-rank-item__main {
    flex: 1 1 auto;
    min-width: 0;
}

.spotlight-rank-item__name {
    font-weight: 700;
    color: #222;
    overflow-wrap: break-word;
    word-break: normal;
}

.spotlight-rank-item__dept {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7a8c;
}

/* Cột số liệu chỉ rộng vừa nội dung; phần tên + phòng ban chiếm phần còn lại */
.spotlight-rank-item__val {
    flex: 0 1 auto;
    align-self: center;
    text-align: right;
    font-size: 13px;
    line-height: 1.3;
    min-width: 0;
    max-width: min(38%, 11rem);
    margin-left: 10px;
}

.spotlight-rank-item__val--late-low {
    color: #0d8050;
}

.spotlight-rank-item__val--late-low .spotlight-rank-item__val-line--unit {
    color: #0d8050;
    opacity: 0.88;
}


.spotlight-rank-item__val--late-high {
    color: #c62828;
}

.spotlight-rank-item__val--stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    line-height: 1.25;
}

.spotlight-rank-item__val-line {
    display: block;
}

.spotlight-rank-item__val-line--muted {
    font-size: 12px;
    font-weight: 600;
    color: #b71c1c;
    opacity: 0.92;
}

.spotlight-rank-item__val-line--unit {
    display: block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

.spotlight-rank-item__val--work .spotlight-rank-item__val-line--unit {
    color: #1565c0;
}

.spotlight-rank-item__val--ot .spotlight-rank-item__val-line--unit {
    color: #5e35b1;
}

.spotlight-rank-item__val--work {
    color: #1565c0;
}

.spotlight-rank-item__val--ot {
    color: #5e35b1;
}

.spotlight-rank-item__val--piecework .spotlight-rank-item__val-line--unit {
    color: #00695c;
}

.spotlight-rank-item__val--piecework {
    color: #00695c;
}

/* Đồng hồ báo ⏰ — ưu tiên tông đỏ (hỗ trợ tùy nền tảng) */
.spotlight-emoji-alarm {
    display: inline-block;
    margin-right: 6px;
    font-size: 1.15em;
    line-height: 1;
    vertical-align: -0.15em;
    color: #d32f2f;
}

.spotlight-detail-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 12px;
    padding: 11px 14px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    color: #0d5a8a;
    background: #f0f6fb;
    border: 1px solid #c5dbe8;
    border-radius: 10px;
}

.spotlight-detail-btn:hover {
    background: #e3eef6;
    color: #064a6e;
}

.spotlight-detail-page__hero {
    font-size: 16px;
    line-height: 1.35;
    padding: 0 4px;
    word-break: break-word;
}

.spotlight-month-block__title {
    font-size: 15px;
    font-weight: 800;
    color: #3d5366;
    text-align: left;
    margin-bottom: 10px;
}