* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;

    background:
        radial-gradient(
            circle at top,
            #1f2a37 0%,
            #11161d 45%,
            #0b0f14 100%
        );

    color: #f3f5f7;
}


/* =========================================
   LOGIN
========================================= */

.login-body {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
}


.login-container {
    width: 100%;
    max-width: 460px;
}


.login-brand {
    text-align: center;
    margin-bottom: 24px;
}


.login-brand span {
    display: block;

    font-size: 12px;
    letter-spacing: 4px;

    color: #8d98a6;

    margin-bottom: 6px;
}


.login-brand h1 {
    margin: 0;

    font-size: 30px;
    letter-spacing: 2px;

    color: #ffffff;
}


.login-card {
    background:
        rgba(20, 26, 34, 0.96);

    border:
        1px solid #2d3743;

    border-radius: 14px;

    padding: 34px;

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.35);
}


.login-header {
    margin-bottom: 28px;
}


.login-header h2 {
    margin: 0 0 8px 0;

    font-size: 24px;
}


.login-header p {
    margin: 0;

    color: #8d98a6;

    line-height: 1.5;
    font-size: 14px;
}


.login-campo {
    margin-bottom: 20px;
}


.login-campo label {
    display: block;

    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 600;

    color: #c7ced7;
}


.login-campo input {
    width: 100%;

    padding: 13px 14px;

    background: #10151c;

    border:
        1px solid #303a46;

    border-radius: 9px;

    color: white;

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.login-campo input:focus {
    border-color: #7b8ca3;

    box-shadow:
        0 0 0 3px rgba(123, 140, 163, 0.12);
}


.login-campo input::placeholder {
    color: #5f6874;
}


.login-button {
    width: 100%;

    margin-top: 6px;

    padding: 13px 16px;

    border: 0;
    border-radius: 9px;

    background: #e8edf3;
    color: #11161d;

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 1px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.15s ease;
}


.login-button:hover {
    background: white;
    transform: translateY(-1px);
}


.login-footer {
    margin-top: 20px;

    text-align: center;

    color: #687382;

    font-size: 11px;

    line-height: 1.6;
}


.login-footer .copyright {
    margin-top: 8px;
}


@media (max-width: 520px) {

    .login-body {
        padding: 18px;
    }

    .login-card {
        padding: 26px 22px;
    }

    .login-brand h1 {
        font-size: 24px;
    }

}

/* =========================================
   APP PRINCIPAL
========================================= */

.app {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 245px;
    min-height: 100vh;

    background: #0d1218;

    border-right:
        1px solid #252e38;

    padding: 28px 18px;

    display: flex;
    flex-direction: column;
}

.logo {
    padding: 0 10px 28px;
}

.logo span {
    display: block;

    font-size: 10px;
    letter-spacing: 3px;

    color: #788492;
}

.logo h2 {
    margin: 5px 0 0;

    font-size: 18px;
    letter-spacing: 1px;
}

.sidebar nav {
    display: grid;
    gap: 6px;
}

.sidebar nav a {
    color: #8f99a6;

    text-decoration: none;

    padding: 11px 12px;

    border-radius: 8px;

    font-size: 13px;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.sidebar nav a:hover {
    background: #161d25;
    color: white;
}

.sidebar nav a.ativo {
    background: #1b2530;
    color: white;
}

.separador {
    height: 1px;

    background: #252e38;

    margin: 10px 4px;
}

.logout {
    margin-top: auto;
}

.logout a {
    display: block;

    color: #8f99a6;
    text-decoration: none;

    padding: 11px 12px;

    font-size: 13px;
}

.logout a:hover {
    color: white;
}


.conteudo {
    flex: 1;

    padding: 34px 38px 20px;

    min-width: 0;
}


.topo {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 28px;
}

.topo h1 {
    margin: 0 0 6px;

    font-size: 27px;
}

.topo p {
    margin: 0;

    color: #7f8996;

    font-size: 13px;
}

.utilizador {
    text-align: right;
}

.utilizador strong {
    display: block;

    font-size: 14px;
}

.utilizador span {
    display: block;

    margin-top: 4px;

    color: #7f8996;

    font-size: 11px;
}


.cards {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 24px;
}

.card {
    background: #141b23;

    border:
        1px solid #29333f;

    border-radius: 11px;

    padding: 20px;
}

.card span {
    display: block;

    color: #7f8996;

    font-size: 11px;

    margin-bottom: 10px;
}

.card strong {
    font-size: 27px;
}


.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.25fr)
        minmax(300px, 0.75fr);

    gap: 18px;

    margin-bottom: 24px;
}


.dashboard-bloco {
    background: #141b23;

    border:
        1px solid #29333f;

    border-radius: 11px;

    padding: 21px;
}

.dashboard-bloco-topo {
    margin-bottom: 18px;
}

.dashboard-bloco h2 {
    margin: 0 0 5px;

    font-size: 17px;
}

.dashboard-bloco p {
    margin: 0;

    color: #7f8996;

    font-size: 12px;
}


.proxima-reuniao {
    background: #10161d;

    border:
        1px solid #26303a;

    border-radius: 9px;

    padding: 18px;
}

.proxima-reuniao strong {
    display: block;

    font-size: 18px;

    margin-bottom: 6px;
}

.proxima-reuniao span {
    color: #aeb7c2;

    font-size: 12px;
}

.proxima-reuniao p {
    margin-top: 12px;

    color: #8994a1;

    line-height: 1.5;
}


.disponibilidade-lista {
    display: grid;
    gap: 9px;
}

.disponibilidade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #10161d;

    border:
        1px solid #26303a;

    border-radius: 8px;

    padding: 12px 14px;
}

.disponibilidade-item strong {
    font-size: 13px;
}

.disponibilidade-item span {
    color: #aab4c0;

    font-size: 12px;
}


.atalhos {
    margin-top: 8px;
}

.atalhos h2 {
    font-size: 17px;

    margin-bottom: 13px;
}

.atalhos-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;
}

.atalho {
    display: block;

    text-decoration: none;

    background: #141b23;

    border:
        1px solid #29333f;

    border-radius: 10px;

    padding: 18px;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease;
}

.atalho:hover {
    transform: translateY(-2px);

    border-color: #465565;
}

.atalho h3 {
    margin: 0 0 7px;

    color: white;

    font-size: 14px;
}

.atalho p {
    margin: 0;

    color: #7f8996;

    font-size: 11px;

    line-height: 1.45;
}


.vazio {
    color: #707b88;

    font-size: 12px;
}


.app-footer {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    margin-top: 34px;
    padding-top: 18px;

    border-top:
        1px solid #252e38;

    color: #66717e;

    font-size: 10px;
}


@media (max-width: 1050px) {

    .cards,
    .atalhos-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 720px) {

    .app {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .conteudo {
        padding: 25px 20px;
    }

    .cards,
    .atalhos-grid {
        grid-template-columns: 1fr;
    }

    .topo,
    .app-footer {
        display: block;
    }

    .utilizador {
        text-align: left;
        margin-top: 14px;
    }

}

/* =========================================
   PEDIDOS
========================================= */

.topo-acoes {
    display: flex;
    align-items: center;
    gap: 22px;
}

.botao-principal {
    border: 0;
    border-radius: 8px;

    padding: 11px 17px;

    background: #e8edf3;
    color: #11161d;

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.botao-principal:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.botao-secundario {
    border:
        1px solid #303a46;

    border-radius: 8px;

    padding: 10px 16px;

    background: transparent;
    color: #aeb7c2;

    font-size: 12px;

    cursor: pointer;
}

.botao-secundario:hover {
    background: #18202a;
    color: white;
}


.barra-pedidos {
    display: flex;
    justify-content: space-between;

    gap: 14px;

    margin-bottom: 16px;
}

.pesquisa-pedidos {
    flex: 1;
}

.pesquisa-pedidos input,
.filtro-estado select {
    width: 100%;

    height: 42px;

    background: #111820;
    color: #dfe5eb;

    border:
        1px solid #29333f;

    border-radius: 8px;

    padding: 0 13px;

    outline: none;
}

.pesquisa-pedidos input:focus,
.filtro-estado select:focus {
    border-color: #536477;
}

.filtro-estado {
    width: 230px;
}


/* TABELA */

.tabela-container {
    background: #141b23;

    border:
        1px solid #29333f;

    border-radius: 11px;

    overflow-x: auto;
}

.tabela-pedidos {
    width: 100%;

    border-collapse: collapse;

    min-width: 1050px;
}

.tabela-pedidos th {
    padding: 13px 14px;

    text-align: left;

    color: #7f8996;

    font-size: 10px;
    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    border-bottom:
        1px solid #29333f;
}

.tabela-pedidos td {
    padding: 14px;

    font-size: 12px;

    border-bottom:
        1px solid #202933;

    color: #cbd2da;
}

.tabela-pedidos tbody tr:last-child td {
    border-bottom: 0;
}

.tabela-pedidos tbody tr:hover {
    background: #171f28;
}

.tabela-vazia {
    text-align: center;

    color: #66717e !important;

    padding: 35px !important;
}


/* MODAL */

.modal-fundo {
    display: none;

    position: fixed;

    inset: 0;

    background:
        rgba(4, 7, 10, 0.78);

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 1000;
}

.modal-fundo.aberto {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 650px;

    max-height: 90vh;
    overflow-y: auto;

    background: #141b23;

    border:
        1px solid #303b47;

    border-radius: 13px;

    padding: 25px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 25px;
}

.modal-topo h2 {
    margin: 0 0 5px;

    font-size: 20px;
}

.modal-topo p {
    margin: 0;

    color: #7f8996;

    font-size: 12px;
}

.modal-fechar {
    border: 0;

    background: transparent;
    color: #798491;

    font-size: 25px;

    cursor: pointer;
}

.modal-fechar:hover {
    color: white;
}


.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.form-campo {
    min-width: 0;
}

.form-campo.form-largo {
    grid-column: 1 / -1;
}

.form-campo label {
    display: block;

    margin-bottom: 7px;

    color: #aeb7c2;

    font-size: 11px;
    font-weight: 600;
}

.form-campo input,
.form-campo select,
.form-campo textarea {
    width: 100%;

    background: #10161d;
    color: white;

    border:
        1px solid #303a46;

    border-radius: 8px;

    padding: 11px 12px;

    font-family: inherit;
    font-size: 13px;

    outline: none;
}

.form-campo input,
.form-campo select {
    height: 42px;
}

.form-campo textarea {
    resize: vertical;
}

.form-campo input:focus,
.form-campo select:focus,
.form-campo textarea:focus {
    border-color: #536477;
}


.modal-info {
    margin-top: 20px;

    padding: 13px 14px;

    background: #10161d;

    border:
        1px solid #26303a;

    border-radius: 8px;

    color: #7f8996;

    font-size: 11px;

    line-height: 1.5;
}

.modal-info strong {
    color: #dbe1e7;
}


.modal-acoes {
    display: flex;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 24px;
}


@media (max-width: 720px) {

    .topo-acoes,
    .barra-pedidos {
        display: block;
    }

    .topo-acoes .botao-principal {
        margin-top: 14px;
    }

    .filtro-estado {
        width: 100%;

        margin-top: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-campo.form-largo {
        grid-column: auto;
    }

}

.pedido-resumo {
    margin-bottom: 22px;
    padding: 15px;

    background: #10161d;

    border: 1px solid #29333f;
    border-radius: 8px;
}

.pedido-resumo strong {
    display: block;

    font-size: 15px;
    margin-bottom: 5px;
}

.pedido-resumo span {
    display: block;

    color: #aeb7c2;
    font-size: 12px;
    text-transform: uppercase;
}

.pedido-resumo p {
    margin: 10px 0 0;

    color: #7f8996;
    font-size: 12px;
}

/* =========================================
   AGENDA
========================================= */

.agenda-controles {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 18px;
}

.agenda-controles strong {
    font-size: 14px;
}


.agenda-semana {
    background: #141b23;

    border:
        1px solid #29333f;

    border-radius: 11px;

    padding: 16px;
}


#agendaGrid {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(150px, 1fr));

    gap: 10px;

    overflow-x: auto;
}


.agenda-dia {
    min-height: 420px;

    background: #10161d;

    border:
        1px solid #26303a;

    border-radius: 8px;

    overflow: hidden;
}


.agenda-dia-topo {
    padding: 12px;

    border-bottom:
        1px solid #26303a;

    text-align: center;
}


.agenda-dia-topo strong {
    display: block;

    font-size: 12px;

    text-transform: capitalize;
}


.agenda-dia-topo span {
    display: block;

    margin-top: 4px;

    color: #7f8996;

    font-size: 10px;
}


.agenda-dia-lista {
    display: grid;

    gap: 7px;

    padding: 10px;
}


.agenda-slot {
    padding: 9px 10px;

    background: #18212b;

    border:
        1px solid #2c3946;

    border-radius: 7px;
}


.agenda-slot .agenda-hora {
    display: block;

    color: #9ba6b3;

    font-size: 10px;

    margin-bottom: 4px;
}


.agenda-slot strong {
    font-size: 11px;
}


@media (max-width: 1000px) {

    #agendaGrid {
        grid-template-columns:
            repeat(7, 165px);
    }

}

/* =========================================
   CONFIGURAÇÕES
========================================= */

.config-grid {
    display: grid;

    grid-template-columns:
        minmax(320px, 0.8fr)
        minmax(420px, 1.2fr);

    gap: 18px;
}


.utilizador-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    padding: 14px 0;

    border-bottom:
        1px solid #26303a;
}


.utilizador-item:last-child {
    border-bottom: 0;
}


.utilizador-item strong {
    display: block;

    font-size: 13px;

    margin-bottom: 5px;
}


.utilizador-item span {
    display: block;

    color: #8f99a6;

    font-size: 11px;
}


.utilizador-item small {
    display: block;

    color: #66717e;

    font-size: 10px;

    margin-top: 4px;
}


.utilizador-estado {
    color: #aeb7c2;

    font-size: 11px;
}


@media (max-width: 950px) {

    .config-grid {
        grid-template-columns: 1fr;
    }

}

.encaixe-pessoa-acoes {
    display: flex;
    align-items: center;
    gap: 12px;
}


.encaixe-pessoa.selecionado {
    border-color: #6f8fae;
    background: #17212b;
}


.encaixe-pessoa-acoes
.botao-secundario {
    min-width: 95px;
}


#botaoReservarReuniao:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.campo-opcional {
    color: #66717e;
    font-weight: 400;
}

.botao-perigo {
    border: 1px solid #7e3f46;
    border-radius: 8px;
    padding: 11px 17px;

    background: #512b31;
    color: #f5d7da;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.botao-perigo:hover {
    background: #65343b;
}

.botao-cancelar-reuniao {
    border-color: #684148;
    color: #dcaab0;
}

/* =========================================
   BASE DE DADOS - HABITANTES
========================================= */

.habitantes-pesquisa {
    margin-bottom: 18px;
}

.habitantes-pesquisa input {
    width: 100%;
    height: 46px;

    padding: 0 15px;

    background: #111820;
    color: white;

    border: 1px solid #29333f;
    border-radius: 9px;

    font-size: 13px;

    outline: none;
}

.habitantes-pesquisa input:focus {
    border-color: #536477;
}


.habitantes-resultados {
    display: grid;
    gap: 10px;
}


.habitante-resultado {
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 18px;

    padding: 16px 18px;

    background: #141b23;
    color: white;

    border: 1px solid #29333f;
    border-radius: 9px;

    text-align: left;

    cursor: pointer;
}

.habitante-resultado:hover {
    border-color: #465565;
    background: #17202a;
}

.habitante-resultado strong {
    display: block;
    font-size: 14px;
}

.habitante-resultado span {
    display: block;

    margin-top: 4px;

    color: #8f99a6;
    font-size: 11px;
}

.habitante-resultado small {
    display: block;

    margin-top: 7px;

    color: #73808e;
    font-size: 10px;
}

.habitante-resultado
.habitante-ver {
    margin: 0;

    color: #c7d0da;
}


.modal-habitante-card {
    max-width: 820px;
}


.ficha-resumo {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 22px;
}

.ficha-resumo > div {
    padding: 14px;

    background: #10161d;

    border: 1px solid #29333f;
    border-radius: 8px;
}

.ficha-resumo span {
    display: block;

    color: #77828f;

    font-size: 10px;

    margin-bottom: 6px;
}

.ficha-resumo strong {
    font-size: 13px;
}


.ficha-seccao {
    margin-top: 22px;
}

.ficha-seccao-topo {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 12px;
}

.ficha-seccao-topo h3 {
    margin: 0 0 4px;

    font-size: 15px;
}

.ficha-seccao-topo p {
    margin: 0;

    color: #75808d;

    font-size: 10px;
}


.ficha-notas,
.ficha-timeline {
    display: grid;
    gap: 10px;
}


.ficha-nota-item,
.timeline-item {
    padding: 14px;

    background: #10161d;

    border: 1px solid #29333f;

    border-radius: 8px;
}

.ficha-nota-item p {
    margin: 0 0 8px;

    color: #d5dbe1;

    line-height: 1.5;

    white-space: pre-wrap;
}

.ficha-nota-item span {
    color: #697480;

    font-size: 10px;
}


.timeline-topo {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 10px;
}

.timeline-topo strong {
    font-size: 12px;
}

.timeline-topo span {
    color: #8793a0;

    font-size: 10px;

    text-transform: uppercase;
}

.timeline-item p {
    margin: 6px 0;

    color: #9da7b3;

    font-size: 11px;
}

.timeline-nota {
    margin-top: 12px;

    padding: 10px;

    background: #151f28;

    border-radius: 6px;

    color: #c6ced7;

    font-size: 11px;

    line-height: 1.5;

    white-space: pre-wrap;
}

.timeline-cancelamento {
    margin-top: 12px;

    padding: 10px;

    background: rgba(120, 55, 60, 0.12);

    border-radius: 6px;

    color: #d7a7ac;

    font-size: 11px;
}


@media (max-width: 720px) {

    .ficha-resumo {
        grid-template-columns: 1fr;
    }

    .ficha-seccao-topo {
        display: block;
    }

    .ficha-seccao-topo
    .botao-secundario {
        margin-top: 10px;
    }

}

.paginacao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 20px 0 5px;
}

.paginacao span {
    font-size: 13px;
    opacity: 0.75;
}

.paginacao button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.agenda-slot-ocupado {
    opacity: 0.72;
    border-style: dashed;
}

.agenda-slot-ocupado strong {
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.agenda-slot-ocupado small {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    opacity: 0.75;
}

.utilizador-acoes {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

