/* ==========================================================
   PRORSUS TECNOLOGIA
   Arquivo: style.css
   Descrição: Estilos Globais do Sistema
========================================================== */


/* ==========================================================
   RESET
========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ==========================================================
   BODY
========================================================== */

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    min-height: 100vh;
}

:root {
    --space-section: 24px;
    --space-component: 16px;
    --content-padding: 30px;
    --card-radius: 12px;
}


/* ==========================================================
   LAYOUT
========================================================== */

.layout {
    display: flex;
    min-height: 100vh;
}

.content {
    flex: 1;
    padding: var(--content-padding);
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.content h1 {
    margin-bottom: 20px;
}

/* Shared page rhythm. Module styles retain control of component-specific sizing. */
.content > :last-child {
    margin-bottom: 0;
}

.content .page-header,
.content .projetos-cabecalho,
.content .financeiro-cabecalho,
.content .contratos-cabecalho,
.content .despesas-cabecalho {
    margin-bottom: var(--space-section);
}

.acesso-nao-permitido {
    display: flex;
    min-height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 32px;
    color: #374151;
    text-align: center;
}

.acesso-nao-permitido i {
    margin-bottom: 16px;
    color: #2563eb;
    font-size: 42px;
}

.acesso-nao-permitido h1 {
    margin: 0 0 8px;
}

.acesso-nao-permitido p {
    margin: 0 0 24px;
    color: #6b7280;
}


/* ==========================================================
   SIDEBAR
========================================================== */

.sidebar {

    width: 220px;

    height: 100vh;

    position: sticky;
    top: 0;

    flex-shrink: 0;

    background: #1f2937;

    color: #ffffff;

    padding: 20px;

    display: flex;
    flex-direction: column;

}


/* ==========================================================
   LOGO
========================================================== */

.logo-area {

    text-align: center;

    min-height: 100px;

    margin-bottom: 30px;

    padding-bottom: 20px;

    border-bottom: 1px solid rgba(255,255,255,.08);

}

.logo {

    width: 170px;

    height: 50px;

    object-fit: contain;

    display: block;

    margin: 0 auto 10px;

}

.logo-area h2 {

    margin: 0;

    font-size: 16px;

    font-weight: 600;

    color: #e5e7eb;

}


/* ==========================================================
   MENU
========================================================== */

.menu {

    display: flex;

    flex-direction: column;

    gap: 10px;

}

.menu a {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px;

    border-radius: 8px;

    text-decoration: none;

    color: #e5e7eb;

    transition: .2s;

}

.menu a:hover,
.menu a.active {

    background: #2563eb;

    color: #ffffff;

}

.menu a i {

    width: 20px;

    min-width: 20px;

    text-align: center;

    font-size: 17px;

    color: inherit;

}


/* ==========================================================
   SUBMENU
========================================================== */

.menu-group {

    margin-top: 10px;

}

.menu-title {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 10px;

    border-radius: 8px;

    cursor: pointer;

    color: #e5e7eb;

    font-weight: 600;

    transition: .2s;

}

.menu-title:hover {

    background: #2563eb;

    color: #ffffff;

}

.menu-title span:first-child {

    display: flex;

    align-items: center;

    gap: 10px;

}

.submenu {

    display: none;

    margin-top: 6px;

}

.submenu a {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-left: 12px;

    margin-bottom: 6px;

    padding: 8px 14px;

    border-radius: 6px;

    font-size: 13px;

    text-decoration: none;

    color: #cbd5f5;

}

.submenu a:hover,
.submenu a.active {

    background: #1d4ed8;

    color: #ffffff;

}

.submenu a i {

    width: 18px;

    min-width: 18px;

    text-align: center;

    font-size: 15px;

}

/* ==========================================================
   USUÁRIO LOGADO
========================================================== */

.usuario-logado {

    margin-top: auto;

    padding: 20px 10px;

    border-top: 1px solid rgba(255,255,255,.08);

    text-align: center;

}

.usuario-logado span {

    display: block;

    margin-bottom: 10px;

    font-size: 14px;

    font-weight: 500;

    color: #e5e7eb;

}

.usuario-logado button {

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 10px;

    border: none;

    border-radius: 10px;

    background: #53f99b;

    color: #f9fafb;

    cursor: pointer;

    font-size: 14px;

    transition: .2s;

}

.usuario-logado button:hover {

    background: #dc2626;

}

.usuario-logado button i {

    margin: 0;

}


/* ==========================================================
   BOTÕES
========================================================== */

button {

    border: none;

    padding: 8px 14px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;

}

button.primary {

    background: #2563eb;

    color: #ffffff;

}

button.secondary {

    background: #9ca3af;

    color: #ffffff;

}

button.excluir {

    background: #dc2626;

    color: #ffffff;

}

button.primary,
button.secondary,
button.excluir {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


/* ==========================================================
   FORMULÁRIOS
========================================================== */

input,
textarea,
select {

    padding: 8px;

    border: 1px solid #cccccc;

    border-radius: 6px;

    font-family: inherit;

}


/* ==========================================================
   MODAIS
========================================================== */

.modal-fundo {

    position: fixed;

    inset: 0;

    display: none;

    justify-content: center;

    align-items: center;

    background: rgba(0,0,0,.45);

    z-index: 999;

}

.modal-card {

    background: #ffffff;

    padding: 25px;

    border-radius: 14px;

}

@media (max-width: 768px) {
    .content {
        height: auto;
        min-height: 100vh;
        padding: 20px;
    }
}


/* ==========================================================
   LOADING
========================================================== */

.loading-overlay {

    position: fixed;

    inset: 0;

    display: none;

    align-items: center;

    justify-content: center;

    background: rgba(0,0,0,.35);

    z-index: 99999;

}

.loading-box {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 20px 24px;

    border-radius: 12px;

    background: #ffffff;

    color: #374151;

    font-size: 14px;

    font-weight: 600;

    box-shadow: 0 10px 30px rgba(0,0,0,.20);

}

.spinner {

    width: 22px;

    height: 22px;

    border: 3px solid #e5e7eb;

    border-top-color: #2563eb;

    border-radius: 50%;

    animation: spin .8s linear infinite;

}

@keyframes spin {

    to {

        transform: rotate(360deg);

    }

}


/* ==========================================================
   OBSERVAÇÕES
========================================================== */

/*

Este arquivo é a base visual do sistema PRORSUS.

Todo novo componente deve utilizar este CSS antes
de criar regras específicas.

Arquivos específicos:

dashboard.css

clientes.css

chamados.css

configuracao.css

backup.css

devem conter apenas estilos exclusivos da tela.

*/
