/* ========================================================
   CSS Modul: Trang Cá Nhân & Popup Đổi Mật Khẩu
   Màu chủ đạo: #305669
   Vị trí: wwwroot/assets/css/1_modul/trangcanhan.css
   ======================================================== */

:root {
    --theme-main: #305669;
    --theme-dark: #223f4e;
    --theme-light: #46738c;
    --theme-bg-subtle: #edf4f7;
    --theme-border-subtle: #cbdce4;
}

/* ========================================================
   1. POPUP ĐỔI MẬT KHẨU
   ======================================================== */
.popup-doi-mat-khau-custom.e-dialog {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(48, 86, 105, 0.22);
    border: none;
}

.popup-doi-mat-khau-custom .e-dlg-header-content {
    background: linear-gradient(135deg, #223f4e 0%, #305669 100%) !important;
    padding: 16px 20px !important;
    border-bottom: none !important;
}

.popup-doi-mat-khau-custom .e-dlg-header-content .e-btn.e-dlg-closeicon-btn {
    color: #ffffff !important;
    opacity: 0.85;
}

.popup-doi-mat-khau-custom .e-dlg-header-content .e-btn.e-dlg-closeicon-btn:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    opacity: 1;
}

.popup-dmk-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.popup-dmk-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.popup-dmk-title {
    color: #ffffff;
    line-height: 1.3;
}

.popup-dmk-title span {
    font-size: 1.15rem;
}

.popup-dmk-body {
    padding: 18px 20px 10px 20px;
}

.alert-box-dmk {
    background-color: #edf4f7;
    border-left: 4px solid #305669;
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    color: #223f4e;
    font-size: 0.85rem;
    line-height: 1.45;
}

.alert-box-dmk i {
    color: #305669;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.form-control-dmk:focus {
    border-color: #305669 !important;
    box-shadow: 0 0 0 0.2rem rgba(48, 86, 105, 0.2) !important;
}

.btn-outline-dmk {
    border-color: #cbd5e1;
    color: #64748b;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.btn-outline-dmk:hover {
    background-color: #edf4f7;
    color: #305669;
    border-color: #305669;
}

.popup-dmk-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px 16px 20px;
}

.btn-theme-primary {
    background-color: #305669 !important;
    border-color: #305669 !important;
    color: #ffffff !important;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(48, 86, 105, 0.25);
}

.btn-theme-primary:hover {
    background-color: #223f4e !important;
    border-color: #223f4e !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(48, 86, 105, 0.35);
}

/* ========================================================
   2. TRANG CÁ NHÂN (PROFILE UI)
   ======================================================== */
.profile-wrapper {
    background-color: #f8fafc;
    min-height: 100%;
}

.profile-hero-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    margin-bottom: 24px;
}

/* Banner gradient với màu chủ đạo #305669 */
.profile-hero-banner {
    height: 160px;
    background: linear-gradient(135deg, #1f3946 0%, #305669 60%, #4a758c 100%);
    position: relative;
}

.profile-hero-banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 50%);
    pointer-events: none;
}

.profile-hero-body {
    padding: 0 28px 24px 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

.profile-hero-info-group {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-top: -65px;
}

.profile-avatar-container {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    background-color: #ffffff;
    transition: transform 0.25s ease;
}

.profile-avatar-img:hover {
    transform: scale(1.02);
}

.profile-avatar-btn-edit {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #305669;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #ffffff;
}

.profile-avatar-btn-edit:hover {
    background: #223f4e;
    transform: scale(1.1);
}

.profile-avatar-btn-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #ffffff;
}

.profile-avatar-btn-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.profile-hero-text {
    padding-bottom: 6px;
}

.profile-user-name {
    font-size: 1.55rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.825rem;
    font-weight: 500;
}

.profile-badge-primary {
    background-color: #edf4f7;
    color: #305669;
}

.profile-badge-success {
    background-color: #dcfce7;
    color: #16a34a;
}

.profile-badge-warning {
    background-color: #fef3c7;
    color: #b45309;
}

.profile-hero-actions {
    display: flex;
    gap: 10px;
    padding-bottom: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-modern-primary {
    background-color: #305669;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(48, 86, 105, 0.25);
}

.btn-modern-primary:hover {
    background-color: #223f4e;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(48, 86, 105, 0.35);
}

.btn-modern-theme-outline {
    background-color: #ffffff;
    border-color: #305669;
    color: #305669;
}

.btn-modern-theme-outline:hover {
    background-color: #edf4f7;
    color: #223f4e;
}

/* Tabs Navigation */
.profile-nav-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    gap: 12px;
    margin-bottom: 24px;
    padding-left: 6px;
}

.profile-nav-item {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
}

.profile-nav-item:hover {
    color: #305669;
}

.profile-nav-item.active {
    color: #305669;
    border-bottom-color: #305669;
}

/* Card Section */
.profile-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    overflow: hidden;
}

.profile-card-header {
    padding: 16px 22px;
    border-bottom: 1px solid #f1f5f9;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-card-title i {
    color: #305669;
    font-size: 1.2rem;
}

.profile-card-body {
    padding: 22px;
}

.profile-form-group {
    margin-bottom: 18px;
}

.profile-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.profile-readonly-field {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 12px;
    color: #334155;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Security Section */
.security-alert-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.security-box-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
}

.qr-code-wrapper {
    background: #ffffff;
    padding: 16px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    display: inline-block;
    border: 1px solid #e2e8f0;
}

.qr-code-wrapper img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

.secret-key-badge {
    background: #edf4f7;
    border: 1px dashed #305669;
    border-radius: 8px;
    padding: 10px 16px;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #223f4e;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Signature Section */
.signature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.signature-box-preview {
    height: 220px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background-color: #fbfcfe;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 14px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.signature-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.signature-placeholder {
    text-align: center;
    color: #94a3b8;
}

.signature-placeholder i {
    font-size: 3rem;
    margin-bottom: 8px;
    display: block;
}

.signature-uploader-wrapper .e-upload {
    border: none !important;
}

.signature-uploader-wrapper .e-file-select-wrap {
    padding: 0 !important;
}

.signature-uploader-wrapper .e-file-drop,
.signature-uploader-wrapper .e-upload-files {
    display: none !important;
}
