* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        "Open Sans",
        "Helvetica Neue",
        sans-serif;
    outline: none;
}

:root {
    /* A ver */
}

/* =========================
   Conteúdo principal
========================= */
/* Propriedade nos sistemas legados */
main {
    padding: 16px;
}

/* Propriedade nos sistemas novos sem ser aspx */
/* Main */
.main-novo,
.main-filtro,
.main-iframe {
    padding: 0;
}

.main-filtro {
    min-height: 100vh;
}

.main-filtro {
    display: flex;
    flex-direction: column;
}

.main-filtro form {
    flex-grow: 1;
}

.main-filtro > form > section {
    padding: 0;
    margin: 0;
}

.main-filtro iframe {
    width: 100%;
    min-height: 100vh;
}

/* Headings - Títulos */
h1 {
    font-size: 40px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

h2 {
    font-size: 32px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

/* Textos */
p,
span,
label {
    font-size: 16px;
}

label {
    font-weight: 600;
}

/* Sections */
section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 16px;
    padding: 32px 20px;
}

/* Select chosen */
.chosen-container > .chosen-single > span {
    font-size: 13px;
}

/* Botões Datatables */
.dt-buttons > button > span {
    font-size: inherit;
}

/* Formulários */
form {
    width: 100%;
}

/* Iframes */
iframe {
    border: 0;
}

/* Footers */
footer {
    font-size: 12px;
}

/* =========================
   Formulários
========================= */
/* -- A pensar com mais cuidado -- */
/* form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

form > .div-campos {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

form > .div-campos > .div-linha {
    display: flex;
    gap: 16px;
}

form .div-campo-item {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 4px;
}

form .div-campo-item > label {
    font-weight: 600;
}

form > .div-submit {
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    gap: 4px;
}

form .div-campo-item > select {
    width: fit-content;
} */

/* Provisoriamente */
.div-campo-item.drop {
    flex-grow: 1;
    max-width: 940px;
    min-width: 360px;
}

.div-campo-item.switch-controle {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.div-campo-item.select {
    padding-right: 32px;
}

.div-campo-item.select.pequeno {
    width: calc(80px + 32px);
}

.div-campo-item.select.medio {
    width: calc(160px + 32px);
}

.div-campo-item.select.grande {
    width: calc(240px + 32px);
}

.div-submit {
    display: flex;
    gap: 16px;
    margin: 12px 0;
}

.div-submit.largura-total {
    display: flex;
    align-self: stretch;
}

.div-submit.largura-total > input[type="submit"] {
    flex-grow: 1;
}

.div-submit.largura-total.centro {
    display: flex;
    justify-content: center;
}

.div-submit.largura-total.centro > input[type="submit"] {
    flex-grow: 0;
}

.div-campos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.div-linha.centro {
    justify-content: center;
}

.div-campos .div-campo-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.div-campos .div-campo-item.textarea {
    flex-grow: 1;
}

.div-coluna {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
}

.div-grid-2-colunas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    column-gap: 12px;
}
/* -------------------------------- */
/* =========================
   Seções
========================= */
/* Divisões */
.div-table .bottom {
    margin-top: 12px;
}

.div-table,
.div-grupo {
    border-radius: 15px;
    padding: 16px 8px;
    width: 100%;
}

.section-form > article > .div-table {
    margin: 16px 0;
}

/* Divisões de botões */
.button, /* a se tornar oficial */
.button-centro,
.button-direita,
.button-esquerda {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    width: 100%;
    flex-wrap: wrap;
}

.button.comprimido {
    width: fit-content;
}

.button.centro,
.button-centro {
    justify-content: center;
}

.button-direita {
    justify-content: flex-end;
}

.button-esquerda {
    justify-content: flex-start;
}

.button-centro {
    justify-content: center;
}

.button-direita {
    justify-content: flex-end;
}

/* =========================
   Entradas
========================= */
/* Entradas */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
.div-input > input,
select {
    padding: 4px 12px;
    border-radius: 5px;
    background: #fff;
    flex-grow: 1;
    align-self: stretch;
    font-size: 14px;
    letter-spacing: 1px;
    color: #3e3e3e;
}

input:disabled:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
textarea:disabled,
select:disabled {
    opacity: 0.33;
}

textarea {
    border: 0;
    resize: none;
}

input[type="number"],
.input-money,
.input-digito-numerico {
    text-align: right;
}

/* Campos de data */
input[type="date"],
input[type="time"] {
    width: fit-content;
    flex-grow: 0;
    align-self: inherit;
}

/* Checkboxes */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

input[type="range"] {
    appearance: none;
}

.div-linha {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.div-linha.campos-filtro {
    align-items: flex-end;
}

.div-linha > .div-submit {
    margin-left: 32px;
    margin-block: 0;
}

/* Caixa de seleção */
select {
    width: calc(100% + 32px);
    max-width: 330px;
    min-width: 120px;
    border: 1px solid #616161;
    color: #282728;
    appearance: none;
    background-image: url("../imagens/icon-down.svg");
    background-position-x: right;
    background-position-y: center;
    background-size: 28px;
    background-repeat: no-repeat;
    padding-right: 32px;
    border-radius: 5px;
    padding: 4px 32px 4px 8px;
    text-overflow: ellipsis;
}

/* Input tipo range */
input[type="range"] {
    appearance: none;
    width: 300px;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}

/* Estilo da barra ao passar o mouse */
input[type="range"]:hover {
    background: #ccc;
}

/* Estilo do "thumb" (a bolinha que você arrasta) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4caf50;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px #000;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #45a049;
}

/* Firefox */
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4caf50;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* Firefox track */
input[type="range"]::-moz-range-track {
    height: 8px;
    background: #ddd;
    border-radius: 5px;
}

/* Edge/IE */
input[type="range"]::-ms-thumb {
    width: 20px;
    height: 20px;
    background: #4caf50;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-ms-track {
    height: 8px;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

input[type="range"]::-ms-fill-lower {
    background: #ddd;
    border-radius: 5px;
}

input[type="range"]::-ms-fill-upper {
    background: #ddd;
    border-radius: 5px;
}

/* Campo tipo arquivo */
.file-wrapper {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    border: 2px solid #000;
    overflow: hidden;
    font-family: Arial, sans-serif;
    width: 100%;
    min-width: 540px;
    max-width: 750px;
    text-overflow: ellipsis;
    background-color: white;
    border-radius: 5px;
}

.file-label {
    background: #000;
    color: #fff;
    padding: 4px 16px;
    display: flex;
    align-items: center;
    border-right: 2px solid #000;
    cursor: pointer;
}

.file-name {
    padding: 0 14px;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.file-input {
    display: none;
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 15px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #919191;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: -5px;
    bottom: 0;
    background-color: white;
    border: 0.1px solid black;
    -webkit-transition: 0.4s;
    transition: 0.4s;
    top: -5px;
}

input:checked + .slider {
    background-color: #217185;
}

.switch input + .slider:disabled {
    opacity: 0.5;
}

input:focus + .slider {
    box-shadow: 0 0 1px #217185;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
    left: 8px;
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
    box-shadow: 1px 1px 1px gray;
}

/* Campo arrasta e solta */
.div-drop {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    width: 100%;
    border: 2px dashed #a2a2a2;
    padding: 12px 32px;
    background-color: #fbfbfb;
    max-width: 940px;
    min-width: 320px;
}

.div-drop-texto {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    display: flex;
    align-self: stretch;
}

.div-drop > span,
.div-drop > .div-drop-entrada {
    max-width: 1024px;
}

.div-drop-ficheiro > span {
    color: black;
    font-size: 16px;
    font-weight: 400;
    word-wrap: break-word;
}

.div-drop-texto > a {
    color: #3d3d3d;
}

.div-drop-entrada {
    display: flex;
    justify-content: center;
    align-self: stretch;
    gap: 16px;
}

.div-drop img {
    max-width: 48px;
}

.span-titulo {
    align-self: stretch;
    text-align: center;
    color: black;
    font-size: 20px;
    font-weight: bold;
    word-wrap: break-word;
}

.a-escolher {
    text-align: center;
    color: #a1a1a1;
    font-size: 16px;
    font-weight: 400;
    word-wrap: break-word;
}

/* =========================
   Imagens
========================= */
img {
    width: auto;
    height: auto;
}

/* =========================
   Linhas
========================= */
hr {
    color: var(--Azul-Principal);
    height: 2px;
    margin: 24px 0; /* Revisar aqui */
    width: 100%;
}

.div-input {
    position: relative;
    align-self: stretch;
    display: flex;
    gap: 8px;
    flex-grow: 1;
    overflow: hidden;
    border-radius: 5px;
}

.div-input > img {
    z-index: 1;
    position: absolute;
    left: 8px;
}

.div-input > input {
    border: 0;
    outline: none;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    padding-left: 40px;
    min-height: 32px;
}

/* =========================
   Botões
========================= */
input[type="button"],
input[type="submit"],
.dt-buttons > button {
    padding: 8px 12px;
    border: 0;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 6px 6px 4px #00000025;
}

input[type="button"]:hover,
input[type="submit"]:hover,
button:hover {
    cursor: pointer;
}

input[type="submit"]:active,
input[type="button"]:active,
button:active {
    box-shadow: 0 5px #666;
    box-shadow: 0 0px #999;
    transform: translateY(2px);
}

input[type="button"]:disabled,
input[type="submit"]:disabled,
button:disabled {
    opacity: 0.6;
    cursor: default;
}

input[type="submit"]:active,
input[type="button"]:active,
button:active {
    transform: translateY(2px);
}

.dt-buttons {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* =========================
   Iframes
========================= */
.iframe-pagina {
    width: 100%;
    height: calc(100vh - 120px);
    max-height: 720px;
    border: 0;
    overflow: auto;
}

/* Campo descrição do arquivo, upload e campo arrasta e solta */
.div-components-entrada {
    display: flex;
    gap: 16px;
}
.div-components {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.div-components-entrada-texto {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-grow: 1;
}
.div-components-entrada-texto > input[type="text"] {
    align-self: flex-end;
}
.div-components-entrada > .button-centro > a > img {
    height: 40px;
}

/* =========================
   Janelas - jqxwindow
========================= */
/* Janela do jqxwindow */
.div-jqxwindow-principal {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    gap: 16px;
}

.jqx-window-header-sucesso {
    background-color: #60f084 !important;
}

.jqx-window-header-aviso {
    background-color: #ffe890 !important;
}

.jqx-window-header-erro {
    background-color: #ff9894 !important;
}

/* =========================
   Janelas - dialog
========================= */
dialog {
    display: block; /* isso quebra o comportamento nativo */
}

/* =========================
   Avisos
========================= */
/* Avisos */
.toast-sucesso {
    background: #00953b !important;
}

.toast-alerta {
    background: #fbbc05 !important;
}

.toast-erro {
    background: #e32121 !important;
}

.toast-info {
    background: #17a2b8 !important;
}

/* Estilização das mensagens */
.toastify {
    border-radius: 5px !important;
}

/* Controles */
td.details-control {
    background: url("../imagens/bin.png") no-repeat center center;
    cursor: pointer;
}

/* =========================
   Responsividade
========================= */
@media screen and (max-width: 1024px) {
    .file-wrapper {
        min-width: 480px;
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }
    .file-wrapper {
        min-width: 320px;
    }
}

/* =========================
   A pensar - temporário
========================= */

/* Coisas a analisar e pensar bem */
/* .layout-container {
    display: flex;
    gap: 32px;
    padding: 16px;
} */

/* Janelas */
/* Janela do jqxwindow */
/* A retirar o jqxwindow */
.div-jqxwindow-principal {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    gap: 16px;
}

.jqx-window-header-sucesso {
    background-color: #60f084 !important;
}

.jqx-window-header-aviso {
    background-color: #ffe890 !important;
}

.jqx-window-header-erro {
    background-color: #ff9894 !important;
}
/* ------------------------------- */
/* Nova popup */
dialog {
    display: block; /* isso quebra o comportamento nativo */
}
/* Pequena */
dialog {
    display: none;
}
dialog[open] {
    display: flex;
}
dialog[open].button-layouthorizontal-button {
    display: flex;
}
.button-layouthorizontal-button {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    box-sizing: border-box;
    overflow: hidden;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 24px;
    text-align: center;
    font-size: 16px;
    color: #131927;
}
.button-layouthorizontal-button {
    background-color: #fbfbfb;
}
.button-layouthorizontal-button.alert {
    border: 2px solid #f5f52d;
}
.button-layouthorizontal-button.small {
    width: 60%;
    min-width: 240px;
    max-width: 420px;
}

/* Grande  */
.button-layouthorizontal-button.bigger {
    width: 95%;
    min-width: 540px;
    max-width: 720px;
}
.title-message {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.title {
    align-self: stretch;
    position: relative;
    line-height: 24px;
    font-weight: 600;
}
.keep-your-messages {
    align-self: stretch;
    position: relative;
    font-size: 14px;
    line-height: 20px;
    color: #6d717f;
}
.buttons {
    align-self: stretch;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    color: #fff;
}
.button-layouthorizontal-button.alert.delete .button-confirm {
    background-color: #f90000 !important;
    color: #fff;
}
.button-layouthorizontal-button.alert.confirm .button-confirm {
    background-color: 0D5AB4 !important;
    color: #fff;
}
.button-layouthorizontal-button.alert .button-cancel {
    background-color: #00000080 !important;
    color: #fff !important;
}
