/* ── SGD Public Tracking Styles ── */
.sgd-tracking-wrapper {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}
.sgd-tracking-header {
    text-align: center;
    margin-bottom: 24px;
}
.sgd-tracking-header h2 { font-size: 26px; color: #003087; margin-bottom: 6px; }
.sgd-tracking-header p  { color: #6b7280; }

.sgd-tracking-form { margin-bottom: 28px; }
.sgd-track-input-group { display: flex; gap: 10px; }
.sgd-track-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color .2s;
}
.sgd-track-input:focus { border-color: #003087; }
.sgd-track-btn {
    padding: 12px 28px;
    background: #003087;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.sgd-track-btn:hover { background: #00257a; }

/* Result card */
.sgd-result-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.sgd-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.sgd-result-tracking { font-size: 18px; font-weight: 800; color: #111; font-family: monospace; letter-spacing: 1px; }
.sgd-result-status   { font-size: 14px; font-weight: 700; }

.sgd-result-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 0;
}
.sgd-result-section { padding: 16px 20px; border-right: 1px solid #e5e7eb; }
.sgd-result-section:last-child { border-right: none; }
.sgd-result-section h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #003087; margin-bottom: 10px; letter-spacing: .5px; }
.sgd-result-section p  { font-size: 13px; margin-bottom: 5px; color: #444; line-height: 1.5; }

.sgd-result-footer { padding: 12px 20px; background: #f9fafb; border-top: 1px solid #e5e7eb; text-align: right; }
.sgd-view-invoice-btn {
    display: inline-block;
    padding: 9px 20px;
    background: #003087;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s;
}
.sgd-view-invoice-btn:hover { background: #00257a; color: #fff; }

/* Not found */
.sgd-not-found {
    text-align: center;
    padding: 40px 20px;
    background: #fff8f8;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
}
.sgd-not-found span { font-size: 36px; display: block; margin-bottom: 10px; }
.sgd-not-found h3   { font-size: 18px; margin-bottom: 8px; }
.sgd-not-found p    { font-size: 13px; color: #555; }

@media (max-width: 600px) {
    .sgd-track-input-group { flex-direction: column; }
    .sgd-result-grid { grid-template-columns: 1fr; }
    .sgd-result-header { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ── Current Location Banner ── */
.sgd-current-location-bar {
    display: flex;
    align-items: stretch;
    background: #f0fdf4;
    border-top: 1px solid #bbf7d0;
    border-bottom: 1px solid #bbf7d0;
}
.sgd-cur-loc-icon {
    background: #002a72;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0 16px;
    flex-shrink: 0;
}
.sgd-cur-loc-body {
    flex: 1;
    padding: 10px 14px;
    border-right: 1px solid #bbf7d0;
}
.sgd-cur-loc-meta {
    padding: 10px 14px;
    border-right: 1px solid #bbf7d0;
}
.sgd-cur-loc-meta:last-child { border-right: none; }
.sgd-cur-loc-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #166534;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.sgd-cur-loc-value {
    font-size: 13px;
    font-weight: 700;
    color: #111;
}

/* ── Journey Timeline ── */
.sgd-journey-timeline {
    border-top: 1px solid #e5e7eb;
    padding: 0;
}
.sgd-journey-timeline-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #002a72;
    padding: 7px 20px;
}
.sgd-timeline-list {
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.sgd-tl-item {
    display: flex;
    gap: 14px;
    position: relative;
}
.sgd-tl-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 28px;
}
.sgd-tl-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    z-index: 1;
}
.sgd-tl-dot-active    { border-color: #002a72; background: #dbeafe; }
.sgd-tl-dot-current   { border-color: #002a72; background: #002a72; }
.sgd-tl-dot-delivered { border-color: #16a34a; background: #dcfce7; }
.sgd-tl-dot-failed    { border-color: #dc2626; background: #fee2e2; }
.sgd-tl-line {
    flex: 1;
    width: 2px;
    background: #e5e7eb;
    margin: 3px 0;
    min-height: 12px;
}
.sgd-tl-item:last-child .sgd-tl-line { display: none; }
.sgd-tl-body {
    flex: 1;
    padding-bottom: 14px;
}
.sgd-tl-item:last-child .sgd-tl-body { padding-bottom: 4px; }
.sgd-tl-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}
.sgd-tl-checkpoint {
    font-size: 13px;
    font-weight: 700;
    color: #111;
}
.sgd-tl-item-current .sgd-tl-checkpoint { color: #002a72; }
.sgd-tl-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
}
.sgd-tl-badge-pending    { background: #f3f4f6; color: #6b7280; }
.sgd-tl-badge-processing { background: #fef3c7; color: #92400e; }
.sgd-tl-badge-collected  { background: #dbeafe; color: #1e40af; }
.sgd-tl-badge-in_transit { background: #ede9fe; color: #5b21b6; }
.sgd-tl-badge-customs    { background: #ffedd5; color: #9a3412; }
.sgd-tl-badge-out_del    { background: #d1fae5; color: #065f46; }
.sgd-tl-badge-delivered  { background: #dcfce7; color: #166534; }
.sgd-tl-badge-failed     { background: #fee2e2; color: #991b1b; }
.sgd-tl-current-tag {
    font-size: 10px;
    font-weight: 700;
    color: #002a72;
    background: #dbeafe;
    padding: 1px 7px;
    border-radius: 10px;
}
.sgd-tl-location {
    font-size: 12px;
    color: #444;
    margin-bottom: 2px;
}
.sgd-tl-date {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
}

@media (max-width: 600px) {
    .sgd-current-location-bar { flex-wrap: wrap; }
    .sgd-cur-loc-icon { width: 100%; padding: 8px 14px; }
    .sgd-cur-loc-body,
    .sgd-cur-loc-meta { border-right: none; border-bottom: 1px solid #bbf7d0; }
}
