/* Deliver-It Modern Theme Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Nature-Inspired Green Color Palette */
    --primary-color: #5A6E1B;
    --primary-dark: #394D16;
    --primary-light: #ACB232;
    --secondary-color: #ACB232;
    --secondary-dark: #5A6E1B;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Neutral Colors - Light Mode */
    --dark-color: #0f172a;
    --dark-gray: #1e293b;
    --gray: #64748b;
    --light-gray: #cbd5e1;
    --light-color: #f1f5f9;
    --lighter-color: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    
    /* Background Colors - Light Mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-navbar: rgba(255, 255, 255, 0.95);
    --bg-input: #ffffff;
    --bg-hover: #f1f5f9;
    
    /* Text Colors - Light Mode */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Gradients - Nature Green Theme */
    --gradient-primary: linear-gradient(135deg, #5A6E1B 0%, #394D16 100%);
    --gradient-secondary: linear-gradient(135deg, #ACB232 0%, #5A6E1B 100%);
    --gradient-success: linear-gradient(135deg, #ACB232 0%, #E3E78C 100%);
    --gradient-hero: linear-gradient(135deg, #243816 0%, #394D16 50%, #5A6E1B 100%);
    
    /* Shadows - Light Mode */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    /* Neutral Colors - Dark Mode */
    --dark-color: #f8fafc;
    --dark-gray: #cbd5e1;
    --gray: #94a3b8;
    --light-gray: #475569;
    --light-color: #1e293b;
    --lighter-color: #0f172a;
    --white: #1e293b;
    --border-color: #334155;
    
    /* Background Colors - Dark Mode */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-navbar: rgba(15, 23, 42, 0.95);
    --bg-input: #1e293b;
    --bg-hover: #334155;
    
    /* Text Colors - Dark Mode */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Shadows - Dark Mode (lighter shadows) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    background-image: linear-gradient(to bottom, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Touch-friendly elements */
a, button, .btn, .package-size-option {
    -webkit-tap-highlight-color: rgba(90, 110, 27, 0.1);
    touch-action: manipulation;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Modern Navigation */
.navbar {
    background: var(--bg-navbar);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9375rem;
}

.nav-menu a:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-menu a.active {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(90, 110, 27, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(90, 110, 27, 0.5);
}

.btn-secondary {
    background: var(--gradient-success);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.5);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Hero Section */
.hero {
    background: var(--gradient-hero);
    color: #ffffff;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="2"/></g></svg>');
    opacity: 0.5;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-card);
}

.features h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Target Audience */
.target-audience {
    padding: 5rem 0;
    background: var(--lighter-color);
}

.target-audience h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.audience-item {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 1.125rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    color: var(--text-primary);
}

.audience-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

/* Pricing Estimator */
.pricing-estimator {
    padding: 5rem 0;
    background: var(--bg-card);
}

.pricing-estimator h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.estimator-box {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.price-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: #ffffff;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.price-result h3 {
    margin: 0;
    font-size: 1.5rem;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="%23ffffff" stroke-width="1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.auth-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
    font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(90, 110, 27, 0.1);
    background: var(--bg-input);
    color: var(--text-primary);
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    border-color: var(--info-color);
}

/* Dashboard */
.dashboard {
    padding: 2.5rem 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    color: var(--text-primary);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    -webkit-overflow-scrolling: touch;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    min-width: 600px;
    color: var(--text-primary);
}

table th,
table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

table td {
    white-space: normal;
    word-wrap: break-word;
    max-width: 200px;
}

table tr {
    transition: var(--transition-fast);
}

table tr:hover {
    background: var(--bg-hover);
}

table tr:last-child td {
    border-bottom: none;
}

    /* Mobile Table Wrapper */
@media (max-width: 768px) {
    .table-container::after {
        content: '← Swipe to see more →';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(90, 110, 27, 0.1);
        padding: 0.5rem 1rem;
        border-radius: var(--radius);
        font-size: 0.75rem;
        color: var(--primary-color);
        pointer-events: none;
        opacity: 0.7;
    }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--secondary-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info-color);
}

.badge-pending {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: pulse 2s infinite;
}

.notification-badge.pulse {
    animation: pulse-strong 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@keyframes pulse-strong {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* Toast Notification */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--primary-color);
}

.toast-content {
    flex: 1;
    color: var(--text-primary);
}

.toast-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.toast-content small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.toast-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dark mode adjustments for notifications */
[data-theme="dark"] .notification-toast {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .notification-badge {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
}

/* Map Container */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Order Status */
.status-pending { color: var(--warning-color); }
.status-accepted { color: var(--info-color); }
.status-picked_up { color: #8b5cf6; }
.status-in_transit { color: #06b6d4; }
.status-delivered { color: var(--secondary-color); }
.status-cancelled { color: var(--danger-color); }

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .nav-brand h1 {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        flex-wrap: nowrap;
        gap: 0.25rem;
        margin-top: 0.5rem;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-menu a {
        flex-shrink: 0;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    .dashboard {
        padding: 1.5rem 0;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card .stat-value {
        font-size: 2rem;
    }
    
    .auth-box {
        padding: 2rem 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    /* Tables - Mobile Responsive */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
        font-size: 0.875rem;
    }
    
    table th,
    table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    table th {
        font-size: 0.7rem;
    }
    
    /* Form Responsive */
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    /* Package Size Selection */
    .package-size-selection {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
    
    .package-size-option {
        padding: 1rem 0.75rem;
    }
    
    .package-size-option .icon {
        font-size: 2rem;
    }
    
    /* Location Inputs */
    .location-inputs {
        grid-template-columns: 1fr !important;
    }
    
    /* Map Container */
    .map-container {
        height: 300px !important;
    }
    
    /* Tracking Container */
    .tracking-container {
        grid-template-columns: 1fr !important;
    }
    
    /* Chat Container */
    #chatContainer {
        max-height: 300px !important;
    }
    
    /* Info Box */
    .info-box {
        padding: 1rem;
    }
    
    .info-box h3 {
        font-size: 1rem;
    }
    
    .info-box p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    /* Form Row */
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    /* Package Size Cards */
    .package-size-card {
        margin-bottom: 1rem;
    }
    
    /* Dashboard Header Buttons */
    .dashboard-header > div {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }
    
    .dashboard-header .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
        flex: 1;
        min-width: 100px;
    }
    
    /* Action buttons in tables */
    table .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    /* Card actions */
    .card-header .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .nav-brand h1 {
        font-size: 1.25rem;
    }
    
    .nav-menu {
        flex-direction: row;
        align-items: center;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-menu a {
        flex-shrink: 0;
        text-align: center;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    
    .dashboard-header h1 {
        font-size: 1.25rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    table {
        min-width: 500px;
        font-size: 0.75rem;
    }
    
    table th,
    table td {
        padding: 0.5rem 0.375rem;
        font-size: 0.75rem;
    }
    
    .package-size-selection {
        grid-template-columns: 1fr !important;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
        width: 100%;
        min-height: 44px; /* Touch target size */
    }
    
    .btn-block {
        width: 100%;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .auth-box {
        padding: 1.5rem 1rem;
    }
    
    /* Stack action buttons vertically on very small screens */
    .dashboard-header {
        gap: 0.75rem;
    }
    
    /* Make inputs easier to tap */
    input, select, textarea, button {
        min-height: 44px;
    }
    
    /* Improve table scrolling hint */
    .table-container::after {
        display: none; /* Hide on very small screens */
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: var(--white);
}
