.email-center-view {
    padding: 0 24px 38px;
}

/* ======================================================
   ESTRUTURA
   ====================================================== */

.email-center-shell {
    display: grid;
    grid-template-columns:
        minmax(400px, 41%)
        minmax(0, 59%);
    grid-template-rows:
        auto
        minmax(640px, 1fr);
    min-height: 700px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe5f2;
    border-radius: 20px;
    box-shadow:
        0 18px 48px
        rgba(15, 35, 65, 0.07);
}

.email-center-left {
    display: contents;
}

/* ======================================================
   ABAS
   ====================================================== */

.email-center-tabs {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 16px;
    background: #fbfcfe;
    border-bottom: 1px solid #e3eaf3;
}

.email-center-tab {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 9px 13px;
    color: #53647c;
    background: #ffffff;
    border: 1px solid #dfe7f1;
    border-radius: 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    transition: 0.15s ease;
}

.email-center-tab:hover {
    color: #173a64;
    background: #f5f8fc;
    border-color: #cfdbe9;
}

.email-center-tab.active {
    color: #ffffff;
    background: #1473e6;
    border-color: #1473e6;
    box-shadow:
        0 5px 12px
        rgba(20, 115, 230, 0.18);
}

.email-center-tab[
    data-email-tab="follow_up"
] {
    color: #805700;
    background: #fff8e7;
    border-color: #eedb9c;
}

.email-center-tab[
    data-email-tab="follow_up"
].active {
    color: #ffffff;
    background: #d89200;
    border-color: #d89200;
}

.email-center-tab[
    data-email-tab="clicked"
] {
    color: #924418;
    background: #fff5ee;
    border-color: #efd2bf;
}

.email-center-tab[
    data-email-tab="clicked"
].active {
    color: #ffffff;
    background: #d96b2b;
    border-color: #d96b2b;
}

.email-center-tab[
    data-email-tab="opened"
] {
    color: #176b9b;
    background: #f0f8fc;
    border-color: #d1e7f2;
}

.email-center-tab[
    data-email-tab="opened"
].active {
    color: #ffffff;
    background: #176b9b;
    border-color: #176b9b;
}

/* ======================================================
   LISTA
   ====================================================== */

.email-center-list {
    grid-column: 1;
    grid-row: 2;
    max-height: 680px;
    overflow-y: auto;
    background: #fbfcfe;
    border-right: 1px solid #e3eaf3;
}

.email-center-empty,
.email-center-loading {
    padding: 64px 28px;
    color: #75849a;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
}

.email-message-card {
    width: 100%;
    padding: 17px 18px;
    text-align: left;
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #e7edf5;
    cursor: pointer;
    transition: 0.15s ease;
}

.email-message-card:hover {
    background: #f7faff;
}

.email-message-card.active {
    background: #f0f6ff;
    box-shadow:
        inset 4px 0 #1473e6;
}

.email-message-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
}

.email-message-person {
    min-width: 0;
    overflow: hidden;
    color: #102540;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-message-date {
    flex: 0 0 auto;
    color: #8090a5;
    font-size: 10.5px;
    font-weight: 600;
}

.email-message-subject {
    margin-top: 7px;
    overflow: hidden;
    color: #263a54;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-message-address {
    margin-top: 5px;
    overflow: hidden;
    color: #7b899d;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ======================================================
   BADGES
   ====================================================== */

.email-center-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.email-center-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 4px 8px;
    color: #176b9b;
    background: #eaf5fb;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.25;
}

.email-center-badge:empty {
    display: none;
}

.email-center-badge.awaiting {
    color: #906000;
    background: #fff4cc;
}

.email-center-badge.bounced {
    color: #a12626;
    background: #ffe3e3;
}

.email-followup-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 850;
}

.email-followup-hot {
    color: #9b4118;
    background: #ffeadf;
}

.email-followup-warm {
    color: #176b9b;
    background: #eaf5fb;
}

.email-followup-normal {
    color: #785d16;
    background: #fff5d7;
}

/* ======================================================
   PREVIEW
   ====================================================== */

.email-center-right {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    padding: 30px 32px;
    overflow: auto;
    background: #ffffff;
}

.email-preview-placeholder {
    display: flex;
    min-height: 580px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #7b899d;
    text-align: center;
    font-size: 14px;
}

.email-preview-placeholder::before {
    content: none;
    display: none;
}

/* FERMENTA_MAIL_OPEN_ICON_V1 */
.email-center-open-icon-v1 {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    justify-content: center;
}

.email-center-open-icon-v1 svg {
    display: block;
    width: 15px;
    height: 15px;
}

.email-preview-header {
    padding-bottom: 23px;
    border-bottom: 1px solid #e3eaf3;
}

.email-preview-eyebrow {
    color: #1473e6;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.email-preview-title {
    max-width: 900px;
    margin: 8px 0 15px;
    color: #10233f;
    font-size: 24px;
    line-height: 1.3;
}

.email-preview-meta {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    color: #67788e;
    font-size: 12.5px;
}

.email-preview-meta > div:last-child {
    grid-column: 1 / -1;
}

.email-preview-meta strong {
    color: #233851;
}

.email-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.email-preview-body {
    max-height: 460px;
    margin-top: 24px;
    padding: 23px 24px;
    overflow: auto;
    color: #263850;
    background: #f8fafc;
    border: 1px solid #e2eaf3;
    border-radius: 14px;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    font-size: 14px;
    line-height: 1.68;
    white-space: pre-wrap;
}

/* ======================================================
   PAINEL DO LEAD
   ====================================================== */

.mail-lead-action-panel {
    margin-top: 20px !important;
    padding: 16px !important;
    background: #f8fafc !important;
    border:
        1px solid
        #e0e8f2 !important;
    border-radius: 13px !important;
}

.mail-lead-action-buttons {
    gap: 7px !important;
}

/* ======================================================
   RESPONSIVO
   ====================================================== */

@media (max-width: 1180px) {
    .email-center-shell {
        grid-template-columns:
            minmax(350px, 43%)
            minmax(0, 57%);
    }

    .email-center-right {
        padding: 24px;
    }

    .email-preview-meta {
        grid-template-columns: 1fr;
    }

    .email-preview-meta > div:last-child {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    .email-center-shell {
        display: block;
        min-height: 0;
    }

    .email-center-left {
        display: block;
    }

    .email-center-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .email-center-list {
        max-height: 400px;
        border-right: 0;
        border-bottom: 1px solid #dbe5f2;
    }

    .email-center-right {
        padding: 22px;
    }
}

@media (max-width: 720px) {
    .email-center-view {
        padding: 0 12px 26px;
    }

    .email-center-right {
        padding: 18px;
    }

    .email-preview-title {
        font-size: 20px;
    }
}


/* =========================================================
   FERMENTA EMAIL ERROR ACTION V1
========================================================= */

.email-center-empty strong {
    display: block;

    margin-bottom: 7px;

    color:
        var(--fs-text);

    font-size: 13px;
}

.email-center-empty span {
    display: block;

    max-width: 310px;

    margin:
        0 auto
        14px;

    color:
        var(--fs-muted);

    font-size: 10.5px;

    line-height: 1.55;
}

.email-center-empty .button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 38px;

    padding:
        0
        14px;

    text-decoration: none;
}



/* FERMENTA_MAIL_CENTER_LOADING_RELIABILITY_V1 */

.email-center-loading-v1 {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 32px 20px;
    text-align: center;
    color: #667085;
}

.email-center-loading-v1 strong {
    color: #101828;
    font-size: 14px;
    font-weight: 700;
}

.email-center-loading-v1 small {
    max-width: 280px;
    color: #667085;
    font-size: 12px;
    line-height: 1.5;
}

.email-center-spinner-v1 {
    display: block;
    width: 28px;
    height: 28px;
    border: 3px solid #e4e7ec;
    border-top-color: #176b9b;
    border-radius: 50%;
    animation:
        fermenta-mail-spin-v1
        .75s linear infinite;
}

.email-center-sync-warning-v1 {
    display: flex;
    flex-direction: column;
    gap: 7px;
    line-height: 1.5;
}

.email-center-sync-warning-v1 strong {
    color: #344054;
}

@keyframes fermenta-mail-spin-v1 {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .email-center-spinner-v1 {
        animation-duration: 1.8s;
    }
}
