/* ======================================================
   TNT EXPRESS DELIVERY SERVICE — Custom Styles
   White/Light theme with Orange (#ff6b00) accents
   ====================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
    --orange-primary: #ff6b00;
    --orange-dark: #e85d00;
    --orange-light: #ff8c33;
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

/* ---- Base Reset ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes truckMove {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100vw); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.7s ease-out forwards;
}
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}
.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}
.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}
.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.opacity-0 { opacity: 0; }

/* ---- Cards ---- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.card-static {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
}

/* ---- Buttons ---- */
.btn-primary {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
    color: var(--white);
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--orange-dark), #d35400);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.35);
}
.btn-secondary {
    background: var(--white);
    color: var(--gray-800);
    padding: 12px 32px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}
.btn-secondary:hover {
    border-color: var(--orange-primary);
    color: var(--orange-primary);
    transform: translateY(-2px);
}
.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
    border-radius: var(--radius-xs);
}

/* ---- Navigation ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--gray-900);
}
.nav-logo img {
    height: 42px;
    width: auto;
}
.nav-logo span.highlight {
    color: var(--orange-primary);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}
.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--orange-primary);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--orange-primary);
    transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile menu toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-800);
    cursor: pointer;
}

/* ---- Hero ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 2rem 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, var(--orange-50) 50%, #fff 100%);
}
.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 140, 51, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ---- Section ---- */
.section {
    padding: 100px 2rem;
}
.section-gray {
    background: var(--gray-50);
}
.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}
.section-subtitle {
    color: var(--gray-600);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

/* ---- Service Cards ---- */
.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--orange-50);
    color: var(--orange-primary);
    transition: all 0.3s ease;
}
.card:hover .service-icon {
    background: var(--orange-primary);
    color: var(--white);
    transform: scale(1.1);
}

/* ---- Stats ---- */
.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--orange-primary);
    line-height: 1;
}
.stat-label {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* ---- Tracking Input ---- */
.tracking-input-wrapper {
    display: flex;
    background: var(--white);
    border-radius: 60px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 2px solid var(--gray-100);
    transition: all 0.3s ease;
    max-width: 560px;
}
.tracking-input-wrapper:focus-within {
    border-color: var(--orange-primary);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(255, 107, 0, 0.1);
}
.tracking-input-wrapper input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--gray-800);
    background: transparent;
}
.tracking-input-wrapper input::placeholder {
    color: #94a3b8;
}
.tracking-input-wrapper button {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
    color: var(--white);
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}
.tracking-input-wrapper button:hover {
    background: linear-gradient(135deg, var(--orange-dark), #d35400);
}

/* ---- Timeline ---- */
.timeline {
    position: relative;
    padding-left: 40px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}
.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -33px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gray-200);
    border: 3px solid var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1;
}
.timeline-dot.active {
    background: var(--orange-primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.2);
}
.timeline-dot.completed {
    background: #22c55e;
}

/* ---- Receipt ---- */
.receipt {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.receipt-header {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
    padding: 2rem;
    color: var(--white);
    text-align: center;
}
.receipt-header img {
    height: 50px;
    margin-bottom: 0.5rem;
}
.receipt-body {
    padding: 2rem;
}
.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.95rem;
}
.receipt-row:last-child { border-bottom: none; }
.receipt-label {
    color: var(--gray-600);
    font-weight: 500;
}
.receipt-value {
    color: var(--gray-900);
    font-weight: 600;
    text-align: right;
}
.receipt-total {
    background: var(--orange-50);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.15rem;
}

/* ---- Footer ---- */
.footer {
    background: var(--gray-900);
    color: #94a3b8;
    padding: 4rem 2rem 2rem;
}
.footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.footer a:hover {
    color: var(--orange-primary);
}
.footer h4 {
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
}

/* ---- Admin Sidebar ---- */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--white);
    border-right: 1px solid var(--gray-100);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}
.admin-sidebar .sidebar-logo {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
    text-decoration: none;
}
.admin-sidebar .sidebar-logo img {
    height: 36px;
}
.admin-sidebar nav {
    padding: 1rem 0;
    flex: 1;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 1.5rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-link:hover {
    background: var(--orange-50);
    color: var(--orange-primary);
}
.sidebar-link.active {
    background: var(--orange-50);
    color: var(--orange-primary);
    border-left-color: var(--orange-primary);
    font-weight: 600;
}
.sidebar-link i {
    width: 20px;
    text-align: center;
}

/* ---- Admin Main Content ---- */
.admin-main {
    margin-left: 260px;
    min-height: 100vh;
    background: var(--gray-50);
}
.admin-topbar {
    background: var(--white);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-content {
    padding: 2rem;
}

/* ---- Admin Stat Cards ---- */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* ---- Admin Table ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-100);
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800);
    vertical-align: middle;
}
.data-table tr:hover td {
    background: var(--gray-50);
}
.data-table .badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-block;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xs);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: var(--gray-800);
    transition: all 0.2s;
    background: var(--white);
}
.form-input:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 480px;
    padding: 2rem;
    animation: scaleIn 0.3s ease-out;
}

/* ---- Flash Messages ---- */
.flash-message {
    padding: 12px 20px;
    border-radius: var(--radius-xs);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 0.4s ease-out;
    font-weight: 500;
}
.flash-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ---- Loader ---- */
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--orange-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---- Print Styles ---- */
@media print {
    .no-print { display: none !important; }
    .receipt { box-shadow: none; border: 1px solid #ddd; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .mobile-menu-btn { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--gray-100);
        box-shadow: var(--shadow-md);
    }
    .nav-links.active { display: flex; }
    .hero { padding: 100px 1rem 60px; min-height: auto; }
    .section { padding: 60px 1rem; }
    .section-title { font-size: 2rem; }
    .tracking-input-wrapper {
        flex-direction: column;
        border-radius: var(--radius);
    }
    .tracking-input-wrapper button { justify-content: center; }

    /* Admin responsive */
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
}
/* Prevent receipt animation from affecting downloaded image */
.receipt.generating {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}