* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.main-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.container {
    flex: 2;
    min-width: 350px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.2em;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #4CAF50;
}

#map {
    width: 100%;
    height: 400px;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.map-instruction {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

button {
    width: 100%;
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.sidebar {
    flex: 1;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    min-width: 250px;
    max-width: 350px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    height: fit-content;
}

.sidebar h2 {
    margin-bottom: 15px;
    font-size: 1.3em;
    color: #333;
}

#listaPredios {
    list-style: none;
    padding: 0;
    margin: 0;
}

#listaPredios li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 1em;
    color: #444;
}

.predio-nome {
    font-weight: bold;
    color: #2a7ae2;
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    font-size: 1em;
}

.predio-nome:hover {
    color: #174a8c;
}

.predio-endereco {
    display: block;
    color: #666;
    font-size: 0.95em;
    margin-top: 2px;
    margin-left: 2px;
}

@media (max-width: 900px) {
    .main-flex {
        flex-direction: column;
    }
    .sidebar {
        max-width: 100%;
        margin-top: 30px;
    }
}