        :root {
            --primary: #0056b3;
            --header-bg: #1e293b;
            --bg: #f4f6f9;
            --card-bg: #ffffff;
            --text: #0f172a;
            --success: #28a745;
            --border: #e2e8f0;
            --header-height: 100px;
        }
        * { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
        body { background-color: var(--bg); color: var(--text); padding-bottom: 30px; }

        header.sticky-header {
            position: fixed; top: 0; left: 0; right: 0; height: var(--header-height);
            background-color: var(--header-bg); color: #ffffff; padding: 12px 16px; z-index: 1000;
            display: flex; flex-direction: column; justify-content: space-between;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        .header-top { display: flex; justify-content: space-between; align-items: center; }
        .driver-info { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
        .live-clock { font-size: 0.95rem; font-weight: 600; background: rgba(255,255,255,0.15); padding: 4px 10px; border-radius: 20px; }
        .header-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 6px; }
        .active-route-badge { font-size: 0.9rem; color: #93c5fd; font-weight: 600; }
        .btn-change-route { background: rgba(255,255,255,0.2); color: white; border: none; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
        .btn-logout { background-color: #dc3545; color: white; border: none; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; }

        main.content { margin-top: calc(var(--header-height) + 16px); padding: 0 16px; max-width: 600px; margin-left: auto; margin-right: auto; }
        .card { background: var(--card-bg); border-radius: 10px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--border); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
        .stop-completed { border-left: 5px solid var(--success); }
        .btn { display: block; width: 100%; padding: 12px 0; margin-top: 10px; border: none; border-radius: 6px; font-size: 15px; font-weight: bold; cursor: pointer; text-align: center; color: white; background-color: #0069d9; }
        .btn-purple { background-color: #6f42c1; }
        .btn-green { background-color: var(--success); }
        .btn-reset { background-color: #6c757d; }
        .btn-detail { background-color: #075e73; }
        .stop-brand { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #0b6075; color: #07566d; }
        .bft-logo { font-size: 1.45rem; font-weight: 900; letter-spacing: 2px; line-height: 1; }
        .bft-subtitle { display: block; margin-top: 3px; font-size: 0.55rem; letter-spacing: 0.8px; font-weight: 700; }
        .stop-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
        .stop-actions-2col { grid-template-columns: repeat(2, 1fr); }
        .stop-action { min-height: 48px; margin-top: 0; padding: 8px 4px; font-size: 13px; background: #075e73; }
        .stop-action.navigation { background: #ed4b20; }
        .stop-action:disabled { background: #adb5bd; cursor: not-allowed; }
        .order-heading { margin-top: 10px; text-align: center; font-weight: 700; color: #07566d; }
        .stop-summary-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 10px 0; border-top: 1px solid #0b6075; border-bottom: 1px solid #0b6075; color: #07566d; }
        .stop-summary-row .circle { width: 22px; height: 22px; border: 2px solid #15bfe3; border-radius: 50%; }
        .stop-summary-row .circle.checked { display: flex; align-items: center; justify-content: center; background: #15bfe3; color: #fff; }
        .stop-summary-row .circle.checked::after { content: "✓"; font-size: 0.75rem; font-weight: 800; }
        .btn-navigate-full { background: #ed4b20; margin-top: 14px; }
        .stop-compact { padding: 14px 16px; }
        .stop-compact-address { margin-top: 8px; color: #07566d; line-height: 1.3; }
        .stop-compact-eta { margin-top: 4px; font-size: 0.86rem; color: #07566d; }
        .customer-section { margin-top: 14px; color: #07566d; }
        .customer-section h4, .stop-section-label { margin-bottom: 4px; font-size: 0.92rem; letter-spacing: 0.4px; text-transform: uppercase; }
        .customer-address { line-height: 1.35; }
        .phone-input { width: 100%; margin-top: 6px; padding: 9px 10px; border: 1px solid #b7c8ce; border-radius: 5px; color: #07566d; font-size: 0.95rem; }
        .customer-section .stop-actions { margin-top: 12px; }
        .delivery-note { margin-top: 12px; padding: 12px 10px; background: #b7e4a0; color: #111; text-align: center; font-size: 1rem; font-weight: 700; }
        .stop-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; padding: 12px 0; border-top: 1px solid #0b6075; border-bottom: 1px solid #0b6075; text-align: center; color: #07566d; }
        .stop-metric strong { display: block; font-size: 0.9rem; text-transform: uppercase; }
        .stop-metric span { display: block; margin-top: 3px; font-size: 1.08rem; }
        .stop-content { margin: 12px 0; color: #07566d; }
        .stop-content-value { margin-top: 6px; font-size: 1rem; }
        .detail-actions { display: grid; gap: 12px; margin: 18px 0; }
        .detail-action-row { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 18px; border: none; border-radius: 8px; background: #075e73; color: #fff; font-size: 1rem; cursor: pointer; }
        .detail-action-row .circle { width: 30px; height: 30px; border: 2px solid #15bfe3; border-radius: 50%; }
        .detail-action-row .circle.checked { display: flex; align-items: center; justify-content: center; background: #15bfe3; color: #fff; }
        .detail-action-row .circle.checked::after { content: "✓"; font-weight: 800; }
        .detail-footer { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; margin-top: 20px; }
        .btn-back { min-height: 54px; margin-top: 0; background: #14b8d6; font-size: 1.6rem; }
        .btn-complete { min-height: 54px; margin-top: 0; background: #14b8d6; }
        .btn-complete:disabled { background: #adb5bd; cursor: not-allowed; }
        .event-list { display: grid; gap: 10px; margin: 14px 0; }
        .event-item { padding: 10px; border-left: 4px solid #075e73; background: #f8fafc; color: #07566d; }
        .event-time { display: block; margin-top: 5px; color: #64748b; font-size: 0.78rem; }
        .event-input { width: 100%; min-height: 130px; margin-top: 10px; padding: 10px; border: 1px solid #b7c8ce; border-radius: 6px; color: #07566d; font-size: 1rem; resize: vertical; }
        .event-footer { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; margin-top: 14px; }
        .signature-pad { width: 100%; height: 220px; margin-top: 12px; border: 2px solid #075e73; border-radius: 8px; background: #fff; touch-action: none; }
        .signature-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
        .signature-preview { width: 100%; max-height: 150px; object-fit: contain; margin-top: 10px; border: 1px solid #d7e1e6; border-radius: 6px; background: #fff; }
        .scan-input { width: 100%; margin: 12px 0 8px; padding: 12px; border: 1px solid #b7c8ce; border-radius: 6px; font-size: 1rem; }
        .scan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .scanner-video { width: 100%; max-height: 260px; margin-top: 10px; border-radius: 8px; background: #000; object-fit: cover; }
        .package-list { display: grid; gap: 8px; margin: 14px 0; }
        .package-item { display: flex; align-items: center; justify-content: space-between; padding: 10px; border: 1px solid #d7e1e6; border-radius: 6px; color: #07566d; background: #fff; }
        .package-item.scanned { border-color: #28a745; background: #f0fff4; }
        .package-status { font-weight: 800; color: #28a745; }
        .scan-message { min-height: 22px; margin-top: 8px; font-weight: 700; }
        .scan-message.error { color: #dc3545; }
        .scan-message.success { color: #28a745; }
        .route-active { border: 2px solid var(--success); background: #f0fff4; box-shadow: 0 3px 8px rgba(40,167,69,0.18); }
        .route-active-label { display: inline-block; margin-bottom: 8px; padding: 4px 8px; border-radius: 4px; color: #155724; background: #d4edda; font-size: 12px; font-weight: bold; text-transform: uppercase; }
        .badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; background: #e9ecef; }
        .badge-success { background: #d4edda; color: #155724; }
        .photo-preview { width: 100%; max-height: 200px; object-fit: cover; border-radius: 8px; margin-top: 10px; border: 1px solid #ddd; }
        .address-link { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
        .address-link:hover, .address-link:focus { color: #003d80; }
        .hidden { display: none !important; }

        #loginView { max-width: 400px; margin: 80px auto; padding: 20px; background: white; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
        .form-group { margin-bottom: 15px; }
        .form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
        .form-group select, .form-group input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; }
