.login-footer {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
    padding: 8px 16px 12px;
    font-size: var(--ax-fs-14);
    font-weight: var(--ax-fw-500);
    line-height: var(--ax-lh-20);
    color: rgba(255, 255, 255, 0.97);
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.65),
        0 0 14px rgba(0, 0, 0, 0.45);
    position: relative;
    z-index: 1;
}

.forgot-link {
    font-size: var(--ax-fs-14);
    font-weight: var(--ax-fw-500);
    line-height: var(--ax-lh-20);
    color: var(--ax-text-muted);
}

.forgot-link span {
    font-size: var(--ax-fs-14);
    line-height: var(--ax-lh-20);
    font-weight: var(--ax-fw-500);
    color: var(--ax-secondary);
}


.site-footer {
    position: relative;
    width: 100%;
    background: var(--ax-neutral-50, #F8FAFC);
    border-top: 1px solid var(--ax-neutral-200, #E2E8F0);
    padding: 0;
    color: var(--ax-muted);
    font-size: var(--ax-fs-14);
    line-height: var(--ax-lh-20);
    pointer-events: auto;
}

.site-footer .footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-footer[style],
.site-footer.fixed {
    position: relative !important;
}

.site-footer .footer-left {
    text-align: center;
    color: var(--ax-text-muted);
    background: transparent;
    border-radius: var(--ax-radius-10);
}

.chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 12, 0.28);
    z-index: calc(var(--ax-z-modal, 1000) + 40);
    display: none;
}

.chat-widget {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 360px;
    z-index: calc(var(--ax-z-modal, 1000) + 50);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: auto;
    font-size: var(--ax-fs-14);
}

.chat-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--ax-white);
    border: 1px solid var(--ax-primary);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: var(--ax-shadow-gold-soft);
    color: var(--ax-text-secondary);
    min-height: 48px;
    box-sizing: border-box;
    transition: background .18s ease, color .18s ease;
    cursor: pointer;
}

.chat-toggle .chat-title {
    font-weight: var(--ax-fw-500);
    font-size: var(--ax-fs-16);
}

.chat-badge {
    background: var(--ax-secondary);
    color: var(--ax-white);
    padding: 0px 8px;
    border-radius: var(--ax-radius-pill);
    font-weight: var(--ax-fw-700);
    font-size: var(--ax-fs-12);
}

.chat-arrow {
    width: 26px;
    height: 26px;
    display: inline-block;
    color: var(--ax-primary);
    background-image: url("../../icons/icons-up-double-arrow.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    transition: transform .18s, filter .12s, opacity .12s;
    opacity: .95;
}

.chat-toggle.open {
    background: var(--ax-primary);
    border: 1px solid var(--ax-yellow-50, var(--ax-secondary));
    border-bottom: none;
    color: var(--ax-white);
}

.chat-toggle.open .chat-arrow {
    background-image: url("../../icons/icons-down-double-arrow-white.svg");
    transform: rotate(0deg);
    opacity: 1;
}

.chat-toggle.open .chat-badge {
    display: none !important;
}

.chat-panel {
    width: 100%;
    max-height: 500px;
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--ax-white);
    border-radius: 0 0 var(--ax-radius-12) var(--ax-radius-12);
    border-top: none;
    overflow: hidden;
    box-sizing: border-box;
}

.chat-tabpanel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
}

.chat-tabs {
    display: flex;
    padding: 8px 12px;
    background: var(--ax-white);
    border-bottom: 1px solid var(--ax-input-border);
    align-items: center;
    justify-content: space-around;
    position: relative;
}

.chat-tab {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--ax-radius-6);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--ax-text-muted);
    position: relative;
    font-size: var(--ax-fs-14);
    line-height: var(--ax-lh-18);
    transition: all 0.2s ease;
}

.tab-label {
    font-weight: var(--ax-fw-500);
}

#tab-btn-message.chat-tab.active {
    color: var(--ax-primary);
    font-weight: var(--ax-fw-700);
    background: linear-gradient(180deg, rgba(169, 147, 51, 0.04), rgba(169, 147, 51, 0.02));
}

#tab-btn-message.chat-tab.active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 2px;
    background: var(--ax-primary);
    border-radius: 2px;
}

#tab-btn-files.chat-tab.active {
    color: var(--ax-primary);
    font-weight: var(--ax-fw-700);
    background: linear-gradient(180deg, rgba(169, 147, 51, 0.04), rgba(169, 147, 51, 0.02));
}

#tab-btn-files.chat-tab.active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 60%;
    transform: translateX(-50%);
    width: 140%;
    height: 2px;
    background: var(--ax-primary);
    border-radius: 2px;
}

.chat-body,
.upload-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    background: var(--ax-white);
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.chat-row {
    display: flex;
    align-items: flex-start;
    max-width: 100%;
    box-sizing: border-box;
}

.chat-row-custom {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    box-sizing: border-box;
}

.chat-row.chat-msg-agent {
    align-items: flex-end;
}

.chat-avatar img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
}

.chat-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
}

.chat-bubble {
    padding: 10px 12px;
    border-radius: var(--ax-radius-12);
    box-shadow: var(--ax-shadow-1);
    word-break: break-word;
    font-size: var(--ax-fs-16);
    line-height: var(--ax-lh-24);
}

.chat-msg-other .chat-bubble {
    background: var(--ax-sky-25);
    color: var(--ax-gray-900);
    font-size: var(--ax-fs-16);
    font-weight: var(--ax-fw-400);
    line-height: var(--ax-lh-24);
}

.chat-msg-agent .chat-bubble {
    background: var(--ax-neutral-50);
    border: 1px solid var(--ax-input-border);
    color: var(--ax-text-secondary);
    padding: 12px 24px 12px 12px;
    border-radius: var(--ax-radius-6);
}

.chat-msg-you {
    display: flex;
    justify-content: flex-end;
}

.chat-msg-you .chat-bubble {
    background: var(--ax-blue-50);
    color: var(--ax-text-secondary);
    box-shadow: var(--ax-shadow-2);
}

.chat-date {
    text-align: center;
    font-size: var(--ax-fs-12);
    color: var(--ax-input-label-text);
    margin: 6px 0;
}

.chat-meta {
    font-size: var(--ax-fs-12);
    font-weight: var(--ax-fw-500);
    line-height: var(--ax-lh-18);
    color: var(--ax-text-muted);
    margin-top: 6px;
}

.chat-footer {
    flex-shrink: 0;
    padding: 10px 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--ax-white);
    box-sizing: border-box;
}

.upload-title {
    font-size: var(--ax-fs-16);
    font-weight: var(--ax-fw-600);
    margin: 0 0 4px 0;
    color: var(--ax-text-primary);
}

.upload-sub {
    font-size: var(--ax-fs-12);
    line-height: var(--ax-lh-14);
    color: var(--ax-text-tertiary);
    margin: 0 0 16px 0;
}

.dropzone {
    border: 2px dashed var(--ax-input-border);
    border-radius: var(--ax-radius-12);
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--ax-primary);
}

.dropzone-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.dropzone-icon {
    font-size: var(--ax-fs-30);
}

.dropzone-text {
    font-weight: var(--ax-fw-600);
    color: var(--ax-text-secondary);
}

.dropzone-hint {
    font-size: var(--ax-fs-12);
    color: var(--ax-input-label-text);
}

.uploaded-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.uploaded-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ax-white);
    border-radius: var(--ax-radius-4);
}

.uploaded-details {
    flex: 1;
}

.uploaded-name {
    font-weight: var(--ax-fw-500);
    color: var(--ax-neutral-500);
    font-size: var(--ax-fs-14);
}

.uploaded-size {
    font-size: var(--ax-fs-12);
    color: var(--ax-input-label-text);
}

.uploaded-status {
    font-size: var(--ax-fs-12);
    font-weight: var(--ax-fw-500);
}

.uploaded-status.uploading {
    color: var(--ax-primary);
    border: 1px solid var(--ax-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ax-radius-4);
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.uploaded-status.success {
    color: var(--ax-success-500);
}

.chat-body::-webkit-scrollbar,
.upload-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-thumb,
.upload-body::-webkit-scrollbar-thumb {
    background: var(--ax-gray-90);
    border-radius: 8px;
}

.chat-body {
    scrollbar-width: thin;
}

.chat-footer-spacer {
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    grid-column: 1 / -1;
}

.page-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}