/* Account page */

.account-page {
    max-width: 1080px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.account-shell {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.account-shell-header {
    padding: 18px 28px 14px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
}

.account-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.15s ease;
}

.account-back-link:hover {
    color: var(--dv-primary);
}

.account-page-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    line-height: 1.2;
}

.account-page-sub {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 13px;
}

/* 2 cột ngang */
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.account-block {
    padding: 22px 28px 26px;
    min-width: 0;
}

.account-block + .account-block {
    border-left: 1px solid #eef2f7;
}

.account-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 16px;
}

.account-section-title i {
    font-size: 16px;
    color: var(--dv-primary);
}

/* Profile: avatar trái, form phải */
.account-profile-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.account-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    width: 120px;
}

.account-avatar-preview {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    max-width: 72px;
    max-height: 72px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.account-avatar-preview img,
#accountAvatarImg {
    width: 100% !important;
    height: 100% !important;
    max-width: 72px !important;
    max-height: 72px !important;
    object-fit: cover !important;
    display: block;
}

.account-avatar-fallback {
    font-size: 28px;
    color: #94a3b8;
    line-height: 1;
}

.account-avatar-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.account-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dv-primary);
    background: #f0f4ff;
    border: 1px solid #dbe4f5;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    margin-bottom: 4px;
    white-space: nowrap;
}

.account-avatar-btn:hover {
    background: #e8eeff;
    border-color: #c5d0e6;
}

.account-avatar-hint {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.3;
}

.account-profile-fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-password-form {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.account-password-form .account-field + .account-field {
    margin-top: 12px;
}

/* Fields */
.account-field {
    margin-bottom: 0;
}

.account-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
}

.account-field-note {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
}

.account-shell .form-control {
    height: 42px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fafbfc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.account-shell .form-control:focus {
    background: #fff;
    border-color: #335793;
    box-shadow: 0 0 0 3px rgba(51, 87, 147, 0.1);
}

.account-hint {
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.account-hint i {
    color: var(--dv-primary);
    flex-shrink: 0;
    margin-top: 1px;
}

/* Actions */
.account-actions {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.account-actions-bottom {
    margin-top: auto;
}

.account-btn {
    min-height: 42px;
    min-width: 140px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    padding: 0 20px;
    background: var(--dv-primary) !important;
    border-color: var(--dv-primary) !important;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.account-btn:hover,
.account-btn:focus {
    background: var(--dv-primary-bright) !important;
    border-color: var(--dv-primary-bright) !important;
    transform: none;
    box-shadow: none;
}

.account-shell .alert {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.account-shell .invalid-feedback.ajax-error {
    font-size: 12px;
}

.page-my-listings .main-layout,
.page-account .main-layout {
    padding-left: 16px;
    padding-right: 16px;
}

@media (max-width: 991px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-block + .account-block {
        border-left: none;
        border-top: 1px solid #eef2f7;
    }
}

@media (max-width: 575px) {
    .account-page {
        padding: 12px 12px 20px !important;
    }

    .account-shell-header,
    .account-block {
        padding-left: 16px;
        padding-right: 16px;
    }

    .account-profile-layout {
        flex-direction: column;
        align-items: center;
    }

    .account-avatar-block {
        width: 100%;
    }

    .account-profile-fields {
        width: 100%;
    }

    .account-btn {
        width: 100%;
    }
}
