* { box-sizing: border-box; }

body {
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f2f4f7;
    margin: 0;
    padding: 0;
    color: #1f2430;
}

.topo {
    background: #1f2430;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.topo h1 {
    font-size: 20px;
    margin: 0;
}

.topo a.botao {
    background: #4f7cff;
    color: #fff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 16px;
}

.card-form {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin: 14px 0 6px;
}

input[type=text], input[type=number], textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d3d8e0;
    border-radius: 8px;
    font-size: 15px;
    background: #fbfbfd;
}

textarea { resize: vertical; min-height: 70px; }

.linha { display: flex; gap: 12px; flex-wrap: wrap; }
.linha > div { flex: 1; min-width: 140px; }

input[type=file] {
    width: 100%;
    padding: 10px;
    border: 1px dashed #b6bfd0;
    border-radius: 8px;
    background: #fbfbfd;
}

.preview-atual {
    margin-top: 10px;
    max-width: 160px;
    border-radius: 8px;
    display: block;
}

.total-calculado {
    background: #eef2ff;
    border: 1px solid #cdd6ff;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 14px;
}

button.salvar {
    margin-top: 20px;
    width: 100%;
    background: #2f9e44;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

button.salvar:active { opacity: 0.85; }

.grade-produtos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.produto {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.produto img {
    width: 100%;
    height: 170px;
    object-fit: contain;
    background: #e9ecf1;
}

.produto .conteudo {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.produto h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.produto .descricao {
    font-size: 13px;
    color: #5a6272;
    margin-bottom: 8px;
}

.valores {
    font-size: 13px;
    line-height: 1.5;
    margin-top: auto;
}

.valores strong { color: #1f2430; }

.valores .destaque {
    color: #2f9e44;
    font-weight: 700;
    font-size: 15px;
}

.acoes {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.acoes a {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.acoes .editar { background: #e7edff; color: #2952cc; }
.acoes .excluir { background: #ffe7e7; color: #cc2929; }

.vazio {
    text-align: center;
    color: #7a8296;
    padding: 60px 20px;
}

.aviso {
    background: #fff3cd;
    border: 1px solid #ffe08a;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
