
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%); min-height: 100vh; padding: 15px; }
.container { max-width: 1000px; margin: 5px auto; background: white; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
.header { background: linear-gradient(135deg, #1565c0, #1976d2); color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.header h2 { font-size: 18px; font-weight: 800; }
.header-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-back { background: rgba(255,255,255,0.2); color: white; border: 2px solid white; padding: 7px 13px; border-radius: 6px; font-weight: 600; font-size: 13px; text-decoration: none; }
.btn-add { background: white; color: #1565c0; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; }
.content { padding: 16px 20px; }

/* Summary */
.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.sum-card { background: #e3f2fd; color: #1565c0; border-radius: 10px; padding: 12px; text-align: center; }
.sum-card .lbl { font-size: 10px; font-weight: 700; opacity: 0.8; margin-bottom: 3px; text-transform: uppercase; }
.sum-card .val { font-size: 22px; font-weight: 800; }

/* Search & Filter */
.filtros { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.search-box { flex: 1; min-width: 180px; padding: 8px 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 13px; outline: none; }
.search-box:focus { border-color: #1565c0; }
.f-btn { padding: 6px 14px; border-radius: 20px; border: 2px solid #ddd; background: white; font-size: 12px; font-weight: 700; cursor: pointer; color: #555; }
.f-btn.active { background: #1565c0; color: white; border-color: #1565c0; }

/* Cards grid */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.prop-card { border: 2px solid #e0e0e0; border-radius: 12px; padding: 16px; cursor: pointer; transition: all 0.2s; }
.prop-card:hover { border-color: #1565c0; box-shadow: 0 4px 15px rgba(0,0,0,0.12); transform: translateY(-2px); }
.prop-card.status-Available { border-left: 4px solid #2e7d32; }
.prop-card.status-UnderContract { border-left: 4px solid #f57f17; }
.prop-card.status-Sold { border-left: 4px solid #1565c0; }
.prop-card.status-Inactive { border-left: 4px solid #aaa; opacity: 0.7; }

.prop-id { font-size: 12px; font-weight: 800; color: #1565c0; margin-bottom: 4px; }
.prop-endereco { font-size: 14px; font-weight: 800; color: #222; margin-bottom: 2px; }
.prop-local { font-size: 12px; color: #888; margin-bottom: 10px; }
.prop-info-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; border-bottom: 1px solid #f5f5f5; }
.prop-info-row:last-child { border-bottom: none; }
.prop-info-row .lbl { color: #aaa; }
.prop-info-row .val { font-weight: 700; color: #333; }
.prop-footer { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; }

.status-badge { display: inline-block; padding: 3px 9px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.sb-Available { background: #e8f5e9; color: #2e7d32; }
.sb-UnderContract { background: #fff3e0; color: #e65100; }
.sb-Sold { background: #e3f2fd; color: #1565c0; }
.sb-Inactive { background: #f5f5f5; color: #999; }

.btn-edit { background: #e3f2fd; color: #1565c0; border: none; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; }
.btn-del { background: #fdecea; color: #c62828; border: none; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; padding: 15px; }
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: 14px; padding: 24px; width: 100%; max-width: 560px; position: relative; max-height: 90vh; overflow-y: auto; }
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 16px; color: #1565c0; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 20px; cursor: pointer; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; color: #666; text-transform: uppercase; margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 9px 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 13px; outline: none; font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #1565c0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.btn-save { background: #1565c0; color: white; border: none; padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; width: 100%; margin-top: 8px; }

.empty { text-align: center; padding: 40px; color: #aaa; font-size: 14px; }
.version { font-size: 10px; opacity: 0.5; text-align: right; padding: 4px 20px 8px; }

@media (max-width: 600px) {
    .sum-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-grid { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .header { flex-direction: column; }
}

