﻿body {
    background: #f3f6fb;
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2937;
}

.consulta-page {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px;
}

.hero-consulta {
    background: linear-gradient(135deg, #005baa, #0077c8);
    color: white;
    border-radius: 18px;
    padding: 28px 32px;
    box-shadow: 0 12px 30px rgba(0, 91, 170, 0.25);
    margin-bottom: 22px;
}

    .hero-consulta h1 {
        margin: 0;
        font-size: 28px;
        font-weight: 700;
    }

    .hero-consulta p {
        margin: 8px 0 0;
        opacity: 0.95;
    }

.search-card,
.summary-card,
.timeline-section {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    margin-bottom: 18px;
}

    .search-card label {
        display: block;
        font-weight: 700;
        margin-bottom: 8px;
    }

.search-box {
    display: flex;
    gap: 10px;
}

    .search-box input {
        flex: 1;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        padding: 12px 14px;
        font-size: 15px;
        outline: none;
    }

        .search-box input:focus {
            border-color: #0077c8;
            box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.12);
        }

    .search-box button {
        border: none;
        border-radius: 10px;
        padding: 12px 18px;
        background: #005baa;
        color: white;
        font-weight: 700;
        cursor: pointer;
    }

        .search-box button:hover {
            background: #004985;
        }

.search-card small {
    display: block;
    margin-top: 8px;
    color: #6b7280;
}

.loading,
.mensaje {
    background: white;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.loading {
    color: #005baa;
    font-weight: 700;
}

.mensaje {
    color: #b91c1c;
    border-left: 5px solid #ef4444;
}

.d-none {
    display: none !important;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

    .summary-header .label {
        color: #6b7280;
        font-size: 13px;
        text-transform: uppercase;
        font-weight: 700;
    }

    .summary-header h2 {
        margin: 3px 0 0;
        color: #005baa;
        font-size: 24px;
    }

.estado-badge {
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    background: #e0f2fe;
    color: #075985;
    white-space: nowrap;
}

.estado-pendiente {
    background: #fef3c7;
    color: #92400e;
}

.estado-atendido,
.estado-finalizado {
    background: #dcfce7;
    color: #166534;
}

.estado-observado {
    background: #fee2e2;
    color: #991b1b;
}

.estado-tramite,
.estado-derivado {
    background: #dbeafe;
    color: #1e40af;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

    .summary-grid div {
        background: #f9fafb;
        border-radius: 12px;
        padding: 12px;
    }

    .summary-grid span,
    .asunto-box span {
        display: block;
        color: #6b7280;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        margin-bottom: 5px;
    }

    .summary-grid strong {
        font-size: 14px;
    }

.asunto-box {
    margin-top: 16px;
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
}

    .asunto-box p {
        margin: 0;
        line-height: 1.45;
    }

.timeline-section h3 {
    margin: 0;
    color: #005baa;
    font-size: 21px;
}

.timeline-help {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

.timeline-tree {
    margin-top: 18px;
}

.timeline-node {
    padding-left: 18px;
}

    .timeline-node::before {
        content: "";
        position: absolute;
        left: -9px;
        top: 4px;
        width: 16px;
        height: 16px;
        background: #005baa;
        border: 3px solid white;
        border-radius: 50%;
        box-shadow: 0 0 0 2px #93c5fd;
    }

.timeline-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
}

.timeline-card-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.timeline-card h4 {
    margin: 0;
    font-size: 15px;
    color: #111827;
}

.timeline-date {
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap;
}

.timeline-doc {
    color: #374151;
    font-size: 13px;
    margin: 6px 0;
}

.timeline-children {
    margin-left: 0;
}


.estado-mini {
    display: inline-block;
    margin-top: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }

    .summary-header {
        flex-direction: column;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .timeline-card-header {
        flex-direction: column;
    }
}

.expediente-form select {
    width: 120px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    background: white;
}

.expediente-form input {
    flex: 1;
}