/*
 * APLAS - Bootstrap 5
 *
 * Bahagian 1: rupa APLAS yang dahulu daripada AdminLTE 2.3 (skin-purple bertampal, layout-top-nav):
 *             bar atas teal, latar gambar, kaki teal, fon Source Sans Pro, saiz fon asas 14px.
 * Bahagian 2: lapisan keserasian kelas Bootstrap 3 yang masih digunakan dalam view lama
 *             (panel, pull-*, col-xs-*, label, well, btn-default/xs, hidden-xs, help-block ...).
 *             View baharu patut guna kelas Bootstrap 5 terus.
 */

/* ===================== Bahagian 1: rupa APLAS ===================== */
:root {
    --aplas-teal: #2EA3A3;
    --aplas-teal-gelap: #258a8a;
}

html {
    font-size: 14px;            /* BS3 = 14px; BS5 lalai 16px */
}

body {
    font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 400;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #5e5d5d;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Bar atas */
/* Bar atas tetap (AdminLTE body.fixed): kekal di atas semasa skrol */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    max-height: 100px;
}

.main-header .navbar {
    background-color: var(--aplas-teal);
    min-height: 51px;
    padding-top: 0;
    padding-bottom: 0;
}

.main-header .navbar-brand {
    padding: 0;
    margin-right: 1rem;
}

.main-header .navbar-brand { display: flex; align-items: center; gap: 10px; min-height: 51px; }
.main-header .navbar-brand img.brand-logo { width: auto; height: 38px; }
.main-header .brand-teks { display: flex; flex-direction: column; line-height: 1.1; color: #fff; }
.main-header .brand-teks b { font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.main-header .brand-teks small { font-size: 11.5px; font-weight: 400; opacity: .92; }
@media (max-width: 575.98px) { .main-header .brand-teks small { display: none; } }

.main-header .navbar .nav-link,
.main-header .navbar .nav-link:focus {
    color: #fff;
    padding: 15px;
    line-height: 21px;
}

.main-header .navbar .nav-link:hover,
.main-header .navbar .nav-link.active,
.main-header .navbar .show > .nav-link {
    background: rgba(0, 0, 0, 0.1);
    color: #fff;
    text-decoration: none;
}

/* Menu: ikon, penanda halaman aktif dan butang Log Keluar */
.main-header .navbar .nav-link i.bi { margin-right: 5px; font-size: 16px; vertical-align: -1px; }
.main-header .navbar .nav-link { font-size: 15px; font-weight: 600; box-shadow: inset 0 -3px 0 transparent; transition: background-color .15s, box-shadow .15s; }
.main-header .navbar .nav-link:hover { box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .45); }
.main-header .navbar .nav-link.active { background: rgba(0, 0, 0, 0.18); box-shadow: inset 0 -3px 0 #fff; }
.main-header .navbar .nav-pengguna .nav-link { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 400; color: rgba(255, 255, 255, .85); cursor: default; }
.main-header .navbar .nav-pengguna .nav-link:hover { background: transparent; box-shadow: none; }
.main-header .navbar .nav-keluar { display: flex; align-items: center; margin: 0 4px 0 6px; }
.main-header .navbar .nav-keluar .nav-link { padding: 6px 14px; line-height: 21px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 6px; box-shadow: none; }
.main-header .navbar .nav-keluar .nav-link:hover { color: #0b6b6b; background: #fff; box-shadow: none; }
.main-header .dropdown-menu { border: 0; border-radius: 0 0 8px 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.main-header .dropdown-item { padding: 8px 18px; }
.main-header .dropdown-item.active, .main-header .dropdown-item:active { background: var(--aplas-teal); }
@media (max-width: 991.98px) {
    .main-header .navbar-collapse { padding: 6px 0 10px; background: var(--aplas-teal); }
    .main-header .navbar .nav-link { padding: 11px 16px; }
    .main-header .navbar .nav-link.active { box-shadow: inset 4px 0 0 #fff; }
    .main-header .navbar .nav-link:hover { box-shadow: inset 4px 0 0 rgba(255, 255, 255, .45); }
    .main-header .navbar .nav-pengguna .nav-link { max-width: none; }
    .main-header .navbar .nav-keluar { margin: 6px 16px 4px; }
    .main-header .navbar .nav-keluar .nav-link { width: 100%; text-align: center; }
}

.main-header .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.6);
    margin: 8px 0;
}

.main-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.main-header .dropdown-menu {
    font-size: 14px;
}

.main-header .dropdown-header {
    color: var(--aplas-teal-gelap);
    font-weight: 600;
}

/* Kandungan: latar gambar seperti AdminLTE content-wrapper APLAS */
.content-wrapper {
    flex: 1 0 auto;
    background-color: #ecf0f5;   /* gambar latar ditetapkan inline dalam layouts/content.php */
    padding-top: 65px;           /* .fixed .content-wrapper AdminLTE: 50px (bawah bar tetap) + .content-header kosong 15px */
}
@media (max-width: 767.98px) {
    .content-wrapper { padding-top: 115px; }   /* AdminLTE .fixed pada telefon: 100px + 15px */
}

.content-wrapper > .content {
    min-height: 250px;
    padding: 15px;
}

/* Kaki */
.main-footer {
    background-color: var(--aplas-teal);
    color: #fff;
    padding: 15px;
    border-top: 1px solid #d2d6de;
}

.main-footer a {
    color: #fff;
}

.main-footer { padding: 12px 20px; }
.main-footer .footer-isi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; font-size: 14px; }
.main-footer .footer-pautan { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.main-footer .footer-pautan a { opacity: .95; }
.main-footer .footer-pautan a:hover, .main-footer .footer-hakcipta a:hover { opacity: 1; text-decoration: underline; }
.main-footer .footer-pautan i { margin-right: 4px; }
.main-footer .footer-versi { opacity: .9; }
@media (max-width: 575.98px) { .main-footer .footer-isi { justify-content: center; text-align: center; } }

/* Halaman log masuk / daftar (dahulu body.login-page AdminLTE) */
.login-page {
    background: #d2d6de;
}

/* Kotak log masuk/daftar/lupa kata laluan (dahulu AdminLTE login-box/register-box) */
.login-box,
.register-box {
    width: 360px;
    max-width: 100%;
    margin: 7% auto;
}
.login-logo,
.register-logo {
    font-size: 35px;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 300;
}
.login-box-body,
.register-box-body {
    background: #fff;
    padding: 20px;
    border-top: 0;
    color: #666;
}
.login-box-msg,
.register-box-msg {
    margin: 0;
    text-align: center;
    padding: 0 20px 20px 20px;
}

/* Kotak AdminLTE (box) */
.box {
    position: relative;
    border-radius: 3px;
    background: #fff;
    border-top: 3px solid #d2d6de;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.box-header { padding: 10px; border-bottom: 1px solid #f4f4f4; }
.box-body { padding: 10px; border-radius: 0 0 3px 3px; }
.box-footer { padding: 10px; border-top: 1px solid #f4f4f4; background-color: #fff; }
.btn-flat { border-radius: 0; box-shadow: none; border-width: 1px; }

/* ===================== Bahagian 2: keserasian Bootstrap 3 ===================== */

/* Panel (BS3) -> rupa sama; warna panel-primary APLAS = teal */
.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

.panel-body {
    padding: 15px;
}

.panel-body::after {
    content: "";
    display: table;
    clear: both;
}

.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.panel-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 16px;
    color: inherit;
}

.panel-footer {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

.panel-default { border-color: #ddd; }
.panel-default > .panel-heading { color: #333; background-color: #f5f5f5; border-color: #ddd; }
.panel-primary { border-color: #e4f8f8; }
.panel-primary > .panel-heading { color: #fff; background-color: var(--aplas-teal); border-color: #e4f8f8; }
.panel-success { border-color: #d6e9c6; }
.panel-success > .panel-heading { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; }
.panel-info { border-color: #bce8f1; }
.panel-info > .panel-heading { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; }
.panel-warning { border-color: #faebcc; }
.panel-warning > .panel-heading { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; }
.panel-danger { border-color: #ebccd1; }
.panel-danger > .panel-heading { color: #a94442; background-color: #f2dede; border-color: #ebccd1; }

/* Panel GridView kartik (BS5 = card + card-header.bg-*): warna seperti panel BS3 */
.card > .card-header.bg-info { background-color: #d9edf7 !important; color: #31708f !important; border-color: #bce8f1; }
.card > .card-header.bg-primary { background-color: var(--aplas-teal) !important; color: #fff !important; }
.card > .card-header.bg-success { background-color: #dff0d8 !important; color: #3c763d !important; border-color: #d6e9c6; }
.card > .card-header.bg-warning { background-color: #fcf8e3 !important; color: #8a6d3b !important; border-color: #faebcc; }
.card > .card-header.bg-danger { background-color: #f2dede !important; color: #a94442 !important; border-color: #ebccd1; }
.card > .card-header.bg-secondary,
.card > .card-header.bg-light { background-color: #f5f5f5 !important; color: #333 !important; }
.card:has(> .card-header.bg-info) { border-color: #bce8f1; }
.card > .card-header .panel-title { font-size: 16px; }

/* Well (BS3) */
.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}
.well-sm { padding: 9px; border-radius: 3px; }
.well-lg { padding: 24px; border-radius: 6px; }

/* Label (BS3) -> seperti badge */
.label {
    display: inline;
    padding: .2em .6em .3em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
}
.label-default { background-color: #777; }
.label-primary { background-color: #337ab7; }
.label-success { background-color: #5cb85c; }
.label-info { background-color: #5bc0de; }
.label-warning { background-color: #f0ad4e; }
.label-danger { background-color: #d9534f; }

/* Utiliti BS3 */
.pull-right { float: right !important; }
.pull-left { float: left !important; }
.center-block { display: block; margin-right: auto; margin-left: auto; }
.img-responsive { display: block; max-width: 100%; height: auto; }
.help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #737373; }
/* Mesej validasi: merah (BS3 .has-error / BS5 .invalid-feedback) */
.help-block-error,
.has-error .help-block,
.is-invalid .help-block,
.invalid-feedback {
    color: #dd4b39 !important;
}
.help-block-error:empty { margin: 0; }
.form-group { margin-bottom: 15px; }
.control-label { margin-bottom: 5px; }
.input-group-addon {
    display: flex;
    align-items: center;
    padding: .375rem .75rem;
    font-size: 1rem;
    color: #555;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: .25rem;
}
.text-muted { color: #777 !important; }
.caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px dashed; border-right: 4px solid transparent; border-left: 4px solid transparent; }

@media (max-width: 767.98px) {
    .hidden-xs { display: none !important; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    .hidden-sm { display: none !important; }
}

/* <select class="form-control"> (BS3): BS5 .form-control membuang anak panah; guna rupa .form-select */
select.form-control:not([multiple]):not([size]) {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
}

/* Label medan: BS3 .control-label tebal (site.css); ActiveForm BS5 guna .form-label */
.form-label { font-weight: bold !important; }

/* Warna butang seperti AdminLTE 2 (BS5 lalai lebih terang) */
.btn-primary { --bs-btn-bg: #3c8dbc; --bs-btn-border-color: #367fa9; --bs-btn-hover-bg: #367fa9; --bs-btn-hover-border-color: #204d74; --bs-btn-active-bg: #204d74; --bs-btn-active-border-color: #204d74; --bs-btn-disabled-bg: #3c8dbc; --bs-btn-disabled-border-color: #367fa9; }
.btn-success { --bs-btn-bg: #00a65a; --bs-btn-border-color: #008d4c; --bs-btn-hover-bg: #008d4c; --bs-btn-hover-border-color: #398439; --bs-btn-active-bg: #008d4c; --bs-btn-active-border-color: #398439; }
.btn-danger { --bs-btn-bg: #dd4b39; --bs-btn-border-color: #d73925; --bs-btn-hover-bg: #d73925; --bs-btn-hover-border-color: #ac2925; --bs-btn-active-bg: #d73925; --bs-btn-active-border-color: #ac2925; }
.btn-warning { --bs-btn-color: #fff; --bs-btn-bg: #f39c12; --bs-btn-border-color: #e08e0b; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #e08e0b; --bs-btn-hover-border-color: #d58512; --bs-btn-active-bg: #e08e0b; }
.btn-info { --bs-btn-color: #fff; --bs-btn-bg: #00c0ef; --bs-btn-border-color: #00acd6; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #00acd6; --bs-btn-hover-border-color: #269abc; --bs-btn-active-bg: #00acd6; }

/* Butang BS3 */
.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}
.btn-default:hover,
.btn-default:focus {
    color: #333;
    background-color: #e6e6e6;
    border-color: #adadad;
}
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

/* Grid BS3: col-xs-* (BS5 = col-*) */
.col-xs-1 { flex: 0 0 auto; width: 8.33333333%; }
.col-xs-2 { flex: 0 0 auto; width: 16.66666667%; }
.col-xs-3 { flex: 0 0 auto; width: 25%; }
.col-xs-4 { flex: 0 0 auto; width: 33.33333333%; }
.col-xs-5 { flex: 0 0 auto; width: 41.66666667%; }
.col-xs-6 { flex: 0 0 auto; width: 50%; }
.col-xs-7 { flex: 0 0 auto; width: 58.33333333%; }
.col-xs-8 { flex: 0 0 auto; width: 66.66666667%; }
.col-xs-9 { flex: 0 0 auto; width: 75%; }
.col-xs-10 { flex: 0 0 auto; width: 83.33333333%; }
.col-xs-11 { flex: 0 0 auto; width: 91.66666667%; }
.col-xs-12 { flex: 0 0 auto; width: 100%; }
[class*="col-xs-"] { padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5); padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5); }

/*
 * Lajur BS3 tanpa .row: dahulu terapung (float) bersebelahan; dalam BS5 lajur hanya bersebelahan di dalam
 * .row (flex). Lajur yang bukan anak terus .row diapungkan supaya susun atur kekal seperti BS3.
 */
:not(.row) > [class*="col-xs-"] { float: left; position: relative; min-height: 1px; }
@media (min-width: 576px) {
    :not(.row) > [class*="col-sm-"] { float: left; position: relative; min-height: 1px; }
}
@media (min-width: 768px) {
    :not(.row) > [class*="col-md-"] { float: left; position: relative; min-height: 1px; }
}
@media (min-width: 992px) {
    :not(.row) > [class*="col-lg-"] { float: left; position: relative; min-height: 1px; }
}
/* induk lajur terapung: tutup apungan (BS3 .row/.clearfix) */
:not(.row):has(> [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"], > [class*="col-lg-"])::after {
    content: "";
    display: table;
    clear: both;
}

/* Ikon dalam input (BS3 has-feedback / form-control-feedback): log masuk, daftar, lupa kata laluan */
.has-feedback { position: relative; }
.has-feedback .form-control { padding-right: 2.5rem; }
.form-control-feedback {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: calc(1.5em + .75rem + 2px);
    color: #777;
    pointer-events: none;
}
.has-feedback label ~ .form-control-feedback { top: calc(1.5em + .5rem); }
.has-feedback .form-control.is-invalid ~ .form-control-feedback { right: 1.5rem; }

/* Nav BS3 (usuario/mdm: nav-pills nav-stacked) */
.nav-stacked { flex-direction: column; }
.nav-tabs > li > a, .nav-pills > li > a { display: block; padding: .5rem 1rem; }
.nav-pills > li.active > a, .nav-tabs > li.active > a { color: #fff; background-color: var(--aplas-teal); border-radius: .25rem; }

/* Jadual BS3 */
.table-condensed > :not(caption) > * > * { padding: .25rem .25rem; }

/* Modal: tajuk BS3 yang guna .close */
.close {
    float: right;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .2;
    background: transparent;
    border: 0;
}

/* Alert BS3 yang masih guna .fade.in */
.fade.in { opacity: 1; }

/* Bootstrap Icons sebaris dengan teks butang */
.bi { vertical-align: -.125em; }

/*
 * Ikon tindakan dalam jadual (pensel, mata, tong sampah, senarai, cetak, hantar, tambah):
 * kotak bucu bulat dengan latar pudar daripada warna ikon (warna ditetapkan inline oleh view).
 * Hanya anak terus pautan dalam sel jadual; ikon dalam butang (.btn) dan tajuk panel tidak terjejas.
 */
td > a:not(.btn) > i.bi,
td > a:not(.btn) > span.bi,
td > a:not(.btn) > i.fa,
td > a:not(.btn) > svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 6px;
    font-size: 1em;
    background-color: rgba(108, 117, 125, .14);               /* lalai: kelabu */
    background-color: color-mix(in srgb, currentColor 14%, transparent);
    transition: background-color .15s ease-in-out;
    vertical-align: middle;
}

td > a:not(.btn):hover > i.bi,
td > a:not(.btn):hover > span.bi,
td > a:not(.btn):hover > i.fa,
td > a:not(.btn):hover > svg {
    background-color: rgba(108, 117, 125, .26);
    background-color: color-mix(in srgb, currentColor 26%, transparent);
    text-decoration: none;
}

/* ===================== Tipografi seperti Bootstrap 3 (halaman utama dan lain-lain) =====================
 * BS5 menjadikan tajuk lebih besar (rem + vw), jarak baris 1.5 dan margin perenggan 1rem; BS3 guna saiz tetap px.
 * Disamakan supaya teks/saiz semua halaman sama seperti versi PHP 5.6. */
body { line-height: 1.42857143; font-size: 14px; }
h1, .h1, h2, .h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; }
h4, .h4, h5, .h5, h6, .h6 { margin-top: 10px; margin-bottom: 10px; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 500; line-height: 1.1; }
h1, .h1 { font-size: 36px; }
h2, .h2 { font-size: 30px; }
h3, .h3 { font-size: 24px; }
h4, .h4 { font-size: 18px; }
h5, .h5 { font-size: 14px; }
h6, .h6 { font-size: 12px; }
p { margin: 0 0 10px; }
small, .small { font-size: 85%; }
.btn { font-size: 14px; line-height: 1.42857143; }
.btn-lg { font-size: 18px; line-height: 1.3333333; }
.btn-sm { font-size: 12px; line-height: 1.5; }
label { display: inline-block; max-width: 100%; margin-bottom: 5px; }
/* AdminLTE 2: tajuk guna Source Sans Pro (badan teks mengikut body) */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: 'Source Sans Pro', sans-serif; }

/* ===================== Borang seperti AdminLTE 2 / Bootstrap 3 ===================== */
/* Lajur BS3 yang bukan anak terus .row: BS3 memberi padding 15px (BS5 hanya dalam .row) */
:not(.row) > [class*="col-xs-"],
:not(.row) > [class*="col-sm-"],
:not(.row) > [class*="col-md-"],
:not(.row) > [class*="col-lg-"] {
    padding-left: 15px;
    padding-right: 15px;
}
:not(.row) > [class*="col-sm-"].p-0,
:not(.row) > [class*="col-md-"].p-0 { padding-left: 0; padding-right: 0; }

/* Kawalan borang: segi empat, sempadan #d2d6de, tiada bayang, fokus #3c8dbc (AdminLTE 2) */
.form-control,
.form-select {
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    border: 1px solid #d2d6de;
    border-radius: 0;
    box-shadow: none;
}
textarea.form-control { height: auto; }
.form-control:focus,
.form-select:focus {
    color: #555;
    border-color: #3c8dbc;
    box-shadow: none;
    outline: 0;
}
.form-control:disabled,
.form-control[readonly],
.form-select:disabled { background-color: #eee; opacity: 1; }
.form-control::placeholder { color: #999; opacity: 1; }
.input-group > .form-control { height: 34px; }
.btn { border-radius: 3px; }
.btn-lg { border-radius: 6px; }
.btn-sm { border-radius: 3px; }

/* Jarak lajur (gutter) BS3 = 30px; BS5 lalai 1.5rem (21px pada html 14px) */
.row, .container, .container-fluid, .container-sm, .container-md, .container-lg, .container-xl { --bs-gutter-x: 30px; }
/* Anak .row tanpa kelas col-*: BS3 tiada padding (BS5 .row > * memberi padding gutter) */
.row > :not([class*="col"]) { padding-left: 0; padding-right: 0; margin-top: 0; }

/* Kotak maklumat AdminLTE (.info-box): halaman utama menggunakan nama kelas yang sama (gelembung "Bermula 01 Disember") */
.info-box {
    display: block;
    min-height: 90px;
    width: 100%;
    margin-bottom: 15px;
    border-radius: 2px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}


/* Mesej flash (berjaya/ralat) */
.flash-mesej { display: flex; align-items: flex-start; gap: 12px; margin: 16px 15px 4px; padding: 14px 44px 14px 18px; font-size: 15px; line-height: 1.5; border-width: 1px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.12); position: relative; }
.flash-mesej .flash-ikon { flex: 0 0 auto; margin-top: 1px; font-size: 20px; }
.flash-mesej .flash-teks { flex: 1; }
.flash-mesej .flash-teks ul { padding-left: 18px; }
.flash-mesej .btn-close { position: absolute; top: 12px; right: 12px; padding: 6px; font-size: 12px; opacity: .6; }
.flash-mesej .btn-close:hover { opacity: 1; }
.flash-mesej.alert-success { color: #0f5132; background: #d1f0e0; border-color: #a3d9bc; }
.flash-mesej.alert-danger { color: #842029; background: #fde2e4; border-color: #f1aeb5; }

/* Senarai berjadual (Senarai Permohonan, Daftar PSP) */
.pradaftar-index .card.border-info { border: 1px solid #2EA3A3 !important; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.pradaftar-index .card-header.bg-info { color: #fff !important; background: #2EA3A3 !important; border-color: #2EA3A3; padding: 14px 20px; }
.pradaftar-index .panel-title { font-size: 18px; font-weight: 700; color: #fff; }
.pradaftar-index .card-header .summary { color: #fff; font-size: 14px; }
.pradaftar-index .card-header .summary b { color: #fff; }
.pradaftar-index .kv-panel-before { padding: 14px 20px; background: #f2fbfb; border-bottom: 1px solid #dde3e8; }
.pradaftar-index .kv-panel-before .btn-success { padding: 10px 22px; font-size: 16px; font-weight: 600; background: #0b8080; border-color: #0b8080; border-radius: 6px; }
.pradaftar-index .kv-panel-before .btn-success:hover { background: #2aaaaa; border-color: #2aaaaa; }
.pradaftar-index table.table { margin-bottom: 0; }
.pradaftar-index .table > thead > tr > th { padding: 12px 10px; font-size: 14px; color: #0b6b6b; background: #f2fbfb; vertical-align: middle; }
.pradaftar-index .table > thead > tr > th a { color: #0b6b6b; font-weight: 700; }
.pradaftar-index .table > tbody > tr > td { padding: 12px 10px; font-size: 14px; line-height: 1.45; vertical-align: middle; }
.pradaftar-index td.col-tajuk { min-width: 240px; max-width: 360px; }
.pradaftar-index tr.baris-tindakan > td { background: #FFF8E1 !important; }
.pradaftar-index tr.baris-menunggu > td { background: #E7F1FF !important; }
.pradaftar-index tr.baris-selesai > td { background: #E6F4EA !important; }
.pradaftar-index tr.baris-kelabu > td { background: #EEF0F2 !important; }
.pradaftar-index tr.baris-tindakan > td:first-child { box-shadow: inset 4px 0 0 #f0ad4e; }
.pradaftar-index tr.baris-menunggu > td:first-child { box-shadow: inset 4px 0 0 #4a90e2; }
.pradaftar-index tr.baris-selesai > td:first-child { box-shadow: inset 4px 0 0 #2e9b57; }
.st-lencana { display: inline-block; padding: 5px 12px; font-size: 13px; font-weight: 700; line-height: 1.3; border-radius: 14px; }
.st-warning { color: #7a5200; background: #ffe7a6; }
.st-info { color: #0b4f8f; background: #cfe3fb; }
.st-success { color: #146c43; background: #bfe8cf; }
.st-danger { color: #8a1f2b; background: #f7c6cb; }
.pradaftar-index td.col-aksi { min-width: 120px; }
.pradaftar-index td.col-aksi .btn { display: block; width: 100%; margin: 0 0 6px; padding: 5px 10px; font-size: 13px; font-weight: 600; text-align: left; border-radius: 6px; }
.pradaftar-index td.col-aksi .btn:last-child { margin-bottom: 0; }
.pradaftar-index td.col-aksi .btn-success { background: #0b8080; border-color: #0b8080; }
.legenda { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 12px; padding: 10px 16px; font-size: 14px; color: #444; background: #fff; border: 1px solid #dde3e8; border-radius: 10px; }
.legenda span { display: inline-flex; align-items: center; gap: 7px; }
.legenda i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.pradaftar-index .empty { padding: 30px 10px; font-size: 15px; text-align: center; color: #777; }
.legenda-pilihan { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; color: #333; text-decoration: none; border: 1px solid transparent; border-radius: 8px; transition: background-color .15s, border-color .15s; }
.legenda-pilihan:hover { color: #0b6b6b; background: #f2fbfb; border-color: #cfe9e9; text-decoration: none; }
.legenda-pilihan.aktif { color: #0b6b6b; background: #E1F4F4; border-color: #2EA3A3; font-weight: 600; }
.legenda-pilihan b { font-weight: 700; }
.pradaftar-index tr.baris-tamat > td { background: #FDECEE !important; }
.pradaftar-index tr.baris-tamat > td:first-child { box-shadow: inset 4px 0 0 #dc3545; }
.pradaftar-index tr.baris-batal > td { background: #E9ECEF !important; }
.pradaftar-index tr.baris-batal > td:first-child { box-shadow: inset 4px 0 0 #6c757d; }

/* Butang Daftar Permohonan (pradaftar-online/index): ikon dan teks sebaris, tengah menegak, jarak tetap */
.btn-daftar { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; font-size: 15px; font-weight: 600; line-height: 1.2; border-radius: 6px; }
.btn-daftar i { font-size: 18px; line-height: 1; }

/* ===== Halaman Access (mdm-admin: Route, Menu, Permission, Role, Rule, Grant Access) ===== */
.akses { max-width: 1100px; margin: 24px auto 40px; padding: 24px 28px 28px; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.akses > h1 { margin: 0 0 20px; padding-bottom: 12px; font-size: 24px; font-weight: 700; color: #2b2b2b; border-bottom: 3px solid var(--aplas-teal); }
.akses > h1 i { color: var(--aplas-teal); }
.akses > p { margin-bottom: 16px; }
.akses .btn { font-weight: 600; border-radius: 6px; }
.akses .form-label { font-weight: 600; }
.akses .grid-view table { margin-bottom: 12px; }
.akses .grid-view thead th { color: #fff; background: var(--aplas-teal); border-color: var(--aplas-teal); white-space: nowrap; }
.akses .grid-view thead th a { color: #fff; }
.akses .grid-view .filters td { background: #f4f9f9; }
.akses .grid-view tbody td { vertical-align: middle; }
.akses .grid-view .summary { margin-bottom: 8px; color: #666; font-size: 14px; }
.akses .detail-view th { width: 25%; background: #f4f9f9; }
.akses .pagination { justify-content: center; margin-top: 8px; }
.akses .pagination .page-link { color: #0b6b6b; }
.akses .pagination .active .page-link { color: #fff; background: var(--aplas-teal); border-color: var(--aplas-teal); }
/* senarai dua lajur */
.senarai-dua .senarai-tajuk { margin: 0 0 10px; font-size: 17px; font-weight: 700; color: #0b6b6b; }
.senarai-dua select.list { min-height: 420px; font-size: 14px; }
.senarai-dua .senarai-tengah { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; }
.senarai-dua .senarai-tengah .btn { min-width: 64px; }
.glyphicon-refresh-animate { display: inline-block; animation: aplas-putar 1s linear infinite; }
@keyframes aplas-putar { to { transform: rotate(360deg); } }
@media (max-width: 767.98px) { .akses { margin: 12px; padding: 16px; } .senarai-dua .senarai-tengah { flex-direction: row; } }

/* Lajur tindakan GridView (components/KolumTindakan): butang berlatar berwarna mengikut tindakan */
td.kol-tindakan { white-space: nowrap; text-align: center; vertical-align: middle; }
.akses td.kol-tindakan > a.btn-tindakan { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 0 3px; font-size: 17px; border-radius: 8px; transition: background-color .15s, color .15s, transform .1s; }
.akses td.kol-tindakan > a.btn-tindakan:hover { text-decoration: none; transform: translateY(-1px); }
.akses td.kol-tindakan > a.btn-tindakan > i.bi { width: auto; height: auto; background: transparent; margin: 0; font-size: inherit; }
.akses td.kol-tindakan > a.btn-tindakan:hover > i.bi { background: transparent; }
.akses td.kol-tindakan > a.btn-tindakan-lihat { color: #0b5ed7; background: #e7f1ff; }
.akses td.kol-tindakan > a.btn-tindakan-lihat:hover { color: #fff; background: #0b5ed7; }
.akses td.kol-tindakan > a.btn-tindakan-ubah { color: #8a5a00; background: #fff3cd; }
.akses td.kol-tindakan > a.btn-tindakan-ubah:hover { color: #fff; background: #e0a100; }
.akses td.kol-tindakan > a.btn-tindakan-padam { color: #b02a37; background: #fde2e4; }
.akses td.kol-tindakan > a.btn-tindakan-padam:hover { color: #fff; background: #dc3545; }
.akses .grid-view tbody tr:hover td { background: #f4f9f9; }
.akses .grid-view .empty { padding: 28px; text-align: center; color: #777; font-size: 16px; }
.akses.akses-sempit { max-width: 720px; }

/* Senarai Permohonan kosong: kad mesra pengguna */
.pradaftar-index .empty .kosong-kad { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; }
.pradaftar-index .empty .kosong-ikon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 4px; font-size: 30px; color: #0f8484; background: #e5f4f4; border-radius: 50%; }
.pradaftar-index .empty .kosong-kad h4 { margin: 0; font-size: 20px; font-weight: 700; color: #1f2d2d; }
.pradaftar-index .empty .kosong-kad p { margin: 0; font-size: 15px; line-height: 1.5; color: #555; }
