/* =====================================================================
   AutoSync phone app mode — the shop web app as an installed home-screen app (or ?app=1),
   styled like the native AutoSync iOS / Android app (mobilenative/src/theme).
   Everything is scoped under html.as-app (set in <head> by layouts/_appmodehead.php at phone widths),
   so the desktop / normal browser UI is unchanged.
   ===================================================================== */
:root {
  --ap-bg: #F2F4F8; --ap-card: #FFFFFF; --ap-fill: #EBEEF3; --ap-text: #0B1F3A; --ap-text2: #4A5A70; --ap-text3: #8593A6;
  --ap-sep: #E1E6EE; --ap-border: #D5DCE6; --ap-primary: #1565C0; --ap-primary-soft: #E3EEFB; --ap-navy: #0B1F3A;
  --ap-green: #15803D; --ap-green-soft: #E3F4E8; --ap-amber: #B45309; --ap-amber-soft: #FDF1E1; --ap-red: #B91C1C; --ap-red-soft: #FCE8E8;
  --ap-shadow: 0 1px 3px rgba(11, 31, 58, .07), 0 1px 1px rgba(11, 31, 58, .03);
  --ap-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ap-safe-t: env(safe-area-inset-top, 0px); --ap-safe-b: env(safe-area-inset-bottom, 0px);
  --ap-bar-h: calc(48px + var(--ap-safe-t)); --ap-tab-h: calc(56px + var(--ap-safe-b));
}
/* app-only hooks are invisible outside app mode */
.ap-bar, .ap-tabs, .ap-sheet, .ap-board, .ap-ro, .ap-actionbar, .ap-only { display: none; }

/* ---------------------------------------------------------------- base */
html.as-app, html.as-app body { height: auto; }
html.as-app { background: var(--ap-bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.as-app body { background: var(--ap-bg); color: var(--ap-text); font-family: var(--ap-font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: clip; min-height: 100dvh; overscroll-behavior-x: none; -webkit-overflow-scrolling: touch; }
.as-app body, .as-app .as-shell, .as-app .as-main { max-width: 100vw; }
.as-app *:not(input):not(textarea):not([contenteditable]) { -webkit-touch-callout: none; }
.as-app a, .as-app button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.as-app .ap-only { display: block; }
.as-app .as-sidebar, .as-app .as-backdrop, .as-app .as-topbar, .as-app [data-pwa-hint] { display: none !important; }
.as-app .as-shell { min-height: 0; display: block; }
.as-app .as-main { margin-left: 0 !important; display: block; min-height: calc(100dvh - var(--ap-bar-h)); }
.as-app .as-content { padding: 0 16px calc(var(--ap-tab-h) + 28px); max-width: none; }
.as-app .as-content-full { padding: 0 0 calc(var(--ap-tab-h) + 12px); }
.as-app .as-banner { margin: 0 12px 8px; border-radius: 12px; font-size: 13px; flex-wrap: wrap; }
.as-app .as-toasts { bottom: calc(var(--ap-tab-h) + 12px); left: 12px; right: 12px; top: auto; width: auto; }
.as-app .form-control, .as-app .form-select { font-size: 16px; } /* no iOS zoom on focus */
.as-app .form-control-sm, .as-app .form-select-sm { font-size: 15px; min-height: 36px; }
.as-app .btn { border-radius: 10px; }
.as-app .btn-sm { min-height: 34px; }
.as-app .as-card, .as-app .card { border: 0; border-radius: 16px; box-shadow: var(--ap-shadow); }
.as-app .as-card-header, .as-app .card-header { border-radius: 16px 16px 0 0; }
.as-app .table-responsive, .as-app .as-table-wrap { -webkit-overflow-scrolling: touch; }

/* page header → iOS large title */
.as-app .as-page-head { display: block; padding: 2px 0 12px; margin: 0; border: 0; background: none; }
.as-app .as-page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.12; color: var(--ap-text); margin: 0; }
.as-app .as-breadcrumb { display: none; }
.as-app .as-sub { font-size: 15px; color: var(--ap-text2); margin-top: 2px; }
.as-app .as-page-actions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 0; padding: 0 16px 2px; flex-wrap: nowrap; justify-content: flex-start; }
.as-app .as-page-actions::-webkit-scrollbar { display: none; }
.as-app .as-page-actions .btn { white-space: nowrap; border-radius: 999px; font-weight: 600; flex-shrink: 0; }
.as-app .as-page-actions .btn-light { background: var(--ap-card); border: 1px solid var(--ap-border); }

/* modals → bottom sheets */
.as-app .modal-dialog { margin: 0; position: fixed; left: 0; right: 0; bottom: 0; max-width: none; width: 100%; transform: translateY(16px); }
.as-app .modal.show .modal-dialog { transform: none; }
.as-app .modal-content { border: 0; border-radius: 16px 16px 0 0; max-height: calc(100dvh - var(--ap-safe-t) - 24px); padding-bottom: var(--ap-safe-b); }
.as-app .modal-dialog-scrollable .modal-content { max-height: calc(100dvh - var(--ap-safe-t) - 24px); }
.as-app .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.as-app .modal-header { border-bottom: .5px solid var(--ap-sep); }
.as-app .modal-title { font-size: 17px; font-weight: 600; }
.as-app .modal-footer { border-top: .5px solid var(--ap-sep); }
.as-app .modal-footer .btn { min-height: 46px; flex: 1; font-weight: 600; }
.as-app .offcanvas { max-width: 100vw; }
.as-app .offcanvas-end { width: 100vw !important; }
.as-app .dropdown-menu { border-radius: 14px; border: 0; box-shadow: 0 10px 34px rgba(11, 31, 58, .22); max-width: calc(100vw - 24px); }
.as-app .dropdown-item { padding-top: .55rem; padding-bottom: .55rem; }

/* ---------------------------------------------------------------- top bar */
.as-app .ap-bar { display: flex; align-items: center; position: sticky; top: 0; z-index: 1030; height: var(--ap-bar-h); padding: var(--ap-safe-t) 8px 0;
  background: rgba(242, 244, 248, .86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid transparent; transition: border-color .2s, background .2s; }
.as-app .ap-bar.ap-bar-scrolled, .as-app .ap-bar:not(.ap-bar-root) { border-bottom-color: rgba(11, 31, 58, .12); }
.ap-bar-left, .ap-bar-right { flex: 1 1 0; display: flex; align-items: center; min-width: 0; }
.ap-bar-right { justify-content: flex-end; gap: 2px; }
.ap-bar-title { flex: 0 1 auto; max-width: 56%; font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--ap-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; transition: opacity .2s; }
.ap-bar-root .ap-bar-title { opacity: 0; }
.ap-bar-root.ap-bar-scrolled .ap-bar-title { opacity: 1; }
.ap-back { display: inline-flex; align-items: center; gap: 0; color: var(--ap-primary); font-size: 17px; text-decoration: none !important; padding: 6px 6px 6px 0; min-height: 44px; }
.ap-back i { font-size: 22px; line-height: 1; -webkit-text-stroke: .6px currentColor; }
.ap-loc { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; border: 0; background: none; color: var(--ap-text2); font-size: 14px; font-weight: 600; padding: 6px 4px; }
.ap-loc .bi-geo-alt-fill { color: var(--ap-primary); }
.ap-loc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.ap-loc .bi-chevron-down { font-size: 11px; color: var(--ap-text3); }
.ap-icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; color: var(--ap-primary); font-size: 22px; text-decoration: none !important; border-radius: 10px; }
.ap-icon-btn.ap-plus { font-size: 27px; }
.ap-icon-btn .ap-badge { position: absolute; top: 3px; right: 2px; }
.ap-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--ap-red); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; font-style: normal; border: 1.5px solid #fff; }

/* ---------------------------------------------------------------- bottom tab bar */
.as-app .ap-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; height: var(--ap-tab-h); padding: 6px 4px var(--ap-safe-b);
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid rgba(11, 31, 58, .14); }
.ap-tab { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; color: #75849A; text-decoration: none !important; min-width: 0; padding-top: 2px; }
.ap-tab.active { color: var(--ap-primary); }
.ap-tab-ic { position: relative; height: 28px; display: grid; place-items: center; font-size: 24px; line-height: 1; }
.ap-tab-ic .ap-badge { position: absolute; top: -3px; left: 55%; height: 18px; min-width: 18px; font-size: 11px; }
.ap-tab-lbl { font-size: 10.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.ap-more-ic { width: 25px; height: 25px; border-radius: 50%; border: 1.8px solid currentColor; display: grid; place-items: center; font-size: 15px; }
.ap-tab.active .ap-more-ic { background: currentColor; }
.ap-tab.active .ap-more-ic i { color: #fff; }

/* ---------------------------------------------------------------- sheets */
.as-app .ap-sheet { display: block; position: fixed; inset: 0; z-index: 1060; }
.as-app .ap-sheet[hidden] { display: none; }
.ap-sheet-backdrop { position: absolute; inset: 0; background: rgba(11, 31, 58, .45); opacity: 0; transition: opacity .22s; }
.ap-sheet-panel { position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--ap-safe-b)); max-height: 80dvh; overflow-y: auto; transform: translateY(110%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.ap-sheet.open .ap-sheet-backdrop { opacity: 1; }
.ap-sheet.open .ap-sheet-panel { transform: none; }
.ap-sheet-grab { display: none; }
.ap-sheet-title { text-align: center; font-size: 13px; font-weight: 600; color: var(--ap-text3); padding: 12px 16px 10px; background: rgba(255, 255, 255, .97); border-radius: 14px 14px 0 0; }
.ap-sheet-panel > .ap-group { border-radius: 0 0 14px 14px; box-shadow: none; }
.ap-sheet-cancel { display: block; width: 100%; margin-top: 8px; height: 56px; border: 0; border-radius: 14px; background: #fff; color: var(--ap-primary); font-size: 18px; font-weight: 600; }
.ap-sheet-open { overflow: hidden; }

/* ---------------------------------------------------------------- grouped list (native Group / Row) */
.ap-group { display: block; background: var(--ap-card); border-radius: 12px; overflow: hidden; box-shadow: var(--ap-shadow); }
.ap-group > form { margin: 0; }
.ap-group-h { padding: 10px 16px 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ap-text3); background: var(--ap-card); }
.ap-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 10px 16px; border: 0; background: var(--ap-card); color: var(--ap-text); text-align: left; text-decoration: none !important; font: inherit; }
.ap-row:active { background: var(--ap-fill); }
.ap-group > .ap-row + .ap-row::before, .ap-group > form + form .ap-row::before, .ap-group > .ap-row + form .ap-row::before, .ap-group > form + .ap-row::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: .5px; background: var(--ap-sep); }
.ap-row-ic { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 16px; background: var(--ap-primary); }
.ap-row-ic.plain { background: none; color: var(--ap-primary); font-size: 19px; }
.ap-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ap-row-title { font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-row-sub { font-size: 13px; color: var(--ap-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-row-val { font-size: 17px; color: var(--ap-text3); }
.ap-row-chev { color: #B7C1CE; font-size: 15px; -webkit-text-stroke: .5px currentColor; }
.ap-row-check { color: var(--ap-primary); font-size: 20px; }
.ap-row-danger .ap-row-title { color: var(--ap-red); }
.ap-row-danger .ap-row-ic.plain { color: var(--ap-red); }
.ap-row .ap-dot { flex: 0 0 12px; width: 12px; height: 12px; }
.ap-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--ap-red); color: #fff; font-size: 13px; font-weight: 700; display: inline-grid; place-items: center; }

/* ---------------------------------------------------------------- shared atoms */
.ap-large { padding: 4px 0 10px; }
.ap-large-title { font-size: 34px; font-weight: 700; letter-spacing: -.025em; line-height: 1.12; color: var(--ap-text); margin: 0; }
.ap-large-sub { font-size: 16px; color: var(--ap-text2); margin-top: 2px; }
.ap-section-h { display: flex; align-items: flex-end; gap: 8px; padding: 0 4px; margin: 22px 0 7px; font-size: 13px; font-weight: 600; color: var(--ap-text2); text-transform: uppercase; letter-spacing: .04em; }
.ap-section-h em, .ap-section-h a { margin-left: auto; font-style: normal; text-transform: none; letter-spacing: 0; }
.ap-section-h em { color: var(--ap-text3); font-weight: 400; }
.ap-section-h a { color: var(--ap-primary); text-decoration: none; }
.ap-card { display: block; background: var(--ap-card); border-radius: 16px; box-shadow: var(--ap-shadow); padding: 16px; color: var(--ap-text); text-decoration: none !important; }
.ap-flex { flex: 1 1 auto; }
.ap-dot { --c: #64748B; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.ap-chip { --c: #64748B; display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ap-chip i { font-size: 10.5px; }
.ap-chip-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .02em; }
.ap-copy { cursor: copy; }
.ap-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px; background: var(--ap-primary); overflow: hidden; text-decoration: none !important; }
.ap-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ap-avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.ap-avatar-lg { width: 58px; height: 58px; background: var(--ap-navy); }
.ap-avatar-none { background: none; color: var(--ap-text3); border: 1.5px dashed var(--ap-border); font-size: 14px; }
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border: 0; border-radius: 12px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; text-decoration: none !important; white-space: nowrap; }
.ap-btn:active { opacity: .8; }
.ap-btn-primary { background: var(--ap-primary); color: #fff !important; }
.ap-btn-success { background: var(--ap-green); color: #fff !important; }
.ap-btn-lg { height: 54px; width: 100%; }
.ap-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 22px 16px; }
.ap-empty-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ap-primary-soft); color: var(--ap-primary); display: grid; place-items: center; font-size: 28px; margin-bottom: 6px; }
.ap-empty b { font-size: 17px; font-weight: 600; }
.ap-empty span:last-child { font-size: 15px; color: var(--ap-text2); }
.ap-skel { height: 128px; border-radius: 16px; background: #E4E8EF; margin-bottom: 12px; animation: ap-pulse 1.2s ease-in-out infinite alternate; }
@keyframes ap-pulse { to { opacity: .55; } }
.ap-search { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 9px; margin: 0; border-radius: 11px; background: #E6EAF0; color: var(--ap-text3); }
.ap-search i { font-size: 16px; }
.ap-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--ap-text); height: 38px; padding: 0; -webkit-appearance: none; appearance: none; }
.ap-search input::placeholder { color: var(--ap-text3); }
.ap-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ap-seg { display: flex; padding: 2px; border-radius: 9px; background: #E3E7ED; }
.ap-seg button { flex: 1 1 0; height: 30px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; color: var(--ap-text2); font-weight: 500; }
.ap-seg button.active { background: #fff; color: var(--ap-text); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .05); }
.ap-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; margin: 0 -16px; -webkit-overflow-scrolling: touch; }
.ap-pills::-webkit-scrollbar { display: none; }
.ap-pill { --c: var(--ap-primary); flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 17px; border: 1px solid var(--ap-border); background: var(--ap-card); color: var(--ap-text); font-size: 15px; font-weight: 600; white-space: nowrap; text-decoration: none !important; }
.ap-pill em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--ap-text3); }
.ap-pill.active { background: var(--ap-primary); border-color: var(--ap-primary); color: #fff; }
.ap-pill.active em { color: rgba(255, 255, 255, .85); }
.ap-pill.active .ap-dot { background: #fff; }

/* ---------------------------------------------------------------- RO card (native ro-card.tsx) */
.ap-cards { display: flex; flex-direction: column; gap: 12px; }
.ap-rocard { --st: #64748B; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 14px 18px; background: var(--ap-card); border-radius: 16px; box-shadow: var(--ap-shadow);
  color: var(--ap-text) !important; text-decoration: none !important; overflow: hidden; transition: transform .12s; user-select: none; -webkit-user-select: none; }
.ap-rocard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--st); }
.ap-rocard:active, .ap-rocard.pressed { transform: scale(.98); }
.ap-cards[data-compact] .ap-rocard { padding: 12px 12px 12px 16px; }
.ap-rc-row1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ap-rc-num { font-size: 17px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ap-rc-flag { font-size: 14px; }
.ap-rc-amt { font-size: 17px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; }
.ap-rc-amt.due { color: var(--ap-red); }
.ap-await { margin-left: 6px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--ap-amber-soft); color: var(--ap-amber); font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; display: inline-flex; align-items: center; }
.ap-rc-row2 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ap-rc-who { flex: 1 1 auto; min-width: 0; }
.ap-rc-cust { font-size: 16px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-rc-veh { font-size: 13px; color: var(--ap-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-rc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-rc-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 500; color: var(--ap-text2); white-space: nowrap; overflow: hidden; }
.ap-rc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ap-rc-meta i { color: var(--ap-text3); font-size: 12.5px; }
.ap-rc-meta .over { color: var(--ap-red); font-weight: 700; }
.ap-rc-meta .over i { color: var(--ap-red); }

/* ---------------------------------------------------------------- Home */
.as-app .ap-home-page .as-content, .as-app .ap-more-page .as-content { padding-top: 0; }
.ap-home-head { padding-bottom: 6px; }
.ap-locline { display: flex; align-items: center; gap: 5px; border: 0; background: none; padding: 6px 0 12px; font-size: 15px; color: var(--ap-text3); max-width: 100%; text-align: left; }
.ap-locline .bi-geo-alt-fill { color: var(--ap-primary); font-size: 14px; }
.ap-locline b { color: var(--ap-text); font-weight: 600; white-space: nowrap; }
.ap-locline span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-locline .bi-chevron-down { font-size: 12px; }
.ap-kpi-row { display: grid; gap: 12px; margin-bottom: 12px; }
.ap-kpi-row.two { grid-template-columns: 1fr 1fr; }
.ap-kpi-row.three { grid-template-columns: 1fr 1fr 1fr; }
.ap-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px; background: var(--ap-card); border-radius: 16px; box-shadow: var(--ap-shadow); color: var(--ap-text) !important; text-decoration: none !important; }
.ap-kpi.big { padding: 14px 16px; }
.ap-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.ap-kpi-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 15px; }
.ap-kpi.big .ap-kpi-ic { width: 38px; height: 38px; border-radius: 10px; font-size: 19px; }
.ap-kpi-sub { font-size: 13px; font-weight: 600; color: var(--ap-text2); font-variant-numeric: tabular-nums; }
.ap-kpi-val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ap-kpi.big .ap-kpi-val { font-size: 28px; }
.ap-kpi-lbl { font-size: 13px; color: var(--ap-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-kpi.big .ap-kpi-lbl { font-size: 15px; }
.ap-balance { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.ap-balance-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--ap-red-soft); color: var(--ap-red); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.ap-balance-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.ap-balance-lbl { font-size: 13px; color: var(--ap-text2); }
.ap-balance-val { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ap-balance-loc { font-size: 12px; color: var(--ap-text3); text-align: right; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-clock { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #0B1F3A, #13294B); color: #fff !important; text-decoration: none !important; }
.ap-clock-dot { width: 10px; height: 10px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); }
.ap-clock-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ap-clock-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #9FB3CF; }
.ap-clock-job { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- More */
.ap-more .ap-profile { display: flex; align-items: center; gap: 14px; padding: 16px; margin-top: 4px; color: var(--ap-text) !important; text-decoration: none !important; border-radius: 12px; }
.ap-profile-name { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.ap-profile-role { font-size: 15px; color: var(--ap-text2); }
.ap-profile-mail { font-size: 13px; color: var(--ap-text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-signout { margin-top: 28px; }
.ap-signout .ap-row-main { align-items: center; }
.ap-foot { text-align: center; font-size: 12px; color: var(--ap-text3); margin: 16px 0 0; }

/* ---------------------------------------------------------------- Job Board */
.as-app .jb-page .jb, .as-app .jb-page .jb-filters { display: none !important; }
.as-app .ap-board { display: block; padding: 0 16px; }
.ap-board .ap-large { padding-top: 4px; }
.ap-board-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.ap-board-sec-h { --c: #64748B; display: flex; align-items: center; gap: 8px; margin: 18px 4px 10px; font-size: 17px; }
.ap-board-sec-h b { font-weight: 600; letter-spacing: -.02em; }
.ap-board-sec-h em { font-style: normal; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: #E3E7ED; color: var(--ap-text2); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.ap-board-sec-h .ap-dot { width: 10px; height: 10px; }
.ap-sum { font-size: 13px; font-weight: 600; color: var(--ap-text2); font-variant-numeric: tabular-nums; }
.ap-board-list { padding-bottom: 8px; }
.ap-board-list > .ap-empty { margin-top: 16px; }

/* ---------------------------------------------------------------- Repair orders list → card list */
.as-app .ro-quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px !important; padding: 2px 16px 4px; }
.as-app .ro-quick::-webkit-scrollbar { display: none; }
.as-app .ro-quick-tile { flex: 0 0 auto; height: 34px; padding: 0 13px; gap: 6px; border-radius: 17px; border: 1px solid var(--ap-border); background: var(--ap-card); box-shadow: none; }
.as-app .ro-quick-tile > span:last-child { display: flex; align-items: baseline; gap: 6px; }
.as-app .ro-quick-ico { display: none; }
.as-app .ro-quick-tile .lbl { font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: -.01em; color: var(--ap-text); }
.as-app .ro-quick-tile .val { font-size: 13px; font-weight: 600; color: var(--ap-text3); }
.as-app .ro-quick-tile.active { background: var(--ap-primary); border-color: var(--ap-primary); box-shadow: none; }
.as-app .ro-quick-tile.active .lbl { color: #fff; }
.as-app .ro-quick-tile.active .val { color: rgba(255, 255, 255, .85); }
.as-app .as-card:has(> .rol), .as-app .as-card:has(> #roFilters) { background: transparent; box-shadow: none; border-radius: 0; }
.as-app #roFilters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 12px; border: 0; background: none; }
.as-app #roFilters .as-search-inline { flex: 1 1 100%; position: relative; }
.as-app #roFilters .as-search-inline .form-control { height: 38px; border: 0; border-radius: 11px; background: #E6EAF0; padding-left: 34px; font-size: 17px; }
.as-app #roFilters .as-search-inline i { left: 11px; color: var(--ap-text3); }
.as-app #roFilters > .form-select { flex: 1 1 0; min-width: 0; border-radius: 9px; border: 0; background-color: #E3E7ED; font-size: 14px; font-weight: 600; height: 34px; }
.as-app #roFilters > .btn { border-radius: 9px; height: 34px; background: #E3E7ED; border: 0; font-weight: 600; }
.as-app #roFilters .rol-hidden-toggle, .as-app .ro-show-page .ro-autosave { display: none; }
.as-app .rol-hint { margin: 0 4px 10px; font-size: 13px; }
.as-app .rol { padding: 0; gap: 12px; }
.as-app .rol-head { display: none; }
/* each row becomes the native RO card: #num … amount / customer + vehicle … tech / chips / status / promise */
.as-app .rol-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 14px 14px 18px; border: 0; border-radius: 16px;
  background: var(--ap-card); box-shadow: var(--ap-shadow); color: var(--ap-text); }
.as-app .rol-row::after { content: ""; order: 7; flex: 0 0 100%; height: 0; }
.as-app .rol-row:hover { transform: none; box-shadow: var(--ap-shadow); }
.as-app .rol-row:active { transform: scale(.98); }
.as-app .rol-row.is-overdue, .as-app .rol-row.is-closed { background: var(--ap-card); }
.as-app .rol-ro, .as-app .rol-status { display: contents; }
.as-app .rol-num { order: 1; font-size: 17px; font-weight: 600; color: var(--ap-text); letter-spacing: -.02em; }
.as-app .rol-num small { font-size: 13px; color: var(--ap-text3); font-weight: 500; }
.as-app .rol-amount { order: 2; margin-left: auto; align-items: flex-end; }
.as-app .rol-amt { font-size: 17px; font-weight: 600; color: var(--ap-text); letter-spacing: -.02em; }
.as-app .rol-amt.due { color: var(--ap-red); }
.as-app .rol-amount .rol-sub, .as-app .rol-bal { display: none; }
.as-app .rol-cust { order: 3; flex: 1 1 calc(100% - 52px); min-width: 0; gap: 0; }
.as-app .rol-name { font-size: 16px; font-weight: 600; color: var(--ap-text); letter-spacing: -.02em; }
.as-app .rol-phone { display: none; }
.as-app .rol-veh { display: block; font-size: 13px; color: var(--ap-text2); white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.as-app .rol-row .rol-c, .as-app .rol-row .rol-c * { overflow-wrap: normal; }
.as-app .rol-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-app .rol-veh .as-plate { background: none; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: 0; }
.as-app .rol-vin { font-size: 12px; }
.as-app .rol-tech { order: 4; flex: 0 0 auto; }
.as-app .rol-tech .rol-techname { font-size: 0; gap: 0; }
.as-app .rol-tech .rol-sub { display: none; }
.as-app .rol-av { width: 30px; height: 30px; font-size: 11.5px; }
.as-app .rol-av.none { border: 1.5px dashed var(--ap-border); background: none; color: var(--ap-text3); font-size: 14px; }
.as-app .rol-notes { order: 5; flex: 1 1 100%; gap: 6px; }
.as-app .rol-chips { gap: 6px; }
.as-app .rol-chip { border-radius: 999px; font-size: 11.5px; font-weight: 600; height: 21px; padding: 0 8px; }
.as-app .rol-note { font-size: 13px; color: var(--ap-text2); }
.as-app .rol-pill { order: 8; font-size: 11.5px; font-weight: 600; padding: 3px 8px; }
.as-app .rol-promise, .as-app .rol-ro > .rol-sub, .as-app .rol-status > .rol-sub { order: 8; font-size: 12px; font-weight: 500; color: var(--ap-text2); }
.as-app .rol-promise.over { background: none; padding: 0; color: var(--ap-red); font-weight: 700; }
.as-app .rol-status > .rol-sub { order: 9; }
.as-app .rol-page .as-sub, .as-app .rol-page .as-page-actions { display: none; }
.as-app .ap-seg-links { display: flex; margin-bottom: 12px; }
.ap-seg-links a { flex: 1 1 0; height: 30px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; color: var(--ap-text2); text-decoration: none !important; }
.ap-seg-links a.active { background: #fff; color: var(--ap-text); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .05); }
.as-app .ro-rolist-toggle, .as-app .as-ltog { display: none !important; }
.as-app .as-pager, .as-app .pagination { justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- RO detail */
.as-app .ro-show-page .ap-ro { display: block; margin: 6px 0 12px; }
.as-app .ro-show-page .ro-head { display: none; }
.as-app .ro-show-page .ro-sticky { position: sticky; top: var(--ap-bar-h); z-index: 1010; margin: 0 -16px 12px; padding: 6px 16px; background: rgba(242, 244, 248, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 0; box-shadow: none; }
.as-app .ro-show-page .ro-tabs { padding: 0; }
.as-app .ro-show-page .ro-tabs .nav-tabs { display: flex; flex-wrap: nowrap; gap: 0; padding: 2px; border-radius: 10px; background: #E3E7ED; border: 0; overflow-x: auto; scrollbar-width: none; }
.as-app .ro-show-page .ro-tabs .nav-tabs::-webkit-scrollbar { display: none; }
.as-app .ro-show-page .ro-tabs .nav-item { flex: 1 0 auto; }
.as-app .ro-show-page .ro-tabs .nav-link { display: flex; align-items: center; justify-content: center; gap: 4px; height: 32px; padding: 0 12px; margin: 0; border: 0; border-radius: 8px; color: var(--ap-text2); font-size: 14px; font-weight: 500; background: none; }
.as-app .ro-show-page .ro-tabs .nav-link > i { display: none; }
.as-app .ro-show-page .ro-tabs .nav-link.active { background: #fff; color: var(--ap-text); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .05); }
.as-app .ro-show-page .ro-tabs .as-pill-count { font-size: 11px; padding: 0 5px; }
.as-app .ro-tab-lbl { font-size: 0; }
.as-app .ro-tab-lbl::after { content: attr(data-ap); font-size: 14px; }
.as-app .ro-show-page .ro-layout { display: block; }
.as-app .ro-show-page .ro-rail { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; position: static; max-height: none; }
.as-app .ro-show-page .ro-label-card, .as-app .ro-show-page .ro-actions-card { display: none; }
.as-app .ro-show-page .ro-card { border: 0; border-radius: 16px; box-shadow: var(--ap-shadow); }
.as-app .ro-show-page .ro-closed-banner { border-radius: 12px; }
.as-app .ro-show-page .as-content { padding-bottom: calc(96px + var(--ap-safe-b)); }
.as-app .ro-show-page .ap-tabs { display: none; }
.as-app .ro-show-page .as-toasts { bottom: calc(84px + var(--ap-safe-b)); }

.ap-ro-card { background: var(--ap-card); border-radius: 16px; box-shadow: var(--ap-shadow); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ap-ro-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-ro-status { --c: #64748B; position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--c); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: -.01em; max-width: 100%; }
.ap-ro-status i { font-size: 13px; -webkit-text-stroke: .4px currentColor; }
.ap-ro-status.has-select select { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 16px; }
.ap-ro-flag { font-size: 15px; }
.ap-ro-flag.p-urgent { color: var(--ap-red); } .ap-ro-flag.p-high { color: var(--ap-amber); }
.ap-ro-veh { display: flex; align-items: center; gap: 12px; color: var(--ap-text) !important; text-decoration: none !important; min-width: 0; }
.ap-ro-veh-ic { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 12px; background: var(--ap-primary-soft); color: var(--ap-primary); display: grid; place-items: center; font-size: 25px; }
.ap-ro-veh-main { display: flex; flex-direction: column; min-width: 0; }
.ap-ro-veh-name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-ro-veh-sub { font-size: 14px; color: var(--ap-text2); }
.ap-ro-vin { font: 500 12.5px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ap-text3); letter-spacing: .04em; align-self: flex-start; }
.ap-ro-cust { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ap-ro-cust .ap-avatar { width: 46px; height: 46px; }
.ap-ro-cust-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; color: var(--ap-text) !important; text-decoration: none !important; }
.ap-ro-cust-name { font-size: 17px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-ro-cust-sub { font-size: 13px; color: var(--ap-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-ro-call { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ap-primary); font-size: 20px; border-radius: 50%; text-decoration: none !important; }
.ap-ro-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ap-ro-tile { background: #EEF1F5; border-radius: 10px; padding: 7px 10px; min-width: 0; }
.ap-ro-tile span { display: block; font-size: 12px; color: var(--ap-text2); }
.ap-ro-tile b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-ro-tile.late b { color: var(--ap-red); }
.ap-ro-concern { background: #EEF1F5; border-radius: 10px; padding: 10px 12px; }
.ap-ro-concern span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ap-text2); margin-bottom: 2px; }
.ap-ro-concern p { margin: 0; font-size: 15px; }
.ap-ro-totals { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; border-top: .5px solid var(--ap-sep); padding-top: 12px; }
.ap-ro-totals span { display: block; font-size: 13px; color: var(--ap-text2); }
.ap-ro-totals b { font-size: 18px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ap-ro-totals .paid b { color: var(--ap-green); }
.ap-ro-totals .due b { color: var(--ap-red); }
.as-app .ro-show-page .ap-actionbar { display: flex; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; padding: 10px 16px calc(10px + var(--ap-safe-b));
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: .5px solid rgba(11, 31, 58, .14); }
.ap-actionbar-amt { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.ap-actionbar-amt span { font-size: 13px; color: var(--ap-text2); white-space: nowrap; }
.ap-actionbar-amt b { font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ap-actionbar .ap-btn { flex: 0 1 58%; min-width: 0; }
.ap-actionbar-more { flex: 0 0 46px; width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--ap-primary-soft); color: var(--ap-primary); font-size: 20px; display: grid; place-items: center; }

/* ---------------------------------------------------------------- Messages */
.as-app .msg-body .as-content-full { padding-bottom: 0; }
.as-app .msg-app { display: block; height: auto; background: transparent; overflow: visible; }
.as-app .msg-list-pane { border: 0; background: transparent; min-height: calc(100dvh - var(--ap-bar-h) - var(--ap-tab-h)); padding-bottom: calc(var(--ap-tab-h) + 12px); }
.as-app .msg-list-head { border: 0; padding: 0 16px 10px; gap: 12px; }
.as-app .msg-list-head h1 { font-size: 34px !important; font-weight: 700; letter-spacing: -.025em; color: var(--ap-text); }
.as-app .msg-list-head h1 .as-badge { font-size: 13px; vertical-align: 6px; }
.as-app .msg-list-head [data-msg-new] { border-radius: 999px; }
.as-app .msg-filters .as-search-inline .form-control { height: 38px; border: 0; border-radius: 11px; background: #E6EAF0; font-size: 17px; padding-left: 34px; }
.as-app .msg-filters .as-search-inline i { left: 11px; color: var(--ap-text3); }
.as-app .msg-chips { display: flex; padding: 2px; border-radius: 9px; background: #E3E7ED; gap: 0; }
.as-app .msg-chip { flex: 1 1 0; justify-content: center; height: 30px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; color: var(--ap-text2); font-weight: 500; }
.as-app .msg-chips .btn-check:checked + .msg-chip { background: #fff; color: var(--ap-text); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .1); }
.as-app .msg-filters .form-select { border: 0; background-color: #E3E7ED; border-radius: 9px; font-size: 14px; font-weight: 600; }
.as-app .msg-list { margin: 0 16px; border-radius: 12px; background: var(--ap-card); box-shadow: var(--ap-shadow); overflow: hidden; flex: none; }
.as-app .msg-item { gap: 12px; padding: 12px 16px; border-bottom: .5px solid var(--ap-sep); }
.as-app .msg-item:last-child { border-bottom: 0; }
.as-app .msg-item.active { background: transparent; box-shadow: none; }
.as-app .msg-item .as-avatar { width: 44px; height: 44px; font-size: 15px; background: #64748B; color: #fff; }
.as-app .msg-item.unread .as-avatar { background: var(--ap-primary); }
.as-app .msg-item .msg-name { font-size: 17px; letter-spacing: -.02em; }
.as-app .msg-item .msg-preview { font-size: 15px; color: var(--ap-text2); }
.as-app .msg-item.unread .msg-preview { color: var(--ap-text); }
.as-app .msg-item .msg-time { font-size: 13px; color: var(--ap-text3); }
.as-app .msg-item.unread .msg-time { color: var(--ap-primary); font-weight: 600; }
.as-app .msg-item .msg-badge { background: var(--ap-primary); min-width: 20px; height: 20px; border-radius: 10px; font-size: 12px; display: inline-grid; place-items: center; }
.as-app .msg-thread-pane { display: none; }
.as-app .msg-app.has-thread .msg-list-pane { display: none; }
.as-app .msg-app.has-thread .msg-thread-pane { display: flex; position: fixed; inset: 0; z-index: 1035; background: var(--ap-bg); }
.as-app body:has(.msg-app.has-thread) .ap-tabs, .as-app body:has(.msg-app.has-thread) .ap-bar { display: none; }
.as-app .msg-thread-head { padding: calc(6px + var(--ap-safe-t)) 8px 6px; min-height: var(--ap-bar-h); background: rgba(242, 244, 248, .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom: .5px solid rgba(11, 31, 58, .12); }
.as-app .msg-back { display: inline-flex; color: var(--ap-primary); font-size: 22px; }
.as-app .msg-thread-head [data-msg-title] { font-size: 17px; text-align: left; }
.as-app .msg-head-actions .btn { border-radius: 999px; background: transparent; border: 0; color: var(--ap-primary); }
.as-app .msg-head-actions .btn span { display: none; }
.as-app .msg-scroll { padding: 12px 12px 16px; background: var(--ap-bg); }
.as-app .msg-bubble-wrap { max-width: 80%; }
.as-app .msg-bubble { font-size: 16px; line-height: 1.35; padding: 8px 13px; border-radius: 18px; box-shadow: none; }
.as-app .msg-bubble-wrap.out .msg-bubble { background: var(--ap-primary); border-bottom-right-radius: 5px; }
.as-app .msg-bubble-wrap.in .msg-bubble { background: #E4E8EE; border: 0; color: var(--ap-text); border-bottom-left-radius: 5px; }
.as-app .msg-bubble-meta { font-size: 11px; color: var(--ap-text3); }
.as-app .msg-composer { padding: 8px 10px calc(8px + var(--ap-safe-b)); background: rgba(255, 255, 255, .96); border-top: .5px solid var(--ap-sep); }
.as-app .msg-composer-top { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.as-app .msg-input-row textarea { border-radius: 20px; background: #fff; font-size: 16px; min-height: 38px; }
.as-app .msg-send { width: 36px; height: 36px; background: var(--ap-primary); border: 0; }
.as-app .msg-composer-foot { display: none; }
.as-app .msg-empty { display: none; }

/* ---------------------------------------------------------------- Technician workspace (My Jobs) */
.as-app .tw-body .ap-tw-large { display: block; }
.as-app .tw-head { display: block; margin-bottom: 12px; }
.as-app .tw-hello, .as-app .tw-sub { display: none; }
.as-app .tw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 10px; padding: 14px 0; background: var(--ap-card); border-radius: 16px; box-shadow: var(--ap-shadow); }
.as-app .tw-stats > div { display: flex; flex-direction: column-reverse; align-items: center; background: none; border: 0; border-radius: 0; padding: 0 6px; min-width: 0; }
.as-app .tw-stats > div + div { border-left: .5px solid var(--ap-sep); }
.as-app .tw-stats span { font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ap-text2); }
.as-app .tw-stats b { font-size: 20px; font-weight: 700; }
.as-app .tw-viewas { border-radius: 12px; }
.as-app .tw-clock { top: calc(var(--ap-bar-h) + 6px); border-radius: 16px; }
.as-app .tw-tabs { padding: 2px; margin: 0 0 12px; gap: 0; border-radius: 10px; background: #E3E7ED; }
.as-app .tw-tab { flex: 1 0 auto; justify-content: center; min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ap-text2); font-size: 14px; font-weight: 500; }
.as-app .tw-tab i { display: none; }
.as-app .tw-tab.active { background: #fff; color: var(--ap-text); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .1); }
.as-app .tw-card { border: 0; border-radius: 16px; box-shadow: var(--ap-shadow); margin-bottom: 12px; }
.as-app .tw-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ro status chev" "veh veh veh" "cust cust cust"; gap: 2px 8px; padding: 14px 16px 8px; border: 0; }
.as-app .tw-card-head > .tw-ro { grid-area: ro; font-size: 17px; font-weight: 600; color: var(--ap-text); min-width: 0; }
.as-app .tw-card-head > .min-w-0 { display: contents; }
.as-app .tw-card-head .tw-veh { grid-area: veh; font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.as-app .tw-card-head .tw-veh .as-plate { display: none; }
.as-app .tw-card-head .tw-cust { grid-area: cust; font-size: 15px; color: var(--ap-text2); }
.as-app .tw-card-head .tw-status { display: inline-flex; grid-area: status; justify-self: start; border: 0; font-size: 12px; font-weight: 600; }
.as-app .tw-card-head > .bi-chevron-right { grid-area: chev; color: var(--ap-text3); }
.as-app .tw-concern { margin: 4px 16px 12px; padding: 10px 12px; border-radius: 10px; background: #EEF1F5; font-size: 15px; }
.as-app .tw-concern i { display: none; }
.as-app .tw-concern::before { content: "CONCERN"; display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ap-text2); }
.as-app .tw-concern.text-warning-emphasis::before { content: "WAITING"; }
.as-app .tw-jobs { padding: 0; border-top: .5px solid var(--ap-sep); }
.as-app .tw-job { padding: 14px 16px; border-radius: 0; gap: 10px; }
.as-app .tw-job + .tw-job { border-top: .5px solid var(--ap-sep); }
.as-app .tw-job-main { flex: 1 1 100%; }
.as-app .tw-job-name { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.as-app .tw-job-meta { font-size: 14px; color: var(--ap-text2); }
.as-app .tw-job-actions { display: flex; gap: 10px; width: 100%; }
.as-app .tw-job-actions .tw-btn { flex: 1 1 0; min-height: 54px; border-radius: 12px; font-size: 18px; font-weight: 600; }
.as-app .tw-btn-start { background: var(--ap-green); border-color: var(--ap-green); }
.as-app .tw-btn-done-outline { border: 2px solid var(--ap-primary); color: var(--ap-primary); }
.as-app .tw-card-foot { border-top: .5px solid var(--ap-sep); padding: 4px 8px; display: flex; flex-wrap: wrap; }
.as-app .tw-quick { color: var(--ap-primary); font-size: 15px; font-weight: 600; border: 0; background: none; padding: 10px 8px; min-height: 44px; }
.as-app .tw-row, .as-app .tw-muted-box { border: 0; border-radius: 12px; box-shadow: var(--ap-shadow); }
.as-app .tw-section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ap-text2); margin: 20px 4px 7px; }

/* ---------------------------------------------------------------- inspections / check-in: clean grouped cards, big targets */
.as-app .insp-wrap, .as-app .ci-wrap { padding-bottom: 12px; }
.as-app .insp-item, .as-app .ci-card, .as-app .insp-section, .as-app .ci-section { border-radius: 16px; border: 0; box-shadow: var(--ap-shadow); }
.as-app .insp-actions .btn, .as-app .ci-actions .btn { min-height: 46px; font-weight: 600; }

/* ---------------------------------------------------------------- sign-in (auth layout) */
.as-app body.auth-body { background: var(--ap-bg); font-family: var(--ap-font); }
.as-app .ax { display: block; min-height: 100dvh; }
.as-app .ax-stage, .as-app .ax-panel-top, .as-app .ax-sep, .as-app .ax-sep + .btn, .as-app .ax-panel-foot, .as-app .ax-secure { display: none !important; }
.as-app .ax-panel { min-height: 100dvh; padding: calc(40px + var(--ap-safe-t)) 20px calc(24px + var(--ap-safe-b)); background: var(--ap-bg); justify-content: flex-start; }
.as-app .ax-card { max-width: 440px; margin: 0 auto; width: 100%; padding: 0; background: none; box-shadow: none; border: 0; }
.as-app .ax-card > a:first-of-type { pointer-events: none; display: block; text-align: center; }
.as-app .ax-mobile-logo { display: block; margin: 8px auto 26px; height: 40px; }
.as-app .ax-card h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; color: var(--ap-text); text-align: center; margin-bottom: 4px; }
.as-app .ax-card h1 + p { text-align: center; font-size: 15px; color: var(--ap-text2) !important; margin-bottom: 22px !important; }
.as-app .ax-card form { background: var(--ap-card); border-radius: 16px; box-shadow: var(--ap-shadow); padding: 16px; }
.as-app .ax-card .form-label { font-size: 13px; font-weight: 600; color: var(--ap-text2); }
.as-app .ax-card .form-control-lg { font-size: 17px; border-radius: 12px; background: #F3F5F8; border: 1px solid transparent; min-height: 50px; }
.as-app .ax-card .form-control-lg:focus { background: #fff; border-color: var(--ap-primary); box-shadow: 0 0 0 3px rgba(21, 101, 192, .15); }
.as-app .ax-card .btn-primary.btn-lg { height: 54px; border-radius: 12px; background: var(--ap-primary); border: 0; font-size: 17px; font-weight: 600; }
.as-app .ax-card .form-check-label { font-size: 14px; }
.as-app .ax-card a { color: var(--ap-primary); }
.as-app .ax-card .alert { border-radius: 12px; }

/* RO job lines (estimate builder table) → stacked native-style rows: description on top, qty · retail · total below */
.as-app .ro-lines-wrap { overflow: visible; }
.as-app .ro-lines { display: block; min-width: 0; width: 100%; }
.as-app .ro-lines thead { display: none; }
.as-app .ro-lines tbody { display: block; }
.as-app .ro-lines tr { display: block; }
.as-app .ro-lines tr > td { display: block; border: 0; padding: 2px 4px; width: auto !important; }
.as-app .ro-lines tr.ro-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "d d d x" "q p tot tx"; gap: 2px 8px; padding: 10px 8px; border-bottom: .5px solid var(--ap-sep); }
.as-app .ro-lines tr.ro-line > td { grid-column: 1 / -1; }
.as-app .ro-lines tr.ro-line > td.d { grid-area: d; }
.as-app .ro-lines tr.ro-line > td.q { grid-area: q; }
.as-app .ro-lines tr.ro-line > td.p { grid-area: p; }
.as-app .ro-lines tr.ro-line > td.tot { grid-area: tot; text-align: right; font-weight: 600; font-size: 15px; }
.as-app .ro-lines tr.ro-line > td.tx { grid-area: tx; align-self: center; padding-top: 2px; }
.as-app .ro-lines tr.ro-line > td.x { grid-area: x; }
.as-app .ro-lines tr.ro-line > td.cv, .as-app .ro-lines tr.ro-line > td.m, .as-app .ro-lines tr.ro-line > td.t { display: none; }
.as-app .ro-lines tr.ro-line > td.q::before { content: "Qty / hrs"; }
.as-app .ro-lines tr.ro-line > td.p::before { content: "Retail"; }
.as-app .ro-lines tr.ro-line > td.tot::before { content: "Total"; }
.as-app .ro-lines tr.ro-line > td.q::before, .as-app .ro-lines tr.ro-line > td.p::before, .as-app .ro-lines tr.ro-line > td.tot::before { display: block; font-size: 11px; font-weight: 600; color: var(--ap-text3); text-transform: uppercase; letter-spacing: .04em; }
.as-app .ro-lines .ro-in { font-size: 16px; }
.as-app .ro-job { border: 0; border-radius: 16px; box-shadow: var(--ap-shadow); overflow: hidden; }
.as-app .rl-jobadd, .as-app [data-lines-tools] { overflow-x: auto; flex-wrap: nowrap !important; scrollbar-width: none; }
.as-app .rl-jobadd .btn, .as-app [data-lines-tools] .btn { flex-shrink: 0; white-space: nowrap; border-radius: 999px; }

/* inspections (DVI): keep inside the phone width, grouped cards */
.as-app .dvi-layout { grid-template-columns: minmax(0, 1fr); }
.as-app .dvi-main, .as-app .dvi-side { min-width: 0; }
.as-app .dvi-cat { border: 0; border-radius: 16px; box-shadow: var(--ap-shadow); overflow: hidden; }
.as-app .dvi-seg-btn { min-height: 48px; }

/* sub-pages: the centered bar title replaces the big page heading (as in the native app's pushed screens) */
.as-app .ap-bar:not(.ap-bar-root) ~ .as-shell .as-page-head h1 { font-size: 22px; }
.as-app .ap-await { font-style: normal; font-size: .55rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #B45309; background: #FEF3C7; border-radius: 999px; padding: .05rem .35rem; margin-left: .2rem; vertical-align: 1px; }
