
/* =========================================================
   CONFIGURAÇÕES GERAIS
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f2f4f7;
    color: #222;
    font: 15px Arial, sans-serif;
}

/* =========================================================
   CABEÇALHO E NAVEGAÇÃO
   ========================================================= */

header {
    background: #f2f4f7;
    color: #fff;
    padding: 18px 4%;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

a {
    color: inherit;
}

header a {
    text-decoration: none;
}

/* =========================================================
   ESTRUTURA E PAINÉIS
   ========================================================= */

.wrap {
    max-width: 1200px;
    margin: 25px auto;
    padding: 0 18px;
}

.panel,
.card {
    background: #fff;
    padding: 20px;
    border-radius: 9px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px #0001;
}
.menu-icon img {
    width: 99px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
    vertical-align: middle;
}


/* Elemento que contém o menu e o submenu */
.has-submenu {
    position: relative;
}

/* Seta do submenu */
.submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

/* Submenu escondido inicialmente */
.submenu {
    display: none;
    padding-left: 20px;
    background: #FF0000;
}

/* Links do submenu */
.submenu-link {
    display: block;
    padding: 10px 12px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    border-radius: 5px;
    transition: background 0.2s ease;
}

/* Efeito ao passar o rato nos links */
.submenu-link:hover {
   background: #FFFAFA;
    color: #000000;
}

/* Mostrar submenu ao passar o rato */
.has-submenu:hover .submenu {
    display: block;
}

/* Manter aberto quando o foco está dentro */
.has-submenu:focus-within .submenu {
    display: block;
}

/* Rodar a seta */
.has-submenu:hover .submenu-arrow {
    transform: rotate(180deg);
}

/* =========================================================
   CARTÕES E INDICADORES DO PAINEL
   ========================================================= */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 15px;
}

.metric {
    font-size: 28px;
    font-weight: bold;
}

/* Remover o sublinhado dos cartões clicáveis */
.cards a.card,
.cards a.card:link,
.cards a.card:visited,
.cards a.card:hover,
.cards a.card:focus,
.cards a.card:active {
    display: block;
    color: inherit;
    text-decoration: none !important;
    border-bottom: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Impedir o sublinhado nos textos e números dentro dos cartões */
.cards a.card *,
.cards a.card .metric {
    text-decoration: none !important;
    color: inherit;
    border-bottom: none;
}

/* Efeito ao passar o rato */
.cards a.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   GRELHAS E FORMULÁRIOS
   ========================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.full {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    padding: 10px;
    border: 1px solid #cbd0d8;
    border-radius: 6px;
    width: 100%;
}

textarea {
    min-height: 80px;
}

/* =========================================================
   BOTÕES
   ========================================================= */

.btn {
    display: inline-block;
    background: #1e2348;
    color: white;
    padding: 10px 13px;
    border: 0;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
}

.green {
    background: #198754;
}

.gray {
    background: #606875;
}

.red {
    background: #b42332;
}

/* =========================================================
   TABELAS
   ========================================================= */

.tablewrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    background: white;
}

td,
th {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

td small {
    display: block;
    color: #666;
    margin-top: 4px;
}

/* =========================================================
   AVISOS, ESTADOS E DOCUMENTOS
   ========================================================= */

.notice {
    padding: 12px;
    background: #fff0c2;
    margin-bottom: 12px;
    border-radius: 6px;
}

.pill {
    background: #e7eaf5;
    padding: 4px 8px;
    border-radius: 20px;
}

/* Indicadores de estado do processo */
.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status.ok {
    background: #e1f5e8;
    color: #17663a;
}

.status.pending {
    background: #fff0d6;
    color: #865700;
}

.doc {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

/* =========================================================
   AUTENTICAÇÃO E ELEMENTOS AUXILIARES
   ========================================================= */

.login {
    max-width: 430px;
    margin: 60px auto;
}

.inline {
    display: inline;
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 650px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .full {
        grid-column: auto;
    }
}



/* Remover sublinhado de todos os links do sistema */
a,
a:link,
a:visited,
a:hover,
a:focus,
a:active {
    text-decoration: none;
}



/* =========================================
   MENU LATERAL DO DASHBOARD
   ========================================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 70px;
    height: 100vh;
    background: #FF0000;
    color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.3s ease;
    box-shadow: 3px 0 12px rgba(0, 0, 0, 0.12);
}

/* Expandir ao passar o rato */
.sidebar:hover {
    width: 250px;
}

/* Título da barra */
.sidebar-logo {
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-logo h2 {
    font-size: 17px;
    margin: 0;
}

/* Lista de menus */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 15px 8px;
    gap: 8px;
}

/* Links do menu */
.sidebar-menu .menu-link {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 7px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.2s ease;
}

/* Ícones */
.menu-icon {
    min-width: 28px;
    text-align: center;
    font-size: 20px;
}

/* Texto escondido quando a barra está estreita */
.menu-text {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Mostrar texto ao expandir */
.sidebar:hover .menu-text {
    opacity: 1;
}

/* Efeito ao passar o rato sobre um link */
.sidebar-menu .menu-link:hover {
    background: #FFFAFA;
    color: #1e2348;
}

/* =========================================
   AJUSTAR O CONTEÚDO DA PÁGINA
   ========================================= */

body {
    padding-left: 70px;
    transition: padding-left 0.3s ease;
}

/* =========================================
   ADAPTAÇÃO A ECRÃS PEQUENOS
   ========================================= */

@media (max-width: 650px) {
    .sidebar {
        width: 60px;
    }

    .sidebar:hover {
        width: 220px;
    }

    body {
        padding-left: 60px;
    }
}




/* =========================================
   ESTRUTURA DO DASHBOARD
   ========================================= */

.dashboard-layout {
    min-height: calc(100vh - 70px);
}

.dashboard-main {
    margin-left: 70px;
    padding: 25px;
    min-width: 0;
    transition: margin-left 0.3s ease;
}

/* =========================================
   MENU LATERAL
   ========================================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 70px;
    height: 100vh;
    background: #FF0000;
    color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.3s ease;
    box-shadow: 3px 0 12px rgba(0, 0, 0, 0.12);
}

.sidebar:hover,
.sidebar:focus-within {
    width: 250px;
}

/* Cabeçalho do menu */

.sidebar-logo {
    height: 75px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: bold;
}

.sidebar-logo .menu-text {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar:hover .sidebar-logo .menu-text,
.sidebar:focus-within .sidebar-logo .menu-text {
    opacity: 1;
}

/* Links */

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 8px;
}

.sidebar-menu .menu-link {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 7px;
    color: #fff;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-menu .menu-icon {
    min-width: 28px;
    text-align: center;
    font-size: 20px;
}

.sidebar-menu .menu-text {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar:hover .menu-text,
.sidebar:focus-within .menu-text {
    opacity: 1;
}

/* Passar o rato sobre um link */

.sidebar-menu .menu-link:hover,
.sidebar-menu .menu-link.active {
    background: #FFFAFA;
    color: #1e2348;
}

/* =========================================
   CARTÕES DO DASHBOARD
   ========================================= */

.dashboard-main .cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 15px;
}

.dashboard-main .cards a.card {
    display: block;
    color: inherit;
    text-decoration: none !important;
    border-bottom: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-main .cards a.card * {
    text-decoration: none !important;
}

.dashboard-main .cards a.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
}

/* =========================================
   ECRÃS PEQUENOS
   ========================================= */

@media (max-width: 650px) {
    .sidebar {
        width: 60px;
    }

    .sidebar:hover,
    .sidebar:focus-within {
        width: 220px;
    }

    .dashboard-main {
        margin-left: 60px;
        padding: 15px;
    }

    .dashboard-main .cards {
        grid-template-columns: 1fr;
    }
}


/* Documentos do processo */
.doc-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #e2e5ed;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(30, 35, 72, 0.05);
}

.doc-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.doc-type {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    background: #eef0f8;
    color: #1e2348;
    font-size: 12px;
    font-weight: 600;
}

.doc-name {
    overflow-wrap: anywhere;
    color: #252a40;
    font-size: 14px;
}

.doc-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.doc-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.doc-delete-form {
    display: inline-flex;
    margin: 0;
}

.doc-delete-form button {
    font: inherit;
}

@media (max-width: 600px) {
    .doc-actions {
        justify-content: flex-start;
    }

    .doc-actions .btn {
        flex: 1 1 auto;
    }
}


.doc-card {
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e5ed;
    border-radius: 10px;
    background: #fff;
}

.doc-select {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.doc-select span {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-wrap: anywhere;
}

.doc-select small {
    color: #666;
}

.doc-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.doc-actions[hidden] {
    display: none !important;
}

.doc-delete-form {
    margin: 0;
}