/* ==========================================================================
   Wx Kargo Takip - Master Dashboard CSS
   ========================================================================== */

.wx-app-container { max-width: 1140px; width: 100%; margin: 40px auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: #1f2937; background-color: #f8fafc; padding: 30px; border-radius: 20px; box-sizing: border-box; }
.wx-app-container *, .wx-app-container *::before, .wx-app-container *::after { box-sizing: border-box; }

/* 1. Yekpare Arama Çubuğu */
.wx-search-unified-bar { display: flex; flex-direction: row; align-items: center; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 6px 6px 6px 20px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); max-width: 800px; margin: 0 auto 30px auto; width: 100%; transition: all 0.3s ease; }
.wx-search-unified-bar:focus-within { border-color: #0b57d0; box-shadow: 0 0 0 4px rgba(11, 87, 208, 0.1); }
.wx-icon-search { width: 22px; height: 22px; color: #94a3b8; margin-right: 12px; flex-shrink: 0; }
.wx-search-unified-bar input { flex: 1; min-width: 0; border: none; padding: 14px 0; font-size: 15px; outline: none; background: transparent; color: #0f172a; font-weight: 500; margin: 0; box-shadow: none; }
.wx-search-unified-bar input::placeholder { color: #94a3b8; font-weight: 400; }
.wx-btn-primary { background: #0b57d0; color: #ffffff; border: none; padding: 14px 32px; border-radius: 8px; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background-color 0.3s ease, transform 0.2s ease; margin: 0; }
.wx-btn-primary:hover { background: #0842a0; }
.wx-btn-primary:active { transform: scale(0.98); }
.wx-btn-primary:disabled { background: #cbd5e1; color: #64748b; cursor: wait; transform: none; }

/* 2. Ana Durum Kartı */
.wx-status-card { background: #ffffff; border-radius: 20px; border: 1px solid #e2e8f0; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02); padding: 40px; margin-bottom: 24px; }
.wx-status-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; border-bottom: 1px solid #f1f5f9; padding-bottom: 24px; }
.wx-status-left { display: flex; align-items: center; gap: 24px; }
.wx-main-icon { width: 72px; height: 72px; background: rgba(11, 87, 208, 0.07); color: #0b57d0; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wx-main-icon svg { width: 36px; height: 36px; }
.wx-status-text { display: flex; flex-direction: column; }
.wx-st-label { font-size: 12px; color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.wx-st-no { font-size: 24px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.wx-st-title { font-size: 20px; font-weight: 700; color: #0b57d0; margin-bottom: 4px; }
.wx-st-desc { font-size: 15px; color: #64748b; }
.wx-status-right { display: flex; align-items: center; gap: 16px; background: #f8fafc; padding: 16px 20px; border-radius: 12px; border: 1px solid #f1f5f9; }
.wx-cal-icon { width: 28px; height: 28px; color: #0b57d0; }
.wx-date-label { font-size: 13px; color: #64748b; font-weight: 500; }
.wx-date-val { font-size: 16px; font-weight: 700; color: #0f172a; }

/* 3. İlerleme Çubuğu */
.wx-horizontal-steps { display: flex; justify-content: space-between; position: relative; padding: 0 20px; }
.wx-horizontal-steps::before { content: ''; position: absolute; top: 22px; left: 8%; right: 8%; height: 3px; background: #f1f5f9; z-index: 1; }
.wx-step-item { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; width: 20%; }
.wx-step-circle { width: 44px; height: 44px; background: #ffffff; border: 2px solid #e2e8f0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #94a3b8; margin-bottom: 12px; transition: all 0.4s ease; }
.wx-step-circle svg { width: 22px; height: 22px; }
.wx-step-name { font-size: 13px; font-weight: 600; color: #64748b; text-align: center; }
.wx-step-item.completed .wx-step-circle, .wx-step-item.active .wx-step-circle { background: #0b57d0; border-color: #0b57d0; color: #ffffff; box-shadow: 0 0 0 6px rgba(11, 87, 208, 0.1); }
.wx-step-item.completed .wx-step-name, .wx-step-item.active .wx-step-name { color: #0f172a; font-weight: 700; }

/* 4. Dashboard Izgarası (Grid) */
.wx-dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.wx-history-card, .wx-details-card { background: #ffffff; border-radius: 20px; border: 1px solid #e2e8f0; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02); padding: 32px; }
.wx-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border-bottom: 1px solid #f1f5f9; padding-bottom: 16px; }
.wx-card-title { font-size: 18px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 12px; }
.wx-card-title svg { color: #0b57d0; width: 24px; height: 24px; }

/* 5. Dikey Geçmiş Timeline */
.wx-vertical-timeline { position: relative; padding-left: 10px; }
.wx-v-item { display: flex; margin-bottom: 28px; position: relative; }
.wx-v-item:last-child { margin-bottom: 0; }
.wx-v-line { position: absolute; left: 16px; top: 32px; bottom: -28px; width: 2px; background-color: #e2e8f0; z-index: 1; }
.wx-v-item:last-child .wx-v-line { display: none; }
.wx-v-icon { width: 34px; height: 34px; border-radius: 50%; background: #f1f5f9; color: #94a3b8; display: flex; align-items: center; justify-content: center; margin-right: 24px; z-index: 2; flex-shrink: 0; border: 2px solid #ffffff; transition: all 0.3s ease; }
.wx-v-icon svg { width: 18px; height: 18px; stroke-width: 2.5; }
.wx-v-item:first-child .wx-v-icon { background: #0b57d0; color: #ffffff; box-shadow: 0 0 0 4px rgba(11, 87, 208, 0.15); animation: wx-pulse 1.5s infinite; }
.wx-v-content { flex: 1; display: flex; justify-content: space-between; align-items: flex-start; background: #f8fafc; padding: 18px 24px; border-radius: 12px; border: 1px solid #f1f5f9; }
.wx-v-item:first-child .wx-v-content { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02); }
.wx-v-text-group { display: flex; flex-direction: column; gap: 6px; }
.wx-v-status { font-size: 15px; font-weight: 700; color: #0f172a; }
.wx-v-loc { font-size: 14px; color: #64748b; font-weight: 500; }
.wx-v-time { font-size: 13px; color: #94a3b8; text-align: right; white-space: nowrap; font-weight: 600; line-height: 1.5; }

/* 6. Gönderi Bilgileri Grid */
.wx-details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.wx-d-item { display: flex; flex-direction: column; background: #f8fafc; padding: 16px; border-radius: 12px; border: 1px solid #f1f5f9; }
.wx-d-label { font-size: 12px; color: #94a3b8; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.wx-d-value { font-size: 14px; font-weight: 700; color: #0f172a; }

.wx-loading-spinner { text-align: center; color: #64748b; padding: 40px; font-weight: 600; font-size: 16px; }
.wx-alert { padding: 20px; background: #fef2f2; color: #b91c1c; border-radius: 12px; text-align: center; font-weight: 600; border: 1px solid #fecaca; font-size: 15px; }

/* Animasyonlar */
@keyframes wx-pulse { 0% { box-shadow: 0 0 0 0 rgba(11, 87, 208, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(11, 87, 208, 0); } 100% { box-shadow: 0 0 0 0 rgba(11, 87, 208, 0); } }

/* Responsive Düzenlemeler */
@media (max-width: 992px) {
    .wx-dashboard-grid { grid-template-columns: 1fr; }
    .wx-details-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .wx-app-container { padding: 16px; margin: 10px; }
    .wx-search-unified-bar { padding: 4px 4px 4px 12px; flex-direction: row; }
    .wx-btn-primary { width: auto; padding: 12px 20px; font-size: 14px; margin: 0; }
    .wx-status-header { flex-direction: column; align-items: flex-start; gap: 24px; }
    .wx-status-right { width: 100%; justify-content: flex-start; }
    .wx-horizontal-steps { flex-direction: column; align-items: flex-start; gap: 24px; padding-left: 20px; }
    .wx-horizontal-steps::before { left: 40px; top: 0; bottom: 0; width: 3px; height: 100%; }
    .wx-step-item { width: 100%; flex-direction: row; text-align: left; gap: 20px; }
    .wx-step-circle { margin-bottom: 0; flex-shrink: 0; z-index: 2; }
    .wx-v-content { flex-direction: column; gap: 12px; }
    .wx-v-time { text-align: left; }
    .wx-details-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   GÖNDERİ BİLGİLERİ KARTINI YAPIŞKAN (STICKY) YAPMA
   ========================================================================== */
@media (min-width: 993px) {
    .wx-details-card {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 40px !important; /* Eğer sitenin üstte sabit bir menüsü (header) varsa, bu değeri menü yüksekliğine göre artırabilirsin (Örn: 100px) */
        z-index: 10;
        align-self: start;
    }
}