/* ================= LOCAL PAGE STYLES ================= */
:root {
    --track-brand-main: #e53e3e;
    --track-brand-dark: #0f294d;
    --track-bg-light: #F8FAFC;
    --track-text-main: #1E293B;
    --track-text-muted: #64748B;
    --track-success: #10B981;
    --track-warning: #F59E0B;
    --track-danger: #EF4444;
    --track-info: #3B82F6;
    --track-gold: #D97706;
}

.track-main-wrapper {
    background-color: var(--track-bg-light);
    min-height: 75vh;
    padding-bottom: 60px;
}

.track-hero {
    background: linear-gradient(135deg, var(--track-brand-dark) 0%, #1e1b4b 100%);
    padding: 75px 20px 65px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.track-hero h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin: 0 0 10px; color: #fff; letter-spacing: -0.5px; }
.track-hero p { font-size: clamp(13px, 2vw, 15px); color: #cbd5e1; max-width: 650px; margin: 0 auto; line-height: 1.6; }

.track-container { max-width: 920px; margin: -35px auto 50px; padding: 0 20px; position: relative; z-index: 10; }

/* SEARCH BOX */
.search-box {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 41, 77, 0.08);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid #e2e8f0;
}
.search-input-wrap { flex: 1; min-width: 240px; position: relative; }
.search-input-wrap i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 16px; transition: 0.3s; }
.search-box input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14.5px;
    font-family: inherit;
    font-weight: 600;
    color: var(--track-text-main);
    outline: none;
    transition: 0.3s;
    box-sizing: border-box;
}
.search-box input:focus { border-color: var(--track-brand-main); box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1); }
.search-box input:focus + i, .search-input-wrap:focus-within i { color: var(--track-brand-main); }
.search-box button {
    background: linear-gradient(135deg, var(--track-brand-main), #c53030);
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.search-box button:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(229, 62, 62, 0.3); }

.captcha-strip {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #92400E;
    gap: 10px;
}

/* FORGOT TRACKING ID HELPER BAR & RECENT SEARCHES CHIPS */
.forgot-track-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 0 8px;
    font-size: 13px;
    color: var(--track-text-muted);
}
.forgot-track-link {
    color: var(--track-brand-dark);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}
.forgot-track-link i { color: var(--track-brand-main); }
.forgot-track-link:hover { color: var(--track-brand-main); text-decoration: underline; }

.recent-searches-bar {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    font-size: 12px;
}
.recent-searches-bar.active { display: flex; }
.recent-label { font-weight: 700; color: var(--track-text-muted); display: inline-flex; align-items: center; gap: 5px; }
.recent-chip {
    background: #EFF6FF;
    color: var(--track-brand-dark);
    border: 1px solid #BFDBFE;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.recent-chip:hover { background: var(--track-brand-dark); color: #fff; border-color: var(--track-brand-dark); }
.recent-clear-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
}
.recent-clear-btn:hover { color: var(--track-danger); text-decoration: underline; }

/* ================= 20-SECOND INTERACTIVE POPUP OVERLAY ================= */
.search-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 1;
    transition: opacity 0.35s ease;
}
.search-popup-overlay.active { display: flex; }
.search-popup-overlay.fade-out { opacity: 0; pointer-events: none; }
 
.search-popup-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 22px;
    padding: 28px 24px 22px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    border: 1px solid #e2e8f0;
    animation: popScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.search-popup-card.franchise-theme {
    border: 2px solid #F59E0B;
    background: linear-gradient(180deg, #FFFBEB 0%, #FFFFFF 45%);
}
.search-popup-card.notfound-theme {
    border: 2px solid #FCA5A5;
    background: linear-gradient(180deg, #FEF2F2 0%, #FFFFFF 50%);
    animation: popShakeIn 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes popScaleIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes popShakeIn {
    0% { transform: scale(0.9); opacity: 0; }
    30% { transform: scale(1.02) translateX(-8px); opacity: 1; }
    50% { transform: translateX(8px); }
    70% { transform: translateX(-5px); }
    90% { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.ring-loader-wrap {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatUpDown 3s ease-in-out infinite;
}
.ring-svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #f1f5f9; stroke-width: 6; }
.ring-fill {
    fill: none;
    stroke: var(--track-brand-main);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 264;
    stroke-dashoffset: 264;
    transition: stroke-dashoffset 0.1s linear;
}
.franchise-theme .ring-fill { stroke: #D97706; }

.ring-center-icon {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #FFF5F5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--track-brand-dark);
    font-size: 19px;
    box-shadow: inset 0 2px 6px rgba(229, 62, 62, 0.1);
}
.franchise-theme .ring-center-icon {
    background: #FEF3C7;
    color: #92400E;
    box-shadow: inset 0 2px 8px rgba(217, 119, 6, 0.2);
}
.ring-pct-num {
    font-size: 14px;
    font-weight: 900;
    color: var(--track-brand-main);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}
.franchise-theme .ring-pct-num { color: #D97706; }

.result-found-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    animation: popScaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.result-found-icon {
    width: 76px; height: 76px; border-radius: 50%;
    background: #10B981; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 38px; margin-bottom: 16px;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.15);
    animation: popScaleIn 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.result-found-title {
    font-size: 24px; font-weight: 900; color: #064E3B; margin: 0;
}
.result-found-text {
    font-size: 14px; color: #047857; margin-top: 8px; font-weight: 600; line-height: 1.5;
}

.nf-radar-circle {
    width: 86px;
    height: 86px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #FEE2E2;
    color: #DC2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    position: relative;
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.12);
    animation: nfPulse 1.8s infinite;
}
@keyframes nfPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
    70% { box-shadow: 0 0 0 18px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.loader-title { font-size: 17px; font-weight: 800; color: var(--track-brand-dark); margin: 0 0 4px; }
.loader-step-text { font-size: 12.5px; color: var(--track-text-muted); margin: 0; font-weight: 600; min-height: 18px; }
.loader-progress-wrap { max-width: 340px; margin: 12px auto 14px; }
.loader-progress-bar { width: 100%; height: 6px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--track-brand-dark), var(--track-brand-main), var(--track-success));
    transition: width 0.1s linear;
}
.franchise-theme .loader-progress-fill {
    background: linear-gradient(90deg, #92400E, #F59E0B, #10B981);
}

.loader-checklist {
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
}
 
@keyframes slideUpFade {
    0% { transform: translateY(8px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 1; }
}
 
.lc-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 600;
    color: #94a3b8;
    padding: 5px 0;
    transition: 0.25s;
}
.lc-item i { width: 15px; text-align: center; font-size: 12.5px; }
 
.lc-item.active { 
    color: var(--track-brand-dark); 
    font-weight: 800; 
    animation: slideUpFade 0.4s ease forwards;
}
.lc-item.active i { color: var(--track-brand-main); }
.franchise-theme .lc-item.active i { color: #D97706; }
 
.lc-item.done { color: #059669; font-weight: 700; }
.lc-item.done i { color: #10B981; }

.loader-tip-box {
    font-size: 11.5px;
    color: #475569;
    background: #EFF6FF;
    border: 1px dashed #BFDBFE;
    padding: 7px 12px;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1.4;
}

/* ALERT MSG */
.alert-error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
    padding: 15px 18px;
    border-radius: 10px;
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

/* RESULT CARD */
.result-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    padding: 28px;
    margin-top: 25px;
    border: 1px solid #e2e8f0;
    animation: fadeInCard 0.4s ease-out;
    position: relative;
}
.result-card.franchise-card {
    border: 2px solid #F59E0B;
    background: linear-gradient(180deg, #FFFBEB 0%, #FFFFFF 160px);
}
.result-card.lead-card {
    border: 2px solid #3B82F6;
    background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 140px);
}
@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* PRINT QR CODE BOX */
.print-qr-box {
    display: none;
    align-items: center;
    gap: 10px;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f8fafc;
}
.print-qr-box img { width: 64px; height: 64px; }

.result-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 18px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
}
.category-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #EFF6FF;
    color: #1D4ED8;
    margin-bottom: 6px;
}
.category-tag.gold-tag { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.result-header h2 { margin: 0; font-size: 21px; color: var(--track-brand-dark); line-height: 1.3; font-weight: 800; }
.meta-sub { color: var(--track-text-muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 12px; font-weight: 600; margin-top: 6px; }
.meta-sub strong { color: var(--track-brand-main); }

.sla-badge-active {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 800;
}
.sla-badge-paused {
    background: #FFFBEB;
    color: #B45309;
    border: 1px solid #FDE68A;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 800;
}

.header-right-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.badge-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge { padding: 6px 13px; border-radius: 30px; font-size: 12px; font-weight: 800; background: #f1f5f9; color: #475569; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ✅ CHANGED: UNPAID BADGE TO RED/DANGER COLOR */
.badge.paid { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.badge.unpaid { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.badge.partial, .badge.warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge.danger { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.badge.info, .badge.live-dot { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.badge.live-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #10B981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.utility-btn-group { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn-util {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}
.btn-util:hover, .btn-util.active-lang { background: var(--track-brand-dark); color: #fff; border-color: var(--track-brand-dark); }

/* OVERALL COMPLETION BOX */
.overall-progress-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f8fafc;
    padding: 15px 18px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    text-align: center;
}
.overall-progress-title {
    width: 100%;
    font-size: 14px;
    font-weight: 800;
    color: var(--track-brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}
.overall-bar-track {
    width: 100%;
    max-width: 520px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.overall-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--track-brand-dark), var(--track-success));
    border-radius: 10px;
    transition: width 0.5s ease;
}
.overall-progress-pill {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 800;
    display: inline-block;
}

/* TIMELINE STEPPER */
.timeline { display: flex; justify-content: space-between; position: relative; margin-bottom: 30px; padding: 0 10px; }
.timeline::before { content: ''; position: absolute; top: 20px; left: 40px; right: 40px; height: 3px; background: #e2e8f0; z-index: 1; }
.timeline-fill-line {
    position: absolute;
    top: 20px;
    left: 40px;
    height: 3px;
    background: var(--track-success);
    z-index: 1;
    transition: width 0.5s ease;
}

.step { position: relative; z-index: 2; text-align: center; width: 25%; }
.step-icon {
    width: 42px;
    height: 42px;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 8px;
    font-size: 15px;
    color: #94a3b8;
    transition: 0.3s;
}
.step p { margin: 0; font-size: 13px; font-weight: 700; color: var(--track-text-muted); }
.step small { display: block; font-size: 11px; color: #94a3b8; margin-top: 2px; }

.step.active .step-icon { border-color: var(--track-brand-main); background: var(--track-brand-main); color: #fff; box-shadow: 0 0 0 5px rgba(229, 62, 62, 0.15); animation: pulse 2s infinite; }
.step.active p { color: var(--track-brand-dark); }

.step.done .step-icon { border-color: var(--track-success); background: var(--track-success); color: #fff; }
.step.done p { color: var(--track-success); }

.step.warning .step-icon { border-color: var(--track-warning); background: var(--track-warning); color: #fff; box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.15); }
.step.warning p { color: #B45309; }

.step.danger .step-icon { border-color: var(--track-danger); background: var(--track-danger); color: #fff; box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.15); }
.step.danger p { color: #991B1B; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(229, 62, 62, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0); }
}

/* STATUS & REMARKS BOX */
.details-box { background: #f8fafc; border-radius: 10px; padding: 16px 20px; border-left: 4px solid var(--track-brand-dark); margin-bottom: 22px; }
.details-box.warn-box { background: #FFFBEB; border-left-color: var(--track-warning); }
.details-box.danger-box { background: #FEF2F2; border-left-color: var(--track-danger); }
.details-box.success-box { background: #ECFDF5; border-left-color: var(--track-success); }
.details-box h4 { margin: 0 0 6px; font-size: 14.5px; color: var(--track-brand-dark); display: flex; align-items: center; gap: 7px; }
.details-box p { margin: 0; font-size: 13.5px; color: var(--track-text-main); line-height: 1.6; }
.next-step-hint {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(100, 116, 139, 0.25);
    font-size: 12.5px;
    color: #0f294d;
    font-weight: 700;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

/* DATE-WISE AUDIT LOG TIMELINE CARD */
.audit-log-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 22px;
}
.audit-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.audit-log-header h3 {
    margin: 0;
    font-size: 14.5px;
    color: var(--track-brand-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}
.audit-log-list {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    position: relative;
    padding-left: 20px;
}
.audit-log-list::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 16px;
    bottom: 10px;
    width: 2px;
    background: #cbd5e1;
}
.audit-log-item {
    position: relative;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #f1f5f9;
}
.audit-log-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.audit-log-dot {
    position: absolute;
    left: -19px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--track-success);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #A7F3D0;
}
.audit-log-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.audit-log-status { font-size: 13px; font-weight: 800; color: var(--track-brand-dark); }
.audit-log-date { font-size: 11.5px; font-weight: 700; color: var(--track-text-muted); background: #f8fafc; padding: 2px 8px; border-radius: 12px; border: 1px solid #e2e8f0; }
.audit-log-rem { font-size: 12px; color: #475569; margin: 4px 0 0; }

/* MILESTONES / SUB-TASKS SECTION */
.milestones-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 22px;
}
.milestones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}
.milestones-header h3 { margin: 0; font-size: 15px; color: var(--track-brand-dark); display: flex; align-items: center; gap: 8px; }
.milestones-header h3 i { color: var(--track-brand-main); }
.ms-progress-pill { font-size: 12px; font-weight: 700; background: #EFF6FF; color: #1D4ED8; padding: 4px 11px; border-radius: 20px; }
.ms-bar-bg { width: 100%; height: 7px; background: #e2e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.ms-bar-fill { height: 100%; background: linear-gradient(90deg, var(--track-brand-dark), var(--track-success)); border-radius: 8px; transition: width 0.4s ease; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ms-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; }
.ms-item.ms-done { background: #ECFDF5; border-color: #A7F3D0; }
.ms-item.ms-active { background: #FFFBEB; border-color: #FDE68A; }
.ms-icon { font-size: 16px; margin-top: 1px; }
.ms-item.ms-done .ms-icon { color: var(--track-success); }
.ms-item.ms-active .ms-icon { color: var(--track-warning); }
.ms-item.ms-pending .ms-icon { color: #94a3b8; }
.ms-info { flex: 1; }
.ms-title { font-size: 13px; font-weight: 700; color: var(--track-text-main); margin: 0 0 2px; }
.ms-meta { font-size: 11px; color: var(--track-text-muted); }

/* GRID SECTIONS */
.info-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 20px; }
.lead-split-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 18px; margin-top: 15px; align-items: start; }
.sub-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.sub-card h3 { margin: 0 0 12px; font-size: 14.5px; color: var(--track-brand-dark); display: flex; align-items: center; gap: 8px; border-bottom: 1.5px solid #f1f5f9; padding-bottom: 9px; font-weight: 800; text-transform: uppercase; }
.sub-card h3 i { color: var(--track-brand-main); }

/* FRANCHISE PROFILE BANNER */
.franchise-profile-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #ffffff;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.fran-avatar {
    width: 74px;
    height: 74px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid #F59E0B;
    padding: 2px;
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.15);
}
.fran-logo-badge {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: contain;
    border: 1px solid #E2E8F0;
    padding: 4px;
    background: #fff;
    flex-shrink: 0;
}
.fran-kyc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
    margin: 4px 6px 4px 0;
}
.fran-kyc-pill.pending {
    background: #FFFBEB;
    color: #92400E;
    border-color: #FDE68A;
}

/* DOCUMENT ITEM */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    gap: 12px;
}
.doc-item.cert-item { background: #ECFDF5; border-color: #6EE7B7; }
.doc-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}
.doc-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--track-brand-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.doc-name i { color: var(--track-brand-main); font-size: 17px; flex-shrink: 0; }
.doc-item.cert-item .doc-name i { color: var(--track-success); }
.doc-status-inline {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: #D1FAE5;
    color: #047857;
    white-space: nowrap;
}
.doc-btn {
    width: 100%;
    text-align: center;
    text-decoration: none;
    background: var(--track-brand-dark);
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
}
.doc-btn:hover { background: var(--track-brand-main); color: #fff; }

.req-doc-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ECFDF5;
    color: #065F46;
    border: 1.5px solid #10B981;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    margin: 3px 5px 3px 0;
}

.clean-bullet-ul {
    margin: 0;
    padding-left: 18px;
}
.clean-bullet-ul li {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.5;
}
.clean-bullet-ul li:last-child { margin-bottom: 0; }

.status-state-box { border-radius: 10px; padding: 22px 16px; text-align: center; margin: auto 0; }
.status-state-box i { font-size: 32px; margin-bottom: 8px; display: block; }
.status-state-box h4 { margin: 0 0 5px; font-size: 15px; font-weight: 800; }
.status-state-box p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.status-state-box.state-green { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.status-state-box.state-green i { color: var(--track-success); }
.status-state-box.state-green h4 { color: #065F46; }
.status-state-box.state-green p { color: #047857; }

.status-state-box.state-blue { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E3A8A; }
.status-state-box.state-blue i { color: #2563EB; }
.status-state-box.state-blue h4 { color: #1E3A8A; }
.status-state-box.state-blue p { color: #1D4ED8; }

.status-state-box.state-warn { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.status-state-box.state-warn i { color: var(--track-warning); }
.status-state-box.state-warn h4 { color: #92400E; }
.status-state-box.state-warn p { color: #B45309; }

.status-state-box.state-danger { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.status-state-box.state-danger i { color: var(--track-danger); }
.status-state-box.state-danger h4 { color: #991B1B; }
.status-state-box.state-danger p { color: #B91C1C; }

/* FINANCIAL TABLE & ACTION BUTTONS */
.fin-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: var(--track-text-muted); border-bottom: 1px dashed #e2e8f0; }
.fin-row strong { color: var(--track-text-main); }
.fin-row.total { border-top: 1.5px solid var(--track-brand-dark); border-bottom: 1.5px solid var(--track-brand-dark); margin-top: 6px; padding: 10px 0; font-size: 14.5px; font-weight: 800; color: var(--track-brand-dark); }
.fin-row.due { color: var(--track-brand-main); font-weight: 900; font-size: 15px; }

.btn-pay-now {
    margin-top: 14px; width: 100%; text-decoration: none;
    background: linear-gradient(135deg, var(--track-brand-main), #c53030);
    color: #fff; padding: 12px 18px; border-radius: 8px; font-size: 14px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    box-sizing: border-box; box-shadow: 0 4px 14px rgba(229, 62, 62, 0.3); transition: 0.25s; animation: pulse 2s infinite;
}
.btn-pay-now:hover { background: linear-gradient(135deg, #c53030, #9b2c2c); transform: translateY(-2px); color: #fff; }

.btn-upload-now {
    margin-top: 14px; width: 100%; text-decoration: none;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #fff; padding: 11px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; transition: 0.25s;
}
.btn-upload-now:hover { background: linear-gradient(135deg, #D97706, #B45309); transform: translateY(-2px); color: #fff; }

.btn-cert-now {
    margin-top: 14px; width: 100%; text-decoration: none;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff; padding: 11px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; transition: 0.25s;
}
.btn-cert-now:hover { background: linear-gradient(135deg, #059669, #047857); transform: translateY(-2px); color: #fff; }

.btn-receipt-now {
    margin-top: 10px; width: 100%; text-decoration: none;
    background: var(--track-brand-dark);
    color: #fff; padding: 11px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; transition: 0.25s;
}
.btn-receipt-now:hover { background: #1e3a8a; transform: translateY(-2px); color: #fff; }

/* DYNAMIC AUTO-COLUMNS GRID */
.dyn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.dyn-item { background: #f8fafc; padding: 10px 12px; border-radius: 8px; border: 1px solid #f1f5f9; position: relative; }
.dyn-item small { display: block; font-size: 11px; color: var(--track-text-muted); text-transform: uppercase; font-weight: 600; margin-bottom: 3px; }
.dyn-item span { font-size: 13.5px; font-weight: 700; color: var(--track-text-main); word-break: break-word; }

/* CONTEXTUAL FAQ ACCORDION */
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    background: #f8fafc;
}
.faq-q {
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--track-brand-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.faq-a {
    display: none;
    padding: 0 14px 12px;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.5;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
    background: #ffffff;
}
.faq-item.open .faq-a { display: block; }

/* RETENTION / NPS RATING / CROSS-SELL BANNER */
.retention-card {
    margin-top: 18px;
    background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.star-rating-row i {
    font-size: 20px;
    color: #cbd5e1;
    cursor: pointer;
    transition: 0.2s;
    margin-right: 4px;
}
.star-rating-row i.active, .star-rating-row i:hover { color: #F59E0B; transform: scale(1.12); }

/* ACTION FOOTER */
.action-footer {
    margin-top: 22px; padding-top: 18px; border-top: 1px solid #e2e8f0;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
}
.action-footer-text { font-size: 13px; color: var(--track-text-muted); flex: 1; min-width: 220px; }
.action-footer-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-act {
    text-decoration: none; padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 7px; transition: 0.2s; white-space: nowrap; cursor: pointer; border: none;
}
.btn-callback { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.btn-callback:hover { background: #1D4ED8; color: #fff; }
.btn-whatsapp { background: #25D366; color: #fff; border: 1px solid #25D366; }
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.btn-dash { background: var(--track-brand-dark); color: #fff; border: 1px solid var(--track-brand-dark); }
.btn-dash:hover { background: #1e3a8a; color: #fff; }

/* ✅ NEW ADDED BUTTONS FOR COMPLAINT AND RATE US */
.btn-complaint { background: #EF4444; color: #fff; border: 1px solid #DC2626; }
.btn-complaint:hover { background: #DC2626; color: #fff; }

.btn-rate { background: #F59E0B; color: #fff; border: 1px solid #D97706; }
.btn-rate:hover { background: #D97706; color: #fff; }

/* PRINT STYLES */
@media print {
    .track-hero, .search-box, .forgot-track-bar, .recent-searches-bar, .utility-btn-group, .action-footer, .retention-card, header, footer {
        display: none !important;
    }
    .print-qr-box { display: flex !important; }
    .track-container { margin: 0 auto !important; max-width: 100% !important; }
    .result-card { box-shadow: none !important; border: 1px solid #cbd5e1 !important; margin-top: 0 !important; }
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 720px) {
    .track-hero { padding: 55px 15px 45px; }
    .track-container { margin-top: -25px; padding: 0 14px; }
    .search-box { flex-direction: column; padding: 14px; gap: 10px; }
    .search-box button { width: 100%; }
    .forgot-track-bar { flex-direction: column; align-items: center; text-align: center; }
    .search-popup-card { padding: 22px 16px 18px; border-radius: 16px; }
    .result-card { padding: 18px; }
    .header-right-col { align-items: flex-start; width: 100%; }
    .lead-split-grid { grid-template-columns: 1fr; }
    .timeline { flex-direction: column; gap: 18px; padding-left: 5px; }
    .timeline::before { top: 10px; bottom: 10px; left: 25px; right: auto; width: 3px; height: auto; }
    .timeline-fill-line { display: none; }
    .step { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; }
    .step-icon { width: 36px; height: 36px; font-size: 13px; margin: 0; flex-shrink: 0; }
    .action-footer { flex-direction: column; align-items: stretch; text-align: center; }
    .action-footer-btns { flex-direction: column; width: 100%; }
    .btn-act { justify-content: center; width: 100%; box-sizing: border-box; }
    .result-found-title { font-size: 20px; }
    .result-found-icon { width: 64px; height: 64px; font-size: 32px; }
}