/* =============================================
   Mobile Operations — My Tasks / Delivery / Receive
   Scoped to .mobile-ops-page so other pages are unaffected.
   ============================================= */

.mobile-ops-page {
    --mo-primary: #075fc7;
    --mo-primary-dark: #06479a;
    --mo-green: #07966c;
    --mo-green-dark: #057653;
    --mo-amber: #d97706;
    --mo-red: #dc3545;
    --mo-ink: #10213b;
    --mo-muted: #61708a;
    --mo-line: #dbe4ef;
    --mo-bg: #f4f7fb;
    --mo-card: #ffffff;
    --mo-radius: 18px;
    width: 100%;
    color: var(--mo-ink);
    padding-bottom: 24px;
}

.mobile-ops-page *, .mobile-ops-page *::before, .mobile-ops-page *::after { box-sizing: border-box; }
.mobile-ops-page button, .mobile-ops-page input, .mobile-ops-page select, .mobile-ops-page textarea { font: inherit; }

.mo-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin: 0 0 18px;
}
.mo-page-header h1 { margin: 2px 0 5px; font-size: clamp(1.55rem, 2.3vw, 2rem); line-height: 1.15; }
.mo-page-header p { margin: 0; color: var(--mo-muted); font-size: .92rem; }
.mo-eyebrow { color: var(--mo-primary); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.mo-header-badge { border: 1px solid #b7e7da; color: #066a4e; background: #effcf7; border-radius: 999px; padding: 8px 13px; font-size: .78rem; font-weight: 700; max-width: 46%; text-align: right; }

.mo-card {
    background: var(--mo-card);
    border: 1px solid var(--mo-line);
    border-radius: var(--mo-radius);
    box-shadow: 0 8px 24px rgba(16, 33, 59, .055);
    overflow: hidden;
}

.mo-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.mo-kpi {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 90px;
    padding: 15px;
    border: 1px solid var(--mo-line);
    border-left: 4px solid var(--mo-primary);
    background: #fff;
    border-radius: 15px;
}
.mo-kpi-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #eef5ff; font-size: 1.25rem; }
.mo-kpi strong { display: block; font-size: 1.55rem; line-height: 1; margin-bottom: 7px; }
.mo-kpi small { color: var(--mo-muted); font-weight: 650; }
.mo-tone-green { border-left-color: var(--mo-green); }
.mo-tone-green .mo-kpi-icon { background: #eafaf4; }
.mo-tone-amber { border-left-color: var(--mo-amber); }
.mo-tone-amber .mo-kpi-icon { background: #fff7e9; }
.mo-tone-red { border-left-color: var(--mo-red); }
.mo-tone-red .mo-kpi-icon { background: #fff0f2; }
.mo-tone-blue { border-left-color: var(--mo-primary); }

.mo-task-toolbar { padding: 15px; margin-bottom: 16px; }
.mo-toolbar-row { display: flex; gap: 10px; align-items: center; }
.mo-search { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--mo-line); border-radius: 12px; padding: 0 13px; background: #fff; }
.mo-search input { flex: 1; border: 0; outline: 0; min-width: 0; color: var(--mo-ink); }
.mo-segmented { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.mo-segmented button { border: 1px solid var(--mo-line); background: #f8fafc; color: #516078; border-radius: 999px; padding: 8px 13px; cursor: pointer; font-size: .8rem; font-weight: 700; }
.mo-segmented button.active { border-color: var(--mo-primary); color: #fff; background: var(--mo-primary); }

.mo-btn { border: 1px solid transparent; border-radius: 11px; min-height: 42px; padding: 9px 15px; font-weight: 750; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.mo-btn:not(:disabled):active { transform: translateY(1px); }
.mo-btn:disabled { opacity: .45; cursor: not-allowed; }
.mo-btn-primary { background: linear-gradient(135deg, var(--mo-primary), #0d8dd8); color: white; box-shadow: 0 6px 15px rgba(7, 95, 199, .16); }
.mo-btn-success { background: linear-gradient(135deg, var(--mo-green), #08b88b); color: white; box-shadow: 0 6px 15px rgba(7, 150, 108, .16); }
.mo-btn-secondary { background: #fff; color: var(--mo-ink); border-color: var(--mo-line); }
.mo-btn-sm { min-height: 34px; padding: 6px 11px; font-size: .76rem; }
.mo-btn-block { width: 100%; }
.mo-icon-btn { border: 1px solid var(--mo-line); background: #fff; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; cursor: pointer; color: var(--mo-ink); }
.mo-link-btn { border: 0; background: none; color: var(--mo-primary); cursor: pointer; font-weight: 750; padding: 3px 5px; }

.mo-section-head { padding: 16px 18px; border-bottom: 1px solid var(--mo-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mo-section-head h2 { margin: 0 0 3px; font-size: 1.02rem; }
.mo-section-head p { margin: 0; color: var(--mo-muted); font-size: .78rem; }
.mo-task-list { padding: 0 16px 16px; }
.mo-task-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 2px; border-bottom: 1px solid #e9eef5; }
.mo-task-item:last-child { border-bottom: 0; }
.mo-task-item.is-overdue { background: linear-gradient(90deg, #fff8f8, transparent); }
.mo-task-type { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: #eef5ff; }
.mo-task-type.receive { background: #ebfbf5; }
.mo-task-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mo-task-title strong { font-size: .9rem; }
.mo-task-main p { margin: 4px 0; color: #37475e; font-size: .82rem; }
.mo-task-meta { display: flex; flex-wrap: wrap; gap: 5px 13px; color: var(--mo-muted); font-size: .72rem; }
.mo-task-action { display: flex; min-width: 104px; flex-direction: column; align-items: flex-end; gap: 6px; }
.mo-task-action small { color: var(--mo-muted); font-size: .68rem; }
.mo-task-action .mo-overdue { color: #b42318; font-weight: 800; }
.mo-status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: .66rem; line-height: 1; font-weight: 800; }
.mo-status-pill.pending { background: #fff4d6; color: #a85b00; }
.mo-status-pill.done { background: #e3f8ee; color: #047857; }

.mo-work-layout { display: grid; grid-template-columns: minmax(260px, .82fr) minmax(315px, 1fr) minmax(390px, 1.25fr); gap: 14px; align-items: start; }
.mo-work-layout > .mo-card { min-height: 300px; }
.mo-work-selector, .mo-work-detail, .mo-work-form { padding: 16px; }
.mo-step-title { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 15px; }
.mo-step-title > span:first-child { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--mo-green); color: white; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.mo-step-title > div { flex: 1; }
.mo-step-title h2 { margin: 0 0 3px; font-size: 1rem; }
.mo-step-title p { margin: 0; color: var(--mo-muted); font-size: .75rem; }

.mo-scan-panel { padding: 2px 0 12px; }
.mo-scan-button { width: 100%; min-height: 145px; border: 1.5px dashed #56cba4; border-radius: 16px; background: linear-gradient(145deg, #f5fffb, #f1f8ff); color: #08785a; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.mo-scan-button > span { font-size: 2.4rem; line-height: 1; }
.mo-scan-button > strong { font-size: .98rem; }
.mo-scan-button > small { color: #718098; font-size: .7rem; }
.mo-or { display: flex; align-items: center; gap: 10px; color: #8693a7; font-size: .7rem; margin: 10px 0; }
.mo-or::before, .mo-or::after { content: ''; flex: 1; border-top: 1px solid var(--mo-line); }
.mo-inline-search { display: flex; gap: 7px; }
.mo-inline-search input { min-width: 0; flex: 1; border: 1px solid var(--mo-line); border-radius: 10px; padding: 9px 11px; outline: 0; }
.mo-inline-search input:focus, .mo-field input:focus, .mo-field select:focus, .mo-field textarea:focus { border-color: #79aee8; box-shadow: 0 0 0 3px rgba(7, 95, 199, .08); }

.mo-mini-list { margin-top: 10px; border-top: 1px solid var(--mo-line); padding-top: 10px; }
.mo-mini-head { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; margin-bottom: 5px; }
.mo-mini-head span { color: var(--mo-muted); }
.mo-mini-item { width: 100%; border: 0; border-bottom: 1px solid #edf1f6; background: #fff; text-align: left; padding: 10px 6px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; color: var(--mo-ink); }
.mo-mini-item.active { background: #eef9f5; border-radius: 10px; padding-left: 10px; padding-right: 10px; }
.mo-mini-item span { min-width: 0; }
.mo-mini-item strong { display: block; font-size: .76rem; }
.mo-mini-item small { display: block; color: var(--mo-muted); font-size: .67rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.mo-mini-empty { text-align: center; padding: 15px 5px; color: var(--mo-muted); font-size: .75rem; }
.mo-info-note { border: 1px solid #d8eaf8; background: #f2f9ff; color: #40536b; border-radius: 11px; padding: 10px; font-size: .7rem; line-height: 1.5; }

.mo-asset-hero { display: flex; gap: 12px; align-items: center; border: 1px solid #cdeee1; background: linear-gradient(135deg, #f0fcf8, #f5fbff); border-radius: 14px; padding: 13px; margin-bottom: 10px; }
.mo-asset-icon { width: 50px; height: 50px; border-radius: 13px; background: #fff; display: grid; place-items: center; font-size: 1.35rem; box-shadow: 0 4px 14px rgba(16, 33, 59, .08); }
.mo-asset-hero h3 { margin: 2px 0 2px; font-size: 1.05rem; }
.mo-asset-hero p, .mo-asset-hero small { margin: 0; color: var(--mo-muted); font-size: .72rem; }
.mo-detail-grid { margin: 0; }
.mo-detail-grid > div { display: grid; grid-template-columns: minmax(105px, 42%) minmax(0, 1fr); gap: 8px; border-bottom: 1px solid #e7edf4; padding: 9px 2px; }
.mo-detail-grid dt { color: #526079; font-size: .73rem; font-weight: 700; }
.mo-detail-grid dd { margin: 0; font-size: .78rem; overflow-wrap: anywhere; }

.mo-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 12px; }
.mo-field { display: flex; flex-direction: column; gap: 5px; }
.mo-field > span { font-size: .72rem; color: #4d5c73; font-weight: 700; }
.mo-field b, .mo-evidence-title b { color: #d03442; }
.mo-field input, .mo-field select, .mo-field textarea { width: 100%; border: 1px solid var(--mo-line); border-radius: 10px; padding: 9px 10px; outline: 0; background: #fff; color: var(--mo-ink); font-size: .78rem; }
.mo-field textarea { resize: vertical; min-height: 66px; }
.mo-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 11px 0; }
.mo-evidence-box { border: 1px solid var(--mo-line); border-radius: 13px; padding: 11px; min-width: 0; }
.mo-evidence-title { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.mo-evidence-title strong { font-size: .75rem; }
.mo-evidence-title small { display: block; color: var(--mo-muted); font-size: .62rem; }
.mo-file-button { display: block; }
.mo-file-button input { position: absolute; opacity: 0; pointer-events: none; }
.mo-file-button span { display: block; text-align: center; border: 1px solid #a7daca; color: #08785a; border-radius: 9px; padding: 8px; font-size: .72rem; font-weight: 800; cursor: pointer; background: #f4fdf9; }
.mo-photo-preview { height: 132px; margin-top: 8px; border-radius: 10px; overflow: hidden; background: #f4f7fa; display: grid; place-items: center; position: relative; color: var(--mo-muted); font-size: .7rem; }
.mo-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.mo-photo-remove { position: absolute; right: 6px; top: 6px; border: 0; background: rgba(149, 18, 31, .88); color: #fff; border-radius: 7px; padding: 5px 7px; font-size: .65rem; cursor: pointer; }
.mo-signature-canvas { display: block; width: 100%; height: 176px; background: #fff; border: 1.5px dashed #a9b7c9; border-radius: 10px; touch-action: none; }
.mo-gps-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--mo-line); background: #f8fafc; border-radius: 12px; padding: 10px 11px; margin: 10px 0; }
.mo-gps-row strong { display: block; font-size: .75rem; }
.mo-gps-row small { display: block; color: var(--mo-muted); font-size: .65rem; margin-top: 2px; overflow-wrap: anywhere; }
.mo-check-row { display: flex; gap: 9px; align-items: flex-start; border: 1px solid #cfe9df; background: #f1fcf8; border-radius: 11px; padding: 10px; font-size: .72rem; margin: 10px 0; }
.mo-check-row input { margin-top: 2px; accent-color: var(--mo-green); }
.mo-warning { border: 1px solid #f5d28b; background: #fff9e9; color: #7a4c00; border-radius: 11px; padding: 10px; margin: 10px 0; font-size: .71rem; }
.mo-issue-panel { border: 1px solid #f1c8ce; background: #fff8f9; border-radius: 13px; padding: 11px; margin-bottom: 11px; }
.mo-issue-panel > strong { font-size: .76rem; color: #9f2534; }
.mo-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 9px 0; }
.mo-check-grid label { display: flex; align-items: center; gap: 6px; border: 1px solid #e4e9ef; background: #fff; border-radius: 9px; padding: 7px; font-size: .68rem; }
.mo-check-grid input { accent-color: var(--mo-red); }

.mo-empty { text-align: center; padding: 42px 15px; color: var(--mo-muted); }
.mo-empty.compact { padding: 60px 15px; }
.mo-empty.success { color: #06795a; }
.mo-empty > span { display: block; font-size: 2.1rem; margin-bottom: 9px; }
.mo-empty strong { display: block; color: var(--mo-ink); }
.mo-empty p { margin: 5px 0 0; font-size: .76rem; }

.mo-bottom-nav { display: none; }
.mo-mobile-actions { display: none; }

.mo-scanner-overlay { position: fixed; z-index: 10000; inset: 0; background: rgba(4, 13, 28, .82); display: grid; place-items: center; padding: 15px; backdrop-filter: blur(3px); }
.mo-scanner-dialog { width: min(520px, 100%); background: #fff; border-radius: 18px; padding: 15px; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); }
.mo-scanner-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.mo-scanner-head strong { display: block; }
.mo-scanner-head small { color: var(--mo-muted); display: block; margin-top: 3px; font-size: .72rem; }
.mo-camera-shell { position: relative; background: #071225; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; }
.mo-camera-shell video { width: 100%; height: 100%; object-fit: cover; }
.mo-scan-frame { position: absolute; inset: 18%; border: 2px solid #36e5a8; border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.12); }
.mo-scan-frame span::before, .mo-scan-frame span::after { content: ''; position: absolute; left: 10%; right: 10%; height: 2px; background: rgba(54, 229, 168, .65); top: 50%; }
.mo-scanner-status { text-align: center; padding: 10px 5px; color: var(--mo-muted); font-size: .74rem; }

.mo-toast { position: fixed; z-index: 12000; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 30px)); background: #10213b; color: white; border-radius: 12px; padding: 12px 15px; box-shadow: 0 14px 35px rgba(16, 33, 59, .28); opacity: 0; transform: translateY(12px); transition: .22s ease; font-size: .78rem; }
.mo-toast.show { opacity: 1; transform: translateY(0); }
.mo-toast-success { background: #057653; }
.mo-toast-error { background: #a61f31; }
.mo-toast-info { background: #075fc7; }

@media (max-width: 1220px) {
    .mo-work-layout { grid-template-columns: minmax(250px, .8fr) minmax(300px, 1fr); }
    .mo-work-form { grid-column: 1 / -1; }
}

/* V86.37: Asset Loan tab filters */
.mo-loan-filterbar-available { grid-template-columns: minmax(240px, 1fr) minmax(150px, .35fr) minmax(150px, .35fr) auto; align-items: center; }
.mo-loan-filterbar-simple { grid-template-columns: minmax(260px, 1fr) auto; align-items: center; }
.mo-loan-clear-btn { white-space: nowrap; min-height: 40px; }

@media (max-width: 900px) {
    .mobile-ops-page { padding-bottom: 146px; }
    .mo-page-header { margin-bottom: 12px; }
    .mo-page-header p { font-size: .78rem; }
    .mo-header-badge { display: none; }
    .mo-kpi-strip { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 3px; scrollbar-width: none; }
    .mo-kpi-strip::-webkit-scrollbar { display: none; }
    .mo-kpi { flex: 0 0 150px; min-height: 70px; padding: 10px; }
    .mo-kpi-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 1rem; }
    .mo-kpi strong { font-size: 1.25rem; margin-bottom: 4px; }
    .mo-kpi small { font-size: .68rem; }
    .mo-toolbar-row { align-items: stretch; }
    .mo-toolbar-row .mo-btn { padding-inline: 11px; white-space: nowrap; }
    .mo-segmented { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
    .mo-segmented::-webkit-scrollbar { display: none; }
    .mo-segmented button { flex: 0 0 auto; }
    .mo-work-layout { grid-template-columns: 1fr; gap: 10px; }
    .mo-work-form { grid-column: auto; }
    .mo-work-selector, .mo-work-detail, .mo-work-form { padding: 13px; }
    .mo-work-layout > .mo-card { min-height: auto; }
    .mo-mini-list { max-height: 220px; overflow: auto; }
    .mo-scan-button { min-height: 122px; }
    .mo-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mo-evidence-grid { grid-template-columns: 1fr; }
    .mo-photo-preview { height: 160px; }
    .mo-signature-canvas { height: 155px; }
    .mo-bottom-nav { position: fixed; z-index: 900; left: 0; right: 0; bottom: 0; height: 64px; background: #fff; border-top: 1px solid var(--mo-line); display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px max(8px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); box-shadow: 0 -8px 24px rgba(16, 33, 59, .1); }
    .mo-bottom-item { border: 0; background: transparent; color: #66748a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 10px; cursor: pointer; }
    .mo-bottom-item > span { font-size: 1.1rem; }
    .mo-bottom-item small { font-size: .63rem; font-weight: 700; }
    .mo-bottom-item.active { background: #eef6ff; color: var(--mo-primary); }
    .mo-mobile-actions { position: fixed; z-index: 880; left: 8px; right: 8px; bottom: calc(68px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: .8fr 1.25fr; gap: 8px; padding: 7px; border: 1px solid var(--mo-line); background: rgba(255, 255, 255, .96); border-radius: 14px; box-shadow: 0 7px 24px rgba(16, 33, 59, .14); backdrop-filter: blur(8px); }
    .mo-delivery-page .mo-work-form > .mo-btn-block, .mo-receive-page .mo-work-form > .mo-btn-block { display: none; }
    .mo-toast { left: 12px; right: 12px; bottom: 148px; max-width: none; }
}

@media (max-width: 600px) {
    .mobile-ops-page { margin: -6px; width: calc(100% + 12px); }
    .mo-page-header h1 { font-size: 1.3rem; }
    .mo-page-header p { max-width: 96%; }
    .mo-task-toolbar { padding: 11px; }
    .mo-search { min-height: 40px; }
    .mo-toolbar-row .mo-btn { font-size: .7rem; }
    .mo-card { border-radius: 14px; }
    .mo-section-head { padding: 12px; }
    .mo-task-list { padding: 0 10px 10px; }
    .mo-task-item { grid-template-columns: 36px minmax(0, 1fr); gap: 9px; padding: 12px 2px; }
    .mo-task-type { width: 34px; height: 34px; border-radius: 10px; font-size: .95rem; }
    .mo-task-action { grid-column: 2; min-width: 0; flex-direction: row; align-items: center; justify-content: space-between; }
    .mo-task-action .mo-btn { margin-left: auto; }
    .mo-task-meta span:nth-child(n+3) { display: none; }
    .mo-form-grid { grid-template-columns: 1fr; gap: 8px; }
    .mo-check-grid { grid-template-columns: 1fr; }
    .mo-gps-row { align-items: stretch; flex-direction: column; }
    .mo-gps-row .mo-btn { width: 100%; }
    .mo-detail-grid > div { grid-template-columns: minmax(95px, 38%) minmax(0, 1fr); padding: 8px 1px; }
    .mo-photo-preview { height: 145px; }
    .mo-signature-canvas { height: 145px; }
    .mo-scanner-overlay { padding: 8px; }
    .mo-scanner-dialog { padding: 11px; border-radius: 14px; }
}

/* V86.26: GPS is mandatory and re-captured immediately before every write. */
.mobile-ops-page .mo-gps-required { border-color: #f59e0b; background: #fffbeb; }
.mobile-ops-page .mo-gps-required strong b { color: #dc2626; }
.mobile-ops-page .mo-gps-required small { color: #92400e; }

/* V86.33: Mobile Asset Loan */
.mo-loan-toolbar { padding: 13px 15px; margin-bottom: 14px; }
.mo-loan-content { min-height: 360px; }
.mo-loan-filterbar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(150px, .35fr) minmax(150px, .35fr); gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--mo-line); }
.mo-loan-filterbar select { border: 1px solid var(--mo-line); border-radius: 11px; padding: 9px 11px; color: var(--mo-ink); background: white; }
.mo-loan-assets, .mo-loan-request-list, .mo-loan-active-list { padding: 8px 16px 16px; }
.mo-loan-asset-card { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 2px; border-bottom: 1px solid #e8eef5; }
.mo-loan-asset-icon { width: 42px; height: 42px; border-radius: 12px; background: #edf6ff; display: grid; place-items: center; font-size: 1.2rem; }
.mo-loan-asset-main strong, .mo-loan-request-card strong, .mo-loan-active-card strong { display: block; color: var(--mo-ink); }
.mo-loan-asset-main span, .mo-loan-request-card span { display: block; color: #40536b; font-size: .75rem; margin-top: 2px; }
.mo-loan-asset-main small, .mo-loan-request-card small { display: block; color: var(--mo-muted); font-size: .68rem; margin-top: 3px; }
.mo-loan-asset-main > div { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.mo-loan-asset-main b { font-size: .62rem; border-radius: 999px; background: #eef2f7; color: #516078; padding: 4px 7px; }
.mo-loan-asset-main b.available { background: #e5f8ef; color: #057653; }
.mo-loan-request-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 14px 3px; border-bottom: 1px solid #e8eef5; align-items: start; }
.mo-loan-request-card > b { font-size: .67rem; border-radius: 999px; padding: 6px 9px; }
.mo-loan-request-card > b.waiting { background: #fff3d7; color: #a65d00; }
.mo-loan-request-card > b.approved { background: #e4f8ef; color: #047857; }
.mo-loan-request-card > b.rejected { background: #fee4e2; color: #b42318; border: 1px solid #fecdca; }
.mo-loan-request-card > b.normal { background: #f2f4f7; color: #344054; border: 1px solid #d0d5dd; }
.mo-loan-active-card { border: 1px solid var(--mo-line); border-left: 4px solid var(--mo-green); border-radius: 14px; margin: 10px 0; padding: 13px; background: #fff; }
.mo-loan-active-card.due-soon { border-left-color: var(--mo-amber); background: #fffdf7; }
.mo-loan-active-card.overdue { border-left-color: var(--mo-red); background: #fff8f9; }
.mo-loan-active-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mo-loan-active-head span { display: block; color: var(--mo-muted); font-size: .68rem; margin-top: 3px; }
.mo-loan-active-head > b { font-size: .7rem; color: #9f2534; }
.mo-loan-active-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 14px; margin: 12px 0; }
.mo-loan-active-grid span { color: var(--mo-muted); font-size: .68rem; }
.mo-loan-active-grid b { display: block; color: #26374f; margin-top: 2px; overflow-wrap: anywhere; }
.mo-loan-active-actions { display: flex; justify-content: flex-end; gap: 8px; }
.mo-loan-modal-overlay {
    --mo-primary: #075fc7;
    --mo-primary-dark: #06479a;
    --mo-green: #07966c;
    --mo-green-dark: #057653;
    --mo-amber: #d97706;
    --mo-red: #dc3545;
    --mo-ink: #10213b;
    --mo-muted: #61708a;
    --mo-line: #dbe4ef;
    --mo-bg: #f4f7fb;
    --mo-card: #ffffff;
    position: fixed; z-index: 11000; inset: 0; padding: 14px; background: rgba(5,16,34,.72); display: grid; place-items: center; backdrop-filter: blur(3px); }
.mo-loan-modal { width: min(720px,100%); max-height: calc(100vh - 28px); overflow: auto; background: #fff; border-radius: 18px; padding: 17px; box-shadow: 0 24px 70px rgba(0,0,0,.32); }
.mo-loan-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.mo-loan-form-grid .full { grid-column: 1/-1; }
.mo-loan-duration-panel {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-top: 10px; padding: 12px 14px; border: 1px solid #d8e5f2; border-radius: 12px;
    background: #f6f9fc; color: #40536b; transition: .18s ease;
}
.mo-loan-duration-main { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.mo-loan-duration-main span { font-size: .78rem; font-weight: 700; }
.mo-loan-duration-main strong { font-size: 1.15rem; color: #0f2b4c; }
.mo-loan-duration-panel small { text-align: right; line-height: 1.4; }
.mo-loan-duration-panel.is-valid { border-color: #9ce3c4; background: #effcf5; color: #087a4d; }
.mo-loan-duration-panel.is-valid .mo-loan-duration-main strong { color: #087a4d; }
.mo-loan-duration-panel.is-warning { border-color: #f5cd75; background: #fff9e9; color: #9a5b00; }
.mo-loan-duration-panel.is-warning .mo-loan-duration-main strong { color: #9a5b00; }
.mo-loan-duration-panel.is-invalid { border-color: #f4a6ad; background: #fff1f2; color: #b4232d; }
.mo-loan-duration-panel.is-invalid .mo-loan-duration-main strong { color: #b4232d; }
.mo-loan-modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #e3eaf2; }
.mo-loan-submit-btn {
    min-width: 180px;
    min-height: 44px;
    background: linear-gradient(135deg, #075fc7, #0d8dd8) !important;
    border-color: #075fc7 !important;
    color: #ffffff !important;
    opacity: 1;
    box-shadow: 0 8px 20px rgba(7, 95, 199, .24) !important;
    font-weight: 800;
}
.mo-loan-submit-btn:hover { background: linear-gradient(135deg, #064fa8, #087ec4) !important; }
.mo-loan-submit-btn:focus-visible { outline: 3px solid rgba(7,95,199,.25); outline-offset: 2px; }
.mo-loan-submit-btn:disabled { opacity: .6; color: #fff !important; }

/* V86.37: Asset Loan tab filters */
.mo-loan-filterbar-available { grid-template-columns: minmax(240px, 1fr) minmax(150px, .35fr) minmax(150px, .35fr) auto; align-items: center; }
.mo-loan-filterbar-simple { grid-template-columns: minmax(260px, 1fr) auto; align-items: center; }
.mo-loan-clear-btn { white-space: nowrap; min-height: 40px; }

@media (max-width: 900px) {
    .mo-bottom-nav { grid-template-columns: repeat(4, 1fr); }
    .mo-loan-filterbar { grid-template-columns: 1fr 1fr; }
    .mo-loan-filterbar .mo-search { grid-column: 1/-1; }
    .mo-loan-filterbar-available .mo-loan-clear-btn { justify-self: stretch; }
    .mo-loan-filterbar-simple { grid-template-columns: minmax(0,1fr) auto; }
    .mo-loan-filterbar-simple .mo-search { grid-column: auto; }
}
@media (max-width: 600px) {
    .mo-loan-filterbar { grid-template-columns: 1fr; padding: 11px; }
    .mo-loan-filterbar .mo-search { grid-column: auto; }
    .mo-loan-filterbar-simple { grid-template-columns: 1fr; }
    .mo-loan-clear-btn { width: 100%; }
    .mo-loan-assets, .mo-loan-request-list, .mo-loan-active-list { padding: 5px 10px 12px; }
    .mo-loan-asset-card { grid-template-columns: 38px minmax(0,1fr); gap: 9px; }
    .mo-loan-asset-card > .mo-btn { grid-column: 2; justify-self: end; }
    .mo-loan-form-grid { grid-template-columns: 1fr; }
    .mo-loan-form-grid .full { grid-column: auto; }
    .mo-loan-active-grid { grid-template-columns: 1fr; }
    .mo-loan-modal { padding: 12px; border-radius: 14px; }
    .mo-loan-duration-panel { align-items: flex-start; flex-direction: column; gap: 4px; padding: 10px 11px; }
    .mo-loan-duration-panel small { text-align: left; }
    .mo-loan-modal-actions { position: sticky; bottom: -12px; margin-inline: -12px; padding: 12px; background: rgba(255,255,255,.97); z-index: 2; }
    .mo-loan-modal-actions .mo-btn { flex: 1; min-width: 0; }
    .mo-loan-submit-btn { min-width: 0; }
}

/* ==========================================================
   V86.45 — Friendly mobile layout for Mobile Operations
   ========================================================== */
@media (max-width: 768px) {
  .mobile-ops-page {
    width: 100%;
    max-width: 100%;
    padding-bottom: 96px;
    --mo-radius: 16px;
  }

  .mo-page-header {
    display: block;
    margin: 2px 2px 14px;
  }
  .mo-page-header h1 { font-size: 1.55rem; margin-top: 3px; }
  .mo-page-header p { font-size: .82rem; line-height: 1.5; }
  .mo-eyebrow { font-size: .65rem; }
  .mo-header-badge {
    display: inline-flex;
    max-width: 100%;
    margin-top: 9px;
    padding: 6px 10px;
    text-align: left;
  }

  .mo-kpi-strip {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
    margin-bottom: 12px;
  }
  .mo-kpi {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 9px;
    min-height: 82px;
    padding: 12px 10px;
    border-radius: 14px;
  }
  .mo-kpi-icon { width: 34px; height: 34px; border-radius: 10px; font-size: 1rem; }
  .mo-kpi strong { font-size: 1.3rem; margin-bottom: 5px; }
  .mo-kpi small { font-size: .68rem; line-height: 1.3; }

  .mo-card { border-radius: 16px; box-shadow: 0 6px 18px rgba(16,33,59,.05); }
  .mo-task-toolbar, .mo-loan-toolbar { padding: 11px; margin-bottom: 12px; }
  .mo-toolbar-row { flex-direction: column; align-items: stretch; }
  .mo-search { width: 100%; min-height: 48px; }
  .mo-segmented {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .mo-segmented::-webkit-scrollbar { display: none; }
  .mo-segmented button { flex: 0 0 auto; min-height: 42px; padding: 9px 14px; }

  .mo-section-head { padding: 13px 14px; align-items: flex-start; }
  .mo-section-head h2 { font-size: .98rem; }
  .mo-section-head p { font-size: .72rem; }

  .mo-work-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .mo-work-layout > .mo-card { width: 100%; min-height: 0; }
  .mo-work-selector, .mo-work-detail, .mo-work-form { padding: 13px; }
  .mo-step-title { margin-bottom: 12px; }
  .mo-step-title > span:first-child { flex-basis: 32px; width: 32px; height: 32px; }
  .mo-step-title h2 { font-size: 1rem; }
  .mo-step-title p { font-size: .72rem; line-height: 1.4; }

  .mo-scan-button {
    min-height: 190px;
    padding: 22px 14px;
    border-width: 2px;
  }
  .mo-scan-button > span { font-size: 3rem; }
  .mo-scan-button > strong { font-size: 1.05rem; }
  .mo-scan-button > small { max-width: 260px; font-size: .75rem; text-align: center; line-height: 1.5; }
  .mo-inline-search { flex-direction: column; }
  .mo-inline-search input { min-height: 48px; font-size: 16px; }
  .mo-inline-search .mo-btn { width: 100%; min-height: 48px; }

  .mo-asset-hero { align-items: flex-start; padding: 12px; }
  .mo-asset-icon { width: 44px; height: 44px; flex: 0 0 44px; }
  .mo-detail-grid > div {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 9px 1px;
  }
  .mo-detail-grid dt { font-size: .68rem; color: #718098; }
  .mo-detail-grid dd { font-size: .82rem; font-weight: 650; }

  .mo-form-grid, .mo-evidence-grid { grid-template-columns: 1fr; gap: 10px; }
  .mo-field input, .mo-field select, .mo-field textarea {
    min-height: 48px;
    padding: 11px 12px;
    font-size: 16px;
  }
  .mo-field textarea { min-height: 96px; }
  .mo-evidence-box { padding: 12px; }
  .mo-file-button span { min-height: 48px; display: grid; place-items: center; font-size: .8rem; }
  .mo-photo-preview { height: 210px; }
  .mo-signature-canvas { height: 190px; }
  .mo-gps-row { padding: 12px; }
  .mo-gps-row .mo-btn { min-height: 48px; }
  .mo-check-row { min-height: 48px; font-size: .78rem; }

  .mo-btn { min-height: 46px; padding: 10px 15px; }
  .mo-btn-sm { min-height: 40px; }
  .mo-task-list { padding: 0 11px 12px; }
  .mo-task-item {
    grid-template-columns: 38px minmax(0,1fr);
    gap: 9px;
    padding: 13px 2px;
  }
  .mo-task-action { grid-column: 1/-1; width: 100%; min-width: 0; align-items: stretch; }
  .mo-task-action .mo-btn { width: 100%; }

  .mo-loan-filterbar,
  .mo-loan-filterbar-available,
  .mo-loan-filterbar-simple {
    grid-template-columns: 1fr !important;
    padding: 11px;
    gap: 9px;
  }
  .mo-loan-filterbar select { min-height: 48px; font-size: 16px; }
  .mo-loan-assets, .mo-loan-request-list, .mo-loan-active-list { padding: 5px 10px 12px; }
  .mo-loan-asset-card { grid-template-columns: 42px minmax(0,1fr); padding: 14px 2px; }
  .mo-loan-asset-card > .mo-btn { grid-column: 1/-1; width: 100%; }
  .mo-loan-request-card { grid-template-columns: 1fr; gap: 8px; }
  .mo-loan-request-card > b { justify-self: start; }
  .mo-loan-active-head { flex-direction: column; }
  .mo-loan-active-actions { flex-direction: column; }
  .mo-loan-active-actions .mo-btn { width: 100%; }

  .mo-bottom-nav {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 950;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15,23,42,.2);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(14px);
  }
  .mo-bottom-nav button { min-height: 58px; font-size: .68rem; }

  .mo-scanner-overlay { padding: 0; align-items: stretch; }
  .mo-scanner-dialog {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    border-radius: 0;
    padding: 14px;
  }
}

@media (max-width: 390px) {
  .mo-kpi-strip { grid-template-columns: 1fr; }
  .mo-kpi { min-height: 70px; }
  .mo-photo-preview { height: 180px; }
}
