/* ===== Design Tokens ===== */
:root {
    --navy: #0F172A;
    --navy-light: #1E293B;
    --blue: #3B82F6;
    --blue-light: #60A5FA;
    --blue-dark: #2563EB;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --surface: #F8FAFC;
    --surface-card: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --text-1: #0F172A;
    --text-2: #475569;
    --text-3: #94A3B8;
    --font: 'DM Sans', 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
    --font-mono: 'DM Mono', ui-monospace, monospace;
    --topbar-h: 56px;
    --bottombar-h: 72px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--surface);
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

/* ===== App Shell ===== */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

/* ===== Top Bar ===== */
.mobile-topbar {
    height: var(--topbar-h);
    min-height: var(--topbar-h);
    background: var(--navy);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
}

.mobile-topbar-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.mobile-topbar-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 18px;
}

/* ===== Page Scroll ===== */
.page-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: calc(var(--bottombar-h) + 16px);
    -webkit-overflow-scrolling: touch;
}

/* ===== Auth Page (Login) ===== */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--navy) 0%, #162036 40%, var(--navy-light) 100%);
    background-image:
        linear-gradient(135deg, var(--navy) 0%, #162036 40%, var(--navy-light) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.02) 39px, rgba(255,255,255,0.02) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.02) 39px, rgba(255,255,255,0.02) 40px);
    padding: 48px 20px 24px;
    overflow-y: auto;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-mark {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
}

.logo-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: -2px;
}

.auth-tagline {
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--blue-light), #818CF8, var(--blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: 0.2px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface-card);
    border-radius: 16px;
    padding: 32px 24px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.auth-h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
}

.auth-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 24px;
}

.field-block {
    margin-bottom: 18px;
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.field-wrap {
    position: relative;
}

.field-pfx {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-3);
    pointer-events: none;
    line-height: 1;
}

.field {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font);
    color: var(--text-1);
    background: var(--surface);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.field::placeholder {
    color: var(--text-3);
}

.field-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-3);
    border-radius: 50%;
}

.field-toggle:active {
    background: var(--border-light);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 20px;
    cursor: pointer;
}

.check-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
}

.check-row .ssl-badge {
    margin-inline-start: auto;
    font-size: 11px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.alert-err {
    background: var(--danger-light);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn:hover {
    opacity: 0.95;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.auth-btn:active {
    transform: scale(0.98);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.auth-btn.success-state {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
    margin-top: 24px;
}

.auth-footer a {
    color: var(--text-3);
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--text-2);
}

/* RTL auth overrides */
[dir="rtl"] .field-pfx {
    left: auto;
    right: 14px;
}

[dir="rtl"] .field {
    padding: 0 42px 0 14px;
}

[dir="rtl"] .field-toggle {
    right: auto;
    left: 4px;
}

/* ===== Greeting Card ===== */
.greeting-card {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #FFFFFF;
    padding: 24px 20px 20px;
    position: relative;
    overflow: hidden;
}

.greeting-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.greeting-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 40px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.greeting-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.greeting-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.greeting-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.greeting-shift {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.shift-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ===== KPI Strip ===== */
.kpi-strip {
    display: flex;
    gap: 8px;
    padding: 0 16px;
}

.kpi-mini {
    flex: 1;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
}

.kpi-mini-val {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-mini-label {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
}

/* ===== Notification Banner ===== */
.notif-banner {
    margin: 12px 16px 0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-banner.warning {
    background: var(--warning-light);
    color: #92400E;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.notif-banner.danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== Section Header ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 10px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
}

.section-action {
    font-size: 13px;
    color: var(--blue);
    font-weight: 500;
    cursor: pointer;
}

/* ===== Quick Grid ===== */
.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
}

.quick-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    position: relative;
    min-height: 44px;
}

.quick-card:active {
    transform: scale(0.96);
}

.quick-icon {
    font-size: 28px;
    margin-bottom: 8px;
    line-height: 1;
}

.quick-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 2px;
}

.quick-sub {
    font-size: 12px;
    color: var(--text-3);
}

.quick-count {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 20px;
    height: 20px;
    background: var(--danger);
    color: #FFFFFF;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* ===== Card ===== */
.card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

/* ===== Activity Row ===== */
.activity-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.activity-row:last-child {
    border-bottom: none;
}

.act-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.act-body {
    flex: 1;
    min-width: 0;
}

.act-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
}

.act-meta {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottombar-h);
    background: var(--surface-card);
    display: flex;
    align-items: stretch;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.08);
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    gap: 2px;
    min-height: 44px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-tab-icon {
    font-size: 22px;
    line-height: 1;
    position: relative;
}

.nav-tab-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-3);
    transition: color 0.2s;
}

.nav-tab.active .nav-tab-label {
    color: var(--blue);
    font-weight: 600;
}

.nav-indicator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--blue);
    position: absolute;
    bottom: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.nav-tab.active .nav-indicator {
    opacity: 1;
}

.nav-tab-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    background: var(--danger);
    color: #FFFFFF;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: var(--font);
}

/* ===== Placeholder Pages ===== */
.placeholder-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
}

.placeholder-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
}

/* ===== Utility ===== */
#blazor-error-ui {
    background: var(--warning-light);
    bottom: 0;
    display: none;
    left: 0;
    padding: 12px 20px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 13px;
    color: #92400E;
}

#blazor-error-ui .reload {
    color: var(--blue);
    margin-inline-start: 8px;
}

/* ===== RTL Support ===== */
[dir="rtl"] .greeting-card::before {
    right: auto;
    left: -40px;
}

[dir="rtl"] .greeting-card::after {
    right: auto;
    left: 40px;
}

[dir="rtl"] .quick-count {
    right: auto;
    left: 10px;
}

[dir="rtl"] .nav-tab-badge {
    right: auto;
    left: -8px;
}

/* ===== Receiving Workflow ===== */

/* --- Topbar Dark --- */
.topbar {
    height: var(--topbar-h);
    min-height: var(--topbar-h);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar.dark {
    background: var(--navy);
    color: #FFFFFF;
}

.topbar-back {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
}

.topbar-back:active {
    background: rgba(255, 255, 255, 0.1);
}

.topbar-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-action {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- Step Indicator --- */
.step-indicator {
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.step-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.step-dots {
    display: flex;
    gap: 6px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s, transform 0.2s;
}

.step-dot.active {
    background: var(--blue);
    transform: scale(1.25);
}

.step-dot.done {
    background: var(--success);
}

/* --- Scanner Box --- */
.scanner-box {
    margin: 16px;
    background: var(--navy);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-frame {
    width: 200px;
    height: 200px;
    position: relative;
}

.scanner-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--blue-light);
    border-style: solid;
    border-width: 0;
}

.scanner-corner.tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 8px; }
.scanner-corner.tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 8px; }
.scanner-corner.bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 8px; }
.scanner-corner.br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 8px; }

.scanner-line {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue-light), transparent);
    animation: scanLine 2.5s ease-in-out infinite;
}

@keyframes scanLine {
    0%, 100% { top: 15%; opacity: 0.4; }
    50% { top: 80%; opacity: 1; }
}

.scanner-hint {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.scanner-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
}

.scanner-placeholder-icon {
    font-size: 48px;
    opacity: 0.4;
}

.scanner-placeholder-text {
    font-size: 13px;
}

/* --- Divider --- */
.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    margin: 4px 0 16px;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.or-divider span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Form Fields (Receiving) --- */
.field-group {
    margin-bottom: 16px;
    padding: 0 16px;
}

.field-group .field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}

.field-group .field-label .req {
    color: var(--danger);
    margin-inline-start: 2px;
}

.field-group .field {
    padding: 0 14px;
}

.field-mono {
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

/* --- Info Block --- */
.info-block {
    margin: 16px;
    background: rgba(59, 130, 246, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.info-block-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.info-key {
    font-size: 13px;
    color: var(--text-3);
}

.info-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

/* --- Scan / Action Buttons --- */
.scan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 16px auto;
    height: 50px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    min-height: 44px;
}

.scan-btn:active {
    transform: scale(0.98);
}

.scan-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scan-btn.primary {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.scan-btn.secondary {
    background: var(--surface);
    color: var(--blue);
    border: 1px solid var(--border);
}

.scan-btn.success-btn {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.scan-btn.danger-btn {
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: #FFFFFF;
}

/* --- Task Cards (Receiving Lines) --- */
.task-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface-card);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.15s;
    min-height: 44px;
}

.task-card:active {
    background: var(--surface);
}

.task-card.success {
    opacity: 0.65;
}

.task-card.blue .task-icon {
    color: var(--blue);
}

.task-card.dimmed {
    opacity: 0.45;
}

.task-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--surface);
}

.task-card.success .task-icon {
    color: var(--success);
    background: var(--success-light);
}

.task-body {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-card.success .task-title {
    text-decoration: line-through;
    color: var(--text-3);
}

.task-sub {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

.task-meta {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.task-chevron {
    color: var(--text-3);
    font-size: 14px;
    flex-shrink: 0;
}

/* --- Progress Bar --- */
.prog-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #FFFFFF;
    padding: 16px 20px;
}

.prog-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.prog-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.prog-bar-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.prog-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-light), var(--success));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.prog-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

/* --- Product Header --- */
.product-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #FFFFFF;
    padding: 16px 20px;
}

.product-sku {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* --- Quantity Stepper --- */
.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}

.qty-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    border: none;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-1);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.qty-btn:active {
    background: var(--border-light);
}

.qty-val {
    flex: 1;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-1);
    border: none;
    background: transparent;
    outline: none;
    min-width: 60px;
}

.qty-sep {
    width: 1px;
    height: 28px;
    background: var(--border);
}

/* --- Radio Cards (Condition) --- */
.radio-row {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    flex-wrap: wrap;
}

.radio-card {
    flex: 1;
    min-width: 90px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.radio-card.selected {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.04);
}

.radio-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.radio-card.selected .radio-circle {
    border-color: var(--blue);
}

.radio-circle-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    transform: scale(0);
    transition: transform 0.2s;
}

.radio-card.selected .radio-circle-inner {
    transform: scale(1);
}

.radio-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.radio-sub {
    font-size: 11px;
    color: var(--text-3);
}

/* --- Success Screen --- */
.success-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px 24px;
}

.success-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
    animation: successPop 0.4s ease;
}

@keyframes successPop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 8px;
}

.success-subtitle {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 24px;
}

/* --- Summary Card --- */
.summary-card {
    width: 100%;
    max-width: 360px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.summary-key {
    color: var(--text-3);
}

.summary-val {
    font-weight: 600;
    color: var(--text-1);
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue);
}

.badge-success {
    background: var(--success-light);
    color: #065F46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400E;
}

.badge-gray {
    background: var(--surface);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

/* --- Expiry Pill --- */
.expiry-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
}

.expiry-pill.ok {
    background: var(--success-light);
    color: #065F46;
}

.expiry-pill.warn {
    background: var(--warning-light);
    color: #92400E;
}

.expiry-pill.danger {
    background: var(--danger-light);
    color: var(--danger);
}

/* --- Variance Warning --- */
.variance-warn {
    margin: 0 24px 16px;
    padding: 10px 14px;
    background: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #92400E;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Action Buttons Row --- */
.action-row {
    display: flex;
    gap: 10px;
    padding: 0 16px 24px;
    width: 100%;
    max-width: 400px;
}

.action-row .scan-btn {
    width: auto;
    flex: 1;
    margin: 0;
}

/* --- Textarea --- */
.field-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-1);
    background: var(--surface);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}

.field-textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* --- Receive Page Scroll --- */
.receive-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
}

/* RTL receiving overrides */
[dir="rtl"] .scanner-corner.tl { left: auto; right: 0; border-left-width: 0; border-right-width: 3px; border-top-left-radius: 0; border-top-right-radius: 8px; }
[dir="rtl"] .scanner-corner.tr { right: auto; left: 0; border-right-width: 0; border-left-width: 3px; border-top-right-radius: 0; border-top-left-radius: 8px; }
[dir="rtl"] .scanner-corner.bl { left: auto; right: 0; border-left-width: 0; border-right-width: 3px; border-bottom-left-radius: 0; border-bottom-right-radius: 8px; }
[dir="rtl"] .scanner-corner.br { right: auto; left: 0; border-right-width: 0; border-left-width: 3px; border-bottom-right-radius: 0; border-bottom-left-radius: 8px; }
[dir="rtl"] .task-chevron { transform: rotate(180deg); }

/* ─── Mobile Image Capture ──────────────────────────────────────────── */
.mobile-image-gallery {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.mobile-image-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.mobile-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mobile-image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(239,68,68,.9);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mobile-photo-actions {
    display: flex;
    gap: 8px;
}
.mobile-camera-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border: 2px dashed var(--blue);
    border-radius: 12px;
    background: rgba(59,130,246,.06);
    color: var(--blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
}
.mobile-camera-btn.secondary {
    border-color: var(--border);
    background: transparent;
    color: var(--text-2);
}
.mobile-camera-btn input[type="file"] {
    display: none;
}

/* ─── VAS Workflow ─────────────────────────────────── */
.vas-task-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
}
.vas-task-card.urgent { border-left: 4px solid #ef4444; }
.vas-task-card.express { border-left: 4px solid #f59e0b; }
.vas-task-card.standard { border-left: 4px solid var(--blue); }
.vas-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.vas-type-badge.labeling { background: rgba(29,78,216,.1); color: #1D4ED8; }
.vas-type-badge.repackaging { background: rgba(124,58,237,.1); color: #7C3AED; }
.vas-type-badge.kitting { background: rgba(13,148,136,.1); color: #0D9488; }
.vas-type-badge.giftwrapping { background: rgba(194,120,3,.1); color: #C27803; }
.vas-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}
.vas-lpn-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 16px;
}
.vas-spec-panel {
    margin: 0 16px 12px;
    padding: 12px;
    border-radius: 10px;
    font-size: 12px;
}
.vas-spec-panel.labeling { background: rgba(29,78,216,.06); border: 1px solid rgba(29,78,216,.15); }
.vas-spec-panel.repackaging { background: rgba(124,58,237,.06); border: 1px solid rgba(124,58,237,.15); }
.vas-spec-panel.kitting { background: rgba(13,148,136,.06); border: 1px solid rgba(13,148,136,.15); }
.vas-spec-panel.giftwrapping { background: rgba(194,120,3,.06); border: 1px solid rgba(194,120,3,.15); }

/* ─── Quarantine ──────────────────────────────────── */
.qr-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.qr-card.aged-critical { border-left: 4px solid #ef4444; }
.qr-card.aged-warning { border-left: 4px solid #f59e0b; }
.qr-card.aged-ok { border-left: 4px solid var(--blue); }
.qr-reason-badge { display: inline-flex; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(239,68,68,.1); color: #ef4444; }
.qr-status-badge { display: inline-flex; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.qr-status-badge.active { background: rgba(239,68,68,.1); color: #ef4444; }
.qr-status-badge.released { background: rgba(34,197,94,.1); color: #16a34a; }
.qr-status-badge.disposed { background: rgba(107,114,128,.1); color: #6b7280; }
.qr-status-badge.returnedtosupplier { background: rgba(59,130,246,.1); color: #2563eb; }

/* ─── Expiry Monitor ─────────────────────────────── */
.expiry-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.expiry-card.expired { border-left: 4px solid #ef4444; }
.expiry-card.critical { border-left: 4px solid #f59e0b; }
.expiry-card.near-expiry { border-left: 4px solid var(--blue); }
.expiry-days-badge { display: inline-flex; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.expiry-days-badge.expired { background: rgba(239,68,68,.1); color: #ef4444; }
.expiry-days-badge.critical { background: rgba(245,158,11,.1); color: #d97706; }
.expiry-days-badge.near-expiry { background: rgba(59,130,246,.1); color: #2563eb; }

/* ─── Outbound Picking/Loading ──────────────────── */
.pick-lpn-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin: 12px 16px; }
.pick-lpn-card .lpn-code { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--navy); }
.pick-location { font-family: var(--font-mono); font-size: 13px; color: var(--blue); background: rgba(59,130,246,.08); padding: 4px 8px; border-radius: 6px; display: inline-block; margin-top: 4px; }
.load-lpn-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.load-lpn-card.scanned { border-color: var(--success); background: rgba(34,197,94,.04); }
.load-scan-indicator { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.load-scan-indicator.done { background: var(--success); color: #fff; }
.load-scan-indicator.pending { background: var(--border); color: var(--text-3); }
/* ─── Success Screens ───────────────────────────── */
.success-header { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; padding: 32px 20px; text-align: center; border-radius: 0 0 20px 20px; }
.success-header .emoji { font-size: 48px; margin-bottom: 8px; }
.success-header h2 { font-size: 20px; font-weight: 700; margin: 0; }
.success-banner { background: var(--navy); color: #fff; border-radius: 12px; margin: 16px; padding: 16px; text-align: center; }
.success-banner .doc-number { font-family: var(--font-mono); font-size: 18px; font-weight: 700; letter-spacing: .05em; }
.ledger-note { background: #0F2040; color: #fff; border-radius: 10px; margin: 0 16px 12px; padding: 12px; font-size: 12px; }
.ledger-note .debit { color: #4ade80; }
.ledger-note .credit { color: #f87171; }
.next-steps { margin: 0 16px 16px; }
.next-step-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.next-step-item .emoji { font-size: 20px; flex-shrink: 0; }
/* ─── Expiry Write-Off ──────────────────────────── */
.expiry-status-banner { margin: 0 16px 12px; padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.expiry-status-banner.expired { background: rgba(239,68,68,.1); color: #ef4444; border: 1px solid rgba(239,68,68,.2); }

/* ─── Put-Away Workflow ─────────────────────────── */
.putaway-stats {
    display: flex;
    background: var(--navy, #0F172A);
    padding: 14px 16px;
}
.putaway-stat {
    flex: 1;
    text-align: center;
}
.putaway-stat-val {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.putaway-stat-lbl {
    font-size: 10px;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 2px;
}
.putaway-lpn-display {
    background: #fff;
    margin: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 16px;
}
.putaway-lpn-code {
    font-family: var(--mono, monospace);
    font-size: 16px;
    font-weight: 700;
    color: var(--navy, #0F172A);
    margin-bottom: 12px;
}
.putaway-lpn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.putaway-lpn-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.putaway-lpn-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-3, #94A3B8);
}
.putaway-lpn-value {
    font-size: 13px;
    color: var(--text-1, #0F172A);
}
.putaway-location-display {
    background: var(--navy-light, #1E293B);
    margin: 0 16px 12px;
    border-radius: 12px;
    padding: 16px;
}
.putaway-location-code {
    font-family: var(--mono, monospace);
    font-size: 22px;
    font-weight: 700;
    color: var(--blue-light, #60A5FA);
}
.putaway-confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.8);
}
.putaway-alt-loc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: border-color .15s;
}
.putaway-alt-loc.selected {
    border-color: var(--blue);
    background: rgba(59,130,246,.04);
}
.notif-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.notif-banner.info {
    background: rgba(59,130,246,.06);
    border: 1px solid rgba(59,130,246,.15);
    color: var(--blue);
}
.scan-btn.outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2, #475569);
}

/* ─── Mobile Pick Execution ─────────────────────── */

/* Progress Header Band */
.pick-header { background: var(--navy); padding: 0; }
.pick-header-subtitle { color: rgba(255,255,255,0.65); font-size: 12px; padding: 6px 16px 0; }
.pick-progress-bar-wrap { height: 4px; background: rgba(255,255,255,0.15); margin: 8px 0; }
.pick-progress-fill { height: 4px; background: linear-gradient(90deg, var(--blue-light), var(--success)); border-radius: 2px; transition: width 0.4s ease; }
.pick-header-pills { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 16px 14px; }

/* Section Labels */
.pick-section-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); padding: 14px 16px 4px; display: block; }

/* Current Pick Card */
.pick-card { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 12px; padding: 16px; margin: 0 16px 12px; }
.pick-card-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.pick-card-seq { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.pick-card-product-name { font-size: 14px; font-weight: 600; color: var(--text-1); line-height: 1.3; }
.pick-card-sku { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); margin-top: 2px; }

/* Location Block */
.pick-location-block { background: var(--navy); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.pick-location-code { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--blue-light); margin-bottom: 8px; }
.pick-location-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pick-location-tag { display: inline-flex; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75); }

/* Info Grid */
.pick-info-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.pick-info-label { color: var(--text-3); font-size: 12px; white-space: nowrap; align-self: center; }
.pick-info-value { color: var(--text-1); font-weight: 600; align-self: center; }
.pick-info-value.mono { font-family: var(--font-mono); color: var(--blue); }
.pick-expiry-ok { color: var(--success); font-weight: 700; }

/* Scan Block */
.pick-scan-block { margin: 0 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.pick-scan-placeholder { background: var(--navy); border-radius: 10px; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: rgba(255,255,255,0.6); font-size: 12px; text-align: center; }
.pick-scan-icon { font-size: 28px; opacity: 0.7; }

/* Up Next / Completed Sections */
.pick-list-section { padding: 0 16px 8px; }
.pick-aisle-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 4px; border-bottom: 1px solid var(--border-light); margin-bottom: 4px; }
.pick-aisle-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.pick-aisle-location { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.pick-next-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.pick-completed-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.pick-completed-check { width: 24px; height: 24px; border-radius: 50%; background: var(--success); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex-shrink: 0; }
.pick-completed-meta { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); margin-top: 1px; }

/* Sticky Action Bar */
.pick-sticky-actions { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.pick-wave-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(37,99,235,0.25); min-height: 44px; }
.pick-wave-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.pick-issue-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; background: var(--warning-light); color: #92400E; border: 1px solid var(--warning); border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; min-height: 44px; }

/* Report Issue Bottom Drawer */
.pick-drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; display: flex; align-items: flex-end; }
.pick-drawer { background: #fff; border-radius: 20px 20px 0 0; width: 100%; padding: 20px 16px 36px; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); }
.pick-drawer-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 16px; }
.pick-drawer-title { font-size: 16px; font-weight: 700; color: var(--text-1); margin-bottom: 14px; }
.pick-issue-option { padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; background: #fff; width: 100%; text-align: start; margin-bottom: 6px; color: var(--text-1); }
.pick-issue-option.selected { border-color: var(--blue); background: #EFF6FF; color: var(--blue); }

/* ─── Wave Pick Selection ──────────────────────────── */
.wave-select-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-card); border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-1); }
.wave-select-header input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.wave-pick-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 0 16px 10px; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; transition: border-color .15s; }
.wave-pick-card.selected { border-color: var(--blue); background: rgba(59,130,246,.03); }
.wave-pick-card-checkbox { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; color: #fff; font-size: 12px; font-weight: 700; transition: background .15s, border-color .15s; }
.wave-pick-card.selected .wave-pick-card-checkbox { background: var(--blue); border-color: var(--blue); }
.wave-pick-card-number { font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 3px; }
.wave-pick-card-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.wave-select-summary { padding: 4px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.wave-pick-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.wave-pick-lines { margin-top: 10px; border-top: 1px solid var(--border-light); padding-top: 8px; display: flex; flex-direction: column; gap: 0; }
.wave-pick-line { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-light); }
.wave-pick-line:last-child { border-bottom: none; }
.wave-pick-line-seq { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); font-size: 10px; font-weight: 700; color: var(--text-2); flex-shrink: 0; margin-top: 1px; }
.wave-pick-card.selected .wave-pick-line-seq { background: rgba(59,130,246,0.08); border-color: var(--blue); color: var(--blue); }
.wave-pick-line-body { flex: 1; min-width: 0; }
.wave-pick-line-location { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--blue); }
.wave-pick-line-product { font-size: 12px; font-weight: 600; color: var(--text-1); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wave-pick-line-sku { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Wave Pick Execution ──────────────────────────── */
.wave-exec-header { background: var(--navy); padding: 12px 16px 14px; }
.wave-exec-header-title { color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.wave-exec-aisle-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.wave-exec-aisle-pill { display: inline-flex; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.65); }
.wave-exec-aisle-pill.current { background: rgba(59,130,246,0.3); color: var(--blue-light); }
.wave-exec-aisle-pill.complete { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.wave-exec-location-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.wave-exec-nav-btn { background: rgba(255,255,255,0.08); border: none; color: rgba(255,255,255,0.75); border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 36px; }
.wave-exec-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.wave-exec-nav-counter { font-size: 12px; color: rgba(255,255,255,0.55); }
.wave-exec-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--border-light); }
.wave-exec-item-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; transition: background .15s, border-color .15s; font-size: 14px; color: #fff; }
.wave-exec-item-check.checked { background: var(--success); border-color: var(--success); }
.wave-exec-item-check:disabled { opacity: 0.5; cursor: not-allowed; }
.wave-exec-item-body { flex: 1; min-width: 0; }
.wave-exec-item-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; font-family: var(--font-mono); }
.wave-confirm-location-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; background: linear-gradient(135deg, var(--success), #059669); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(16,185,129,0.3); min-height: 44px; }
.wave-confirm-location-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Load Vehicle ──────────────────────────────── */
.load-progress-section { background: var(--navy); padding: 14px 16px 16px; }
.load-progress-label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.55); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.load-progress-count { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.load-vehicle-card { margin: 12px 16px 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.load-vehicle-icon { font-size: 24px; flex-shrink: 0; }
.load-vehicle-plate { font-family: var(--font-mono); font-size: 15px; font-weight: 800; color: var(--text-1); }
.load-vehicle-driver { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.load-bulk-btn { width: 100%; margin-top: 10px; background: var(--surface-2); border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 12px; font-size: 13px; font-weight: 700; color: var(--text-1); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.load-bulk-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.load-recent-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-light); }
.load-recent-item:last-child { border-bottom: none; }
.load-recent-check { width: 22px; height: 22px; border-radius: 50%; background: var(--success); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; flex-shrink: 0; }
.load-recent-body { flex: 1; min-width: 0; }
.load-recent-lpn { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--text-1); }
.load-recent-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load-confirm-btn { width: 100%; background: var(--success); color: #fff; border: none; border-radius: var(--radius); padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.load-confirm-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Loading Manifest cards ─────────────────── */
.load-manifest-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.load-manifest-card.loaded { opacity: 0.55; }
.load-manifest-lpn { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--text-1); }
.load-manifest-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.load-manifest-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.load-manifest-badge.pending { background: #fef3c7; color: #d97706; }
.load-manifest-badge.loaded { background: #d1fae5; color: #059669; }

/* ── Mobile — Home ──────────────────────────────────────────────────── */
.mh-icon-blue       { color: var(--blue, #3B82F6); }
.mh-icon-warning    { color: var(--warning, #F59E0B); }
.mh-icon-success    { color: var(--success, #10B981); }
.mh-spinner-sm      { width: 20px; height: 20px; border-color: var(--border); border-top-color: var(--blue); margin: 2px auto; }

/* ── Mobile — Loading (order selection) ────────────────────────────── */
.ml-order-card-clickable { cursor: pointer; }

/* ── Mobile — LoadingExecution ──────────────────────────────────────── */
.mle-dispatch-info  { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.mle-app-shell      { background: var(--surface); }
.mle-alert-margin   { margin: 12px 16px 0; }
.mle-spinner-sm     { width: 16px; height: 16px; }
.mle-manifest-container { padding: 0 16px 16px; }
.mle-bulk-confirm-btn { width: 100%; margin-bottom: 10px; }
.mle-btn-full       { width: 100%; }
.mle-dispatch-btn   { width: 100%; margin-top: 4px; }
.mle-error-mb       { margin-bottom: 12px; }
.mle-scroll-dispatch { padding-bottom: 80px; }
.mle-scroll-normal  { padding-bottom: 16px; }

/* ── Mobile — PickExecution ─────────────────────────────────────────── */
.mpe-spinner        { width: 32px; height: 32px; border-color: var(--border); border-top-color: var(--blue); }
.mpe-spinner-mt     { margin-top: 12px; }
.pick-card-seq-sm   { width: 28px; height: 28px; font-size: 11px; }
.mpe-flex-1         { flex: 1; }
.mpe-alert-margin   { margin: 0 16px 12px; }
.mpe-drawer-sku     { margin-bottom: 12px; }
.mpe-issue-textarea { height: 72px; resize: none; margin-top: 8px; }
.mpe-submit-mt      { margin-top: 10px; width: 100%; }
.mpe-cancel-mt      { margin-top: 6px; width: 100%; }
.pick-progress-fill { width: var(--pct, 0%); }

/* ── Mobile — Loading (order selection) ─────────────────────────────── */
.ml-content-pad     { padding: 16px; }
.ml-section-title-mb { margin-bottom: 12px; }
.ml-order-card      { margin-bottom: 10px; }
.ml-card-row        { display: flex; justify-content: space-between; align-items: flex-start; }
.ml-order-number    { font-family: var(--font-mono); font-size: 15px; font-weight: 700; }
.ml-order-cust-ref  { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.ml-order-customer  { font-size: 13px; margin-top: 4px; }

/* ── Mobile — Home (additions) ──────────────────────────────────────── */
.mh-kpi-pad         { padding: 16px 0 0; }
.mh-notif-margin    { margin: 0 16px 8px; }
.mh-section-mt      { margin-top: 8px; }
.mh-activity-card   { margin: 0 16px 20px; }
.mh-act-dot-success { background: var(--success, #10B981); }
.act-empty          { color: var(--text-secondary); font-size: 13px; padding: 12px 4px; text-align: center; }

/* ── Mobile — Wave Pick Selection (MWS_*) / Execution (MWE_*) ───────── */
.mws-spinner        { width: 32px; height: 32px; border-color: var(--border); border-top-color: var(--blue); }
.mws-spinner-sub    { margin-top: 12px; }
.mws-list-scroll    { padding-top: 8px; }
.mws-card-body      { flex: 1; min-width: 0; }
.mwe-back-btn       { margin-top: 20px; }
.mwe-alert-margin   { margin: 12px 16px 0; }
.mwe-location-margin { margin: 12px 16px 0; }
.mwe-nav-row        { display: flex; gap: 8px; }
.mwe-nav-btn        { flex: 1; }

/* ── Bin Transfer mobile layout utilities ──────────────────────────── */
.bt-app-shell             { background: var(--surface); }
.bt-banner-stack          { margin-top: 12px; }
.bt-banner-inset          { margin: 12px; }
.bt-step2-label           { margin-top: 12px; }
.bt-suggestion-selected   { background: #E0F2FE; }
.bt-drawer-inline         { position: static; margin: 12px; padding: 12px; }
.bt-drawer-textarea       { min-height: 80px; }

/* ── Bin Transfer — mobile rich UI ─────────────────────────────────── */
.btm-container { padding: 12px; padding-bottom: calc(var(--bottombar-h) + 92px); max-width: 100%; }

.btm-hero {
    background: linear-gradient(135deg, #0F2340 0%, #1B4FA0 100%);
    color: #fff; padding: 16px; border-radius: 12px; margin-bottom: 14px;
}
.btm-hero-title { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.btm-hero-sub { font-size: 12px; opacity: .8; margin-top: 2px; }
.btm-hero-pills { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.btm-hero-pill {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
    padding: 3px 10px; border-radius: 14px; font-size: 11px;
}

.btm-step {
    display: flex; align-items: center; gap: 10px; margin: 16px 0 10px;
}
.btm-step-num {
    width: 24px; height: 24px; border-radius: 50%;
    background: linear-gradient(135deg, #1B75BB, #00ADEE); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.btm-step-num.done { background: #16a34a; }
.btm-step-label { font-size: 12px; font-weight: 600; color: #334155; text-transform: uppercase; letter-spacing: .05em; }

.btm-scan-card {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    padding: 16px; margin-bottom: 14px;
}
.btm-scan-illustration {
    font-size: 32px; text-align: center; margin-bottom: 8px; opacity: .4;
}
.btm-scan-hint { text-align: center; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.btm-scan-input {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 8px;
    background: #F8FAFC; font-family: var(--mono, monospace); font-size: 14px;
    box-sizing: border-box;
}
.btm-scan-input:focus { border-color: #1287CC; background: #fff; outline: 0; }
.btm-scan-btn {
    display: block; width: 100%; margin-top: 10px;
    padding: 14px; border: 0; border-radius: 8px;
    background: linear-gradient(135deg, #1B75BB, #00ADEE);
    color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
    min-height: 48px;
}
.btm-scan-btn:disabled { opacity: .55; cursor: not-allowed; }
.btm-scan-btn.secondary {
    background: #fff; color: #1B75BB; border: 1.5px solid #1B75BB;
}

.btm-lpn-card {
    background: linear-gradient(180deg, #F0F9FF 0%, #fff 100%);
    border: 1px solid #BAE6FD; border-radius: 12px;
    padding: 14px; margin-bottom: 14px;
}
.btm-lpn-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.btm-lpn-code {
    font-family: var(--mono, monospace); font-weight: 700; font-size: 15px; color: #0F2340;
}
.btm-lpn-product { font-size: 14px; font-weight: 600; color: #0F2340; margin-bottom: 2px; }
.btm-lpn-sku { font-family: var(--mono, monospace); font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }

.btm-loc-pill {
    display: flex; justify-content: center; align-items: center;
    background: #0F2340; color: #fff; padding: 10px 14px; border-radius: 8px;
    font-family: var(--mono, monospace); font-weight: 700; font-size: 14px;
    margin: 10px 0; letter-spacing: .04em;
}

.btm-lpn-meta {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed #CBD5E1;
}
.btm-lpn-meta-cell .lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.btm-lpn-meta-cell .val { font-size: 13px; font-weight: 600; color: #0F2340; margin-top: 2px; }

.btm-suggestions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.btm-suggestion {
    display: grid; grid-template-columns: auto 1fr auto; gap: 10px;
    align-items: center;
    background: #fff; border: 1.5px solid var(--border); border-radius: 10px;
    padding: 12px 14px; cursor: pointer;
    min-height: 56px;
    transition: border-color .15s, background .15s;
}
.btm-suggestion.is-selected { border-color: #1287CC; background: #F0F9FF; }
.btm-suggestion.is-recommended { border-color: #16A34A; }
.btm-suggestion-rank {
    width: 26px; height: 26px; border-radius: 50%;
    background: #E2E8F0; color: #475569;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 11px;
}
.btm-suggestion.is-recommended .btm-suggestion-rank {
    background: linear-gradient(135deg, #16A34A, #22C55E); color: #fff;
}
.btm-suggestion-main { min-width: 0; }
.btm-suggestion-code {
    font-family: var(--mono, monospace); font-weight: 700; font-size: 13px; color: #0F2340;
    word-break: break-all;
}
.btm-suggestion-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.btm-suggestion-score {
    font-weight: 700; font-size: 18px; color: #1287CC; text-align: right;
}

.btm-override {
    margin-top: 12px; padding: 14px; border-radius: 10px;
    background: linear-gradient(180deg, #FEF3C7 0%, #FFFBEB 100%);
    border: 1px solid #F59E0B;
}
.btm-override-title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #92400E; font-size: 13px; margin-bottom: 4px; }
.btm-override-hint { font-size: 11px; color: #92400E; margin-bottom: 8px; }
.btm-override textarea {
    width: 100%; min-height: 80px; padding: 10px;
    border: 1px solid #F59E0B; border-radius: 6px;
    font-family: inherit; font-size: 13px; resize: vertical; box-sizing: border-box;
}

.btm-ineligible {
    padding: 14px; border-radius: 10px;
    background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.2);
    color: #991B1B; margin: 14px 0;
}
.btm-ineligible-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.btm-ineligible-body { font-size: 12px; line-height: 1.4; }

.btm-success {
    padding: 14px; border-radius: 10px;
    background: rgba(22,163,74,.08); border: 1px solid rgba(22,163,74,.2);
    color: #16803A; margin: 14px 0;
}

.btm-sticky {
    position: fixed;
    bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom, 0));
    left: 0; right: 0;
    padding: 12px 14px; background: rgba(255,255,255,.97);
    border-top: 1px solid var(--border);
    display: flex; gap: 10px;
    box-shadow: 0 -2px 12px rgba(15,35,64,.08);
    z-index: 150;
}
.btm-sticky .btn {
    flex: 1; padding: 14px; border-radius: 8px; font-weight: 600; font-size: 14px;
    border: 0; cursor: pointer; min-height: 48px;
}
.btm-sticky .btn.cancel { background: #F1F5F9; color: #475569; }
.btm-sticky .btn.primary {
    background: linear-gradient(135deg, #1B75BB, #00ADEE); color: #fff;
}
.btm-sticky .btn:disabled { opacity: .5; cursor: not-allowed; }

.btm-empty {
    text-align: center; padding: 20px;
    color: var(--text-muted); font-size: 13px;
    background: #F8FAFC; border: 1px dashed var(--border); border-radius: 10px;
}
