/* ===== Base ===== */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f6f7fb;
    color: #1a1a1a;
    margin: 0;
}

/* ===== Top Menu ===== */
.top-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #6f5dff 20%, #44c8ff 100%);
    padding: 18px 38px;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 2px 10px #bbb3;
    margin-bottom: 24px;
}

.menu-left {
    font-size: 1.3em;
    color: #fff;
    font-weight: bold;
}

.menu-center a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1em;
    transition: color .15s;
}

.menu-center a:hover {
    color: #ffe100;
}

.menu-right {
    display: flex;
    align-items: center;
}

.usuario-logado {
    color: #fff;
    margin-right: 22px;
    font-size: 0.95em;
}

.sair {
    background: #e55039;
    color: #fff !important;
    padding: 7px 19px;
    border-radius: 7px;
    text-decoration: none;
    font-weight: bold;
    transition: background .15s;
    margin-left: 15px;
}

.sair:hover {
    background: #c03a20;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 2100px;
    margin: 40px auto;
    padding: 32px 18px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 0 18px #bdbdbd40;
}

/* ===== Tabela Responsiva ===== */
.tabela-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 0 auto;
    margin-top: 10px;
    border-radius: 10px;
    background: #f8faff;
    box-shadow: 0 2px 10px #eee7;
    padding: 7px 0;
}

.table-destaque {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    background: #f6f7fb;
}

.table-destaque th,
.table-destaque td {
    border: 1px solid #d2d2f3;
    padding: 8px 12px;
    text-align: center;
    word-break: break-word;
    font-size: 15px;
}

.table-destaque th {
    background: #6f5dff;
    color: #fff;
    font-weight: bold;
}

.table-destaque tr:nth-child(even) {
    background: #f1f6ff;
}

/* ===== Larguras das colunas (desktop) ===== */
/* 1: Empresa, 2: CPF/CNPJ, 3: Email, 4: Cidade, 5: Estado, 6: CEP, 7: Telefone, 8: Status, 9: Ação */
.table-destaque th:nth-child(1),
.table-destaque td:nth-child(1) {
    width: 260px;
}

.table-destaque th:nth-child(2),
.table-destaque td:nth-child(2) {
    width: 120px;
}

.table-destaque th:nth-child(3),
.table-destaque td:nth-child(3) {
    width: 220px;
}

.table-destaque th:nth-child(4),
.table-destaque td:nth-child(4) {
    width: 140px;
}

.table-destaque th:nth-child(5),
.table-destaque td:nth-child(5) {
    width: 80px;
}

.table-destaque th:nth-child(6),
.table-destaque td:nth-child(6) {
    width: 110px;
}

/* Telefone (7) mais compacto */
.table-destaque th:nth-child(7),
.table-destaque td:nth-child(7) {
    width: 190px;
    max-width: 220px;
}

/* Status (8) propositalmente menor */
.table-destaque th:nth-child(8),
.table-destaque td:nth-child(8) {
    width: 200px;
    /* << reduzido */
    max-width: 240px;
}

/* Ação (9) estreita e sem quebra do botão */
.table-destaque th:nth-child(9),
.table-destaque td:nth-child(9) {
    width: 110px;
    white-space: nowrap;
}

/* ===== Tipos de input ===== */
input,
select,
button {
    font-size: 1em;
}

/* Regra geral de forms — mantida */
form input,
form select,
form button {
    width: 100%;
    box-sizing: border-box;
}

/* ===== Form inline dentro da tabela (telefone + status + botão) ===== */
.form-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    /* quebra no mobile */
    justify-content: center;
}

/* Prioriza controles do form inline para não herdarem width:100% */
.form-inline>input,
.form-inline>select,
.form-inline>button {
    width: auto;
    box-sizing: border-box;
}

/* Campo telefone: compacto e elástico */
.input-telefone {
    width: 180px;
    max-width: 28vw;
    padding: 6px 8px;
}

/* Select de Status: reduzido */
.status-select {
    width: 100px;
    /* << principal ajuste */
    min-width: 150px;
    max-width: 28vw;
    padding: 6px 8px;
}

/* Garante mínimo menor dentro da 8ª coluna */
.table-destaque td:nth-child(8) select.status-select {
    min-width: 150px;
}

/* Botão enxuto e sem quebra */
.atualizar-btn {
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 0.95em;
    border-radius: 5px;
    background: #6f5dff;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .15s;
}

.atualizar-btn:hover {
    background: #5242c0;
}

/* ===== Títulos, alertas e login ===== */
h2,
h3 {
    color: #6f5dff;
    text-align: center;
    font-weight: bold;
    margin-bottom: 12px;
}

.alert {
    color: #fff;
    background: #e55039;
    padding: 11px;
    margin-bottom: 18px;
    border-radius: 7px;
    text-align: center;
    font-size: 15px;
}

.login-container {
    width: 370px;
    margin: 80px auto;
    padding: 35px 30px;
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 0 24px #bbb8;
    text-align: center;
}

.form-login input[type="text"],
.form-login input[type="email"],
.form-login input[type="password"] {
    width: 94%;
    margin-bottom: 17px;
}

.dashboard-info {
    margin-top: 23px;
    font-size: 1.1em;
    text-align: center;
    color: #3a3851;
    background: #ecf2ff;
    border-radius: 7px;
    padding: 14px;
}

.botao-link {
    display: inline-block;
    background: #6f5dff;
    color: #fff !important;
    padding: 12px 32px;
    border-radius: 7px;
    margin-bottom: 10px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1em;
    transition: background .16s;
    margin-top: 6px;
}

/* ===== Breakpoints ===== */
@media (max-width: 1024px) {
    .input-telefone {
        width: 160px;
    }

    .status-select {
        width: 170px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 98vw;
        padding: 12px 2vw;
        margin: 14px auto;
    }

    .tabela-responsive {
        padding: 0;
    }

    /* Empilha os controles no mobile */
    .form-inline {
        gap: 6px;
    }

    .form-inline>input,
    .form-inline>select,
    .form-inline>button {
        flex: 1 1 50%;
        width: 50%;
    }

    /* relaxa larguras de coluna pra caber melhor */
    .table-destaque th:nth-child(7),
    .table-destaque td:nth-child(7),
    .table-destaque th:nth-child(8),
    .table-destaque td:nth-child(8),
    .table-destaque th:nth-child(9),
    .table-destaque td:nth-child(9) {
        width: auto;
    }
}

@media (max-width: 480px) {

    .table-destaque th,
    .table-destaque td {
        font-size: 12.5px;
        padding: 6px 6px;
    }

    .table-destaque {
        min-width: 360px;
    }

    .input-telefone,
    .status-select {
        max-width: 100%;
    }
}