html, body { margin: 0; padding: 0; }
#infolote-app-container { margin: 0; font-family: 'Segoe UI', Roboto, sans-serif; background-color: #f8fafc; min-height: 100vh; }

/* HEADER VERDE */
.infolote-header { background: #059669; padding: 40px 20px; color: #fff; }
.infolote-header-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.infolote-titles-wrapper { display: flex; align-items: center; gap: 15px; }
.infolote-icon { width: 32px; height: 32px; fill: #fff; }
.infolote-titles { display: flex; flex-direction: column; }
.infolote-title { font-size: 24px; font-weight: 700; margin: 0; line-height: 1.2; }
.infolote-subtitle { font-size: 14px; font-weight: 400; margin: 0; opacity: 0.9; }

/* CONTADORES */
.infolote-stats-container { display: flex; gap: 30px; margin-top: 10px; }
.infolote-stat { display: flex; flex-direction: column; }
.stat-num { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 12px; font-weight: 500; opacity: 0.9; margin-top: 4px; }
.stat-green { color: #a7f3d0; }
.stat-yellow { color: #fde047; }
.stat-red { color: #fca5a5; }

/* BARRA BRANCA (BLINDADA CONTRA O TEMA) */
.infolote-search-wrapper { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 15px 20px; width: 100%; box-sizing: border-box; }
.infolote-search-box { max-width: 1200px; margin: 0 auto; display: flex !important; flex-direction: row !important; gap: 10px !important; align-items: center !important; flex-wrap: nowrap !important; }
.infolote-input-group { position: relative; flex: 1 1 auto !important; min-width: 250px; }
.search-icon { width: 18px; height: 18px; color: #9ca3af; position: absolute; left: 15px; top: 12px; }
#infolote-search { width: 100% !important; padding: 10px 15px 10px 40px !important; border: 1px solid #e5e7eb !important; border-radius: 6px !important; font-size: 14px !important; outline: none !important; margin: 0 !important; height: 42px !important; box-sizing: border-box !important;}
.infolote-select { flex: 0 0 auto !important; width: auto !important; padding: 10px 30px 10px 15px !important; border: 1px solid #e5e7eb !important; border-radius: 6px !important; font-size: 14px !important; background: #fff !important; outline: none !important; cursor: pointer !important; margin: 0 !important; height: 42px !important; box-sizing: border-box !important;}

/* AÇÕES / BOTÕES */
.infolote-actions { display: flex !important; flex-direction: row !important; gap: 10px !important; align-items: center !important; flex: 0 0 auto !important; }
.infolote-count-badge { padding: 6px 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 13px; color: #4b5563; white-space: nowrap; height: 42px; box-sizing: border-box; display: flex; align-items: center;}
.infolote-selected-badge { padding: 6px 12px; background: #eff6ff; border: 1px solid #bfdbfe; color: #2563eb; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; height: 42px; box-sizing: border-box; display: flex; align-items: center;}
.infolote-btn-primary { background: #059669; color: #fff; border: none; padding: 0 16px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; height: 42px; box-sizing: border-box; white-space: nowrap;}
.infolote-btn-primary:hover { background: #047857; }

/* GRID E CARDS */
.infolote-main-content { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.infolote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.infolote-card { background: #fff; border: 2px solid #e5e7eb; border-radius: 12px; display: flex; flex-direction: column; transition: 0.2s; cursor: pointer;}
.infolote-card.selected { border-color: #3b82f6; background-color: #f8fafc; }
.card-status-livre { border-color: #a7f3d0; }

.infolote-card-header { padding: 16px 20px 10px; display: flex; justify-content: space-between; align-items: flex-start; }
.infolote-header-left { display: flex; gap: 12px; }
.infolote-checkbox { width: 20px; height: 20px; accent-color: #3b82f6; cursor: pointer; margin-top: 3px; }
.infolote-title-group { display: flex; flex-direction: column; }
.infolote-quadra-label { font-size: 12px; color: #9ca3af; font-weight: 600; text-transform: uppercase; }
.infolote-lote-title { font-size: 20px; font-weight: 800; color: #111827; }

.infolote-badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-status-livre { background: #d1fae5; color: #047857; }
.badge-status-vendido { background: #fee2e2; color: #b91c1c; }
.badge-status-bloqueado { background: #fef3c7; color: #b45309; }
.badge-status-reserva { background: #f3f4f6; color: #4b5563; }

.infolote-card-body { padding: 10px 20px; display: flex; flex-direction: column; gap: 8px; }
.infolote-card-footer { padding: 15px 20px; border-top: 1px solid #f3f4f6; margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.infolote-info-row { display: flex; justify-content: space-between; align-items: center; }
.infolote-info-label { font-size: 14px; color: #6b7280; }
.infolote-info-value { font-size: 14px; font-weight: 600; color: #111827; }
.vista-label { color: #059669; }
.vista-value { color: #059669; font-weight: 800; font-size: 16px; }

/* MODAIS */
.infolote-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 99999; display: none; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; backdrop-filter: blur(3px); }
.infolote-modal { background: #fff; width: 100%; max-width: 580px; border-radius: 12px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); display: flex; flex-direction: column; animation: modalIn 0.2s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.infolote-modal-header { background: #059669; padding: 15px 20px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.infolote-modal-title { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; margin: 0; line-height: 1.2; }
.infolote-modal-title span { font-size: 12px; font-weight: 500; opacity: 0.9; display: block; }
.infolote-modal-close { background: none; border: none; color: #fff; cursor: pointer; padding: 4px; display: flex; align-items: center; transition: 0.2s; border-radius: 6px; }
.infolote-modal-close:hover { background: rgba(255,255,255,0.2); }

.infolote-modal-body { padding: 20px; background: #f8fafc; }
#infolote-msg-preview { width: 100%; height: 320px; padding: 15px; border: 1px solid #e5e7eb; border-radius: 8px; font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; line-height: 1.6; color: #374151; resize: none; background: #fff; outline: none; box-sizing: border-box; }
#infolote-msg-preview:focus { border-color: #059669; box-shadow: 0 0 0 1px #059669; }

.infolote-modal-footer { padding: 15px 20px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 10px; background: #fff; }
.infolote-btn-outline { padding: 8px 16px; border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.2s; font-size: 14px; }
.infolote-btn-outline:hover { background: #f3f4f6; }
.infolote-btn-success { padding: 8px 16px; border: none; background: #059669; color: #fff; border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; font-size: 14px; }
.infolote-btn-success:hover { background: #047857; }

/* MODAL DE DETALHES */
.infolote-detail-modal { background: #f3f4f6; width: 100%; max-width: 550px; border-radius: 12px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3); display: flex; flex-direction: column; animation: modalIn 0.2s ease-out; max-height: 90vh; }
.detail-modal-header { padding: 25px 25px 20px; color: #fff; display: flex; justify-content: space-between; align-items: flex-start; transition: background 0.3s; }
.detail-header-titles { display: flex; flex-direction: column; gap: 4px; }
#dt-quadra { font-size: 14px; font-weight: 500; opacity: 0.9; }
#dt-lote { font-size: 32px; font-weight: 800; margin: 0; line-height: 1; }
#dt-uso { font-size: 13px; opacity: 0.9; margin-top: 2px; }

.detail-modal-body { padding: 20px 25px 25px; overflow-y: auto; }

/* Mudado de 3 para 2 colunas devido à remoção do Tipo */
.detail-top-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-top: -40px; margin-bottom: 20px; }
.dt-card { background: #fff; border-radius: 10px; padding: 15px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); text-align: center; }
.dt-card-val { font-size: 16px; font-weight: 800; color: #111827; }
.dt-card-lbl { font-size: 12px; color: #9ca3af; margin-top: 4px; font-weight: 500; }

.dt-price-box { background: #fff; border-radius: 10px; padding: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.02); margin-bottom: 25px; }
.dt-price-lbl { font-size: 15px; color: #4b5563; font-weight: 500; }
.dt-price-val { font-size: 20px; font-weight: 800; color: #111827; }

.dt-section-title { font-size: 13px; font-weight: 600; color: #6b7280; text-transform: uppercase; margin-bottom: 12px; letter-spacing: 0.5px; }

.dt-payment-list { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.02); display: flex; flex-direction: column; }
.dt-pay-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #f3f4f6; font-size: 14px; color: #4b5563; }
.dt-pay-row:last-child { border-bottom: none; }
.dt-pay-row strong { font-weight: 700; color: #111827; }

.dt-pay-row.highlight-green { background: #ecfdf5; color: #047857; border-bottom: 1px solid #d1fae5; }
.dt-pay-row.highlight-green strong { color: #059669; }
.dt-pay-row.highlight-blue { background: #eff6ff; color: #1d4ed8; border-bottom: 1px solid #bfdbfe; }
.dt-pay-row.highlight-blue strong { color: #2563eb; }

@media (max-width: 990px) { 
    .infolote-search-box { flex-wrap: wrap !important; } 
    .infolote-input-group { flex: 1 1 100% !important; }
}