/* ==========================================================================
   TM Consórcios — Cartas Contempladas
   Design system: roxo #6B398E · amarelo #FEDA36 · verde #82b440
   Fontes: Red Hat Display (títulos) · DM Sans (texto)
   Prefixo .tm- para não colidir com o CSS global do site.
   ========================================================================== */

.tm-contempladas {
    --tm-primary: #6B398E;
    --tm-primary-strong: #562c73;
    --tm-primary-soft: #f3edf8;
    --tm-primary-line: #DDD8F9;
    --tm-yellow: #FEDA36;
    --tm-yellow-strong: #eac412;
    --tm-green: #82b440;
    --tm-green-deep: #3d6218;
    --tm-ink: #241633;
    --tm-ink-soft: #5D666F;
    --tm-paper: #f6f4fb;
    --tm-surface: #ffffff;
    --tm-line: rgba(107, 57, 142, 0.14);
    --tm-shadow: 0 18px 44px rgba(60, 24, 82, 0.10);
    --tm-shadow-strong: 0 30px 70px rgba(48, 18, 66, 0.20);
    --tm-radius-xl: 32px;
    --tm-radius-lg: 22px;
    --tm-radius-md: 16px;
    --tm-radius-sm: 12px;
    --tm-transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
    --tm-focus: #6B398E;

    background: var(--tm-paper);
    color: var(--tm-ink);
    overflow-x: clip;
    overflow-y: visible;
}

.tm-contempladas *,
.tm-contempladas *::before,
.tm-contempladas *::after {
    box-sizing: border-box;
}

.tm-contempladas img {
    max-width: 100%;
}

.tm-contempladas :focus-visible {
    outline: 3px solid var(--tm-focus);
    outline-offset: 3px;
    border-radius: 6px;
}

.tm-contempladas .tm-number {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

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

/* ------------------------------------------------------------------ *
   HERO
 * ------------------------------------------------------------------ */
.tm-hero {
    position: relative;
    overflow: hidden;
    height: 850px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("../../images/banner/banner-tm-one.webp");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
}

.tm-hero::after {
    content: none;
}

.tm-hero .container {
    position: relative;
    z-index: 2;
}
.tm-hero__content {
    max-width: 80%;
    margin: 0 auto;
    text-align: center;
}

.tm-hero__kicker {
    display: block;
    margin-bottom: 25px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: fadeInDown 0.8s ease-out forwards;
}

.tm-hero__kicker::before {
    content: none;
}

@keyframes tm-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(254, 218, 54, 0.45); }
    100% { box-shadow: 0 0 0 14px rgba(254, 218, 54, 0); }
}

.tm-hero__title {
    margin: 0 0 24px;
    max-width: none;
    font-family: var(--font-primary, "Red Hat Display");
    font-weight: 800;
    font-size: 80px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.tm-hero__title span {
    display: block;
    color: #fff;
}

.tm-hero__text {
    max-width: 62ch;
    margin: 0 auto 34px;
    font-family: var(--font-secondary, "DM Sans");
    font-size: clamp(16px, 1.4vw, 20px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.tm-hero__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.tm-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 30px;
    border-radius: 999px;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: transform var(--tm-transition), box-shadow var(--tm-transition), background var(--tm-transition);
}

.tm-hero__btn--primary {
    background: #fff;
    color: var(--tm-primary);
    box-shadow: none;
}
.tm-hero__btn--primary:hover {
    transform: translateY(-3px);
    background: var(--tm-yellow);
    color: #35204a;
}

.tm-hero__btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}
.tm-hero__btn--ghost:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.tm-hero__stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 42px;
    margin-top: 52px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.tm-hero__stat strong {
    display: block;
    font-family: var(--font-primary, "Red Hat Display");
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.tm-hero__stat span {
    display: block;
    margin-top: 6px;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

/* ------------------------------------------------------------------ *
   SEÇÃO DO CATÁLOGO
 * ------------------------------------------------------------------ */
.tm-catalog {
    position: relative;
    z-index: 2;
    /* O footer usa margin-top: -310px (mt-dec-footer-map) para puxar o mapa
       para cima; sem esta folga o mapa sobrepõe a tabela. */
    padding: 70px 0 340px;
}
@media (max-width: 991px) {
    .tm-catalog { padding-bottom: 300px; }
}

.tm-catalog-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 40px;
    flex-wrap: wrap;
    margin: 0 0 40px;
    text-align: left;
}
.tm-catalog-headtext { max-width: 620px; }

/* Filtro de produto: Todos / Imóvel / Veículo (igual Pluscon) */
.tm-type-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.tm-type-btn {
    width: auto;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1.5px solid var(--tm-primary-line);
    background: #fff;
    color: var(--tm-primary);
    font-family: var(--font-secondary, "DM Sans");
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background var(--tm-transition), color var(--tm-transition), border-color var(--tm-transition), transform var(--tm-transition);
}
.tm-type-btn:hover { border-color: var(--tm-primary); transform: translateY(-1px); }
.tm-type-btn.is-active {
    background: var(--tm-primary);
    border-color: var(--tm-primary);
    color: #fff;
}
.tm-type-btn:focus-visible { outline: 3px solid var(--tm-focus); outline-offset: 3px; }

.tm-catalog-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--tm-primary);
    font-family: var(--font-secondary, "DM Sans");
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.tm-catalog-title {
    margin: 0 0 14px;
    font-family: var(--font-primary, "Red Hat Display");
    font-weight: 800;
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--tm-primary);
}
.tm-catalog-lead {
    margin: 0;
    max-width: 60ch;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 16px;
    line-height: 1.6;
    color: var(--tm-ink-soft);
}

.tm-table-stage {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

/* ------------------------------------------------------------------ *
   TOOLBAR — chips à esquerda e exportações à direita
   (mesma composição da Pluscon)
 * ------------------------------------------------------------------ */
.tm-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 24px;
}

.tm-status-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tm-status-filter__label {
    font-family: var(--font-secondary, "DM Sans");
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(36, 22, 51, 0.45);
    margin-right: 2px;
}
.tm-status-filter__chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tm-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 11px;
    border-radius: 999px;
    border: 1.5px solid rgba(107, 57, 142, 0.18);
    background: #fff;
    cursor: pointer;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 13px;
    font-weight: 600;
    color: rgba(36, 22, 51, 0.5);
    transition: border-color var(--tm-transition), background var(--tm-transition), color var(--tm-transition);
    user-select: none;
}
.tm-status-chip__input {
    position: static !important;
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    border: 0;
    opacity: 1;
    pointer-events: auto;
    -webkit-appearance: checkbox;
    appearance: auto;
    cursor: pointer;
    flex-shrink: 0;
}
.tm-status-chip.is-disponivel .tm-status-chip__input { accent-color: #168250; }
.tm-status-chip.is-reservada .tm-status-chip__input  { accent-color: #e69100; }

.tm-status-chip.is-disponivel:has(.tm-status-chip__input:checked) {
    border-color: rgba(22, 130, 80, 0.4);
    background: rgba(22, 130, 80, 0.08);
    color: #168250;
}
.tm-status-chip.is-reservada:has(.tm-status-chip__input:checked) {
    border-color: rgba(250, 160, 0, 0.45);
    background: rgba(250, 160, 0, 0.1);
    color: #b46400;
}
.tm-status-chip:has(.tm-status-chip__input:not(:checked)) .tm-status-chip__text {
    opacity: 0.7;
}
.tm-status-chip:hover { border-color: currentColor; }
.tm-status-chip:has(.tm-status-chip__input:focus-visible) {
    outline: 3px solid var(--tm-focus);
    outline-offset: 3px;
}

.tm-table-hint {
    margin: 0;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 12.5px;
    color: var(--tm-ink-soft);
}
.tm-table-hint i { color: var(--tm-primary); }

.tm-table-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
}
.tm-export-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tm-table-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
    width: auto;
    flex: 0 0 auto;
    background: #fff;
    color: var(--tm-primary);
    font-family: var(--font-secondary, "DM Sans");
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform var(--tm-transition), background var(--tm-transition), box-shadow var(--tm-transition);
}
.tm-table-action:hover {
    transform: translateY(-1px);
    background: var(--tm-primary);
    color: #fff;
}
.tm-table-action--secondary {
    background: #fff;
    color: var(--tm-primary);
    border-color: rgba(107, 57, 142, 0.3);
}
.tm-table-action--secondary:hover {
    background: var(--tm-primary);
    border-color: var(--tm-primary);
    color: #fff;
}
.tm-table-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: #fff;
    color: var(--tm-primary);
    border-color: rgba(107, 57, 142, 0.3);
}

/* ------------------------------------------------------------------ *
   PAINEL DE SELEÇÃO
 * ------------------------------------------------------------------ */
.tm-selection-panel {
    position: sticky;
    top: 12px;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px 24px;
    align-items: center;
    margin: 0 0 24px;
    padding: 18px 22px;
    border: 1px solid rgba(107, 57, 142, 0.18);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(107, 57, 142, 0.06), rgba(254, 218, 54, 0.08)), #fff;
    color: var(--tm-ink);
    box-shadow: 0 12px 30px rgba(60, 24, 82, 0.10);
}
.tm-selection-panel[hidden] { display: none; }
.tm-selection-summary {
    min-width: 0;
    flex: 1 1 420px;
}

.tm-selection-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.tm-selection-count {
    margin: 0;
    font-family: var(--font-primary, "Red Hat Display");
    font-size: 15px;
    font-weight: 800;
    color: var(--tm-primary);
}
.tm-selection-admin {
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(36, 22, 51, 0.5);
}
.tm-selection-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tm-selection-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
    padding: 8px 14px;
    border: 1px solid rgba(107, 57, 142, 0.12);
    border-radius: 10px;
    background: #fff;
}
.tm-selection-metric[hidden],
.tm-selection-phases[hidden] { display: none; }
.tm-selection-metric__label {
    display: block;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(36, 22, 51, 0.45);
    margin-bottom: 0;
}
.tm-selection-metric__value {
    display: block;
    font-family: var(--font-primary, "Red Hat Display");
    font-size: 16px;
    font-weight: 800;
    color: var(--tm-ink);
}
.tm-selection-phases {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(107, 57, 142, 0.12);
}
.tm-selection-phases__label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(36, 22, 51, 0.45);
}
.tm-selection-phases__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-selection-phase-pill {
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(107, 57, 142, 0.08);
    font-family: var(--font-secondary, "DM Sans");
    font-size: 13px;
    font-weight: 700;
    color: var(--tm-primary);
}
.tm-selection-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.tm-selection-preview {
    flex: 0 0 auto;
    background: #fff;
    color: var(--tm-primary);
    border-color: rgba(107, 57, 142, 0.28);
}
.tm-selection-preview:hover,
.tm-selection-preview:focus-visible {
    border-color: var(--tm-primary);
    background: var(--tm-primary);
    color: #fff;
}
.tm-selection-preview:focus-visible {
    outline: 3px solid rgba(254, 218, 54, 0.78);
    outline-offset: 2px;
}
.tm-selection-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--tm-primary);
    color: #fff;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
    transition: transform var(--tm-transition), background var(--tm-transition);
}
.tm-selection-link:hover { transform: translateY(-1px); background: var(--tm-primary-strong); color: #fff; }
.tm-selection-clear {
    min-height: 34px;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: rgba(36, 22, 51, 0.5);
    font-family: var(--font-secondary, "DM Sans");
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    transition: color var(--tm-transition);
}
.tm-selection-clear:hover { color: var(--tm-primary); }

.tm-results-status {
    margin: 0 0 12px;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 13px;
    color: var(--tm-ink-soft);
}

/* ------------------------------------------------------------------ *
   TABELA DESKTOP
 * ------------------------------------------------------------------ */
.tm-table-shell {
    overflow-x: auto;
    margin: 0;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(60, 24, 82, 0.07);
}
.tm-table-shell:focus-visible { outline: 3px solid var(--tm-focus); outline-offset: -3px; }

.tm-desktop-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 14px;
}

/* Cabeçalho: faixa sólida fina, colada às linhas (igual Invest / Pluscon) */
.tm-desktop-table thead th {
    padding: 14px 12px;
    background: var(--tm-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}
.tm-desktop-table thead th:first-child { width: 48px; text-align: center; padding-left: 12px; }

.tm-desktop-table thead th[data-tm-col] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 26px;
    transition: background var(--tm-transition);
}
.tm-desktop-table thead th[data-tm-col]:hover { background: var(--tm-primary-strong); }
.tm-desktop-table thead th[data-tm-col]::after {
    content: "↕";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    opacity: 0.55;
}
.tm-desktop-table thead th[data-tm-sort="desc"]::after { content: "↓"; opacity: 1; color: var(--tm-yellow); }
.tm-desktop-table thead th[data-tm-sort="asc"]::after  { content: "↑"; opacity: 1; color: var(--tm-yellow); }
.tm-desktop-table thead th[data-tm-sort] { background: var(--tm-primary-strong); }

/* Linhas e células — mesmas medidas da tabela Pluscon */
.tm-desktop-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    background: #fff;
    transition: background 0.15s;
}
.tm-desktop-table tbody td,
.tm-desktop-table tbody th {
    padding: 14px 12px;
    background: transparent;
    border: 0;
    vertical-align: middle;
    text-align: left;
    font-size: 14px;
    color: rgba(36, 22, 51, 0.85);
    font-weight: 500;
}
.tm-desktop-table tbody tr:hover { background: rgba(107, 57, 142, 0.035); }
.tm-desktop-table tbody tr.is-selected {
    background: rgba(254, 218, 54, 0.12);
    border-left: 3px solid var(--tm-yellow-strong);
}
.tm-desktop-table tbody tr.is-selected:hover { background: rgba(254, 218, 54, 0.18); }

/* Larguras */
.tm-desktop-table th:nth-child(1), .tm-desktop-table td:nth-child(1) { width: 48px; text-align: center; }
.tm-desktop-table th:nth-child(2), .tm-desktop-table td:nth-child(2) { min-width: 92px; }
.tm-desktop-table th:nth-child(9), .tm-desktop-table td:nth-child(9) { width: 56px; text-align: center; padding-inline: 8px; }
.tm-desktop-table th:nth-child(10), .tm-desktop-table td:nth-child(10) { min-width: 116px; white-space: nowrap; }

.tm-select-cell { text-align: center; }
.tm-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--tm-primary);
    cursor: pointer;
}
.tm-checkbox:disabled { opacity: 0.4; cursor: not-allowed; }

.tm-group-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}
.tm-admin-logo {
    width: auto;
    height: auto;
    max-height: 48px;
    max-width: 104px;
    object-fit: contain;
    display: block;
}

/* Pills */
.tm-product-pill,
.tm-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.tm-product-pill {
    background: var(--tm-primary-soft);
    color: var(--tm-primary);
    border: 1.5px solid var(--tm-primary-line);
}
.tm-product-pill--imovel  { background: rgba(107, 57, 142, 0.07); color: var(--tm-primary); border-color: rgba(107, 57, 142, 0.35); }
.tm-product-pill--veiculo { background: rgba(254, 218, 54, 0.12); color: #8a5a12; border-color: rgba(234, 196, 18, 0.42); }
.tm-product-pill--servico { background: rgba(130, 180, 64, 0.10); color: var(--tm-green-deep); border-color: rgba(130, 180, 64, 0.35); }

.tm-status-pill { padding: 4px 8px; font-size: 10px; border: 1.5px solid transparent; }
.tm-status-pill.is-disponivel { background: rgba(22, 130, 80, 0.10); color: #168250; border-color: rgba(22, 130, 80, 0.30); }
.tm-status-pill.is-reservada  { background: rgba(250, 160, 0, 0.10); color: #b46400; border-color: rgba(250, 160, 0, 0.35); }
.tm-status-pill.is-vendida    { background: rgba(185, 40, 40, 0.08); color: #b92828; border-color: rgba(185, 40, 40, 0.25); }
.tm-status-pill.is-outro      { background: rgba(36, 22, 51, 0.08); color: var(--tm-ink-soft); }

.tm-money-cell, .tm-term-cell {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Parcelas em linha, como na Pluscon */
.tm-installment-cell { font-size: 14px; font-weight: 600; white-space: nowrap; }
.tm-phase-text { white-space: nowrap; }
.tm-phase-empty { color: var(--tm-ink-soft); }

/* Botões de linha */
.tm-eye-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(36, 22, 51, 0.20);
    background: transparent;
    color: rgba(36, 22, 51, 0.50);
    font-size: 14px;
    cursor: pointer;
    transition: background var(--tm-transition), color var(--tm-transition), transform var(--tm-transition);
}
.tm-eye-btn:hover { border-color: var(--tm-primary); background: rgba(107, 57, 142, 0.06); color: var(--tm-primary); }

.tm-row-actions { display: flex; justify-content: flex-start; }
.tm-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 0;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--tm-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none !important;
    border: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    box-shadow: none;
}
.tm-action-btn:hover { background: var(--tm-primary-strong); color: #fff; transform: translateY(-1px); text-decoration: none !important; }
.tm-action-btn--disabled {
    background: #e7e2f2;
    color: #9a93ab;
    box-shadow: none;
    cursor: not-allowed;
}
.tm-action-btn--disabled:hover { transform: none; background: #e7e2f2; color: #9a93ab; }

/* Estado vazio */
.tm-empty-state {
    text-align: center;
    padding: 60px 24px;
}
.tm-empty-state[hidden] { display: none; }
.tm-empty-state strong {
    display: block;
    font-family: var(--font-primary, "Red Hat Display");
    font-size: 22px;
    font-weight: 800;
    color: var(--tm-primary);
    margin-bottom: 8px;
}
.tm-empty-state p { margin: 0 auto; max-width: 46ch; color: var(--tm-ink-soft); font-family: var(--font-secondary, "DM Sans"); }
.tm-empty-retry { margin-top: 20px; }

/* ------------------------------------------------------------------ *
   CARDS MOBILE
 * ------------------------------------------------------------------ */
.tm-mobile-cards {
    display: none !important;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 4px;
}
.tm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: var(--tm-radius-lg);
    border: 1px solid var(--tm-line);
    background: #fff;
    box-shadow: var(--tm-shadow);
    overflow: hidden;
}
.tm-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: var(--tm-primary);
}
.tm-card--veiculo::before { background: var(--tm-yellow-strong); }
.tm-card--servico::before { background: var(--tm-green); }

.tm-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.tm-card-title {
    margin: 0;
    font-family: var(--font-primary, "Red Hat Display");
    font-size: 18px;
    font-weight: 800;
    color: var(--tm-primary);
}
.tm-card-subtitle {
    font-family: var(--font-secondary, "DM Sans");
    font-size: 12px;
    color: var(--tm-ink-soft);
}
.tm-card-admin-logo {
    width: 130px;
    height: 58px;
    object-fit: contain;
    object-position: left center;
}
.tm-card-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 2px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--tm-line);
}
.tm-card-grid dt {
    font-family: var(--font-secondary, "DM Sans");
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tm-ink-soft);
    margin-bottom: 3px;
}
.tm-card-grid dd {
    margin: 0;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 15px;
    font-weight: 700;
    color: var(--tm-ink);
}
.tm-card-phases .tm-phase-stack { justify-content: flex-start; }
.tm-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}
.tm-card-actions .tm-action-btn { flex: 1; }

/* ------------------------------------------------------------------ *
   MODAIS
 * ------------------------------------------------------------------ */
.tm-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.tm-modal[hidden] { display: none; }
.tm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(36, 22, 51, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 0;
}
.tm-modal__dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: var(--tm-radius-xl);
    box-shadow: var(--tm-shadow-strong);
    animation: tm-modal-in 260ms cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes tm-modal-in {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tm-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--tm-line);
}
.tm-modal__title {
    margin: 0;
    font-family: var(--font-primary, "Red Hat Display");
    font-size: 20px;
    font-weight: 800;
    color: var(--tm-primary);
}
.tm-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--tm-primary-line);
    background: #fff;
    color: var(--tm-primary);
    cursor: pointer;
    transition: background var(--tm-transition), color var(--tm-transition);
}
.tm-modal__close:hover { background: var(--tm-primary); color: #fff; }
.tm-modal__close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.tm-modal__body { padding: 24px 26px 28px; }

.tm-detail-hero {
    text-align: center;
    padding: 26px 20px;
    border-radius: var(--tm-radius-lg);
    background: linear-gradient(135deg, #6B398E 0%, #3f2158 100%);
    color: #fff;
    margin-bottom: 22px;
}
.tm-detail-hero__eyebrow {
    font-family: var(--font-secondary, "DM Sans");
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}
.tm-detail-hero__badge {
    display: inline-block;
    margin: 10px 0 6px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--tm-yellow);
    color: #35204a;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tm-detail-hero__numero {
    margin: 6px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
}
.tm-detail-hero__valor {
    margin: 8px 0 0;
    font-family: var(--font-primary, "Red Hat Display");
    font-size: 34px;
    font-weight: 800;
    color: var(--tm-yellow);
}
.tm-detail-hero__sub { margin: 6px 0 0; font-size: 14px; color: rgba(255, 255, 255, 0.82); }

.tm-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.tm-detail-kv {
    padding: 14px 16px;
    border-radius: var(--tm-radius-md);
    background: var(--tm-primary-soft);
}
.tm-detail-kv__label {
    display: block;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tm-ink-soft);
    margin-bottom: 5px;
}
.tm-detail-kv__value {
    display: block;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 17px;
    font-weight: 800;
    color: var(--tm-primary);
}
.tm-detail-vendida {
    margin-top: 18px;
    padding: 16px;
    border-radius: var(--tm-radius-md);
    background: rgba(255, 0, 3, 0.06);
    text-align: center;
}
.tm-detail-vendida[hidden] { display: none; }
.tm-detail-vendida__label { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #a12222; font-weight: 800; }
.tm-detail-vendida__nome { margin: 0; font-weight: 700; color: var(--tm-ink); }
.tm-detail-vendida__data { margin: 4px 0 0; font-size: 13px; color: var(--tm-ink-soft); }

.tm-proposta-block { margin-top: 20px; }
.tm-proposta-block[hidden] { display: none; }
.tm-proposta-block__title {
    margin: 0 0 10px;
    font-family: var(--font-secondary, "DM Sans");
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tm-ink-soft);
}
.tm-proposta-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tm-proposta-list li {
    padding: 12px 14px;
    border-radius: var(--tm-radius-sm);
    background: var(--tm-primary-soft);
    font-family: var(--font-secondary, "DM Sans");
    font-size: 13px;
    color: var(--tm-ink);
}
.tm-proposta-cartas li { display: flex; flex-direction: column; gap: 4px; }
.tm-proposta-carta__num { font-weight: 800; color: var(--tm-primary); }
.tm-proposta-carta__info { color: var(--tm-ink-soft); font-size: 12.5px; }
.tm-proposta-actions { margin-top: 22px; }
.tm-proposta-actions .tm-selection-link { width: 100%; }

.tm-modal-negotiation { margin-top: 20px; }
.tm-modal-negotiation__title {
    margin: 0 0 9px;
    color: var(--tm-ink-soft);
    font-family: var(--font-secondary, "DM Sans");
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.tm-modal-negotiation__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}
.tm-modal-negotiation__actions .tm-selection-link {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}
.tm-modal-negotiation__actions .tm-negotiation-link--client {
    background: var(--tm-yellow);
    color: #35204a;
    box-shadow: 0 10px 24px rgba(255, 206, 47, 0.24);
}
.tm-modal-negotiation__actions .tm-negotiation-link--client:hover {
    background: #f1bd12;
    color: #35204a;
}
@media (max-width: 390px) {
    .tm-modal-negotiation__actions { gap: 8px; }
    .tm-modal-negotiation__actions .tm-selection-link { padding-inline: 8px; font-size: 11px; }
}

/* ------------------------------------------------------------------ *
   TOAST
 * ------------------------------------------------------------------ */
#tm-admin-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 20px);
    z-index: 10001;
    max-width: min(440px, calc(100vw - 32px));
    padding: 16px 20px;
    border-radius: var(--tm-radius-md);
    background: #241633;
    color: #fff;
    box-shadow: var(--tm-shadow-strong);
    opacity: 0;
    transition: opacity 300ms ease, transform 300ms ease;
    pointer-events: none;
}
#tm-admin-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
#tm-admin-toast strong {
    display: block;
    font-family: var(--font-primary, "Red Hat Display");
    font-size: 15px;
    color: var(--tm-yellow);
    margin-bottom: 4px;
}
#tm-admin-toast span { font-family: var(--font-secondary, "DM Sans"); font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.86); }
#tm-admin-toast em { font-style: normal; font-weight: 700; color: #fff; }

/* ------------------------------------------------------------------ *
   RESPONSIVO
 * ------------------------------------------------------------------ */
@media (max-width: 1399px) {
    .tm-desktop-table { font-size: 13px; }
    .tm-desktop-table thead th,
    .tm-desktop-table tbody td,
    .tm-desktop-table tbody th { padding: 12px 9px; }
    .tm-admin-logo { max-width: 96px; }
}

@media (max-width: 991px) {
    .tm-hero__content { max-width: 100%; }
    .tm-hero__title { font-size: 50px; }
    .tm-selection-actions { min-width: 0; }
}

@media (max-width: 767px) {
    .tm-hero { height: 720px; padding: 0; }
    .tm-hero__content { padding: 0 20px; }
    .tm-hero__title { font-size: 50px; }
    .tm-hero__text { font-size: 16px; line-height: 1.5; }
    .tm-hero__stats { gap: 24px; margin-top: 36px; padding-top: 24px; }
    .tm-hero__stat strong { font-size: 26px; }
    .tm-hero__stat span { font-size: 10px; }
    .tm-table-stage { padding: 0; border-radius: 0; }
    .tm-table-toolbar { flex-direction: column; align-items: stretch; }
    .tm-status-filter__label { width: 100%; margin-bottom: 2px; }
    .tm-status-filter__chips,
    .tm-table-controls { width: 100%; }
    .tm-status-chip { flex: 1 1 140px; min-height: 42px; justify-content: center; }
    .tm-table-controls { justify-content: stretch; margin-left: 0; }
    .tm-table-controls .tm-table-action { flex: 1 1 0; justify-content: center; }
    .tm-type-btn { flex: 1 1 auto; min-height: 42px; }
    .tm-selection-panel { flex-direction: column; align-items: flex-start; }
    .tm-selection-panel {
        top: 8px;
        max-height: calc(100vh - 16px);
        overflow-y: auto;
    }
    .tm-selection-actions {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        width: 100%;
        align-items: center;
        gap: 10px;
    }
    .tm-selection-preview { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
    .tm-selection-actions .tm-selection-link { width: 100%; }
    .tm-selection-clear { grid-column: 1 / -1; justify-self: end; width: auto; min-height: 44px; }

    /* A mesma tabela da Pluscon se transforma em cards no celular. */
    .tm-table-shell {
        display: block;
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }
    .tm-desktop-table,
    .tm-desktop-table thead,
    .tm-desktop-table tbody,
    .tm-desktop-table tr,
    .tm-desktop-table td,
    .tm-desktop-table th {
        display: block;
        width: 100%;
        min-width: 0;
    }
    .tm-desktop-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .tm-desktop-table tbody {
        display: grid;
        gap: 16px;
    }
    .tm-desktop-table tbody tr {
        border: 1px solid rgba(107, 57, 142, 0.14);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 12px 28px rgba(60, 24, 82, 0.08);
    }
    .tm-desktop-table tbody tr.is-selected {
        border-left: 4px solid var(--tm-yellow-strong);
    }
    .tm-desktop-table tbody td,
    .tm-desktop-table tbody th {
        display: grid;
        grid-template-columns: minmax(138px, 46%) minmax(0, 1fr);
        align-items: flex-start;
        justify-items: start;
        column-gap: 24px;
        row-gap: 5px;
        min-height: 48px;
        padding: 11px 14px;
        border-bottom: 1px solid rgba(107, 57, 142, 0.08);
        text-align: left;
        white-space: normal;
    }
    .tm-desktop-table tbody td::before,
    .tm-desktop-table tbody th::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.06em;
        line-height: 1.25;
        text-transform: uppercase;
        color: rgba(36, 22, 51, 0.48);
        text-align: left;
    }
    .tm-desktop-table tbody td:last-child { border-bottom: 0; }
    .tm-desktop-table tbody th { min-height: 58px; }
    .tm-admin-logo { justify-self: start; max-width: 96px; max-height: 34px; }
    .tm-checkbox,
    .tm-eye-btn { justify-self: start; }
    .tm-installment-cell,
    .tm-phase-text { overflow-wrap: anywhere; white-space: normal; }
    .tm-desktop-table tbody .tm-row-action {
        grid-template-columns: 1fr;
        padding: 14px;
        background: rgba(107, 57, 142, 0.035);
    }
    .tm-desktop-table tbody .tm-row-action::before { content: none; }
    .tm-row-actions,
    .tm-row-action .tm-action-btn { width: 100%; }
    .tm-row-action .tm-action-btn { min-height: 44px; }
    .tm-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
    .tm-hero { height: 700px; }
    .tm-hero__kicker { margin-bottom: 18px; font-size: 13px; }
    .tm-hero__title { margin-bottom: 18px; font-size: 36px; }
    .tm-hero__text { margin-bottom: 24px; font-size: 15px; }
    .tm-hero__btn { min-height: 48px; padding: 0 20px; font-size: 13px; }
    .tm-hero__stats { gap: 16px; margin-top: 28px; padding-top: 20px; }
    .tm-hero__stat { flex: 1 1 90px; }
    .tm-hero__stat strong { font-size: 22px; }
}

@media (max-width: 420px) {
    .tm-card-grid { grid-template-columns: 1fr; }
    .tm-table-action { flex: 1; justify-content: center; }
    .tm-export-actions { width: 100%; }
    .tm-export-actions .tm-table-action { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .tm-contempladas *,
    .tm-modal__dialog,
    #tm-admin-toast { animation: none !important; transition: none !important; }
}
