/* =========================================================
   Modul Latihan PTJ (Putra Latihan) - gaya khusus modul
   Semua kelas berawalan .dlp-* supaya tidak kacau modul lain.
   ========================================================= */

/* ---------- Header modul (seragam dengan .ldp-heading Modul Lapor Diri) ---------- */
.dlp-heading {
    clear: both;
    margin: 4px 16px 12px;
    padding: 7px 12px 6px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border: 1px solid #dfe3e7;
    border-left: 5px solid #a6192e;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(37, 42, 46, .06);
    font-family: Arial, "Helvetica Neue", sans-serif;
}
.dlp-heading__content { min-width: 0; }
.dlp-heading__label {
    display: block;
    margin-bottom: 2px;
    color: #a6192e;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.05px;
    text-transform: uppercase;
}
.dlp-heading__title {
    margin: 0;
    padding: 0;
    color: #252a2e;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.2px;
}
.dlp-heading__subtitle { margin: 2px 0 0; color: #6c737a; font-size: 11.5px; font-weight: 500; line-height: 1.3; }

/* Menu Panduan Pengguna / Hubungi Kami: gaya butang header Lapor Diri */
.dlp-heading > .navbar-right { float: none !important; margin: 0 0 0 auto !important; padding: 0; display: flex; gap: 8px; }
.dlp-heading > .navbar-right > li { margin-top: 0 !important; list-style: none; float: none; }
.dlp-heading > .navbar-right > li > a.dropdown-toggle {
    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: #a6192e !important;
    box-shadow: 0 1px 3px rgba(37, 42, 46, .06);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}
.dlp-heading > .navbar-right > li > a.dropdown-toggle:hover,
.dlp-heading > .navbar-right > li.open > a.dropdown-toggle { border-color: #a6192e; background: #a6192e; color: #fff !important; }
.dlp-heading .user-image { display: inline-flex; width: 16px; height: 16px; float: none; margin: 0; border-radius: 0; }
.dlp-heading .user-image::before { content: none !important; display: none !important; }
.dlp-heading .user-image img { width: 14px; height: 14px; object-fit: contain; border-radius: 0; }
.dlp-heading .dropdown-menu { right: 0; left: auto; border-radius: 8px; }

@media (max-width: 767px) {
    .dlp-heading { margin: 4px 8px 12px; padding: 7px 9px 6px 10px; }
    .dlp-heading__title { font-size: 17px; }
    .dlp-heading > .navbar-right { margin-left: 0 !important; }
}

/* =========================================================
   DASHBOARD (seragam dengan dashboard Lapor Diri: .ldb-kpi)
   Palet korporat UPM: maroon (utama), emas, teal, charcoal.
   ========================================================= */
.dlp-dash {
    --dlp-maroon: #a6192e; --dlp-maroon-dark: #7f1425; --dlp-maroon-soft: #f8eef0;
    --dlp-charcoal: #252a2e; --dlp-grey: #6c737a; --dlp-border: #dfe3e7;
    clear: both;
    padding: 6px 16px 4px;
    color: var(--dlp-charcoal);
    font-family: Arial, "Helvetica Neue", sans-serif;
}
.dlp-dash, .dlp-dash table, .dlp-dash th, .dlp-dash td, .dlp-dash button, .dlp-dash input, .dlp-dash select { font-family: Arial, "Helvetica Neue", sans-serif; }

/* ---------- Panel seksyen (ikut panel Lapor Diri) ---------- */
.dlp-panel {
    margin: 0 0 16px;
    background: #fff;
    border: 1px solid var(--dlp-border);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(37, 42, 46, .06);
    overflow: hidden;
}
.dlp-head {
    min-height: 42px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e8bfc8;
    background: linear-gradient(135deg, #fbeef0 0%, #f5dbe0 100%);
    color: var(--dlp-charcoal);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}
.dlp-head-icon { color: var(--dlp-charcoal); font-size: 13px; }
.dlp-panel-body { padding: 16px; background: #fff; }

/* ---------- Grid kad ---------- */
.dlp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 0 0 18px;
    clear: both;
}
/* Bekas panel senarai (.col-md-12) tidak perlu float; float 100% menolak grid kad ke tepi */
.dlp-dash > .col-md-12 { float: none; padding-left: 0; padding-right: 0; }
/* Pembungkus .col-md-12 dalam fail v.dash_*.php: buang padding supaya panel senarai sama lebar dengan header & kad */
.dlp-dash > .col-md-12 > .col-md-12 { float: none; width: auto; padding-left: 0; padding-right: 0; }

/* ---------- Kad KPI ---------- */
.dlp-card {
    --c: #a6192e;
    --cs: #f8eef0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, var(--cs) 0%, #fff 62%);
    border: 1px solid var(--dlp-border);
    border-top: 3px solid var(--c);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.dlp-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(17, 24, 39, .08); }
/* Kad yang sedang dipaparkan senarainya */
.dlp-card.is-active { border-color: var(--c); box-shadow: 0 0 0 2px var(--cs), 0 8px 18px rgba(17, 24, 39, .08); }
.dlp-card.is-active .dlp-link { background: var(--c); color: #fff; }
.dlp-body {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px 14px;
    flex: 1;
}
.dlp-icon {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--c);
    color: #fff;
    box-shadow: 0 6px 12px -6px var(--c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}
.dlp-info { flex: 1; min-width: 0; }
.dlp-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    min-height: 35px;
}
.dlp-num {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--c);
    margin-top: 6px;
}
.dlp-pill {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.dlp-pill.ada { background: var(--c); color: #fff; }
.dlp-pill.tiada { background: rgba(255, 255, 255, .85); border: 1px solid var(--dlp-border); color: var(--dlp-grey); }

.dlp-link,
.dlp-link:focus {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-top: 1px solid var(--cs);
    background: var(--cs);
    color: var(--c);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.dlp-link:hover { background: var(--c); color: #fff; text-decoration: none; }
.dlp-link i { transition: transform .15s ease; }
.dlp-link:hover i { transform: translateX(3px); }

/* ---------- Warna kad (palet korporat) ---------- */
.dlp-maroon   { --c: #a6192e; --cs: #f8eef0; }
.dlp-gold     { --c: #a8861d; --cs: #faf4e1; }
.dlp-teal     { --c: #3d6f7d; --cs: #e9f2f4; }
.dlp-charcoal { --c: #4a5157; --cs: #f1f2f4; }
.dlp-navy     { --c: #1f4e79; --cs: #e9eff6; }
.dlp-green    { --c: #287c4c; --cs: #e8f5ee; }
.dlp-plum     { --c: #6d3b5e; --cs: #f4ecf2; }

/* =========================================================
   PANEL SENARAI (Paparan Lanjut) - fail v.dash_*.php guna
   inline style warna-warni; diseragamkan di sini sahaja.
   ========================================================= */
.dlp-dash div[style*="border-bottom: 1px solid grey"] { display: none; }
.dlp-dash .row.panel.panel-inverse {
    width: auto !important;
    margin: 0 0 16px !important;
    border: 1px solid var(--dlp-border) !important;
    border-top: 3px solid var(--c, #a6192e) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(37, 42, 46, .06) !important;
    overflow: hidden;
}
.dlp-dash .row.panel.panel-inverse > div[style*="background-color"] {
    padding: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid var(--dlp-border);
    background: linear-gradient(135deg, var(--cs, #f8eef0) 0%, #fff 85%) !important;
}
.dlp-dash .row.panel.panel-inverse > div[style*="background-color"] > .panel-heading {
    min-height: 42px;
    padding: 10px 16px !important;
    display: flex;
    align-items: center;
    background: transparent !important;
    color: var(--dlp-charcoal) !important;
    font-size: 13px;
    font-weight: 700;
}
.dlp-dash .row.panel.panel-inverse > div[style*="background-color"] > .panel-heading > .pull-right {
    margin: 0 0 0 auto !important;
    float: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}
.dlp-dash .row.panel.panel-inverse .user-image img { width: 22px; height: 22px; object-fit: contain; }
.dlp-dash .row.panel.panel-inverse > .panel-body { padding: 16px; background: #fff !important; }

/* Bar kawalan jadual (Pagg::pagging_top) */
.dlp-dash .modal-header.m-b-10 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.dlp-dash .modal-header.m-b-10 .form-control,
.dlp-dash .modal-header.m-b-10 .input-group-addon,
.dlp-dash .modal-header.m-b-10 .input-group-btn .btn { height: 34px; font-size: 11px !important; }
.dlp-dash .modal-header.m-b-10 .form-control { border: 1px solid #cfd5da; box-shadow: none; }
.dlp-dash .modal-header.m-b-10 .input-group-addon { border-color: #d8dde3; background: #fff; color: #4f5660; font-weight: 600; }
.dlp-dash .modal-header.m-b-10 .input-group-btn .btn { border-color: var(--c, #a6192e) !important; background: var(--c, #a6192e) !important; color: #fff !important; }

/* Jadual */
.dlp-dash .table { font-size: 12px; background: #fff; }
.dlp-dash .table > thead > tr > th {
    padding: 10px 8px;
    border: 0 !important;
    border-bottom: 2px solid var(--c, #8b1538) !important;
    background: #eef1f4 !important;
    color: #3f454d !important;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
}
.dlp-dash .table > tbody > tr > td {
    padding: 9px 8px;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 1px solid #e5e8eb !important;
    color: #3f454d;
    vertical-align: middle;
}
.dlp-dash .table > tbody > tr:nth-child(even) > td { background: #fafbfc; }
.dlp-dash .table > tbody > tr:hover > td { background: #f3f4f6 !important; } /* kelabu neutral - bos tak mahu hover pink */

.dlp-dash .pagination > .active > a,
.dlp-dash .pagination > .active > span { border-color: var(--c, #a6192e); background: var(--c, #a6192e); color: #fff; }

@media (max-width: 767px) {
    .dlp-dash { padding: 6px 8px 4px; }
    .dlp-panel-body { padding: 12px; }
}

/* =========================================================
   REKOD & SEJARAH LATIHAN (m.jkpdkptj_recsej) - gaya Lapor Diri
   Skop: .dlp-recsej (div AJAX dalam m file). 19/11/2026
   ========================================================= */
.dlp-recsej { padding-left: 5px; padding-right: 5px; font-family: Arial, "Helvetica Neue", sans-serif; }
.dlp-recsej > .dlp-heading { margin: 4px 0 12px; }
.dlp-recsej > .col-md-12, .dlp-recsej > .col-md-12 > .col-md-12 { float: none !important; width: auto !important; padding-left: 0 !important; padding-right: 0 !important; } /* panel selebar tajuk */
.dlp-recsej .dlp-rs-penuh { float: none !important; width: auto !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
.dlp-heading__aksi { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Butang */
.dlp-rs-btn {
    min-height: 32px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    border: 1px solid #a6192e;
    border-radius: 7px;
    background: #a6192e;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(37, 42, 46, .08);
}
.dlp-rs-btn:hover, .dlp-rs-btn:focus { background: #861425; border-color: #861425; color: #fff !important; }
.dlp-rs-btn--garis { background: #fff; border-color: #d9aab4; color: #a6192e !important; }
.dlp-rs-btn--garis:hover, .dlp-rs-btn--garis:focus { background: #a6192e; border-color: #a6192e; color: #fff !important; }
.dlp-rs-btn--hijau { background: #287c4c; border-color: #287c4c; }
.dlp-rs-btn--hijau:hover, .dlp-rs-btn--hijau:focus { background: #1f6440; border-color: #1f6440; }
.dlp-rs-btn--cari { min-width: 110px; justify-content: center; }

/* Panel carian */
.dlp-rs-carian { margin: 0 0 12px; border: 1px solid #dfe3e7; border-radius: 9px; background: #fff; overflow: visible; }
.dlp-rs-carian__head {
    padding: 9px 14px;
    border-bottom: 1px solid #ecd3d8;
    border-radius: 9px 9px 0 0;
    background: #f8eef0;
    color: #252a2e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.dlp-rs-carian__body { padding: 14px 14px 4px; }
.dlp-rs-carian .row { margin-left: 0; margin-right: 0; }
.dlp-rs-carian .control-label { color: #4a5157; font-size: 12px; font-weight: 700; }
.dlp-rs-carian .form-control, .dlp-rs-carian .bootstrap-select > .btn { height: 32px; border: 1px solid #cfd5da; border-radius: 6px; box-shadow: none; font-size: 12px; }
.dlp-rs-carian .form-control:focus { border-color: #a6192e; box-shadow: 0 0 0 2px #f8eef0; }
.dlp-rs-carian .radio-inline { font-size: 12px; }
.dlp-rs-carian input[type="radio"] { accent-color: #a6192e; }

/* Panel kandungan (senarai, peserta, perincian, borang tambah/kemaskini) */
.dlp-recsej .panel.panel-inverse {
    margin-bottom: 12px;
    border: 1px solid #dfe3e7 !important;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(37, 42, 46, .05);
    overflow: hidden;
}
.dlp-recsej .panel.panel-inverse > .panel-heading,
.dlp-recsej .panel.panel-inverse > .panel-heading[style] {
    padding: 9px 14px;
    border-bottom: 1px solid #ecd3d8;
    border-left: 5px solid #a6192e;
    background: #f8eef0 !important;
    color: #252a2e;
}
.dlp-recsej .panel.panel-inverse > .panel-heading .panel-title { color: #252a2e !important; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.dlp-recsej .panel.panel-inverse > .panel-heading a.btn { color: #252a2e; }
.dlp-rs-carian__head i, .dlp-recsej .panel-title > i.fa { margin-right: 5px; color: #252a2e; }
.dlp-recsej .panel.panel-inverse > .panel-body { padding: 14px; background: #fff !important; }
.dlp-recsej .panel.panel-inverse .panel.panel-inverse { box-shadow: none; }

/* Jadual - kecuali jadual Maklumat Sesi / Peserta (role=region) yang ada gaya sendiri, kekal asal (19/11/2026) */
.dlp-recsej .table:not([role="region"] .table):not(.dlp-rs-asal) { margin-bottom: 8px; font-size: 12px; background: #fff; }
.dlp-recsej .table:not([role="region"] .table):not(.dlp-rs-asal) > thead > tr > th,
.dlp-recsej .table:not([role="region"] .table):not(.dlp-rs-asal) > tbody > tr > th {
    padding: 8px;
    border-color: #e4e7eb !important;
    background: #f3f4f6 !important;
    color: #2f353a !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
}
.dlp-recsej .table:not([role="region"] .table):not(.dlp-rs-asal) > thead > tr > th { border-bottom: 2px solid #a6192e !important; }
.dlp-recsej .table:not([role="region"] .table):not(.dlp-rs-asal) > tbody > tr > td { padding: 7px 8px; border-color: #eceff2; color: #2f353a; vertical-align: middle; }
.dlp-recsej .table-striped:not([role="region"] .table):not(.dlp-rs-asal) > tbody > tr:nth-of-type(odd) > td { background: #fff; }
.dlp-recsej .table-striped:not([role="region"] .table):not(.dlp-rs-asal) > tbody > tr:nth-of-type(even) > td { background: #fafbfc; }
/* 20/11/2026: bos tak mahu sebarang warna hover (pink atau kelabu - "semak"); baris kekal warna asal */
.dlp-recsej .table:not([role="region"] .table):not(.dlp-rs-asal) > tbody > tr:hover > td { background: #fff !important; }
.dlp-recsej .table-striped:not([role="region"] .table):not(.dlp-rs-asal) > tbody > tr:nth-of-type(even):hover > td { background: #fafbfc !important; }

/* Butang tindakan dalam jadual: kekal warna asal (permintaan pengguna 19/11/2026) */
.dlp-recsej .dlp-rs-tambah { margin: 0 0 8px; text-align: right; }
.dlp-recsej .table > tbody > tr.dlp-rs-jumlah > td { background: #f3f4f6 !important; font-weight: 700; border-top: 2px solid #a6192e; }
.dlp-recsej .table.table > tbody > tr.dlp-rs-jumlah.dlp-rs-jumlah:hover > td { background: #f3f4f6 !important; } /* baris jumlah kekal kelabu bila hover */
.dlp-recsej .pagination > .active > a, .dlp-recsej .pagination > .active > span { border-color: #a6192e; background: #a6192e; color: #fff; }
.dlp-recsej .alert { border-radius: 7px; font-size: 12px; }

/* Tajuk kecil h6 (Senarai Peserta, Maklumat Latihan, Skor Penilaian...) - 20/11/2026:
   dulu Arial Black bergaris bawah; kini sama seperti tajuk panel (hitam, tebal, huruf besar, ikon) */
.dlp-recsej h6[style*="Arial Black"],
.dlp-recsej #ptj-maklumat-sesi h6,
.dlp-recsej #ptj-maklumat-peserta-v3 h6,
.dlp-recsej #ptj-peserta-elatihan h6 {
    margin: 4px 0 12px !important;
    padding: 0 0 7px;
    border-bottom: 1px solid #ecd3d8;
    color: #252a2e !important;
    font-family: Arial, "Helvetica Neue", sans-serif !important;
    font-size: 12.5px;
    font-weight: 700 !important;
    letter-spacing: .3px;
    text-decoration: none !important;
    text-transform: uppercase;
}
.dlp-recsej h6[style*="Arial Black"]::before,
.dlp-recsej #ptj-maklumat-sesi h6::before,
.dlp-recsej #ptj-maklumat-peserta-v3 h6::before,
.dlp-recsej #ptj-peserta-elatihan h6::before {
    content: "\f0ca";
    margin-right: 6px;
    font-family: FontAwesome;
    font-weight: normal;
}
/* Bar paging dalam .table-responsive (Senarai Peserta): selebar jadual - 20/11/2026 */
.dlp-recsej .table-responsive > .col-md-12 { float: none; width: auto; padding-left: 0; padding-right: 0; }

@media (max-width: 767px) {
    .dlp-heading__aksi { margin-left: 0; }
    .dlp-rs-carian .col-md-10, .dlp-rs-carian .col-md-4, .dlp-rs-carian .col-md-2 { float: none; width: auto; }
}
