.track-status-page,
.track-status-page * {
    box-sizing: border-box;
}

.track-status-page {
    background: #f0f7fa;
    color: #223044;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.track-status-shell {
    padding: 20px 0 35px;
}

.track-status-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
    gap: 25px;
}

.track-status-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.track-status-card h1 {
    font-size: 30px;
    font-weight: 800;
    color: #0b4c68;
    margin: 0 0 8px;
    line-height: 1.25;
    letter-spacing: -0.015em;
    text-transform: none;
}

.track-status-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #496785;
    margin: 0 0 24px;
}

.track-status-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.track-status-group {
    display: flex;
    flex-direction: column;
}

.track-status-group label {
    font-weight: 700;
    color: #0b4c68;
    font-size: 14px;
    margin-bottom: 6px;
}

.track-status-group input {
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14.5px;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.2s ease;
    width: 100%;
}

.track-status-group input:focus {
    border-color: #0b4c68;
    box-shadow: 0 0 0 3px rgba(11, 76, 104, 0.1);
    background: #ffffff;
    outline: none;
}

.track-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
}

.track-status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-status-item label {
    font-weight: 700;
    color: #64748b;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.track-status-item span {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    word-wrap: break-word;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}

.bank-details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.bank-details-table td {
    padding: 8px 0;
    border: 0;
    vertical-align: top;
}

.bank-details-table td.label-col {
    font-weight: 700;
    color: #64748b;
    width: 35%;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status stage styling in custom CSS */
.status-stage-0 {
    background: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
}

.status-stage-1 {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5 !important;
}

.status-stage-2 {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
}

.status-stage-3 {
    background: #f3e8ff !important;
    color: #7e22ce !important;
    border: 1px solid #e9d5ff !important;
}

.status-stage-4 {
    background: #d1fae5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
}

.status-stage-5 {
    background: #e0f2fe !important;
    color: #0b4c68 !important;
    border: 1px solid #bae6fd !important;
}

/* Status text colors in custom CSS */
.color-stage-0 { color: #d97706 !important; }
.color-stage-1 { color: #dc2626 !important; }
.color-stage-2 { color: #0369a1 !important; }
.color-stage-3 { color: #7e22ce !important; }
.color-stage-4 { color: #059669 !important; }
.color-stage-5 { color: #0b4c68 !important; }

.track-status-side {
    padding: 24px;
}

.track-status-error {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 6px;
    background: #fff1f2;
    color: #b91c1c;
    border: 1px solid #fecdd3;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header layout */
.track-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 18px;
    margin-bottom: 24px;
    gap: 16px;
}

/* Timeline Styling */
.timeline-wrapper {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.timeline-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

/* Style the scrollbar to make it look premium and clean */
.timeline-scroll-container::-webkit-scrollbar {
    height: 6px;
}
.timeline-scroll-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}
.timeline-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
.timeline-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.tracking-timeline-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 10px;
}

.timeline-line {
    position: absolute;
    top: 12px;
    left: 14px;
    right: 14px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

.timeline-fill {
    height: 100%;
    background: #0b4c68;
    transition: width 0.5s;
}

.timeline-step {
    text-align: center;
    z-index: 2;
    width: 15%;
}

.timeline-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    margin: 0 auto;
    flex-shrink: 0;
}

.timeline-label {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

/* Active / Inactive states */
.timeline-circle.circle-active {
    background: #0b4c68;
    border: 2px solid #0b4c68;
    color: #fff;
}

.timeline-circle.circle-inactive {
    background: #fff;
    border: 2px solid #cbd5e1;
    color: #64748b;
}

.timeline-circle.circle-rejected {
    background: #dc2626;
    border: 2px solid #dc2626;
    color: #fff;
}

.timeline-label.label-active {
    color: #0f172a;
}

.timeline-label.label-inactive {
    color: #64748b;
}

.timeline-label.label-rejected {
    color: #dc2626;
}

/* Grid layout inside Action Required box */
.payment-info-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* Consent Form download template box */
.consent-download-box {
    margin-bottom: 25px;
    padding: 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

/* Grid spanning utility class */
.grid-span-2 {
    grid-column: span 2;
}

@media (max-width: 991px) {
    .track-status-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .track-status-card,
    .track-status-side {
        padding: 22px;
    }

    .track-status-card h1 {
        font-size: 26px;
    }

    .track-status-grid {
        grid-template-columns: 1fr;
    }

    /* Timeline horizontal scroll settings on mobile */
    .timeline-wrapper {
        padding: 16px 12px;
    }

    .tracking-timeline-bar {
        min-width: 750px;
        margin-bottom: 5px;
    }

    .tracking-timeline-bar-rejected {
        min-width: 400px;
    }

    /* Payment and download layout overrides */
    .payment-info-grid {
        grid-template-columns: 1fr;
    }

    /* Grid span override */
    .grid-span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 575px) {
    .track-status-form-row {
        grid-template-columns: 1fr;
    }

    /* Header layout mobile overrides */
    .track-status-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        text-align: center;
    }

    .track-status-header h1 {
        font-size: 20px !important;
    }

    .track-status-header .sj-btn {
        width: 100%;
    }

    /* Consent form template container mobile overrides */
    .consent-download-box {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .consent-download-box h4,
    .consent-download-box p {
        text-align: center !important;
    }

    .consent-download-box a {
        width: 100%;
        justify-content: center;
    }

    /* Verification Form button overrides */
    form button[type="submit"] {
        width: 100% !important;
    }
}

.upi-mobile-btn {
    display: none !important;
}
.upi-desktop-box {
    display: flex !important;
}

@media (max-width: 768px) {
    .upi-mobile-btn {
        display: flex !important;
    }
    .upi-desktop-box {
        display: none !important;
    }
}
