
/* =========================================
   MYGRED - CARIAN PREMIS
========================================= */

.mygred-search-page {
    background: linear-gradient(
        180deg,
        #f8fbff 0%,
        #ffffff 65%
    );
    min-height: 80vh;
    padding: 75px 0 100px;
}

/* HEADER */

.search-page-header {
    margin-bottom: 45px;
}

.search-page-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 18px;
}

.search-page-dot {
    width: 8px;
    height: 8px;
    background: #16a34a;
    border-radius: 50%;
}

.search-page-title {
    color: #252b42;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 15px;
}

.search-page-title span {
    color: #07864f;
}

.search-page-description {
    color: #64748b !important;
    font-size: 16px;
    line-height: 1.8;
    max-width: 650px;
    margin: 0 auto;
}

/* FORM CARIAN */

.search-filter-card {
    background: #ffffff;
    border: 1px solid #e9eef5;
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 50px;
    box-shadow: 0 12px 40px rgba(30, 41, 59, 0.06);
}

.search-filter-card .form-label {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.search-filter-card .form-control,
.search-filter-card .form-select {
    height: 50px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #fff;
    color: #334155;
    font-size: 14px;
}

.search-filter-card .form-control:focus,
.search-filter-card .form-select:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.10);
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
    z-index: 1;
}

.search-input-wrapper .form-control {
    padding-left: 46px;
}

.btn-search-premis {
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #252b42;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 0 25px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.25s ease;
}

.btn-search-premis:hover {
    background: #07864f;
    color: #fff;
    transform: translateY(-2px);
}

.search-reset-link {
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
}

.search-reset-link:hover {
    color: #07864f;
}

/* RESULT HEADER */

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.result-title {
    font-size: 22px;
    font-weight: 750;
    color: #252b42;
    margin-bottom: 5px;
}

.result-description {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 0;
}

.result-count {
    background: #ecfdf5;
    color: #047857;
    border-radius: 30px;
    padding: 10px 17px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* RESULT CARD */

.premis-result-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 335px;
    background: #fff;
    border: 1px solid #e9eef5;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 8px 28px rgba(30, 41, 59, 0.05);
    transition: all 0.25s ease;
}

.premis-result-card:hover {
    transform: translateY(-5px);
    border-color: #bbf7d0;
    box-shadow: 0 18px 40px rgba(30, 41, 59, 0.10);
}

.premis-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.premis-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #ecfdf5;
    color: #07864f;
    border-radius: 12px;
    font-size: 25px;
}

.premis-grade {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    font-size: 30px;
    font-weight: 800;
}

/* GRED */

.grade-a {
    color: #15803d;
    background: #dcfce7;
}

.grade-b {
    color: #1d4ed8;
    background: #dbeafe;
}

.grade-c {
    color: #dc2626;
    background: #fee2e2;
}

.grade-t,
.grade-p,
.grade-none {
    color: #64748b;
    background: #f1f5f9;
}

/* MAKLUMAT PREMIS */

.premis-card-content {
    flex: 1;
}

.premis-category {
    color: #07864f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.premis-name {
    color: #252b42;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.5;
    margin-bottom: 15px;
}

.premis-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 15px;
}

.premis-address i {
    color: #94a3b8;
    font-size: 17px;
    margin-top: 2px;
}

.premis-grade-label {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* CARD FOOTER */

.premis-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
    margin-top: 20px;
}

.premis-inspection-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 12px;
}

.premis-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #07864f;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.premis-detail-link:hover {
    color: #065f46;
}

/* EMPTY STATE */

.search-empty-state {
    text-align: center;
    background: #fff;
    border: 1px solid #e9eef5;
    border-radius: 18px;
    padding: 65px 25px;
}

.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    background: #f1f5f9;
    color: #94a3b8;
    border-radius: 50%;
    font-size: 35px;
    margin: 0 auto 25px;
}

.search-empty-state h4 {
    color: #252b42;
    font-weight: 700;
}

.search-empty-state p {
    color: #64748b;
    max-width: 400px;
    margin: 15px auto 25px;
}

/* PAGINATION */

.search-pagination {
    display: flex;
    justify-content: center;
    margin-top: 45px;
}

/* RESPONSIVE */

@media (max-width: 767.98px) {
    .mygred-search-page {
        padding: 45px 0 70px;
    }

    .search-filter-card {
        padding: 22px;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .premis-card-bottom {
        flex-wrap: wrap;
    }
}

/* DARK MODE */

body.dark .mygred-search-page {
    background: #0e1726;
}

body.dark .search-filter-card,
body.dark .premis-result-card,
body.dark .search-empty-state {
    background: #1b2e4b;
    border-color: #253b58;
}

body.dark .search-page-title,
body.dark .result-title,
body.dark .premis-name,
body.dark .search-empty-state h4 {
    color: #f1f5f9;
}

body.dark .search-filter-card .form-label {
    color: #cbd5e1;
}

body.dark .search-filter-card .form-control,
body.dark .search-filter-card .form-select {
    background-color: #17243a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark .premis-card-bottom {
    border-color: #334155;
}

body.dark .search-page-description,
body.dark .premis-address,
body.dark .search-empty-state p {
    color: #a6b0c3 !important;
}



/* =========================================
   MYGRED CUSTOM PAGINATION
========================================= */

.mygred-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 45px;
    padding: 22px 25px;
    background: #ffffff;
    border: 1px solid #e9eef5;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(30, 41, 59, 0.04);
    min-width: 0;
    max-width: 100%;
}

/* Maklumat pagination */

.mygred-pagination-info {
    flex: 1 1 220px;
    min-width: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.7;
}

.mygred-pagination-info strong {
    color: #252b42;
    font-weight: 700;
}

.mygred-pagination-info .pagination-page-info {
    display: block;
    font-size: 12px;
    color: #94a3b8;
}

/* Pagination links */

.mygred-pagination-links {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
}

.mygred-pagination-links nav {
    display: block;
    width: 100%;
}

/* Bootstrap 5 pagination */

.mygred-pagination-links .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mygred-pagination-links .page-item {
    margin: 0;
}

.mygred-pagination-links .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 7px 11px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 9px !important;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
    transition: all 0.2s ease;
}

.mygred-pagination-links .page-link:hover {
    background: #ecfdf5;
    border-color: #86efac;
    color: #047857;
}

.mygred-pagination-links
.page-item.active .page-link {
    background: #07864f !important;
    border-color: #07864f !important;
    color: #ffffff !important;
}

.mygred-pagination-links
.page-item.disabled .page-link {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #e2e8f0;
    opacity: 0.65;
}

.mygred-pagination-links .page-link:focus {
    box-shadow: 0 0 0 3px rgba(7, 134, 79, 0.12);
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 991.98px) {

    .mygred-pagination-wrapper {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }

    .mygred-pagination-info {
        flex: none;
        width: 100%;
    }

    .mygred-pagination-links {
        width: 100%;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 767.98px) {

    .mygred-pagination-wrapper {
        width: 100%;
        padding: 18px 12px;
        margin-top: 30px;
        gap: 15px;
        border-radius: 12px;
        box-sizing: border-box;
    }

    .mygred-pagination-info {
        width: 100%;
        font-size: 12px;
        line-height: 1.8;
        overflow-wrap: break-word;
    }

    .mygred-pagination-info
    .pagination-page-info {
        font-size: 11px;
        margin-top: 4px;
    }

    .mygred-pagination-links {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .mygred-pagination-links nav {
        width: 100%;
    }

    .mygred-pagination-links .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px;
        width: 100%;
    }

    .mygred-pagination-links .page-link {
        min-width: 32px;
        height: 34px;
        padding: 5px 8px;
        font-size: 12px;
    }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 375px) {

    .mygred-pagination-wrapper {
        padding: 15px 8px;
    }

    .mygred-pagination-links .pagination {
        gap: 4px;
    }

    .mygred-pagination-links .page-link {
        min-width: 29px;
        height: 31px;
        padding: 4px 6px;
        font-size: 11px;
    }
}

/* =========================================
   DARK MODE
========================================= */

body.dark .mygred-pagination-wrapper {
    background: #1b2e4b;
    border-color: #253b58;
}

body.dark .mygred-pagination-info {
    color: #a6b0c3;
}

body.dark .mygred-pagination-info strong {
    color: #f1f5f9;
}

body.dark .mygred-pagination-links .page-link {
    background: #17243a;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark .mygred-pagination-links
.page-link:hover {
    background: #214b40;
    border-color: #07864f;
    color: #ffffff;
}

body.dark .mygred-pagination-links
.page-item.active .page-link {
    background: #07864f !important;
    border-color: #07864f !important;
    color: #ffffff !important;
}

.premis-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-aktif {
    background: #dcfce7;
    color: #15803d;
}

.status-tidak-aktif {
    background: #fee2e2;
    color: #b91c1c;
}

.status-proses {
    background: #fef3c7;
    color: #92400e;
}

.status-default {
    background: #f1f5f9;
    color: #64748b;
}
.premis-dates {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.premis-date-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.premis-date-item i {
    font-size: 16px;
    color: #94a3b8;
}

.premis-date-item strong {
    color: #253047;
    font-weight: 600;
}

/* Search form MYGRED */
.mygred-search-page .form-control,
.mygred-search-page .form-select {
    min-height: 48px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    background-color: #ffffff;
    color: #253047;
}

.mygred-search-page .form-control:focus,
.mygred-search-page .form-select:focus {
    border-color: #07864f;
    box-shadow: 0 0 0 3px rgba(7, 134, 79, 0.10);
}

.mygred-search-page .form-label {
    color: #253047;
    font-size: 13px;
}

.mygred-search-page .btn-primary {
    min-height: 48px;
    border-radius: 10px;
    background: #252b42;
    border-color: #252b42;
    font-weight: 600;
}

.mygred-search-page .btn-primary:hover {
    background: #07864f;
    border-color: #07864f;
}
