/* ========================================
   PROFILE PAGE
======================================== */

.profile-page {
    padding: 60px 20px 80px;
    background: #f8fafc;
    min-height: calc(100vh - 80px);
}

.profile-header {
    margin-bottom: 35px;
}

.profile-header .section-label,
.card-heading .section-label {
    display: inline-block;
    margin-bottom: 8px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.profile-header h1 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 36px;
}

.profile-header p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}


/* PROFILE GRID */

.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    align-items: start;
}

.profile-card {
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
}


/* PROFILE SUMMARY */

.profile-summary {
    text-align: center;
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #eff6ff;
    font-size: 42px;
}

.profile-summary h2 {
    margin: 0 0 7px;
    color: #0f172a;
    font-size: 21px;
}

.profile-summary p {
    margin: 0 0 15px;
    color: #64748b;
    font-size: 14px;
    word-break: break-word;
}

.profile-role {
    display: inline-flex;
    padding: 6px 13px;
    border-radius: 20px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}


/* CARD HEADING */

.card-heading {
    margin-bottom: 25px;
}

.card-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
}


/* FORM */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* ACTIONS */

.profile-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
}

.profile-save-btn {
    min-height: 44px;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.profile-save-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}


/* ACCOUNT INFORMATION */

.account-info {
    grid-column: 2;
}

.account-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.account-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}

.account-info-item:last-child {
    border-bottom: none;
}

.account-info-item span {
    color: #64748b;
    font-size: 14px;
}

.account-info-item strong {
    color: #0f172a;
    font-size: 14px;
    text-align: right;
    word-break: break-word;
}


/* LOGOUT */

.logout-link {
    cursor: pointer;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 800px) {

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .account-info {
        grid-column: auto;
    }

    .profile-summary {
        max-width: none;
    }

}


@media (max-width: 600px) {

    .profile-page {
        padding: 40px 15px 60px;
    }

    .profile-header h1 {
        font-size: 30px;
    }

    .profile-card {
        padding: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .profile-actions {
        justify-content: stretch;
    }

    .profile-save-btn {
        width: 100%;
    }

    .account-info-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .account-info-item strong {
        text-align: left;
    }

}

/* =========================================
   PROFILE ROLE BADGE
   ========================================= */

.profile-role,
.profile-card .profile-role,
#profileRole {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 7px 16px !important;
    min-width: 80px !important;
    min-height: 34px !important;
    box-sizing: border-box !important;

    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 999px !important;

    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0.2px !important;
}

/* Dark Mode */
body.dark-mode .profile-role,
body.dark-mode .profile-card .profile-role,
body.dark-mode #profileRole {
    background: #1e3a8a !important;
    color: #bfdbfe !important;
    border-color: #3b82f6 !important;
}