:root {
    --primary-color: #0092CD;
    --primary-dark: #0076a5;
    --bg-gray: #f5f5f5;
    --text-bold: #333;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #fff;
    color: #444;
}

.bold {
    font-weight: 700 !important;
}

/* Header & Hero */
.logo-main {
    max-height: 80px;
}

.hero-title-ci3 {
    font-weight: 800;
    color: var(--text-bold);
    font-size: 2.2rem;
    line-height: 1.2;
}

.hero-subtitle-ci3 {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
}

/* WhatsApp Rectangle (from CI3) */
.rectangulo-whatsapp {
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 146, 205, 0.2);
}

.whatsapp-qr-bg {
    background: #fff;
    padding: 5px;
    border-radius: 10px;
    display: inline-block;
}

.whatsapp-qr-bg img, .whatsapp-qr-bg svg {
    max-width: 90px;
    height: auto;
    display: block;
}

/* Form Controls */
.form-control {
    background-color: #f6f7f9 !important;
    border: 1px solid #dce0e7 !important;
    border-radius: 10px !important;
    padding: 12px 15px !important;
    transition: all 0.2s ease;
    color: #333 !important;
}

.form-control:focus {
    background-color: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 146, 205, 0.1) !important;
}

.form-control.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

/* Selects */
.form-select {
    background-color: #f6f7f9 !important;
    border: 1px solid #dce0e7 !important;
    border-radius: 10px !important;
    padding: 10px 15px !important;
    transition: all 0.2s ease;
    color: #333 !important;
}

.form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 146, 205, 0.1) !important;
    background-color: #fff !important;
}

/* ===================================
   FILE PICKER CUSTOM (en español)
   =================================== */
.file-picker-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f6f7f9;
    border: 1px dashed #c8cdd6;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    user-select: none;
}

.file-picker-custom:hover {
    border-color: var(--primary-color);
    background: #f0faff;
}

.file-picker-custom.has-file {
    border-style: solid;
    border-color: #a8d5b5;
    background: #f3fbf6;
}

.file-picker-custom.is-invalid-box {
    border-color: #dc3545;
    background: #fff8f8;
}

.file-picker-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #e8eaee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.1rem;
    overflow: hidden;
}

.file-preview-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
}

.file-picker-text {
    flex: 1;
    min-width: 0;
}

.file-placeholder {
    font-size: 0.88rem;
    color: #999;
}

.file-name {
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.file-hint {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 2px;
}

.file-btn-label {
    flex-shrink: 0;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border-radius: 10px !important;
    padding: 10px 25px !important;
    font-weight: 600 !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark) !important;
}

/* Step Indicator CI3 */
.step-container-ci3 {
    margin-top: 40px;
}

.step-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid #ddd;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #999;
    flex-shrink: 0;
}

.step-circle.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.step-circle.completed {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.step-text {
    font-size: 1.1rem;
    color: var(--text-bold);
    line-height: 1.2;
}

.step-disabled {
    opacity: 0.5;
}

.line {
    height: 3px;
    background-color: #eee;
    flex-grow: 1;
}

/* Category Cards */
.cardWhite {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0px 1px 4px rgba(0,0,0,0.05);
}

.cardWhite:hover {
    box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
}

.cardWhite.selected {
    border-color: var(--primary-color) !important;
    border-width: 2px !important;
    background-color: #f0faff;
}

.cardWhite i, .cardWhite svg {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h5 { font-size: 1.1rem; }
    
    .card-categoria {
        padding: 10px !important;
    }
    
    .card-categoria i {
        font-size: 20px !important;
    }
    
    .card-categoria span {
        font-size: 11px !important;
    }

    .cardWhite {
        padding: 10px !important;
        min-height: auto !important;
    }

    .cardWhite i {
        font-size: 18px !important;
    }

    .cardWhite p {
        font-size: 10px !important;
        line-height: 1 !important;
    }

    .main-map {
        height: 350px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .step-label {
        font-size: 12px !important;
        text-align: center;
    }
    
    .rectangulo-whatsapp {
        padding: 20px !important;
    }
}

.radius20 { border-radius: 20px; }
.bold { font-weight: 700; }
.opacity-75 { opacity: 0.75; }
.lh-sm { line-height: 1.25; }

/* ===================================
   METRICAS — RESPONSIVE MOBILE
   =================================== */
.metricas-section {
    margin: 28px 0;
}

@media (max-width: 767px) {
    .metricas-section h1 {
        font-size: 1.6rem !important;
        margin-bottom: 4px !important;
    }

    .metricas-section .fa-solid {
        font-size: 1.1rem !important;
    }

    .metricas-section small {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }

    .metricas-section .p-2 {
        padding: 8px 4px !important;
    }
}

/* ===================================
   MAPA — HEADER PREMIUM
   =================================== */
.mapa-section {
    margin-bottom: 40px;
}

.mapa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.mapa-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: live-pulse 1.8s infinite;
    flex-shrink: 0;
}

@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.live-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #22c55e;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.3);
    padding: 2px 8px;
    border-radius: 20px;
}

.mapa-filter-group {
    display: flex;
    align-items: center;
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px 10px;
}

.mapa-filter-select {
    border: none;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 500;
    color: #555;
    outline: none;
    padding: 3px 4px;
    max-width: 200px;
    cursor: pointer;
}

@media (max-width: 767px) {
    .mapa-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mapa-filter-group {
        width: 100%;
    }

    .mapa-filter-select {
        max-width: 100%;
        flex: 1;
    }

    .metrica-num {
        font-size: 1.6rem;
    }

    .metrica-icon-wrap {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

/* Desktop optimizations */
@media (min-width: 992px) {
    .container-fluid {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Maps */
#maps_street {
    border-radius: 20px;
    border: 1px solid #eee;
}

.main-map {
    height: 500px;
    z-index: 1;
}

.custom-leaflet-icon {
    background: transparent;
    border: none;
}

.custom-marker .fa-stack {
    font-size: 12px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.custom-marker i.fa-stack-1x {
    /* Color dinámico aplicado via style */
}

.map-container-step {
    height: 400px;
    border-radius: 15px;
}

/* Layout */
.radius20 {
    border-radius: 20px;
}

.cardBlanco {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
}

/* ===================================
   STEP INDICATOR — MOBILE COMPACT
   =================================== */
.step-circle-sm {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2.5px solid #ddd;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: #bbb;
    flex-shrink: 0;
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.step-circle-sm.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.step-circle-sm.completed {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.step-line-sm {
    flex: 1;
    height: 2.5px;
    background-color: #e0e0e0;
    transition: background-color 0.4s ease;
    margin: 0 6px;
}

.step-line-sm.done {
    background-color: var(--primary-color);
}

.badge-step-label {
    display: inline-block;
    background: #f0faff;
    color: var(--primary-color);
    border: 1px solid #c8e9f7;
    border-radius: 20px;
    padding: 5px 18px;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ===================================
   MOBILE FORM CARD ADJUSTMENTS
   =================================== */
@media (max-width: 767px) {
    .cardBlanco {
        padding: 18px 14px !important;
        border-radius: 16px !important;
    }

    .step-container-ci3 {
        margin-top: 20px;
    }

    #reportar-ahora {
        margin-top: 24px !important;
        padding-top: 0 !important;
    }
}
