/* =========================
   PROFILE MAIN
========================= */

.profile-main {
    min-height: 77vh;
    background: #f5f5f5;
    padding: 40px 0;
}


/* =========================
   LOADING / ERROR
========================= */

.profile-loading,
.profile-error {
    text-align: center;
    padding: 80px 20px;
    color: #6B5A42;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.profile-loading i {
    font-size: 22px;
    color: #F59E0B;
}

.profile-error {
    color: #dc2626;
}

.profile-error i {
    font-size: 22px;
}


/* =========================
   PROFILE HEADER
========================= */

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 25px 30px;
    background: #FFFFFF;
    border-radius: 10px;
    border: 1px solid #E8D8B8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.profile-avatar {
    width: 70px;
    height: 70px;
    background: #FFC83D;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar i {
    font-size: 30px;
    color: #FFFFFF;
}

.profile-header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-header-info .profile-fullname {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #3A2A16;
}

.profile-badge {
    display: inline-block;
    padding: 3px 12px;
    background: #FFF8E7;
    border: 1px solid #F59E0B;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #D97706;
}


/* =========================
   PROFILE CARD
========================= */

.profile-card {
    background: #FFFFFF;
    border-radius: 10px;
    border: 1px solid #E8D8B8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 25px 30px;
    margin-bottom: 20px;
}

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #E8D8B8;
}

.profile-card-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #3A2A16;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-card-header h2 i {
    color: #F59E0B;
}


/* =========================
   EDIT BUTTON
========================= */

.profile-edit-btn {
    padding: 7px 16px;
    border: 1px solid #F59E0B;
    border-radius: 4px;
    background: #FFFFFF;
    color: #D97706;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.profile-edit-btn:hover {
    background: #F59E0B;
    color: #FFFFFF;
}


/* =========================
   INFO GRID
========================= */

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-info-label {
    font-size: 12px;
    font-weight: 600;
    color: #9A8A72;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-info-label i {
    color: #F59E0B;
    width: 14px;
}

.profile-info-value {
    font-size: 15px;
    color: #3A2A16;
    font-weight: 500;
    word-break: break-word;
}


/* =========================
   EDIT FORM
========================= */

.profile-edit-form {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #E8D8B8;
}

.edit-form-title {
    margin-bottom: 18px;
}

.edit-form-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #3A2A16;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-form-title h3 i {
    color: #F59E0B;
}

.edit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.edit-form-full {
    grid-column: 1 / -1;
}

.edit-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #6B5A42;
}

.required {
    color: #dc2626;
}

.edit-form-group input,
.edit-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E8D8B8;
    border-radius: 4px;
    background: #FFFFFF;
    box-sizing: border-box;
    color: #3A2A16;
    font-size: 14px;
    font-family: sans-serif;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.edit-form-group input::placeholder,
.edit-form-group textarea::placeholder {
    color: #9A8A72;
}

.edit-form-group input:focus,
.edit-form-group textarea:focus {
    outline: none;
    border-color: #F59E0B;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.12);
}

.edit-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.edit-error {
    margin-bottom: 10px;
    color: #dc2626;
    font-size: 13px;
}

.edit-success {
    margin-bottom: 10px;
    color: #16a34a;
    font-size: 13px;
    font-weight: 600;
}

.edit-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 5px;
}

.profile-save-btn {
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: 4px;
    background: #F59E0B;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
    transition:
        background 0.2s ease,
        transform 0.1s ease;
}

.profile-save-btn:hover {
    background: #D97706;
}

.profile-save-btn:active {
    transform: scale(0.99);
}

.profile-save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.profile-cancel-btn {
    height: 40px;
    padding: 0 18px;
    border: 1px solid #E8D8B8;
    border-radius: 4px;
    background: #FFFFFF;
    color: #6B5A42;
    font-size: 14px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.profile-cancel-btn:hover {
    background: #FFF8E7;
    border-color: #D97706;
}


/* =========================
   LOGOUT SECTION
========================= */

.profile-logout-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
    gap: 12px;
}

.profile-admin-btn {
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: 4px;
    background: #2563eb;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.profile-admin-btn:hover {
    background: #1d4ed8;
}

.profile-admin-btn:active {
    transform: scale(0.99);
}

.profile-logout-btn {
    height: 40px;
    padding: 0 20px;
    border: 1px solid #E8D8B8;
    border-radius: 4px;
    background: #FFFFFF;
    color: #dc2626;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.profile-logout-btn:hover {
    background: #fee2e2;
    border-color: #dc2626;
}


/* =========================
   RESPONSIVE - TABLET
========================= */

@media (max-width: 768px) {

    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    .edit-form-grid {
        grid-template-columns: 1fr;
    }

    .edit-form-full {
        grid-column: auto;
    }

    .profile-card {
        padding: 20px 18px;
    }

    .profile-header {
        padding: 20px 18px;
    }

}


/* =========================
   RESPONSIVE - MOBILE
========================= */

@media (max-width: 480px) {

    .profile-main {
        padding: 20px 0;
    }

    .profile-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .edit-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-save-btn,
    .profile-cancel-btn {
        justify-content: center;
        width: 100%;
    }

    .profile-logout-section {
        justify-content: stretch;
        flex-direction: column;
    }

    .profile-admin-btn,
    .profile-logout-btn {
        width: 100%;
        justify-content: center;
    }

}
