/* =========================================================
   PROFILE PAGE
========================================================= */

.profile-container {
    width: 90%;
    max-width: 1200px;
    margin: 45px auto;
    box-sizing: border-box;
}


/* =========================================================
   MAIN GRID
   1. My Profile
   2. Settings
   3. My Reports
   4. My Claims
========================================================= */

.profile-content {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 25px;

    align-items: stretch;
}


/* =========================================================
   ALL CARDS
========================================================= */

.profile-content > .card {
    background: #ffffff;

    border-radius: 20px;

    padding: 30px;

    box-sizing: border-box;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}


/* =========================================================
   MY PROFILE
========================================================= */

.profile-content > .profile-card {
    min-height: 300px;

    display: flex;

    flex-direction: column;

    justify-content: flex-start;
}


.profile-card h3 {
    margin: 0 0 25px;

    color: #45208C;

    font-size: 20px;
}


.profile-details {
    width: 100%;

    margin: 0;

    text-align: left;
}


.profile-details p {
    margin: 0;

    padding: 12px 0;

    border-bottom: 1px solid #eee;

    color: #555;

    font-size: 15px;
}


.profile-details p:last-child {
    border-bottom: none;
}


.profile-details strong {
    display: inline-block;

    width: 70px;

    color: #45208C;
}


/* =========================================================
   EDIT PROFILE BUTTON
========================================================= */

.profile-card .view-btn {
    display: block;

    width: 100%;

    margin-top: 20px;

    padding: 11px 20px;

    background: #6F42C1;

    color: #ffffff;

    border-radius: 10px;

    text-decoration: none;

    text-align: center;

    font-size: 14px;

    font-weight: 600;

    box-sizing: border-box;

    transition: 0.2s ease;
}


.profile-card .view-btn:hover {
    background: #45208C;
}


/* =========================================================
   SETTINGS CARD
========================================================= */

.profile-content > .card:nth-child(2) {
    min-height: 300px;

    display: flex;

    flex-direction: column;

    justify-content: flex-start;
}


/* Settings title */

.profile-content > .card:nth-child(2) > h3 {
    margin: 0 0 25px;

    color: #45208C;

    font-size: 20px;
}


/* =========================================================
   NOTIFICATION SECTION
========================================================= */

.settings-section {
    margin: 0;

    padding: 0;
}


.settings-section h4 {
    margin: 0 0 20px;

    color: #222;

    font-size: 14px;
}


.settings-section form {
    margin: 0;
}


.settings-section label {
    display: flex;

    align-items: center;

    gap: 8px;

    margin: 0 0 15px;

    color: #444;

    font-size: 14px;
}


.settings-section input[type="checkbox"] {
    width: 15px;
    height: 15px;

    margin: 0;
}


/* =========================================================
   SAVE CHANGES BUTTON
========================================================= */

.settings-section .notification-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 145px;
    height: 44px;

    margin: 0;

    padding: 0;

    background: #6F42C1;

    color: #ffffff;

    border: none;

    border-radius: 9px;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;
}


.settings-section .notification-btn:hover {
    background: #45208C;
}


/* =========================================================
   CHANGE PASSWORD
========================================================= */

.settings-section .password-section {
    margin-top: 35px;

    padding-top: 25px;

    border-top: 1px solid #eeeeee;
}


.settings-section .password-section h4 {
    margin: 0 0 18px;

    color: #222;

    font-size: 14px;
}


.settings-section .password-section .small-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 145px;
    height: 44px;

    margin: 0;

    padding: 0;

    background: #6F42C1;

    color: #ffffff;

    border-radius: 9px;

    text-decoration: none;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

    font-weight: 600;

    box-sizing: border-box;

    transition: 0.2s ease;
}


.settings-section .password-section .small-btn:hover {
    background: #45208C;
}

/* =========================================================
   MY REPORTS + MY CLAIMS
   FILTER + TABLE DESIGN
========================================================= */


/* =========================================================
   CARD
========================================================= */

.profile-content > .card:nth-child(3),
.profile-content > .card:nth-child(4) {

    min-height: 370px;

    padding: 30px;

    box-sizing: border-box;

    overflow: hidden;
}


/* =========================================================
   CARD TITLE
========================================================= */

.profile-content > .card:nth-child(3) h3,
.profile-content > .card:nth-child(4) h3 {

    margin: 0 0 20px;

    color: #45208C;

    font-size: 20px;

    font-weight: 700;
}


/* =========================================================
   FILTER SECTION
   REPORTS + CLAIMS
========================================================= */

.profile-content > .card:nth-child(3) .filter-section,
.profile-content > .card:nth-child(4) .filter-section {

    display: flex;

    align-items: center;

    gap: 10px;

    width: 100%;

    margin-bottom: 10px;

    box-sizing: border-box;
}


/* =========================================================
   SEARCH INPUT
========================================================= */

#reportSearch,
#claimSearch {

    flex: 1;

    height: 38px;

    min-width: 0;

    padding: 0 12px;

    border: 1px solid #d8d8d8;

    border-radius: 8px;

    background: #ffffff;

    color: #444;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

    box-sizing: border-box;

    outline: none;

    transition: 0.2s ease;
}


#reportSearch:focus,
#claimSearch:focus {

    border-color: #6F42C1;

    box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.08);
}


/* Placeholder */

#reportSearch::placeholder,
#claimSearch::placeholder {

    color: #999;
}


/* =========================================================
   DROPDOWN
========================================================= */

#reportFilter,
#claimFilter {

    width: 110px;

    height: 38px;

    padding: 0 10px;

    border: 1px solid #d8d8d8;

    border-radius: 8px;

    background: #ffffff;

    color: #444;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

    box-sizing: border-box;

    cursor: pointer;

    outline: none;
}


#reportFilter:focus,
#claimFilter:focus {

    border-color: #6F42C1;
}


/* =========================================================
   REPORT TABLE
========================================================= */

#reportTable,
#claimTable {

    width: 100%;

    border-collapse: collapse;

    table-layout: fixed;

    margin: 0;
}


/* =========================================================
   TABLE HEADER
========================================================= */

#reportTable th,
#claimTable th {

    background: #6F42C1;

    color: #ffffff;

    padding: 10px 11px;

    border: 1px solid #eeeeee;

    text-align: left;

    font-size: 13px;

    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   TABLE BODY
========================================================= */

#reportTable td,
#claimTable td {

    padding: 10px 11px;

    border: 1px solid #eeeeee;

    color: #444;

    font-size: 13px;

    vertical-align: middle;
}


/* =========================================================
   REPORT COLUMN WIDTH
========================================================= */

#reportTable th:nth-child(1),
#reportTable td:nth-child(1) {
    width: 18%;
}

#reportTable th:nth-child(2),
#reportTable td:nth-child(2) {
    width: 14%;
}

#reportTable th:nth-child(3),
#reportTable td:nth-child(3) {
    width: 19%;
}

#reportTable th:nth-child(4),
#reportTable td:nth-child(4) {
    width: 21%;
}

#reportTable th:nth-child(5),
#reportTable td:nth-child(5) {
    width: 28%;
}


/* =========================================================
   CLAIM COLUMN WIDTH
========================================================= */

#claimTable th:nth-child(1),
#claimTable td:nth-child(1) {
    width: 28%;
}

#claimTable th:nth-child(2),
#claimTable td:nth-child(2) {
    width: 22%;
}

#claimTable th:nth-child(3),
#claimTable td:nth-child(3) {
    width: 27%;
}

#claimTable th:nth-child(4),
#claimTable td:nth-child(4) {
    width: 23%;
}


/* =========================================================
   REPORT STATUS - FIX
========================================================= */

#reportTable td .report-status {
    display: inline-block;

    padding: 7px 12px;

    min-width: 70px;

    box-sizing: border-box;

    background: #eee8fb;

    color: #45208C;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 600;

    text-align: center;

    white-space: nowrap;

    line-height: 1.2;

    vertical-align: middle;
}

/* =========================================================
   REPORT TABLE COLUMN WIDTH - FIX
========================================================= */

#reportTable th:nth-child(1),
#reportTable td:nth-child(1) {
    width: 18%;
}

#reportTable th:nth-child(2),
#reportTable td:nth-child(2) {
    width: 14%;
}

#reportTable th:nth-child(3),
#reportTable td:nth-child(3) {
    width: 20%;
}

#reportTable th:nth-child(4),
#reportTable td:nth-child(4) {
    width: 23%;
}

#reportTable th:nth-child(5),
#reportTable td:nth-child(5) {
    width: 25%;
}

/* Claim status */

#claimTable .claim-status {

    color: #444;

    font-size: 13px;

    white-space: nowrap;
}


/* =========================================================
   SMALL ACTION BUTTON
========================================================= */

#reportTable .small-btn,
#claimTable .small-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 58px;

    height: 36px;

    margin: 2px 3px 2px 0;

    padding: 0 11px;

    background: #6F42C1;

    color: #ffffff;

    border: none;

    border-radius: 9px;

    text-decoration: none;

    font-family: 'Poppins', sans-serif;

    font-size: 12px;

    font-weight: 600;

    line-height: 1;

    box-sizing: border-box;

    white-space: nowrap;

    transition: 0.2s ease;
}


#reportTable .small-btn:hover,
#claimTable .small-btn:hover {

    background: #45208C;

    transform: translateY(-1px);
}


/* =========================================================
   NOTIFICATION PREFERENCE
========================================================= */

.settings-section h4 {
    margin: 0 0 20px;
    color: #222;
    font-size: 14px;
}


/* Form susun secara menegak */
.settings-section form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    margin: 0;
    padding: 0;
}


/* Email Notification */
.settings-section form label {
    display: flex;
    align-items: center;

    gap: 8px;

    margin: 0 0 15px;

    color: #444;

    font-size: 14px;
}


.settings-section form input[type="checkbox"] {
    width: 15px;
    height: 15px;

    margin: 0;
}


/* Save Changes duduk bawah Email Notification */
.settings-section form .notification-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 145px;
    height: 42px;

    margin: 0;
    padding: 0;

    background: #6F42C1;

    color: #ffffff;

    border: none;
    border-radius: 9px;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    box-sizing: border-box;

    transition: 0.2s ease;
}


.settings-section form .notification-btn:hover {
    background: #45208C;
}


/* =========================================================
   CHANGE PASSWORD
========================================================= */

.settings-section .password-section {
    margin-top: 35px;

    padding-top: 25px;

    border-top: 1px solid #eeeeee;
}


.settings-section .password-section h4 {
    margin: 0 0 18px;

    color: #222;

    font-size: 14px;
}


.settings-section .password-section .small-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 145px;
    height: 42px;

    margin: 0;
    padding: 0;

    background: #6F42C1;

    color: #ffffff;

    border-radius: 9px;

    text-decoration: none;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;
    font-weight: 600;

    box-sizing: border-box;

    transition: 0.2s ease;
}


.settings-section .password-section .small-btn:hover {
    background: #45208C;
}

/* =========================================================
   FINAL FIX - REPORT STATUS
========================================================= */

#reportTable td.report-status {
    display: table-cell !important;

    width: auto !important;
    height: auto !important;

    padding: 10px !important;

    background: transparent !important;

    color: #45208C !important;

    border: 1px solid #eeeeee !important;
    border-radius: 0 !important;

    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;

    line-height: normal !important;

    text-align: left !important;
    vertical-align: middle !important;

    white-space: nowrap !important;
}


/* Buat pill pada status menggunakan background pada TD */

#reportTable td.report-status {
    background: #eee8fb !important;
    border-radius: 0 !important;
}

/* ==========================================
   CLAIM DETAILS PAGE
========================================== */

.profile-container .card:has(.claim-detail) {
    max-width: 850px;
    margin: 50px auto;
    padding: 35px 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(69, 32, 140, 0.10);
}

/* Title */
.profile-container .card:has(.claim-detail) h2 {
    margin: 0 0 8px;
    color: #45208C;
    font-size: 28px;
    font-weight: 700;
}

/* Description */
.profile-container .card:has(.claim-detail) > p {
    margin: 0 0 25px;
    color: #666;
    font-size: 15px;
}

/* Detail container */
.claim-detail {
    margin-top: 10px;
    border-top: 1px solid #eee;
}

/* Each detail row */
.claim-detail .detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    color: #444;
    font-size: 15px;
    line-height: 1.5;
}

/* Labels */
.claim-detail .detail-row strong {
    min-width: 170px;
    color: #45208C;
    font-weight: 600;
}

/* Status */
.claim-detail .detail-row:nth-child(4) {
    display: flex;
    align-items: center;
}

.claim-detail .detail-row:nth-child(4)::after {
    content: "";
}

/* Proof image */
.claim-detail .proof-images {
    margin-top: 5px;
}

.claim-detail .proof-images img {
    display: block;
    max-width: 300px !important;
    max-height: 250px !important;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 5px;
    background: #fafafa;
    transition: 0.3s ease;
}

.claim-detail .proof-images img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(69, 32, 140, 0.15);
}

/* Back button */
.profile-container .card:has(.claim-detail) .small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 25px;
    padding: 11px 22px;

    background: #6F42C1;
    color: #ffffff;

    border-radius: 10px;
    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition: all 0.3s ease;
}

.profile-container .card:has(.claim-detail) .small-btn:hover {
    background: #45208C;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(69, 32, 140, 0.20);
}
