/* ==========================================
   OLYMPO ADMIN V2
   COMPRAS
========================================== */


/* ==========================================
   RESUMO
========================================== */

.compras-resumo {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 30px;
}


.compras-resumo__card {
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    gap: 8px;

    min-width: 0;

    padding: 22px;

    background:
        linear-gradient(
            145deg,
            #151d2e 0%,
            #0e1625 55%,
            #0a101c 100%
        );

    border:
        1px solid
        rgba(212, 175, 55, 0.18);

    border-radius: 16px;

    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, 0.20);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.compras-resumo__card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(212, 175, 55, 0.65),
            transparent
        );
}


.compras-resumo__card::after {
    content: "";

    position: absolute;

    top: -50px;
    right: -50px;

    width: 120px;
    height: 120px;

    background:
        radial-gradient(
            circle,
            rgba(212, 175, 55, 0.08),
            transparent 70%
        );

    pointer-events: none;
}


.compras-resumo__card:hover {
    transform: translateY(-3px);

    border-color:
        rgba(212, 175, 55, 0.40);

    box-shadow:
        0 14px 35px
        rgba(0, 0, 0, 0.28);
}


.compras-resumo__label {
    position: relative;
    z-index: 1;

    color: #9ca3af;

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.8px;
}


.compras-resumo__card strong {
    position: relative;
    z-index: 1;

    overflow: hidden;

    color: #d4af37;

    font-size: 25px;
    font-weight: 800;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.compras-resumo__ultima {
    color: #ffffff !important;

    font-size: 16px !important;
}


/* ==========================================
   CABEÇALHO
========================================== */

.compras-cabecalho {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;
}


.compras-cabecalho > div {
    min-width: 0;
}


.compras-cabecalho .pagina-titulo__mini {
    display: block;

    margin-bottom: 5px;

    color: #d4af37;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.5px;
}


.compras-cabecalho h2 {
    margin: 0;

    color: #ffffff;

    font-size: 28px;
    font-weight: 700;
}


.compras-cabecalho p {
    margin: 7px 0 0;

    color: #9ca3af;

    font-size: 13px;
}


/* ==========================================
   FORMULÁRIO
========================================== */

.compras-formulario {
    position: relative;
    overflow: hidden;

    margin-bottom: 30px;

    padding: 28px;

    background:
        linear-gradient(
            145deg,
            #151d2e 0%,
            #0e1625 55%,
            #0a101c 100%
        );

    border:
        1px solid
        rgba(212, 175, 55, 0.28);

    border-radius: 18px;

    box-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.25);
}


.compras-formulario::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #d4af37,
            transparent
        );
}


.compras-formulario__titulo {
    margin-bottom: 24px;
}


.compras-formulario__titulo h2 {
    margin: 0 0 6px;

    color: #ffffff;

    font-size: 19px;
}


.compras-formulario__titulo p {
    margin: 0;

    color: #9ca3af;

    font-size: 13px;
}


/* ==========================================
   CAMPOS
========================================== */

.compras-formulario__campos {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.compras-formulario__campos .campo {
    display: flex;

    flex-direction: column;

    gap: 8px;

    min-width: 0;
}


.compras-formulario__campos .campo label {
    color: #e5e7eb;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}


.compras-formulario__campos .campo input,
.compras-formulario__campos .campo select {
    width: 100%;
    min-height: 46px;

    box-sizing: border-box;

    padding: 0 14px;

    background:
        linear-gradient(
            135deg,
            #0d1420,
            #090f18
        );

    border:
        1px solid
        #303b4a;

    border-radius: 10px;

    color: #ffffff;

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.compras-formulario__campos .campo input:hover,
.compras-formulario__campos .campo select:hover {
    border-color:
        rgba(212, 175, 55, 0.40);
}


.compras-formulario__campos .campo input:focus,
.compras-formulario__campos .campo select:focus {
    background:
        linear-gradient(
            135deg,
            #101927,
            #0b121d
        );

    border-color: #d4af37;

    box-shadow:
        0 0 0 3px
        rgba(212, 175, 55, 0.08);
}


/* ==========================================
   SELECTS
========================================== */

#form-compra #produto-compra,
#form-compra #pagamento-compra {
    color: #ffffff;

    background-color: #111821;
}


#form-compra #produto-compra option,
#form-compra #pagamento-compra option {
    color: #ffffff;

    background-color: #111821;
}


/* ==========================================
   AÇÕES
========================================== */

.compras-formulario__acoes {
    display: flex;

    justify-content: flex-end;
    align-items: center;

    margin-top: 24px;
    padding-top: 20px;

    border-top:
        1px solid
        rgba(255, 255, 255, 0.06);
}


.compras-formulario__acoes .botao--principal {
    min-width: 200px;
    min-height: 48px;

    background:
        linear-gradient(
            135deg,
            #d4af37,
            #b9972e
        );

    color: #080c11;

    border:
        1px solid
        #e1c45b;

    font-size: 14px;
    font-weight: 800;

    box-shadow:
        0 5px 15px
        rgba(212, 175, 55, 0.12);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}


.compras-formulario__acoes .botao--principal:hover {
    background:
        linear-gradient(
            135deg,
            #e5c354,
            #c8a737
        );

    transform: translateY(-2px);

    box-shadow:
        0 7px 18px
        rgba(212, 175, 55, 0.18);
}


.compras-formulario__acoes .botao--principal:disabled {
    cursor: wait;

    opacity: 0.65;

    transform: none;

    box-shadow: none;
}


/* ==========================================
   LISTA DE COMPRAS
========================================== */

.compras-lista {
    position: relative;
    overflow: hidden;

    padding: 28px;

    background:
        linear-gradient(
            145deg,
            #151d2e 0%,
            #0e1625 55%,
            #0a101c 100%
        );

    border:
        1px solid
        rgba(212, 175, 55, 0.18);

    border-radius: 18px;

    box-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.22);
}


.compras-lista::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(212, 175, 55, 0.65),
            transparent
        );
}


.compras-lista__cabecalho {
    padding-bottom: 18px;

    margin-bottom: 14px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.06);
}


.compras-lista__cabecalho h2 {
    margin: 0;

    color: #ffffff;

    font-size: 18px;
}


.compras-lista__cabecalho p {
    margin: 6px 0 0;

    color: #9ca3af;

    font-size: 12px;
}


/* ==========================================
   CONTAINER
========================================== */

#compras-container {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


/* ==========================================
   NOVO CARD DE COMPRA
========================================== */

.item-compra {
    position: relative;
    overflow: hidden;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 24px;

    padding: 18px 20px;

    background:
        linear-gradient(
            135deg,
            rgba(21, 29, 46, 0.96),
            rgba(10, 17, 29, 0.98)
        );

    border:
        1px solid
        rgba(255, 255, 255, 0.07);

    border-radius: 14px;

    box-shadow:
        0 5px 18px
        rgba(0, 0, 0, 0.18);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.item-compra::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    width: 3px;

    background:
        linear-gradient(
            180deg,
            #d4af37,
            rgba(212, 175, 55, 0.20)
        );

    opacity: 0.75;
}


.item-compra:hover {
    transform: translateY(-2px);

    border-color:
        rgba(212, 175, 55, 0.32);

    background:
        linear-gradient(
            135deg,
            #192236,
            #101927
        );

    box-shadow:
        0 9px 25px
        rgba(0, 0, 0, 0.25);
}


/* ==========================================
   INFORMAÇÕES DA COMPRA
========================================== */

.compra-info {
    display: grid;

    grid-template-columns:
        minmax(180px, 1.5fr)
        minmax(110px, 0.8fr)
        minmax(90px, 0.6fr)
        minmax(130px, 0.9fr)
        minmax(100px, 0.7fr)
        minmax(140px, 0.9fr);

    align-items: center;

    gap: 18px;

    min-width: 0;
}


.compra-info strong {
    overflow: hidden;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.compra-info span {
    display: block;

    overflow: hidden;

    color: #9aa4b2;

    font-size: 11px;
    line-height: 1.5;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.compra-info span::first-line {
    color: #c4cbd4;
}


/* ==========================================
   VALOR TOTAL
========================================== */

.compra-valor {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    justify-content: center;

    min-width: 115px;

    padding-left: 20px;

    border-left:
        1px solid
        rgba(255, 255, 255, 0.07);

    text-align: right;
}


.compra-valor::before {
    content: "TOTAL";

    margin-bottom: 4px;

    color: #707b89;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;
}


.compra-valor strong {
    color: #d4af37;

    font-size: 17px;
    font-weight: 800;

    white-space: nowrap;
}


/* ==========================================
   ESTADO VAZIO
========================================== */

.compras-lista .estado-vazio {
    margin-top: 18px;

    padding: 40px 20px;

    background:
        rgba(8, 15, 28, 0.65);

    border:
        1px dashed
        rgba(212, 175, 55, 0.18);

    border-radius: 12px;

    text-align: center;
}


.compras-lista .estado-vazio strong {
    color: #cbd2da;

    font-size: 14px;
}


.compras-lista .estado-vazio p {
    margin-top: 7px;

    color: #737e8b;

    font-size: 12px;
}


/* ==========================================
   RESPONSIVO — TABLET
========================================== */

@media (max-width: 1200px) {

    .compras-resumo {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .compra-info {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        row-gap: 12px;
    }

}


/* ==========================================
   RESPONSIVO — TABLET MENOR
========================================== */

@media (max-width: 900px) {

    .item-compra {
        grid-template-columns: 1fr;

        gap: 16px;
    }


    .compra-info {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .compra-valor {
        align-items: flex-start;

        min-width: 0;

        padding-top: 14px;
        padding-left: 0;

        border-top:
            1px solid
            rgba(255, 255, 255, 0.07);

        border-left: none;

        text-align: left;
    }

}


/* ==========================================
   RESPONSIVO — MOBILE
========================================== */

@media (max-width: 800px) {

    .compras-cabecalho {
        align-items: flex-start;

        flex-direction: column;
    }


    .compras-cabecalho .botao {
        width: 100%;
    }


    .compras-formulario,
    .compras-lista {
        padding: 22px;
    }


    .compras-formulario__campos {
        grid-template-columns: 1fr;
    }


    .compras-formulario__acoes {
        justify-content: stretch;
    }


    .compras-formulario__acoes .botao--principal {
        width: 100%;
    }


    .compra-info {
        grid-template-columns: 1fr 1fr;

        gap: 12px;
    }

}


/* ==========================================
   RESPONSIVO — CELULAR
========================================== */

@media (max-width: 600px) {

    .compras-resumo {
        grid-template-columns: 1fr;
    }


    .compras-resumo__card {
        padding: 19px;
    }


    .compras-resumo__card strong {
        font-size: 23px;
    }


    .compras-cabecalho h2 {
        font-size: 24px;
    }


    .compras-formulario,
    .compras-lista {
        padding: 18px;

        border-radius: 15px;
    }


    .item-compra {
        gap: 14px;

        padding: 17px;
    }


    .compra-info {
        grid-template-columns: 1fr;
    }


    .compra-info strong {
        font-size: 15px;
    }


    .compra-info span {
        white-space: normal;
    }


    .compra-valor {
        padding-top: 14px;
    }


    .compra-valor strong {
        font-size: 18px;
    }

}


/* ==========================================
   RESPONSIVO — CELULAR PEQUENO
========================================== */

@media (max-width: 420px) {

    .compras-resumo__card {
        padding: 18px;
    }


    .compras-resumo__card strong {
        font-size: 22px;
    }


    .item-compra {
        padding: 15px;
    }

}