*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --teal:        #00b4a6;
    --teal-dark:   #008f84;
    --teal-light:  #e0f7f5;
    --teal-mid:    #b2ebe7;
    --dark:        #0e2422;
    --bg:          #f4fffe;
    --white:       #ffffff;
    --text:        #1a2e2c;
    --muted:       #5a7875;
    --border:      #d4eeed;
    --green:       #0a8a4b;
    --green-bg:    #e8f8f1;
    --orange:      #e06600;
    --orange-bg:   #fff3e8;
    --radius:      12px;
    --radius-sm:   8px;
    --shadow:      0 2px 16px rgba(0, 180, 166, 0.08);
}

body {
    font-family: 'Mulish', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ──────────────────────────────────────────── */

.tr-header {
    background: var(--dark);
    padding: 28px 24px 32px;
    text-align: center;
}

.tr-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 20px;
}

.tr-logo__icon {
    width: 36px;
    height: 36px;
    background: var(--teal);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tr-logo__text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--white);
    letter-spacing: -0.3px;
}

.tr-logo__text span { color: var(--teal); }

.tr-header__title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.tr-header__sub {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
}

.tr-header__invoice {
    display: inline-block;
    margin-top: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

.tr-header__invoice strong { color: var(--teal); }

/* ── Main ────────────────────────────────────────────── */

.tr-main {
    flex: 1;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

/* ── Card ────────────────────────────────────────────── */

.tr-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}

.tr-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.tr-card__head-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--teal-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--teal-dark);
}

.tr-card__title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
}

.tr-card__body { padding: 20px; }

/* ── Platba ──────────────────────────────────────────── */

.tr-status {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tr-status__badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
}

.tr-status__badge--paid  { background: var(--green-bg); color: var(--green); }
.tr-status__badge--cod   { background: var(--orange-bg); color: var(--orange); }

.tr-status__detail {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.tr-status__amount {
    font-size: 22px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--orange);
    margin-left: auto;
}

/* ── Čísla zásilky ───────────────────────────────────── */

.tr-num-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg);
    gap: 8px;
}

.tr-num-row:last-child { border-bottom: none; }

.tr-num-row__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    flex-shrink: 0;
}

.tr-num-row__value {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.5px;
    word-break: break-all;
    text-align: right;
}

/* ── Tracking links ──────────────────────────────────── */

.tr-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tr-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s;
}

.tr-link:hover { opacity: 0.85; transform: translateY(-1px); }

.tr-link--primary   { background: var(--teal); color: var(--white); }
.tr-link--secondary { background: var(--teal-light); color: var(--teal-dark); }
.tr-link--dhl       { background: #FFCC00; color: #D40511; }

/* ── Empty state ─────────────────────────────────────── */

.tr-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--muted);
    font-size: 14px;
}

.tr-empty svg {
    display: block;
    margin: 0 auto 12px;
    color: var(--teal-mid);
}

/* ── Poslední stav ───────────────────────────────────── */

.tr-latest {
    background: var(--teal-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tr-latest__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--teal);
    margin-top: 5px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(0,180,166,0.25);
}

.tr-latest__name {
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 2px;
}

.tr-latest__date { font-size: 12px; color: var(--muted); }

/* ── Timeline ────────────────────────────────────────── */

.tr-timeline {
    position: relative;
    padding-left: 20px;
}

.tr-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border);
}

.tr-event {
    position: relative;
    padding: 0 0 18px 20px;
}

.tr-event:last-child { padding-bottom: 0; }

.tr-event__dot {
    position: absolute;
    left: -14px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--teal-mid);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 2px var(--teal-mid);
}

.tr-event:first-child .tr-event__dot {
    background: var(--teal);
    box-shadow: 0 0 0 2px var(--teal);
}

.tr-event__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.tr-event:first-child .tr-event__name { color: var(--teal-dark); }

.tr-event__meta {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tr-event__code {
    background: var(--bg);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* ── Error ───────────────────────────────────────────── */

.tr-error {
    text-align: center;
    padding: 48px 24px;
}

.tr-error__icon {
    width: 64px;
    height: 64px;
    background: var(--teal-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.tr-error__title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

/* ── Footer ──────────────────────────────────────────── */

.tr-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.tr-footer a {
    color: var(--teal-dark);
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 480px) {
    .tr-header__title { font-size: 21px; }
    .tr-main { padding: 20px 12px 40px; }
    .tr-card__body { padding: 16px; }
    .tr-status { flex-direction: column; align-items: flex-start; }
}
