/* File: public/style-profile.css */

/* --- THIẾT LẬP CHUNG --- */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    color: #333;
}

/* --- BANNER (Đồng bộ với các trang khác) --- */
.banner {
    display: flex;
    align-items: center;
    background-color: #005a9e;
    color: white;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.logo { height: 70px; margin-right: 20px; }
.banner-text { flex: 1; }
.banner-text h1 { font-size: 20px; color: white; font-weight: bold; margin: 0; text-transform: uppercase; text-align: center; }
.banner-subtitle { font-size: 32px; color: red; font-weight: bold; margin: 5px 0 0 0; text-transform: uppercase; text-align: center; }

/* --- THANH NGƯỜI DÙNG (Đồng bộ với các trang khác) --- */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 10px 30px;
    border-bottom: 1px solid #ddd;
}
.user-details p { margin: 3px 10px 3px 0; font-size: 14px; }

/* --- NÚT QUAY LẠI & AVATAR --- */
.navigation-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.back-to-dashboard-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 15px;
    border-radius: 5px;
    color: #343a40;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}
.back-to-dashboard-btn:hover {
    background-color: #e9ecef;
    color: #000;
}
.back-to-dashboard-btn span {
    font-size: 20px;
    line-height: 1;
}
.user-profile {
    position: relative;
}
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
    object-fit: cover;
}
.profile-dropdown {
    display: none; 
    position: absolute;
    top: 55px; 
    right: 0; 
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 250px;
    z-index: 100;
    border: 1px solid #eee;
}
.profile-dropdown.show {
    display: block;
}
.profile-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
}
.profile-dropdown a:hover {
    background-color: #f8f9fa;
}
.dropdown-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.dropdown-header strong { display: block; font-size: 16px; }
.dropdown-header span { font-size: 13px; color: #666; }


/* --- NỘI DUNG CHÍNH CỦA TRANG PROFILE --- */
.main-content {
    padding: 40px;
    display: flex;
    justify-content: center;
}

.profile-wrapper {
    display: flex;
    flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
    gap: 40px;
    width: 100%;
    max-width: 1000px;
}

.profile-form-container {
    flex: 1; /* Chia đều không gian */
    min-width: 300px; /* Độ rộng tối thiểu trước khi xuống dòng */
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.profile-form-container h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #005a9e;
    text-align: center;
    font-size: 22px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box; /* Quan trọng để padding không làm thay đổi width */
}

.form-group input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.form-group input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.btn {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn:hover {
    background-color: #0056b3;
}

.feedback {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    display: none; /* Ẩn mặc định */
}

.feedback.success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.feedback.error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }
    .profile-wrapper {
        flex-direction: column; /* Chuyển thành 1 cột trên điện thoại */
        gap: 20px;
    }
}