:root {
    --primary: #0b4f8a;
    --primary-dark: #07355e;
    --primary-light: #e8f2fc;
    --success: #198754;
    --success-light: #d1e7dd;
    --warning: #fd7e14;
    --warning-light: #ffe8d6;
    --danger: #dc3545;
    --danger-light: #f8d7da;
    --gray-bg: #f3f5f8;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --keypad-btn-bg: #ffffff;
    --keypad-btn-active: #dbeafe;
    --safe-bottom: env(safe-area-inset-bottom, 12px);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

input, textarea {
    user-select: text;
}

img {
    max-width: 100%;
    height: auto;
}

html, body {
    margin: 0;
    padding: 0;
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overscroll-behavior-y: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f1f5f9;
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

button, a, .keypad-btn, .driver-tab-btn, .manifest-card, .invoice-card, .item-card, .header-btn {
    touch-action: manipulation;
}

/* App Container - Strictly single-column mobile phone layout on all devices */
.driver-app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    background: #f8fafc;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    body {
        background-color: #e2e8f0;
    }
    .driver-app-container {
        max-width: 520px;
    }
}

/* App Header */
.driver-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: white;
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.15s;
}

.header-btn:active {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0.96);
}

.header-title-box {
    display: flex;
    flex-direction: column;
    outline: none !important;
    border: none !important;
    user-select: none;
    -webkit-user-select: none;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    outline: none !important;
    border: none !important;
}

.header-subtitle {
    font-size: 12px;
    opacity: 0.85;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Main Content Area */
.driver-content {
    flex: 1;
    padding: 14px;
    padding-bottom: calc(var(--safe-bottom) + 80px);
}

/* Page Header Date Strip */
.route-date-strip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 8px 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.route-date-pill {
    background: #0284c7;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(2, 132, 199, 0.3);
}

.route-info-sub {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

/* Date / Manifest Banner */
.date-selector-bar {
    background: #ffffff;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.date-nav-btn {
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.date-nav-btn:active {
    background: #c5def6;
}

.date-picker-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 1;
    padding: 4px 8px;
    border-radius: 10px;
    transition: background 0.15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.date-picker-wrapper:hover {
    background: #f8fafc;
}

.date-picker-wrapper:active {
    background: #f1f5f9;
}

.native-date-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
    -webkit-appearance: none;
    display: block;
}

.date-display {
    text-align: center;
    pointer-events: none;
}

.date-display-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.date-chevron {
    font-size: 11px;
    color: var(--primary);
}

.date-display-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.jump-today-btn {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.jump-today-btn:active {
    background: #bae6fd;
    transform: scale(0.97);
}

/* Search Bar */
.driver-search-box {
    margin-bottom: 14px;
    position: relative;
}

.driver-search-input {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    padding: 0 16px 0 42px;
    font-size: 16px;
    background: #ffffff;
    color: var(--text-main);
    outline: none;
}

.driver-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.15);
}

.driver-search-icon {
    position: absolute;
    left: 14px;
    top: 14px;
    font-size: 18px;
    color: var(--text-muted);
}

/* Tabs */
.driver-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.driver-tab-btn {
    flex: 1;
    min-height: 44px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    padding: 0 12px;
}

.driver-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Manifest Card */
.manifest-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.1s, border-color 0.15s;
    position: relative;
    overflow: hidden;
}

.manifest-card:active {
    transform: scale(0.985);
    background: #fafcff;
}

.manifest-card.has-pending {
    border-left: 6px solid var(--warning);
}

.manifest-card.all-completed {
    border-left: 6px solid var(--success);
}

.manifest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.manifest-id {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
}

.manifest-driver {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.manifest-truck {
    font-size: 13px;
    color: var(--text-muted);
}

.manifest-stats-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.badge-pending {
    background: var(--warning-light);
    color: #a04600;
    border: 1px solid #ffd2ab;
}

.badge-complete {
    background: var(--success-light);
    color: #0d6338;
    border: 1px solid #a3cfbb;
}

.badge-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid #c8e0f7;
}

/* Invoice Stop Card */
.invoice-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.1s;
}

.invoice-card:active {
    transform: scale(0.985);
    background: #f8fbff;
}

.invoice-card.has-zero-weight {
    border-color: #fca311;
    background: #fffdfa;
}

.invoice-card.is-complete {
    border-color: #a3cfbb;
}

.invoice-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.stop-badge {
    background: var(--primary);
    color: white;
    font-weight: 800;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.inv-number {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-dark);
}

.inv-customer-name {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0;
}

.inv-address {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.3;
}

.inv-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    margin-top: 6px;
}

.inv-amount {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

/* Invoice Header Sticky Summary in Items Page */
.invoice-info-banner {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.nav-stops-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.nav-stop-btn {
    flex: 1;
    height: 40px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-stop-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-stop-btn:not(:disabled):active {
    background: #e2e8f0;
}

/* Item Card */
.item-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border: 1.5px solid var(--border-color);
    position: relative;
}

.item-card.needs-weight {
    border-color: #ff9800;
    background: #fffaf0;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.item-card.is-weighed {
    border-color: #bbf7d0;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.item-code {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 6px;
    border-radius: 4px;
}

.item-desc {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 4px 0 6px 0;
    line-height: 1.25;
}

.item-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Eye-catching Ordered Qty Badge for Warehouse Scale Workers */
.ordered-qty-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fffbeb;
    border: 2px solid #f59e0b;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.ordered-qty-label {
    font-size: 12px;
    font-weight: 800;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ordered-qty-value {
    font-size: 19px;
    font-weight: 900;
    color: #78350f;
    letter-spacing: -0.2px;
}

/* Weight Entry Button / Display */
.weight-action-area {
    margin-top: 8px;
}

.enter-weight-btn {
    width: 100%;
    min-height: 52px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(245, 124, 0, 0.25);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(255, 152, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}

.enter-weight-btn:active {
    transform: scale(0.97);
    background: #e65100;
}

.weighed-display-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 8px 12px;
}

.weighed-value {
    font-size: 20px;
    font-weight: 800;
    color: #15803d;
}

.weighed-amt {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.edit-weight-btn {
    background: #ffffff;
    border: 1.5px solid #0284c7;
    color: #0284c7;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.edit-weight-btn:active {
    background: #e0f2fe;
}

.edit-weight-btn.blue {
    background: #0284c7;
    border: 1.5px solid #0284c7;
    color: #ffffff;
}

.edit-weight-btn.blue:active {
    background: #0369a1;
}

/* Touch Keypad Bottom Sheet */
.keypad-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.keypad-sheet {
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    padding: 16px;
    padding-bottom: calc(var(--safe-bottom) + 12px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.keypad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.keypad-item-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.keypad-close-btn {
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.keypad-display-panel {
    background: #f8fafc;
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.keypad-live-weight {
    font-size: 34px;
    font-weight: 900;
    color: var(--primary-dark);
    font-family: monospace;
}

.keypad-live-subtotal {
    text-align: right;
    font-size: 14px;
    color: var(--text-muted);
}

.keypad-subtotal-val {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

/* Keypad Grid */
.keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.key-btn {
    background: var(--keypad-btn-bg);
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    height: 62px;
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background 0.1s, transform 0.08s;
}

.key-btn:active {
    background: var(--keypad-btn-active);
    transform: scale(0.95);
    border-color: var(--primary);
}

.key-btn.backspace {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
    font-size: 20px;
}

.key-btn.clear {
    background: #f1f5f9;
    color: #475569;
    font-size: 16px;
    font-weight: 800;
}

/* Save Actions */
.keypad-actions {
    display: flex;
    gap: 10px;
}

.keypad-save-btn {
    flex: 1;
    height: 56px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
}

.keypad-save-btn:active {
    transform: scale(0.97);
    background: #14532d;
}

.keypad-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quick weight preset chips */
.preset-chips-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
}

.preset-chip {
    background: #e2e8f0;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
}

.preset-chip:active {
    background: #cbd5e1;
}

/* Toast Notification */
.driver-toast {
    position: fixed;
    bottom: calc(var(--safe-bottom) + 20px);
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInOut 3s forwards ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 20px); }
}

/* Keep UI as mobile size (single column) even when browsing on desktop */
@media (min-width: 768px) {
    .manifest-grid,
    .invoice-grid,
    .items-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .keypad-sheet {
        max-width: 520px;
        border-radius: 20px 20px 0 0;
    }

    .item-card {
        padding: 16px;
    }
}

/* Login Page Styles */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0b3b60 0%, #07253d 100%);
}

.login-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 8px;
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    color: #0b3b60;
    margin: 0;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 4px 0 0 0;
}

.login-error-banner {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    animation: loginShake 0.3s ease-in-out;
}

@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.login-field-group {
    margin-bottom: 18px;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
    color: #94a3b8;
    pointer-events: none;
}

.login-input {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    padding: 0 46px 0 44px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input:focus {
    border-color: #0b4f8a;
    box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.15);
}

.login-eye-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    padding: 6px;
    cursor: pointer;
    opacity: 0.7;
}

.login-eye-btn:active {
    opacity: 1;
}

.login-submit-btn {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #0b4f8a 0%, #07355e 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 4px 12px rgba(11, 79, 138, 0.3);
    transition: transform 0.1s, background 0.15s;
}

.login-submit-btn:active {
    transform: scale(0.98);
    background: #052644;
}

.login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

/* Logo & Navigation Button Styles */
.header-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    background: #ffffff;
    padding: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}

.header-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.header-logo-img:active {
    transform: scale(0.92);
}

.header-nav-back-btn {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white !important;
    font-size: 15px;
    font-weight: 800;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.header-nav-back-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.96);
}

.login-brand-logo {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    object-fit: contain;
    background: #ffffff;
    padding: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    margin-bottom: 12px;
}

/* Tuna Banner Button - Big Orange if I_QTY = 0 (pending), Blue if I_QTY > 0 (completed & editable) */
.tuna-banner-btn {
    color: #ffffff !important;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none !important;
    transition: transform 0.15s, box-shadow 0.15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Big Orange when any Tuna item has I_QTY = 0 (needs weight) */
.tuna-banner-btn.pending {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.45) !important;
    border: 2px solid #fdba74 !important;
}

.tuna-banner-btn.pending:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
}

/* Blue when all Tuna items have I_QTY > 0 (editable) */
.tuna-banner-btn.completed {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.tuna-banner-btn.completed:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
}

.tuna-arrow-pill {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}
