body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.navbar-brand {
    font-weight: 600;
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.table th {
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
}

/* =========================================================================
   Tema Atona — tela principal (Caçador de Leads)
   Paleta: #020914 / #061426 / #0A2038 · acentos #282DF8 #484CFD #00A8FF
   ========================================================================= */

body.tela-app {
    background-color: #020914;
    color: #DCE6F2;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
}

.app-shell {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

/* ---------------- menu lateral ---------------- */

.sidebar {
    position: sticky;
    top: 0;
    flex: 0 0 254px;
    width: 254px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #061426 0%, #000818 100%);
    border-right: 1px solid rgba(143,163,184,.16);
    transition: flex-basis .2s ease, width .2s ease, transform .25s ease;
    z-index: 1030;
}

.sidebar-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: 1rem .85rem .75rem;
}

.sidebar-marca {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-marca i {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(180deg, #484CFD, #282DF8);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    font-size: 1rem;
}

.sidebar-toggle {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(143,163,184,.3);
    border-radius: 10px;
    background: transparent;
    color: #8FA3B8;
    transition: .15s ease;
}

.sidebar-toggle:hover {
    color: #fff;
    border-color: #484CFD;
    background: rgba(40,45,248,.25);
}

body.menu-recolhido .sidebar-toggle i {
    transform: scaleX(-1);
}

.sidebar-menu {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .5rem .75rem;
    overflow-y: auto;
}

.sidebar-menu button,
.sidebar-menu a,
.sidebar-rodape a {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .68rem .8rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #8FA3B8;
    font-size: .95rem;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.sidebar-menu i,
.sidebar-rodape i {
    flex: 0 0 1.3rem;
    font-size: 1.1rem;
    text-align: center;
}

.sidebar-menu button:hover,
.sidebar-menu a:hover,
.sidebar-rodape a:hover {
    background: rgba(40,45,248,.22);
    color: #fff;
}

.sidebar-menu button:focus-visible,
.sidebar-menu a:focus-visible,
.sidebar-rodape a:focus-visible {
    outline: 2px solid #484CFD;
    outline-offset: 1px;
}

.sidebar-menu a.ativo {
    background: linear-gradient(90deg, rgba(40,45,248,.34), rgba(40,45,248,.10));
    color: #fff;
    box-shadow: inset 3px 0 0 #484CFD;
}

.sidebar-rodape {
    padding: .75rem;
    border-top: 1px solid rgba(143,163,184,.16);
}

.sidebar-overlay {
    display: none;
}

/* menu recolhido (desktop) */
body.menu-recolhido .sidebar {
    flex-basis: 76px;
    width: 76px;
}

body.menu-recolhido .sidebar-texto {
    display: none;
}

body.menu-recolhido .sidebar-topo {
    flex-direction: column;
    padding: .85rem .5rem .6rem;
}

body.menu-recolhido .sidebar-marca {
    justify-content: center;
}

body.menu-recolhido .sidebar-menu button,
body.menu-recolhido .sidebar-menu a,
body.menu-recolhido .sidebar-rodape a {
    justify-content: center;
    padding: .7rem .5rem;
}

/* ---------------- conteúdo ---------------- */

.app-conteudo {
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: 4.5rem;
}

.topo-mobile {
    display: none;
    align-items: center;
    gap: .75rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: .7rem .9rem;
    background: #061426;
    border-bottom: 1px solid rgba(143,163,184,.16);
}

.topo-mobile-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(143,163,184,.3);
    border-radius: 10px;
    background: transparent;
    color: #DCE6F2;
    font-size: 1.2rem;
}

.topo-mobile-titulo {
    font-weight: 600;
    color: #fff;
}

/* ---------------- indicadores (KPIs) ---------------- */

.kpi {
    height: 100%;
    position: relative;
    overflow: hidden;
    padding: .85rem 1rem .85rem 1.15rem;
    border: 1px solid rgba(143,163,184,.18);
    border-radius: 12px;
    background: linear-gradient(180deg, #0A2038 0%, #061426 100%);
}

.kpi::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--kpi-cor, #00A8FF);
}

.kpi-rotulo {
    display: block;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #8FA3B8;
}

.kpi strong {
    display: block;
    margin-top: .15rem;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--kpi-cor, #00A8FF);
}

/* ---------------- cartões ---------------- */

.tela-app .card {
    background-color: #061426;
    border: 1px solid rgba(143,163,184,.18);
    border-radius: 12px;
    color: #DCE6F2;
    box-shadow: none;
}

.tela-app .card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(143,163,184,.18);
    border-radius: 12px 12px 0 0;
    color: #DCE6F2;
    font-weight: 600;
}

/* ---------------- tabela ---------------- */

.tela-app .table {
    --bs-table-bg: transparent;
    --bs-table-color: #DCE6F2;
    --bs-table-striped-bg: rgba(143,163,184,.07);
    --bs-table-striped-color: #DCE6F2;
    --bs-table-hover-bg: rgba(0,168,255,.09);
    --bs-table-hover-color: #fff;
    --bs-table-border-color: rgba(143,163,184,.16);
    color: #DCE6F2;
}

.tela-app thead.table-dark,
.tela-app .table thead.table-dark {
    --bs-table-bg: #0A2038;
    --bs-table-color: #DCE6F2;
    --bs-table-border-color: rgba(143,163,184,.16);
    background-color: #0A2038;
    color: #DCE6F2;
}

.tela-app .table th,
.tela-app .table td {
    border-color: rgba(143,163,184,.16);
    vertical-align: middle;
}

.tela-app .table a {
    color: #00A8FF;
    text-decoration: none;
}

.tela-app .table a:hover {
    color: #39C6FF;
    text-decoration: underline;
}

/* ---------------- formulários ---------------- */

.tela-app .form-label {
    color: #8FA3B8;
    font-size: .85rem;
    font-weight: 500;
}

.tela-app .form-control,
.tela-app .form-select {
    background-color: #020914;
    border-color: rgba(143,163,184,.3);
    color: #DCE6F2;
}

.tela-app .form-control::placeholder {
    color: rgba(143,163,184,.65);
}

.tela-app .form-control:focus,
.tela-app .form-select:focus {
    background-color: #020914;
    border-color: #282DF8;
    box-shadow: 0 0 0 .2rem rgba(40,45,248,.35);
    color: #DCE6F2;
}

.tela-app .form-select option {
    background-color: #061426;
    color: #DCE6F2;
}

.tela-app .form-text {
    color: #8FA3B8;
}

.tela-app .input-group-text {
    background-color: #0A2038;
    border-color: rgba(143,163,184,.3);
    color: #8FA3B8;
}

.tela-app .form-check-input {
    background-color: #020914;
    border-color: rgba(143,163,184,.4);
}

/* ---------------- botões ---------------- */

.tela-app .btn {
    border-radius: 9px;
    font-weight: 500;
}

.tela-app .btn-primary {
    background: linear-gradient(180deg, #484CFD, #282DF8);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
}

.tela-app .btn-primary:hover,
.tela-app .btn-primary:focus {
    background: linear-gradient(180deg, #5C5FFF, #3237F9);
    border-color: rgba(255,255,255,.35);
    color: #fff;
}

.tela-app .btn-success {
    background: #61CE70;
    border-color: #61CE70;
    color: #02240F;
}

.tela-app .btn-success:hover,
.tela-app .btn-success:focus {
    background: #4FBB5F;
    border-color: #4FBB5F;
    color: #02240F;
}

.tela-app .btn-warning {
    background: #FFB000;
    border-color: #FFB000;
    color: #2A1B00;
}

.tela-app .btn-warning:hover,
.tela-app .btn-warning:focus {
    background: #E89E00;
    border-color: #E89E00;
    color: #2A1B00;
}

.tela-app .btn-info {
    background: #00A8FF;
    border-color: #00A8FF;
    color: #00131F;
}

.tela-app .btn-info:hover,
.tela-app .btn-info:focus {
    background: #0091DF;
    border-color: #0091DF;
    color: #00131F;
}

.tela-app .btn-secondary {
    background: #0A2038;
    border-color: rgba(143,163,184,.35);
    color: #DCE6F2;
}

.tela-app .btn-secondary:hover,
.tela-app .btn-secondary:focus {
    background: #102c4c;
    border-color: rgba(143,163,184,.55);
    color: #fff;
}

.tela-app .btn-outline-primary {
    border-color: #484CFD;
    color: #8B8DFF;
}

.tela-app .btn-outline-primary:hover,
.tela-app .btn-outline-primary:focus {
    background: #484CFD;
    border-color: #484CFD;
    color: #fff;
}

.tela-app .btn-outline-success {
    border-color: #61CE70;
    color: #61CE70;
}

.tela-app .btn-outline-success:hover,
.tela-app .btn-outline-success:focus {
    background: #61CE70;
    border-color: #61CE70;
    color: #02240F;
}

.tela-app .btn-outline-warning {
    border-color: #FFB000;
    color: #FFB000;
}

.tela-app .btn-outline-warning:hover,
.tela-app .btn-outline-warning:focus {
    background: #FFB000;
    border-color: #FFB000;
    color: #2A1B00;
}

.tela-app .btn-outline-info {
    border-color: #00A8FF;
    color: #00A8FF;
}

.tela-app .btn-outline-info:hover,
.tela-app .btn-outline-info:focus {
    background: #00A8FF;
    border-color: #00A8FF;
    color: #00131F;
}

.tela-app .btn-outline-secondary,
.tela-app .btn-outline-light {
    border-color: rgba(143,163,184,.35);
    color: #8FA3B8;
}

.tela-app .btn-outline-secondary:hover,
.tela-app .btn-outline-secondary:focus,
.tela-app .btn-outline-light:hover,
.tela-app .btn-outline-light:focus {
    background: rgba(143,163,184,.14);
    border-color: rgba(143,163,184,.55);
    color: #fff;
}

.tela-app .btn-danger {
    background: #FF6B6B;
    border-color: #FF6B6B;
    color: #2B0A0A;
}

.tela-app .btn-danger:hover,
.tela-app .btn-danger:focus {
    background: #ff8585;
    border-color: #ff8585;
    color: #2B0A0A;
}

.tela-app .btn-outline-danger {
    border-color: #FF6B6B;
    color: #FF6B6B;
}

.tela-app .btn-outline-danger:hover,
.tela-app .btn-outline-danger:focus {
    background: #FF6B6B;
    border-color: #FF6B6B;
    color: #2B0A0A;
}

/* ---------------- badges e textos ---------------- */

.tela-app .badge {
    border: 1px solid rgba(255,255,255,.18);
    font-weight: 500;
}

.tela-app .badge.bg-primary   { background: #484CFD !important; color: #fff !important; }
.tela-app .badge.bg-success   { background: #61CE70 !important; color: #02240F !important; }
.tela-app .badge.bg-danger    { background: #FF6B6B !important; color: #2B0A0A !important; }
.tela-app .badge.bg-warning   { background: #FFC400 !important; color: #2A1B00 !important; }
.tela-app .badge.bg-info      { background: #00A8FF !important; color: #00131F !important; }
.tela-app .badge.bg-secondary { background: #0A2038 !important; color: #8FA3B8 !important; }

/* temperatura do lead */
.badge.temp-oportunidade { background: #61CE70; color: #02240F; }
.badge.temp-quente      { background: #FF6B6B; color: #2B0A0A; }
.badge.temp-neutro      { background: #2A3A4E; color: #C9D6E4; }
.badge.temp-frio        { background: #00A8FF; color: #00131F; }

.tela-app .text-primary { color: #484CFD !important; }
.tela-app .text-success { color: #61CE70 !important; }
.tela-app .text-danger  { color: #FF6B6B !important; }
.tela-app .text-warning { color: #FFC400 !important; }
.tela-app .text-info    { color: #00A8FF !important; }
.tela-app .text-muted   { color: #8FA3B8 !important; }

/* ---------------- modais ---------------- */

.tela-app .modal-content {
    background-color: #061426;
    border: 1px solid rgba(143,163,184,.22);
    border-radius: 14px;
    color: #DCE6F2;
}

.tela-app .modal-header,
.tela-app .modal-footer {
    border-color: rgba(143,163,184,.18);
}

.tela-app .modal-title {
    font-weight: 600;
    color: #fff;
}

.tela-app .btn-close {
    filter: invert(1) grayscale(1) opacity(.75);
}

.tela-app .modal-backdrop.show {
    opacity: .7;
}

/* ---------------- alertas ---------------- */

.tela-app .alert {
    border-radius: 10px;
}

.tela-app .alert-info {
    background: rgba(0,168,255,.12);
    border-color: rgba(0,168,255,.4);
    color: #D3F1FF;
}

.tela-app .alert-success {
    background: rgba(97,206,112,.12);
    border-color: rgba(97,206,112,.4);
    color: #C9F4D2;
}

.tela-app .alert-danger {
    background: rgba(255,107,107,.12);
    border-color: rgba(255,107,107,.4);
    color: #FFDCDC;
}

.tela-app .alert-warning {
    background: rgba(255,196,64,.12);
    border-color: rgba(255,196,64,.4);
    color: #FFEBC2;
}

/* ---------------- faixa de progresso ---------------- */

.tela-app .faixa-progresso {
    background: #061426;
    border-top: 1px solid rgba(143,163,184,.22);
    color: #DCE6F2;
}

.tela-app .faixa-progresso .barra {
    background: #020914;
}

.tela-app .faixa-progresso .barra > div {
    background: linear-gradient(90deg, #282DF8, #00A8FF);
}

.tela-app .faixa-progresso.concluido .barra > div { background: #61CE70; }
.tela-app .faixa-progresso.com-erro .barra > div { background: #FF6B6B; }

/* ---------------- barras de rolagem ---------------- */

.tela-app ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.tela-app ::-webkit-scrollbar-track {
    background: #020914;
}

.tela-app ::-webkit-scrollbar-thumb {
    background: #0A2038;
    border: 2px solid #020914;
    border-radius: 6px;
}

.tela-app ::-webkit-scrollbar-thumb:hover {
    background: #13304f;
}

/* ---------------- responsivo ---------------- */

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(0,0,0,.6);
    }

    body.menu-aberto .sidebar {
        transform: translateX(0);
    }

    body.menu-aberto .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(2,9,20,.7);
        z-index: 1025;
    }

    .topo-mobile {
        display: flex;
    }

    .kpi strong {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .tela-app .table {
        font-size: .875rem;
    }
}
