/* Modul Tatatertib (tatatertib) - semua gaya di bawah .ttb-page */
.ttb-page {
    /* Palet korporat UPM */
    --ttb-accent: #a6192e;
    --ttb-accent-dark: #7f1425;
    --ttb-accent-soft: #f8eef0;
    --ttb-accent-past: #e2b6be;
    --ttb-ink: #252a2e;
    --ttb-muted: #6c737a;
    --ttb-line: #dfe3e7;
    --ttb-surface: #ffffff;
    --ttb-head-bg: #f8f9fc;
    --ttb-hover: #f3f4f6;
    --ttb-warn: #b54708;
    --ttb-warn-soft: #fef0e1;
    --ttb-danger: #b42318;
    --ttb-danger-soft: #fdecea;
    --ttb-ok: #067647;
    --ttb-ok-soft: #e7f6ee;
    clear: both;
    padding: 0 5px 24px;
    color: var(--ttb-ink);
    font-size: 13px;
}
.ttb-page *, .ttb-page *::before, .ttb-page *::after { box-sizing: border-box; }

/* ---------- Panel tajuk (seragam dengan .ldp-heading Lapor Diri) ---------- */
.ttb-heading {
    margin: 4px 0 12px;
    padding: 7px 12px 6px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border: 1px solid var(--ttb-line);
    border-left: 5px solid var(--ttb-accent);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(37, 42, 46, .06);
    font-family: Arial, "Helvetica Neue", sans-serif;
}
.ttb-heading__content { min-width: 0; }
.ttb-heading__label {
    display: block;
    margin-bottom: 2px;
    color: var(--ttb-accent);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.05px;
    text-transform: uppercase;
}
.ttb-heading__title {
    margin: 0;
    padding: 0;
    color: var(--ttb-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.2px;
}
.ttb-heading__subtitle { margin: 2px 0 0; color: var(--ttb-muted); font-size: 11.5px; font-weight: 500; line-height: 1.3; }
.ttb-heading__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ttb-heading__btn {
    min-height: 32px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    border: 1px solid #d9aab4;
    border-radius: 7px;
    background: #fff;
    color: var(--ttb-accent) !important;
    box-shadow: 0 1px 3px rgba(37, 42, 46, .06);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none !important;
}
.ttb-heading__btn:hover { border-color: var(--ttb-accent); background: var(--ttb-accent); color: #fff !important; }

.ttb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s, border-color .15s, color .15s;
}
.ttb-btn--primary { background: var(--ttb-accent); color: #fff !important; }
.ttb-btn--primary:hover { background: var(--ttb-accent-dark); }
.ttb-btn--line { background: #fff; border-color: var(--ttb-line); color: var(--ttb-ink) !important; }
.ttb-btn--line:hover { border-color: var(--ttb-accent); color: var(--ttb-accent) !important; }
.ttb-btn--success { background: #1e8e4e; color: #fff !important; }
.ttb-btn--success:hover { background: #157040; }
.ttb-btn--excel { background: #fff; border-color: #b7e0c7; color: var(--ttb-ok) !important; }
.ttb-btn--excel:hover { background: var(--ttb-ok-soft); }
.ttb-btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- KPI ---------- */
.ttb-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
/* Setiap kad ada warna sendiri: --kpi-c (utama) & --kpi-soft (latar) */
.ttb-kpi {
    --kpi-c: var(--ttb-accent);
    --kpi-soft: var(--ttb-accent-soft);
    position: relative;
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--ttb-line);
    border-top: 4px solid var(--kpi-c);
    border-radius: 12px;
    background: linear-gradient(160deg, var(--kpi-soft) 0%, #fff 75%);
    color: var(--ttb-ink) !important;
    text-decoration: none !important;
}
.ttb-kpi--ok     { --kpi-c: #067647; --kpi-soft: #e3f4ea; }
.ttb-kpi--danger { --kpi-c: #b42318; --kpi-soft: #fde8e6; }
.ttb-kpi--warn   { --kpi-c: #c4590a; --kpi-soft: #fdeedd; }
.ttb-kpi--slate  { --kpi-c: #475467; --kpi-soft: #eaeef3; }
a.ttb-kpi { cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.ttb-kpi:hover { transform: translateY(-2px); border-color: var(--kpi-c); box-shadow: 0 8px 18px rgba(37, 42, 46, .10); }
.ttb-kpi.is-active { border-color: var(--kpi-c); box-shadow: 0 0 0 2px var(--kpi-c); }
.ttb-kpi__label {
    display: block;
    padding-right: 44px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ttb-muted);
}
.ttb-kpi__value {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.ttb-kpi__note { display: block; margin-top: 8px; font-size: 12px; color: var(--ttb-muted); }
.ttb-kpi__value { color: var(--kpi-c); }
.ttb-kpi__link { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--kpi-c); }
.ttb-kpi__icon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--kpi-c);
    color: #fff;
    font-size: 17px;
    line-height: 38px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(37, 42, 46, .15);
}

/* ---------- Panel pemantauan PTJ ---------- */
.ttb-alert {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
    padding: 14px 18px;
    border: 1px solid #f3c7c2;
    border-left: 5px solid var(--ttb-danger);
    border-radius: 12px;
    background: #fff7f6;
}
.ttb-alert--ok { border-color: #bfe3cd; border-left-color: var(--ttb-ok); background: #f4fbf7; }
.ttb-alert__icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ttb-danger);
    color: #fff;
    font-size: 17px;
    line-height: 40px;
    text-align: center;
}
.ttb-alert--ok .ttb-alert__icon { background: var(--ttb-ok); }
.ttb-alert__text { flex: 1 1 320px; min-width: 0; font-size: 13px; }
.ttb-alert__text strong { display: block; margin-bottom: 2px; font-size: 13.5px; }
.ttb-alert__text span { display: block; }
.ttb-alert__text b { color: var(--ttb-danger); font-size: 15px; }
.ttb-alert__sub { margin-top: 2px; font-size: 12px; color: var(--ttb-muted); }
.ttb-alert__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ttb-btn--danger { background: var(--ttb-danger); color: #fff !important; }
.ttb-btn--danger:hover { background: #8f1c13; }
.ttb-btn.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor; }
.ttb-btn--danger.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ttb-danger); }

/* ---------- Grid & kad ---------- */
.ttb-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}
.ttb-grid--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ttb-card {
    border: 1px solid var(--ttb-line);
    border-radius: 12px;
    background: var(--ttb-surface);
    margin-bottom: 14px;
}
.ttb-grid > .ttb-card { margin-bottom: 0; }
.ttb-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ttb-line);
}
.ttb-card__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--ttb-ink); }
.ttb-card__sub { margin: 2px 0 0; font-size: 12px; color: var(--ttb-muted); }
.ttb-card__tools { display: flex; align-items: center; gap: 8px; }
.ttb-card__body { padding: 16px 18px; }

/* ---------- Carta lajur (bulan) ---------- */
.ttb-cols {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 190px;
    padding-top: 26px;
    border-bottom: 1px solid #d0d5dd;
}
.ttb-col {
    position: relative;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}
.ttb-col__bar {
    position: relative;
    width: 100%;
    max-width: 34px;
    border-radius: 4px 4px 0 0;
    background: var(--ttb-accent);
}
.ttb-col--past .ttb-col__bar { background: var(--ttb-accent-past); }
.ttb-col__val {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ttb-ink);
    white-space: nowrap;
    opacity: 0;
    transition: opacity .12s;
}
.ttb-col:hover .ttb-col__val, .ttb-col--now .ttb-col__val, .ttb-col--max .ttb-col__val { opacity: 1; }
.ttb-col:hover .ttb-col__bar { filter: brightness(.9); }
.ttb-col.is-klik { cursor: pointer; }
.ttb-col.is-klik:hover .ttb-col__bar { filter: brightness(.85); }
.ttb-cols.has-pilih .ttb-col:not(.is-pilih) .ttb-col__bar { opacity: .35; }
.ttb-col.is-pilih .ttb-col__bar { background: var(--ttb-accent-dark); }
.ttb-col.is-pilih .ttb-col__val { opacity: 1; }
.ttb-cols__labels { display: flex; gap: 8px; margin-top: 6px; }
.ttb-cols__labels span { flex: 1 1 0; text-align: center; font-size: 11px; color: var(--ttb-muted); }
.ttb-cols__labels span.is-now { color: var(--ttb-accent); font-weight: 700; }
.ttb-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 11.5px; color: var(--ttb-muted); }
.ttb-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }

/* ---------- Bar mendatar ---------- */
.ttb-hbar { margin: 0; padding: 0; list-style: none; }
.ttb-hbar li + li { margin-top: 12px; }
.ttb-hbar__top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 12.5px; }
.ttb-hbar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttb-hbar__val { font-weight: 600; font-variant-numeric: tabular-nums; }
.ttb-hbar__track { height: 8px; border-radius: 4px; background: #f2f4f7; }
.ttb-hbar__fill { height: 100%; border-radius: 4px; background: var(--ttb-accent); min-width: 4px; }
.ttb-hbar--klik li { margin-left: -8px; margin-right: -8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.ttb-hbar--klik li + li { margin-top: 4px; }
.ttb-hbar--klik li:hover { background: var(--ttb-hover); }
.ttb-hbar--klik li.is-pilih { background: var(--ttb-accent-soft); font-weight: 600; }
.ttb-hbar.has-pilih li:not(.is-pilih) .ttb-hbar__fill { opacity: .35; }

/* ---------- Carta donut ---------- */
.ttb-pie { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; padding: 6px 0; }
.ttb-pie__chart { position: relative; flex: none; width: 190px; height: 190px; }
.ttb-pie__chart svg { display: block; width: 100%; height: 100%; }
.ttb-pie__seg { cursor: pointer; transition: stroke-width .12s, opacity .12s; }
.ttb-pie__seg:hover, .ttb-pie__seg.is-pilih { stroke-width: 7.5; }
.ttb-pie.has-pilih .ttb-pie__seg:not(.is-pilih) { opacity: .35; }
.ttb-pie__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.ttb-pie__center strong { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.ttb-pie__center span { margin-top: 4px; font-size: 11px; color: var(--ttb-muted); text-transform: uppercase; letter-spacing: .05em; }
.ttb-pie__legend { flex: 1 1 200px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.ttb-pie__legend li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--ttb-line);
    font-size: 12.5px;
}
.ttb-pie__legend li:first-child { border-top: 0; }
.ttb-pie__legend li { cursor: pointer; padding-left: 8px; padding-right: 8px; border-radius: 6px; }
.ttb-pie__legend li:hover { background: var(--ttb-hover); }
.ttb-pie__legend li.is-pilih { background: var(--ttb-accent-soft); font-weight: 600; }
.ttb-hint { margin: 12px 0 0; font-size: 11.5px; color: var(--ttb-muted); }
.ttb-pie__legend i { flex: none; width: 12px; height: 12px; border-radius: 3px; }
.ttb-pie__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttb-pie__val { font-weight: 700; font-variant-numeric: tabular-nums; }
.ttb-pie__pct { width: 48px; text-align: right; color: var(--ttb-muted); font-variant-numeric: tabular-nums; }

/* ---------- Senarai hampir tamat ---------- */
.ttb-due { margin: 0; padding: 0; list-style: none; }
.ttb-due li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--ttb-line);
}
.ttb-due li:first-child { border-top: 0; padding-top: 0; }
.ttb-due__name { display: block; font-weight: 600; font-size: 12.5px; }
.ttb-due__meta { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ttb-muted); }
.ttb-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.ttb-badge--warn { background: var(--ttb-warn-soft); color: var(--ttb-warn); }
.ttb-badge--danger { background: var(--ttb-danger-soft); color: var(--ttb-danger); }
.ttb-badge--ok { background: var(--ttb-ok-soft); color: var(--ttb-ok); }
.ttb-badge--muted { background: #f2f4f7; color: var(--ttb-muted); }
.ttb-badge--accent { background: var(--ttb-accent-soft); color: var(--ttb-accent); }
.ttb-empty { padding: 26px 10px; text-align: center; color: var(--ttb-muted); font-size: 12.5px; }
.ttb-empty i { display: block; margin-bottom: 6px; font-size: 22px; color: #c0c6d0; }

/* ---------- Jadual ---------- */
.ttb-page table.ttb-table { width: 100%; margin-bottom: 0; border-collapse: collapse; background: var(--ttb-surface); }
.ttb-page table.ttb-table > thead > tr > th,
.ttb-page table.ttb-table > tbody > tr.ttb-thead > th {
    padding: 10px 12px;
    border: 0;
    border-bottom: 2px solid var(--ttb-accent-soft);
    background: var(--ttb-head-bg);
    color: var(--ttb-muted);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}
.ttb-page table.ttb-table > tbody > tr > td {
    padding: 10px 12px;
    border: 0;
    border-top: 1px solid var(--ttb-line);
    font-size: 13px;
    vertical-align: middle;
}
.ttb-page table.ttb-table > tbody > tr:hover > td { background: var(--ttb-hover); }
.ttb-page table.ttb-table > tbody > tr.ttb-row-open > td { background: var(--ttb-hover); font-weight: 600; }
.ttb-page table.ttb-table > tbody > tr.ttb-row-open > td:first-child { box-shadow: inset 4px 0 0 var(--ttb-accent); }
.ttb-page table.ttb-table > tbody > tr.ttb-row-detail > td,
.ttb-page table.ttb-table > tbody > tr.ttb-row-detail:hover > td { background: #fbfbfd; padding: 4px 12px 14px; }
.ttb-page table.ttb-table .ttb-num { color: var(--ttb-muted); width: 48px; }
.ttb-page table.ttb-table .ttb-staf { font-weight: 600; color: var(--ttb-accent-dark); font-variant-numeric: tabular-nums; }
.ttb-page table.ttb-table td.ttb-nowrap { white-space: nowrap; }
.ttb-page table.ttb-table td.ttb-empty-cell { padding: 30px 12px; text-align: center; color: var(--ttb-muted); }
.ttb-actions { display: inline-flex; align-items: center; gap: 6px; }
.ttb-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--ttb-line);
    border-radius: 7px;
    background: #fff;
    color: var(--ttb-accent) !important;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none !important;
}
.ttb-icon-btn:hover { border-color: var(--ttb-accent); background: var(--ttb-accent-soft); }
.ttb-icon-btn--ok { color: var(--ttb-ok) !important; }
.ttb-icon-btn--ok:hover { border-color: var(--ttb-ok); background: var(--ttb-ok-soft); }
.ttb-icon-btn--edit { color: #1f6fd1 !important; }
.ttb-icon-btn--edit:hover { border-color: #1f6fd1; background: #e8f1fc; }
.ttb-icon-btn--danger { color: var(--ttb-danger) !important; }
.ttb-icon-btn--danger:hover { border-color: var(--ttb-danger); background: var(--ttb-danger-soft); }

/* ---------- Bootstrap dalam modul ---------- */
.ttb-page .panel.panel-inverse {
    border: 1px solid var(--ttb-line);
    border-radius: 12px;
    box-shadow: none;
    overflow: visible; /* jangan potong menu dropdown (selectpicker) */
}
.ttb-page .panel.panel-inverse > .panel-heading {
    border-radius: 12px 12px 0 0;
    padding: 13px 18px;
    border-bottom: 1px solid var(--ttb-line);
    background: var(--ttb-surface);
    color: var(--ttb-ink);
}
.ttb-page .panel.panel-inverse > .panel-heading .panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ttb-ink);
}
.ttb-page .panel.panel-inverse > .panel-heading .panel-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 14px;
    margin-right: 9px;
    border-radius: 2px;
    background: var(--ttb-accent);
    vertical-align: -2px;
}
.ttb-page .control-label { color: var(--ttb-muted); font-weight: 600; font-size: 12.5px; }
.ttb-page .form-control { border-radius: 7px; }
.ttb-page .form-control:focus { border-color: var(--ttb-accent); box-shadow: 0 0 0 3px rgba(166,25,46,.12); }
.ttb-page .btn-xs { padding: 4px 10px; border-radius: 6px; }
.ttb-page .bootstrap-select .dropdown-menu { z-index: 1050; }
.ttb-page .bootstrap-select .dropdown-menu > li.active > a,
.ttb-page .bootstrap-select .dropdown-menu > li > a:focus { background: var(--ttb-accent); color: #fff; }
.ttb-page .bootstrap-select .dropdown-menu > li > a:hover { background: var(--ttb-hover); color: var(--ttb-ink); }

.ttb-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 14px; }
.ttb-detail { margin: 6px 0; padding: 14px; border: 1px solid var(--ttb-line); border-radius: 10px; background: #fff; }
.ttb-search__title { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--ttb-accent-dark); }
.ttb-heading__btn--primary { border-color: var(--ttb-accent); background: var(--ttb-accent); color: #fff !important; }
.ttb-heading__btn--primary:hover { border-color: var(--ttb-accent-dark); background: var(--ttb-accent-dark); }

@media (max-width: 1199px) {
    .ttb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .ttb-grid, .ttb-grid--even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    .ttb-heading { padding: 7px 9px 6px 10px; }
    .ttb-heading__title { font-size: 17px; }
    .ttb-heading__actions { margin-left: 0; }
}
@media (max-width: 560px) {
    .ttb-kpis { grid-template-columns: minmax(0, 1fr); }
    .ttb-cols, .ttb-cols__labels { gap: 3px; }
    .ttb-cols__labels span { font-size: 9.5px; }
}

/* ---------- Ikon dalam kotak: tengah tepat (tema portal ubah line-height ikon FA) ---------- */
.ttb-kpi__icon, .ttb-tile__icon, .ttb-alert__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ttb-kpi__icon > i, .ttb-tile__icon > i, .ttb-alert__icon > i {
    display: block;
    margin: 0;
    line-height: 1;
}
/* =====================================================================
   Komponen tambahan
   ===================================================================== */

/* Pilihan tahun dalam panel tajuk */
.ttb-year {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 4px 0 10px;
    border: 1px solid var(--ttb-line);
    border-radius: 7px;
    background: #fff;
    color: var(--ttb-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ttb-year select {
    height: 28px;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: var(--ttb-accent);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

/* Jubin kitaran (tidak digunakan buat masa ini) */
.ttb-cycle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}
.ttb-cycle__item {
    --cy-c: var(--ttb-accent);
    --cy-soft: var(--ttb-accent-soft);
    position: relative;
    display: block;
    padding: 14px 14px 12px;
    border: 1px solid var(--ttb-line);
    border-radius: 12px;
    background: linear-gradient(165deg, var(--cy-soft) 0%, #fff 70%);
    color: var(--ttb-ink) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ttb-cycle__item:hover { transform: translateY(-2px); border-color: var(--cy-c); box-shadow: 0 8px 18px rgba(37, 42, 46, .10); }
.ttb-cycle__item.is-pilih { border-color: var(--cy-c); box-shadow: 0 0 0 2px var(--cy-c); }
.ttb-cycle__item.is-akan { opacity: .7; }
.ttb-cycle__item--c0 { --cy-c: #a6192e; --cy-soft: #f8eef0; }
.ttb-cycle__item--c1 { --cy-c: #2f6690; --cy-soft: #e9f1f8; }
.ttb-cycle__item--c2 { --cy-c: #2f7d5b; --cy-soft: #e8f4ee; }
.ttb-cycle__item--c3 { --cy-c: #a5781f; --cy-soft: #f8f1e3; }
.ttb-cycle__item--c4 { --cy-c: #475467; --cy-soft: #eef1f5; }
.ttb-cycle__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ttb-cycle__bln { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cy-c); }
.ttb-cycle__state { font-size: 10.5px; font-weight: 600; color: var(--ttb-muted); }
.ttb-cycle__val { display: block; margin-top: 8px; font-size: 26px; font-weight: 700; line-height: 1; color: var(--ttb-ink); font-variant-numeric: tabular-nums; }
.ttb-cycle__unit { display: block; margin-top: 3px; font-size: 11px; color: var(--ttb-muted); }
.ttb-cycle__track { height: 7px; margin-top: 10px; border-radius: 4px; background: #eceff2; overflow: hidden; }
.ttb-cycle__fill { height: 100%; border-radius: 4px; background: var(--cy-c); min-width: 3px; }
.ttb-cycle__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--ttb-muted); }
.ttb-cycle__belum {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ttb-warn-soft);
    color: var(--ttb-warn) !important;
    font-weight: 700;
    text-decoration: none !important;
}
.ttb-cycle__belum:hover { background: #fbdcbc; }
.ttb-cycle__belum.is-ok { background: var(--ttb-ok-soft); color: var(--ttb-ok) !important; }

/* Ringkasan kenaikan gaji */
.ttb-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 14px;
    border: 1px solid var(--ttb-line);
    border-radius: 10px;
    background: #fbfbfc;
}
.ttb-strip > div { padding: 10px 14px; }
.ttb-strip > div + div { border-left: 1px solid var(--ttb-line); }
.ttb-strip span { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ttb-muted); }
.ttb-strip strong { display: block; margin-top: 3px; font-size: 17px; font-weight: 700; color: var(--ttb-ink); font-variant-numeric: tabular-nums; }

/* Trend tahunan: guna .ttb-cols + label amaran merah */
.ttb-cols--trend { height: 170px; gap: 18px; }
.ttb-cols--trend .ttb-col__bar { max-width: 54px; }
.ttb-cols--trend .ttb-col__val { opacity: 1; }
.ttb-cols__labels--trend { gap: 18px; }
.ttb-cols__labels--trend span { line-height: 1.35; }
.ttb-cols__labels--trend em {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--ttb-danger-soft);
    color: var(--ttb-danger);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

/* Wang dalam jadual */
.ttb-page table.ttb-table td.ttb-rm { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ttb-page table.ttb-table th.ttb-rm { text-align: right; }
.ttb-naik { color: var(--ttb-ok); font-weight: 700; }
.ttb-butiran { font-size: 12px; line-height: 1.6; }
.ttb-butiran span { display: inline-block; margin: 0 6px 3px 0; padding: 1px 8px; border-radius: 6px; background: var(--ttb-danger-soft); color: var(--ttb-danger); font-weight: 600; white-space: nowrap; }

/* Borang carian & radio */
.ttb-page .radio-inline, .ttb-page .checkbox-inline { font-size: 12.5px; }
.ttb-page input[type=radio], .ttb-page input[type=checkbox] { accent-color: var(--ttb-accent); }

@media (max-width: 767px) {
    .ttb-strip { grid-template-columns: minmax(0, 1fr); }
    .ttb-strip > div + div { border-left: 0; border-top: 1px solid var(--ttb-line); }
}
/* Halaman lama dibalut .col-md-12: kekalkan jarak tepi 5px seperti modul lain */
.ttb-page > .col-md-12 { padding-left: 0; padding-right: 0; }
.ttb-page > .col-md-12 + .col-md-12 { margin-top: 0; }
.ttb-page table.ttb-table th .ttb-btn { text-transform: none; letter-spacing: 0; font-size: 12px; padding: 5px 10px; }
/* Item jalur yang boleh diklik */
.ttb-strip > a.ttb-strip__klik { display: block; padding: 10px 14px; border-left: 1px solid var(--ttb-line); border-radius: 0 10px 10px 0; color: var(--ttb-ink) !important; text-decoration: none !important; cursor: pointer; }
.ttb-strip > a.ttb-strip__klik:hover { background: var(--ttb-hover); }
.ttb-strip > a.ttb-strip__klik.is-pilih { background: var(--ttb-accent-soft); }
.ttb-strip > a.ttb-strip__klik span { color: var(--ttb-accent); }
@media (max-width: 767px) {
    .ttb-strip > a.ttb-strip__klik { border-left: 0; border-top: 1px solid var(--ttb-line); border-radius: 0 0 10px 10px; }
}
/* Senarai lencana dalam sel */
.ttb-sebab { display: flex; flex-wrap: wrap; gap: 4px; max-width: 340px; }
.ttb-sebab .ttb-badge { white-space: normal; line-height: 1.35; border-radius: 8px; text-align: left; }
/* Butang ikon sahaja dalam panel tajuk (muat semula) */
.ttb-heading__btn--icon { width: 32px; padding: 0; justify-content: center; font-size: 13px; }
/* =====================================================================
   Aliran kerja & laporan
   ===================================================================== */

/* Aliran kes: langkah bernombor dengan anak panah */
.ttb-flow {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.ttb-step {
    --st-c: #475467;
    --st-soft: #eef1f5;
    position: relative;
    display: block;
    padding: 12px 12px 11px;
    border: 1px solid var(--ttb-line);
    border-radius: 12px;
    background: #fff;
    color: var(--ttb-ink) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ttb-step:hover { transform: translateY(-2px); border-color: var(--st-c); box-shadow: 0 8px 18px rgba(37, 42, 46, .10); }
.ttb-step.is-active { border-color: var(--st-c); box-shadow: 0 0 0 2px var(--st-c); }
.ttb-step--ptj      { --st-c: #475467; --st-soft: #eef1f5; }
.ttb-step--urusetia { --st-c: #2f6690; --st-soft: #e9f1f8; }
.ttb-step--ks       { --st-c: #a5781f; --st-soft: #f8f1e3; }
.ttb-step--kb       { --st-c: #a6192e; --st-soft: #f8eef0; }
.ttb-step--selesai  { --st-c: #067647; --st-soft: #e3f4ea; }
/* Anak panah antara langkah */
.ttb-step + .ttb-step::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -9px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #c3c9cf;
    border-right: 2px solid #c3c9cf;
    transform: translate(-1px, -50%) rotate(45deg);
}
.ttb-step__top { display: flex; align-items: center; gap: 8px; }
.ttb-step__no {
    flex: none;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--st-soft);
    color: var(--st-c);
    font-size: 12px;
    font-weight: 700;
}
.ttb-step__no > i { display: block; line-height: 1; }
.ttb-step__label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ttb-muted); line-height: 1.25; }
.ttb-step__val { display: block; margin-top: 8px; font-size: 26px; font-weight: 700; line-height: 1; color: var(--st-c); font-variant-numeric: tabular-nums; }
.ttb-step__note { display: block; margin-top: 4px; font-size: 11.5px; color: var(--ttb-muted); }
.ttb-step__foot { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; min-height: 20px; }
.ttb-step__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
}
.ttb-step__tag--lewat { background: var(--ttb-danger-soft); color: var(--ttb-danger); }
.ttb-step__tag--anda { background: var(--st-c); color: #fff; }

/* Panduan pengguna (dropdown dalam panel tajuk) */
.ttb-page .ttb-panduan { position: relative; }
.ttb-page .ttb-panduan .dropdown-menu { right: 0; left: auto; min-width: 280px; padding: 6px; border-radius: 10px; border: 1px solid var(--ttb-line); box-shadow: 0 10px 24px rgba(37, 42, 46, .14); z-index: 1060; }
.ttb-page .ttb-panduan .dropdown-menu > li > a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; color: var(--ttb-ink); font-size: 12px; white-space: normal; }
.ttb-page .ttb-panduan .dropdown-menu > li > a:hover { background: var(--ttb-hover); color: var(--ttb-accent); }
.ttb-page .ttb-panduan .dropdown-menu > li > a i { color: var(--ttb-danger); }

/* Ikon dalam jadual senarai kes */
.ttb-page table.ttb-table td.ttb-aksi { width: 44px; text-align: center; }

@media (max-width: 1199px) {
    .ttb-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ttb-step:nth-child(4)::before { display: none; }
}
@media (max-width: 767px) {
    .ttb-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ttb-step::before { display: none; }
}
/* ---------- Laporan interaktif ---------- */
.ttb-lap-filter { margin-bottom: 14px; }
.ttb-lap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px 12px;
    align-items: end;
}
.ttb-lap-f { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ttb-muted); }
.ttb-lap-f select, .ttb-lap-f input {
    width: 100%;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--ttb-line);
    border-radius: 7px;
    background: #fff;
    color: var(--ttb-ink);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    outline: none;
}
.ttb-lap-f select:focus, .ttb-lap-f input:focus { border-color: var(--ttb-accent); box-shadow: 0 0 0 3px rgba(166, 25, 46, .12); }
.ttb-lap-f--thn select { color: var(--ttb-accent); font-weight: 700; }
.ttb-lap-f--cari { grid-column: span 2; }
.ttb-lap-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ttb-lap-chips:empty { display: none; }
.ttb-lap-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--ttb-accent-soft); color: var(--ttb-accent-dark); font-size: 12px; }
.ttb-lap-chip a { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; color: var(--ttb-accent) !important; font-size: 14px; line-height: 1; text-decoration: none !important; }
.ttb-lap-chip a:hover { background: var(--ttb-accent); color: #fff !important; }
.ttb-lap-reset { margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--ttb-muted) !important; }
.ttb-lap-reset:hover { color: var(--ttb-accent) !important; }
.ttb-page table.ttb-table > thead > tr > th.ttb-lap-sort { cursor: pointer; user-select: none; }
.ttb-page table.ttb-table > thead > tr > th.ttb-lap-sort:hover, .ttb-page table.ttb-table > thead > tr > th.ttb-lap-sort.is-on { color: var(--ttb-accent); }
.ttb-page table.ttb-table > thead > tr > th.ttb-lap-sort i { margin-left: 3px; opacity: .55; }
.ttb-page table.ttb-table > thead > tr > th.ttb-lap-sort.is-on i { opacity: 1; }
.ttb-lap-page { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; margin-top: 12px; font-size: 12px; color: var(--ttb-muted); }
.ttb-lap-page button { min-width: 30px; height: 30px; border: 1px solid var(--ttb-line); border-radius: 7px; background: #fff; color: var(--ttb-ink); font-size: 12px; cursor: pointer; }
.ttb-lap-page button:hover:not(:disabled), .ttb-lap-page button.is-on { border-color: var(--ttb-accent); background: var(--ttb-accent); color: #fff; }
.ttb-lap-page button:disabled { opacity: .45; cursor: not-allowed; }
.ttb-lap-page span { margin-left: 8px; }
.ttb-kpis > div.ttb-kpi { cursor: default; }


@media (max-width: 767px) {
    .ttb-lap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ttb-lap-f--cari { grid-column: 1 / -1; }
}
/* Laporan: trend bulanan */
.ttb-lap-bulan__bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 22px; border-bottom: 1px solid #d0d5dd; }
.ttb-lap-bulan__col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 0; }
.ttb-lap-bulan__col.is-klik { cursor: pointer; }
.ttb-lap-bulan__bar { position: relative; width: 100%; max-width: 38px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--ttb-accent); transition: filter .12s, opacity .12s; }
.ttb-lap-bulan__col.is-klik:hover .ttb-lap-bulan__bar { filter: brightness(.85); }
.ttb-lap-bulan.has-pilih .ttb-lap-bulan__col:not(.is-pilih) .ttb-lap-bulan__bar { opacity: .3; }
.ttb-lap-bulan__col.is-pilih .ttb-lap-bulan__bar { background: var(--ttb-accent-dark); }
.ttb-lap-bulan__bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-size: 10.5px; font-weight: 700; color: var(--ttb-ink); white-space: nowrap; }
.ttb-lap-bulan__x { display: flex; gap: 4px; margin-top: 6px; }
.ttb-lap-bulan__x span { flex: 1 1 0; min-width: 0; overflow: visible; white-space: nowrap; text-align: center; font-size: 10.5px; color: var(--ttb-muted); }

/* Laporan: donut sebab */
.ttb-lap-donut { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.ttb-lap-donut__chart { position: relative; flex: none; width: 210px; height: 210px; }
.ttb-lap-donut__chart svg { display: block; width: 100%; height: 100%; }
.ttb-lap-seg { cursor: pointer; transition: stroke-width .12s, opacity .12s; }
.ttb-lap-seg.is-hover, .ttb-lap-seg.is-pilih { stroke-width: 7.8; }
.ttb-lap-donut.has-pilih .ttb-lap-seg:not(.is-pilih), .ttb-lap-donut.has-hover .ttb-lap-seg:not(.is-hover) { opacity: .3; }
.ttb-lap-donut__pusat { position: absolute; inset: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.ttb-lap-donut__pusat strong { font-size: 26px; font-weight: 700; line-height: 1; color: var(--ttb-ink); font-variant-numeric: tabular-nums; }
.ttb-lap-donut__pusat span { margin-top: 4px; font-size: 10.5px; line-height: 1.25; color: var(--ttb-muted); text-transform: uppercase; letter-spacing: .03em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ttb-lap-donut__pusat .ttb-lap-donut__n { margin-top: 3px; color: var(--ttb-accent); font-weight: 700; text-transform: none; }
.ttb-lap-donut__legend { flex: 1 1 260px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.ttb-lap-donut__legend li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 12px; cursor: pointer; }
.ttb-lap-donut__legend li:hover, .ttb-lap-donut__legend li.is-hover { background: var(--ttb-hover); }
.ttb-lap-donut__legend li.is-pilih { background: var(--ttb-accent-soft); font-weight: 600; }
.ttb-lap-donut__legend i { flex: none; width: 11px; height: 11px; border-radius: 3px; }
.ttb-lap-donut__lbl { flex: 1; min-width: 0; line-height: 1.3; }
.ttb-lap-donut__legend b { font-variant-numeric: tabular-nums; }
.ttb-lap-donut__legend em { width: 46px; text-align: right; font-style: normal; color: var(--ttb-muted); font-variant-numeric: tabular-nums; }

/* Laporan: kedudukan PTJ + suis ukuran */
.ttb-lap-suis { display: inline-flex; padding: 3px; border: 1px solid var(--ttb-line); border-radius: 8px; background: #f6f7f9; }
.ttb-lap-suis button { padding: 4px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ttb-muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.ttb-lap-suis button.is-on { background: var(--ttb-accent); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ttb-lap-rank { margin: 0; padding: 0; list-style: none; }
.ttb-lap-rank li { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.ttb-lap-rank li + li { margin-top: 2px; }
.ttb-lap-rank li:hover { background: var(--ttb-hover); }
.ttb-lap-rank li.is-pilih { background: var(--ttb-accent-soft); }
.ttb-lap-rank.has-pilih li:not(.is-pilih) { opacity: .5; }
.ttb-lap-rank__no { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #eef1f5; color: var(--ttb-muted); font-size: 11px; font-weight: 700; }
.ttb-lap-rank__no.is-top { background: var(--ttb-accent); color: #fff; }
.ttb-lap-rank__main { flex: 1; min-width: 0; }
.ttb-lap-rank__top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.ttb-lap-rank__top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttb-lap-rank__top b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ttb-lap-rank__top small { font-weight: 500; color: var(--ttb-muted); }
.ttb-lap-rank__track { height: 7px; margin-top: 5px; border-radius: 4px; background: #f2f4f7; }
.ttb-lap-rank__track div { height: 100%; min-width: 3px; border-radius: 4px; background: var(--ttb-accent); }
.ttb-lap-rank__pct { display: block; margin-top: 3px; font-size: 10.5px; color: var(--ttb-muted); }
.ttb-lap-lagi { margin-top: 8px; text-align: center; font-size: 12px; font-weight: 600; }
.ttb-lap-lagi a { color: var(--ttb-accent) !important; }

/* Tooltip laporan */
.ttb-lap-tip { position: fixed; z-index: 2000; left: 0; top: 0; max-width: 280px; padding: 7px 10px; border-radius: 7px; background: #252a2e; color: #fff; font-size: 12px; line-height: 1.4; pointer-events: none; opacity: 0; transition: opacity .1s; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.ttb-lap-tip.is-on { opacity: 1; }
.ttb-lap-tip small { color: #c9ced3; }
/* =====================================================================
   Khusus Tatatertib
   ===================================================================== */
.ttb-flow--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ttb-step--aduan     { --st-c: #475467; --st-soft: #eef1f5; }
.ttb-step--siasatan  { --st-c: #2f6690; --st-soft: #e9f1f8; }
.ttb-step--keputusan { --st-c: #a6192e; --st-soft: #f8eef0; }
/* Halaman dibalut terus oleh div .row dalam fail m/ (kelas .ttb-page) */
.ttb-page.row { padding-left: 5px; padding-right: 5px; }
/* Tema mengenakan padding 15px pada .row > [class*="col-"]; kekhususan lebih tinggi supaya panel selari dengan panel tajuk */
.row.ttb-page > [class*="col-md-12"] { padding-left: 0; padding-right: 0; }
.ttb-page .ttb-kes {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 12px;
    padding: 6px 12px;
    border: 1px solid #f0c9cf;
    border-left: 4px solid var(--ttb-accent);
    border-radius: 8px;
    background: var(--ttb-accent-soft);
    color: var(--ttb-accent-dark);
    font-size: 13px;
    font-weight: 700;
}
.ttb-page .table-bordered > thead > tr > th, .ttb-page .table-bordered > thead > tr.active > th { background: var(--ttb-head-bg); color: var(--ttb-muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.ttb-page h6 > strong { color: var(--ttb-ink); }
@media (max-width: 991px) { .ttb-flow--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Jubin PTJ (dashboard): warna ikut kedudukan, palet sama seperti jubin Sandang */
.ttb-jubin { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ttb-jubin__item {
    --jb-c: #a6192e;
    --jb-bg: #f8eef0;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 118px;
    padding: 12px 12px 11px;
    border: 1px solid var(--ttb-line);
    border-top: 3px solid var(--jb-c);
    border-radius: 10px;
    background: var(--jb-bg);
    color: var(--ttb-ink) !important;
    text-decoration: none !important;
    transition: transform .15s, box-shadow .15s, opacity .15s;
}
.ttb-jubin__item:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(37, 42, 46, .10); }
.ttb-jubin__item--c0 { --jb-c: #a6192e; --jb-bg: #f8eef0; }
.ttb-jubin__item--c1 { --jb-c: #a5781f; --jb-bg: #f8f1e3; }
.ttb-jubin__item--c2 { --jb-c: #2f6690; --jb-bg: #e9f1f8; }
.ttb-jubin__item--c3 { --jb-c: #2f7d5b; --jb-bg: #e8f4ee; }
.ttb-jubin__item--c4 { --jb-c: #0f766e; --jb-bg: #e4f4f2; }
.ttb-jubin__item--c5 { --jb-c: #7a3e6e; --jb-bg: #f4ebf2; }
.ttb-jubin__item--c6 { --jb-c: #c4590a; --jb-bg: #fdeedd; }
.ttb-jubin__item--c7 { --jb-c: #475467; --jb-bg: #eef1f5; }
.ttb-jubin.has-pilih .ttb-jubin__item:not(.is-pilih) { opacity: .45; }
.ttb-jubin__item.is-pilih { box-shadow: 0 0 0 2px var(--jb-c); }
.ttb-jubin__rank { position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 700; color: var(--ttb-muted); }
.ttb-jubin__val { font-size: 26px; font-weight: 700; line-height: 1; color: var(--jb-c); font-variant-numeric: tabular-nums; }
.ttb-jubin__pct { margin-top: 3px; font-size: 10.5px; color: var(--ttb-muted); }
.ttb-jubin__label { margin-top: auto; padding-top: 8px; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
/* Carta titik (jenis hukuman): satu titik = satu kes; warna diambil daripada kelas jubin --c0..c7 */
.ttb-titik { margin: 0; padding: 0; list-style: none; }
.ttb-titik__row { --jb-c: #a6192e; padding: 10px 10px 11px; border-radius: 10px; cursor: pointer; transition: background .12s, opacity .12s; }
.ttb-titik__row + .ttb-titik__row { margin-top: 4px; }
.ttb-titik__row:hover { background: var(--ttb-hover); }
.ttb-titik__row.is-pilih { background: var(--jb-bg); box-shadow: inset 3px 0 0 var(--jb-c); }
.ttb-titik.has-pilih .ttb-titik__row:not(.is-pilih) { opacity: .45; }
.ttb-titik__top { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.ttb-titik__label { flex: 1; min-width: 0; font-weight: 600; }
.ttb-titik__val { white-space: nowrap; font-weight: 700; color: var(--jb-c); font-variant-numeric: tabular-nums; }
.ttb-titik__val small { font-weight: 500; color: var(--ttb-muted); }
.ttb-titik__dots { flex: 0 1 auto; max-width: 45%; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ttb-titik__dots i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--jb-c); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.ttb-titik__dots b { margin-left: 4px; font-size: 11.5px; color: var(--jb-c); }
/* Lajur berwarna (carta bulan & trend dashboard): palet jubin; lajur dipilih kekal warna sendiri */
.ttb-cols--warna .ttb-col--c0 .ttb-col__bar { background: #a6192e; }
.ttb-cols--warna .ttb-col--c1 .ttb-col__bar { background: #a5781f; }
.ttb-cols--warna .ttb-col--c2 .ttb-col__bar { background: #2f6690; }
.ttb-cols--warna .ttb-col--c3 .ttb-col__bar { background: #2f7d5b; }
.ttb-cols--warna .ttb-col--c4 .ttb-col__bar { background: #0f766e; }
.ttb-cols--warna .ttb-col--c5 .ttb-col__bar { background: #7a3e6e; }
.ttb-cols--warna .ttb-col--c6 .ttb-col__bar { background: #c4590a; }
.ttb-cols--warna .ttb-col--c7 .ttb-col__bar { background: #475467; }
.ttb-cols--warna .ttb-col__val { opacity: 1; }
.ttb-cols--warna.has-pilih .ttb-col:not(.is-pilih) .ttb-col__bar { opacity: .3; }
.ttb-cols--warna .ttb-col.is-pilih .ttb-col__bar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(37, 42, 46, .25); }
.ttb-flow--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767px) { .ttb-flow--3 { grid-template-columns: minmax(0, 1fr); } }

/* Butang Excel (ExcelJS AJAX) dalam kepala panel laporan: ikon sahaja, tanpa bingkai butang */
.ttb-btn-excel { padding: 0; border: 0; background: transparent; cursor: pointer; line-height: 1; }
.ttb-btn-excel:hover img { transform: scale(1.1); }
.ttb-btn-excel:disabled { cursor: wait; color: #2f7d5b; font-size: 12px; font-weight: 700; }
