/* ═══════════════════════════════════════════════════════════════
   F&A SEGUROS — WEBMAIL CORPORATIVO EVOLUTION (FASE 0 A 6)
   Design System Premium, Glassmorphism, Conversas Gmail e Árvore
   ═══════════════════════════════════════════════════════════════ */

/* Base View */
#view-webmail {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 110px);
    margin: -2rem;
    padding: 16px 20px;
    background: #050d1a;
    transition: background 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#view-webmail.hidden {
    display: none !important;
}

/* Canvas 3D Full Background */
#webmail-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    outline: none;
    pointer-events: none;
}

/* Vinheta de Profundidade */
#webmail-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(5, 13, 26, 0.70) 100%);
}

/* Estrutura Interna */
.webmail-inner-wrapper {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    min-height: 0;
    gap: 12px;
}

/* Barra Superior / Topbar */
.webmail-top-bar {
    position: relative;
    z-index: 3;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px;
    padding: 10px 18px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    flex-wrap: wrap;
}

/* Seletor de Contas Autorizadas */
.wm-account-select {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 240px;
}

.wm-account-select:hover, .wm-account-select:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: #3b82f6;
}

.wm-account-select option {
    background: #0f172a;
    color: #f8fafc;
}

/* Busca Global & Popover Avançado */
.webmail-search-box {
    flex: 1;
    max-width: 460px;
    position: relative;
    display: flex;
    align-items: center;
}

.webmail-search-box i.fa-magnifying-glass {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    pointer-events: none;
}

.webmail-search-box input {
    width: 100%;
    padding: 8px 38px 8px 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.webmail-search-box input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.wm-search-adv-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.wm-search-adv-btn:hover {
    color: #3b82f6;
    background: rgba(255, 255, 255, 0.1);
}

/* Popover de Filtros Avançados */
.wm-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 340px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wm-popover-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #38bdf8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.wm-popover-field label {
    font-size: 0.76rem;
    color: #94a3b8;
    margin-bottom: 3px;
    display: block;
}

.wm-popover-field input[type="text"] {
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    font-size: 0.82rem;
}

.wm-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

/* Ações e Alternadores Topbar */
.webmail-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wm-view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.wm-toggle-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.wm-toggle-btn:hover {
    color: #fff;
}

.wm-toggle-btn.active {
    background: #3b82f6;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.wm-sync-pill {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.wm-sync-pill.syncing {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.wm-sync-pill.syncing i {
    animation: fa-spin 1.2s infinite linear;
}

.wm-btn-icon {
    padding: 7px 12px;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.webmail-btn-compose {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.webmail-btn-compose:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55);
}

/* Layout dos 3 Painéis */
.webmail-container {
    display: flex;
    gap: 12px;
    flex: 1;
    height: calc(100vh - 280px);
    min-height: 460px;
    overflow: hidden;
}

.wm-ribbon-container.compact + .webmail-container {
    height: calc(100vh - 235px);
}

/* 1. Barra Lateral / Pastas e Visões */
.webmail-sidebar {
    width: 230px;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
}

.wm-nav-section-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 10px 2px 10px;
}

.wm-nav-section-header {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
    padding: 6px 10px 2px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wm-mini-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wm-mini-btn:hover {
    color: #3b82f6;
    background: rgba(255, 255, 255, 0.1);
}

.webmail-folder {
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.webmail-folder:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.webmail-folder.active {
    background: rgba(59, 130, 246, 0.22);
    color: #60a5fa;
    font-weight: 600;
    border-color: rgba(59, 130, 246, 0.35);
    border-left: 3px solid #3b82f6;
}

.webmail-folder .badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    display: none;
}

/* Árvore Hierárquica de Subpastas */
.wm-folder-tree {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wm-tree-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.2s ease;
    gap: 6px;
    position: relative;
}

.wm-tree-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.wm-tree-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    font-weight: 600;
}

.wm-tree-arrow {
    width: 14px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.wm-tree-children {
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wm-tree-item-actions {
    margin-left: auto;
    display: none;
    gap: 4px;
}

.wm-tree-item:hover .wm-tree-item-actions {
    display: flex;
}

.wm-tree-item-actions button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 2px 4px;
    border-radius: 4px;
}

.wm-tree-item-actions button:hover {
    color: #3b82f6;
    background: rgba(255, 255, 255, 0.12);
}

/* Etiquetas (Labels) */
.wm-labels-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wm-label-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wm-label-pill:hover {
    background: rgba(255, 255, 255, 0.08);
}

.wm-label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Informações do Usuário */
.webmail-user-info {
    margin-top: auto;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    word-break: break-all;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.webmail-user-info b {
    color: #f8fafc;
    font-weight: 600;
}

/* 2. Coluna Central / Lista de Mensagens e Conversas */
.webmail-list-col {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* Barra de Ações em Lote */
.wm-batch-bar {
    background: rgba(30, 58, 138, 0.6);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    animation: fadeIn 0.2s ease;
}

.wm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #e2e8f0;
    cursor: pointer;
}

.wm-batch-btns {
    display: flex;
    gap: 6px;
}

.wm-batch-btns button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.wm-batch-btns button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.wm-batch-btns button.del:hover {
    background: #ef4444;
    border-color: #ef4444;
}

/* Cabeçalho da Lista */
.wm-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wm-icon-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.wm-icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Lista de Itens (Scrollável) */
.webmail-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.webmail-list::-webkit-scrollbar {
    width: 6px;
}
.webmail-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Cartão de Mensagem / Thread */
.webmail-item {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.webmail-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.webmail-item.unread {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid #3b82f6;
}

.webmail-item.active {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Densidade Compacta */
.webmail-list.compact .webmail-item,
.wm-density-compact .webmail-item {
    padding: 6px 12px;
    gap: 2px;
}
.wm-density-compact .wm-item-snippet {
    display: none;
}

.wm-item-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wm-star-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 2px;
    transition: all 0.2s ease;
}

.wm-star-btn:hover, .wm-star-btn.starred {
    color: #eab308;
}

.wm-item-avatar-mini {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.74rem;
    flex-shrink: 0;
}

.wm-item-sender-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.wm-thread-count-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: 4px;
}

.wm-item-date {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.wm-item-subject {
    font-size: 0.84rem;
    color: #e2e8f0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.webmail-item.unread .wm-item-subject {
    font-weight: 700;
    color: #fff;
}

.wm-item-snippet {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wm-item-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.wm-badge-clip {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.wm-badge-fu {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* 3. Painel Leitor (Thread / Mensagem Individual) */
.webmail-reader {
    flex: 1;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.webmail-reader-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95rem;
}

.wm-reader-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.wm-reader-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wm-reader-subject {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
}

.wm-reader-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wm-btn-action {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.wm-btn-action:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.wm-btn-action.primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* Accordion de Conversas (Estilo Gmail) */
.wm-thread-timeline {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wm-thread-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.wm-thread-card.expanded {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.wm-thread-card-header {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wm-thread-card-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.wm-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wm-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.85rem;
}

.wm-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #f8fafc;
}

.wm-card-email {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

.wm-thread-card-body {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wm-thread-card-body iframe {
    width: 100%;
    min-height: 180px;
    border: none;
    border-radius: 8px;
    background: #ffffff;
}

.wm-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Área de Resposta Inline na Conversa */
.wm-thread-inline-reply {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Anexos */
.wm-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.wm-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #60a5fa;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wm-attachment-item:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #93c5fd;
}

/* Toast de Desfazer Envio (Undo Send) */
.wm-undo-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.wm-undo-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #f8fafc;
}

.wm-undo-btn {
    background: #eab308;
    color: #0f172a;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wm-undo-btn:hover {
    background: #facc15;
}

/* ═══════════════════════════════════════════════════════════════
   CAIXA FLUTUANTE DE COMPOSIÇÃO PREMIUM (ESTILO FINTECH 2026 / GMAIL PRO)
   ═══════════════════════════════════════════════════════════════ */
.wm-compose-floating {
    position: fixed;
    bottom: 18px;
    right: 24px;
    width: 640px;
    height: 620px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 36px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 32px rgba(37, 99, 235, 0.14);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), height 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.28s cubic-bezier(0.16, 1, 0.3, 1), right 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    animation: wmComposeSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wm-compose-floating.minimized {
    width: 300px !important;
    height: 48px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.wm-compose-floating.minimized .wm-compose-body {
    display: none !important;
}

.wm-compose-floating.maximized {
    width: 92vw !important;
    height: 90vh !important;
    max-width: 1280px !important;
    max-height: 94vh !important;
    bottom: 5vh !important;
    right: 4vw !important;
    border-radius: 18px !important;
    box-shadow: 0 35px 80px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Header da Caixa de Composição */
.wm-compose-header {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.75) 100%);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 12px;
}

.wm-compose-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
}

.wm-compose-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    flex-shrink: 0;
}

.wm-compose-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wm-compose-from-badge {
    font-size: 0.74rem;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2px 9px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.wm-compose-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.wm-win-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.18s ease;
}

.wm-win-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-1px);
}

.wm-win-btn.wm-win-close:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
}

/* Corpo e Formulário */
.wm-compose-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: #080e1b;
    position: relative;
    overflow: hidden;
}

#form-webmail-compose {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    min-height: 0;
    position: relative;
}

/* Campos de Destinatário e Assunto */
.wm-compose-field {
    display: flex;
    align-items: center;
    padding: 7px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 10px;
    background: rgba(15, 23, 42, 0.45);
    transition: background 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.wm-compose-field:focus-within {
    background: rgba(15, 23, 42, 0.8);
    border-bottom-color: rgba(59, 130, 246, 0.35);
}

.wm-field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    width: 36px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
    margin: 0;
}

.wm-chips-container {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    cursor: text;
}

.wm-chips-container input {
    flex: 1;
    min-width: 140px;
    border: none !important;
    background: transparent !important;
    color: #f8fafc !important;
    font-size: 0.88rem !important;
    outline: none !important;
    padding: 4px 0 !important;
    box-shadow: none !important;
    margin: 0;
}

.wm-chips-container input::placeholder {
    color: #475569;
}

/* Chips de Contatos */
.wm-chip {
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.38);
    color: #bfdbfe;
    padding: 2px 8px 2px 4px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    animation: wmChipIn 0.2s ease;
    max-width: 240px;
}

.wm-chip-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.wm-chip-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wm-chip-remove {
    cursor: pointer;
    font-size: 0.72rem;
    color: #93c5fd;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    transition: all 0.15s ease;
}

.wm-chip-remove:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Botões de Alternância Cc / Cco */
.wm-compose-toggle-links {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.wm-toggle-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.wm-toggle-pill:hover, .wm-toggle-pill.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: #3b82f6;
}

.wm-field-close-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s ease;
}

.wm-field-close-btn:hover {
    color: #ef4444;
}

/* Campo Assunto */
.wm-subject-field {
    padding: 9px 16px;
    background: rgba(15, 23, 42, 0.3);
}

.wm-subject-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    color: #f8fafc !important;
    font-size: 0.96rem !important;
    font-weight: 500 !important;
    outline: none !important;
    padding: 3px 0 !important;
    box-shadow: none !important;
}

.wm-subject-input::placeholder {
    color: #64748b;
}

.wm-priority-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px 8px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.18s ease;
}

.wm-priority-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.wm-priority-btn.active {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* ─── INTEGRAÇÃO DO QUILL EDITOR EM DARK MODE ─── */
.wm-editor-wrapper {
    background: #080e1b;
    flex: 1;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.ql-toolbar.ql-snow {
    background: rgba(15, 23, 42, 0.85) !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 6px 12px !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.ql-toolbar.ql-snow.collapsed {
    display: none !important;
}

.ql-snow .ql-stroke {
    stroke: #94a3b8 !important;
}

.ql-snow .ql-fill {
    fill: #94a3b8 !important;
}

.ql-snow .ql-picker {
    color: #94a3b8 !important;
    font-size: 0.82rem !important;
}

.ql-snow.ql-toolbar button:hover, .ql-snow.ql-toolbar button.ql-active {
    background: rgba(56, 189, 248, 0.14) !important;
    border-radius: 5px !important;
}

.ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke {
    stroke: #38bdf8 !important;
}

.ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill {
    fill: #38bdf8 !important;
}

.ql-container.ql-snow {
    border: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 14px !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ql-editor {
    flex: 1;
    overflow-y: auto;
    color: #f1f5f9 !important;
    padding: 14px 18px !important;
    line-height: 1.65 !important;
    outline: none !important;
}

.ql-editor.ql-blank::before {
    color: #475569 !important;
    font-style: normal !important;
    left: 18px !important;
}

/* Lista de Anexos em Cards */
.wm-attached-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 110px;
    overflow-y: auto;
}

.wm-attachment-card {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #f1f5f9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.wm-attachment-card:hover {
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.85);
}

.wm-att-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wm-att-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wm-att-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.wm-att-size {
    font-size: 0.68rem;
    color: #94a3b8;
}

.wm-att-del {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.82rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.wm-att-del:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.18);
}

/* Drag Overlay */
.wm-compose-drag-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(8px);
    border: 2px dashed #3b82f6;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #60a5fa;
    font-size: 1rem;
    font-weight: 600;
    pointer-events: none;
    animation: fadeIn 0.2s ease;
}

.wm-compose-drag-overlay i {
    font-size: 2.5rem;
}

/* Rodapé da Composição */
.wm-compose-footer {
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.97);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 5;
    position: relative;
}

.wm-footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wm-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wm-send-group {
    display: flex;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.wm-btn-send-main {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 18px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.wm-btn-send-main:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.6) !important;
}

.wm-btn-send-arrow {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border: none !important;
    border-left: 1px solid rgba(255, 255, 255, 0.25) !important;
    padding: 8px 11px !important;
    font-size: 0.78rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.wm-btn-send-arrow:hover {
    background: #1e3a8a !important;
    color: #fff !important;
}

.wm-toolbar-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wm-tool-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.92rem;
    transition: all 0.18s ease;
    position: relative;
    margin: 0;
}

.wm-tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #38bdf8;
    border-color: rgba(255, 255, 255, 0.08);
}

.wm-tool-btn.active {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

.wm-tool-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #3b82f6;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

.wm-autosave-info {
    font-size: 0.76rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.wm-btn-discard {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 7px;
    transition: all 0.18s ease;
}

.wm-btn-discard:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

/* Dropdown Autocomplete */
.wm-autocomplete-dropdown {
    position: absolute;
    top: 44px;
    left: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.75);
    z-index: 1020;
    max-height: 220px;
    overflow-y: auto;
    padding: 5px;
}

.wm-contact-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.84rem;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.wm-contact-item:hover, .wm-contact-item.active {
    background: rgba(59, 130, 246, 0.2);
}

/* Popovers Flutuantes (Modelos & Emojis) */
.wm-floating-popover {
    position: absolute;
    bottom: 58px;
    left: 16px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8);
    z-index: 1020;
    width: 320px;
    overflow: hidden;
    animation: wmPopoverIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.wm-popover-header {
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #f8fafc;
    background: rgba(30, 41, 59, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wm-popover-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
}

.wm-popover-item {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.15s ease;
}

.wm-popover-item:hover {
    background: rgba(59, 130, 246, 0.15);
}

.wm-popover-item strong {
    font-size: 0.84rem;
    color: #f1f5f9;
}

.wm-popover-item small {
    font-size: 0.72rem;
    color: #94a3b8;
}

.wm-emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px;
}

.wm-emoji-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.25rem;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wm-emoji-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.15);
}

/* Animações */
@keyframes wmComposeSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wmPopoverIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wmChipIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsividade */
@media (max-width: 1024px) {
    .webmail-sidebar {
        width: 190px;
    }
    .webmail-list-col {
        width: 320px;
    }
}

@media (max-width: 768px) {
    #view-webmail {
        margin: -1rem;
        padding: 10px;
    }
    .webmail-container {
        flex-direction: column;
        height: auto;
    }
    .webmail-sidebar {
        width: 100%;
        max-height: 200px;
    }
    .webmail-list-col {
        width: 100%;
        max-height: 350px;
    }
    .webmail-reader {
        width: 100%;
        min-height: 350px;
    }
    .wm-compose-floating {
        width: 100vw;
        right: 0;
        border-radius: 14px 14px 0 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MENU DE CONTEXTO ESTILO OUTLOOK (CLIQUE COM BOTÃO DIREITO / ...)
   ═══════════════════════════════════════════════════════════════ */
.wm-context-menu {
    position: fixed;
    z-index: 99999;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.3);
    width: 236px;
    padding: 5px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.86rem;
    color: #f4f4f5;
    user-select: none;
    animation: wmCtxFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.wm-ctx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    position: relative;
    gap: 10px;
    line-height: 1.35;
}

.wm-ctx-item:hover, .wm-ctx-item.active {
    background: #2d2d30;
    color: #ffffff;
}

.wm-ctx-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.wm-ctx-icon {
    width: 16px;
    text-align: center;
    font-size: 0.92rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wm-ctx-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-weight: 400;
}

.wm-ctx-label u {
    text-decoration: underline;
}

.wm-ctx-arrow {
    font-size: 0.68rem;
    color: #9ca3af;
    flex-shrink: 0;
}

.wm-ctx-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* Submenu Flyout */
.wm-ctx-submenu {
    position: absolute;
    left: 100%;
    top: -5px;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.3);
    width: 240px;
    padding: 5px 0;
    display: none;
    z-index: 100000;
    animation: wmCtxFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.wm-ctx-item:hover > .wm-ctx-submenu {
    display: block;
}

.wm-ctx-submenu.open-left {
    left: auto;
    right: 100%;
}

.wm-ctx-submenu.open-up {
    top: auto;
    bottom: -5px;
}

/* Quadrados coloridos de categoria */
.wm-category-square {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
}

/* Botão 3-pontinhos na linha do e-mail */
.wm-more-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.82rem;
    border-radius: 4px;
    margin-left: auto;
    opacity: 0;
    transition: all 0.15s ease;
}

.webmail-item:hover .wm-more-btn {
    opacity: 1;
}

.wm-more-btn:hover {
    color: #38bdf8;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes wmCtxFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════
   ASSISTENTE DE REGRAS ESTILO MICROSOFT OUTLOOK
   ═══════════════════════════════════════════════════════════════ */

.wm-rules-wizard-dialog {
    width: 95%;
    max-width: 640px;
    background: #18181b;
    color: #f4f4f5;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 1px rgba(255, 255, 255, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

.wm-rules-wizard-dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.wm-wizard-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #202024;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wm-wizard-titlebar h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f8fafc;
}

.wm-wizard-titlebar button.close-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}

.wm-wizard-titlebar button.close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.wm-wizard-header {
    padding: 14px 20px 8px;
}

.wm-wizard-header .wm-wizard-step-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.wm-wizard-header .wm-wizard-step-sub {
    font-size: 0.84rem;
    color: #94a3b8;
}

.wm-wizard-body {
    padding: 10px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wm-wizard-template-box {
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    height: 220px;
    overflow-y: auto;
    padding: 6px 0;
    font-size: 0.86rem;
    user-select: none;
}

.wm-wizard-template-box::-webkit-scrollbar {
    width: 6px;
}

.wm-wizard-template-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.wm-wizard-category-title {
    padding: 8px 14px 4px;
    font-weight: 700;
    color: #94a3b8;
    font-size: 0.82rem;
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wm-wizard-category-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 14px;
}

.wm-wizard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 24px;
    cursor: pointer;
    color: #f1f5f9;
    transition: background 0.1s ease, color 0.1s ease;
    border: 1px solid transparent;
    margin: 1px 6px;
    border-radius: 4px;
    line-height: 1.35;
}

.wm-wizard-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.wm-wizard-item.active {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #ffffff;
    font-weight: 500;
}

.wm-wizard-item-icon {
    width: 16px;
    text-align: center;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.wm-wizard-desc-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wm-wizard-desc-label {
    font-size: 0.84rem;
    color: #cbd5e1;
    font-weight: 500;
}

.wm-wizard-desc-box {
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    min-height: 130px;
    padding: 12px 14px;
    font-size: 0.87rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.wm-wizard-link {
    color: #38bdf8 !important;
    text-decoration: underline !important;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.12s;
    padding: 1px 4px;
    border-radius: 3px;
}

.wm-wizard-link:hover {
    color: #7dd3fc !important;
    background: rgba(56, 189, 248, 0.15);
}

.wm-wizard-example {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-weight: 700;
    color: #f8fafc;
    font-size: 0.84rem;
}

/* Checklist para etapas 2 e 3 do assistente */
.wm-wizard-checklist {
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    height: 220px;
    overflow-y: auto;
    padding: 6px 0;
    font-size: 0.86rem;
}

.wm-wizard-checkitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.wm-wizard-checkitem:hover {
    background: rgba(255, 255, 255, 0.05);
}

.wm-wizard-checkitem input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2563eb;
}

.wm-wizard-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #1c1c20;
}

.wm-btn-wizard {
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    min-width: 82px;
    text-align: center;
    transition: all 0.15s ease;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
}

.wm-btn-wizard:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.wm-btn-wizard.primary {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
}

.wm-btn-wizard.primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #60a5fa;
}

.wm-btn-wizard:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.wm-btn-wizard-sm {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s ease;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
}

.wm-btn-wizard-sm:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.wm-btn-wizard-sm.danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #fca5a5;
}

/* Mini Picker Popover para editar valores sublinhados */
.wm-wizard-picker-modal {
    width: 90%;
    max-width: 440px;
    background: #18181b;
    color: #f4f4f5;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
    z-index: 100002;
}

.wm-wizard-picker-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

/* ═══════════════════════════════════════════════════════════
   MENU E CENTRAL DE GERENCIAMENTO DE REGRAS (OUTLOOK RULES MANAGER)
   ═══════════════════════════════════════════════════════════ */

/* Dropdown na Topbar */
.wm-rules-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.wm-rules-quick-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 290px;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 6px 0;
    backdrop-filter: blur(16px);
}

.wm-rules-quick-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #e2e8f0;
    transition: background 0.15s ease;
}

.wm-rules-quick-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.wm-rules-quick-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.wm-rules-quick-toggle {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Modal Central de Gerenciamento Estilo Outlook */
.wm-rules-manager-dialog {
    width: 92%;
    max-width: 860px;
    background: #18181b;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9);
}

.wm-rules-manager-dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

/* Abas */
.wm-rules-tabs {
    display: flex;
    background: #1e1e22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 16px;
    gap: 4px;
}

.wm-rules-tab {
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wm-rules-tab:hover {
    color: #f1f5f9;
}

.wm-rules-tab.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
    font-weight: 600;
}

/* Toolbar de Gerenciamento */
.wm-rules-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    background: #141416;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wm-toolbar-btn {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.wm-toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.wm-toolbar-btn.primary {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
}

.wm-toolbar-btn.primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #60a5fa;
}

.wm-toolbar-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Tabela e Linhas */
.wm-rules-table-container {
    max-height: 280px;
    overflow-y: auto;
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin: 12px 16px;
}

.wm-rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.wm-rules-table th {
    background: #1e1e22;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 2;
}

.wm-rules-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    vertical-align: middle;
}

.wm-rules-table tr {
    cursor: pointer;
    transition: background 0.12s ease;
}

.wm-rules-table tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.wm-rules-table tr.selected-rule {
    background: rgba(37, 99, 235, 0.22) !important;
    outline: 1px solid #3b82f6;
}

/* Badge de prioridade */
.wm-priority-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

/* Painel de Descrição da Regra Selecionada */
.wm-rules-preview-section {
    margin: 0 16px 14px 16px;
}

.wm-rules-preview-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 500;
}

.wm-rules-preview-box {
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #cbd5e1;
    min-height: 75px;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   BARRA DE TAREFAS / RIBBON BAR INTEGRADA AO DESIGN SYSTEM F&A
   ═══════════════════════════════════════════════════════════ */
.wm-ribbon-container {
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    user-select: none;
    position: relative;
    z-index: 90;
    transition: all 0.2s ease;
    overflow: visible;
}

/* Linha Superior: Abas do Menu */
.wm-ribbon-tabs {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 4px 12px 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px 14px 0 0;
    gap: 4px;
}

.wm-ribbon-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 7px 16px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wm-ribbon-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.wm-ribbon-tab.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.12);
    border-bottom: 2px solid #3b82f6;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 #3b82f6;
}

/* Linha Inferior: Faixa de Ferramentas / Ações */
.wm-ribbon-toolbar {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    gap: 4px;
    row-gap: 6px;
    overflow: visible;
    min-height: 42px;
    flex-wrap: wrap;
    border-radius: 0 0 14px 14px;
    background: rgba(15, 23, 42, 0.25);
}

.wm-ribbon-toolbar::-webkit-scrollbar {
    display: none;
}

.wm-ribbon-btn-group {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.wm-ribbon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 11px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.wm-ribbon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wm-ribbon-btn:active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    transform: translateY(0);
}

.wm-ribbon-btn.icon-only {
    padding: 6px 9px;
}

.wm-ribbon-btn.primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.wm-ribbon-btn.primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55);
    transform: translateY(-1px);
}

.wm-ribbon-btn-arrow {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-left: none;
    color: #94a3b8;
    font-size: 0.65rem;
    padding: 7px 6px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wm-ribbon-btn-group .wm-ribbon-btn:has(+ .wm-ribbon-btn-arrow) {
    border-radius: 8px 0 0 8px;
}

.wm-ribbon-btn-arrow:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #ffffff;
}

.wm-ribbon-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 5px;
    flex-shrink: 0;
}

/* Pesquisa de Pessoas Inline */
.wm-ribbon-people-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0 4px;
}

.wm-ribbon-people-search i {
    position: absolute;
    left: 9px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.wm-ribbon-people-search input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 0.78rem;
    padding: 5px 10px 5px 28px;
    width: 160px;
    height: 30px;
    outline: none;
    transition: all 0.2s ease;
}

.wm-ribbon-people-search input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #3b82f6;
    width: 210px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.wm-ribbon-people-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Dropdowns suspensos do Ribbon (Imune a clipping de overflow e integrado ao Glassmorphism) */
.wm-ribbon-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 230px;
    max-width: 360px;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(59, 130, 246, 0.15);
    z-index: 100050;
    padding: 6px;
}

.wm-ribbon-dropdown .wm-ctx-item {
    border-radius: 6px;
    margin: 1px 4px;
    padding: 7px 12px;
    font-size: 0.82rem;
    color: #e2e8f0;
    transition: all 0.15s ease;
}

.wm-ribbon-dropdown .wm-ctx-item:hover,
.wm-ribbon-dropdown .wm-ctx-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: #ffffff;
}

.wm-ribbon-dropdown.dropdown-right {
    left: auto;
    right: 0;
}

.wm-ribbon-container.compact .wm-ribbon-toolbar {
    display: none !important;
}

/* Responsividade Adaptativa do Ribbon */
@media (max-width: 1024px) {
    .wm-ribbon-tab {
        padding: 6px 10px;
        font-size: 0.76rem;
    }
    .wm-ribbon-btn {
        padding: 5px 7px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .wm-ribbon-tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }
    .wm-ribbon-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}

/* Teclas de Atalho */
.wm-kbd {
    display: inline-block;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    color: #e2e8f0;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   MICROSOFT OUTLOOK COMPOSE RIBBON & HEADER STYLING
   ═══════════════════════════════════════════════════════════════ */

.wm-compose-floating {
    width: 780px !important;
    height: 660px !important;
}

/* Ribbon do Compositor */
.wm-comp-ribbon {
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
    position: relative;
    z-index: 100;
}

.wm-comp-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 18, 34, 0.6);
    padding: 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wm-comp-tabs-left {
    display: flex;
    align-items: center;
    gap: 2px;
}

.wm-comp-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
}

.wm-comp-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.wm-comp-tab.active {
    color: #60a5fa;
    border-bottom-color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
    font-weight: 600;
}

.wm-comp-tabs-right {
    display: flex;
    align-items: center;
}

.wm-comp-tellme {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.wm-comp-tellme i {
    position: absolute;
    left: 8px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.wm-comp-tellme input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 0.74rem;
    padding: 3px 8px 3px 26px;
    width: 190px;
    height: 26px;
    outline: none;
    transition: all 0.18s ease;
}

.wm-comp-tellme input:focus {
    width: 230px;
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.wm-comp-tellme input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Faixa de Ferramentas / Ações do Compositor */
.wm-comp-toolbar {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(15, 23, 42, 0.35);
    min-height: 38px;
}

.wm-comp-toolbar::-webkit-scrollbar {
    display: none;
}

.wm-comp-ribbon.compact .wm-comp-toolbar {
    display: none;
}

.wm-comp-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #e2e8f0;
    font-size: 0.78rem;
    padding: 4px 7px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
    height: 28px;
    min-width: 26px;
}

.wm-comp-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.wm-comp-btn:active, .wm-comp-btn.active {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.wm-comp-btn-full {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.wm-comp-btn-full:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.wm-comp-select {
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    color: #f1f5f9;
    font-size: 0.75rem;
    padding: 2px 6px;
    height: 28px;
    outline: none;
    margin: 0 2px;
}

.wm-comp-select.wm-size-select {
    width: 50px;
}

.wm-comp-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 3px;
    flex-shrink: 0;
}

.wm-comp-dropdown-wrapper {
    position: relative;
    display: inline-flex;
}

.wm-comp-palette {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(4, 20px);
    gap: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    z-index: 10000;
}

.wm-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.1s ease;
}

.wm-color-swatch:hover {
    transform: scale(1.15);
}

/* Botão Sol (Modo Claro/Escuro do Corpo) */
.wm-comp-sun-btn {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #facc15 !important;
}

.wm-comp-sun-btn.active {
    background: #facc15 !important;
    color: #0f172a !important;
    border-color: #eab308 !important;
}

/* ─── CABEÇALHO PRINCIPAL DA MENSAGEM (OUTLOOK STYLE) ─── */
.wm-compose-main-header {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 10px 14px;
    background: #18181b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Botão Enviar Vertical */
.wm-send-vertical-wrapper {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

.wm-btn-send-vertical {
    background: #222226;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    color: #f8fafc;
    width: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 6px;
    padding: 8px 4px;
    transition: all 0.15s ease;
}

.wm-btn-send-vertical:hover {
    background: #2a2a30;
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
    color: #ffffff;
}

.wm-btn-send-vertical:active {
    transform: translateY(1px);
}

.wm-btn-send-vertical .wm-send-icon {
    font-size: 1.35rem;
    color: #38bdf8;
    transform: rotate(-25deg);
    margin-bottom: 2px;
}

.wm-btn-send-vertical .wm-send-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Coluna de Campos (Para, Cc, Cco, Assunto) */
.wm-compose-fields-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wm-compose-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 0;
}

.wm-compose-row:focus-within {
    border-bottom-color: rgba(56, 189, 248, 0.5);
}

.wm-row-btn {
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    min-width: 58px;
    text-align: center;
    transition: all 0.12s ease;
}

.wm-row-btn:hover {
    background: #3f3f46;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.wm-row-label {
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 500;
    min-width: 58px;
    text-align: center;
    user-select: none;
}

/* Modo Tela Branca no Editor (Light Canvas) */
.wm-compose-light-canvas #quill-webmail {
    background: #ffffff !important;
}

.wm-compose-light-canvas .ql-editor {
    color: #0f172a !important;
    background: #ffffff !important;
}

/* Badges de Opções de Envio Ativas no Rodapé */
.wm-option-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.wm-option-badge-pill.urgent {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}

.wm-option-badge-pill.low {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
}

.wm-option-badge-pill.receipt {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}

.wm-option-badge-pill.confidential {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

