/* ========================= */
/* RESET */
/* ========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", Arial, sans-serif;
    background-color: #0f1115;
    color: #e4e6eb;
    min-height: 100vh;
}

/* ========================= */
/* SIDEBAR */
/* ========================= */

.sidebar {
    width: 240px;
    background: #151821;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    border-right: 1px solid #1f2430;
}

.sidebar h2 {
    margin-bottom: 40px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.sidebar a {
    display: block;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s ease;
}

.sidebar a:hover {
    background: #1f2430;
    color: #ffffff;
}

/* ========================= */
/* CONTEÚDO PRINCIPAL */
/* ========================= */

.content {
    margin-left: 240px;
    padding: 40px;
    width: calc(100% - 240px);
    overflow-x: hidden;
}

/* Header interno da página */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 600;
}

/* ========================= */
/* CARD PADRÃO */
/* ========================= */

.card {
    background: #1a1d27;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #232734;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ========================= */
/* ESPAÇAMENTO ENTRE SEÇÕES */
/* ========================= */

.section-spacing {
    margin-top: 40px;
}

/* ========================= */
/* GRID DE CARDS DO DASHBOARD */
/* ========================= */

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.cards-grid .card {
    flex: 1 1 calc((100% - 60px) / 4);
    max-width: calc((100% - 60px) / 4);
    background: rgba(26, 29, 39, 0.8);
}

/* Celulares */
@media (max-width: 480px) {
    .cards-grid .card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}


/* ========================= */
/* FORMULÁRIOS */
/* ========================= */

form > div {
    margin-bottom: 18px;
}

form > div > div {
    display: flex;
    flex-direction: column;
    flex: 1;
}

label {
    margin-bottom: 6px;
    font-size: 13px;
    color: #9ca3af;
}

input, select, textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #2a2f3d;
    background-color: #11141b;
    color: #ffffff;
    font-size: 14px;
    transition: 0.2s;
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}


/* ========================= */
/* BOTÕES */
/* ========================= */

button {
    background: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s ease;
}

button:hover {
    background: #4338ca;
}

/* ========================= */
/* TABELA */
/* ========================= */

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    text-align: left;
    padding: 14px 12px;
    background: #151821;
    color: #9ca3af;
    font-weight: 500;
    border-bottom: 1px solid #232734;
}

table td {
    padding: 14px 12px;
    border-bottom: 1px solid #232734;
}

table tr:hover {
    background: #1f2430;
}

/* SCROLLBAR DA TABELA */

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #151821;
}

.table-container::-webkit-scrollbar-thumb {
    background: #2a2f3d;
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

/* ========================= */
/* RESPONSIVO */
/* ========================= */

@media (max-width: 768px) {

    .sidebar {
        width: 200px;
    }

    .content {
        margin-left: 200px;
        width: calc(100% - 200px);
        padding: 25px;
    }
}

/* ========================= */
/* AUTOCOMPLETE CLIENTES */
/* ========================= */

.autocomplete-list {
    position: absolute;
    background-color: #1a1d27;
    border: 1px solid #2a2f3d;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    list-style: none;
    padding: 0;
}

.autocomplete-list li {
    padding: 10px 12px;
    cursor: pointer;
    color: #ffffff;
    transition: 0.2s;
}

.autocomplete-list li:hover {
    background-color: #4f46e5;
    color: #ffffff;
}

/* ========================= */
/* MODO EDIÇÃO */
/* ========================= */

.modo-edicao input,
.modo-edicao select,
.modo-edicao textarea {
    border-color: #facc15;  /* borda amarela para indicar edição */
    background-color: #1a1d27; /* mantém fundo escuro */
}