/* IntraChat — paleta WhatsApp (verde/teal) + identidade do painel */
:root {
    --brand: #00a884;
    --brand-bright: #25d366;
    --brand-dark: #075e54;
    --wa-teal: #128c7e;
    --wa-dark: #111b21;
    --wa-panel: #202c33;
    --wa-chat: #efeae2;
    --surface: #ffffff;
    --ink: #111b21;
    --muted: #667781;
    --bg1: #00a884;
    --bg2: #25d366;
    --bs-primary: #00a884;
    --bs-primary-rgb: 0, 168, 132;
    --bs-link-color: #00a884;
    --bs-link-hover-color: #075e54;
    --bs-focus-ring-color: rgba(0, 168, 132, 0.35);
}

* { box-sizing: border-box; }

.app-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--wa-dark);
}

.app-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 18% 15%, rgba(37, 211, 102, 0.22), transparent 48%),
        radial-gradient(ellipse at 85% 0%, rgba(0, 168, 132, 0.28), transparent 42%),
        linear-gradient(165deg, #0b141a 0%, #111b21 48%, #075e54 140%);
    z-index: 0;
}

.app-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1.5rem;
}

@media (min-height: 720px) {
    .app-main {
        justify-content: center;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

.app-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem 1.75rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.app-card--wide {
    max-width: 560px;
}

.app-logo {
    margin: -2rem -1.75rem 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(165deg, #0b141a 0%, #111b21 55%, #075e54 140%);
    border-radius: 16px 16px 0 0;
    text-align: center;
}

.app-logo__img {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
}

.brand-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--bg2));
    color: #fff;
    font-size: 1.4rem;
}

.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
    background: var(--brand);
    border-color: var(--brand);
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
    color: var(--brand);
    border-color: var(--brand);
}
.btn-outline-primary:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(0, 168, 132, 0.22);
}

.app-footer {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
}
.app-footer a { color: rgba(255, 255, 255, 0.85); }

/* =========================================================================
   Admin — shell com sidebar vertical
   ========================================================================= */
.admin-shell {
    --admin-sidebar-w: 280px;
    --admin-bg: #efeae2;
    --admin-ink: #111b21;
    --admin-muted: #667781;
    margin: 0;
    min-height: 100vh;
    font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(0, 168, 132, 0.10), transparent 42%),
        var(--admin-bg);
    color: var(--admin-ink);
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--admin-sidebar-w);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    background: linear-gradient(185deg, #0b141a 0%, #111b21 48%, #075e54 160%);
    color: #e9edef;
    box-shadow: 8px 0 40px rgba(11, 20, 26, 0.28);
    transition: transform 0.28s ease;
}

.admin-sidebar__brand {
    padding: 1.25rem 1.15rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar__logo-wrap {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0.85rem 0.75rem;
    margin-bottom: 0.85rem;
}

.admin-sidebar__logo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 52px;
    object-fit: contain;
}

.admin-sidebar__app-name {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: #fff;
}

.admin-sidebar__app-sub {
    display: block;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.55);
    margin-top: 0.15rem;
}

.admin-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.1rem 0.85rem;
}

.admin-sidebar__label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(226, 232, 240, 0.4);
    margin: 0 0.65rem 0.55rem;
    font-weight: 600;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.72rem 0.9rem;
    border-radius: 10px;
    color: rgba(226, 232, 240, 0.78);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    transition: background 0.18s ease, color 0.18s ease;
}

.admin-nav-link i {
    width: 1.25rem;
    text-align: center;
    opacity: 0.85;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.admin-nav-link.is-active {
    background: linear-gradient(135deg, rgba(0, 168, 132, 0.38), rgba(37, 211, 102, 0.16));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.35);
}

.admin-nav-link.is-active i {
    color: #25d366;
    opacity: 1;
}

.admin-sidebar__footer {
    padding: 1rem 1.05rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-user__avatar {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: linear-gradient(135deg, #00a884, #25d366);
    color: #fff;
    flex-shrink: 0;
}

.admin-user__meta {
    min-width: 0;
}

.admin-user__meta strong {
    display: block;
    font-size: 0.88rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user__meta small {
    display: block;
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-logout {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-radius: 10px;
    font-size: 0.88rem;
    padding: 0.55rem 0.75rem;
}

.admin-logout:hover {
    background: rgba(220, 38, 38, 0.18);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.admin-main {
    margin-left: var(--admin-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.75rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.admin-topbar__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.admin-topbar__crumb {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: var(--admin-muted);
}

.admin-topbar__actions {
    margin-left: auto;
}

.admin-topbar__badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #075e54;
    background: #d9fdd3;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.admin-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #dbe2ea;
    border-radius: 11px;
    background: #fff;
    color: var(--admin-ink);
}

.admin-content {
    padding: 1.5rem 1.75rem 2.5rem;
    animation: adminFadeIn 0.35s ease;
}

@keyframes adminFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 16, 31, 0.45);
    z-index: 1035;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.35rem 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
    max-width: 560px;
}

/* Cartão padrão das telas do painel (listagens, formulários e indicadores). */
.panel-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.35rem 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.stat-label { font-size: 0.82rem; color: var(--admin-muted); font-weight: 500; }

.contact-row {
    cursor: pointer;
}

.contact-row:hover {
    background: rgba(0, 168, 132, 0.06);
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--admin-ink); letter-spacing: -0.03em; line-height: 1.15; margin-top: 0.35rem; }

/* Modal de pareamento: recorte quadrado para o QR (a página do gateway
   traz botões "undefined" e o iframe largo achatava a imagem). */
.qr-modal-stage {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 1.25rem auto 1rem;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
}

.qr-modal-frame {
    display: block;
    width: 360px;
    height: 560px;
    border: 0;
    background: #fff;
    /* Sobe o documento do gateway para esconder o botão/texto "undefined". */
    margin: -88px 0 0 -20px;
}

/* =========================================================================
   Divisões — etiqueta colorida reaproveitada em listas, filtros e formulários
   ========================================================================= */
.division-tag {
    --tag-color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tag-color);
    background: color-mix(in srgb, var(--tag-color) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--tag-color) 30%, #fff);
}

.division-tag--sm {
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
}

.division-dot {
    --tag-color: var(--brand);
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--tag-color);
    margin-right: 0.35rem;
}

.division-check {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 0.6rem 0.75rem 0.6rem 2.1rem;
}

.division-check:hover {
    background: rgba(59, 130, 246, 0.04);
}

.admin-content .table > :not(caption) > * > * {
    padding: 0.7rem 0.6rem;
}

.admin-content .table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-muted);
    font-weight: 600;
}

.chat-thread {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
}

.chat-bubble {
    max-width: 78%;
    padding: 0.55rem 0.75rem 0.45rem;
    border-radius: 10px;
    box-shadow: 0 1px 1px rgba(11, 20, 26, 0.08);
}

.chat-bubble--in {
    align-self: flex-start;
    background: #fff;
    border-top-left-radius: 2px;
}

.chat-bubble--out {
    align-self: flex-end;
    background: #d9fdd3;
    border-top-right-radius: 2px;
}

.chat-bubble__meta {
    font-size: 0.7rem;
    color: var(--admin-muted);
    margin-bottom: 0.2rem;
}

.chat-bubble__body {
    font-size: 0.92rem;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-105%);
    }

    .admin-shell.is-sidebar-open .admin-sidebar {
        transform: none;
    }

    .admin-shell.is-sidebar-open .admin-overlay {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-menu-btn {
        display: inline-grid;
        place-items: center;
    }

    .admin-topbar {
        padding: 0.85rem 1rem;
    }

    .admin-content {
        padding: 1.15rem 1rem 2rem;
    }

    .admin-topbar__badge {
        display: none;
    }
}

.inbox-desk {
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    gap: 1rem;
    align-items: start;
}

.inbox-desk__aside {
    max-height: calc(100vh - 10rem);
    overflow: auto;
}

.inbox-list__item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(17, 27, 33, 0.08);
    color: inherit;
    text-decoration: none;
}

.inbox-list__item:hover,
.inbox-list__item.is-active {
    background: rgba(0, 168, 132, 0.08);
}

.inbox-list__top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
}

.inbox-list__preview {
    font-size: 0.8rem;
    color: var(--admin-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-list__meta {
    margin-top: 0.25rem;
}

.chat-thread {
    max-height: calc(100vh - 22rem);
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .inbox-desk {
        grid-template-columns: 1fr;
    }
}

/* Mesa de atendimento (padrão Whaticket) */
.admin-shell--mesa {
    overflow: hidden;
}

.admin-shell--mesa .admin-main {
    height: 100vh;
    overflow: hidden;
}

.admin-topbar--mesa {
    padding: 0.55rem 1rem;
}

.admin-topbar--mesa .admin-topbar__title {
    font-size: 1.05rem;
}

.admin-topbar--mesa .admin-topbar__crumb {
    display: none;
}

.admin-content--mesa {
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    animation: none;
}

.wt-desk {
    display: grid;
    grid-template-columns: 360px 1fr;
    height: 100%;
    min-height: 0;
    background: #f0f2f5;
}

.wt-list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
    border-right: 1px solid #e0e0e0;
}

.wt-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.wt-tabs__item {
    flex: 1;
    text-align: center;
    padding: 0.85rem 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.wt-tabs__item.is-active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.wt-list__toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    flex-wrap: wrap;
}

.wt-divisao {
    max-width: 11rem;
    min-width: 7.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.35rem 0.45rem;
    font-size: 0.8rem;
    background: #fff;
    color: var(--admin-ink);
}

.wt-btn-novo {
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.wt-btn-novo:hover {
    color: #fff;
    background: var(--brand-dark);
}

.wt-filtro-meus {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: #fff;
    color: var(--admin-ink);
    white-space: nowrap;
}

.wt-filtro-meus.is-on {
    border-color: var(--brand);
    background: rgba(0, 168, 132, 0.12);
    color: var(--brand);
}
}

.wt-search {
    flex: 1;
}

.wt-search input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
}

.wt-subtabs {
    display: flex;
    gap: 1rem;
    padding: 0 0.85rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.wt-subtabs__item {
    position: relative;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0 0 0.35rem;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.wt-subtabs__item.is-active {
    color: var(--brand);
    font-weight: 600;
    border-bottom: 2px solid var(--brand);
}

.wt-badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.25rem;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.68rem;
}

.wt-list__items {
    flex: 1;
    overflow-y: auto;
}

.wt-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.75rem 0.7rem 0;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #f0f2f5;
    position: relative;
}

.wt-item:hover,
.wt-item.is-active {
    background: #f5f6f6;
}

.wt-item__bar {
    width: 4px;
    align-self: stretch;
    background: var(--fila-cor, #00a884);
    border-radius: 0 3px 3px 0;
    flex-shrink: 0;
}

.wt-item__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #cfd8dc;
    color: #37474f;
    display: grid;
    place-items: center;
    font-weight: 700;
    flex-shrink: 0;
}

.wt-item__avatar--lg {
    width: 40px;
    height: 40px;
}

.wt-item__body {
    flex: 1;
    min-width: 0;
}

.wt-item__row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
}

.wt-item__row strong {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-item__row time {
    font-size: 0.72rem;
    color: #667781;
    flex-shrink: 0;
}

.wt-item__preview {
    flex: 1;
}

.wt-unread {
    display: inline-grid;
    place-items: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--brand-bright);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.wt-empty {
    padding: 1.5rem 1rem;
    color: #667781;
    text-align: center;
    font-size: 0.9rem;
}

.wt-chat {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    background: #efeae2;
    position: relative;
}

.wt-chat__idle {
    flex: 1;
    display: grid;
    place-items: center;
    color: #667781;
    text-align: center;
}

.wt-chat__idle i {
    font-size: 3rem;
    color: #25d366;
    margin-bottom: 0.5rem;
}

.wt-chat__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    background: #f0f2f5;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    overflow: visible;
    z-index: 5;
}

.wt-chat__who {
    flex: 1;
    min-width: 0;
}

.wt-chat__who strong {
    display: block;
    font-size: 0.95rem;
}

.wt-chat__meta {
    display: block;
    font-size: 0.75rem;
    color: #667781;
}

.wt-chat__actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    position: relative;
    overflow: visible;
}

.wt-menu {
    position: relative;
}

.wt-head-btn--icon {
    min-width: 36px;
    min-height: 32px;
    padding: 0.28rem 0.5rem;
    text-transform: none;
    font-size: 1rem;
}

.wt-menu__drop {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    min-width: 280px;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(17, 27, 33, 0.18);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wt-menu__drop[hidden] {
    display: none !important;
}

.wt-menu__drop form {
    display: flex;
    gap: 0.4rem;
}

.wt-menu__drop input,
.wt-menu__drop select {
    flex: 1;
    min-width: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
}

.wt-head-btn {
    border: 1px solid #cfd8dc;
    background: #fff;
    border-radius: 4px;
    padding: 0.28rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.wt-head-btn--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.wt-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.28rem;
    position: relative;
    z-index: 6;
}

.wt-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 9.5rem;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.08rem 0.28rem 0.08rem 0.42rem;
    border-radius: 4px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-tag__x {
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.75;
    width: auto;
    height: auto;
    line-height: 1;
    font-size: 0.78rem;
    padding: 0 0.1rem;
    cursor: pointer;
}

.wt-tag__x:hover {
    opacity: 1;
}

.wt-tags__add {
    position: relative;
}

.wt-tags__plus {
    width: 1.35rem;
    height: 1.35rem;
    border: 1px dashed #b0bec5;
    border-radius: 4px;
    background: transparent;
    color: #667781;
    font-size: 0.65rem;
    line-height: 1;
    display: inline-grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
}

.wt-tags__plus:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.wt-tags__pop {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 50;
    width: 220px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 27, 33, 0.14);
    padding: 0.4rem;
}

.wt-tags__pop[hidden] {
    display: none !important;
}

.wt-tags__pop input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    outline: none;
    margin-bottom: 0.25rem;
}

.wt-tags__suggest {
    max-height: 180px;
    overflow-y: auto;
}

.wt-tags__opt {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
}

.wt-tags__opt:hover,
.wt-tags__opt--new {
    background: rgba(0, 168, 132, 0.08);
}

.wt-tags__dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.wt-tags__empty {
    display: block;
    padding: 0.35rem 0.45rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.wt-extra {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.wt-extra--stack {
    flex-direction: column;
}

.wt-extra input,
.wt-extra select {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
}

.chat-bubble--note {
    background: #fff8c5;
    border-top-right-radius: 2px;
}

.chat-bubble__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #8a6d1b;
    margin-bottom: 0.2rem;
}

.wt-modal {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(17, 27, 33, 0.45);
}

.wt-modal[hidden] {
    display: none !important;
}

.wt-modal__box {
    width: min(100%, 26rem);
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.1rem 1.05rem;
    box-shadow: 0 12px 32px rgba(17, 27, 33, 0.22);
}

.wt-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.wt-modal__hint {
    margin: 0.25rem 0 0.75rem;
    font-size: 0.8rem;
    color: #667781;
}

.wt-modal__box textarea,
.wt-modal__box select {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
}

.wt-modal__box textarea {
    resize: vertical;
    min-height: 6rem;
}

.wt-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.wt-thread-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background-color: #efeae2;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4cdc5' fill-opacity='0.35'%3E%3Ccircle cx='8' cy='8' r='1.2'/%3E%3Ccircle cx='32' cy='22' r='1'/%3E%3Ccircle cx='50' cy='40' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
}

.wt-thread.chat-thread {
    flex: 1;
    max-height: none;
    max-width: none;
    width: 100%;
    padding: 1rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
}

.wt-thread .chat-bubble {
    max-width: min(72%, 42rem);
}

.wt-thread .chat-bubble--in {
    align-self: flex-start;
    margin-right: auto;
}

.wt-thread .chat-bubble--out {
    align-self: flex-end;
    margin-left: auto;
}

.wt-thread .chat-bubble__meta {
    margin: 0.2rem 0 0;
    text-align: right;
}

.wt-typing {
    margin: 0;
    padding: 0 1.25rem 0.4rem;
    font-size: 0.78rem;
    color: #546e7a;
}

.wt-composer {
    background: #f0f2f5;
    border-top: 1px solid #e0e0e0;
}

.wt-composer--off {
    padding: 0.85rem;
    text-align: center;
    color: #667781;
}

.wt-canned {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem 0;
}

.wt-canned button {
    border: 1px solid #cfd8dc;
    background: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
}

.wt-composer__bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem 0.7rem;
}

.wt-composer__bar input[type="text"] {
    flex: 1;
    border: 0;
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    background: #fff;
    outline: none;
}

.wt-icon {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #546e7a;
    font-size: 1.1rem;
}

.wt-icon--send {
    color: var(--brand);
}

.wt-icon.is-on {
    color: var(--brand);
}

.wt-composer__bar--tpl {
    display: block;
    padding: 0.75rem 1rem 0.35rem;
}

.wt-composer__bar--tpl .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.wt-composer__bar--tpl .form-control,
.wt-composer__bar--tpl .form-select {
    background: #fff;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
}

.wt-tpl-fields {
    display: block;
    width: 100%;
    margin-top: 0.65rem;
}

.wt-tpl-fields input[type="text"] {
    width: 100%;
    flex: none;
    border: 1px solid #cfd8dc !important;
    background: #fff !important;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.wt-hide[hidden] {
    display: none !important;
}

.stat-value--sm {
    font-size: 1.35rem;
}

.rpt-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.2rem;
    height: 9rem;
}

.rpt-bars__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.rpt-bars__fill {
    width: 100%;
    min-height: 2px;
    background: var(--brand, #00a884);
    border-radius: 3px 3px 0 0;
}

.rpt-bars__lbl {
    font-size: 0.58rem;
    color: var(--muted, #667781);
    margin-top: 0.2rem;
}

.rpt-day {
    display: grid;
    grid-template-columns: 2.6rem 1fr 2rem;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.rpt-day__track {
    height: 0.45rem;
    background: #f0f2f5;
    border-radius: 99px;
    overflow: hidden;
}

.rpt-day__track span {
    display: block;
    height: 100%;
    background: var(--brand, #00a884);
    border-radius: 99px;
}

@media (max-width: 991.98px) {
    .wt-desk {
        grid-template-columns: 1fr;
    }

    .wt-list {
        max-height: 42vh;
    }
}

