/* ==========================================
   SISTEMA DE COBERTURA TERRITORIAL - BOMBEIROS GO
   Estilos Comuns - Design Moderno (Tema Claro)
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f7fa;
    color: #2d3748;
}

/* ========== HEADER ========== */
header {
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    border-bottom: 3px solid #8b1428;
    color: white;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 20px rgba(196, 30, 58, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    flex: 1;
    letter-spacing: -0.01em;
}

.btn-voltar {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-voltar:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-4px);
}

/* ========== SIDEBAR ========== */
.sidebar {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
}

/* ========== CARDS E PAINÉIS ========== */
.info-card,
.info-panel,
.legend,
.coord-input-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.info-card:hover,
.info-panel:hover {
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.1);
    border-color: rgba(196, 30, 58, 0.2);
}

.info-card h2,
.info-card h3,
.info-panel h2,
.legend h3 {
    color: #c41e3a;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ========== STATS BAR ========== */
.stats-bar,
.stats {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.stat-item {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ed 100%);
    border: 1px solid rgba(196, 30, 58, 0.15);
    border-radius: 12px;
}

.stat-value {
    color: #c41e3a;
    font-weight: 700;
}

.stat-label {
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========== INPUTS ========== */
input[type="text"],
input[type="number"],
select,
textarea {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #2d3748;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: #c41e3a;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #a0aec0;
}

/* ========== BUTTONS ========== */
button,
.btn {
    background: #ffffff;
    color: #c41e3a;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

button:hover,
.btn:hover {
    background: #f7fafc;
    border-color: #c41e3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.15);
}

button:active,
.btn:active {
    transform: translateY(0);
}

button.btn-primary {
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    color: #ffffff;
    border: none;
}

button.btn-primary:hover {
    background: linear-gradient(135deg, #d4264a 0%, #c41e3a 100%);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

button.btn-success {
    background: #27ae60;
    color: #ffffff;
    border: none;
}

button.btn-success:hover {
    background: #2ecc71;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

button.btn-danger {
    background: #e74c3c;
    color: #ffffff;
    border: none;
}

button.btn-danger:hover {
    background: #ec7063;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* ========== LISTAS ========== */
.bairro-item,
.recomendacao-item {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.bairro-item:hover,
.recomendacao-item:hover {
    background: #f7fafc;
    border-left: 3px solid #c41e3a;
}

.bairro-item.selected,
.recomendacao-item.selected {
    background: #fff5f7;
    border-left: 4px solid #c41e3a;
}

.bairro-item.has-coords {
    background: #f0fdf4;
    border-left: 3px solid #27ae60;
}

.bairro-item.has-coords:hover {
    background: #dcfce7;
}

.bairro-item.no-coords {
    opacity: 0.6;
    background: #fafafa;
}

.bairro-nome,
.recomendacao-nome {
    color: #2d3748;
    font-weight: 600;
}

.bairro-info {
    color: #718096;
}

/* ========== BADGES ========== */
.badge,
.card-category {
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    line-height: 1;
}

.badge-proxima,
.badge-rapida {
    background: #059669;
    color: white;
}

.badge-atual {
    background: #d97706;
    color: white;
}

.badge-calculando {
    background: #2563eb;
    color: white;
}

/* ========== SCROLLBARS ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f7fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c41e3a;
}

/* ========== COORDENADAS DISPLAY ========== */
.coords-display {
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

.coords-display.has-coords {
    color: #059669;
    font-weight: 600;
}

.coords-display.no-coords {
    color: #d97706;
    font-weight: 600;
}

/* ========== DISTÂNCIAS/TEMPO ========== */
.distancia-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.distancia-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--obm-color, #cbd5e0);
    transition: background 0.3s ease;
}

.distancia-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e0;
}

.distancia-item.mais-proxima,
.distancia-item.mais-rapida {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}

.distancia-item.mais-proxima::before,
.distancia-item.mais-rapida::before {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
}

.distancia-item.atual {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
}

.distancia-item.atual::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.distancia-item.calculando {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
    opacity: 0.9;
}

.distancia-item.calculando::before {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.obm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.obm-nome {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.obm-info {
    text-align: right;
    flex-shrink: 0;
    min-width: fit-content;
}

.obm-distancia {
    font-weight: 700;
    font-size: 1rem;
    color: #3b82f6;
    line-height: 1;
    white-space: nowrap;
}

.distancia-item.mais-proxima .obm-distancia,
.distancia-item.mais-rapida .obm-distancia {
    color: #16a34a;
}

.distancia-item.atual .obm-distancia {
    color: #d97706;
}

.obm-tempo {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* ========== NO DATA ========== */
.no-data {
    color: #94a3b8;
    text-align: center;
    padding: 3rem 2rem;
    font-size: 0.95rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.25rem;
    }

    .btn-voltar {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}
