:root {
    --green: #176b4b;
    --dark: #12271e;
    --mint: #e8f2e9;
    --bg: #f7f8f5;
    --line: #e1e7df
}


* {
    box-sizing: border-box
}


html {
    scroll-behavior: smooth
}


body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--dark)
}


a {
    color: inherit;
    text-decoration: none
}


button,
input,
select {
    font: inherit
}


button {
    cursor: pointer
}


.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 6%;
    background: white;
    gap: 20px
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 25px
}


.brand img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover
}


.brand small {
    display: block;
    font-size: 10px;
    letter-spacing: 4px
}


.header nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px
}


.outline {
    border: 1px solid var(--green);
    border-radius: 30px;
    padding: 12px 16px;
    color: var(--green)
}


.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
    background: #eaf0e8
}


.hero-copy {
    padding: 75px 12%;
    align-self: center
}


.hero h1 {
    font-size: clamp(34px, 4vw, 62px);
    line-height: 1.08;
    letter-spacing: -2px;
    margin: 16px 0
}


.hero p {
    color: #53635a;
    line-height: 1.7;
    max-width: 500px
}


.hero img {
    width: 100%;
    height: 100%;
    max-height: 550px;
    object-fit: cover
}


.eyebrow {
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 800;
    color: var(--green)
}


.btn {
    display: inline-block;
    border: 0;
    background: var(--green);
    color: white;
    padding: 14px 22px;
    border-radius: 30px;
    margin-top: 18px;
    font-weight: bold
}


.catalog {
    padding: 70px 6%
}


.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px
}


.section-head h2,
.about h2,
.contact h2 {
    font-size: clamp(27px, 3vw, 40px);
    margin: 12px 0 25px
}


.muted {
    color: #65766c
}


.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 26px;
    flex-wrap: wrap
}


.filters input,
.filters select,
.field input,
.field select,
.field textarea {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    background: white;
    min-width: 0
}


.search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    flex: 2;
    min-width: 230px;
    padding-left: 12px
}


.search input {
    border: 0;
    width: 100%;
    outline: 0
}


.filters select {
    flex: 1;
    min-width: 155px
}


.clear {
    border: 0;
    background: transparent;
    color: var(--green);
    font-weight: bold
}


.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px
}


.product {
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column
}


.product img {
    width: 100%;
    height: 215px;
    object-fit: cover;
    background: #f0f1ee
}


.product-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1
}


.product small {
    color: var(--green);
    font-weight: 700
}


.product h3 {
    margin: 9px 0;
    font-size: 19px
}


.product p {
    color: #63736a;
    line-height: 1.5;
    font-size: 14px;
    flex: 1
}


.product button {
    background: var(--mint);
    color: var(--green);
    border: 0;
    padding: 12px;
    border-radius: 9px;
    font-weight: bold
}


.notice {
    color: #6b746e
}


.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background: white;
    gap: 40px;
    padding: 65px 6%
}


.about p,
.contact p {
    line-height: 1.8;
    color: #52645a;
    max-width: 500px
}


.about img {
    width: 100%;
    height: 310px;
    object-fit: cover;
    border-radius: 16px
}


.contact {
    text-align: center;
    padding: 70px 20px;
    background: var(--mint)
}


.contact p {
    margin: auto
}


footer {
    display: flex;
    justify-content: space-between;
    padding: 24px 6%;
    font-size: 13px;
    color: #68766c
}


dialog {
    border: 0;
    border-radius: 16px;
    padding: 28px;
    max-width: 460px;
    width: calc(100% - 32px);
    box-shadow: 0 20px 90px #0004
}


dialog::backdrop {
    background: #10261caa
}


.close {
    float: right;
    border: 0;
    background: transparent;
    font-size: 28px
}


.detail-image {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 12px
}


.login-layout {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #112b20, #287454)
}


.login-card {
    background: white;
    padding: 40px;
    width: min(420px, 92%);
    border-radius: 20px
}


.login-card .brand {
    justify-content: center
}


.field {
    display: grid;
    gap: 7px;
    margin: 16px 0
}


.field input,
.field select,
.field textarea {
    width: 100%
}


.login-card .btn {
    width: 100%
}


.error {
    color: #b42318
}


.admin {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh
}


.sidebar {
    background: var(--dark);
    color: white;
    padding: 26px 20px
}


.sidebar a,
.sidebar button {
    display: block;
    color: white;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 13px;
    border-radius: 8px;
    margin-top: 7px
}


.sidebar .active,
.sidebar a:hover,
.sidebar button:hover {
    background: #ffffff20
}


.admin-main {
    padding: 32px;
    min-width: 0
}


.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px
}


.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    margin: 18px 0;
    overflow: auto
}


.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px
}


.stat {
    padding: 20px;
    background: white;
    border-radius: 12px
}


.stat strong {
    display: block;
    font-size: 28px;
    margin-top: 10px
}


table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px
}


th,
td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    font-size: 14px
}


th {
    color: #5d6b63
}


.action {
    border: 1px solid var(--line);
    background: white;
    border-radius: 8px;
    padding: 8px;
    margin: 3px
}


.danger {
    color: #b42318
}


.admin-section[hidden] {
    display: none
}


.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px
}


.form-grid .wide {
    grid-column: 1/-1
}


.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0
}


.checkbox-line input {
    width: auto
}


.pill {
    background: var(--mint);
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 12px
}


.hidden {
    display: none !important
}


@media(max-width:950px) {
    .grid {
        grid-template-columns: repeat(2, 1fr)
    }


    .stats {
        grid-template-columns: repeat(2, 1fr)
    }


    .header nav {
        flex-wrap: wrap;
        gap: 12px
    }


    .hero-copy {
        padding: 45px 8%
    }
}


@media(max-width:650px) {
    .header {
        align-items: flex-start;
        flex-direction: column
    }


    .hero,
    .about {
        grid-template-columns: 1fr
    }


    .hero img {
        height: 260px
    }


    .grid {
        grid-template-columns: 1fr
    }


    .admin {
        display: block
    }


    .sidebar {
        padding: 15px
    }


    .sidebar nav {
        display: flex;
        flex-wrap: wrap
    }


    .sidebar a,
    .sidebar button {
        width: auto
    }


    .admin-main {
        padding: 16px
    }


    .form-grid {
        grid-template-columns: 1fr
    }


    .stats {
        grid-template-columns: 1fr 1fr
    }
}


/* LOGO SOMENTE NA AREA DO ESTOQUE */


.sidebar .brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 25px;
}


.sidebar .brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 50%;
}


.sidebar .brand span {
    display: block;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
    white-space: nowrap;
}
/* CAMPO DE UPLOAD DE IMAGEM */

.upload-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-title {
    font-weight: 600;
    color: #173c38;
}

.upload-area {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border: 2px dashed #80bcae;
    border-radius: 14px;
    background: #f5fbf8;
    cursor: pointer;
    transition: 0.2s;
}

.upload-area:hover {
    border-color: #087b62;
    background: #eaf7f1;
}

.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #ddf3e9;
    color: #087b62;
    font-size: 36px;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.upload-content strong {
    color: #173c38;
    font-size: 15px;
}

.upload-content > span:nth-child(2) {
    color: #667085;
    font-size: 13px;
}

.upload-button {
    display: inline-block;
    padding: 10px 18px;
    background: #087b62;
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.upload-filename {
    color: #667085;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.upload-help {
    color: #667085;
    font-size: 12px;
}

@media (max-width: 600px) {
    .upload-area {
        padding: 18px;
        gap: 12px;
    }

   .upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #ddf3e9;
    font-size: 32px;
    flex-shrink: 0;
} 
}

/* ALERTAS DE ESTOQUE MÍNIMO  */

#alertas {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

/* Cartão amarelo */
#alertas .alerta-estoque {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
    background: #fffaf0;
    border: 1px solid #f1d7a5;
    border-left: 5px solid #e6a23c;
    border-radius: 12px;
}

/* Nome do produto e etiqueta */
#alertas .alerta-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

#alertas .alerta-topo strong {
    color: #173c38;
    font-size: 16px;
    font-weight: 600;
}

/* Etiqueta arredondada */
#alertas .alerta-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff0cc;
    color: #9a6500;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

/* Quantidades lado a lado, sem espalhar */
#alertas .alerta-dados {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
    margin: 0;
}

#alertas .alerta-dados div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 130px;
}

#alertas .alerta-dados small {
    color: #667085;
    font-size: 12px;
    font-weight: 400;
}

#alertas .alerta-dados strong {
    color: #173c38;
    font-size: 15px;
    font-weight: 600;
}

/* Mensagens */
#alertas .alerta-info {
    margin: 0;
    color: #9a6400d7;
    font-size: 13px;
    line-height: 1.5;
}

#alertas .alerta-reposicao {
    margin: 0;
    color: #9a6500;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

/*  ESTOQUE CRÍTICO: VERMELHO  */

#alertas .alerta-estoque.alerta-critico {
    background: #fff1f2;
    border-color: #fecdd3;
    border-left-color: #dc2626;
}

#alertas .alerta-critico .alerta-status {
    background: #fee2e2;
    color: #b91c1c;
}

#alertas .alerta-critico .alerta-info {
    color: #660505a3;
}
#alertas .alerta-critico .alerta-reposicao {
    color: #b91c1c;
}

/* Celular */
@media (max-width: 480px) {
    #alertas .alerta-topo {
        align-items: flex-start;
    }

    #alertas .alerta-estoque {
        padding: 16px;
    }
}
