:root {
    --primary-color: #0E2A47;
    --secondary-color: #1a3c61;
    --accent-color: #00B4D8;
    --accent-hover: #0096B4;
    --bg-color: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-subtle: #F1F5F9;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.1);
    --shadow-md: 0 4px 15px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.02);
    --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.08), 0 10px 20px -5px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 10px 30px -10px rgba(0, 180, 216, 0.3);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--accent-color);
}

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

.mt-4 {
    margin-top: 16px;
}

.mt-8 {
    margin-top: 32px;
}

.mb-2 {
    margin-bottom: 8px;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.section-bg {
    background-color: var(--bg-card);
}

.section-subtle {
    background-color: var(--bg-subtle);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-weight: 600;
    text-align: center;
    border: none;
    padding: 16px 36px;
    font-size: 1rem;
    border-radius: 99px;
    transition: var(--transition-smooth);
    cursor: pointer;
    letter-spacing: 0.3px;
    background-color: var(--primary-color);
    color: var(--bg-card);
}

.btn:hover {
    background-color: var(--secondary-color);
    color: var(--bg-card);
}

.btn-primary {
    color: var(--bg-card);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(14, 42, 71, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 42, 71, 0.3);
}

.btn-accent {
    color: var(--bg-card);
    background: var(--accent-color);
    box-shadow: var(--shadow-glow);
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background: var(--bg-subtle);
}

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    overflow: hidden;
    padding: 80px 0;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1661879449050-069f67e200bd?q=80&w=2670&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(105deg, rgba(14, 42, 71, 0.9) 0%, rgba(14, 42, 71, 0.8) 50%, rgba(0, 180, 216, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.hero h1 {
    color: var(--bg-card);
    font-size: 4.5rem;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 50px;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tracking-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 650px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tracking-form {
    display: flex;
    gap: 12px;
}

.tracking-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.tracking-icon {
    position: absolute;
    left: 20px;
    color: var(--text-light);
    width: 24px;
    height: 24px;
}

.tracking-input {
    width: 100%;
    padding: 20px 20px 20px 56px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1.15rem;
    color: var(--text-primary);
    outline: none;
    background: var(--bg-card);
    transition: var(--transition-smooth);
}

.tracking-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.tracking-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
}

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fleet-grid .tall {
    grid-row: span 2;
}

.fleet-grid .wide {
    grid-column: span 2;
}

.fleet-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--bg-card);
    height: 350px;
    cursor: pointer;
}

.fleet-grid .tall.fleet-card {
    height: 724px;
}

.fleet-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fleet-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(14, 42, 71, 0.9) 0%, rgba(14, 42, 71, 0.2) 50%, rgba(14, 42, 71, 0) 100%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    transition: var(--transition-smooth);
    opacity: 0.9;
}

.fleet-card:hover .fleet-img {
    transform: scale(1.08);
}

.fleet-card:hover .fleet-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(14, 42, 71, 0.95) 0%, rgba(0, 180, 216, 0.3) 100%);
}

.fleet-title {
    color: var(--bg-card);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    transform: translateY(10px);
    transition: var(--transition-smooth);
}

.fleet-card:hover .fleet-title {
    transform: translateY(0);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

.service-icon {
    width: 54px;
    height: 54px;
    background: var(--bg-subtle);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent-color);
    font-size: 1.5rem;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    background: var(--accent-color);
    color: var(--bg-card);
    transform: scale(1.1) rotate(-5deg);
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.presence-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 60px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    position: relative;
    overflow: hidden;
}

.presence-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border-color), transparent);
}

.location-box {
    text-align: center;
    position: relative;
    z-index: 1;
}

.location-box h3 {
    font-size: 1.1rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.location-box p {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.location-country {
    color: var(--text-light);
    font-size: 1.1rem;
}

.contact-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-email {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    display: inline-block;
    letter-spacing: -1px;
}

.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 60px 0 40px;
    border-top: 5px solid var(--accent-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bg-card);
    letter-spacing: -0.5px;
}

.footer-logo span {
    color: var(--accent-color);
}

.footer-meta {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.page-header {
    background: var(--bg-card);
    padding: 80px 0 40px;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 3rem;
    margin: 0;
    letter-spacing: -1px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.back-link:hover {
    color: var(--accent-color);
    transform: translateX(-4px);
}

.tracking-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    margin-bottom: 40px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tracking-header {
    padding: 30px 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--bg-subtle);
}

.tracking-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tracking-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.tracking-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.badge {
    padding: 8px 20px;
    border-radius: 99px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-Delivered {
    background-color: #ECFDF5;
    color: #059669;
}

.status-Delivered::before {
    background-color: #10B981;
    box-shadow: 0 0 10px #10B981;
}

.status-In-Transit {
    background-color: #F0F9FF;
    color: #0369A1;
}

.status-In-Transit::before {
    background-color: #0EA5E9;
    box-shadow: 0 0 10px #0EA5E9;
}

.status-On-Hold {
    background-color: #FFF7ED;
    color: #C2410C;
}

.status-On-Hold::before {
    background-color: #F97316;
    box-shadow: 0 0 10px #F97316;
}

.status-Pending {
    background-color: var(--bg-subtle);
    color: var(--text-secondary);
}

.status-Pending::before {
    background-color: var(--text-light);
}

.tracking-body {
    padding: 40px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.detail-block {
    display: flex;
    flex-direction: column;
}

.detail-block strong {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.detail-block span {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
}

.detail-meta {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-section {
    padding: 0 40px 40px;
}

.history-section h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.history-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: var(--bg-card);
}

.history-table th {
    background-color: var(--bg-subtle);
    padding: 16px 24px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.history-table td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
    font-size: 1rem;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr:hover td {
    background-color: #f8fafc;
}

.date-col {
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    white-space: nowrap;
}

.location-col {
    font-weight: 600;
}

.not-found-modern {
    text-align: center;
    padding: 100px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px dashed var(--border-color);
    margin-top: 20px;
}

.not-found-modern h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.not-found-modern p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}

@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .fleet-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fleet-grid .wide {
        grid-column: span 1;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 40px 0;
        min-height: 70vh;
    }

    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .tracking-box {
        padding: 12px;
    }

    .tracking-form {
        flex-direction: column;
        gap: 8px;
    }

    .tracking-input {
        padding: 16px;
    }

    .tracking-icon {
        display: none;
    }

    .btn {
        width: 100%;
    }

    .fleet-grid {
        grid-template-columns: 1fr;
    }

    .fleet-card,
    .fleet-grid .tall.fleet-card {
        height: 280px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .presence-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 20px;
    }

    .presence-wrapper::after {
        top: 50%;
        left: 20px;
        right: 20px;
        width: auto;
        height: 1px;
        background: linear-gradient(to right, transparent, var(--border-color), transparent);
    }

    .tracking-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .history-section,
    .tracking-body {
        padding: 24px;
    }

    .contact-email {
        font-size: 1.4rem;
        word-break: break-all;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .footer-meta {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* --- ADMIN PANEL SPECIFIC STYLES --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color 0.2s;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-danger {
    background: #EF4444;
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.alert-success {
    background-color: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

/* --- Loader Animation --- */
.tracking-loader {
    text-align: center;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 180, 216, 0.2);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.loading-subtext {
    color: var(--text-secondary);
    font-size: 0.95rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

th,
td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr:hover {
    background: var(--bg-subtle);
}