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

:root {
    --navy: #003366;
    --gold: #C8A84B;
    --gold-light: #e8c96a;
    --white: #fff;
    --gray: #f4f6f9;
    --text: #1a1a2e;
    --muted: #6b7280;
    --green: #16a34a;
    --red: #dc2626;
    --orange: #ea580c;
    --blue: #2563eb;
}

body {
    font-family: 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--gray);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
}

/* NAV */
nav {
    background: var(--navy);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.nav-brand img {
    height: 36px;
}

.nav-brand-text {
    color: var(--white);
}

.nav-brand-text strong {
    display: block;
    font-size: 1rem;
    letter-spacing: .5px;
}

.nav-brand-text small {
    font-size: .72rem;
    color: rgba(255, 255, 255, .6);
    letter-spacing: .3px;
}

.nav-back {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: color .2s;
}

.nav-back:hover {
    color: var(--gold);
}

/* HERO STRIP */
.hero-strip {
    background: linear-gradient(135deg, var(--navy) 0%, #00509e 100%);
    color: var(--white);
    padding: 2.5rem 2rem;
    text-align: center;
}

.hero-strip h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: .5rem;
}

.hero-strip h1 span {
    color: var(--gold);
}

.hero-strip p {
    font-size: .92rem;
    color: rgba(255, 255, 255, .75);
    max-width: 520px;
    margin: 0 auto;
}

/* SEARCH CARD */
.search-wrap {
    max-width: 600px;
    margin: -2rem auto 2rem;
    padding: 0 1rem;
}

.search-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 51, 102, .12);
}

.search-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.form-group label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--navy);
}

.form-group input {
    padding: .65rem .9rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: .9rem;
    color: var(--text);
    transition: border-color .2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--navy);
}

.btn-search {
    width: 100%;
    background: var(--navy);
    color: var(--white);
    font-weight: 700;
    font-size: .95rem;
    padding: .8rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: background .2s;
}

.btn-search:hover {
    background: #00509e;
}

.btn-search .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* RESULT AREA */
.result-wrap {
    max-width: 860px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

/* NOT FOUND */
.not-found {
    background: var(--white);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.not-found .nf-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.not-found h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .5rem;
}

.not-found p {
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.6;
}

/* RESULT CARD */
.result-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 51, 102, .1);
    overflow: hidden;
    animation: fadeUp .4s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    background: var(--navy);
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-header-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: .25rem;
}

.result-header-info span {
    font-size: .82rem;
    color: rgba(255, 255, 255, .65);
}

.result-ref {
    background: rgba(200, 168, 75, .2);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: .82rem;
    font-weight: 700;
    padding: .35rem .9rem;
    border-radius: 20px;
    letter-spacing: .5px;
}

/* STEPPER */
.stepper-wrap {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.stepper-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.stepper {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    border: 3px solid #e5e7eb;
    background: var(--white);
    color: #d1d5db;
    transition: all .3s;
    position: relative;
}

.step-name {
    font-size: .72rem;
    font-weight: 600;
    color: #d1d5db;
    margin-top: .6rem;
    text-align: center;
    max-width: 70px;
    line-height: 1.3;
    transition: color .3s;
}

.step-date {
    font-size: .68rem;
    color: var(--muted);
    margin-top: .2rem;
    text-align: center;
}

/* step states */
.step.done .step-circle {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
}

.step.done .step-name {
    color: #374151;
}

.step.active .step-circle {
    background: var(--navy);
    border-color: var(--gold);
    color: var(--white);
    box-shadow: 0 0 0 5px rgba(200, 168, 75, .25);
    animation: pulse 2s infinite;
}

.step.active .step-name {
    color: var(--navy);
    font-weight: 800;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 5px rgba(200, 168, 75, .25);
    }

    50% {
        box-shadow: 0 0 0 9px rgba(200, 168, 75, .1);
    }
}

.step.rejected .step-circle {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.step.rejected .step-name {
    color: var(--red);
    font-weight: 800;
}

.step.pending-step .step-circle {
    background: var(--white);
    border-color: #e5e7eb;
    color: #d1d5db;
}

.step.pending-step .step-name {
    color: #d1d5db;
}

/* progress line fill */
.stepper-progress {
    position: absolute;
    top: 20px;
    left: 20px;
    height: 3px;
    background: var(--green);
    z-index: 0;
    transition: width .6s ease;
}

/* STATUS BADGE */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem 1rem;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 700;
}

.badge-pendente {
    background: #fef9c3;
    color: #854d0e;
}

.badge-submetido {
    background: #dbeafe;
    color: #1e40af;
}

.badge-analise {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-aprovado {
    background: #dcfce7;
    color: #15803d;
}

.badge-reprovado {
    background: #fee2e2;
    color: #991b1b;
}

.badge-desembolsado {
    background: #d1fae5;
    color: #065f46;
}

/* DETAIL BODY */
.detail-body {
    padding: 1.5rem 2rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    background: var(--gray);
    border-radius: 8px;
    padding: 1rem;
}

.detail-item label {
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    display: block;
    margin-bottom: .3rem;
}

.detail-item span {
    font-size: .9rem;
    font-weight: 600;
    color: var(--navy);
}

/* NEXT STEPS / ALERT */
.info-box {
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-box .ib-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.info-box h4 {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: .4rem;
}

.info-box p,
.info-box ul {
    font-size: .85rem;
    line-height: 1.65;
    color: var(--muted);
}

.info-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.info-box ul li::before {
    content: '→ ';
    color: var(--gold);
    font-weight: 700;
}

.ib-blue {
    background: #eff6ff;
    border-left: 4px solid var(--blue);
}

.ib-blue h4 {
    color: var(--blue);
}

.ib-green {
    background: #f0fdf4;
    border-left: 4px solid var(--green);
}

.ib-green h4 {
    color: var(--green);
}

.ib-red {
    background: #fff5f5;
    border-left: 4px solid var(--red);
}

.ib-red h4 {
    color: var(--red);
}

.ib-orange {
    background: #fff7ed;
    border-left: 4px solid var(--orange);
}

.ib-orange h4 {
    color: var(--orange);
}

.ib-gold {
    background: #fffbf0;
    border-left: 4px solid var(--gold);
}

.ib-gold h4 {
    color: #92400e;
}

/* TIMELINE */
.timeline-title {
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tl-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1.25rem;
    position: relative;
}

.tl-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.tl-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.tl-dot.done {
    background: #dcfce7;
    border-color: var(--green);
    color: var(--green);
}

.tl-dot.active {
    background: #dbeafe;
    border-color: var(--blue);
    color: var(--blue);
}

.tl-dot.future {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #d1d5db;
}

.tl-content strong {
    font-size: .88rem;
    color: var(--navy);
    display: block;
    margin-bottom: .2rem;
}

.tl-content span {
    font-size: .78rem;
    color: var(--muted);
}

/* FOOTER */
footer {
    background: #001a33;
    color: rgba(255, 255, 255, .45);
    text-align: center;
    padding: 1.5rem;
    font-size: .8rem;
}

footer strong {
    color: var(--gold);
}

/* RESPONSIVE */
@media(max-width:640px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .result-header {
        flex-direction: column;
    }

    .step-name {
        font-size: .65rem;
        max-width: 55px;
    }

    .step-circle {
        width: 34px;
        height: 34px;
        font-size: .75rem;
    }

    .stepper::before {
        top: 17px;
    }

    .stepper-progress {
        top: 17px;
    }
}
