/* Konteyner takip sonuç sayfası */

.track-page {
    background: var(--color-bg);
    min-height: 60vh;
}

.track-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 2.5rem 0 3rem;
    border-bottom: 3px solid var(--color-accent);
}

.track-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40 L40 0 L40 40 Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 40px 40px;
    pointer-events: none;
}

.track-hero .container {
    position: relative;
}

.track-hero-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent-light);
    margin-bottom: 0.35rem;
}

.track-hero-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.track-hero-back:hover {
    color: #fff;
}

.track-hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.track-hero h1 {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.track-hero-sub {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    opacity: 0.9;
}

.track-hero-sub strong {
    font-weight: 600;
}

.track-status-wrap {
    flex-shrink: 0;
}

.track-status-wrap .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.track-body {
    margin-top: 2.5rem;
    padding-bottom: 4rem;
}

.track-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(11, 61, 110, 0.1);
    border: 1px solid #e4ebf3;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}

/* —— Rota haritası —— */

.track-journey {
    padding: 2rem 1.5rem 1.5rem;
}

.route-map {
    width: 100%;
}

.route-map__rail {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 6.25rem;
    margin-bottom: 0.25rem;
}

.route-map__dash {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 0;
    border-top: 2px dashed #8faec8;
    z-index: 0;
    pointer-events: none;
}

.route-pin {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--color-primary);
    position: relative;
    z-index: 2;
}

.route-pin--from {
    background: var(--color-accent);
}

.route-pin--to {
    background: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-accent);
}

.route-map__ship {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -55%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #e4ebf3;
    box-shadow: 0 2px 14px rgba(11, 61, 110, 0.14);
}

.ship-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: var(--color-primary);
}

.ship-icon--hero {
    font-size: 3rem;
}

.ship-icon--tiny {
    font-size: 1rem;
    color: var(--color-primary);
}

.route-map__labels {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 0.85rem;
}

.route-map__label {
    flex: 0 1 auto;
    min-width: 0;
}

.route-map__label--from {
    text-align: left;
    padding-left: 0;
}

.route-map__label--to {
    text-align: right;
    padding-right: 0;
}

.route-map__city {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.25;
    word-break: break-word;
}

.route-map__role {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin-top: 0.3rem;
}

.route-map__date {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin-top: 0.2rem;
}

.route-map__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef2f7;
    font-size: 0.875rem;
    color: var(--color-muted);
}

.route-map__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.route-map__meta-item strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* —— Bilgi grid —— */

.track-section-title {
    margin: 0 0 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.track-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.track-stat {
    background: #f8fafc;
    border: 1px solid #e8eef5;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    min-height: 4.5rem;
}

.track-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    margin-bottom: 0.35rem;
}

.track-stat-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    word-break: break-word;
    line-height: 1.35;
}

.track-stat-value.is-empty {
    color: #94a3b8;
    font-weight: 500;
}

.track-note {
    margin: 0;
    padding: 1rem 1.1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #78350f;
    line-height: 1.6;
    font-size: 0.925rem;
}

/* —— Timeline —— */

.track-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.track-history-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    position: relative;
}

.track-history-item:last-child {
    padding-bottom: 0;
}

.track-history-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 26px;
    bottom: 0;
    width: 2px;
    background: #dbe4ef;
}

.track-history-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid #e8eef5;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.track-history-item:first-child .track-history-icon {
    background: var(--color-accent);
    border-color: #fef3c7;
    box-shadow: 0 0 0 3px rgba(232, 163, 23, 0.25);
}

.track-history-content {
    flex: 1;
    min-width: 0;
    padding-bottom: 0.25rem;
}

.track-history-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem 1rem;
}

.track-history-status {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.track-history-time {
    font-size: 0.8125rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.track-history-location {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-top: 0.2rem;
}

.track-history-note {
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.5;
}

.track-empty {
    margin: 0;
    padding: 2rem;
    text-align: center;
    color: var(--color-muted);
    background: #f8fafc;
    border-radius: 10px;
}

.track-footer-actions {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
}

.track-footer-actions .btn-accent,
.track-footer-actions .btn-primary {
    min-width: 160px;
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    color: #1a2332;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.bg-secondary-lt { background: #e2e8f0; color: #475569; }
.bg-info-lt      { background: #dbeafe; color: #1d4ed8; }
.bg-warning-lt   { background: #fef3c7; color: #b45309; }
.bg-primary-lt   { background: #dbeafe; color: #1e40af; }
.bg-indigo-lt    { background: #e0e7ff; color: #4338ca; }
.bg-cyan-lt      { background: #cffafe; color: #0e7490; }
.bg-teal-lt      { background: #ccfbf1; color: #0f766e; }
.bg-orange-lt    { background: #ffedd5; color: #c2410c; }
.bg-lime-lt      { background: #ecfccb; color: #4d7c0f; }
.bg-success-lt   { background: #dcfce7; color: #15803d; }
.bg-danger-lt    { background: #fee2e2; color: #b91c1c; }
.bg-dark-lt      { background: #e5e7eb; color: #374151; }
.bg-green-lt     { background: #dcfce7; color: #15803d; }

@media (max-width: 900px) {
    .track-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .track-hero {
        padding: 1.5rem 0 3rem;
    }

    .track-journey {
        padding: 1.5rem 1rem 1.25rem;
    }

    .route-map__rail {
        height: 5rem;
    }

    .route-map__ship {
        width: 4.5rem;
        height: 4.5rem;
    }

    .ship-icon--hero {
        font-size: 2.6rem;
    }

    .route-map__city {
        font-size: 1.05rem;
    }

    .route-map__meta {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
    }

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

    .track-card {
        padding: 1.25rem;
    }
}
