/* Ajuste do Mapa para acomodar a Sidebar Esquerda */
#map { 
    height: 100vh; 
    flex-grow: 1;
    width: auto;
    margin-left: 0;
    transition: width 0.3s, margin-right 0.3s; 
}

body.sidebar-collapsed #map {
    width: auto;
    margin-left: 0;
}

/* --- Sidebar Direita (Edição) --- */
#sidebar {
    position: fixed;
    top: 0; right: -500px;
    width: 500px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 4000;
    display: flex;
    flex-direction: column;
}

#sidebar.open { right: 0; }

.sidebar-header {
    background: #2d3436;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-footer {
    padding: 15px;
    background: #f1f2f6;
    border-top: 1px solid #ddd;
}

/* --- Área Editável --- */
.area-wrapper {
    background: #dff9fb;
    border: 1px solid #c7ecee;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.area-label {
    color: #2c3e50; font-weight: bold; font-size: 1.1em;
}
.area-input-group {
    display: flex; align-items: center; gap: 5px;
}
#input-area {
    font-size: 1.5em;
    color: #0984e3;
    font-weight: bold;
    width: 120px;
    text-align: right;
    border: 1px solid #badc58;
    background: #fff;
    padding: 5px;
    border-radius: 4px;
}

/* --- Inputs Gerais --- */
label { font-weight: 600; font-size: 13px; color: #636e72; display: block; margin-top: 12px; margin-bottom: 4px; }
input[type="text"], input[type="date"], select {
    width: 100%; padding: 10px; 
    border: 1px solid #dfe6e9; border-radius: 6px; box-sizing: border-box;
    font-size: 14px;
}

/* --- Tabela de Insumos (Grid) --- */
.insumo-header {
    display: grid;
    grid-template-columns: 110px 1fr 70px 70px 30px;
    gap: 5px;
    margin-bottom: 5px; font-size: 11px; color: #aaa; font-weight: bold; text-transform: uppercase;
}
.insumo-item {
    display: grid;
    grid-template-columns: 110px 1fr 70px 70px 30px;
    gap: 5px;
    margin-bottom: 8px;
    align-items: center;
}

.insumo-item input { margin: 0; padding: 8px; font-size: 13px; }

/* Campo Total Readonly */
.col-total {
    background-color: #eee;
    color: #555;
    font-weight: bold;
    border: 1px solid #ccc;
    pointer-events: none;
}

.btn-remove-item {
    background: #ff7675; color: white; border: none;
    height: 34px; border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.btn-remove-item:hover { background: #d63031; }

.btn-add-item {
    background: #0984e3; color: white; border: none;
    padding: 10px; width: 100%; border-radius: 6px; cursor: pointer; margin-top: 10px;
    font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* --- Botões Principais --- */
.btn-save { background: #00b894; color: white; width: 100%; padding: 12px; border: none; cursor: pointer; font-size: 16px; border-radius: 6px; font-weight: bold;}
.btn-delete { background: white; color: #d63031; border: 1px solid #d63031; padding: 10px; border-radius: 6px; cursor: pointer; margin-top: 10px; width: 100%; }

.close-btn { background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
