.home-analyze-results {
    scroll-margin-top: 90px;
}

#loaderPanel {
    position: fixed;
    inset: 0;
    z-index: 10000;
    width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    align-items: center;
    justify-content: center;
    background: rgba(237, 244, 249, 0.86);
    backdrop-filter: blur(4px);
    pointer-events: all;
}

#loaderPanel:not(.d-none) {
    display: flex !important;
}

#loaderPanel > .col-12 {
    width: 100%;
}

body.analyze-loading-active {
    overflow: hidden;
}

.upload-section #dropZone,
.upload-section #browseLink,
.upload-section #analyseNowBtn {
    cursor: pointer;
}

.upload-section #analyseNowBtn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.upload-section .upload-card {
    border-radius: 20px;
    background: #fffdf9;
    box-shadow: 0 18px 38px rgba(31, 41, 55, 0.07);
    padding: clamp(20px, 3vw, 30px);
}

.upload-section .upload-title {
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.18;
}

.upload-section .drop-zone {
    position: relative;
    border: 2px dashed #d8cbbb;
    border-radius: 16px;
    background: #fffdf9;
    padding: clamp(76px, 10vw, 104px) 20px 28px;
    text-align: center;
}

.upload-section .drop-zone::before {
    content: "\f477";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 24px;
    left: 50%;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1d2a3;
    color: #9a5b18;
    font-family: "Font Awesome 6 Free";
    font-size: 19px;
    font-weight: 900;
    transform: translateX(-50%);
}

.upload-section .drop-zone p {
    color: #1e2430;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 700;
    margin-bottom: 8px;
}

.upload-section .drop-zone span {
    color: #0f7f92;
    cursor: pointer;
    text-decoration: underline;
}

.upload-section .file-types {
    color: #7b7166;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.upload-section .upload-btn {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, #199e82, #206785);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    margin-top: 20px;
    min-height: 50px;
    padding: 0 22px;
}

.upload-file-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.upload-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.upload-file-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(25, 158, 130, 0.1);
    color: #177965;
}

.upload-file-info {
    flex: 1;
    min-width: 0;
}

.upload-file-name,
.upload-file-size {
    margin: 0;
}

.upload-file-name {
    overflow: hidden;
    color: #101828;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-file-size {
    color: #667085;
    font-size: 13px;
}

.upload-file-remove {
    border: 0;
    background: transparent;
    color: #667085;
}

.home-analyze-results .upload-outer-box,
.analyze-page .upload-outer-box {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 14px 32px rgba(16, 24, 40, 0.07);
}

.home-analyze-results .analyze-document-card,
.analyze-page .analyze-document-card {
    max-width: 780px;
    margin: 0 auto;
    overflow: hidden;
}

.home-analyze-results .analyze-comparison-card,
.analyze-page .analyze-comparison-card {
    overflow: hidden;
}

.home-analyze-results .row.d-none {
    display: none !important;
}

.analyze-result-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid #eee8dc;
    padding: 18px 24px;
}

.analyze-result-head h5 {
    margin: 0 0 4px;
    color: #1e2430;
    font-family: inherit;
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 700;
}

.analyze-result-head p {
    margin: 0;
    color: #667085;
    font-size: 14px;
}

.analyze-result-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.analyze-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e5f4f1;
    color: #168d7a;
    font-size: 18px;
}

.analyze-doc-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    background: #f3e7d7;
    color: #9a5b18;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.analyze-count-badge {
    align-self: flex-start;
    border: 1px solid #d8cbbb;
    border-radius: 999px;
    padding: 5px 10px;
    color: #5a5147;
    background: #f7f1e8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.analyze-section-label {
    padding: 18px 24px 8px;
    color: #8b8175;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.analyze-items-list {
    display: grid;
    gap: 12px;
    padding: 0 24px;
}

.analyze-item-row,
.analyze-rec-card {
    background: #fff;
}

.analyze-item-row {
    display: grid;
    grid-template-columns: minmax(88px, 112px) 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    background: #fffdf9;
    padding: 14px 16px;
}

.analyze-code {
    justify-self: start;
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.analyze-code.has-cpt {
    background: #e5f4f1;
    color: #168d7a;
}

.analyze-code.no-cpt {
    background: #fff1d6;
    color: #a15c00;
}

.analyze-item-description {
    color: #2d3037;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.analyze-item-row > strong {
    color: #2d3037;
    font-size: 15px;
    white-space: nowrap;
}

.analyze-muted {
    color: #667085;
}

.analyze-italic {
    font-style: italic;
}

.analyze-total-row {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #efe7dc;
    margin: 0 24px;
    padding: 16px 0;
    color: #70685f;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.analyze-total-row strong {
    color: #168d7a;
    font-family: inherit;
    font-size: 22px;
    letter-spacing: 0;
    line-height: 1;
}

.analyze-compare-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: end;
    background: #f7f1e8;
    border-top: 1px solid #eee2d2;
    padding: 16px 24px;
}

.analyze-zip-field {
    border: 1px solid #d8cbbb;
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px;
}

.analyze-zip-field label {
    font-weight: 800;
}

.analyze-zip-field .tcc-dropdown {
    top: calc(100% - 4px);
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
    z-index: 1001;
}

.analyze-radius-field {
    display: grid;
    gap: 6px;
}

.analyze-radius-field label {
    color: #5f574f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.analyze-radius-field select {
    min-height: 46px;
    border: 1px solid #d8cbbb;
    border-radius: 12px;
    background: #fff;
    color: #1e2430;
    font-weight: 700;
    padding: 0 12px;
}

.analyze-radius-field.compact {
    min-width: 108px;
}

.analyze-radius-field.compact select {
    min-height: 36px;
    border-radius: 8px;
    font-size: 13px;
}

.analyze-result-tools {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.analyze-actions-row {
    display: grid;
    gap: 12px;
    padding: 16px 24px 24px;
}

.analyze-actions-row .analyse-now-btn {
    width: 100%;
}

.analyze-reset-btn {
    border: 1px solid #d8cbbb;
    border-radius: 999px;
    background: #fff;
    color: #5f574f;
    font-weight: 800;
    min-height: 46px;
}

.analyze-loader-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 110px;
}

.analyze-loader-box .loader-spinner {
    flex: 0 0 auto;
}

.analyze-loader-box p {
    margin: 0;
    font-weight: 600;
}

.analyze-loader-card {
    width: min(460px, calc(100vw - 32px));
    max-width: 460px;
    margin: 0 auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.18);
    padding: clamp(28px, 4vw, 42px) clamp(24px, 4vw, 38px);
    text-align: center;
}

.analyze-loader-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(25, 158, 130, 0.12);
    color: #199e82;
    font-size: 25px;
    margin-bottom: 24px;
}

.analyze-loader-card h2 {
    margin: 0;
    color: #182230;
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 800;
}

.analyze-loader-sub {
    margin: 6px 0 28px;
    color: #667085;
    font-size: 15px;
}

.analyze-loader-steps {
    display: grid;
    gap: 13px;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 430px;
    text-align: left;
}

.analyze-loader-steps li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #667085;
    font-size: clamp(14px, 2.4vw, 16px);
    font-weight: 600;
    animation: analyzeFadeUp 0.28s ease both;
}

.analyze-loader-steps li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e7edf5;
}

.analyze-loader-steps li.done {
    color: #199e82;
}

.analyze-loader-steps li.done span {
    background: #199e82;
    color: #fff;
}

.analyze-loader-steps li.done span::before {
    content: "\2713";
    font-size: 15px;
    font-weight: 900;
}

.analyze-loader-steps li.active {
    color: #182230;
}

.analyze-loader-steps li.active span {
    box-shadow: 0 0 0 12px rgba(25, 158, 130, 0.1);
    background: #199e82;
    animation: analyzeBlink 1.1s ease-in-out infinite;
}

.analyze-loader-steps li.pending span {
    background: #e7edf5;
}

.analyze-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4e7ec;
    margin: 30px auto 0;
    width: min(425px, 100%);
}

.analyze-progress-fill {
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #199e82, #206785);
    animation: analyzeProgress 1.45s ease-in-out infinite;
}

.analyze-error-box {
    border: 1px solid #fecdca;
    border-radius: 8px;
    background: #fffbfa;
    color: #b42318;
    padding: 14px 16px;
}

.analyze-table-wrap {
    overflow-x: auto;
    padding: 0 18px 20px;
}

.analyze-gfe-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 860px;
}

.analyze-gfe-table th,
.analyze-gfe-table td {
    border-bottom: 1px solid #eee8dc;
    padding: 12px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.analyze-gfe-table th {
    background: #f7f1e8;
    color: #7b7166;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.analyze-gfe-highlight td {
    background: #fff6e9;
    border-bottom: 3px solid #c97822;
    color: #b36413;
    font-weight: 700;
}

.analyze-gfe-total {
    background: #edf8f4;
    color: #168d7a;
}

.analyze-gfe-total strong {
    font-size: 16px;
}

.analyze-bill-results {
    display: grid;
    gap: 0;
}

.analyze-bill-table {
    margin: 0 18px 20px;
    overflow-x: auto;
}

.analyze-bill-head,
.analyze-bill-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(90px, 0.7fr) minmax(120px, 1fr) minmax(180px, 1.2fr) 104px;
    gap: 12px;
    align-items: center;
    min-width: 800px;
}

.analyze-bill-head {
    background: #f7f1e8;
    color: #7b7166;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 12px 14px;
    text-transform: uppercase;
}

.analyze-bill-row {
    border-bottom: 1px solid #eee8dc;
    background: #fff;
    padding: 14px;
    font-size: 14px;
}

.analyze-mobile-label {
    display: none;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
    text-transform: uppercase;
}

.analyze-price-bar {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: #d0d5dd;
}

.analyze-price-bar-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #12b76a, #f79009);
}

.analyze-price-marker {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 16px;
    border-radius: 999px;
    background: #f04438;
}

.analyze-price-labels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    color: #7b7166;
    font-size: 11px;
    font-weight: 700;
}

.analyze-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    min-width: 86px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.analyze-status.ok {
    background: #ecfdf3;
    color: #027a48;
}

.analyze-status.moderate {
    background: #fffaeb;
    color: #b54708;
}

.analyze-status.high {
    background: #fef3f2;
    color: #b42318;
}

.analyze-procedure-block {
    display: grid;
    gap: 3px;
}

.analyze-procedure-block strong {
    color: #242830;
    font-size: 14px;
}

.analyze-procedure-block span {
    color: #667085;
    font-size: 12px;
}

.analyze-recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    padding: 0 18px 20px;
}

.analyze-rec-card {
    border: 2px solid #168d7a;
    border-radius: 14px;
    box-shadow: 0 12px 22px rgba(22, 141, 122, 0.1);
    padding: 16px;
}

.analyze-rec-card h6 {
    margin: 0 0 8px;
    color: #242830;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
}

.analyze-rec-card > strong {
    color: #168d7a;
    display: block;
    font-family: inherit;
    font-size: 20px;
    line-height: 1.1;
    margin-bottom: 8px;
}

.analyze-best-price {
    display: inline-flex;
    border-radius: 999px;
    background: #e5f4f1;
    color: #168d7a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    padding: 5px 10px;
    text-transform: uppercase;
}

.analyze-rec-procedures {
    display: grid;
    gap: 6px;
    border-top: 1px solid #eaecf0;
    margin-top: 12px;
    padding-top: 10px;
}

.analyze-rec-procedures div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #667085;
    font-size: 13px;
}

.analyze-rec-procedures span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analyze-rec-procedures strong {
    color: #344054;
    white-space: nowrap;
}

@keyframes analyzeFadeUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes analyzeBlink {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.85);
    }
    50% {
        opacity: 1;
        transform: scale(1.18);
    }
}

@keyframes analyzeProgress {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(230%);
    }
}

@media (max-width: 768px) {
    #loaderPanel {
        padding: 16px;
    }

    .analyze-loader-card {
        border-radius: 20px;
    }

    .analyze-result-head,
    .analyze-compare-row,
    .analyze-item-row,
    .analyze-bill-row {
        grid-template-columns: 1fr;
    }

    .analyze-result-head {
        display: grid;
    }

    .analyze-result-title {
        align-items: flex-start;
    }

    .analyze-count-badge {
        justify-self: start;
    }

    .analyze-section-label,
    .analyze-items-list,
    .analyze-result-head,
    .analyze-compare-row,
    .analyze-actions-row {
        padding-left: 18px;
        padding-right: 18px;
    }

    .analyze-total-row {
        justify-content: space-between;
        margin-left: 18px;
        margin-right: 18px;
    }

    .analyze-item-description {
        text-align: left;
    }

    .analyze-bill-head {
        display: none;
    }

    .analyze-bill-row {
        min-width: 0;
    }

    .analyze-mobile-label {
        display: inline;
    }

    .analyze-gfe-table th,
    .analyze-gfe-table td {
        padding: 10px;
        font-size: 13px;
    }

    .analyze-loader-box {
        align-items: flex-start;
        justify-content: flex-start;
    }
}
