/* Frontend Tracking Styles */

.ist-tracking-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ist-tracking-form {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 30px;
}

.ist-tracking-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    text-align: center;
}

.ist-tracking-description {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin: 0 0 30px;
}

.ist-form { max-width: 600px; margin: 0 auto; }
.ist-form-group { display: flex; gap: 12px; }

.ist-input {
    flex: 1;
    padding: 16px 24px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.ist-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.ist-button {
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #2271b1;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.ist-button:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 113, 177, 0.3);
}

.ist-button:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }

.ist-message {
    margin-top: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    text-align: center;
}

.ist-message.error { background: #fee; color: #c00; border: 2px solid #fcc; }
.ist-message.success { background: #efe; color: #080; border: 2px solid #cfc; }

/* Shipment Details */
.ist-tracking-result { animation: fadeIn 0.5s; }

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

.ist-shipment-details {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.ist-details-header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 10px;
}

.ist-details-header h3 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px;
}

.ist-tracking-code-display { font-size: 18px; color: #666; }
.ist-tracking-code-display strong { color: #2271b1; font-weight: 700; font-size: 20px; }

/* ============================================================
   ENHANCED PROGRESS BAR
   ============================================================ */
.ist-progress-container {
    margin: 40px 0 10px;
    padding: 32px 36px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
    border-radius: 20px;
    box-shadow: 0 20px 50px -20px rgba(15, 23, 42, 0.5);
    position: relative;
    overflow: hidden;
}

.ist-progress-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.12), transparent 50%);
    pointer-events: none;
}

.ist-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}

.ist-progress-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.ist-progress-title::before {
    content: '';
    width: 6px;
    height: 24px;
    border-radius: 3px;
    background: linear-gradient(180deg, #38bdf8, #0284c7);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.ist-progress-percent-wrap { display: flex; align-items: baseline; gap: 6px; }

.ist-progress-percent {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #38bdf8 0%, #10b981 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ist-progress-percent-sign { font-size: 18px; color: #64748b; font-weight: 600; }

.ist-progress-rail {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    margin: 50px 28px 20px;
    z-index: 2;
}

.ist-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981 0%, #38bdf8 50%, #6366f1 100%);
    background-size: 200% 100%;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: ist-shimmer 3s linear infinite;
}

@keyframes ist-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ist-progress-fill::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.6), 0 0 20px rgba(56, 189, 248, 0.8);
    animation: ist-pulse-dot 1.8s infinite;
}

@keyframes ist-pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.6), 0 0 20px rgba(56, 189, 248, 0.8); }
    50% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.2), 0 0 30px rgba(56, 189, 248, 1); }
}

.ist-progress-steps {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 3;
}

.ist-progress-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    width: 80px;
}

.ist-progress-step:first-child { transform: translateX(0); }
.ist-progress-step:last-child { transform: translateX(-100%); }

.ist-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    border: 3px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #64748b;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 700;
    position: relative;
}

.ist-progress-step.done .ist-step-circle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: #fff;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
}

.ist-progress-step.active .ist-step-circle {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    border-color: #38bdf8;
    color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.2), 0 0 20px rgba(56, 189, 248, 0.6);
    animation: ist-bounce 2s infinite;
}

@keyframes ist-bounce {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.3); }
}

.ist-progress-step.delayed .ist-step-circle {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

.ist-step-label {
    position: absolute;
    top: 48px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-align: center;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ist-progress-step.done .ist-step-label { color: #10b981; }
.ist-progress-step.active .ist-step-label { color: #38bdf8; font-weight: 700; }
.ist-progress-step.delayed .ist-step-label { color: #ef4444; }

.ist-step-date {
    position: absolute;
    top: 68px;
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    font-weight: 500;
}

.ist-progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    gap: 12px;
}

.ist-progress-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.ist-progress-stat strong { color: #f1f5f9; font-weight: 700; }

.ist-progress-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

/* ============================================================
   DETAILS GRID
   ============================================================ */
.ist-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0 40px;
}

.ist-detail-item {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #2271b1;
    transition: transform 0.3s;
}

.ist-detail-item:hover { transform: translateX(5px); }

.ist-detail-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.ist-detail-value { display: block; font-size: 18px; color: #1a1a1a; font-weight: 600; }

.ist-status-badge {
    display: inline-block;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   TIMELINE - Enhanced
   ============================================================ */
.ist-timeline-section,
.ist-custom-fields-section,
.ist-notes-section,
.ist-map-section,
.ist-files-section {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 3px solid #f0f0f0;
}

.ist-timeline-section h4,
.ist-custom-fields-section h4,
.ist-notes-section h4,
.ist-map-section h4,
.ist-files-section h4 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 40px;
    text-align: center;
}

.ist-timeline {
    position: relative;
    padding: 0;
    max-width: 900px;
    margin: 0 auto;
}

.ist-timeline-item {
    position: relative;
    padding: 0 0 50px 80px;
    min-height: 120px;
}

.ist-timeline-item:last-child { padding-bottom: 0; }

.ist-timeline-item::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 50px;
    bottom: -50px;
    width: 3px;
    background: linear-gradient(180deg, #e0e0e0 0%, #f0f0f0 100%);
}

.ist-timeline-item:last-child::before { display: none; }

.ist-timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid #e0e0e0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.ist-status-completed .ist-timeline-marker {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    color: #fff;
}

.ist-status-completed .ist-timeline-marker::after {
    content: '\2713';
    font-size: 28px;
    font-weight: bold;
}

.ist-status-current .ist-timeline-marker {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-color: #0066cc;
    box-shadow: 0 0 0 8px rgba(0, 102, 204, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: ist-timeline-pulse 2s infinite;
    color: #fff;
}

.ist-status-current .ist-timeline-marker::after {
    content: '\1F4CD';
    font-size: 24px;
}

@keyframes ist-timeline-pulse {
    0%, 100% { box-shadow: 0 0 0 8px rgba(0, 102, 204, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 0 0 16px rgba(0, 102, 204, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15); }
}

.ist-status-pending .ist-timeline-marker {
    background: #fff;
    border-color: #ced4da;
    color: #6c757d;
}

.ist-status-pending .ist-timeline-marker::after { content: '\25CB'; font-size: 32px; }

.ist-status-delayed .ist-timeline-marker {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-color: #dc3545;
    color: #fff;
}

.ist-status-delayed .ist-timeline-marker::after { content: '\26A0'; font-size: 24px; }

.ist-status-cancelled .ist-timeline-marker {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border-color: #6c757d;
    color: #fff;
}

.ist-status-cancelled .ist-timeline-marker::after { content: '\2715'; font-size: 24px; }

.ist-timeline-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #e0e0e0;
    transition: all 0.3s;
    position: relative;
}

.ist-status-completed .ist-timeline-content { border-left-color: #28a745; }
.ist-status-current .ist-timeline-content { border-left-color: #0066cc; box-shadow: 0 4px 20px rgba(0, 102, 204, 0.15); }
.ist-status-pending .ist-timeline-content { border-left-color: #ced4da; opacity: 0.75; }
.ist-status-delayed .ist-timeline-content { border-left-color: #dc3545; }
.ist-status-cancelled .ist-timeline-content { border-left-color: #6c757d; }

.ist-timeline-item:hover .ist-timeline-content {
    transform: translateX(8px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.ist-timeline-content h5 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.ist-timeline-content p {
    font-size: 15px;
    color: #666;
    margin: 0 0 16px;
    line-height: 1.6;
}

.ist-timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #888;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.ist-timeline-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.ist-event-date::before { content: '\1F4C5'; font-size: 16px; }
.ist-event-time::before { content: '\1F550'; font-size: 16px; }
.ist-event-location::before { content: '\1F4CD'; font-size: 16px; }

/* ============================================================
   MAP
   ============================================================ */
.ist-map {
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Files */
.ist-files-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.ist-file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #f9f9f9;
    border-radius: 12px;
    transition: background 0.3s, transform 0.3s;
}

.ist-file-item:hover { background: #f0f0f0; transform: translateY(-2px); }
.ist-file-icon { font-size: 28px; }
.ist-file-link { flex: 1; color: #2271b1; text-decoration: none; font-weight: 500; }
.ist-file-link:hover { text-decoration: underline; }

/* Notes */
.ist-notes-section p { font-size: 16px; line-height: 1.7; color: #666; }

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.ist-lang-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 16px;
}

.ist-rtl .ist-lang-switcher {
    justify-content: flex-start;
}

.ist-lang-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s;
    min-width: 56px;
}

.ist-lang-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.ist-lang-btn.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

/* ============================================================
   RTL SUPPORT (Arabic)
   ============================================================ */
.ist-lang-ar,
.ist-rtl {
    font-family: 'Tajawal', 'Cairo', 'Segoe UI', 'Arial', sans-serif;
}

.ist-rtl .ist-detail-item {
    border-left: none;
    border-right: 4px solid #2271b1;
}

.ist-rtl .ist-detail-item:hover {
    transform: translateX(-5px);
}

.ist-rtl .ist-timeline {
    padding-left: 0;
    padding-right: 0;
}

.ist-rtl .ist-timeline-item {
    padding: 0 80px 50px 0;
}

.ist-rtl .ist-timeline-item::before {
    left: auto;
    right: 27px;
}

.ist-rtl .ist-timeline-marker {
    left: auto;
    right: 0;
}

.ist-rtl .ist-timeline-content {
    border-left: none;
    border-right: 4px solid #e0e0e0;
}

.ist-rtl .ist-status-completed .ist-timeline-content { border-right-color: #28a745; }
.ist-rtl .ist-status-current .ist-timeline-content { border-right-color: #0066cc; }
.ist-rtl .ist-status-pending .ist-timeline-content { border-right-color: #ced4da; }
.ist-rtl .ist-status-delayed .ist-timeline-content { border-right-color: #dc3545; }
.ist-rtl .ist-status-cancelled .ist-timeline-content { border-right-color: #6c757d; }

.ist-rtl .ist-timeline-item:hover .ist-timeline-content {
    transform: translateX(-8px);
}

.ist-rtl .ist-progress-fill {
    left: auto;
    right: 0;
    background: linear-gradient(270deg, #10b981 0%, #38bdf8 50%, #6366f1 100%);
}

.ist-rtl .ist-progress-fill::after {
    right: auto;
    left: -2px;
}

/* ============================================================
   RESPONSIVE (Mobile) — progress bar redesigned for small screens
   ============================================================ */
@media (max-width: 768px) {
    .ist-tracking-container { padding: 0 12px; }
    .ist-tracking-form,
    .ist-shipment-details { padding: 22px 18px; border-radius: 14px; }
    .ist-tracking-title { font-size: 22px; }
    .ist-tracking-description { font-size: 14px; }
    .ist-form-group { flex-direction: column; gap: 10px; }
    .ist-button { width: 100%; padding: 14px 24px; }
    .ist-details-grid { grid-template-columns: 1fr; gap: 12px; margin: 24px 0 30px; }
    .ist-detail-item { padding: 14px 16px; }
    .ist-detail-label { font-size: 11px; }
    .ist-detail-value { font-size: 16px; }

    .ist-details-header { padding-bottom: 20px; margin-bottom: 0; }
    .ist-details-header h3 { font-size: 22px; }
    .ist-tracking-code-display { font-size: 14px; }
    .ist-tracking-code-display strong { font-size: 16px; }

    /* --- PROGRESS BAR (mobile-first rebuild) --- */
    .ist-progress-container {
        padding: 20px 16px 16px;
        margin: 24px 0 8px;
        border-radius: 16px;
    }
    .ist-progress-header {
        margin-bottom: 18px;
        gap: 12px;
    }
    .ist-progress-title {
        font-size: 12px;
        letter-spacing: 0.2px;
    }
    .ist-progress-title::before {
        width: 4px;
        height: 18px;
    }
    .ist-progress-percent { font-size: 30px; }
    .ist-progress-percent-sign { font-size: 14px; }

    /* Convert horizontal rail into a compact horizontal-scroll row of chips */
    .ist-progress-rail {
        height: auto;
        min-height: 6px;
        padding-top: 6px;
        margin: 18px 10px 12px;
        background: transparent;
    }
    .ist-progress-rail::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 999px;
    }
    .ist-progress-fill {
        height: 6px;
        top: 0;
    }
    .ist-progress-fill::after {
        width: 12px;
        height: 12px;
        top: 3px;
        box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.6), 0 0 12px rgba(56, 189, 248, 0.8);
    }

    /* Step circles row — horizontal scroll if too many steps */
    .ist-progress-steps {
        position: static;
        transform: none;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 14px;
        margin: 18px -16px 12px;
        padding: 8px 16px 12px;
        justify-content: flex-start;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }
    .ist-progress-steps::-webkit-scrollbar { height: 4px; }
    .ist-progress-steps::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 999px; }

    .ist-progress-step {
        position: relative;
        flex: 0 0 auto;
        transform: none !important;
        width: 80px;
        padding-top: 0;
        min-height: 80px;
    }
    .ist-progress-step.active .ist-step-circle {
        transform: scale(1.1);
    }
    .ist-progress-step.active {
        animation: none;
    }
    .ist-step-circle {
        width: 34px;
        height: 34px;
        font-size: 14px;
        margin: 0 auto;
    }
    .ist-step-label {
        position: static !important;
        display: block !important;
        top: auto !important;
        margin: 8px 0 2px;
        font-size: 10px;
        max-width: 80px;
        white-space: normal;
        line-height: 1.2;
        letter-spacing: 0.2px;
        text-align: center;
    }
    .ist-step-date {
        position: static !important;
        display: block !important;
        top: auto !important;
        margin: 0;
        font-size: 9px;
        white-space: nowrap;
        text-align: center;
    }

    /* Stats become a 1-column stacked list, not flex */
    .ist-progress-footer {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 8px;
        padding-top: 16px;
    }
    .ist-progress-stat {
        width: 100%;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 10px;
        font-size: 13px;
    }
    .ist-progress-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        flex-shrink: 0;
    }
    .ist-progress-stat strong {
        font-size: 13px;
        display: block;
        margin-top: 2px;
    }

    /* --- Timeline mobile --- */
    .ist-timeline-section,
    .ist-map-section,
    .ist-files-section,
    .ist-notes-section,
    .ist-custom-fields-section {
        margin-top: 32px;
        padding-top: 30px;
    }
    .ist-timeline-section h4,
    .ist-map-section h4,
    .ist-files-section h4,
    .ist-notes-section h4,
    .ist-custom-fields-section h4 {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .ist-timeline { padding: 0; }
    .ist-timeline-item {
        padding: 0 0 36px 56px;
        min-height: 0;
    }
    .ist-timeline-marker {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-width: 3px;
    }
    .ist-timeline-item::before {
        left: 19px;
        top: 40px;
        width: 2px;
    }
    .ist-timeline-content {
        padding: 16px 18px;
        border-radius: 10px;
    }
    .ist-timeline-content h5 { font-size: 16px; margin-bottom: 8px; }
    .ist-timeline-content p { font-size: 13px; margin-bottom: 10px; }
    .ist-timeline-meta { font-size: 12px; gap: 10px; padding-top: 8px; }
    .ist-timeline-item:hover .ist-timeline-content {
        transform: none;
    }
    .ist-status-completed .ist-timeline-marker::after { font-size: 20px; }
    .ist-status-current .ist-timeline-marker::after { font-size: 18px; }
    .ist-status-pending .ist-timeline-marker::after { font-size: 24px; }

    /* Map height shorter on mobile */
    .ist-map { height: 340px; border-radius: 12px; }

    /* Language switcher on mobile */
    .ist-lang-switcher { margin-bottom: 12px; }
    .ist-lang-btn { padding: 6px 12px; font-size: 12px; min-width: 48px; }

    /* RTL mobile adjustments */
    .ist-rtl .ist-timeline-item {
        padding: 0 56px 36px 0;
    }
    .ist-rtl .ist-timeline-item::before {
        left: auto;
        right: 19px;
    }
}

/* Ultra-small screens (≤400px) — make progress steps even more compact */
@media (max-width: 400px) {
    .ist-progress-container { padding: 18px 14px 14px; }
    .ist-progress-percent { font-size: 26px; }
    .ist-progress-step { width: 72px; }
    .ist-step-circle { width: 30px; height: 30px; font-size: 12px; }
    .ist-step-label { font-size: 9px; max-width: 72px; }
    .ist-step-date { font-size: 8px; }
}

/* =========================================================
   PROGRESS BAR 2.0 — redesigned from scratch
   Five distinct themes: aurora, glass, metro, sunset, midnight
   ========================================================= */

.ist-progress-shell {
    --ist-bg: linear-gradient(135deg, #16213e 0%, #1f3b73 55%, #1d6db8 100%);
    --ist-surface: rgba(255,255,255,0.08);
    --ist-surface-2: rgba(255,255,255,0.12);
    --ist-text: #f8fafc;
    --ist-muted: rgba(248,250,252,0.78);
    --ist-line: rgba(255,255,255,0.18);
    --ist-fill: linear-gradient(90deg, #53d8fb 0%, #6ee7b7 100%);
    --ist-node-done: #4ade80;
    --ist-node-active: #60a5fa;
    --ist-node-pending: rgba(255,255,255,0.16);
    --ist-node-delayed: #fb923c;
    --ist-shadow: 0 28px 55px rgba(15, 23, 42, 0.18);
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 28px;
    margin: 26px 0 30px;
    background: var(--ist-bg);
    color: var(--ist-text);
    box-shadow: var(--ist-shadow);
    isolation: isolate;
}
.ist-progress-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 30%), radial-gradient(circle at bottom left, rgba(255,255,255,0.14), transparent 30%);
    pointer-events: none;
}
.ist-progress-shell__head,
.ist-progress-shell__foot,
.ist-progress-track-viewport { position: relative; z-index: 1; }
.ist-progress-shell__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.ist-progress-shell__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ist-muted);
}
.ist-progress-shell__eyebrow::before {
    content: "";
    width: 6px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, #67e8f9, #60a5fa);
    box-shadow: 0 0 18px rgba(103, 232, 249, 0.45);
}
.ist-progress-shell__title {
    margin: 14px 0 0;
    color: var(--ist-text);
    font-size: 30px;
    line-height: 1.1;
    font-weight: 800;
}
.ist-progress-shell__percent {
    flex: 0 0 auto;
    font-size: 54px;
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ist-text);
}
.ist-progress-shell__percent span {
    font-size: 26px;
    margin-inline-start: 6px;
    color: var(--ist-muted);
    vertical-align: top;
}
.ist-progress-track-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.35) transparent;
}
.ist-progress-track-viewport::-webkit-scrollbar { height: 9px; }
.ist-progress-track-viewport::-webkit-scrollbar-track { background: transparent; }
.ist-progress-track-viewport::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.28); border-radius: 999px; }
.ist-progress-track {
    position: relative;
    padding: 38px 8px 8px;
}
.ist-progress-track__line,
.ist-progress-track__fill {
    position: absolute;
    top: 78px;
    inset-inline-start: 60px;
    inset-inline-end: 60px;
    height: 10px;
    border-radius: 999px;
}
.ist-progress-track__line {
    background: var(--ist-line);
    backdrop-filter: blur(10px);
}
.ist-progress-track__fill {
    inset-inline-end: auto;
    width: calc((100% - 120px) * (var(--ist-progress-width) / 100));
    max-width: calc(100% - 120px);
    background: var(--ist-fill);
    box-shadow: 0 0 22px rgba(96, 165, 250, 0.35);
}
.ist-progress-track__steps {
    display: grid;
    grid-template-columns: repeat(var(--ist-step-count), minmax(120px, 1fr));
    gap: 18px;
    align-items: start;
    position: relative;
}
.ist-progress-step-card {
    position: relative;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    outline: none;
}
.ist-progress-step-card__node {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ist-node-pending);
    border: 3px solid rgba(255,255,255,0.45);
    color: var(--ist-text);
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.ist-progress-step-card__body {
    display: grid;
    gap: 6px;
    width: 100%;
}
.ist-progress-step-card__label {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--ist-text);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 38px;
}
.ist-progress-step-card__meta {
    font-size: 12px;
    line-height: 1.3;
    color: var(--ist-muted);
}
.ist-progress-step-card:hover .ist-progress-step-card__node,
.ist-progress-step-card:focus-visible .ist-progress-step-card__node {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.3);
}
.ist-progress-step-card.is-done .ist-progress-step-card__node {
    background: var(--ist-node-done);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}
.ist-progress-step-card.is-active .ist-progress-step-card__node {
    background: var(--ist-node-active);
    border-color: rgba(255,255,255,0.95);
    color: #fff;
    box-shadow: 0 0 0 12px rgba(96, 165, 250, 0.15), 0 0 30px rgba(96, 165, 250, 0.35);
    animation: istPulseActive 2.2s infinite;
}
.ist-progress-step-card.is-delayed .ist-progress-step-card__node {
    background: var(--ist-node-delayed);
    border-color: rgba(255,255,255,0.2);
}
.ist-progress-step-card.is-cancelled .ist-progress-step-card__node {
    background: #475569;
    border-color: rgba(255,255,255,0.2);
}
.ist-progress-step-card.is-pending .ist-progress-step-card__label,
.ist-progress-step-card.is-pending .ist-progress-step-card__meta { color: var(--ist-muted); }
.ist-progress-step-card.is-active .ist-progress-step-card__label { color: #fff; }
.ist-progress-shell__foot {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.ist-progress-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--ist-surface);
    backdrop-filter: blur(10px);
}
.ist-progress-stat-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ist-surface-2);
    font-size: 20px;
}
.ist-progress-stat-card small {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ist-muted);
    margin-bottom: 4px;
}
.ist-progress-stat-card strong {
    color: var(--ist-text);
    font-size: 15px;
    line-height: 1.4;
}
.ist-progress-rtl .ist-progress-track__fill {
    inset-inline-start: auto;
    inset-inline-end: 60px;
}
.ist-progress-rtl .ist-progress-shell__head { flex-direction: row-reverse; }
.ist-progress-rtl .ist-progress-shell__foot,
.ist-progress-rtl .ist-progress-stat-card { direction: rtl; }
.ist-progress-rtl .ist-progress-shell__percent span { margin-inline-start: 0; margin-inline-end: 6px; }

/* Theme 1: Aurora Flow */
.ist-progress-theme-aurora {
    --ist-bg: linear-gradient(135deg, #14213d 0%, #243b6b 48%, #2c74b3 100%);
    --ist-fill: linear-gradient(90deg, #53d8fb 0%, #7cf29c 100%);
    --ist-node-done: #57cc99;
    --ist-node-active: #5bbcff;
}

/* Theme 2: Glass Pulse */
.ist-progress-theme-glass {
    --ist-bg: linear-gradient(135deg, rgba(17,24,39,0.88), rgba(31,41,55,0.78));
    --ist-surface: rgba(255,255,255,0.06);
    --ist-surface-2: rgba(255,255,255,0.09);
    --ist-fill: linear-gradient(90deg, #f472b6, #818cf8);
    --ist-node-done: #22c55e;
    --ist-node-active: #a78bfa;
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(16px);
}

/* Theme 3: Metro Track */
.ist-progress-theme-metro {
    --ist-bg: linear-gradient(180deg, #ffffff 0%, #f2f6fb 100%);
    --ist-text: #0f172a;
    --ist-muted: rgba(15,23,42,0.65);
    --ist-line: rgba(148,163,184,0.32);
    --ist-surface: #ffffff;
    --ist-surface-2: #e2e8f0;
    --ist-fill: linear-gradient(90deg, #2563eb, #06b6d4);
    --ist-node-done: #16a34a;
    --ist-node-active: #2563eb;
    --ist-node-pending: #ffffff;
    --ist-shadow: 0 18px 42px rgba(15,23,42,0.08);
    border: 1px solid #e2e8f0;
}
.ist-progress-theme-metro::before { background: none; }
.ist-progress-theme-metro .ist-progress-shell__eyebrow::before { box-shadow: none; }
.ist-progress-theme-metro .ist-progress-step-card__node { border-color: #cbd5e1; color: #334155; }
.ist-progress-theme-metro .ist-progress-stat-card { border: 1px solid #e2e8f0; }

/* Theme 4: Sunset Ribbon */
.ist-progress-theme-sunset {
    --ist-bg: linear-gradient(135deg, #451a03 0%, #7c2d12 45%, #c2410c 100%);
    --ist-fill: linear-gradient(90deg, #fb7185 0%, #f59e0b 55%, #facc15 100%);
    --ist-node-done: #f59e0b;
    --ist-node-active: #fb7185;
    --ist-node-delayed: #ef4444;
}

/* Theme 5: Midnight Circuit */
.ist-progress-theme-midnight {
    --ist-bg: linear-gradient(135deg, #020617 0%, #111827 58%, #0f172a 100%);
    --ist-fill: linear-gradient(90deg, #38bdf8 0%, #22c55e 100%);
    --ist-node-done: #22c55e;
    --ist-node-active: #38bdf8;
    --ist-node-pending: rgba(15,23,42,0.9);
    border: 1px solid rgba(56,189,248,0.16);
}
.ist-progress-theme-midnight .ist-progress-track__line { box-shadow: inset 0 0 24px rgba(56,189,248,0.08); }

@keyframes istPulseActive {
    0%, 100% { box-shadow: 0 0 0 12px rgba(96, 165, 250, 0.14), 0 0 28px rgba(96, 165, 250, 0.28); }
    50% { box-shadow: 0 0 0 18px rgba(96, 165, 250, 0.08), 0 0 36px rgba(96, 165, 250, 0.4); }
}

@media (max-width: 980px) {
    .ist-progress-shell { padding: 22px; border-radius: 24px; }
    .ist-progress-shell__title { font-size: 24px; }
    .ist-progress-shell__percent { font-size: 42px; }
    .ist-progress-shell__foot { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ist-progress-shell { padding: 18px; border-radius: 20px; }
    .ist-progress-shell__head { flex-direction: column; align-items: flex-start; }
    .ist-progress-shell__percent { font-size: 36px; }
    .ist-progress-track { padding-top: 28px; }
    .ist-progress-track__line,
    .ist-progress-track__fill { top: 60px; inset-inline-start: 42px; inset-inline-end: 42px; height: 8px; }
    .ist-progress-rtl .ist-progress-track__fill { inset-inline-end: 42px; }
    .ist-progress-track__fill { width: calc((100% - 84px) * (var(--ist-progress-width) / 100)); max-width: calc(100% - 84px); }
    .ist-progress-track__steps { grid-template-columns: repeat(var(--ist-step-count), minmax(94px, 1fr)); gap: 12px; }
    .ist-progress-step-card { min-height: 104px; }
    .ist-progress-step-card__node { width: 46px; height: 46px; font-size: 15px; }
    .ist-progress-step-card__label { font-size: 12px; min-height: 32px; }
    .ist-progress-step-card__meta { font-size: 11px; }
}


/* Progress enhancement options */
.ist-progress-shell.ist-progress-has-snap .ist-progress-track-viewport {
    scroll-snap-type: x proximity;
}
.ist-progress-shell.ist-progress-has-snap .ist-progress-step-card {
    scroll-snap-align: center;
}
.ist-progress-shell.ist-progress-has-glow .ist-progress-step-card.is-active .ist-progress-step-card__node {
    box-shadow:
        0 0 0 14px rgba(255,255,255,0.08),
        0 0 30px rgba(96,165,250,0.45),
        0 0 56px rgba(103,232,249,0.32),
        0 18px 36px rgba(15,23,42,0.30);
}
.ist-progress-shell.ist-progress-has-glow .ist-progress-step-card.is-active .ist-progress-step-card__label {
    text-shadow: 0 0 14px rgba(255,255,255,0.18);
}
.ist-progress-shell.ist-progress-is-animating .ist-progress-track__fill {
    animation: istProgressFillReveal 1.2s ease forwards;
    transform-origin: left center;
}
.ist-progress-shell.ist-progress-rtl.ist-progress-is-animating .ist-progress-track__fill {
    transform-origin: right center;
}
@keyframes istProgressFillReveal {
    from {
        opacity: 0.35;
        transform: scaleX(0.15);
        filter: saturate(0.8);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
        filter: saturate(1);
    }
}
