﻿@import url("bw-tokens.css");

.bw-msg-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem 2.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bw-msg-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1.15rem;
    align-items: stretch;
    min-height: min(72vh, 680px);
}

@media (max-width: 900px) {
    .bw-msg-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .bw-msg-sidebar {
        max-height: none;
    }

    body.bw-msg-thread-page .bw-msg-sidebar {
        display: none;
    }

    body.bw-msg-thread-page .bw-msg-chat {
        min-height: min(78vh, 720px);
    }
}

.bw-msg-sidebar {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(41, 37, 36, 0.06);
    max-height: min(72vh, 680px);
    overflow-y: auto;
}

.bw-msg-sidebar-head {
    padding: 0.85rem 1rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #78716c;
    border-bottom: 1px solid #f5f5f4;
    background: #fafaf9;
}

.bw-msg-thread-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.8rem 0.95rem;
    border-bottom: 1px solid #f5f5f4;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.bw-msg-thread-item:last-child {
    border-bottom: none;
}

.bw-msg-thread-item:hover {
    background: #fafaf9;
}

.bw-msg-thread-item.is-active {
    background: #e8ebf1;
    box-shadow: inset 3px 0 0 var(--bw-verde-m, #3d7260);
}

body.bw-msg-inbox-page .bw-msg-thread-item.is-active {
    background: var(--bw-msg-brand-soft);
    box-shadow: inset 3px 0 0 var(--bw-msg-brand);
}

.bw-msg-thread-item.is-unread {
    background: #f3f4f8;
}

.bw-msg-thread-avatar {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--bw-verde, #2a5c47);
    background: #e8ebf1;
}

.bw-msg-thread-item.is-active .bw-msg-thread-avatar {
    background: var(--bw-verde-m, #3d7260);
    color: #fff;
}

body.bw-msg-inbox-page .bw-msg-thread-item.is-active .bw-msg-thread-avatar {
    background: var(--bw-msg-brand);
    color: #fff;
}

.bw-msg-thread-body {
    flex: 1;
    min-width: 0;
}

.bw-msg-thread-item strong {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: #292524;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bw-msg-thread-item span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.74rem;
    color: #78716c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bw-msg-thread-badge {
    flex-shrink: 0;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--bw-verde-m, #3d7260);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25rem;
    text-align: center;
}

.bw-msg-chat {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-height: min(72vh, 680px);
    box-shadow: 0 6px 22px rgba(41, 37, 36, 0.07);
    overflow: hidden;
}

.bw-msg-chat-head {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e7e5e4;
    background: #fff;
}

.bw-msg-chat-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #292524;
    letter-spacing: -0.02em;
}

.bw-msg-chat-sub {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: #78716c;
}

.bw-msg-chat-body {
    flex: 1;
    padding: 1rem 1.1rem 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(61, 155, 122, 0.05), transparent 55%),
        linear-gradient(180deg, #fafaf9 0%, #fff 100%);
    scroll-behavior: smooth;
}

.bw-msg-date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.35rem 0 0.5rem;
}

.bw-msg-date-divider span {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e7e5e4;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #78716c;
}

.bw-msg-row {
    display: flex;
    width: 100%;
}

.bw-msg-row--company {
    justify-content: flex-start;
}

.bw-msg-row--candidate {
    justify-content: flex-end;
}

.bw-msg-row--system {
    justify-content: center;
}

.bw-msg-stack {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    max-width: min(32rem, 82%);
    min-width: 0;
}

.bw-msg-row--candidate .bw-msg-stack {
    align-items: flex-end;
}

.bw-msg-row--company .bw-msg-stack {
    align-items: flex-start;
}

.bw-msg-sender {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #78716c;
    padding: 0 0.35rem;
}

.bw-msg-bubble {
    width: fit-content;
    max-width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.55;
    word-break: break-word;
}

.bw-msg-bubble a {
    color: inherit;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.bw-msg-bubble--company {
    background: #fff;
    color: #292524;
    border: 1px solid #e7e5e4;
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 3px rgba(41, 37, 36, 0.04);
}

.bw-msg-bubble--candidate {
    background: linear-gradient(135deg, var(--bw-verde-m, #3d7260) 0%, var(--bw-verde, #2a5c47) 100%);
    color: #fff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 14px rgba(61, 155, 122, 0.22);
}

.bw-msg-time {
    font-size: 0.68rem;
    color: #a8a29e;
    padding: 0 0.35rem;
}

.bw-msg-row--candidate .bw-msg-time {
    text-align: right;
}

/* Admin / rich messages (legacy layout senza .bw-msg-row) */
.bw-msg-chat-body > .bw-msg-rich.bw-msg-bubble--company,
.bw-msg-chat-body > .bw-msg-bubble.bw-msg-bubble--company:not(.bw-msg-row *) {
    align-self: flex-start;
    width: fit-content;
    max-width: min(32rem, 82%);
}

.bw-msg-chat-body > .bw-msg-rich.bw-msg-bubble--candidate,
.bw-msg-chat-body > .bw-msg-bubble.bw-msg-bubble--candidate:not(.bw-msg-row *) {
    align-self: flex-end;
    width: fit-content;
    max-width: min(32rem, 82%);
}

.bw-msg-bubble-meta {
    font-size: 0.68rem;
    font-weight: 600;
    color: #78716c;
    margin-bottom: 0.35rem;
    opacity: 0.95;
}

.bw-msg-bubble--candidate .bw-msg-bubble-meta {
    color: rgba(255, 255, 255, 0.82);
}

.bw-msg-bubble-text {
    line-height: 1.55;
}

.bw-msg-bubble time {
    display: block;
    font-size: 0.68rem;
    opacity: 0.75;
    margin-top: 0.35rem;
}

.bw-msg-compose {
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid #e7e5e4;
    background: #fff;
}

.bw-msg-compose-form {
    margin: 0;
}

.bw-msg-compose-box {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    padding: 0.55rem 0.55rem 0.55rem 0.85rem;
    border: 1.5px solid #d6d3d1;
    border-radius: 14px;
    background: #fafaf9;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.bw-msg-compose-box:focus-within {
    border-color: var(--bw-verde-m, #3d7260);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(61, 155, 122, 0.12);
}

.bw-msg-compose textarea {
    flex: 1;
    min-height: 2.75rem;
    max-height: 8rem;
    padding: 0.45rem 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.45;
    resize: none;
}

.bw-msg-compose textarea:focus:not(:focus-visible) {
    outline: none;
}

.bw-msg-compose-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
    justify-content: flex-end;
    align-items: center;
}

.bw-msg-send-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.55rem 1.05rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bw-verde-m, #3d7260), var(--bw-verde, #2a5c47));
    color: #fff;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(61, 155, 122, 0.25);
}

.bw-msg-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(61, 155, 122, 0.3);
}

.bw-msg-send-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Legacy: textarea fuori dalla compose-box (company thread, admin) */
.bw-msg-compose > form > textarea {
    width: 100%;
    min-height: 88px;
    padding: 0.65rem 0.8rem;
    border: 1.5px solid #d6d3d1;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    background: #fafaf9;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bw-msg-compose > form > textarea:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--bw-verde-m, #3d7260);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(61, 155, 122, 0.12);
}

.bw-meeting-card {
    margin-top: 0;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #134e4a;
}

.bw-msg-bubble--company .bw-meeting-card {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #134e4a;
}

.bw-msg-bubble--candidate .bw-meeting-card {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.bw-meeting-card a {
    color: inherit;
    font-weight: 700;
}

.bw-msg-bubble--company .bw-meeting-card a {
    color: var(--bw-verde-m, #3d7260);
}

.bw-meeting-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.bw-meeting-counter-form {
    margin: 0.5rem 0 0;
    padding: 1rem;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e7e5e4;
    box-shadow: 0 2px 10px rgba(41, 37, 36, 0.05);
    max-width: min(32rem, 100%);
}

.bw-meeting-counter-form__title {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #292524;
}

.bw-meeting-counter-form label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.bw-meeting-counter-form input,
.bw-meeting-counter-form textarea {
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
}

/* Meeting wizard (company) */
.bw-mw {
    padding: 1.25rem 1.35rem 1.35rem;
    background: linear-gradient(165deg, #f0fdfa 0%, #f8fafc 50%, #fff 100%);
    border-top: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.bw-mw *,
.bw-mw *::before,
.bw-mw *::after {
    box-sizing: border-box;
}

.bw-mw__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bw-mw__title {
    margin: 0 0 0.3rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.bw-mw__subtitle {
    margin: 0;
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.45;
    max-width: 36rem;
}

.bw-mw__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    font-size: 1.35rem;
    line-height: 1;
}

.bw-mw__close:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.bw-mw__progress {
    height: 5px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.bw-mw__progress-bar {
    display: block;
    height: 100%;
    width: 0;
    background: var(--bw-gradient-brand);
    border-radius: 999px;
    transition: width 0.28s ease;
}

.bw-mw__stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0 0 1.15rem;
    padding: 0;
}

.bw-mw__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    min-width: 0;
}

.bw-mw__step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.bw-mw__step-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.25;
    padding: 0 0.15rem;
}

.bw-mw__step.is-active .bw-mw__step-badge,
.bw-mw__step.is-done .bw-mw__step-badge {
    background: var(--bw-verde-m, #3d7260);
    color: #fff;
}

.bw-mw__step.is-active .bw-mw__step-label,
.bw-mw__step.is-done .bw-mw__step-label {
    color: var(--bw-verde-m, #3d7260);
}

.bw-mw__lead {
    margin: 0 0 0.9rem;
    font-size: 0.92rem;
    color: #334155;
    font-weight: 500;
}

.bw-mw__type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.bw-mw__type {
    cursor: pointer;
    display: block;
    margin: 0;
}

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

.bw-mw__type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bw-mw__type:hover .bw-mw__type-card {
    border-color: #99f6e4;
}

.bw-mw__type input:checked + .bw-mw__type-card {
    border-color: var(--bw-verde-m, #3d7260);
    background: linear-gradient(180deg, #ecfeff 0%, #fff 100%);
    box-shadow: 0 8px 18px rgba(14, 116, 144, 0.12);
}

.bw-mw__type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: #0f172a;
}

.bw-mw__type-icon svg {
    display: block;
}

.bw-mw__type-card strong {
    font-size: 0.92rem;
    color: #0f172a;
}

.bw-mw__type-card small {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.35;
}

.bw-mw__type-grid--error .bw-mw__type-card {
    border-color: #f87171;
}

.bw-mw__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.bw-mw__channel {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    border: 0;
    margin: 0 0 0.85rem;
    padding: 0;
    min-width: 0;
}

.bw-mw__channel .bw-mw__lead {
    margin-bottom: 0.15rem;
}

.bw-mw__detail .bw-mw__channel-option {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #1e293b;
    line-height: 1.45;
    cursor: pointer;
}

.bw-mw__detail .bw-mw__channel-option:hover {
    border-color: #99f6e4;
}

.bw-mw__detail .bw-mw__channel-option:has(input:checked) {
    border-color: var(--bw-verde-m, #3d7260);
    background: #f0fdfa;
}

.bw-mw__detail .bw-mw__channel-option input {
    width: 1.05rem;
    height: 1.05rem;
    min-width: 1.05rem;
    margin: 0.2rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    background: transparent;
    flex: 0 0 auto;
    accent-color: var(--bw-verde-m, #3d7260);
}

.bw-mw__channel-option span {
    flex: 1 1 auto;
    min-width: 0;
}

.bw-mw__channel-option strong {
    font-weight: 700;
}

.bw-mw__field label,
.bw-mw__detail label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.bw-mw__field input,
.bw-mw__detail input,
.bw-mw__detail textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    background: #fff;
}

.bw-mw__field input:focus:not(:focus-visible),
.bw-mw__detail input:focus:not(:focus-visible),
.bw-mw__detail textarea:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--bw-verde-m, #3d7260);
    box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.14);
}

.bw-mw__field--error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2) !important;
}

.bw-mw__hint {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
}

.bw-mw__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.75rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.bw-mw__footer-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-left: auto;
}

.bw-mw__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.bw-mw__btn--ghost {
    background: #fff;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.bw-mw__btn--ghost:hover {
    background: #f8fafc;
    color: #0f172a;
}

.bw-mw__btn--primary {
    background: var(--bw-gradient-brand, linear-gradient(135deg, #2a5c47, #3d7260));
    color: #fff;
    box-shadow: 0 4px 12px rgba(14, 116, 144, 0.25);
}

.bw-mw__btn--primary:hover {
    background: linear-gradient(135deg, #245a47, #356b58);
}

.bw-mw__hidden {
    display: none !important;
}

@media (max-width: 560px) {
    .bw-mw__type-grid,
    .bw-mw__row {
        grid-template-columns: 1fr;
    }

    .bw-mw__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .bw-mw__footer-nav {
        margin-left: 0;
        width: 100%;
    }

    .bw-mw__footer-nav .bw-mw__btn {
        flex: 1;
    }
}

/* legacy aliases */
.bw-meeting-wizard {
    padding: 1.15rem 1.25rem 1.25rem;
    background: linear-gradient(165deg, #f0fdfa 0%, #f8fafc 42%, #fff 100%);
    border-top: 1px solid #e2e8f0;
}

.bw-meeting-wizard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bw-meeting-wizard-head h3 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.bw-meeting-wizard-head p {
    margin: 0;
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.45;
}

.bw-meeting-wizard-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.bw-meeting-wizard-close:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.bw-meeting-progress {
    height: 4px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.85rem;
}

.bw-meeting-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    background: var(--bw-gradient-brand);
    border-radius: 999px;
    transition: width 0.25s ease;
}

.bw-meeting-wizard-steps {
    display: flex;
    justify-content: space-between;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    gap: 0.35rem;
}

.bw-meeting-wizard-steps li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
}

.bw-meeting-wizard-steps .bw-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
}

.bw-meeting-wizard-steps .bw-step-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.2;
}

.bw-meeting-wizard-steps li.is-active .bw-step-label,
.bw-meeting-wizard-steps li.is-done .bw-step-label {
    color: var(--bw-verde-m, #3d7260);
}

.bw-meeting-wizard-steps li.is-active .bw-step-num,
.bw-meeting-wizard-steps li.is-done .bw-step-num {
    background: var(--bw-verde-m, #3d7260);
    color: #fff;
}

.bw-meeting-step-lead {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
}

.bw-meeting-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 520px) {
    .bw-meeting-type-grid {
        grid-template-columns: 1fr;
    }
}

.bw-meeting-type-grid--error .bw-meeting-type-card {
    animation: bw-meeting-shake 0.35s ease;
    border-color: #f87171;
}

@keyframes bw-meeting-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.bw-meeting-type-opt {
    cursor: pointer;
    display: block;
}

.bw-meeting-type-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bw-meeting-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.bw-meeting-type-opt:hover .bw-meeting-type-card {
    border-color: #99f6e4;
    box-shadow: 0 6px 16px rgba(14, 116, 144, 0.08);
}

.bw-meeting-type-opt input:checked + .bw-meeting-type-card {
    border-color: var(--bw-verde-m, #3d7260);
    background: linear-gradient(180deg, #ecfeff 0%, #fff 100%);
    box-shadow: 0 8px 20px rgba(14, 116, 144, 0.12);
    transform: translateY(-2px);
}

.bw-meeting-type-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.bw-meeting-type-card strong {
    font-size: 0.92rem;
    color: #0f172a;
}

.bw-meeting-type-card small {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.35;
}

.bw-meeting-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 520px) {
    .bw-meeting-fields-row {
        grid-template-columns: 1fr;
    }
}

.bw-meeting-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.bw-meeting-field input,
.bw-meeting-detail-panel input,
.bw-meeting-detail-panel textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bw-meeting-field input:focus:not(:focus-visible),
.bw-meeting-detail-panel input:focus:not(:focus-visible),
.bw-meeting-detail-panel textarea:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--bw-verde-m, #3d7260);
    box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.bw-meeting-field--error,
.bw-meeting-field input.bw-meeting-field--error,
.bw-meeting-detail-panel input.bw-meeting-field--error,
.bw-meeting-detail-panel textarea.bw-meeting-field--error {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.bw-meeting-detail-panel label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.bw-meeting-hint {
    margin: 0.4rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
}

.bw-meeting-wizard-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.bw-meeting-wizard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
}

.bw-meeting-company-bar {
    margin: 0;
    padding: 1rem 1.15rem;
    background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
    border-top: 1px solid #fde68a;
    border-bottom: 1px solid #fde68a;
}

.bw-meeting-company-bar__title {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #92400e;
}

.bw-meeting-company-bar__text {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.45;
}

.bw-meeting-company-bar__form {
    margin: 0;
}

.bw-interview-eval-cta {
    margin: 0.25rem 0 0;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
    border: 1px solid #a7f3d0;
    max-width: min(32rem, 100%);
}

.bw-interview-eval-cta--done {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.bw-interview-eval-cta__title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.bw-interview-eval-cta__text {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.45;
}

.bw-msg-flash {
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
}

.bw-msg-flash.ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.bw-msg-flash.err {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.bw-msg-empty {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

/* Admin chat tools */
.admin-chat-page .admin-chat-box {
    max-width: 860px;
    margin: 0 auto;
}

.bw-admin-tools {
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.bw-admin-tools-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.75rem 1rem 0.5rem;
}

.bw-admin-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.bw-admin-tool-btn:hover,
.bw-admin-tool-btn.is-active {
    background: #ecfeff;
    border-color: var(--bw-verde-m, #3d7260);
    color: var(--bw-verde-m, #3d7260);
}

.bw-admin-tool-panel {
    padding: 0 1rem 1rem;
}

.bw-admin-tool-panel.is-hidden {
    display: none;
}

.bw-admin-tool-form label {
    display: block;
    margin: 0.55rem 0 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.bw-admin-tool-form input[type="text"],
.bw-admin-tool-form input[type="file"],
.bw-admin-tool-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
}

.bw-admin-tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.bw-admin-tool-hint {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.bw-admin-tool-form .admin-btn,
.bw-admin-tool-form .bw-msg-widget-btn {
    margin-top: 0.75rem;
}

.bw-admin-presets {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #e2e8f0;
}

.bw-admin-presets-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.55rem;
}

.bw-admin-presets-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
}

.bw-admin-presets-hint {
    font-size: 0.72rem;
    color: #94a3b8;
}

.bw-admin-presets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.bw-admin-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    max-width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    color: #0f172a;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.bw-admin-preset-btn:hover {
    border-color: var(--bw-verde-m, #3d7260);
    box-shadow: 0 4px 14px rgba(14, 116, 144, 0.12);
    transform: translateY(-1px);
}

.bw-admin-preset-btn:active {
    transform: translateY(0);
}

.bw-admin-preset-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--bw-verde-m, #3d7260);
}

.bw-admin-preset-preview {
    font-size: 0.72rem;
    line-height: 1.35;
    color: #64748b;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .bw-admin-preset-btn {
        flex: 1 1 100%;
    }

    .bw-admin-preset-preview {
        max-width: none;
        white-space: normal;
    }
}

/* Rich message widgets */
.bw-msg-rich {
    max-width: min(32rem, 82%);
}

.bw-msg-kind-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.12);
    color: var(--bw-verde-m, #3d7260);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.bw-msg-widget {
    margin-top: 0.35rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.bw-msg-bubble--candidate .bw-msg-widget {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.bw-msg-widget-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
    opacity: 0.85;
}

.bw-msg-widget-lead {
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.bw-msg-widget-intro {
    margin: -0.35rem 0 0.65rem;
    font-size: 0.85rem;
    line-height: 1.45;
    opacity: 0.9;
}

.bw-msg-widget-note {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    opacity: 0.8;
}

.bw-msg-poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bw-msg-poll-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(241, 245, 249, 0.85);
    cursor: pointer;
    font-size: 0.88rem;
}

.bw-msg-bubble--candidate .bw-msg-poll-opt {
    background: rgba(255, 255, 255, 0.12);
}

.bw-msg-poll-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bw-msg-poll-bars {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.bw-msg-poll-bar-row.is-chosen .bw-msg-poll-bar-label {
    font-weight: 700;
}

.bw-msg-bubble--company .bw-msg-poll-bar-row.is-chosen .bw-msg-poll-bar-label {
    color: var(--bw-verde-m, #3d7260);
}

.bw-msg-bubble--candidate .bw-msg-poll-bar-row.is-chosen .bw-msg-poll-bar-label {
    color: #fff;
}

.bw-msg-poll-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.bw-msg-poll-bar-label {
    font-size: 0.86rem;
    line-height: 1.35;
}

.bw-msg-poll-bar-pct {
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.85;
}

.bw-msg-poll-bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    overflow: hidden;
}

.bw-msg-bubble--company .bw-msg-poll-bar-track {
    background: #e2e8f0;
}

.bw-msg-poll-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--bw-gradient-brand);
    transition: width 0.35s ease;
}

.bw-msg-bubble--candidate .bw-msg-poll-bar-fill {
    background: linear-gradient(90deg, rgba(255,255,255,0.85), rgba(255,255,255,0.65));
}

.bw-msg-poll-bar-votes {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    opacity: 0.8;
}

.bw-msg-attachments {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.bw-msg-attach-image img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 10px;
    display: block;
    object-fit: cover;
}

.bw-msg-attach-file {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: #f1f5f9;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.bw-msg-bubble--candidate .bw-msg-attach-file {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.bw-msg-feedback-form label {
    display: block;
    margin: 0.55rem 0 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.bw-msg-feedback-form textarea,
.bw-msg-feedback-form select {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
}

.bw-msg-rating {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.bw-msg-rating-star {
    cursor: pointer;
}

.bw-msg-rating-star input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bw-msg-rating-star span {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 0.82rem;
    font-weight: 700;
}

.bw-msg-rating-star input:checked + span,
.bw-msg-rating-star:hover span {
    background: var(--bw-verde-m, #3d7260);
    color: #fff;
}

.bw-msg-widget-btn,
.bw-msg-feedback-form button {
    margin-top: 0.65rem;
    padding: 0.5rem 0.85rem;
    border: none;
    border-radius: 8px;
    background: var(--bw-verde-m, #3d7260);
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.bw-msg-feedback-done {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bw-msg-feedback-answer {
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.85rem;
}

.bw-msg-bubble--candidate .bw-msg-feedback-answer {
    background: rgba(255, 255, 255, 0.12);
}

.bw-msg-feedback-q {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.75;
}

.bw-msg-feedback-a {
    display: block;
    margin-top: 0.15rem;
}

@media (max-width: 560px) {
    .bw-admin-tool-grid {
        grid-template-columns: 1fr;
    }

    .bw-msg-compose {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }

    body.bw-floating-stack-active .bw-msg-thread-page .tools-container,
    body.bw-floating-stack-active.candidate-tools-page .tools-container:has(.bw-msg-compose) {
        padding-bottom: 4.5rem;
    }
}

@media (max-width: 880px) {
    body.candidate-tools-page.bw-msg-inbox-page .bw-msg-wrap--inbox,
    body.candidate-tools-page.bw-msg-inbox-page .tools-container:has(.bw-msg-compose) {
        padding-bottom: calc(var(--bw-bottom-tab-height, 4.35rem) + 1rem);
    }

    body.candidate-tools-page.bw-msg-inbox-page .bw-msg-compose {
        padding-bottom: calc(0.5rem + var(--bw-bottom-tab-height, 4.35rem));
    }
}

/* ——— Inbox messaggi: palette verde salvia (bw-tokens) ——— */
body.bw-msg-inbox-page,
body.admin-messages-page {
    --bw-msg-brand: var(--bw-verde, #2a5c47);
    --bw-msg-brand-mid: var(--bw-verde-m, #3d7260);
    --bw-msg-brand-light: var(--bw-verde-l, #6aab8a);
    --bw-msg-brand-soft: var(--bw-accent-muted, #ecf5ef);
    --bw-msg-brand-soft-2: #f5faf7;
    --bw-msg-brand-muted: var(--bw-ink-muted, #78716c);
    --bw-msg-brand-border: var(--bw-line-strong, rgba(42, 92, 71, 0.2));
    --bw-msg-brand-gradient: var(--bw-gradient-brand, linear-gradient(135deg, #2a5c47, #3d7260));
    --bw-msg-brand-gradient-soft: linear-gradient(180deg, var(--bw-surface-warm, #f3f4f6) 0%, #fff 100%);
    --bw-msg-focus-ring: var(--bw-focus-ring, rgba(61, 114, 96, 0.22));
}

/* ——— Inbox candidato (layout 3 colonne, stile LinkedIn) ——— */
.bw-msg-wrap--inbox {
    max-width: 1400px;
    padding-bottom: 2rem;
}

body.bw-msg-inbox-page--no-shell-hero .bw-msg-wrap--inbox,
body.bw-msg-inbox-page--no-shell-hero.co-main.bw-msg-wrap--inbox {
    padding-top: 0.35rem;
}

body.bw-msg-inbox-page--no-shell-hero .bw-msg-inbox-layout {
    height: clamp(440px, calc(100dvh - 6.75rem), 820px);
    max-height: clamp(440px, calc(100dvh - 6.75rem), 820px);
}

.bw-msg-inbox-layout {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) minmax(220px, 280px);
    grid-template-rows: 1fr;
    gap: 0;
    align-items: stretch;
    height: clamp(420px, calc(100dvh - 11.5rem), 760px);
    max-height: clamp(420px, calc(100dvh - 11.5rem), 760px);
    min-height: 420px;
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(41, 37, 36, 0.08);
}

.bw-msg-inbox-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid #e7e5e4;
    background: #fff;
}

.bw-msg-inbox-col__head {
    padding: 0.9rem 1rem 0.65rem;
    border-bottom: 1px solid #f5f5f4;
}

.bw-msg-inbox-col__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #292524;
    letter-spacing: -0.02em;
}

.bw-msg-inbox-tabs {
    display: flex;
    gap: 0;
    padding: 0 1rem;
    border-bottom: 1px solid #e7e5e4;
}

.bw-msg-inbox-tab {
    flex: 1;
    padding: 0.65rem 0.35rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #78716c;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.bw-msg-inbox-tab.is-active {
    color: #292524;
    border-bottom-color: #292524;
}

.bw-msg-inbox-search {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f5f5f4;
}

.bw-msg-inbox-search input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid #e7e5e4;
    border-radius: 999px;
    font-size: 0.84rem;
    background: #fafaf9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2378716c' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3 3'/%3E%3C/svg%3E") 0.65rem center no-repeat;
}

.bw-msg-inbox-search input:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--bw-msg-brand);
    box-shadow: 0 0 0 2px var(--bw-msg-focus-ring);
}

.bw-msg-inbox-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.bw-msg-inbox-list__empty {
    margin: 0;
    padding: 1.25rem 1rem;
    font-size: 0.86rem;
    color: #78716c;
    line-height: 1.5;
}

.bw-msg-inbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f5f5f4;
    transition: background 0.12s ease;
}

.bw-msg-inbox-item:hover {
    background: #fafaf9;
}

.bw-msg-inbox-item.is-active {
    background: var(--bw-msg-brand-soft);
    box-shadow: inset 3px 0 0 var(--bw-msg-brand);
}

.bw-msg-inbox-item.is-unread {
    background: var(--bw-msg-brand-soft-2);
}

.bw-msg-inbox-item__avatar {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--bw-msg-brand);
    background: var(--bw-msg-brand-soft);
}

.bw-msg-inbox-item__avatar--team {
    color: #fff;
    background: var(--bw-msg-brand-gradient);
}

.bw-msg-inbox-item__body {
    flex: 1;
    min-width: 0;
}

.bw-msg-inbox-item__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem;
}

.bw-msg-inbox-item__top strong {
    font-size: 0.86rem;
    font-weight: 700;
    color: #292524;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bw-msg-inbox-item__top time {
    flex-shrink: 0;
    font-size: 0.68rem;
    color: #a8a29e;
}

.bw-msg-inbox-item__preview {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.76rem;
    color: #78716c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bw-msg-inbox-item.is-unread .bw-msg-inbox-item__preview {
    color: #44403c;
    font-weight: 600;
}

.bw-msg-inbox-item__dot {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.45rem;
    border-radius: 50%;
    background: var(--bw-msg-brand);
}

.bw-msg-chat-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    border-right: 1px solid #e7e5e4;
}

.bw-msg-chat-col.bw-msg-chat {
    border-radius: 0;
    border: none;
    box-shadow: none;
    min-height: 0;
}

body.bw-msg-inbox-page .bw-msg-chat-col.bw-msg-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

body.bw-msg-inbox-page .bw-msg-chat-col .bw-msg-chat-head,
body.bw-msg-inbox-page .bw-msg-chat-col .bw-msg-flash,
body.bw-msg-inbox-page .bw-msg-chat-col .bw-msg-compose {
    flex-shrink: 0;
}

body.bw-msg-inbox-page .bw-msg-chat-col .bw-msg-chat-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.bw-msg-chat-col--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-height: 100%;
    padding: 2rem;
    color: #78716c;
    font-size: 0.92rem;
    text-align: center;
    background: #fafaf9;
    overflow: hidden;
}

.bw-msg-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.bw-msg-chat-head__main {
    min-width: 0;
}

.bw-msg-chat-head__links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.bw-msg-chat-back {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bw-msg-brand);
    text-decoration: none;
}

.bw-msg-chat-back:hover {
    text-decoration: underline;
}

.bw-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
}

.bw-msg-row--candidate {
    flex-direction: row-reverse;
}

.bw-msg-row-avatar {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--bw-msg-brand);
    background: var(--bw-msg-brand-soft);
}

.bw-msg-row--candidate .bw-msg-row-avatar {
    color: #fff;
    background: var(--bw-msg-brand);
}

.bw-msg-profile-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 1rem;
    background: #fafaf9;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.bw-msg-profile-col__title {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #292524;
}

.bw-msg-profile-card {
    text-align: center;
}

.bw-msg-profile-card__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 0.65rem;
    border-radius: 50%;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--bw-msg-brand);
    background: var(--bw-msg-brand-soft);
    overflow: hidden;
}

.bw-msg-profile-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bw-msg-profile-card__avatar--team {
    color: #fff;
    background: var(--bw-msg-brand-gradient);
}

.bw-msg-profile-card__name {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 800;
    color: #292524;
}

.bw-msg-profile-card__meta,
.bw-msg-profile-card__subject {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    color: #78716c;
    line-height: 1.45;
}

.bw-msg-profile-card__links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.85rem;
}

.bw-msg-profile-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bw-msg-brand);
    text-decoration: none;
}

.bw-msg-profile-link:hover {
    text-decoration: underline;
}

.bw-msg-profile-hint {
    margin: 1rem 0 0;
    font-size: 0.76rem;
    line-height: 1.5;
    color: #78716c;
}

.bw-meeting-counter-form__hint {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.85rem;
    color: #57534e;
}

/* Chat inbox: bolle, header e composer (verde salvia) */
body.bw-msg-inbox-page .bw-msg-chat-col .bw-msg-chat-body,
body.admin-messages-page .admin-msg-chat-scroll {
    background: var(--bw-msg-brand-gradient-soft);
}

body.bw-msg-inbox-page .bw-msg-chat-head,
body.admin-messages-page .admin-msg-chat-head.bw-msg-chat-head {
    background: var(--bw-msg-brand-gradient);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.bw-msg-inbox-page .bw-msg-chat-head h2,
body.bw-msg-inbox-page .bw-msg-chat-sub,
body.admin-messages-page .admin-msg-chat-head h2,
body.admin-messages-page .admin-msg-chat-head .muted {
    color: #e2e8f0;
}

body.bw-msg-inbox-page .bw-msg-bubble--company,
body.bw-msg-inbox-page .bw-msg-rich.bw-msg-bubble--company {
    background: var(--bw-msg-brand-gradient);
    color: #fff;
    box-shadow: 0 4px 14px rgba(19, 26, 44, 0.18);
}

body.bw-msg-inbox-page .bw-msg-bubble--company .bw-msg-bubble-meta,
body.bw-msg-inbox-page .bw-msg-bubble--company .bw-msg-sender {
    color: rgba(255, 255, 255, 0.85);
}

body.bw-msg-inbox-page .bw-msg-bubble--candidate {
    background: var(--bw-msg-brand-gradient);
    color: #fff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 14px rgba(19, 26, 44, 0.22);
}

body.bw-msg-inbox-page .bw-msg-compose-box:focus-within {
    border-color: var(--bw-msg-brand);
    box-shadow: 0 0 0 3px var(--bw-msg-focus-ring);
}

body.bw-msg-inbox-page .bw-msg-send-btn {
    background: var(--bw-msg-brand-gradient);
    box-shadow: 0 2px 10px rgba(19, 26, 44, 0.2);
}

body.bw-msg-inbox-page .bw-msg-send-btn:hover {
    filter: brightness(1.08);
}

body.admin-messages-page .bw-admin-tool-btn:hover,
body.admin-messages-page .bw-admin-tool-btn.is-active {
    background: var(--bw-msg-brand-soft);
    border-color: var(--bw-msg-brand-light);
    color: var(--bw-msg-brand);
}

body.admin-messages-page .admin-btn.primary {
    background: var(--bw-msg-brand-gradient);
    border-color: var(--bw-msg-brand);
}

body.admin-messages-page .admin-btn.primary:hover {
    filter: brightness(1.06);
}

body.admin-messages-page .bw-msg-bubble--company,
body.admin-messages-page .bw-msg-rich.bw-msg-bubble--company {
    background: var(--bw-msg-brand-gradient);
    color: #fff;
    box-shadow: 0 4px 14px rgba(19, 26, 44, 0.2);
}

body.admin-messages-page .bw-msg-bubble--company .bw-msg-bubble-meta {
    color: rgba(255, 255, 255, 0.82);
}

body.admin-messages-page .bw-msg-bubble--candidate {
    background: #e8ebf1;
    color: var(--bw-verde, #2a5c47);
    border: 1px solid var(--bw-msg-brand-border);
    box-shadow: 0 1px 4px rgba(19, 26, 44, 0.08);
}

/* Messaggi candidato (bolla chiara): testo e metadati leggibili */
body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-bubble-meta {
    color: #475569;
    opacity: 1;
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-bubble-text,
body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-widget-lead,
body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-widget-intro,
body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-poll-bar-label,
body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-feedback-q {
    color: var(--bw-verde, #2a5c47);
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-widget-title {
    color: #334155;
    opacity: 1;
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-widget-note,
body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-poll-bar-pct,
body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-poll-bar-votes {
    color: #64748b;
    opacity: 1;
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-kind-badge {
    background: rgba(19, 26, 44, 0.1);
    color: var(--bw-verde, #2a5c47);
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-widget {
    background: #fff;
    border-color: var(--bw-msg-brand-border);
    color: var(--bw-verde, #2a5c47);
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-poll-opt {
    background: #f1f3f7;
    color: var(--bw-verde, #2a5c47);
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-poll-bar-row.is-chosen .bw-msg-poll-bar-label {
    color: var(--bw-verde, #2a5c47);
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-poll-bar-fill {
    background: linear-gradient(90deg, var(--bw-verde, #2a5c47), var(--bw-verde-m, #3d7260));
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-attach-file {
    background: #f1f3f7;
    color: var(--bw-verde, #2a5c47);
    border: 1px solid var(--bw-msg-brand-border);
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-feedback-answer {
    background: #f8fafc;
    color: #334155;
}

body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-widget-btn,
body.admin-messages-page .bw-msg-bubble--candidate .bw-msg-feedback-form button {
    background: var(--bw-msg-brand);
    color: #fff;
}

body.admin-messages-page .bw-admin-preset-btn:hover {
    border-color: var(--bw-msg-brand);
    box-shadow: 0 4px 14px rgba(19, 26, 44, 0.12);
}

body.admin-messages-page .bw-admin-preset-label {
    color: var(--bw-verde, #2a5c47);
}

body.admin-messages-page .admin-msg-chat-head .muted,
body.admin-messages-page .admin-msg-chat-sub {
    color: #cbd5e1 !important;
}

body.admin-messages-page .admin-msg-chat-back {
    color: #e2e8f0;
}

body.admin-messages-page .bw-admin-tools {
    background: #f8fafc;
    border-top-color: var(--bw-msg-brand-border);
}

body.admin-messages-page .bw-admin-presets-title {
    color: #334155;
}

body.admin-messages-page .bw-admin-tool-btn {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
}

@media (max-width: 1100px) {
    .bw-msg-inbox-layout {
        grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    }

    .bw-msg-profile-col {
        display: none;
    }
}

@media (max-width: 768px) {
    .bw-msg-inbox-layout {
        grid-template-columns: 1fr;
        height: clamp(380px, calc(100dvh - 10rem), 640px);
        max-height: clamp(380px, calc(100dvh - 10rem), 640px);
    }

    body.bw-msg-inbox-page--no-shell-hero .bw-msg-inbox-layout {
        height: clamp(380px, calc(100dvh - 7.5rem), 680px);
        max-height: clamp(380px, calc(100dvh - 7.5rem), 680px);
    }

    .bw-msg-inbox-col {
        border-right: none;
        height: 100%;
    }

    body.bw-msg-inbox-page--chat-open .bw-msg-inbox-col {
        display: none;
    }

    body.bw-msg-inbox-page:not(.bw-msg-inbox-page--chat-open) .bw-msg-chat-col,
    body.bw-msg-inbox-page:not(.bw-msg-inbox-page--chat-open) .bw-msg-chat-col--placeholder {
        display: none;
    }

    .bw-msg-chat-back {
        display: inline-flex;
    }
}

@media (min-width: 769px) {
    .bw-msg-chat-back {
        display: none;
    }
}

/* ——— Messaggi candidato · redesign coerente con dashboard 2026 ——— */
body.bw-msg-modern-page {
    --bw-msg-page-bg: #f8fafc;
    --bw-msg-surface: #ffffff;
    --bw-msg-surface-2: #f8fafc;
    --bw-msg-surface-3: #f1f5f9;
    --bw-msg-text: #0b1220;
    --bw-msg-text-2: #334155;
    --bw-msg-text-3: #64748b;
    --bw-msg-line: #e7ecf2;
    --bw-msg-line-2: #edf1f6;
    --bw-msg-brand: var(--bw-verde, #2a5c47);
    --bw-msg-brand-mid: var(--bw-verde-m, #3d7260);
    --bw-msg-brand-light: var(--bw-verde-l, #6aab8a);
    --bw-msg-brand-soft: rgba(106, 171, 138, 0.12);
    --bw-msg-brand-soft-2: rgba(106, 171, 138, 0.07);
    --bw-msg-brand-border: rgba(42, 92, 71, 0.16);
    --bw-msg-brand-gradient: linear-gradient(135deg, #2a5c47 0%, #3d7260 58%, #6aab8a 125%);
    --bw-msg-brand-gradient-soft: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    --bw-msg-focus-ring: rgba(106, 171, 138, 0.18);
    --bw-msg-radius: 20px;
    --bw-msg-radius-lg: 26px;
    --bw-msg-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
    --bw-msg-shadow-md: 0 16px 36px -18px rgba(15, 23, 42, 0.25), 0 6px 14px -10px rgba(15, 23, 42, 0.12);
    --bw-msg-shadow-brand: 0 16px 36px -18px rgba(42, 92, 71, 0.45);
    background: var(--bw-msg-page-bg);
}

body.bw-msg-modern-page .candidate-hero {
    display: none;
}

body.bw-msg-modern-page .bw-msg-wrap--inbox {
    max-width: 1440px;
    padding: 1rem 1rem 3rem;
}

body.bw-msg-modern-page .bw-msg-modern-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1rem;
    padding: 1.25rem 1.45rem;
    border: 1px solid var(--bw-msg-line);
    border-radius: var(--bw-msg-radius-lg);
    background:
        radial-gradient(440px 220px at 100% -20%, rgba(106, 171, 138, 0.16), transparent 58%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--bw-msg-shadow-sm);
}

body.bw-msg-modern-page .bw-msg-modern-kicker {
    display: inline-flex;
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--bw-msg-brand);
}

body.bw-msg-modern-page .bw-msg-modern-hero h1 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--bw-msg-text);
}

body.bw-msg-modern-page .bw-msg-modern-hero p {
    max-width: 48rem;
    margin: 0.35rem 0 0;
    color: var(--bw-msg-text-3);
    font-size: 0.92rem;
    line-height: 1.55;
}

body.bw-msg-modern-page .bw-msg-modern-stats {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

body.bw-msg-modern-page .bw-msg-modern-stats span {
    min-width: 8rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--bw-msg-line);
    border-radius: 16px;
    background: var(--bw-msg-surface);
    color: var(--bw-msg-text-3);
    font-size: 0.76rem;
    font-weight: 700;
    box-shadow: var(--bw-msg-shadow-sm);
}

body.bw-msg-modern-page .bw-msg-modern-stats strong {
    display: block;
    color: var(--bw-msg-text);
    font-size: 1.45rem;
    line-height: 1;
    letter-spacing: -0.03em;
}

body.bw-msg-modern-page.bw-msg-inbox-page--no-shell-hero .bw-msg-inbox-layout {
    height: clamp(540px, calc(100dvh - 12.25rem), 840px);
    max-height: clamp(540px, calc(100dvh - 12.25rem), 840px);
}

body.bw-msg-modern-page .bw-msg-inbox-layout {
    min-height: 540px;
    border: 1px solid var(--bw-msg-line);
    border-radius: var(--bw-msg-radius-lg);
    background: var(--bw-msg-surface);
    box-shadow: var(--bw-msg-shadow-md);
}

body.bw-msg-modern-page .bw-msg-inbox-col,
body.bw-msg-modern-page .bw-msg-chat-col,
body.bw-msg-modern-page .bw-msg-profile-col {
    border-color: var(--bw-msg-line);
}

body.bw-msg-modern-page .bw-msg-inbox-col {
    background: linear-gradient(180deg, var(--bw-msg-surface), var(--bw-msg-surface-2));
}

body.bw-msg-modern-page .bw-msg-inbox-col__head {
    padding: 1.05rem 1.05rem 0.75rem;
    border-bottom-color: var(--bw-msg-line-2);
}

body.bw-msg-modern-page .bw-msg-inbox-col__title,
body.bw-msg-modern-page .bw-msg-chat-head h2,
body.bw-msg-modern-page .bw-msg-profile-col__title,
body.bw-msg-modern-page .bw-msg-profile-card__name {
    color: var(--bw-msg-text);
    letter-spacing: -0.02em;
}

body.bw-msg-modern-page .bw-msg-inbox-tabs {
    gap: 0.35rem;
    padding: 0 1rem 0.75rem;
    border-bottom-color: var(--bw-msg-line-2);
}

body.bw-msg-modern-page .bw-msg-inbox-tab {
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--bw-msg-text-3);
    background: transparent;
}

body.bw-msg-modern-page .bw-msg-inbox-tab.is-active {
    color: var(--bw-msg-brand);
    border-color: var(--bw-msg-brand-border);
    background: var(--bw-msg-brand-soft);
}

body.bw-msg-modern-page .bw-msg-inbox-search {
    padding: 0.75rem 1rem;
    border-bottom-color: var(--bw-msg-line-2);
}

body.bw-msg-modern-page .bw-msg-inbox-search input {
    padding: 0.65rem 0.85rem 0.65rem 2.15rem;
    border-color: var(--bw-msg-line);
    background-color: var(--bw-msg-surface);
    color: var(--bw-msg-text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

body.bw-msg-modern-page .bw-msg-inbox-item {
    margin: 0.35rem 0.55rem;
    padding: 0.8rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 16px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

body.bw-msg-modern-page .bw-msg-inbox-item:hover {
    background: var(--bw-msg-surface);
    border-color: var(--bw-msg-line);
    box-shadow: var(--bw-msg-shadow-sm);
    transform: translateY(-1px);
}

body.bw-msg-modern-page .bw-msg-inbox-item.is-active {
    background: var(--bw-msg-surface);
    border-color: var(--bw-msg-brand-border);
    box-shadow: inset 3px 0 0 var(--bw-msg-brand), var(--bw-msg-shadow-sm);
}

body.bw-msg-modern-page .bw-msg-inbox-item.is-unread:not(.is-active) {
    background: var(--bw-msg-brand-soft-2);
}

body.bw-msg-modern-page .bw-msg-inbox-item__avatar,
body.bw-msg-modern-page .bw-msg-row-avatar,
body.bw-msg-modern-page .bw-msg-profile-card__avatar {
    border-radius: 14px;
    color: var(--bw-msg-brand);
    background: var(--bw-msg-brand-soft);
}

body.bw-msg-modern-page .bw-msg-inbox-item__avatar--team,
body.bw-msg-modern-page .bw-msg-profile-card__avatar--team,
body.bw-msg-modern-page .bw-msg-row--candidate .bw-msg-row-avatar {
    color: #fff;
    background: var(--bw-msg-brand-gradient);
    box-shadow: var(--bw-msg-shadow-brand);
}

body.bw-msg-modern-page .bw-msg-inbox-item__top strong {
    color: var(--bw-msg-text);
    font-weight: 800;
}

body.bw-msg-modern-page .bw-msg-inbox-item__preview,
body.bw-msg-modern-page .bw-msg-inbox-item__top time,
body.bw-msg-modern-page .bw-msg-chat-sub,
body.bw-msg-modern-page .bw-msg-profile-card__meta,
body.bw-msg-modern-page .bw-msg-profile-card__subject,
body.bw-msg-modern-page .bw-msg-profile-hint {
    color: var(--bw-msg-text-3);
}

body.bw-msg-modern-page .bw-msg-chat-head {
    min-height: 74px;
    padding: 1rem 1.2rem;
    background: var(--bw-msg-surface) !important;
    border-bottom: 1px solid var(--bw-msg-line);
}

body.bw-msg-modern-page .bw-msg-chat-head h2,
body.bw-msg-modern-page .bw-msg-chat-sub {
    color: var(--bw-msg-text) !important;
}

body.bw-msg-modern-page .bw-msg-chat-sub {
    color: var(--bw-msg-text-3) !important;
}

body.bw-msg-modern-page .bw-msg-chat-back {
    color: var(--bw-msg-brand);
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: var(--bw-msg-brand-soft);
    text-decoration: none;
}

body.bw-msg-modern-page .bw-msg-chat-col .bw-msg-chat-body {
    padding: 1.15rem;
    background:
        radial-gradient(520px 320px at 100% 0%, rgba(106, 171, 138, 0.11), transparent 58%),
        linear-gradient(180deg, var(--bw-msg-surface-2), #ffffff);
}

body.bw-msg-modern-page .bw-msg-date-divider span {
    border-color: var(--bw-msg-line);
    color: var(--bw-msg-text-3);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.bw-msg-modern-page .bw-msg-bubble--company,
body.bw-msg-modern-page .bw-msg-rich.bw-msg-bubble--company {
    background: #ffffff;
    color: var(--bw-msg-text-2);
    border: 1px solid var(--bw-msg-line);
    box-shadow: var(--bw-msg-shadow-sm);
}

body.bw-msg-modern-page .bw-msg-bubble--company .bw-msg-bubble-meta,
body.bw-msg-modern-page .bw-msg-bubble--company .bw-msg-sender {
    color: var(--bw-msg-text-3);
}

body.bw-msg-modern-page .bw-msg-bubble--candidate {
    background: var(--bw-msg-brand-gradient);
    color: #fff;
    box-shadow: var(--bw-msg-shadow-brand);
}

body.bw-msg-modern-page .bw-msg-compose {
    padding: 0.9rem 1rem 1rem;
    border-top-color: var(--bw-msg-line);
    background: rgba(255, 255, 255, 0.92);
}

body.bw-msg-modern-page .bw-msg-compose-box {
    border-color: var(--bw-msg-line);
    border-radius: 16px;
    background: var(--bw-msg-surface-2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.bw-msg-modern-page .bw-msg-compose-box:focus-within {
    border-color: var(--bw-msg-brand-light);
    background: var(--bw-msg-surface);
    box-shadow: 0 0 0 4px var(--bw-msg-focus-ring);
}

body.bw-msg-modern-page .bw-msg-compose textarea {
    color: var(--bw-msg-text);
}

body.bw-msg-modern-page .bw-msg-send-btn,
body.bw-msg-modern-page .btn.btn-primary,
body.bw-msg-modern-page .candidate-hero-btn.primary {
    border: none;
    border-radius: 13px;
    background: var(--bw-msg-brand-gradient);
    color: #fff;
    box-shadow: var(--bw-msg-shadow-brand);
}

body.bw-msg-modern-page .bw-msg-send-btn:hover,
body.bw-msg-modern-page .btn.btn-primary:hover,
body.bw-msg-modern-page .candidate-hero-btn.primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

body.bw-msg-modern-page .btn.btn-secondary {
    border: 1px solid var(--bw-msg-line);
    border-radius: 13px;
    background: var(--bw-msg-surface);
    color: var(--bw-msg-text-2);
}

body.bw-msg-modern-page .bw-interview-eval-cta,
body.bw-msg-modern-page .bw-meeting-counter-form,
body.bw-msg-modern-page .bw-msg-profile-card {
    border: 1px solid var(--bw-msg-line);
    border-radius: var(--bw-msg-radius);
    background: var(--bw-msg-surface);
    box-shadow: var(--bw-msg-shadow-sm);
}

body.bw-msg-modern-page .bw-msg-profile-col {
    padding: 1rem;
    background: linear-gradient(180deg, var(--bw-msg-surface-2), #ffffff);
}

body.bw-msg-modern-page .bw-msg-profile-card {
    padding: 1.15rem;
}

body.bw-msg-modern-page .bw-msg-profile-link {
    display: inline-flex;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--bw-msg-brand-border);
    border-radius: 999px;
    background: var(--bw-msg-brand-soft);
    color: var(--bw-msg-brand);
    text-decoration: none;
}

body.bw-msg-modern-page .bw-msg-profile-link:hover {
    background: var(--bw-msg-brand);
    color: #fff;
    text-decoration: none;
}

body.bw-msg-modern-page .bw-msg-chat-col--placeholder,
body.bw-msg-modern-page .bw-msg-empty.cu-empty {
    background:
        radial-gradient(420px 240px at 100% 0%, rgba(106, 171, 138, 0.12), transparent 58%),
        var(--bw-msg-surface);
    color: var(--bw-msg-text-3);
}

body.bw-msg-modern-page .bw-msg-empty.cu-empty {
    border: 1px solid var(--bw-msg-line);
    border-radius: var(--bw-msg-radius-lg);
    box-shadow: var(--bw-msg-shadow-sm);
}

body.bw-msg-modern-page .bw-msg-empty.cu-empty h2 {
    color: var(--bw-msg-text);
}

@media (max-width: 880px) {
    body.bw-msg-modern-page .bw-msg-modern-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    body.bw-msg-modern-page .bw-msg-modern-stats {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 768px) {
    body.bw-msg-modern-page.bw-msg-inbox-page--no-shell-hero .bw-msg-inbox-layout {
        height: clamp(420px, calc(100dvh - 14rem), 680px);
        max-height: clamp(420px, calc(100dvh - 14rem), 680px);
    }

    body.bw-msg-modern-page .bw-msg-wrap--inbox {
        padding: 0.6rem 0.6rem calc(var(--bw-bottom-tab-height, 4.35rem) + 1rem);
    }

    body.bw-msg-modern-page .bw-msg-modern-hero {
        padding: 1rem;
        border-radius: 22px;
    }

    body.bw-msg-modern-page .bw-msg-modern-stats span {
        flex: 1;
        min-width: 0;
    }
}
