:root {
    --brand: #0f4c81;
    --brand-dark: #082a49;
    --accent: #ef7d00;
    --bg-soft: #f4f7fb;
    --text-main: #1f2937;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-main);
    background: linear-gradient(180deg, #eef3fb 0%, #f8fbff 45%, #ffffff 100%);
    min-height: 100vh;
}

.app-nav {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}

.login-card {
    margin-top: 10vh;
    border-radius: 1rem;
}

.section-heading {
    font-weight: 800;
    color: #0b375e;
    margin-bottom: 1rem;
    font-size: 1.02rem;
}

.stat-card {
    border-radius: 0.85rem;
    background: #ffffff;
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 0.2rem;
}

.badge.status-pending {
    background: #f59e0b;
}

.badge.status-in-transit {
    background: #0284c7;
}

.badge.status-delivered {
    background: #16a34a;
}

.badge.status-returned {
    background: #7c3aed;
}

.badge.status-cancelled {
    background: #dc2626;
}

.sticky-panel {
    position: sticky;
    top: 1rem;
}

.barcode-wrap {
    border: 1px dashed #9ca3af;
    border-radius: 0.65rem;
    padding: 0.8rem;
    background: #fff;
}

.awb-text {
    font-size: 0.95rem;
    letter-spacing: 0.05rem;
}

.global-loader {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 18, 32, 0.58);
}

.print-page {
    background: #e5e7eb;
    padding: 1.2rem;
}

.print-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.trackon-label {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #222;
    border-radius: 1.6rem;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.label-top-row {
    display: grid;
    grid-template-columns: 230px 1fr;
    border-bottom: 1px solid #333;
}

.logo-col {
    border-right: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-height: 88px;
}

.company-logo {
    max-height: 62px;
    max-width: 200px;
    object-fit: contain;
}

.brand-fallback {
    font-weight: 800;
    color: #c2410c;
    font-size: 1.2rem;
    line-height: 1.1;
    text-align: center;
}

.route-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.route-head {
    font-weight: 800;
    border-bottom: 1px solid #333;
    border-right: 1px solid #333;
    text-align: center;
    padding: 4px 8px;
    font-size: 0.95rem;
}

.route-head:nth-child(2) {
    border-right: none;
}

.route-value {
    border-right: 1px solid #333;
    text-align: center;
    padding: 6px 8px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.route-value:nth-child(4) {
    border-right: none;
}

.barcode-section {
    border-bottom: 1px solid #333;
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 0.6rem;
    padding: 8px 12px 6px;
    align-items: center;
}

.barcode-holder {
    text-align: center;
}

.barcode-svg {
    width: 100%;
    max-height: 92px;
}

.awb-visual {
    font-weight: 700;
    letter-spacing: 0.2rem;
    margin-top: 2px;
}

.label-qr {
    display: flex;
    justify-content: center;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #333;
    padding: 4px 10px;
    font-size: 1.1rem;
}

.to-section {
    border-bottom: 1px solid #333;
    padding: 6px 10px 10px;
}

.to-prefix {
    font-size: 2rem;
    font-weight: 700;
}

.to-name {
    font-size: 2.8rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 3px;
}

.to-address {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.to-phone {
    margin-top: 6px;
    font-size: 2rem;
    font-weight: 800;
}

.details-row {
    border-bottom: 1px solid #333;
    padding: 7px 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 14px;
    font-size: 1.7rem;
    font-weight: 600;
}

.detail-item span {
    font-weight: 800;
}

.detail-item.full-row {
    grid-column: 1 / -1;
}

.label-footer {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    font-size: 2rem;
    font-weight: 700;
}

.tracking-page {
    background: radial-gradient(circle at 20% 20%, #eff6ff 0%, #ffffff 45%);
}

@media (max-width: 992px) {
    .sticky-panel {
        position: static;
    }

    .label-top-row {
        grid-template-columns: 1fr;
    }

    .logo-col {
        border-right: none;
        border-bottom: 1px solid #333;
    }

    .barcode-section {
        grid-template-columns: 1fr;
    }
}

