/* =============================================================
   TrackFlow — Sistema de Design "Precision Industrial"
   Paleta dark, tipografia Inter + JetBrains Mono, zero frameworks
   ============================================================= */

/* ---------------------------------------------------------------
   1. VARIÁVEIS GLOBAIS
--------------------------------------------------------------- */
:root {
    /* Superfícies */
    --tf-base:          #0D1117;
    --tf-surface:       #161B27;
    --tf-card:          #1C2333;

    /* Bordas */
    --tf-border:        rgba(255, 255, 255, 0.06);
    --tf-border-hover:  rgba(255, 255, 255, 0.12);

    /* Ação (azul) */
    --tf-acao:          #2D6AFF;
    --tf-acao-hover:    #4F8EFF;
    --tf-acao-muted:    rgba(45, 106, 255, 0.12);

    /* Ativo / sucesso (verde) */
    --tf-ativo:         #10B981;
    --tf-ativo-muted:   rgba(16, 185, 129, 0.12);

    /* Alerta (âmbar) */
    --tf-alerta:        #F59E0B;
    --tf-alerta-muted:  rgba(245, 158, 11, 0.1);

    /* Erro (vermelho) */
    --tf-erro:          #EF4444;
    --tf-erro-muted:    rgba(239, 68, 68, 0.1);

    /* Texto */
    --tf-texto-primary:   #E8EBF4;
    --tf-texto-secondary: #8A92A6;
    --tf-texto-muted:     rgba(255, 255, 255, 0.25);

    /* Sidebar */
    --tf-sidebar-w: 220px;

    /* Tipografia */
    --tf-font-sans:  'Inter', system-ui, sans-serif;
    --tf-font-mono:  'JetBrains Mono', 'Courier New', monospace;

    /* Espaçamentos */
    --tf-raio:    6px;
    --tf-raio-lg: 10px;

    /* Sombras */
    --tf-sombra:    0 1px 4px rgba(0, 0, 0, 0.4);
    --tf-sombra-md: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------
   2. RESET MÍNIMO
--------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--tf-font-sans);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--tf-texto-primary);
    background: var(--tf-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--tf-acao);
    text-decoration: none;
}

a:hover {
    color: var(--tf-acao-hover);
}

ul, ol { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.3;
    color: var(--tf-texto-primary);
    margin: 0;
}

p { margin: 0; }

/* ---------------------------------------------------------------
   3. LAYOUT DO PAINEL
--------------------------------------------------------------- */

/* Container geral */
.tf-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.tf-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--tf-sidebar-w);
    height: 100vh;
    background: var(--tf-base);
    border-right: 1px solid var(--tf-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

.tf-sidebar__header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--tf-border);
    flex-shrink: 0;
}

.tf-sidebar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.tf-sidebar__logo-icon {
    width: 30px;
    height: 30px;
    background: var(--tf-acao);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tf-sidebar__logo-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--tf-texto-primary);
}

/* Navegação */
.tf-sidebar__nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tf-sidebar__secao {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tf-texto-muted);
    padding: 12px 8px 4px;
    display: block;
}

.tf-sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--tf-raio);
    color: var(--tf-texto-secondary);
    font-size: 13.5px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.tf-sidebar__link:hover {
    background: var(--tf-acao-muted);
    color: var(--tf-texto-primary);
}

.tf-sidebar__link.ativo {
    background: var(--tf-acao-muted);
    color: var(--tf-acao);
    font-weight: 500;
}

.tf-sidebar__link.ativo .tf-sidebar__icone {
    color: var(--tf-acao);
}

.tf-sidebar__icone {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--tf-texto-muted);
}

/* Rodapé da sidebar */
.tf-sidebar__footer {
    padding: 12px 8px;
    border-top: 1px solid var(--tf-border);
    flex-shrink: 0;
}

.tf-sidebar__usuario {
    padding: 8px 10px;
    margin-bottom: 2px;
}

.tf-sidebar__usuario-nome {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--tf-texto-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tf-sidebar__usuario-perfil {
    display: block;
    font-size: 11px;
    color: var(--tf-texto-muted);
    margin-top: 1px;
}

/* Área principal */
.tf-main {
    margin-left: var(--tf-sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* Topbar */
.tf-topbar {
    position: sticky;
    top: 0;
    height: 52px;
    background: var(--tf-surface);
    border-bottom: 1px solid var(--tf-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 8px;
    z-index: 50;
    flex-shrink: 0;
}

.tf-topbar__titulo {
    font-size: 15px;
    font-weight: 600;
    color: var(--tf-texto-primary);
    letter-spacing: -0.02em;
}

.tf-topbar__sep {
    color: var(--tf-texto-muted);
    font-size: 12px;
}

.tf-topbar__crumb {
    font-size: 12px;
    color: var(--tf-texto-secondary);
}

.tf-topbar__crumb a {
    color: var(--tf-texto-secondary);
    text-decoration: none;
}

.tf-topbar__crumb a:hover {
    color: var(--tf-acao);
}

.tf-topbar__spacer {
    flex: 1;
}

.tf-topbar__usuario {
    font-size: 12px;
    color: var(--tf-texto-secondary);
}

/* Conteúdo */
.tf-conteudo {
    flex: 1;
    padding: 24px;
}

/* ---------------------------------------------------------------
   4. CABEÇALHO DE PÁGINA
--------------------------------------------------------------- */
.tf-pagina-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tf-pagina-header__titulo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--tf-texto-primary);
}

.tf-pagina-header__sub {
    font-size: 13px;
    color: var(--tf-texto-secondary);
    margin-top: 2px;
    font-weight: 400;
    letter-spacing: 0;
}

/* ---------------------------------------------------------------
   5. BOTÕES
--------------------------------------------------------------- */
.tf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 34px;
    font-family: var(--tf-font-sans);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--tf-raio);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1;
}

.tf-btn--primary {
    background: var(--tf-acao);
    color: #fff;
    border-color: var(--tf-acao);
}

.tf-btn--primary:hover {
    background: var(--tf-acao-hover);
    border-color: var(--tf-acao-hover);
    color: #fff;
}

.tf-btn--ghost {
    background: transparent;
    color: var(--tf-texto-secondary);
    border-color: var(--tf-border-hover);
}

.tf-btn--ghost:hover {
    background: var(--tf-card);
    color: var(--tf-texto-primary);
    border-color: rgba(255, 255, 255, 0.18);
}

.tf-btn--danger {
    background: var(--tf-erro-muted);
    color: var(--tf-erro);
    border-color: rgba(239, 68, 68, 0.25);
}

.tf-btn--danger:hover {
    background: var(--tf-erro);
    color: #fff;
    border-color: var(--tf-erro);
}

.tf-btn--sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

/* ---------------------------------------------------------------
   6. CAMPOS DE FORMULÁRIO
--------------------------------------------------------------- */
.tf-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tf-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tf-texto-secondary);
}

.tf-input,
.tf-select,
.tf-textarea {
    background: var(--tf-surface);
    border: 1px solid var(--tf-border-hover);
    border-radius: var(--tf-raio);
    color: var(--tf-texto-primary);
    font-family: var(--tf-font-sans);
    font-size: 14px;
    padding: 0 12px;
    height: 38px;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.tf-textarea {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    min-height: 90px;
}

.tf-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A92A6' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.tf-input:focus,
.tf-select:focus,
.tf-textarea:focus {
    border-color: var(--tf-acao);
    box-shadow: 0 0 0 3px var(--tf-acao-muted);
}

.tf-input::placeholder,
.tf-textarea::placeholder {
    color: var(--tf-texto-muted);
}

.tf-field__ajuda {
    font-size: 11.5px;
    color: var(--tf-texto-secondary);
}

.tf-field__erro {
    font-size: 11.5px;
    color: var(--tf-erro);
}

/* Mono para campos de coordenadas / ID */
.tf-input--mono {
    font-family: var(--tf-font-mono);
    font-size: 13px;
    letter-spacing: 0.03em;
}

/* ---------------------------------------------------------------
   7. TABELAS
--------------------------------------------------------------- */
.tf-table-wrap {
    overflow-x: auto;
    border-radius: var(--tf-raio-lg);
    border: 1px solid var(--tf-border);
}

.tf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.tf-table thead {
    background: var(--tf-surface);
}

.tf-table th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tf-texto-secondary);
    border-bottom: 1px solid var(--tf-border);
    white-space: nowrap;
}

.tf-table td {
    padding: 11px 16px;
    color: var(--tf-texto-primary);
    border-bottom: 1px solid var(--tf-border);
    vertical-align: middle;
}

.tf-table tbody tr:last-child td {
    border-bottom: none;
}

.tf-table tbody tr {
    background: var(--tf-card);
    transition: background 0.1s;
}

.tf-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.tf-table .tf-table__acoes {
    text-align: right;
    white-space: nowrap;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* Dados mono na tabela */
.tf-table .mono {
    font-family: var(--tf-font-mono);
    font-size: 12px;
    color: var(--tf-texto-secondary);
}

/* ---------------------------------------------------------------
   8. STATUS PILLS
--------------------------------------------------------------- */
.tf-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.tf-status::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tf-status--ativo {
    background: var(--tf-ativo-muted);
    color: var(--tf-ativo);
}
.tf-status--ativo::before { background: var(--tf-ativo); }

.tf-status--alerta {
    background: var(--tf-alerta-muted);
    color: var(--tf-alerta);
}
.tf-status--alerta::before { background: var(--tf-alerta); }

.tf-status--erro {
    background: var(--tf-erro-muted);
    color: var(--tf-erro);
}
.tf-status--erro::before { background: var(--tf-erro); }

.tf-status--inativo {
    background: rgba(255, 255, 255, 0.04);
    color: var(--tf-texto-secondary);
}
.tf-status--inativo::before { background: var(--tf-texto-muted); }

.tf-status--acao {
    background: var(--tf-acao-muted);
    color: var(--tf-acao);
}
.tf-status--acao::before { background: var(--tf-acao); }

/* ---------------------------------------------------------------
   9. CARDS DE MÉTRICA
--------------------------------------------------------------- */
.tf-metric {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    padding: 18px 20px;
    animation: tf-fade-in 0.3s ease;
}

.tf-metric__valor {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--tf-texto-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.tf-metric__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tf-texto-secondary);
}

.tf-metric--ativo .tf-metric__valor   { color: var(--tf-ativo); }
.tf-metric--alerta .tf-metric__valor  { color: var(--tf-alerta); }
.tf-metric--acao .tf-metric__valor    { color: var(--tf-acao); }
.tf-metric--erro .tf-metric__valor    { color: var(--tf-erro); }

.tf-metric__sub {
    font-size: 11px;
    color: var(--tf-texto-muted);
    margin-top: 4px;
}

/* ---------------------------------------------------------------
   10. BADGE
--------------------------------------------------------------- */
.tf-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    border: 1px solid rgba(45, 106, 255, 0.3);
    color: var(--tf-acao);
    background: var(--tf-acao-muted);
}

.tf-badge--cliente-pronto {
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--tf-ativo);
    background: rgba(16, 185, 129, 0.1);
}

.tf-badge--recorrente {
    border-color: rgba(139, 92, 246, 0.35);
    color: #7C3AED;
    background: rgba(139, 92, 246, 0.08);
    text-decoration: none;
    cursor: pointer;
}
.tf-badge--recorrente:hover {
    background: rgba(139, 92, 246, 0.15);
}

/* ---------------------------------------------------------------
   11. CARDS GENÉRICOS
--------------------------------------------------------------- */
.tf-card {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    animation: tf-fade-in 0.3s ease;
}

.tf-card__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--tf-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tf-card__titulo {
    font-size: 14px;
    font-weight: 600;
    color: var(--tf-texto-primary);
}

.tf-card__body {
    padding: 20px;
}

/* ---------------------------------------------------------------
   12. SEÇÕES DENTRO DE CONTEÚDO
--------------------------------------------------------------- */
.tf-secao {
    margin-bottom: 24px;
}

.tf-secao__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tf-secao__titulo {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tf-texto-secondary);
}

/* ---------------------------------------------------------------
   13. FORMULÁRIOS — ESTRUTURAS GRID
--------------------------------------------------------------- */
.tf-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tf-form-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.tf-form-grid--wide {
    grid-template-columns: 1fr;
}

.tf-form-acoes {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--tf-border);
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Erros de validação */
.tf-alerta {
    padding: 12px 16px;
    border-radius: var(--tf-raio);
    font-size: 13.5px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.tf-alerta--erro {
    background: var(--tf-erro-muted);
    color: var(--tf-erro);
    border-color: rgba(239, 68, 68, 0.25);
}

.tf-alerta--sucesso {
    background: var(--tf-ativo-muted);
    color: var(--tf-ativo);
    border-color: rgba(16, 185, 129, 0.25);
}

.tf-alerta--aviso {
    background: var(--tf-alerta-muted);
    color: var(--tf-alerta);
    border-color: rgba(245, 158, 11, 0.25);
}

.tf-alerta__titulo {
    font-weight: 600;
    margin-bottom: 4px;
}

.tf-alerta ul {
    margin: 6px 0 0 16px;
    list-style: disc;
}

.tf-alerta ul li { margin-bottom: 2px; }

/* ---------------------------------------------------------------
   14. AVATAR DE INICIAIS
--------------------------------------------------------------- */
.tf-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tf-acao-muted);
    color: var(--tf-acao);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.tf-avatar--verde {
    background: var(--tf-ativo-muted);
    color: var(--tf-ativo);
}

.tf-avatar--alerta {
    background: var(--tf-alerta-muted);
    color: var(--tf-alerta);
}

/* Célula com avatar + nome */
.tf-cell-ident {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tf-cell-ident__nome {
    font-weight: 500;
}

.tf-cell-ident__sub {
    font-size: 12px;
    color: var(--tf-texto-secondary);
    margin-top: 1px;
}

/* ---------------------------------------------------------------
   15. ESTADO VAZIO
--------------------------------------------------------------- */
.tf-vazio {
    padding: 48px 24px;
    text-align: center;
    color: var(--tf-texto-secondary);
    background: var(--tf-card);
    border-radius: var(--tf-raio-lg);
    border: 1px solid var(--tf-border);
}

.tf-vazio__titulo {
    font-size: 15px;
    font-weight: 600;
    color: var(--tf-texto-secondary);
    margin-bottom: 4px;
}

.tf-vazio__sub {
    font-size: 13px;
    color: var(--tf-texto-muted);
}

/* ---------------------------------------------------------------
   16. PAGINAÇÃO
--------------------------------------------------------------- */
.tf-paginacao {
    padding: 14px 0 0;
    display: flex;
    justify-content: flex-end;
}

/* ---------------------------------------------------------------
   17. UTILITÁRIOS GRID
--------------------------------------------------------------- */
.tf-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tf-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tf-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.tf-gap     { gap: 16px; }
.tf-gap-sm  { gap: 8px; }

.tf-mt  { margin-top: 24px; }
.tf-mt-sm { margin-top: 12px; }
.tf-mb  { margin-bottom: 24px; }
.tf-mb-sm { margin-bottom: 12px; }

/* ---------------------------------------------------------------
   18. LOGIN — PÁGINA STANDALONE
--------------------------------------------------------------- */
.tf-login-page {
    min-height: 100vh;
    display: flex;
    background: var(--tf-base);
}

/* Metade esquerda — formulário */
.tf-login-left {
    flex: 0 0 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    background: var(--tf-base);
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    position: relative;
    z-index: 1;
}

.tf-login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.tf-login-brand__icon {
    width: 36px;
    height: 36px;
    background: var(--tf-acao);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-login-brand__nome {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--tf-texto-primary);
}

.tf-login-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    border: 1px solid rgba(45, 106, 255, 0.3);
    color: var(--tf-acao);
    background: var(--tf-acao-muted);
    margin-bottom: 16px;
}

.tf-login-titulo {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--tf-texto-primary);
    margin-bottom: 6px;
}

.tf-login-sub {
    font-size: 14px;
    color: var(--tf-texto-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.tf-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tf-login-divisor {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--tf-texto-muted);
    font-size: 12px;
}

.tf-login-divisor::before,
.tf-login-divisor::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--tf-border);
}

.tf-login-acesso-alt {
    display: flex;
    gap: 10px;
}

.tf-login-acesso-alt .tf-btn--ghost {
    flex: 1;
    justify-content: center;
}

.tf-login-hint {
    margin-top: 20px;
    font-size: 11.5px;
    color: var(--tf-texto-muted);
    font-family: var(--tf-font-mono);
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--tf-raio);
    border: 1px solid var(--tf-border);
}

/* Metade direita — mapa decorativo */
.tf-login-right {
    flex: 1;
    background: var(--tf-surface);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-login-mapa {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grid de fundo no lado direito */
.tf-login-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* SVG do mini-mapa */
.tf-login-mapa__svg {
    position: relative;
    z-index: 1;
    max-width: 400px;
    width: 100%;
}

/* Card ETA flutuante */
.tf-login-eta {
    position: absolute;
    bottom: 80px;
    right: 60px;
    background: var(--tf-card);
    border: 1px solid var(--tf-border-hover);
    border-radius: var(--tf-raio-lg);
    padding: 14px 18px;
    box-shadow: var(--tf-sombra-md);
    z-index: 2;
    animation: tf-fade-in 0.6s ease 0.2s both;
}

.tf-login-eta__valor {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--tf-ativo);
    font-family: var(--tf-font-mono);
    display: block;
    line-height: 1;
}

.tf-login-eta__label {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tf-texto-muted);
    margin-top: 4px;
    display: block;
}

/* Ponto pulsante do veículo */
.tf-veic-dot {
    animation: tf-pulse 2s infinite;
}

/* ---------------------------------------------------------------
   19. RASTREIO PÚBLICO — PÁGINA STANDALONE
--------------------------------------------------------------- */
.tf-rastreio-page {
    min-height: 100vh;
    background: var(--tf-base);
    display: flex;
    flex-direction: column;
}

.tf-rastreio-header {
    height: 52px;
    background: var(--tf-surface);
    border-bottom: 1px solid var(--tf-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    z-index: 100;
    position: relative;
}

.tf-rastreio-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.03em;
    color: var(--tf-texto-primary);
}

.tf-ao-vivo {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--tf-ativo);
    font-weight: 500;
}

.tf-ao-vivo__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--tf-ativo);
    animation: tf-pulse 2s infinite;
    display: block;
    flex-shrink: 0;
}

.tf-rastreio-body {
    flex: 1;
    display: grid;
    grid-template-columns: 380px 1fr;
}

.tf-rastreio-painel {
    background: var(--tf-surface);
    border-right: 1px solid var(--tf-border);
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tf-rastreio-mapa {
    position: relative;
}

#mapa-rastreio {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* ETA grande */
.tf-eta-bloco {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    padding: 20px;
    text-align: center;
}

.tf-eta-bloco__valor {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: var(--tf-texto-primary);
    font-family: var(--tf-font-mono);
    line-height: 1;
}

.tf-eta-bloco__label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tf-texto-secondary);
    margin-top: 6px;
}

/* Card do motorista */
.tf-motorista-card {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tf-motorista-card__info {
    flex: 1;
    min-width: 0;
}

.tf-motorista-card__nome {
    font-size: 14px;
    font-weight: 600;
    color: var(--tf-texto-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tf-motorista-card__status {
    font-size: 12px;
    color: var(--tf-texto-secondary);
    margin-top: 2px;
}

/* Barra de progresso */
.tf-progresso {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    padding: 16px;
}

.tf-progresso__titulo {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tf-texto-secondary);
    margin-bottom: 10px;
}

.tf-progresso__barra {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tf-progresso__fill {
    height: 100%;
    background: var(--tf-ativo);
    border-radius: 100px;
    transition: width 0.5s ease;
}

.tf-progresso__texto {
    font-size: 12px;
    color: var(--tf-texto-secondary);
}

/* ---------------------------------------------------------------
   20. ÁREA DO MOTORISTA
--------------------------------------------------------------- */
.tf-sessao-card {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.tf-sessao-card--ativa {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.04);
}

.tf-parada-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--tf-border);
}

.tf-parada-item:last-child { border-bottom: none; }

.tf-parada-item__num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--tf-surface);
    border: 1px solid var(--tf-border-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--tf-texto-secondary);
    flex-shrink: 0;
    font-family: var(--tf-font-mono);
}

.tf-parada-item--concluida .tf-parada-item__num {
    background: var(--tf-ativo-muted);
    border-color: var(--tf-ativo);
    color: var(--tf-ativo);
}

.tf-parada-item__info { flex: 1; min-width: 0; }

.tf-parada-item__nome {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tf-texto-primary);
}

.tf-parada-item__end {
    font-size: 12px;
    color: var(--tf-texto-secondary);
    margin-top: 2px;
}

.tf-parada-item__meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.tf-parada-item__meta span {
    font-size: 11px;
    color: var(--tf-texto-secondary);
    font-family: var(--tf-font-mono);
}

/* ---------------------------------------------------------------
   21. MAPA LEAFLET (formulário de cliente)
--------------------------------------------------------------- */
.tf-mapa-container {
    border: 1px solid var(--tf-border-hover);
    border-radius: var(--tf-raio-lg);
    overflow: hidden;
    margin-top: 8px;
    transition: border-color 0.2s;
}

.tf-mapa-container.tem-ponto {
    border-color: var(--tf-ativo);
}

#mapa {
    height: 320px;
    width: 100%;
    cursor: crosshair;
}

.tf-mapa-barra {
    padding: 8px 14px;
    background: var(--tf-surface);
    border-top: 1px solid var(--tf-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.tf-mapa-instrucao {
    color: var(--tf-texto-secondary);
}

.tf-mapa-coords {
    font-family: var(--tf-font-mono);
    font-size: 12px;
    color: var(--tf-ativo);
    font-weight: 500;
}

.tf-cep-status {
    font-size: 12px;
    margin-top: 3px;
    min-height: 1.4em;
}

.tf-cep-status--buscando { color: var(--tf-acao); }
.tf-cep-status--sucesso  { color: var(--tf-ativo); }
.tf-cep-status--erro     { color: var(--tf-erro); }

/* ---------------------------------------------------------------
   22. SELEÇÃO DE CLIENTES (form de rota)
--------------------------------------------------------------- */
.tf-clientes-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.tf-cliente-opcao {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.tf-cliente-opcao:hover {
    border-color: var(--tf-border-hover);
    background: rgba(255,255,255,0.02);
}

.tf-cliente-opcao input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--tf-acao);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    cursor: pointer;
}

.tf-cliente-opcao--sem-gps {
    opacity: 0.45;
    cursor: not-allowed;
}

.tf-cliente-opcao__nome {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tf-texto-primary);
}

.tf-cliente-opcao__sub {
    font-size: 12px;
    color: var(--tf-texto-secondary);
    margin-top: 2px;
}

.tf-paradas-resumo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.tf-parada-resumo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio);
    font-size: 13px;
}

.tf-parada-resumo-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tf-acao-muted);
    color: var(--tf-acao);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--tf-font-mono);
}

/* ---------------------------------------------------------------
   23. ANIMAÇÕES
--------------------------------------------------------------- */

/* Pulso para o ponto do veículo no mapa */
@keyframes tf-pulse {
    0%   { transform: scale(1);   opacity: 1; }
    50%  { transform: scale(1.6); opacity: 0.5; }
    100% { transform: scale(1);   opacity: 1; }
}

/* Entrada suave de cards */
@keyframes tf-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------
   24. RESPONSIVO
--------------------------------------------------------------- */
@media (max-width: 1024px) {
    .tf-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Sidebar mobile */
    .tf-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .tf-sidebar.aberta {
        transform: translateX(0);
        box-shadow: 0 0 0 100vw rgba(0,0,0,0.5);
    }

    .tf-main {
        margin-left: 0;
    }

    /* Conteúdo */
    .tf-conteudo { padding: 16px; }

    /* Grids */
    .tf-grid-2, .tf-grid-3, .tf-grid-4 {
        grid-template-columns: 1fr;
    }

    .tf-form-grid, .tf-form-grid--3 {
        grid-template-columns: 1fr;
    }

    /* Topbar */
    .tf-topbar { padding: 0 16px; }

    .tf-topbar__usuario { display: none; }

    /* Login */
    .tf-login-page { flex-direction: column; }
    .tf-login-left { flex: none; padding: 32px 24px; }
    .tf-login-right { display: none; }
    .tf-login-acesso-alt { flex-direction: column; }

    /* Rastreio */
    .tf-rastreio-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .tf-rastreio-painel { order: 2; }
    .tf-rastreio-mapa { order: 1; min-height: 300px; }
}

/* ---------------------------------------------------------------
   25. TIMELINE DE PARADAS (detalhes de rota)
--------------------------------------------------------------- */

.tf-timeline {
    position: relative;
    padding-left: 0;
    list-style: none;
}

/* Linha vertical conectando os pontos */
.tf-timeline::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: var(--tf-border);
}

.tf-timeline__item {
    display: flex;
    gap: 14px;
    padding-bottom: 16px;
    position: relative;
}

.tf-timeline__item:last-child { padding-bottom: 0; }

/* Ponto circular com número */
.tf-timeline__dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--tf-border-hover);
    background: var(--tf-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--tf-font-mono);
    color: var(--tf-texto-secondary);
    flex-shrink: 0;
    z-index: 1;
}

.tf-timeline__item--concluida .tf-timeline__dot {
    background: var(--tf-ativo-muted);
    border-color: var(--tf-ativo);
    color: var(--tf-ativo);
}

.tf-timeline__item--chegou .tf-timeline__dot {
    background: var(--tf-alerta-muted);
    border-color: var(--tf-alerta);
    color: var(--tf-alerta);
}

.tf-timeline__item--a_caminho .tf-timeline__dot {
    background: var(--tf-acao-muted);
    border-color: var(--tf-acao);
    color: var(--tf-acao);
}

.tf-timeline__item--falhou .tf-timeline__dot {
    background: var(--tf-erro-muted, #fee2e2);
    border-color: var(--tf-erro, #ef4444);
    color: var(--tf-erro, #ef4444);
}

.tf-timeline__item--parcial .tf-timeline__dot {
    background: var(--tf-alerta-muted);
    border-color: var(--tf-alerta);
    color: var(--tf-alerta);
}

/* Corpo do item */
.tf-timeline__corpo {
    flex: 1;
    min-width: 0;
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio);
    padding: 12px 14px;
    margin-top: 2px;
}

.tf-timeline__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.tf-timeline__nome {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tf-texto-primary);
}

.tf-timeline__end {
    font-size: 12px;
    color: var(--tf-texto-secondary);
    margin-top: 2px;
    margin-bottom: 6px;
}

.tf-timeline__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.tf-timeline__meta span {
    font-family: var(--tf-font-mono);
    font-size: 11.5px;
    color: var(--tf-texto-secondary);
}

.tf-timeline__link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--tf-border);
    flex-wrap: wrap;
}

.tf-timeline__link-label {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tf-texto-muted);
    flex-shrink: 0;
}

/* ---------------------------------------------------------------
   26. CÓDIGO INLINE
--------------------------------------------------------------- */

.tf-cod {
    font-family: var(--tf-font-mono);
    font-size: 12px;
    background: var(--tf-surface);
    color: var(--tf-texto-secondary);
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid var(--tf-border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: 360px;
    vertical-align: middle;
}

/* ---------------------------------------------------------------
   27. SIMULADOR GPS
--------------------------------------------------------------- */

.tf-sim-modos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tf-sim-modo {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    padding: 16px;
}

.tf-sim-modo h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--tf-texto-primary);
    letter-spacing: -0.01em;
}

/* Botões do simulador */
.tf-btn--chegou {
    background: var(--tf-alerta);
    color: #fff;
    border-color: var(--tf-alerta);
}

.tf-btn--chegou:hover {
    background: #D97706;
    border-color: #D97706;
    color: #fff;
}

.tf-btn--concluir {
    background: var(--tf-ativo);
    color: #fff;
    border-color: var(--tf-ativo);
}

.tf-btn--concluir:hover {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

.tf-btn--finalizar {
    background: var(--tf-erro);
    color: #fff;
    border-color: var(--tf-erro);
}

.tf-btn--finalizar:hover {
    background: #DC2626;
    border-color: #DC2626;
    color: #fff;
}

.tf-btn--finalizar:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Log do simulador */
.tf-sim-log {
    max-height: 280px;
    overflow-y: auto;
    background: var(--tf-base);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio);
}

.tf-log-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--tf-border);
    font-family: var(--tf-font-mono);
    font-size: 12px;
    color: var(--tf-texto-primary);
}

.tf-log-item:last-child { border-bottom: none; }

.tf-log-hora {
    color: var(--tf-texto-muted);
    font-size: 11px;
    flex-shrink: 0;
}

/* Ponto do último GPS */
.tf-sim-ultimo-ponto {
    padding: 8px 14px;
    background: var(--tf-ativo-muted);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--tf-raio);
    font-family: var(--tf-font-mono);
    font-size: 12px;
    color: var(--tf-ativo);
    margin-bottom: 12px;
}

/* Ações das paradas no simulador */
.tf-parada-acoes {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .tf-sim-modos { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   28. LINKS DE RASTREIO (rota criada)
--------------------------------------------------------------- */

.tf-link-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tf-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio);
    padding: 12px 14px;
    flex-wrap: wrap;
}

.tf-link-item__num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--tf-acao-muted);
    color: var(--tf-acao);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--tf-font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tf-link-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tf-link-item__nome {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tf-texto-primary);
}

.tf-link-item__url {
    font-family: var(--tf-font-mono);
    font-size: 12px;
    color: var(--tf-texto-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------------
   29. GRÁFICO DE DESEMPENHO
--------------------------------------------------------------- */

.tf-desempenho-grafico {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 160px;
    padding: 0 4px;
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    padding: 16px 16px 0;
}

.tf-desempenho-dia {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    gap: 4px;
}

.tf-desempenho-barras {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
}

.tf-desempenho-barra {
    width: 28px;
    min-height: 4px;
    background: var(--tf-acao);
    border-radius: 3px 3px 0 0;
    transition: height 0.4s ease;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.tf-desempenho-barra-valor {
    position: absolute;
    top: -18px;
    font-size: 11px;
    font-weight: 600;
    color: var(--tf-texto-secondary);
    font-family: var(--tf-font-mono);
}

.tf-desempenho-dia__label {
    font-size: 11px;
    font-family: var(--tf-font-mono);
    color: var(--tf-texto-secondary);
    text-align: center;
    padding: 6px 0 4px;
    border-top: 1px solid var(--tf-border);
    width: 100%;
}

.tf-desempenho-dia__rotas {
    font-size: 10px;
    color: var(--tf-texto-muted);
    text-align: center;
    padding-bottom: 8px;
}

.tf-desempenho-legenda {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--tf-texto-secondary);
}

.tf-desempenho-legenda-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tf-desempenho-legenda-cor {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: var(--tf-acao);
    flex-shrink: 0;
}

/* Cards de dicas */
.tf-dica-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.tf-dica-card {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    padding: 16px;
}

.tf-dica-card strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-texto-primary);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.tf-dica-card p {
    font-size: 12.5px;
    color: var(--tf-texto-secondary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .tf-dica-grid { grid-template-columns: 1fr; }
    .tf-desempenho-barra { width: 20px; }
}

/* ---------------------------------------------------------------
   30. RASTREIO EXPIRADO
--------------------------------------------------------------- */

.tf-expirado-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.tf-expirado-card {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-raio-lg);
    padding: 40px 36px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    animation: tf-fade-in 0.4s ease;
}

.tf-expirado__icone {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--tf-erro-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--tf-erro);
}

.tf-expirado__titulo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--tf-texto-primary);
    margin-bottom: 10px;
}

.tf-expirado__texto {
    font-size: 14px;
    color: var(--tf-texto-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.tf-expirado__sub {
    font-size: 12.5px;
    color: var(--tf-texto-muted);
    line-height: 1.5;
}

/* ---------------------------------------------------------------
   31. PÁGINA DE DETALHE (motoristas / clientes)
--------------------------------------------------------------- */

.tf-detalhe-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.tf-detalhe-campo {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tf-detalhe-campo__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tf-texto-muted);
}

.tf-detalhe-campo__valor {
    font-size: 14px;
    color: var(--tf-texto-primary);
}

@media (max-width: 480px) {
    .tf-pagina-header { flex-direction: column; }
    .tf-pagina-header__titulo { font-size: 18px; }
    .tf-detalhe-info { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   NOTIFICAÇÕES — Sininho, badge e dropdown
--------------------------------------------------------------- */
.tf-notif {
    position: relative;
}

.tf-notif__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--tf-raio);
    color: var(--tf-texto-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    padding: 0;
}

.tf-notif__btn:hover {
    background: var(--tf-acao-muted);
    color: var(--tf-texto-primary);
    border-color: var(--tf-border-hover);
}

.tf-notif__badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    background: var(--tf-erro);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    font-family: var(--tf-font-sans);
    line-height: 14px;
    text-align: center;
    border-radius: 100px;
    display: none;
}

.tf-notif__badge--visivel {
    display: block;
}

.tf-notif__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: var(--tf-card);
    border: 1px solid var(--tf-border-hover);
    border-radius: var(--tf-raio-lg);
    box-shadow: var(--tf-sombra-md);
    z-index: 200;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.tf-notif__dropdown--aberto {
    display: flex;
}

.tf-notif__dropdown-header {
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tf-texto-muted);
    border-bottom: 1px solid var(--tf-border);
    flex-shrink: 0;
}

.tf-notif__lista {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
}

.tf-notif__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--tf-border);
    cursor: pointer;
    transition: background 0.12s;
}

.tf-notif__item:last-child {
    border-bottom: none;
}

.tf-notif__item:hover {
    background: var(--tf-acao-muted);
}

.tf-notif__item--nao-lida {
    background: rgba(45, 106, 255, 0.05);
}

.tf-notif__item-titulo {
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-texto-primary);
}

.tf-notif__item-msg {
    font-size: 12px;
    color: var(--tf-texto-secondary);
    line-height: 1.4;
}

.tf-notif__item-hora {
    font-size: 10px;
    color: var(--tf-texto-muted);
    font-family: var(--tf-font-mono);
    margin-top: 2px;
}

.tf-notif__vazio {
    padding: 24px 14px;
    text-align: center;
    font-size: 12px;
    color: var(--tf-texto-muted);
}
