/* Pixel3DLab account dock, profile security forms and live chat feedback. */
.pxh-account-dock {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10040;
    width: min(360px, calc(100vw - 28px));
    color: var(--text-main, #233247);
    border: 1px solid var(--pl-line, rgba(100,116,139,.18));
    border-radius: 16px;
    background: var(--pl-glass-strong, rgba(255,255,255,.90));
    box-shadow: 0 8px 24px rgba(15,23,42,.11);
    -webkit-backdrop-filter: blur(22px) saturate(125%);
    backdrop-filter: blur(22px) saturate(125%);
}
.pxh-account-dock-trigger {
    display: grid;
    width: 100%;
    grid-template-columns: 38px minmax(0,1fr) auto 18px;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 0;
    border-radius: inherit;
    color: inherit;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.pxh-account-dock-trigger:focus-visible,
.pxh-account-dock-links a:focus-visible {
    outline: 3px solid #2496e8;
    outline-offset: 3px;
}
.pxh-account-dock-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(140deg, #168df2, #0757bc);
    box-shadow: none;
}
.pxh-account-dock-identity { min-width: 0; display: grid; gap: 2px; }
.pxh-account-dock-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.25; }
.pxh-account-dock-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted, #65758b); font-size: 10px; }
.pxh-account-dock-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    max-width: 118px;
    padding: 4px 8px;
    border: 1px solid var(--pl-line, rgba(100,116,139,.18));
    border-radius: 999px;
    color: var(--text-muted, #65758b);
    background: rgba(100,116,139,.06);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}
.pxh-account-dock.has-unread .pxh-account-dock-unread {
    background: #eaf3ff;
    border-color: #a9cdf5;
    color: #1457a6;
}
[data-theme="dark"] .pxh-account-dock.has-unread .pxh-account-dock-unread {
    background: rgba(41,128,219,.22);
    border-color: rgba(89,166,247,.36);
    color: #bfddff;
}
.pxh-account-dock-trigger > svg { width: 16px; height: 16px; color: var(--text-muted, #65758b); transition: transform .18s ease; }
.pxh-account-dock.is-open .pxh-account-dock-trigger > svg { transform: rotate(180deg); }
.pxh-account-dock-links {
    display: grid;
    gap: 3px;
    padding: 7px;
    border-top: 1px solid var(--pl-line, rgba(100,116,139,.18));
}
.pxh-account-dock-links[hidden] { display: none !important; }
.pxh-account-dock-links a {
    min-width: 0;
    display: grid;
    grid-template-columns: 19px minmax(0,1fr) auto;
    gap: 9px;
    align-items: center;
    padding: 10px 11px;
    border-radius: 10px;
    color: var(--text-main, #233247);
    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
}
.pxh-account-dock-links a:hover { background: rgba(62,160,255,.09); }
.pxh-account-dock-links a > svg { width: 17px; height: 17px; color: var(--pl-accent, #3ea0ff); }
.pxh-account-dock-links a b {
    min-width: 22px;
    padding: 3px 6px;
    border-radius: 999px;
    background: #e7edf5;
    color: #52657b;
    text-align: center;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}
.pxh-account-dock-links a b.is-unread { background: #df3347; color: white; }
[data-theme="dark"] .pxh-account-dock-links a b { background: #334155; color: #dce7f4; }
[data-theme="dark"] .pxh-account-dock-links a b.is-unread { background: #d9364e; color: #fff; }

.pxh-live-feedback {
    min-height: 16px;
    margin: 6px 3px 0;
    color: var(--text-muted, #64748b);
    font-size: 12px;
}
.pxh-live-feedback.is-error { color: #c62839; }
.pxh-live-feedback.is-success { color: #18794e; }
.pxh-live-sending { opacity: .72; }
.pxh-live-sending button[type="submit"] { cursor: wait; }
.pxh-live-new-message { animation: pxh-live-message-in .24s ease-out both; }
@keyframes pxh-live-message-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

body.pxh-has-account-dock { padding-bottom: 86px; }
@media (max-width: 620px) {
    .pxh-account-dock { right: 10px; bottom: 10px; width: min(370px, calc(100vw - 20px)); border-radius: 14px; }
    .pxh-account-dock-trigger { grid-template-columns: 34px minmax(0,1fr) auto 16px; gap: 8px; padding: 9px 10px; }
    .pxh-account-dock-avatar { width: 34px; height: 34px; border-radius: 10px; }
    .pxh-account-dock-unread { max-width: 102px; font-size: 9px; }
    body.pxh-has-account-dock { padding-bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) {
    .pxh-account-dock-trigger > svg, .pxh-live-new-message { transition: none; animation: none; }
}
body.a11y-no-animations .pxh-account-dock-trigger > svg,
body.a11y-no-animations .pxh-live-new-message { transition: none !important; animation: none !important; }

/* ------------------------------------------------------------
   Chat/Order polish: distinct conversation types, grouped orders,
   and restrained shadows (no neon/glow buttons).
   ------------------------------------------------------------ */
body.pxh-inner-page .pxh-button,
body.pxh-inner-page .btn,
body.pxh-inner-page .nav-btn {
    box-shadow: 0 2px 6px rgba(15, 23, 42, .075) !important;
    text-shadow: none !important;
    filter: none !important;
}
body.pxh-inner-page .pxh-button:hover,
body.pxh-inner-page .btn:hover,
body.pxh-inner-page .nav-btn:hover {
    box-shadow: 0 3px 9px rgba(15, 23, 42, .10) !important;
}
body.pxh-inner-page .pxh-button-primary {
    box-shadow: 0 2px 6px rgba(15, 23, 42, .10) !important;
}
body.pxh-inner-page .pxh-button-primary:hover {
    box-shadow: 0 3px 9px rgba(15, 23, 42, .12) !important;
}

.pxh-chat-page-heading { align-items: flex-start; }
.pxh-chat-type-label {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin: 0 0 12px;
    padding: 8px 11px;
    border: 1px solid var(--border-color, rgba(100,116,139,.2));
    border-radius: 10px;
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: .11em;
    font-weight: 800;
}
.pxh-chat-type-label svg { width: 16px; height: 16px; }
.pxh-chat-type-label small {
    flex-basis: 100%;
    margin-left: 24px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-muted);
}
.pxh-chat-type-label.is-order {
    color: #98530a;
    border-color: rgba(217,119,6,.28);
    background: rgba(245,158,11,.10);
}
.pxh-chat-type-label.is-private {
    color: #1f66ad;
    border-color: rgba(39,133,238,.26);
    background: rgba(39,133,238,.085);
}
[data-theme="dark"] .pxh-chat-type-label.is-order { color: #ffd18b; background: rgba(245,158,11,.13); }
[data-theme="dark"] .pxh-chat-type-label.is-private { color: #a8d4ff; background: rgba(39,133,238,.13); }
.pxh-conversation-card {
    min-width: 0;
    border-top: 3px solid rgba(100,116,139,.28) !important;
    box-shadow: 0 3px 12px rgba(15,23,42,.045) !important;
}
.pxh-conversation-order { border-top-color: #e8a23b !important; }
.pxh-conversation-private { border-top-color: #4c9bea !important; }
.pxh-conversation-order .pxh-ticket-message:not(.is-admin) { border-color: rgba(217,119,6,.18); }
.pxh-conversation-private .pxh-ticket-message:not(.is-admin) { border-color: rgba(39,133,238,.16); }
.pxh-conversation-order .pxh-ticket-message.is-admin { background: rgba(245,158,11,.085); border-color: rgba(217,119,6,.20); }
.pxh-conversation-private .pxh-ticket-message.is-admin { background: rgba(39,133,238,.085); border-color: rgba(39,133,238,.18); }

.pxh-order-status-sections { display: grid; gap: 22px; width: 100%; min-width: 0; }
.pxh-order-status-group {
    width: 100%;
    min-width: 0;
    padding: clamp(13px, 2vw, 20px);
    border: 1px solid var(--border-color, rgba(100,116,139,.2));
    border-left: 4px solid #3288df;
    border-radius: 16px;
    background: var(--pl-glass, rgba(255,255,255,.50));
    box-shadow: 0 3px 12px rgba(15,23,42,.035);
}
.pxh-order-status-group.is-progress { border-left-color: #e7a23a; }
.pxh-order-status-group.is-done { border-left-color: #30a66a; }
.pxh-order-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--border-color, rgba(100,116,139,.2));
}
.pxh-order-group-title { display: flex; min-width: 0; align-items: center; gap: 12px; }
.pxh-order-group-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(39,133,238,.22);
    border-radius: 12px;
    background: rgba(39,133,238,.10);
    color: #2879c9;
}
.pxh-order-status-group.is-progress .pxh-order-group-icon { background: rgba(245,158,11,.12); border-color: rgba(217,119,6,.22); color: #b86a08; }
.pxh-order-status-group.is-done .pxh-order-group-icon { background: rgba(22,163,74,.11); border-color: rgba(22,163,74,.22); color: #16834a; }
.pxh-order-group-icon svg { width: 20px; height: 20px; }
.pxh-order-group-heading h2 { margin: 0 0 3px; font-size: 18px; line-height: 1.25; }
.pxh-order-group-heading p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.pxh-order-group-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid var(--border-color, rgba(100,116,139,.2));
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}
.pxh-order-status-sections .pxh-order-grid { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pxh-order-status-sections .pxh-order-card { box-shadow: 0 2px 8px rgba(15,23,42,.04) !important; }
.pxh-order-status-sections .pxh-order-card:hover { box-shadow: 0 4px 12px rgba(15,23,42,.075) !important; }
[data-theme="dark"] .pxh-order-status-group { background: rgba(15,23,42,.57); box-shadow: 0 3px 12px rgba(0,0,0,.13); }
[data-theme="dark"] .pxh-conversation-card { box-shadow: 0 3px 12px rgba(0,0,0,.15) !important; }

@media (max-width: 760px) {
    .pxh-order-status-sections .pxh-order-grid { grid-template-columns: minmax(0, 1fr); }
    .pxh-order-group-heading { align-items: flex-start; }
    .pxh-order-group-count { margin-top: 3px; }
    .pxh-chat-type-label { max-width: 100%; }
}
@media (max-width: 480px) {
    .pxh-order-group-heading { flex-direction: column; gap: 10px; }
    .pxh-order-group-count { margin-left: 54px; }
    .pxh-chat-layout { grid-template-columns: minmax(0, 1fr) !important; }
}

/* The full-width order creator belongs above the grouped status columns. */
body.pxh-inner-page .pxh-admin-order-create {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 22px !important;
}

/* ------------------------------------------------------------
   Login links, profile avatars, account upgrade and admin online list
   ------------------------------------------------------------ */
.pxh-inner-page .pxh-form-note {
    margin: 12px 0 0;
    font-size: 13px;
}
.pxh-inner-page .pxh-form-note a {
    color: var(--pl-accent, #237fce) !important;
    font-weight: 750;
    text-decoration: underline !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(35,127,206,.48) !important;
    transition: color .16s ease, text-decoration-color .16s ease;
}
.pxh-inner-page .pxh-form-note a:hover {
    color: #145b9e !important;
    text-decoration-color: currentColor !important;
}
[data-theme="dark"] .pxh-inner-page .pxh-form-note a { color: #8bc8ff !important; }
[data-theme="dark"] .pxh-inner-page .pxh-form-note a:hover { color: #c1e3ff !important; }

.pxh-account-dock-avatar { overflow: hidden; }
.pxh-account-dock-avatar img,
.pxh-chat-avatar img,
.pxh-online-avatar img,
.pxh-profile-avatar-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.pxh-chat-avatar { overflow: hidden; }
.pxh-online-members {
    min-width: 0;
    margin: 2px 0 5px;
    padding: 11px;
    border: 1px solid var(--pl-line, rgba(100,116,139,.18));
    border-radius: 12px;
    background: var(--pl-glass, rgba(100,116,139,.045));
}
.pxh-online-members-heading,
.pxh-online-members-heading > div {
    display: flex;
    align-items: center;
}
.pxh-online-members-heading { justify-content: space-between; gap: 10px; }
.pxh-online-members-heading > div { gap: 8px; min-width: 0; }
.pxh-online-members-heading svg { width: 17px; height: 17px; color: var(--pl-accent, #3ea0ff); }
.pxh-online-members-heading strong { font-size: 12px; }
.pxh-online-count {
    flex: 0 0 auto;
    padding: 3px 7px;
    border: 1px solid rgba(34,160,96,.22);
    border-radius: 999px;
    color: #147c49;
    background: rgba(34,160,96,.09);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
[data-theme="dark"] .pxh-online-count { color: #9de7bf; background: rgba(34,160,96,.14); }
.pxh-online-caption { margin: 5px 0 8px; color: var(--text-muted, #65758b); font-size: 10px; line-height: 1.45; }
.pxh-online-list { display: grid; gap: 2px; max-height: 162px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.pxh-online-user { display: grid; grid-template-columns: 29px minmax(0,1fr) 8px; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 8px; }
.pxh-online-user:hover { background: rgba(100,116,139,.07); }
.pxh-online-avatar { display: grid; place-items: center; width: 29px; height: 29px; overflow: hidden; border-radius: 9px; color: #fff; background: linear-gradient(135deg, #2388db, #1553a3); font-size: 11px; font-weight: 800; }
.pxh-online-user-meta { display: grid; gap: 2px; min-width: 0; }
.pxh-online-user-meta strong { overflow: hidden; color: var(--text-main, #233247); font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.pxh-online-user-meta small { color: var(--text-muted, #65758b); font-size: 10px; }
.pxh-online-dot { width: 7px; height: 7px; border-radius: 50%; background: #24a568; box-shadow: 0 0 0 3px rgba(36,165,104,.10); }
.pxh-online-placeholder { padding: 10px 4px; color: var(--text-muted, #65758b); font-size: 11px; line-height: 1.45; }

.pxh-profile-avatar-row { display: flex; align-items: flex-start; gap: 18px; margin: 22px 0; padding: 16px; border: 1px solid var(--border-color, rgba(100,116,139,.2)); border-radius: 14px; background: var(--pl-glass, rgba(255,255,255,.38)); }
.pxh-profile-avatar-preview { display: grid; place-items: center; flex: 0 0 92px; width: 92px; height: 92px; overflow: hidden; border: 1px solid var(--border-color, rgba(100,116,139,.2)); border-radius: 24px; background: rgba(35,127,206,.12); color: var(--pl-accent, #237fce); font-size: 34px; font-weight: 850; }
.pxh-profile-avatar-copy { min-width: 0; flex: 1; }
.pxh-profile-avatar-copy > strong { display: block; margin: 2px 0 4px; font-size: 15px; }
.pxh-profile-avatar-copy > p { margin: 0 0 10px; font-size: 12px; }
.pxh-avatar-upload-form { margin: 0 !important; }
.pxh-avatar-upload-form .form-group { margin: 0 0 12px !important; }
.pxh-avatar-upload-form input[type="file"] { padding: 9px !important; font-size: 12px !important; }
.pxh-avatar-upload-form small { display: block; margin-top: 5px; color: var(--text-muted, #65758b); line-height: 1.45; }
.pxh-profile-avatar-copy .pxh-button { max-width: 100%; }

.pxh-upgrade-card { border-color: rgba(39,133,238,.24) !important; background: linear-gradient(135deg, rgba(39,133,238,.055), transparent 70%), var(--card-bg, #fff) !important; }
.pxh-upgrade-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 10px; }
.pxh-upgrade-heading h2 { margin: 4px 0 0; font-size: 22px; }
.pxh-upgrade-icon,
.pxh-forum-lock-icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid rgba(39,133,238,.22); border-radius: 13px; background: rgba(39,133,238,.10); color: var(--pl-accent, #237fce); }
.pxh-upgrade-icon svg { width: 22px; height: 22px; }
.pxh-upgrade-card > p { margin: 8px 0 14px; color: var(--text-muted, #65758b); line-height: 1.65; }
.pxh-upgrade-info { display: flex; align-items: flex-start; gap: 9px; margin: 12px 0 16px; padding: 12px 13px; border: 1px solid rgba(39,133,238,.18); border-radius: 11px; background: rgba(39,133,238,.07); color: var(--text-main, #233247); font-size: 12px; line-height: 1.55; }
.pxh-upgrade-info svg { flex: 0 0 17px; width: 17px; height: 17px; margin-top: 1px; color: var(--pl-accent, #237fce); }
.pxh-upgrade-form { margin-top: 0 !important; }
.pxh-forum-upgrade-notice { text-align: left; }
.pxh-forum-upgrade-notice .pxh-forum-lock-icon { margin-bottom: 15px; }
.pxh-forum-upgrade-notice h1 { margin-top: 7px; }
.pxh-forum-upgrade-notice > .pxh-button { margin-top: 4px; }
[data-theme="dark"] .pxh-upgrade-card { background: linear-gradient(135deg, rgba(39,133,238,.10), transparent 70%), var(--card-bg, #151d2a) !important; }
[data-theme="dark"] .pxh-upgrade-info { background: rgba(39,133,238,.13); border-color: rgba(80,160,240,.24); }

@media (max-width: 620px) {
    .pxh-profile-avatar-row { gap: 12px; padding: 12px; }
    .pxh-profile-avatar-preview { flex-basis: 68px; width: 68px; height: 68px; border-radius: 18px; font-size: 27px; }
    .pxh-profile-avatar-copy > strong { font-size: 14px; }
    .pxh-online-members { padding: 9px; }
    .pxh-online-list { max-height: 132px; }
    .pxh-upgrade-heading h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    .pxh-inner-page .pxh-form-note a { transition: none; }
}

/* Keep links in all account forms readable, including password-reset fallbacks. */
.pxh-inner-page .pxh-form-card a:not(.pxh-button) {
    color: var(--pl-accent, #237fce);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.pxh-inner-page .pxh-form-card a:not(.pxh-button):hover { text-decoration-thickness: 2px; }
[data-theme="dark"] .pxh-inner-page .pxh-form-card a:not(.pxh-button) { color: #8bc8ff; }


/* Uploaded avatars in the admin member overview. */
.pxh-member-admin-identity { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.pxh-member-admin-identity > span:last-child { display: grid; gap: 3px; min-width: 0; }
.pxh-member-admin-identity strong { overflow-wrap: anywhere; }
.pxh-member-admin-identity small { display: block; color: var(--text-muted, #65758b); overflow-wrap: anywhere; }
.pxh-member-admin-avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; overflow: hidden; border-radius: 10px; background: rgba(35,127,206,.12); color: var(--pl-accent, #237fce); font-size: 13px; font-weight: 800; }
.pxh-member-admin-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }


/* v4 hotfix: lock uploaded avatar images to their intended frame. */
#pxh-account-dock .pxh-account-dock-trigger .pxh-account-dock-avatar {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    line-height: 0 !important;
}
#pxh-account-dock .pxh-account-dock-trigger .pxh-account-dock-avatar > img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
}
@media (max-width: 620px) {
    #pxh-account-dock .pxh-account-dock-trigger .pxh-account-dock-avatar {
        flex-basis: 34px !important;
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
    }
}

/* Forum profile and post avatars display uploaded images inside the existing frame. */
.forum-avatar.has-image { display: grid !important; place-items: center; overflow: hidden !important; padding: 0 !important; box-sizing: border-box !important; }
.forum-avatar.has-image > img { display: block !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important; height: 100% !important; min-height: 0 !important; max-height: 100% !important; object-fit: cover !important; object-position: center !important; border-radius: inherit !important; margin: 0 !important; }
