
/* ========================================
   MEGA SOCORRO - SISTEMA DE RH
   STYLE.CSS
======================================== */

/* TESTE DE CARREGAMENTO DO CSS */

body.login-page {
    background: #d9ecff !important;
}

body.login-page .panel.narrow {
    background: #ffffff !important;
    border: 3px solid #147db5 !important;
}

:root {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #1a2d3d;
    background: #f4f7fb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

/* CABEÇALHO */

.top {
    background: #102a3a;
    color: #fff;
    padding: 19px max(20px, calc((100vw - 1250px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.top small {
    display: block;
    color: #bacbd5;
    margin-top: 5px;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.userbar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.userbar a {
    color: #fff;
}

/* NAVEGAÇÃO */

.nav {
    padding: 12px max(20px, calc((100vw - 1250px) / 2));
    background: #e6eef5;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav a {
    padding: 9px 13px;
    border-radius: 8px;
    color: #24506a;
    text-decoration: none;
    font-weight: 650;
}

.nav .sel {
    background: #fff;
}

/* LAYOUT */

.wrap {
    max-width: 1290px;
    margin: 25px auto;
    padding: 0 20px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 25px;
    margin: 0 0 20px;
}

h2 {
    font-size: 18px;
    margin: 0 0 15px;
}

h3 {
    font-size: 16px;
}

.panel,
.metric {
    background: #fff;
    border: 1px solid #e0e8ef;
    border-radius: 12px;
    box-shadow: 0 4px 16px #12344509;
    padding: 19px;
    margin-bottom: 16px;
}

.narrow {
    max-width: 480px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.metric {
    margin: 0;
}

.metric b {
    display: block;
    font-size: 29px;
    margin-top: 9px;
}

.metric span,
.muted {
    color: #66808f;
    font-size: 13px;
}

.layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
}

/* FORMULÁRIOS */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd8e2;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 68px;
    resize: vertical;
}

/* BOTÕES */

button,
.button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    background: #e0edf5;
    padding: 10px 13px;
    cursor: pointer;
    color: #17415e;
    font: inherit;
    font-weight: 650;
    text-decoration: none;
}

button.primary,
.button.primary {
    background: #147db5;
    color: #fff;
}

button.danger,
.button.danger {
    background: #ffebeb;
    color: #a42b32;
}

.small {
    padding: 6px 9px;
    font-size: 12px;
}

/* COMPONENTES */

.row {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.between {
    justify-content: space-between;
}

.two {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.right {
    text-align: right;
}

.nowrap {
    white-space: nowrap;
}

/* LISTAGEM */

.list-item {
    display: block;
    padding: 13px;
    margin: 8px 0;
    border: 1px solid #e2eaf1;
    border-radius: 9px;
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}

.list-item:hover {
    border-color: #2186bb;
}

.list-item small {
    display: block;
    color: #617989;
    margin-top: 4px;
}

.list-item[hidden] {
    display: none;
}

/* BADGES */

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 50px;
    background: #e4edf4;
    color: #456;
    font-size: 12px;
}

.badge.good {
    background: #e0f5e8;
    color: #086638;
}

.badge.warn {
    background: #fff1d4;
    color: #8e6300;
}

.badge.late {
    background: #ffe3e3;
    color: #a72025;
    font-weight: 700;
}

.badge.rh {
    background: #e5ecff;
    color: #2b48a2;
}

.badge.operacional {
    background: #fbeadf;
    color: #8c4212;
}

/* BARRAS */

.bar {
    height: 9px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 10px;
    background: #dce5ed;
}

.bar > span {
    display: block;
    height: 100%;
    background: #1484c4;
}

/* TABELAS */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 11px 9px;
    border-bottom: 1px solid #e7ecf1;
    text-align: left;
    vertical-align: middle;
}

th {
    color: #537080;
}

/* ALERTAS */

.notice {
    margin-bottom: 13px;
    padding: 13px;
    border-radius: 10px;
    background: #e5f5ea;
    color: #126a39;
}

.error {
    margin-bottom: 14px;
    padding: 13px;
    border-radius: 10px;
    background: #ffeced;
    color: #9e2e35;
}

.help {
    color: #637987;
    font-size: 13px;
    line-height: 1.6;
}

/* CHECKLIST */

.check-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #eaf0f4;
}

.check-row:last-child {
    border: 0;
}

.check-row strong {
    display: block;
}

.check-row small {
    display: block;
    margin-top: 5px;
    color: #687d8b;
}

.check-row input,
.check-row select {
    margin: 0;
}

.check-row.pending {
    padding: 13px 8px 13px 12px;
    border-left: 4px solid #df6661;
    background: #fff4f2;
}

.section-title {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f4f7fa;
}

/* PERMISSÕES */

.permission-box {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #dce6ef;
    border-radius: 10px;
}

.permission-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 0;
    font-size: 13px;
}

.permission-row input {
    width: auto;
}

/* RODAPÉ */

footer {
    padding: 30px 15px;
    color: #758692;
    font-size: 12px;
    text-align: center;
}

/* LOGIN CENTRALIZADO */

body.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body.login-page .wrap {
    width: 100%;
    max-width: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 40px 20px;
}

body.login-page .page-head {
    width: 100%;
    max-width: 420px;
    justify-content: center;
    text-align: center;
}

body.login-page .page-head h1 {
    width: 100%;
    text-align: center;
}

body.login-page .panel.narrow {
    width: 100%;
    max-width: 420px;
    margin: 0;
    padding: 32px;
}

body.login-page .panel.narrow form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
}

body.login-page .panel.narrow .field,
body.login-page .panel.narrow input,
body.login-page .panel.narrow button {
    width: 100%;
}

body.login-page .panel.narrow button {
    margin-top: 10px;
    padding: 12px;
}

body.login-page footer {
    margin-top: auto;
}

/* RESPONSIVIDADE */

@media (max-width: 950px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .check-row {
        grid-template-columns: 1fr 1fr;
    }

    .check-row > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    body.login-page .wrap {
        padding: 24px 16px;
    }

    body.login-page .panel.narrow {
        padding: 24px 20px;
    }
}

@media (max-width: 570px) {
    .two {
        grid-template-columns: 1fr;
    }

    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .check-row {
        grid-template-columns: 1fr;
    }

    .check-row > div:first-child {
        grid-column: auto;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

/* IMPRESSÃO */

@media print {
    .top,
    .nav,
    .actions,
    button,
    .button,
    .no-print,
    footer {
        display: none !important;
    }

    .wrap {
        max-width: none;
    }

    .panel,
    .metric {
        box-shadow: none;
    }

    .layout {
        display: block;
    }
}