:root {
    --wa-green: #00a884;
    --wa-green-dark: #008069;
    --wa-light-green: #d9fdd3;
    --wa-bg: #f0f2f5;
    --wa-chat-bg: #efeae2;
    --wa-panel: #ffffff;
    --wa-border: #e9edef;
    --wa-text: #111b21;
    --wa-muted: #667781;
    --wa-hover: #f5f6f6;
    --wa-active: #f0f2f5;
    --danger: #dc3545;
    --shadow: 0 6px 24px rgba(11, 20, 26, .08);
    --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    background: #eef2f1;
    color: var(--wa-text);
    font-size: 14px;
    overflow-x: hidden;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: .6;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d7dfdc;
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--wa-text);
    background: #fff;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--wa-green-dark);
    box-shadow: 0 0 0 3px rgba(0, 128, 105, .12);
}

/* Layout administrativo padrão */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0f3d35, #0a2c26);
    color: #fff;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--wa-green);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.brand strong {
    display: block;
    color: #fff;
    font-weight: 900;
    line-height: 1.1;
}

.brand span {
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 12px;
    font-weight: 650;
}

.nav a:hover {
    background: rgba(255, 255, 255, .13);
}

.sidebar-user {
    margin-top: auto;
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-user strong,
.sidebar-user span {
    display: block;
}

.sidebar-user span {
    color: rgba(255, 255, 255, .75);
    font-size: 12px;
    margin-top: 2px;
}

.sidebar-user a {
    display: inline-block;
    margin-top: 10px;
    color: #fff;
}

.main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 20px;
}

.page-conversations .main {
    margin-left: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.page-conversations .sidebar {
    display: none;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.card,
.panel,
.page-card {
    background: #fff;
    border: 1px solid #d7dfdc;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.grid,
.cards-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric strong {
    display: block;
    font-size: 26px;
}

.form-grid,
.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table,
.table {
    width: 100%;
    border-collapse: collapse;
}

th,
td,
.table th,
.table td {
    padding: 11px 10px;
    border-bottom: 1px solid #edf1ef;
    text-align: left;
    vertical-align: top;
}

th,
.table th {
    color: var(--wa-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    background: #f7f9f8;
}

.btn,
button.primary,
.btn-primary,
.wa-btn {
    border: 1px solid #d1d7db;
    background: #fff;
    color: var(--wa-text);
    border-radius: 10px;
    min-height: 38px;
    padding: 8px 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn.primary,
button.primary,
.btn-primary,
.wa-btn-primary {
    background: var(--wa-green-dark);
    border-color: var(--wa-green-dark);
    color: #fff;
}

.btn.small,
.btn-sm {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.alert.success,
.alert-success {
    background: #d9fdd3;
    color: #064c3f;
}

.alert.danger,
.alert-danger {
    background: #fde4e4;
    color: #8a1f1f;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    background: #eef3f2;
    color: var(--wa-muted);
    font-size: 12px;
    font-weight: 800;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 26px;
}

.login-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--wa-green-dark);
    color: #fff;
    font-weight: 900;
    margin-bottom: 12px;
}

/* Tela de conversas estilo WhatsApp Web */
.wa-shell {
    height: 100vh;
    width: 100vw;
    display: grid;
    grid-template-columns: 423px minmax(0, 1fr);
    background: var(--wa-bg);
    overflow: hidden;
}

.wa-sidebar {
    min-width: 0;
    min-height: 0;
    background: var(--wa-panel);
    border-right: 1px solid var(--wa-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wa-sidebar-header {
    height: 60px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f2f4f5;
    background: #fff;
}

.wa-logo {
    color: #1fa855;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -.3px;
}

.wa-sidebar-actions,
.wa-chat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-icon-btn,
.wa-round-btn {
    border: 0;
    background: transparent;
    color: #54656f;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
}

.wa-icon-btn:hover,
.wa-round-btn:hover {
    background: #f0f2f5;
}

.wa-menu-wrap,
.wa-filter-more {
    position: relative;
}

.wa-menu,
.wa-filter-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--wa-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
    border-radius: 12px;
    padding: 6px;
    z-index: 50;
}

.wa-menu a,
.wa-filter-menu button {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    color: var(--wa-text);
    text-align: left;
    text-decoration: none;
    border-radius: 8px;
    padding: 10px 12px;
}

.wa-menu a:hover,
.wa-filter-menu button:hover {
    background: var(--wa-hover);
}

.wa-search-wrap {
    margin: 8px 12px 10px;
    min-height: 40px;
    border-radius: 20px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    color: var(--wa-muted);
}

.wa-search-wrap input {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    height: 38px;
}

.wa-search-wrap input:focus {
    box-shadow: none;
}

.wa-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.wa-filters::-webkit-scrollbar {
    display: none;
}

.wa-filters button,
.wa-filter-more > button {
    border: 1px solid #e4e9eb;
    background: #fff;
    color: #54656f;
    border-radius: 18px;
    padding: 7px 12px;
    white-space: nowrap;
    font-weight: 700;
}

.wa-filters button.active {
    background: #e7fce3;
    color: #008069;
    border-color: #b7efb0;
}

.wa-archived {
    border: 0;
    width: 100%;
    height: 52px;
    background: #fff;
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 16px 0 12px;
    color: var(--wa-text);
    text-align: left;
}

.wa-archived:hover {
    background: var(--wa-hover);
}

.wa-archived-icon {
    color: #54656f;
    text-align: center;
}

.wa-archived strong {
    color: var(--wa-muted);
    font-size: 12px;
}

.wa-conversation-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
}

.wa-conversation {
    width: 100%;
    border: 0;
    background: #fff;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 72px;
    padding: 0;
    color: var(--wa-text);
    text-align: left;
}

.wa-conversation:hover {
    background: var(--wa-hover);
}

.wa-conversation.active {
    background: var(--wa-active);
}

.wa-avatar {
    width: 49px;
    height: 49px;
    border-radius: 50%;
    align-self: center;
    justify-self: center;
    background: #f5e5bd;
    color: #996b14;
    border: 1px solid #ecd29d;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
}

.wa-avatar-lg {
    width: 40px;
    height: 40px;
    font-size: 12px;
}

.wa-conv-main {
    min-width: 0;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 12px 0 0;
}

.wa-conv-top,
.wa-conv-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.wa-conv-top strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 16px;
    font-weight: 500;
}

.wa-conv-top time {
    flex: 0 0 auto;
    color: var(--wa-muted);
    font-size: 12px;
}

.wa-conversation:has(.wa-unread) .wa-conv-top time {
    color: #00a884;
    font-weight: 800;
}

.wa-conv-bottom {
    margin-top: 4px;
}

.wa-preview {
    min-width: 0;
    color: #667781;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
}

.wa-unread {
    flex: 0 0 auto;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
}

.wa-list-empty {
    padding: 28px 18px;
    color: var(--wa-muted);
    text-align: center;
    line-height: 1.45;
}

.wa-sidebar-footer {
    border-top: 1px solid #f0f2f5;
    padding: 10px 14px;
    background: #fff;
}

.wa-sidebar-footer a {
    color: var(--wa-green-dark);
    text-decoration: none;
    font-weight: 800;
}

.wa-chat {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--wa-chat-bg);
    position: relative;
    overflow: hidden;
}

.wa-chat::before {
    content: "";
    position: absolute;
    inset: 60px 0 62px;
    pointer-events: none;
    opacity: .48;
    background-image:
        url("data:image/svg+xml,%3Csvg width='96' height='96' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d3c8bb' stroke-width='1' opacity='.45'%3E%3Cpath d='M12 15h20v14H12zM58 12c7 0 13 6 13 13S65 38 58 38s-13-6-13-13 6-13 13-13zM10 68c12-10 26-10 38 0M68 62l13 13M81 62 68 75M24 45c5 0 9 4 9 9s-4 9-9 9-9-4-9-9 4-9 9-9z'/%3E%3C/g%3E%3C/svg%3E");
}

.wa-chat-header {
    height: 60px;
    flex: 0 0 60px;
    padding: 0 16px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d1d7db;
    position: relative;
    z-index: 2;
}

.wa-chat-contact {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.wa-chat-title {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-chat-subtitle {
    margin-top: 2px;
    color: var(--wa-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(760px, 60vw);
}

.wa-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 56px 16px;
    position: relative;
    z-index: 1;
}

.empty-state {
    display: grid;
    place-items: center;
}

.wa-empty-card {
    display: grid;
    gap: 8px;
    text-align: center;
    color: var(--wa-muted);
    background: rgba(255, 255, 255, .72);
    border-radius: 18px;
    padding: 26px;
}

.wa-empty-card strong {
    color: var(--wa-text);
    font-size: 16px;
}

.wa-empty-icon {
    font-size: 38px;
}

.wa-message {
    clear: both;
    width: fit-content;
    max-width: min(540px, 66%);
    margin: 0 0 4px;
    padding: 6px 8px 4px;
    border-radius: 7.5px;
    box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
    position: relative;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.32;
    font-size: 14px;
}

.wa-message.in {
    float: left;
    background: #fff;
    border-top-left-radius: 0;
    margin-right: auto;
}

.wa-message.out {
    float: right;
    background: var(--wa-light-green);
    border-top-right-radius: 0;
    margin-left: auto;
}

.wa-message-content {
    display: block;
}

.wa-msg-sender {
    display: block;
    margin-bottom: 2px;
    color: var(--wa-green-dark);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
}

.wa-msg-meta {
    float: right;
    margin: 3px 0 0 8px;
    color: var(--wa-muted);
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
}

.wa-status-read {
    color: #53bdeb;
    font-weight: 900;
}

.wa-status-failed {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--danger);
    color: #fff;
    font-weight: 900;
    font-size: 10px;
}

.wa-message.type-image,
.wa-message.type-video,
.wa-message.type-audio,
.wa-message.type-document,
.wa-message.type-location {
    padding: 4px;
    max-width: 340px;
}

.wa-message.type-sticker {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 150px;
}

.wa-message-image {
    display: block;
    max-width: 245px;
    max-height: 300px;
    object-fit: contain;
    border-radius: 6px;
}

.wa-message-sticker {
    display: block;
    max-width: 132px;
    max-height: 132px;
    object-fit: contain;
}

.wa-message-video {
    display: block;
    max-width: 260px;
    max-height: 290px;
    border-radius: 6px;
}

.wa-message-caption {
    margin-top: 4px;
}

.wa-audio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 285px;
}

.wa-audio-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #d6f6d0;
    color: #00a884;
    display: grid;
    place-items: center;
}

.wa-audio-card audio {
    width: 225px;
    height: 34px;
}

.wa-document-link,
.wa-location-card {
    display: grid;
    gap: 6px;
    background: rgba(255, 255, 255, .38);
    color: var(--wa-text);
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
}

.wa-location-card a {
    color: var(--wa-green-dark);
    font-weight: 800;
    text-decoration: none;
}

.wa-composer-wrap {
    flex: 0 0 auto;
    background: #f0f2f5;
    padding: 8px 10px;
    border-top: 1px solid #d1d7db;
    position: relative;
    z-index: 3;
}

.wa-composer {
    display: grid;
    grid-template-columns: 40px 40px minmax(0, 1fr) 42px;
    align-items: end;
    gap: 8px;
}

.wa-composer textarea {
    height: 42px;
    min-height: 42px;
    max-height: 120px;
    resize: none;
    border: 0;
    border-radius: 21px;
    padding: 11px 16px;
    background: #fff;
    box-shadow: none;
    overflow-y: auto;
}

.wa-send-btn {
    background: var(--wa-green-dark);
    color: #fff;
    font-size: 18px;
}

.wa-extra-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 8px 48px;
}

.wa-extra-panel[hidden],
.wa-form-panel[hidden],
.wa-paste-preview[hidden] {
    display: none !important;
}

.wa-extra-action {
    border: 1px solid #d1d7db;
    background: #fff;
    border-radius: 18px;
    padding: 8px 12px;
    color: var(--wa-text);
    font-weight: 800;
}

.wa-form-panel {
    background: #fff;
    border: 1px solid #d1d7db;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 8px 22px rgba(11, 20, 26, .08);
}

.wa-form-panel strong {
    display: block;
    margin-bottom: 8px;
}

.wa-form-grid {
    display: grid;
    gap: 10px;
    align-items: end;
}

.media-row {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr) auto;
}

.audio-actions {
    grid-template-columns: minmax(220px, 1fr) auto auto auto minmax(140px, auto);
}

.sticker-row {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.location-row {
    grid-template-columns: 130px 130px minmax(150px, 1fr) minmax(180px, 1fr) auto auto;
}

.template-row {
    grid-template-columns: 240px minmax(240px, 1fr) auto;
}

.wa-paste-preview {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    background: #fff;
    border: 1px solid #d1d7db;
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 8px;
}

.wa-paste-thumb {
    width: 86px;
    height: 86px;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #f0f2f5;
}

.wa-paste-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wa-paste-body {
    display: grid;
    gap: 8px;
}

.wa-paste-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wa-muted {
    color: var(--wa-muted);
    font-size: 12px;
}

.wa-conversation-list::-webkit-scrollbar,
.wa-messages::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.wa-conversation-list::-webkit-scrollbar-thumb,
.wa-messages::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(11, 20, 26, .22);
    border-radius: 999px;
}

.wa-conversation-list::-webkit-scrollbar-track,
.wa-messages::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

@media (max-width: 1200px) {
    .wa-shell {
        grid-template-columns: 360px minmax(0, 1fr);
    }

    .wa-messages {
        padding-left: 28px;
        padding-right: 28px;
    }

    .media-row,
    .audio-actions,
    .location-row,
    .template-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .wa-shell {
        grid-template-columns: 1fr;
    }

    .wa-sidebar {
        display: none;
    }

    .wa-shell:not(.has-active-chat) .wa-sidebar {
        display: flex;
    }

    .wa-shell:not(.has-active-chat) .wa-chat {
        display: none;
    }

    .wa-chat-subtitle {
        max-width: 58vw;
    }

    .wa-message {
        max-width: 88%;
    }

    .wa-messages {
        padding: 10px 12px 14px;
    }

    .wa-composer {
        grid-template-columns: 36px 36px minmax(0, 1fr) 40px;
        gap: 6px;
    }
}

@media (max-width: 740px) {
    .main {
        margin-left: 0;
        padding: 14px;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        min-height: auto;
    }

    .form-grid,
    .split,
    .grid,
    .cards-4 {
        grid-template-columns: 1fr;
    }
}

/* ======================================================================
   CORRECAO - Conversas WhatsApp Web compacto
   Mantem o layout .wa-* e compacta as bolhas sem quebrar a tela.
   ====================================================================== */
.wa-messages {
    padding: 12px 42px 14px !important;
}

.wa-message {
    width: -moz-fit-content !important;
    width: fit-content !important;
    min-width: 0 !important;
    max-width: min(430px, 58%) !important;
    padding: 5px 7px 4px !important;
    margin: 0 0 3px !important;
    border-radius: 7.5px !important;
    font-size: 14px !important;
    line-height: 1.26 !important;
}

.wa-message.type-text,
.wa-message.type-template {
    max-width: min(430px, 58%) !important;
}

.wa-message-content {
    display: inline !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

.wa-msg-sender {
    display: block !important;
    margin: 0 0 2px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
}

.wa-msg-meta {
    float: right !important;
    margin: 2px 0 0 8px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.wa-message.type-image,
.wa-message.type-video,
.wa-message.type-audio,
.wa-message.type-document,
.wa-message.type-location {
    padding: 4px !important;
    max-width: 300px !important;
}

.wa-message-image {
    max-width: 220px !important;
    max-height: 280px !important;
}

.wa-message-video {
    max-width: 230px !important;
    max-height: 260px !important;
}

.wa-audio-card {
    min-width: 240px !important;
}

.wa-audio-card audio {
    width: 210px !important;
    max-width: 52vw !important;
    height: 34px !important;
}

.wa-message.type-sticker {
    max-width: 130px !important;
}

.wa-message-sticker {
    max-width: 120px !important;
    max-height: 120px !important;
}

@media (max-width: 1100px) {
    .wa-messages {
        padding: 12px 18px 14px !important;
    }

    .wa-message,
    .wa-message.type-text,
    .wa-message.type-template {
        max-width: min(420px, 74%) !important;
    }
}

@media (max-width: 640px) {
    .wa-messages {
        padding: 10px !important;
    }

    .wa-message,
    .wa-message.type-text,
    .wa-message.type-template {
        max-width: 88% !important;
    }

    .wa-audio-card {
        min-width: 220px !important;
    }

    .wa-audio-card audio {
        width: 190px !important;
        max-width: 76vw !important;
    }
}

/* Módulo de campanhas */
.card h2 { margin-top: 0; }
.card label { font-weight: 700; color: var(--wa-text); }
.card label input,
.card label select,
.card label textarea { margin-top: 6px; font-weight: 500; }
.metric span { color: var(--wa-muted); font-weight: 800; font-size: 12px; text-transform: uppercase; }
.badge + .badge { margin-top: 4px; }
@media (max-width: 1100px) {
    .grid,
    .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    :root { --sidebar-width: 0px; }
    .sidebar { position: static; width: 100%; height: auto; }
    .main { margin-left: 0; padding: 14px; }
    .grid,
    .cards-4,
    .form-grid,
    .split { grid-template-columns: 1fr; }
    .page-header { align-items: flex-start; flex-direction: column; }
}
