* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #111318;
    color: #f5f5f5;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #1b1e24;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    margin-bottom: 35px;
}

.logo h2 {
    font-size: 13px;
    font-weight: 500;
    color: #aaa;
    letter-spacing: 5px;
    margin-bottom: 5px;
}

.logo span {
    display: block;
    font-size: 25px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

nav a {
    text-decoration: none;
    color: #ccc;
    padding: 12px 14px;
    border-radius: 8px;
    transition: 0.2s;
}

nav a:hover,
nav a.ativo {
    background: #2c313a;
    color: white;
}

.separador {
    height: 1px;
    background: #333842;
    margin: 10px 0;
}

.logout {
    margin-top: auto;
}

.logout a {
    color: #f66;
    text-decoration: none;
}

.conteudo {
    flex: 1;
    padding: 35px;
}

.topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.topo p {
    color: #aaa;
    margin-top: 5px;
}

.utilizador {
    text-align: right;
}

.utilizador span {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-top: 4px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 35px;
}

.card {
    background: #1b1e24;
    border: 1px solid #2d323c;
    border-radius: 12px;
    padding: 22px;
}

.card span {
    color: #aaa;
    font-size: 14px;
}

.card strong {
    display: block;
    margin-top: 12px;
    font-size: 26px;
}

.atalhos h2 {
    margin-bottom: 18px;
}

.atalhos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.atalho {
    background: #1b1e24;
    border: 1px solid #2d323c;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: white;
    transition: 0.2s;
}

.atalho:hover {
    transform: translateY(-2px);
    border-color: #555e6d;
}

.atalho p {
    color: #aaa;
    margin-top: 8px;
}

@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .atalhos-grid {
        grid-template-columns: 1fr;
    }
}

.venda-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.venda-caixa,
.precario {
    background: #1b1e24;
    border: 1px solid #2d323c;
    border-radius: 12px;
    padding: 24px;
}

.campo {
    width: 100%;
    background: #111318;
    border: 1px solid #343a45;
    color: white;
    padding: 12px;
    border-radius: 8px;
    outline: none;
}

.campo:focus {
    border-color: #666f80;
}

.venda-caixa > label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
}

.linha-titulo {
    margin-top: 25px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.linha-venda {
    display: grid;
    grid-template-columns: 2fr 1.5fr 90px 110px 40px;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.btn-principal,
.btn-secundario,
.btn-remover {
    border: 0;
    cursor: pointer;
    border-radius: 8px;
}

.btn-principal {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-weight: bold;
    font-size: 15px;
}

.btn-secundario {
    padding: 10px 14px;
}

.btn-remover {
    height: 42px;
    font-size: 20px;
}

.resumo-venda {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #343a45;
    display: flex;
    justify-content: space-between;
    font-size: 20px;
}

.precario h2 {
    margin-bottom: 20px;
}

.precario h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #aaa;
}

.preco-item {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 0;
    border-bottom: 1px solid #2d323c;
}

@media (max-width: 1100px) {
    .venda-layout {
        grid-template-columns: 1fr;
    }

    .linha-venda {
        grid-template-columns: 1fr;
    }
}

.func-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 25px;
}

.funcionario-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid #2d323c;
}

.funcionario-item strong {
    display: block;
    margin-bottom: 5px;
}

.funcionario-item span {
    font-size: 13px;
    color: #999;
}

.func-acoes {
    display: flex;
    align-items: center;
    gap: 12px;
}

.estado-ativo {
    color: #71d99b !important;
}

.estado-inativo {
    color: #ef7777 !important;
}

@media (max-width: 1000px) {

    .func-layout {
        grid-template-columns: 1fr;
    }

}

/* =========================================
   LOGIN - ARMARIA THE THIRD
========================================= */

.login-body {
    min-height: 100vh;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at top,
            #1c2028 0%,
            #111318 45%,
            #0c0e12 100%
        );

    color: #f5f5f5;
}

.login-container {
    width: 100%;
    max-width: 430px;
    padding: 25px;
}

.login-brand {
    text-align: center;
    margin-bottom: 30px;
}

.login-brand span {
    display: block;

    color: #999;
    font-size: 13px;
    font-weight: 500;

    letter-spacing: 7px;

    margin-bottom: 7px;
}

.login-brand h1 {
    margin: 0;

    color: white;

    font-size: 34px;
    font-weight: 700;

    letter-spacing: 4px;
}

.login-card {
    background: #1b1e24;

    border: 1px solid #303640;
    border-radius: 14px;

    padding: 35px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35);
}

.login-header {
    margin-bottom: 30px;
}

.login-header h2 {
    margin: 0 0 8px 0;

    font-size: 24px;
}

.login-header p {
    margin: 0;

    color: #9298a3;

    font-size: 14px;
    line-height: 1.5;
}

.login-campo {
    margin-bottom: 20px;
}

.login-campo label {
    display: block;

    margin-bottom: 8px;

    color: #c3c7ce;

    font-size: 14px;
}

.login-campo input {
    width: 100%;

    padding: 13px 14px;

    background: #111318;

    border: 1px solid #343a45;
    border-radius: 8px;

    color: white;

    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.login-campo input:focus {
    border-color: #777f8d;

    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.05);
}

.login-campo input::placeholder {
    color: #5f6570;
}

.login-button {
    width: 100%;

    margin-top: 8px;

    padding: 14px;

    border: 0;
    border-radius: 8px;

    background: #f2f2f2;
    color: #111318;

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 1px;

    cursor: pointer;

    transition:
        transform 0.15s,
        background 0.15s;
}

.login-button:hover {
    background: white;
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 22px;

    text-align: center;

    color: #5f6570;

    font-size: 12px;
}

@media (max-width: 500px) {

    .login-container {
        padding: 18px;
    }

    .login-card {
        padding: 27px 22px;
    }

    .login-brand h1 {
        font-size: 28px;
    }
}

.copyright {
    margin-top: 10px;
    font-size: 10px;
    color: #4f5560;
    letter-spacing: 0.4px;
    line-height: 1.6;
}

/* =========================================
   RODAPÉ - BRATSTVO DEV
========================================= */

.app-footer {
    margin-top: 45px;
    padding-top: 18px;

    border-top: 1px solid #242932;

    text-align: center;

    color: #4f5560;
    font-size: 10px;
    letter-spacing: 0.4px;
    line-height: 1.7;
}

.app-footer strong {
    color: #676e7a;
    font-weight: 500;
}

/* =========================================
   STOCK
========================================= */

.stock-secao {
    margin-bottom: 40px;
}

.stock-titulo {
    margin-bottom: 18px;
}

.stock-titulo h2 {
    margin-bottom: 5px;
}

.stock-titulo p {
    color: #858b96;
    font-size: 14px;
}

.stock-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(210px, 1fr));

    gap: 15px;
}

.stock-card {
    background: #1b1e24;

    border: 1px solid #2d323c;
    border-radius: 12px;

    padding: 18px;

    transition:
        transform 0.15s,
        border-color 0.15s;
}

.stock-card:hover {
    transform: translateY(-2px);
    border-color: #444b57;
}

.stock-card-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 17px;
}

.stock-categoria {
    color: #737a86;

    font-size: 9px;
    font-weight: bold;

    letter-spacing: 1.5px;
}

.stock-indicador {
    width: 8px;
    height: 8px;

    border-radius: 50%;
}

.stock-ok {
    background: #63d58a;
}

.stock-baixo {
    background: #e4bd59;
}

.stock-critico {
    background: #e56767;
}

.stock-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.stock-quantidade {
    font-size: 30px;
    font-weight: bold;
}

.stock-disponivel {
    display: block;

    color: #747b86;
    font-size: 11px;

    margin-top: 3px;
    margin-bottom: 18px;
}

.btn-stock {
    width: 100%;

    padding: 9px;

    background: #292e37;
    color: #d9dce1;

    border: 1px solid #373d48;
    border-radius: 7px;

    cursor: pointer;
}

.btn-stock:hover {
    background: #343a45;
}


/* MODAL */

.modal-stock {
    position: fixed;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.72);

    z-index: 1000;
}

.modal-stock.aberto {
    display: flex;
}

.modal-stock-caixa {
    position: relative;

    width: 100%;
    max-width: 430px;

    background: #1b1e24;

    border: 1px solid #343a45;
    border-radius: 14px;

    padding: 30px;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5);
}

.modal-stock-caixa h2 {
    margin: 6px 0 8px;
}

.modal-stock-caixa p {
    color: #8f96a1;
    margin-bottom: 25px;
}

.modal-stock-caixa label {
    display: block;

    margin-bottom: 7px;

    color: #b5bac2;
    font-size: 13px;
}

.modal-label {
    color: #686f7a;

    font-size: 9px;
    font-weight: bold;

    letter-spacing: 2px;
}

.modal-fechar {
    position: absolute;

    top: 14px;
    right: 16px;

    background: transparent;
    color: #8d939e;

    border: 0;

    font-size: 25px;

    cursor: pointer;
}

/* =========================================
   HISTÓRICO DE VENDAS
========================================= */

.historico-filtros {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 15px;
    margin-bottom: 22px;
}

.historico-card {
    background: #1b1e24;
    border: 1px solid #2d323c;
    border-radius: 12px;

    padding: 20px;

    margin-bottom: 15px;
}

.historico-topo {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.historico-codigo {
    color: #6f7682;
    font-size: 10px;
    letter-spacing: 1px;

    margin-bottom: 6px;
}

.historico-topo h3 {
    margin-bottom: 5px;
}

.historico-topo span {
    color: #858c97;
    font-size: 12px;
}

.historico-direita {
    text-align: right;
}

.historico-direita strong {
    display: block;
    margin-top: 8px;

    font-size: 22px;
}

.historico-valida,
.historico-invalida {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 6px;

    font-size: 9px !important;
    font-weight: bold;

    letter-spacing: 1px;
}

.historico-valida {
    background: rgba(92, 209, 135, 0.10);
    color: #63d58a !important;
}

.historico-invalida {
    background: rgba(229, 103, 103, 0.10);
    color: #e56767 !important;
}

.historico-itens {
    margin-top: 18px;
    padding-top: 12px;

    border-top: 1px solid #2d323c;
}

.historico-item {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    padding: 8px 0;
}

.historico-item strong {
    display: block;
}

.historico-item span {
    display: block;

    margin-top: 3px;

    color: #777e89;
    font-size: 11px;
}

.historico-item-preco {
    font-weight: bold;
}

.historico-resumo {
    margin-top: 15px;
    padding-top: 15px;

    border-top: 1px solid #2d323c;

    display: flex;
    justify-content: flex-end;
    gap: 25px;

    color: #9299a4;

    font-size: 12px;
}

.historico-resumo strong {
    margin-left: 5px;
    color: white;
}

.historico-motivo {
    margin-top: 15px;

    padding: 10px 12px;

    background: rgba(229, 103, 103, 0.08);
    border-radius: 7px;

    color: #d77b7b;

    font-size: 12px;
}

.historico-vazio {
    padding: 50px;

    text-align: center;

    color: #6d7480;
}

@media (max-width: 800px) {

    .historico-filtros {
        grid-template-columns: 1fr;
    }

    .historico-topo {
        flex-direction: column;
    }

    .historico-direita {
        text-align: left;
    }

    .historico-resumo {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* =========================================
   PAGAMENTOS SEMANAIS
========================================= */

.pagamentos-regras {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 12px;

    margin-bottom: 25px;
}

.pagamentos-regras > div {
    background: #1b1e24;

    border: 1px solid #2d323c;
    border-radius: 10px;

    padding: 15px;
}

.pagamentos-regras span {
    display: block;

    color: #858c97;

    font-size: 11px;

    margin-bottom: 7px;
}

.pagamentos-regras strong {
    font-size: 18px;
}


.pagamento-card {
    background: #1b1e24;

    border: 1px solid #2d323c;
    border-radius: 12px;

    padding: 20px;

    margin-bottom: 15px;
}


.pagamento-cabecalho {
    display: flex;

    justify-content:
        space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 20px;
}


.pagamento-cabecalho h3 {
    margin-bottom: 4px;
}


.pagamento-cabecalho > div > span {
    color: #7f8691;

    font-size: 11px;
}


.pagamento-pago,
.pagamento-pendente {
    padding: 5px 9px;

    border-radius: 6px;

    font-size: 9px;

    font-weight: bold;

    letter-spacing: 1px;
}


.pagamento-pago {
    color: #63d58a;

    background:
        rgba(99, 213, 138, 0.10);
}


.pagamento-pendente {
    color: #e4bd59;

    background:
        rgba(228, 189, 89, 0.10);
}


.pagamento-grid {
    display: grid;

    grid-template-columns:
        repeat(6, 1fr);

    gap: 12px;
}


.pagamento-grid > div {
    background: #111318;

    border: 1px solid #292f38;
    border-radius: 8px;

    padding: 13px;
}


.pagamento-grid span {
    display: block;

    color: #747b86;

    font-size: 10px;

    margin-bottom: 7px;
}


.pagamento-grid strong {
    font-size: 16px;
}


.pagamento-total {
    border-color:
        #4a515d !important;
}


.pagamento-total strong {
    font-size: 19px;
}


.pagamento-btn {
    margin-top: 15px;
}


@media (max-width: 1100px) {

    .pagamentos-regras {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .pagamento-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .pagamentos-regras,
    .pagamento-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================
   ENCOMENDAS
========================================= */

.encomendas-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 25px;
}

.encomenda-filtro {
    width: 170px;
}

.encomenda-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    padding: 16px 0;

    border-bottom: 1px solid #2d323c;
}

.encomenda-item h3 {
    margin-bottom: 5px;
}

.encomenda-item strong {
    display: block;
    margin-bottom: 7px;
}

.encomenda-item span {
    display: block;

    color: #818894;
    font-size: 11px;

    margin-top: 3px;
}

.encomenda-acoes {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 1000px) {

    .encomendas-layout {
        grid-template-columns: 1fr;
    }

}

.encomenda-linha {
    display: grid;

    grid-template-columns:
        1fr 85px 42px;

    gap: 8px;

    margin-bottom: 9px;

    align-items: center;
}


.encomenda-armas {
    margin: 13px 0;

    padding: 10px 12px;

    background: #111318;

    border: 1px solid #292f38;
    border-radius: 8px;
}


.encomenda-arma-lista {
    padding: 5px 0;
}


.encomenda-correio {
    margin-bottom: 5px;
}


@media (max-width: 600px) {

    .encomenda-linha {
        grid-template-columns:
            1fr 70px 42px;
    }

}

.btn-apagar-encomenda {
    padding: 10px 14px;

    background: rgba(229, 103, 103, 0.10);
    color: #e56767;

    border: 1px solid rgba(229, 103, 103, 0.25);
    border-radius: 8px;

    cursor: pointer;
}

.btn-apagar-encomenda:hover {
    background: rgba(229, 103, 103, 0.18);
}