
    .welcome-body { 
        background: #007bff; 
        color: white; 
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        justify-content: center; 
        height: 100vh; 
        margin: 0; 
        text-align: center;
    }
    
    .logo { width: 100px; margin-bottom: 20px; border-radius: 20%; }
    
    .install-card { 
        background: white; 
        color: #333; 
        padding: 30px; 
        border-radius: 25px; 
        width: 85%; 
        max-width: 400px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.3); 
    }

    /* Combined the install button styles */
    .btn-install { 
        background: #28a745; 
        color: white; 
        padding: 15px 25px; 
        border-radius: 12px; 
        border: none;
        font-size: 16px;
        font-weight: bold; 
        display: block; 
        width: 100%;
        margin-top: 20px;
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .btn-install:active { transform: scale(0.95); }

    .instructions {
        text-align: left; 
        font-size: 13px; 
        margin-top: 20px; 
        color: #666;
        border-top: 1px solid #eee;
        padding-top: 15px;
    }



/* ==========================================================================
   1. Login Page
   ========================================================================== */

/* Centering the login screen */
/* Update these specific blocks in your style.css */

body.login-body {
    background-color: #f8f9fa !important; /* Light grey background looks better */
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important; /* Stack logo -> title -> boxes vertically */
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

.app-logo-circle {
    width: 80px !important;
    height: 80px !important;
    background: #28a745 !important; /* Blue background */
    color: white !important;
    font-size: 40px !important;
    display: flex !important; /* This centers the emoji */
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important; /* Makes it a circle */
    margin: 0 auto 20px !important; /* Centers the circle horizontally */
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

.login-card {
    width: 100%;
    max-width: 350px;
    padding: 20px;
    text-align: center;
}

.pin-box-container {
    display: flex !important;
    flex-direction: row !important; /* THIS IS THE FIX: Forces boxes side-by-side */
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 20px !important;
}

.pin-box {
    width: 50px !important;
    height: 60px !important;
    text-align: center !important;
    font-size: 24px !important;
    font-weight: bold !important;
    border: 2px solid #ced4da !important;
    border-radius: 12px !important; /* Rounded corners */
    background: #ffffff !important;
    outline: none !important;
    /* Prevent default browser styles that make boxes look flat */
    -webkit-appearance: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* This targets the inputs inside the container specifically */
.pin-box-container input.pin-box {
    display: inline-block !important; /* Prevents vertical stacking */
    width: 50px !important;
    margin: 0 5px !important; /* Adds a little breathing room between boxes */
}

.pin-box:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 8px rgba(0,123,255,0.25) !important;
}

/* Optional: Error shake animation */
.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}




/* ==========================================================================
   Global & Layout
   ========================================================================== */
/* 1. LOCK THE VIEWPORT */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #fff;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}


/* 2. FIXED HEADER */

.main-header {
    height: 60px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center; /* Centers the title */
    position: sticky;
    top: 0;
    z-index: 1000;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Ensures it doesn't squish */
}

/* Color Modifiers */
.header-dashboard { background: #075e54; } /* WhatsApp Dark Green */
.header-trip      { background: #1cc88a; } /* Success Green */

/* Header Components */
.header-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
}

.back-link {
    display: flex;
    position: absolute;  
    left: 15px;             
    z-index: 10
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white !important;
    text-decoration: none;
    margin-right: 12px;
}

.back-link:active {
    background: rgba(255, 255, 255, 0.3); /* Tap effect for mobile */
    transform: scale(0.95);
}

/* 3. App Body */

.app-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
}


/* 4. THE SCROLLABLE HUB (The Middle) */

.main-dashboard-content {
    flex: 1;
    overflow-y: auto;
    display: flex;              
    flex-direction: column;
    min-height: 0;              
}



.logo-img { height: 40px; width: auto; }

/* ==========================================================================
   Stats & Action Grid (Dashboard Parts)
   ========================================================================== */
.stats-area { 
    
    background: #fff; 
    padding: 20px 10px; 
    border-radius: 0 0 20px 20px; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}

.circle-stat {
    width: 130px; height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, #128c7e, #25d366);
    color: white;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 15px rgba(18, 140, 126, 0.3);
    border: 4px solid white;
}
.circle-stat .num { font-size: 36px; font-weight: 900; }
.circle-stat .label { font-size: 10px; font-weight: 600; text-transform: uppercase; }

.action-grid { 
    display: grid; 
    justify-content: center;  /* Centers horizontally */
    align-items: center;      /* Centers vertically */
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px;               /* was 12px */
    padding: 0 10px;        /* was 15px */
    margin-top: 10px;
    margin-bottom: 10px;    /* was 30px */
}

.action-card {
    background: #fff;
    border-radius: 15px;
    padding: 10px 5px;      /* was 15px */
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.icon-bg {
    width: 45px; height: 45px;
    border-radius: 12px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}
.bg-add { background: #4e73df; }
.bg-edit { background: #f6c23e; }
.bg-report { background: #1cc88a; }
.text-label { font-size: 11px; font-weight: 700; }


/* ==========================================================================
   Task Bar (Cleaned & Unified)
   ========================================================================== */

.pinned-tasks {
    position: sticky;
    top: 0;
    z-index: 150;
    background: #ffffff;
    padding-top: 5px;
}

.task-container {
    max-height: 35vh;       /* adjust as needed */
    overflow-y: auto;
}

/* --- TASK COLLAPSE LOGIC --- */


.task-expand-box {
    position: relative;
    width: 100%;
}

/* Hide tasks after 3 */
.task-expand-box.collapsed .task-item.hidden-task {
    display: none;
}

.hidden-task {
    display: none !important;
}


/* Gradient fade */
.task-expand-box.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(transparent, #fffdf5);
    pointer-events: none;
    z-index: 5;
}


/* Toggle Button Styling */
#toggleTasksBtn {
    background: none;
    border: none;
    color: #856404;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    width: 100%;
    cursor: pointer;
}


.task-card {
    background: #fffdf5 !important; /* Elegant Soft Cream */
    border: 1px solid #f9eebc !important;
    border-radius: 18px !important;
    transition: all 0.3s ease;
}

.task-header {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #856404 !important;
}

.task-item {
    border-bottom: 1px solid rgba(0,0,0,0.04) !important;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.task-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0;
}

.task-text {
    font-size: 15px;
    line-height: 1.4;
    color: #2d3436;
}

.task-type-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

/* TASK */
.task-type-badge.task {
    background: #f1f3f5;
    color: #495057;
}

/* TRIP */
.task-type-badge.trip {
    background: #e7f1ff;
    color: #0d6efd;
}


.task-date-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #f1f1f1;
    font-weight: 700;
}

.task-circle-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #ffffff;
    flex-shrink: 0;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.task-circle-btn:hover {
    border-color: #adb5bd;
    background: #f8f9fa;
}

.task-circle-btn:active {
    transform: scale(0.92);
}


.btn-done {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 50% !important;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-done:active {
    transform: scale(0.9);
    background: #e8f5e9 !important;
}

/* Specific colors for urgency */
.text-today { color: #007bff !important; } /* Blue for today */
.text-overdue { color: #dc3545 !important; } /* Red for past */
.text-upcoming { color: #636e72 !important; } /* Grey for future */



/* ==========================================================================
   Chat & Long-Press Styles
   ========================================================================== */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1; 
    padding: 15px;
    padding-bottom: 10px;
    background: #fff;
}


/* Smooth scroll behavior */
.chat-container {
    scroll-behavior: smooth;
}

.chat-bubble {
    background: #dcf8c6;
    align-self: flex-end;
    padding: 8px 12px;
    border-radius: 10px 0px 10px 10px;
    max-width: 85%;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-size: 15px;
    user-select: none; /* Required for Long-Press logic */
    transition: transform 0.1s;
    word-wrap: break-word;
    margin-bottom: 8px;
    
}

/* Feedback when you tap or hold a note */
.chat-bubble:active { 
    transform: scale(0.98); 
    background: #cbedab; 
}

.chat-time {
    font-size: 10px;
    color: #777;
    text-align: right;
    margin-top: 4px;
    display: block;
}

/* The floating menu container */
.note-actions {
    position: absolute;
    top: -45px;
    right: 0;
    background: #ffffff;
    border-radius: 8px;
    display: none; /* Hidden by default */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 3000;
    overflow: hidden;
    display: flex;
}

.note-actions button {
    border: none;
    background: none;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.note-actions .btn-edit { color: #007bff; border-right: 1px solid #eee; }
.note-actions .btn-delete { color: #dc3545; }

/* Highlight the bubble being edited/deleted */
.bubble-selected {
    background: #e1f5fe !important;
    border: 1px solid #00a884 !important;
}




/* ========================================================================== */
/* WhatsApp-Style Input Bar */
/* ========================================================================== */

/* Wrapper to fix input at bottom */
.wa-input-wrapper {
    width: 100%;
    background: transparent;
    box-shadow: none;
    padding: 6px;
    display: flex;
    bottom: 0;
    justify-content: center;
    align-items: center;
    z-index: 2000;

    flex-shrink: 0;     /* 🔥 keeps height */
    position: sticky;  /* 🔥 IMPORTANT */
}


/* The input bar container */
.wa-input-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: none;
    background: #fff;
    border-radius: 25px;
    padding: 6px 12px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}


@media (min-width: 768px) {
    .wa-input-bar {
        max-width: 600px;   /* desktop only */
        margin: 0 auto;     /* center it */
    }
}


/* Textarea style */
.wa-textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 15px;
    padding: 8px 40px 8px 12px; /* space for mic + attachment */
    border-radius: 20px;
    background: transparent;
    line-height: 1.3;
    max-height: 120px; /* prevent huge growth */
    overflow-y: auto;
}

/* Attachment icon inside input (right side) */
.wa-input-bar::after {
    content: "📎";
    position: absolute;
    right: 58px; /* space for mic */
    bottom: 12px;
    font-size: 18px;
    color: #777;
    pointer-events: none; /* visual only */
}

/* Mic button */
.wa-mic-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #00a884; /* WhatsApp green */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 8px;
    transition: background 0.2s ease;
}

/* Mic recording state (JS should toggle a class) */
.wa-mic-btn.recording {
    background: #ff3b30; /* Red while recording */
    animation: pulse 1.2s infinite;
}

/* Recording overlay above input bar */
.wa-recording-overlay {
    position: fixed;
    bottom: 70px; /* just above input bar */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    display: none;
    z-index: 2100;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}


/* Small pulse animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ========================================================================== */
/* Trip Page */
/* ========================================================================== */

body.page-add-trip {
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    overflow: hidden; 
}

  
.add-trip-wrapper {
    height: calc(100vh - 60px); 
    overflow-y: scroll; 
    -webkit-overflow-scrolling: touch; 
    padding-bottom: 80px; 
}

.card-custom { background: white; border-radius: 15px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin: 15px; }


.form-label {
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    margin-top: 12px;
    display: block;
}

.form-control {
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #ced4da;
    width: 100%;
}

.total-box { background: #1cc88a; color: white; padding: 15px; margin: 10px; border-radius: 15px; text-align: center; }

 .btn-save { background: #007bff; color: white; border: none; width: 100%; padding: 14px; border-radius: 10px; font-weight: bold; margin-top: 25px; font-size: 16px; }
 
    
.paid-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 26px;
    transition: 0.25s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.25s;
}

.switch input:checked + .slider {
    background-color: #28a745; /* green when ON */
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

/* Keep your existing style */
.report-card { background: white; border-radius: 12px; padding: 12px; margin: 10px; border-left: 5px solid #1cc88a; }

/* New Small Toggle Switch */

.switch-sm { position: relative; display: inline-block; width: 34px; height: 18px; }
.switch-sm input { opacity: 0; width: 0; height: 0; }
.slider-sm { position: absolute; cursor: pointer; inset: 0; background-color: #ccc; border-radius: 18px; transition: 0.3s; }
.slider-sm:before { content: ""; position: absolute; height: 12px; width: 12px; left: 3px; bottom: 3px; background-color: white; border-radius: 50%; transition: 0.3s; }
input:checked + .slider-sm { background-color: #1cc88a; } /* Matches your green border */
input:checked + .slider-sm:before { transform: translateX(16px); }


#agent_input, #driver_input, #pickup_input, #drop_input {
    text-transform: capitalize;
}

/* ========================================================================== */
/* Reports Page */
/* ========================================================================== */

      
 .filter-section { background: white; padding: 15px; margin: 10px; border-radius: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
        
  @media print {
    /* Hide the buttons, the filters, and the back button when saving to PDF */
    .nav-hide, 
    .filter-section, 
    .main-header .back-link,
    .btn-success {
        display: none !important;
    }
    
    /* Ensure the background colors show up in the PDF */
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .report-card {
        break-inside: avoid; /* Prevents cards from being split across two pages */
        border: 1px solid #ddd !important;
    }
}