:root {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --accent-color: #50E3C2;
    --bg-gradient-start: #1A1A2E;
    --bg-gradient-end: #16213E;
    --text-main: #FFFFFF;
    --text-muted: #B0B0C0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success-color: #4CAF50;
    --error-color: #E53935;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-main);
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-color);
}

.nav-btn {
    color: var(--text-main);
    text-decoration: none;
    background: var(--glass-bg);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.tracking-main, .admin-main {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Split Layout Updates */
.tracking-split-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: 70vh;
    animation: fadeIn 0.4s ease-out forwards;
}

.tracking-branding {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tracking-branding h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.tracking-branding p {
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 90%;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    margin-bottom: 10px;
    object-fit: cover;
    height: 250px;
}

.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.2);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-size: 14px;
    font-weight: 500;
}

.trust-item i {
    color: var(--accent-color);
    font-size: 18px;
}

.tracking-interaction {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 900px) {
    .tracking-split-main {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: 10px;
    }
    .tracking-branding h1 {
        font-size: 32px;
    }
    .tracking-branding p {
        margin: 0 auto 20px auto;
    }
    .trust-indicators {
        justify-content: center;
    }
    .hero-image {
        height: 200px;
        margin: 0 auto 20px auto;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tracking-glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.tracking-glass-card h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.tracking-glass-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 16px;
    outline: none;
    text-transform: uppercase;
    transition: border 0.3s;
    letter-spacing: 1px;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    padding: 15px 30px;
    border-radius: 10px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.hidden {
    display: none !important;
}

.error-message {
    color: var(--error-color);
    background: rgba(229, 57, 53, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.success-message {
    color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.shipment-info {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: left;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.info-group:nth-child(2) {
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    padding: 0 15px;
    margin: 0 15px;
}

.info-group .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-group .value {
    font-size: 16px;
    font-weight: 600;
    word-break: break-word;
}

/* Vertical Timeline Update */
.vertical-timeline {
    position: relative;
    padding-left: 20px;
    margin-top: 20px;
    text-align: left;
}

.vertical-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 5px;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color, var(--primary-color));
    box-shadow: 0 0 0 3px rgba(26, 26, 46, 1);
    z-index: 2;
    top: 6px;
}

.timeline-item.latest .timeline-dot {
    background: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(80, 227, 194, 0.2), 0 0 0 3px rgba(26, 26, 46, 1);
}

.timeline-content {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.timeline-date {
    font-size: 12px;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.timeline-text {
    font-size: 15px;
    font-weight: 600;
}

.timeline-location {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Admin Styles */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
}

.glass-card h2 {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    outline: none;
    transition: border 0.3s;
}

.form-group input:focus {
    border-color: var(--accent-color);
}

.primary-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.table-container {
    overflow-x: auto;
    max-height: 500px;
}

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

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

th {
    color: var(--text-muted);
    font-weight: 500;
    position: sticky;
    top: 0;
    background: rgba(26, 26, 46, 0.95);
    z-index: 10;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: 0.3s;
    margin-right: 5px;
}

.action-btn:hover {
    background: var(--primary-color);
}

.status-badge {
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    width: 100%;
    max-width: 450px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.secondary-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    .shipment-info {
        flex-direction: column;
        gap: 15px;
    }
    .info-group:nth-child(2) {
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--glass-border);
        border-bottom: 1px solid var(--glass-border);
        padding: 15px 0;
        margin: 0;
    }
    .search-box {
        flex-direction: column;
    }
}
