/* Araib portal: shared look. Loaded after MudBlazor.min.css. */
:root {
    --ab-accent: #0F8A6C;
    --ab-navy: #0F2A44;
    --ab-border: #E5E9EF;
}

html, body { height: 100%; }
body { background: #F3F6F9; -webkit-font-smoothing: antialiased; }
.ab-ltr { direction: ltr; }
.ab-rtl { direction: rtl; }
/* On a MudBlazor field only the typed value turns LTR (phone, user name, plate...):
   the label, its notch in the outline and the adornment keep the page direction. */
.mud-input-control.ab-ltr, .mud-input-control.ab-rtl { direction: inherit; text-align: inherit; }
.mud-input-control.ab-ltr input, .mud-input-control.ab-ltr textarea { direction: ltr; }
.mud-input-control.ab-rtl input, .mud-input-control.ab-rtl textarea { direction: rtl; text-align: right; }
.ab-mono { font-family: Consolas, "Segoe UI Mono", monospace; letter-spacing: .02em; }
.ab-muted { color: #6B7280; }
.ab-page-title { line-height: 1.2; }
.ab-nowrap { white-space: nowrap; }
.ab-link { cursor: pointer; color: var(--ab-navy); text-decoration: none; font-weight: 600; }
.ab-link:hover { text-decoration: underline; }
.ab-chip { margin: 0 2px; }
.ab-stat { cursor: default; transition: box-shadow .15s; }
.ab-stat:hover { box-shadow: 0 6px 18px rgba(15, 42, 68, .08); }
.ab-clickable { cursor: pointer; }
.ab-clickable:hover { background: #F1F5F9; }

/* Navigation rail */
.ab-brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.ab-brand img { width: 36px; height: 36px; }
.ab-brand strong { display: block; color: #fff; font-size: .95rem; line-height: 1.15; }
.ab-brand small { display: block; color: #8FA3B8; font-size: .72rem; }
.ab-nav-label { padding: 12px 18px 4px; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: #6E8299; font-weight: 700; }
.mud-drawer .mud-nav-link { border-radius: 8px; margin: 1px 10px; }
.mud-drawer .mud-nav-link.active { background: rgba(15,138,108, .22) !important; }
.mud-drawer .mud-nav-link.active .mud-nav-link-text, .mud-drawer .mud-nav-link.active .mud-icon-root { color: #fff !important; }
.ab-appbar { border-bottom: 1px solid var(--ab-border); }
.ab-clock { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ab-navy); }
.ab-badge-dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--ab-accent); }

/* Login */
.ab-login-bg { position: fixed; inset: 0; background: radial-gradient(1200px 600px at 20% 10%, #1E3A5F 0%, #0F2A44 45%, #0A1A2B 100%); display: flex; align-items: center; justify-content: center; }
.ab-login-bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; }
.ab-login-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,138,108,.18), transparent 40%); }
.ab-login-wrap { min-height: 100vh; position: relative; }
.ab-login-card { backdrop-filter: blur(4px); }
.ab-login-logo img { width: 72px; height: 72px; filter: drop-shadow(0 6px 14px rgba(15,138,108,.35)); }
.ab-login-btn { height: 46px; font-size: 1rem; }

/* Loader */

/* Map */
.ab-map { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--ab-border); background: #E8EEF3; z-index: 0; }
.ab-map .leaflet-popup-content { margin: 10px 12px; font-size: .82rem; line-height: 1.45; direction: ltr; }
.ab-map .leaflet-popup-content b { font-size: .9rem; }
.ab-pop-pr { color: #fff; padding: 1px 7px; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.ab-pop-link { margin-top: 6px; color: var(--ab-navy); font-weight: 700; cursor: pointer; }
.ab-pop-link:hover { text-decoration: underline; }
.ab-inc { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-size: 16px; position: relative; }
.ab-inc-pulse::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid #D92D20; animation: abPulse 1.4s ease-out infinite; }
@keyframes abPulse { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.ab-veh { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 2px solid #12A150; border-radius: 999px; padding: 1px 7px 1px 4px; font-size: 11px; font-weight: 700; color: #111827; box-shadow: 0 2px 6px rgba(0,0,0,.25); white-space: nowrap; direction: ltr; position: relative; }
.ab-veh-g { font-size: 14px; }
.ab-veh-cs { font-family: Consolas, monospace; letter-spacing: 0; }
.ab-veh-dir { position: absolute; left: 50%; top: -14px; margin-left: -5px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid #3B6FE0; transform-origin: 50% 20px; }
.ab-v-avail { border-color: #12A150; }
.ab-v-busy { border-color: #3B6FE0; background: #EAF1FF; }
.ab-v-out { border-color: #D92D20; opacity: .7; }
.ab-v-maint { border-color: #E08A0B; opacity: .8; }
.ab-st { width: 22px; height: 22px; border-radius: 5px; background: #0F2A44; color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.3); }
.ab-s-partial { background: #E08A0B; }
.ab-s-limited { background: #D92D20; }
.ab-s-off { background: #4B5563; }
.ab-h { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #0E7490; border: 2px solid #0E7490; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,.25); }
.ab-h-trauma { background: #0E7490; color: #fff; }
.ab-map-legend { background: rgba(255,255,255,.92); padding: 6px 10px; border-radius: 8px; font-size: .72rem; line-height: 1.7; box-shadow: 0 1px 4px rgba(0,0,0,.2); direction: ltr; }
.ab-lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.ab-lg-inc { background: #D92D20; } .ab-lg-veh { background: #12A150; } .ab-lg-st { background: #0F2A44; border-radius: 2px; } .ab-lg-h { background: #0E7490; }

/* Timeline */
.ab-timeline { position: relative; padding-inline-start: 26px; }
.ab-timeline::before { content: ""; position: absolute; inset-inline-start: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--ab-border); }
.ab-tl-item { position: relative; padding: 4px 0 12px; }
.ab-tl-dot { position: absolute; inset-inline-start: -26px; top: 4px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--ab-border); }
.ab-tl-dot .mud-icon-root { font-size: 14px; }
.ab-tl-time { font-size: .72rem; color: #6B7280; font-variant-numeric: tabular-nums; }

/* Tables */
.mud-table.ab-table .mud-table-cell { padding: 8px 10px; }
.ab-kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .84rem; }
.ab-kv > span:nth-child(odd) { color: #6B7280; }

/* Alerts strip */
.ab-alert-strip { background: #FFF1F0; border: 1px solid #FFD2CE; border-radius: 10px; padding: 8px 12px; }

@media print {
    .mud-drawer, .mud-appbar, .ab-no-print { display: none !important; }
    .mud-main-content { padding: 0 !important; }
}

/* Governorate / wilayat picker dialog */
.ab-geo-dialog .mud-dialog-content { padding: 14px 16px 18px; }
.ab-geo-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ab-geo-search { position: relative; flex: 1; display: flex; align-items: center; background: #F3F6F9; border: 1.5px solid transparent; border-radius: 14px; padding: 0 12px; height: 48px; transition: border-color .15s, background .15s, box-shadow .15s; }
.ab-geo-search:focus-within { background: #fff; border-color: var(--ab-accent); box-shadow: 0 0 0 4px rgba(15,138,108,.10); }
.ab-geo-search-ic { color: #7B8494; flex: none; }
.ab-geo-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; padding: 0 10px; color: #111827; }
.ab-geo-x { border: 0; background: #E5E9EF; color: #4B5563; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ab-geo-current { display: flex; align-items: center; gap: 8px; background: #FFF1F0; border: 1px solid #FFD2CE; border-radius: 12px; padding: 6px 10px; margin-bottom: 12px; font-weight: 600; }
.ab-geo-govs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 58vh; overflow: auto; padding: 2px; }
.ab-geo-gov { border: 1px solid var(--ab-border); border-radius: 14px; background: #fff; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.ab-geo-gov:hover { box-shadow: 0 6px 18px rgba(15,42,68,.08); }
.ab-geo-gov.sel { border-color: var(--ab-accent); }
.ab-geo-gov.open { grid-column: 1 / -1; border-color: var(--ab-navy); }
.ab-geo-gov-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: transparent; cursor: pointer; font: inherit; text-align: start; }
.ab-geo-gov-badge { font-family: Consolas, monospace; font-size: .68rem; font-weight: 700; color: #fff; background: var(--ab-navy); border-radius: 6px; padding: 2px 6px; flex: none; }
.ab-geo-gov-name { flex: 1; font-weight: 700; color: #111827; }
.ab-geo-gov-count { font-size: .72rem; color: #6B7280; background: #F3F6F9; border-radius: 999px; padding: 1px 8px; }
.ab-geo-wils { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 12px; animation: abFade .15s ease-out; }
@keyframes abFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ab-geo-wil { border: 1px solid var(--ab-border); background: #F8FAFC; color: #111827; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; transition: all .12s; display: inline-flex; align-items: center; gap: 4px; }
.ab-geo-wil:hover { background: var(--ab-navy); color: #fff; border-color: var(--ab-navy); }
.ab-geo-wil.sel { background: var(--ab-accent); color: #fff; border-color: var(--ab-accent); }
.ab-geo-wil.ghost { background: transparent; border-style: dashed; color: #6B7280; }
.ab-geo-results { display: flex; flex-direction: column; gap: 4px; max-height: 58vh; overflow: auto; }
.ab-geo-result { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid transparent; background: #fff; border-radius: 12px; padding: 8px 10px; cursor: pointer; font: inherit; text-align: start; transition: background .12s; }
.ab-geo-result:hover, .ab-geo-result.on { background: #F1F5F9; border-color: var(--ab-border); }
.ab-geo-result.sel { border-color: var(--ab-accent); }
.ab-geo-result-ic { width: 34px; height: 34px; border-radius: 10px; background: #F3F6F9; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex: none; }
.ab-geo-result-text { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.ab-geo-result-text small { color: #6B7280; font-size: .74rem; }
.ab-geo-empty { display: flex; align-items: center; gap: 8px; color: #6B7280; padding: 24px; justify-content: center; }
@media (max-width: 600px) { .ab-geo-govs { grid-template-columns: 1fr; } }

/* Alert bell: badge hugs the glyph, not the button box */
.ab-bell .mud-badge-root { display: inline-flex; }
.ab-bell .mud-badge { font-size: .62rem; min-width: 18px; height: 18px; padding: 0 4px; }

/* Governorate / wilayat tree */
.ab-tree { max-height: 60vh; overflow: auto; padding: 2px; }
.ab-tree-node { margin-bottom: 2px; }
.ab-tree-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; text-align: start; color: #111827; transition: background .12s; }
.ab-tree-row:hover { background: #F1F5F9; }
.ab-tree-row.gov { font-weight: 700; }
.ab-tree-row.gov.sel .ab-tree-name { color: var(--ab-accent); }
.ab-tree-row.wil { padding-inline-start: 34px; font-weight: 500; }
.ab-tree-row.wil.sel { background: #FFF1F0; color: var(--ab-accent); font-weight: 700; }
.ab-tree-chev { color: #6B7280; transition: transform .15s; }
.ab-tree-chev.open { transform: rotate(90deg); }
[dir="rtl"] .ab-tree-chev.open { transform: rotate(-90deg); }
.ab-tree-ic { color: #7B8494; }
.ab-tree-row.gov .ab-tree-ic { color: var(--ab-navy); }
.ab-tree-row.wil .ab-tree-ic { color: var(--ab-accent); }
.ab-tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-tree-name mark { background: #FDE68A; color: inherit; border-radius: 3px; padding: 0 1px; }
.ab-tree-count { font-size: .72rem; color: #6B7280; background: #F3F6F9; border-radius: 999px; padding: 1px 8px; }
.ab-tree-children { position: relative; animation: abFade .15s ease-out; }
.ab-tree-children::before { content: ""; position: absolute; top: 4px; bottom: 8px; inset-inline-start: 19px; width: 2px; background: var(--ab-border); border-radius: 2px; }

/* The one loader: sonar rings around the emblem, a sweeping arc, and a shimmering track */
.ab-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 56px 16px; min-height: 240px; animation: abFade .25s ease-out; }
.ab-loader.full { position: fixed; inset: 0; z-index: 2000; min-height: 100vh; overflow: hidden; background: #F6F8FB; }
.ab-loader.full::before, .ab-loader.full::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.ab-loader.full::before { width: 60vmax; height: 60vmax; left: -15vmax; top: -20vmax; background: radial-gradient(circle, rgba(15,138,108,.55), rgba(15,138,108,0) 65%); animation: abBlobA 14s ease-in-out infinite alternate; }
.ab-loader.full::after { width: 65vmax; height: 65vmax; right: -20vmax; bottom: -25vmax; background: radial-gradient(circle, rgba(15,42,68,.55), rgba(15,42,68,0) 65%); animation: abBlobB 18s ease-in-out infinite alternate; }
.ab-loader.full > * { position: relative; z-index: 1; }
.ab-loader-grid { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(rgba(15,42,68,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(15,42,68,.06) 1px, transparent 1px); background-size: 36px 36px; -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 75%); animation: abGridDrift 20s linear infinite; }
@keyframes abBlobA { from { transform: translate(0, 0) scale(1); } to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes abBlobB { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-12vmax, -10vmax) scale(.95); } }
@keyframes abGridDrift { from { background-position: 0 0, 0 0; } to { background-position: 36px 36px, 36px 36px; } }
.ab-loader-ring { position: relative; width: 112px; height: 112px; display: flex; align-items: center; justify-content: center; }
.ab-loader-ring img { width: 46px; height: 46px; position: relative; z-index: 2; filter: drop-shadow(0 6px 14px rgba(15,138,108,.25)); animation: abLoaderBreathe 1.8s ease-in-out infinite; }
.ab-loader-ring::before, .ab-loader-ring::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; border: 2px solid var(--ab-accent); opacity: 0; animation: abLoaderSonar 2.4s ease-out infinite; }
.ab-loader-ring::after { animation-delay: 1.2s; border-color: var(--ab-navy); }
.ab-loader-arc { position: absolute; inset: 12px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(15,138,108,.15) 85%, var(--ab-accent) 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: abLoaderSpin 1.3s linear infinite; }
.ab-loader-arc.two { inset: 2px; background: conic-gradient(from 180deg, transparent 0 80%, rgba(15,42,68,.12) 92%, var(--ab-navy) 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); animation: abLoaderSpin 2.2s linear infinite reverse; }
.ab-loader-arc::after { content: ""; position: absolute; top: -3px; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--ab-accent); box-shadow: 0 0 12px 3px rgba(15,138,108,.45); }
.ab-loader-arc.two::after { width: 6px; height: 6px; top: -2px; left: calc(50% - 3px); background: var(--ab-navy); box-shadow: 0 0 8px 2px rgba(15,42,68,.35); }
.ab-loader-label { font-weight: 700; color: var(--ab-navy); letter-spacing: .02em; font-size: .95rem; }
.ab-loader-dots { position: relative; width: 160px; height: 4px; border-radius: 999px; background: #E5E9EF; overflow: hidden; }
.ab-loader-dots span { display: none; }
.ab-loader-dots::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--ab-accent), transparent); animation: abLoaderTrack 1.4s ease-in-out infinite; }
@keyframes abLoaderSpin { to { transform: rotate(360deg); } }
@keyframes abLoaderBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes abLoaderSonar { 0% { transform: scale(.8); opacity: .7; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes abLoaderTrack { 0% { inset-inline-start: -40%; } 100% { inset-inline-start: 100%; } }

/* Role picker and permission matrix (user dialog) */
.ab-section-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ab-navy); margin: 6px 0 10px; font-size: .95rem; }
.ab-section-title::after { content: ""; flex: 1; height: 1px; background: var(--ab-border); }
.ab-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ab-role { position: relative; display: flex; align-items: center; gap: 10px; text-align: start; padding: 10px 12px; border: 1.5px solid var(--ab-border); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .12s; }
.ab-role:hover { border-color: #B9C3D0; box-shadow: 0 6px 18px rgba(15,42,68,.08); transform: translateY(-1px); }
.ab-role.sel { border-color: var(--ab-accent); background: linear-gradient(135deg, #FFF5F4, #fff 60%); box-shadow: 0 0 0 3px rgba(15,138,108,.10); }
.ab-role-ic { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #F3F6F9; color: var(--ab-navy); flex: none; }
.ab-role.sel .ab-role-ic { background: var(--ab-accent); color: #fff; }
.ab-role-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ab-role-name { font-weight: 700; color: #111827; line-height: 1.2; }
.ab-role-desc { font-size: .74rem; color: #6B7280; line-height: 1.3; margin-top: 2px; }
.ab-role-n { font-size: .7rem; font-weight: 700; color: #4B5563; background: #F3F6F9; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ab-role.sel .ab-role-n { background: #FFE1DD; color: var(--ab-accent); }
.ab-role-check { position: absolute; top: -8px; inset-inline-end: -8px; color: var(--ab-accent); background: #fff; border-radius: 50%; }
.ab-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ab-perm-group { border: 1px solid var(--ab-border); border-radius: 14px; padding: 10px 12px; background: #FAFBFC; }
.ab-perm-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: var(--ab-navy); font-size: .85rem; margin-bottom: 8px; }
.ab-perm-head span { font-size: .72rem; color: #6B7280; background: #fff; border: 1px solid var(--ab-border); border-radius: 999px; padding: 1px 8px; }
.ab-perm-list { display: flex; flex-direction: column; gap: 5px; }
.ab-perm { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: #9CA3AF; transition: color .15s; }
.ab-perm.on { color: #111827; }
.ab-perm.on .mud-icon-root { color: #16A34A; }

/* Period filter: range picker in a dialog with presets */
.ab-daterange .mud-input-adornment { color: var(--ab-accent); }
.mud-dialog.mud-picker-paper .mud-dialog { border-radius: 18px; overflow: hidden; }
.mud-dialog.mud-picker-paper .mud-picker-container { border-radius: 0; }
.mud-dialog.mud-picker-paper .mud-picker-toolbar { background: linear-gradient(135deg, var(--ab-accent), #8E0A20); padding: 16px 20px; }
.mud-dialog.mud-picker-paper .mud-picker-calendar-header-day, .mud-dialog.mud-picker-paper .mud-picker-calendar-day { font-weight: 600; }
.mud-dialog.mud-picker-paper .mud-picker-calendar-day.mud-range-between { background: #FFF1F0; }
.mud-dialog.mud-picker-paper .mud-picker-calendar-day.mud-range-start-selected .mud-button-root, .mud-dialog.mud-picker-paper .mud-picker-calendar-day.mud-range-end-selected .mud-button-root { background: var(--ab-accent) !important; color: #fff; }
.mud-dialog.mud-picker-paper .mud-picker-actions { padding: 10px 14px 14px; border-top: 1px solid var(--ab-border); background: #FAFBFC; }
.ab-daterange-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; width: 100%; }
.ab-daterange-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-daterange-presets button { border: 1px solid var(--ab-border); background: #fff; color: var(--ab-navy); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; transition: all .12s; }
.ab-daterange-presets button:hover { background: var(--ab-navy); color: #fff; border-color: var(--ab-navy); }
@media (max-width: 700px) { .mud-dialog.mud-picker-paper .mud-picker-calendar-container { flex-direction: column; } }
.mud-picker.ab-daterange { width: 320px; max-width: 100%; flex: 0 0 auto; }
.mud-dialog.mud-picker-paper .mud-picker-toolbar .mud-typography-h4 { font-size: 1.3rem; line-height: 1.3; }
.mud-dialog.mud-picker-paper .mud-picker-toolbar .mud-typography-subtitle1 { opacity: .85; }
.ab-row-actions { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ab-row-actions .mud-button-root { border-radius: 999px; }

/* Modal select: the field, and the searchable dialog it opens */
.ab-mselect { cursor: pointer; display: block; flex: 1 1 180px; min-width: 160px; max-width: 100%; }
.mud-grid-item > .ab-mselect, .mud-dialog-content > .ab-mselect { flex: none; width: 100%; }
.ab-mselect .mud-input-slot, .ab-mselect input { cursor: pointer !important; }
.ab-mselect .mud-input-adornment-end .mud-icon-root { color: #6B7280; }
.ab-pick-dialog .mud-dialog-content { padding: 12px 12px 14px; }
.ab-pick-dialog .mud-dialog { border-radius: 18px; }
.ab-pick-head { display: flex; align-items: center; gap: 8px; }
.ab-pick-head .ab-geo-search { height: 46px; }
.ab-pick-close { width: 34px; height: 34px; flex: none; }
.ab-pick-meta { display: flex; align-items: center; justify-content: space-between; margin: 10px 4px 6px; font-size: .74rem; color: #6B7280; }
.ab-pick-clear { border: 0; background: #FFF1F0; color: var(--ab-accent); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.ab-pick-list { max-height: 56vh; overflow: auto; display: flex; flex-direction: column; gap: 3px; padding: 2px; }
.ab-pick-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: #111827; transition: background .12s, border-color .12s; }
.ab-pick-item:hover { background: #F3F6F9; }
.ab-pick-item.sel { background: #FFF5F4; border-color: #FFD2CE; font-weight: 700; }
.ab-pick-item mark { background: #FDE68A; border-radius: 3px; padding: 0 1px; }
.ab-pick-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-pick-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-pick-sub { font-size: .74rem; color: #6B7280; font-weight: 400; }
.ab-pick-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.ab-pick-ic { color: var(--ab-navy); }
.ab-pick-check { color: var(--ab-accent); flex: none; }
.ab-mselect { position: relative; }
.ab-mselect.has-x .mud-input-adornment-end { visibility: hidden; }
.ab-mselect-x { position: absolute; top: 50%; inset-inline-end: 10px; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: 0; background: #E5E9EF; color: #4B5563; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1; }
.ab-mselect-x:hover { background: var(--ab-accent); color: #fff; }
.ab-mselect .mud-input-helper-text ~ .ab-mselect-x { top: 20px; transform: none; }
/* An LTR input inside the RTL layout: MudBlazor zeroes the padding on the adornment side assuming LTR, so restore equal padding. */
.mud-input-control.ab-ltr .mud-input-outlined input { padding-left: 14px; padding-right: 14px; }

/* Location pin: drops in, breathes a pulse ring, hops when moved */
.ab-pin-wrap { background: transparent; border: 0; }
.ab-pin { position: relative; width: 36px; height: 48px; transform-origin: 50% 100%; animation: abPinDrop .6s cubic-bezier(.2,.9,.3,1.25); filter: drop-shadow(0 10px 10px rgba(15,42,68,.28)); }
.ab-pin.bump { animation: abPinBump .5s cubic-bezier(.2,.9,.3,1.2); }
.ab-pin-head { position: absolute; left: 4px; top: 2px; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: linear-gradient(145deg, #F0506A, #0F8A6C 60%, #0B6B54); border: 2.5px solid #fff; box-sizing: border-box; }
.ab-pin-head i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #fff; box-shadow: inset 0 1px 2px rgba(0,0,0,.2); }
.ab-pin-ring { position: absolute; left: 50%; bottom: 0; width: 26px; height: 9px; margin-left: -13px; border-radius: 50%; border: 2px solid rgba(15,138,108,.55); background: rgba(15,138,108,.12); animation: abPinPulse 1.8s ease-out infinite; }
.ab-pin-ring.two { animation-delay: .9s; }
@keyframes abPinDrop { 0% { transform: translateY(-70px) scale(.5); opacity: 0; } 55% { transform: translateY(5px) scale(1.06); opacity: 1; } 75% { transform: translateY(-4px) scale(.98); } 100% { transform: none; } }
@keyframes abPinBump { 0% { transform: none; } 35% { transform: translateY(-16px) scale(1.06); } 70% { transform: translateY(2px) scale(.98); } 100% { transform: none; } }
@keyframes abPinPulse { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
/* Picker dialog (period filter): compact one-line header, everything fits without scrolling */
.mud-dialog.mud-picker-paper { border-radius: 18px; overflow: hidden; max-height: none; }
.mud-dialog.mud-picker-paper .mud-dialog-content { overflow: visible; max-height: none; padding: 0; }
.mud-dialog.mud-picker-paper .mud-picker-toolbar { padding: 8px 16px; min-height: 0; height: auto; display: flex; align-items: center; gap: 10px; }
.mud-dialog.mud-picker-paper .mud-picker-toolbar .mud-button-year { padding: 0 6px; min-width: 0; opacity: .85; }
.mud-dialog.mud-picker-paper .mud-picker-toolbar .mud-button-year .mud-button-label { font-size: .85rem; }
.mud-dialog.mud-picker-paper .mud-picker-toolbar .mud-button-date { padding: 0 6px; min-width: 0; }
.mud-dialog.mud-picker-paper .mud-picker-toolbar .mud-typography-h4, .mud-dialog.mud-picker-paper .mud-picker-toolbar .mud-button-date .mud-button-label { font-size: 1.05rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.mud-dialog.mud-picker-paper .mud-picker-datepicker-toolbar { flex-direction: row; }
.mud-dialog.mud-picker-paper .mud-picker-container { height: auto; }
.mud-dialog.mud-picker-paper .mud-picker-actions { padding: 8px 12px 12px; }
.ab-daterange-actions { gap: 6px; }
.ab-daterange-presets button { padding: 4px 9px; font-size: .74rem; }

/* One scrollbar only: the page scrolls, the side menu keeps its own scrolling invisible and stays compact */
.mud-drawer .mud-drawer-content { overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.mud-drawer .mud-drawer-content::-webkit-scrollbar { display: none; }
.mud-drawer .mud-nav-link { min-height: 36px; margin: 0 10px; }
.mud-drawer .mud-nav-link .mud-nav-link-text { font-size: .86rem; }
.mud-drawer .mud-nav-link .mud-nav-link-icon { font-size: 1.2rem; }
.ab-nav-label { padding: 8px 18px 2px; }
.mud-drawer .mud-nav-menu.pb-6 { padding-bottom: 8px !important; }

/* Top bar: frosted glass, soft buttons, status pills */
.mud-appbar.ab-appbar { background: rgba(255,255,255,.82) !important; backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid rgba(15,42,68,.08); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 24px rgba(15,42,68,.06); color: #111827; }
.ab-appbar .mud-toolbar { gap: 10px; min-height: 64px; height: 64px; padding-inline: 14px 18px; }
.ab-top-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent; background: #F3F6F9; color: var(--ab-navy); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; flex: none; }
.ab-top-btn:hover { background: #fff; border-color: var(--ab-border); box-shadow: 0 6px 16px rgba(15,42,68,.10); transform: translateY(-1px); }
.ab-top-btn.ab-bell.has { color: var(--ab-accent); background: #FFF1F0; }
.ab-top-btn.ab-bell.has .mud-icon-root { animation: abBellRing 2.4s ease-in-out infinite; transform-origin: 50% 0; }
.ab-top-badge { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ab-accent); color: #fff; font-size: .66rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(15,138,108,.35); }
@keyframes abBellRing { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 85% { transform: rotate(8deg); } 90% { transform: rotate(-4deg); } }
.ab-top-greet { flex-direction: column; line-height: 1.2; min-width: 0; }
.ab-top-hello { font-size: .9rem; color: #111827; }
.ab-top-hello b { color: var(--ab-navy); }
.ab-top-role { font-size: .72rem; color: #6B7280; }
.ab-top-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; background: #F3F6F9; border: 1px solid transparent; color: #374151; font-size: .8rem; white-space: nowrap; }
.ab-top-clock .mud-icon-root { color: var(--ab-navy); }
.ab-top-time { font-family: Consolas, 'Segoe UI', monospace; font-weight: 700; font-size: .95rem; color: var(--ab-navy); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ab-top-date { color: #6B7280; font-size: .76rem; padding-inline-start: 8px; border-inline-start: 1px solid #D9DFE7; }
.ab-api { gap: 7px; font-weight: 600; transition: background .3s, color .3s; }
.ab-api-dot { width: 9px; height: 9px; border-radius: 50%; background: #9CA3AF; flex: none; }
.ab-api.wait .ab-api-dot { animation: abDotBlink .8s steps(2) infinite; }
.ab-api.good { background: #ECFDF5; color: #065F46; border-color: #BBF7D0; }
.ab-api.good .ab-api-dot { background: #10B981; animation: abDotPulse 2s ease-out infinite; }
.ab-api.slow { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.ab-api.slow .ab-api-dot { background: #F59E0B; animation: abDotPulseAmber 1.4s ease-out infinite; }
.ab-api.down { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.ab-api.down .ab-api-dot { background: var(--ab-accent); animation: abDotBlink 1s steps(2) infinite; }
.ab-api-ms { font-family: Consolas, monospace; font-size: .74rem; opacity: .85; padding-inline-start: 7px; border-inline-start: 1px solid currentColor; font-variant-numeric: tabular-nums; }
@keyframes abDotPulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); } 100% { box-shadow: 0 0 0 9px rgba(16,185,129,0); } }
@keyframes abDotPulseAmber { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,.55); } 100% { box-shadow: 0 0 0 9px rgba(245,158,11,0); } }
@keyframes abDotBlink { to { opacity: .25; } }
.ab-top-user { display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 2px 6px 2px 2px; border-radius: 999px; border: 1px solid transparent; background: transparent; cursor: pointer; color: #6B7280; transition: all .15s; }
.ab-top-user:hover { background: #F3F6F9; border-color: var(--ab-border); }
.ab-top-avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: .95rem; background: linear-gradient(135deg, var(--ab-navy), #1E4976); background-size: cover; background-position: center; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(15,138,108,.55); }
/* the same pill on the login card */
.ab-login-api { margin: 12px auto 0; justify-content: center; height: 34px; font-size: .78rem; }

/* KPI tiles: compact, one row, slide show */
.ab-strip-wrap { position: relative; }
.ab-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 4px 2px 8px; }
.ab-strip::-webkit-scrollbar { display: none; }
.ab-strip > * { scroll-snap-align: start; flex: 0 0 auto; }
.ab-strip-arrow { position: absolute; top: 50%; transform: translateY(-55%); width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ab-border); background: rgba(255,255,255,.95); color: var(--ab-navy); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(15,42,68,.12); z-index: 2; opacity: 0; transition: opacity .15s, transform .15s; }
.ab-strip-arrow.prev { left: -6px; }
.ab-strip-arrow.next { right: -6px; }
.ab-strip-wrap:hover .ab-strip-arrow, .ab-strip-arrow.show { opacity: 1; }
.ab-strip-arrow:hover { transform: translateY(-55%) scale(1.08); }
.ab-strip-arrow[disabled] { opacity: 0 !important; pointer-events: none; }
.ab-stat { position: relative; display: flex; align-items: center; gap: 10px; width: 200px; height: 72px; padding: 0 12px; border: 1px solid var(--ab-border); border-radius: 14px; background: #fff; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; --stat: var(--ab-navy); }
.ab-stat.ab-clickable { cursor: pointer; }
.ab-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,42,68,.10); border-color: color-mix(in srgb, var(--stat) 35%, #fff); }
.ab-stat-ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--stat) 85%, #fff), var(--stat)); box-shadow: 0 6px 14px color-mix(in srgb, var(--stat) 35%, transparent); }
.ab-stat-ic .mud-icon-root { font-size: 20px; }
.ab-stat-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; z-index: 1; }
.ab-stat-label { font-size: .7rem; font-weight: 600; color: #6B7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-stat-value { font-size: 1.25rem; font-weight: 800; color: #111827; font-variant-numeric: tabular-nums; }
.ab-stat-hint { font-size: .66rem; color: #9CA3AF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.ab-stat-glow { position: absolute; inset-inline-end: -26px; top: -26px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--stat) 16%, transparent), transparent 70%); pointer-events: none; }
.ab-stat-error { --stat: #0F8A6C; } .ab-stat-info { --stat: #2563EB; } .ab-stat-success { --stat: #16A34A; } .ab-stat-tertiary { --stat: #0E7490; }
.ab-stat-warning { --stat: #D97706; } .ab-stat-secondary { --stat: #0F2A44; } .ab-stat-primary { --stat: #0F8A6C; } .ab-stat-default { --stat: #6B7280; } .ab-stat-dark { --stat: #111827; }
.mud-grid-item > .ab-stat { width: 100%; }
.ab-strip-arrow.prev { left: auto; right: auto; inset-inline-start: -6px; }
.ab-strip-arrow.next { left: auto; right: auto; inset-inline-end: -6px; }
[dir="rtl"] .ab-strip-arrow .mud-icon-root { transform: scaleX(-1); }

/* API status pill v2: glass capsule, live dot, latency bars */
.ab-api2 { --c: #9CA3AF; display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 12px 0 10px; border-radius: 999px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, #fff), #fff 70%); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); box-shadow: inset 0 1px 0 #fff, 0 2px 8px color-mix(in srgb, var(--c) 18%, transparent); color: #111827; font-size: .78rem; font-weight: 600; white-space: nowrap; transition: all .3s; }
.ab-api2.good { --c: #10B981; }
.ab-api2.slow { --c: #F59E0B; }
.ab-api2.down { --c: #0F8A6C; }
.ab-api2.wait { --c: #9CA3AF; }
.ab-api2-dot { position: relative; width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ab-api2-dot span { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 10px color-mix(in srgb, var(--c) 70%, transparent); }
.ab-api2-dot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c); opacity: 0; animation: abApiRing 2s ease-out infinite; }
.ab-api2.down .ab-api2-dot::before { animation: none; }
.ab-api2.down .ab-api2-dot span { animation: abDotBlink .9s steps(2) infinite; }
.ab-api2.wait .ab-api2-dot span { animation: abDotBlink .8s steps(2) infinite; }
@keyframes abApiRing { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.ab-api2-text { color: color-mix(in srgb, var(--c) 70%, #111827); }
.ab-api2-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; padding: 0 2px; }
.ab-api2-bars i { display: block; width: 3px; border-radius: 2px; background: color-mix(in srgb, var(--c) 45%, #fff); min-height: 2px; transition: height .4s; }
.ab-api2-bars i:last-child { background: var(--c); }
.ab-api2-ms { font-family: Consolas, 'Segoe UI', monospace; font-weight: 700; font-size: .8rem; color: #111827; background: color-mix(in srgb, var(--c) 14%, #fff); border-radius: 8px; padding: 2px 7px; font-variant-numeric: tabular-nums; display: inline-flex; align-items: baseline; gap: 2px; direction: ltr; }
.ab-api2-ms small { font-size: .62rem; font-weight: 600; opacity: .7; }
.ab-login-api { margin: 12px auto 0; height: 34px; }
/* compact status pill */
.ab-api2 { gap: 6px; height: 32px; padding: 0 8px 0 8px; font-size: .74rem; }
.ab-api2-bars { gap: 1.5px; height: 12px; padding: 0 1px; }
.ab-api2-bars i { width: 2.5px; }
.ab-api2-ms { font-size: .74rem; padding: 1px 6px; }
.ab-api2-dot { width: 12px; height: 12px; }
.ab-api2-dot span { width: 7px; height: 7px; }
.ab-stepper li.click:hover .ab-sdot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--step) 18%, transparent); }
.ab-stepper { padding: 12px 6px 4px; margin-top: 4px !important; }

/* Section dialogs: a clear toolbar with the action, and an inviting empty state */
.ab-sec-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px -4px 12px; padding: 8px 10px; border-radius: 12px; background: #F3F6F9; }
.ab-sec-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ab-navy); }
.ab-sec-bar .mud-button { border-radius: 999px; padding: 6px 16px; box-shadow: 0 6px 16px rgba(15,138,108,.25); }
.ab-sec-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 12px; border: 1.5px dashed #D5DCE5; border-radius: 14px; color: #6B7280; text-align: center; }
.ab-sec-empty .mud-icon-root { font-size: 34px; color: #B9C3D0; }
.ab-sec-empty .mud-button { border-radius: 999px; }

/* Page banner */
.ab-page-head { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; padding: 16px 20px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #0F2A44 0%, #163A5C 55%, #1E4976 100%); box-shadow: 0 12px 30px rgba(15,42,68,.22); overflow: hidden; }
.ab-page-head::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); mask-image: linear-gradient(90deg, transparent, #000 40%); pointer-events: none; }
.ab-page-head::after { content: ""; position: absolute; inset-inline-start: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(15,138,108,.45), transparent 70%); pointer-events: none; }
.ab-ph-main { position: relative; display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; }
.ab-ph-ic { width: 48px; height: 48px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); color: #fff; }
.ab-ph-ic .mud-icon-root { font-size: 26px; }
.ab-ph-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ab-ph-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ab-page-head .ab-page-title { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; color: #fff; line-height: 1.2; }
.ab-ph-badges { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ab-ph-sub { font-size: .84rem; color: rgba(255,255,255,.75); }
.ab-ph-actions { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ab-ph-actions .mud-button-outlined, .ab-ph-actions .mud-button-text { color: #fff; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.06); }
.ab-ph-actions .mud-button-outlined:hover, .ab-ph-actions .mud-button-text:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.7); }
.ab-ph-actions .mud-button-filled.mud-button-filled-primary { box-shadow: 0 8px 18px rgba(15,138,108,.35); }
.ab-ph-actions .mud-icon-button { color: #fff; }
.ab-ph-actions .mud-input-control .mud-input-outlined .mud-input-outlined-border { border-color: rgba(255,255,255,.4); }
.ab-ph-actions .mud-input-control { background: rgba(255,255,255,.95); border-radius: 10px; }
.ab-ph-actions .mud-switch .mud-typography { color: #fff; }
.ab-ph-actions .ab-mselect { min-width: 170px; }
@media (max-width: 700px) { .ab-page-head { padding: 14px; } .ab-page-head .ab-page-title { font-size: 1.2rem; } }
/* chips inside the dark page banner: solid, readable */
.ab-ph-badges .mud-chip { background: rgba(255,255,255,.92) !important; color: #111827 !important; border: 0 !important; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.ab-ph-badges .mud-chip.mud-chip-color-error, .ab-ph-badges .mud-chip.mud-chip-filled.mud-chip-color-error { background: #FFE1DD !important; color: #0B6B54 !important; }
.ab-ph-badges .mud-chip.mud-chip-color-warning { background: #FDE68A !important; color: #78350F !important; }
.ab-ph-badges .mud-chip.mud-chip-color-success { background: #BBF7D0 !important; color: #14532D !important; }
.ab-ph-badges .mud-chip.mud-chip-color-info { background: #BFDBFE !important; color: #1E3A8A !important; }
.ab-ph-badges .mud-chip.mud-chip-color-primary { background: #FFE1DD !important; color: #0B6B54 !important; }
.ab-ph-badges .mud-chip .mud-icon-root { color: inherit !important; }
.ab-live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; background: rgba(16,185,129,.18); border: 1px solid rgba(16,185,129,.5); color: #D1FAE5; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ab-live i { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: abLivePulse 1.6s ease-out infinite; }
@keyframes abLivePulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 100% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } }
/* timeline tab: tinted panel, limited height */
.ab-tl-wrap { background: linear-gradient(180deg, #F6F8FB, #FFFFFF); border: 1px solid var(--ab-border); border-radius: 14px; padding: 14px 16px 6px; max-height: 420px; overflow-y: auto; scrollbar-width: thin; }

/* Filter dialog */
.ab-filter-btn { border-radius: 999px; }
.ab-filter-count { margin-inline-start: 8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ab-accent); color: #fff; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ab-filter-dialog .mud-dialog-content { padding-top: 6px; }
.ab-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ab-filter-grid > * { min-width: 0; }
.ab-filter-grid .ab-daterange, .ab-filter-grid .mud-picker { grid-column: 1 / -1; width: 100% !important; max-width: none; }
@media (max-width: 600px) { .ab-filter-grid { grid-template-columns: 1fr; } }
.ab-flow-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: #ECFDF5; border: 1px solid #BBF7D0; color: #166534; font-weight: 600; }

/* reports filter bar */
.ab-rep-bar { position: sticky; top: 0; z-index: 3; background: #fff; }
.ab-rep-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #475569; font-size: .85rem; }
.ab-rep-shown { font-size: .8rem; color: #64748b; background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 999px; padding: 4px 12px; direction: ltr; }
.ab-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: #f1f5f9; }
.ab-seg-btn { border: 0; background: transparent; cursor: pointer; padding: 7px 14px; border-radius: 9px; font: inherit; font-size: .83rem; font-weight: 600; color: #475569; transition: all .15s; white-space: nowrap; }
.ab-seg-btn:hover { color: var(--ab-navy); }
.ab-seg-btn.on { background: #fff; color: var(--ab-navy); font-weight: 800; box-shadow: 0 1px 4px rgba(15,42,68,.14); }
@media print { .ab-rep-bar { display: none; } }

/* ── settings page: language ── */
.ab-set-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ab-set-head > div { display: flex; flex-direction: column; }
.ab-set-head b { font-size: 1rem; color: #0B1F33; }
.ab-set-head small { font-size: .78rem; color: #64748B; }
.ab-set-ic { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #E8EEF3; color: var(--ab-navy); flex: none; }
.ab-set-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ab-set-lang { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--ab-border); background: #fff; cursor: pointer; font: inherit; text-align: start; transition: all .15s; }
.ab-set-lang:hover { border-color: var(--ab-navy); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15,42,68,.08); }
.ab-set-lang.on { border-color: var(--ab-navy); background: #F1F5F9; box-shadow: 0 0 0 3px rgba(15,42,68,.08); }
.ab-set-flag { width: 44px; height: 44px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--ab-navy); color: #fff; font-weight: 800; font-size: .9rem; letter-spacing: .04em; font-family: Consolas, monospace; }
.ab-set-lang:not(.on) .ab-set-flag { background: #E8EEF3; color: var(--ab-navy); }
.ab-set-lang-t { flex: 1; display: flex; flex-direction: column; }
.ab-set-lang-t b { font-size: .95rem; color: #0B1F33; }
.ab-set-lang-t small { font-size: .72rem; color: #64748B; }
.ab-set-check { color: #CBD5E1; }
.ab-set-lang.on .ab-set-check { color: #16A34A; }

/* narrower connection pill: dot, state, round trip */
.ab-api2 { gap: 5px; height: 30px; padding: 0 9px 0 7px; font-size: .72rem; }
.ab-api2-ms { background: transparent; padding: 0; font-size: .7rem; font-weight: 600; color: #6B7280; }
.ab-api2-ms small { font-size: .6rem; }

/* banner switches: the white field background is for text inputs only, never for toggles */
.ab-ph-actions .mud-input-control.mud-input-control-boolean-input { background: transparent; border-radius: 999px; width: auto; flex: none; }
.ab-ph-actions .mud-switch { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); padding: 2px 14px 2px 6px; }
.ab-ph-actions .mud-switch:has(.mud-checked) { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); }
.ab-ph-actions .mud-switch .mud-switch-base:not(.mud-checked) + .mud-switch-track { background-color: rgba(255,255,255,.35); opacity: 1; }
.ab-ph-actions .mud-switch .mud-checked + .mud-switch-track { background-color: #FCA5A5; opacity: 1; }

/* directional icons (send arrow) point with the writing direction */
[dir="rtl"] .ab-flip-rtl { transform: scaleX(-1); }
/* on a button only the arrow turns round: mirroring the whole button would mirror its label too */
[dir="rtl"] .mud-button-root.ab-flip-rtl { transform: none; }
[dir="rtl"] .mud-button-root.ab-flip-rtl .mud-icon-root { transform: scaleX(-1); }
/* banner toggles: MudBlazor repeats the "mud-switch" class on the label text, so the pill belongs to the label element only */
.ab-ph-actions p.mud-switch, .ab-ph-actions .mud-typography.mud-switch { background: transparent !important; border: 0 !important; padding: 0 !important; margin: 0; }

/* ── reconnect card (App.razor): above everything, so its buttons are always reachable ── */
.ab-rc { display: none; position: fixed; inset: 0; z-index: 2147483000; align-items: center; justify-content: center; padding: 16px; background: rgba(11,31,51,.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); font-family: Cairo, 'Segoe UI', Tahoma, sans-serif; }
.ab-rc.components-reconnect-show, .ab-rc.components-reconnect-retrying, .ab-rc.components-reconnect-failed, .ab-rc.components-reconnect-rejected { display: flex; }
.ab-rc.components-reconnect-hide { display: none; }
.ab-rc-card { width: min(350px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 24px 18px 16px; border-radius: 22px; background: rgba(255,255,255,.98); border: 1px solid rgba(15,42,68,.10); box-shadow: 0 24px 60px rgba(11,31,51,.30), 0 2px 8px rgba(11,31,51,.10); animation: ab-rc-in .32s cubic-bezier(.22,.61,.36,1) both; }
@keyframes ab-rc-in { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }
/* language: both are in the markup, the page language picks one */
html[lang^="en"] .ab-rc .ar, html:not([lang^="en"]) .ab-rc .en { display: none; }
/* state switches: only the texts and the button of the current state show */
.ab-rc-s-show, .ab-rc-s-failed, .ab-rc-s-rejected { display: none; }
.ab-rc.components-reconnect-show .ab-rc-s-show, .ab-rc.components-reconnect-retrying .ab-rc-s-show, .ab-rc.components-reconnect-failed .ab-rc-s-failed, .ab-rc.components-reconnect-rejected .ab-rc-s-rejected { display: inline-flex; }
/* icon: a spinner while retrying, wifi-off when failed, a clock when the session ended */
.ab-rc-ic { position: relative; flex: 0 0 auto; width: 62px; height: 62px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #EEF2F7, #DCE5EE); color: #0F2A44; box-shadow: 0 8px 20px rgba(15,42,68,.14); }
.ab-rc-ic svg { width: 28px; height: 28px; display: none; }
.ab-rc-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(15,42,68,.15); border-top-color: #0F8A6C; animation: ab-rc-rot .8s linear infinite; }
@keyframes ab-rc-rot { to { transform: rotate(360deg); } }
.ab-rc.components-reconnect-failed .ab-rc-spin, .ab-rc.components-reconnect-rejected .ab-rc-spin { display: none; }
.ab-rc.components-reconnect-failed .ab-rc-ic { background: linear-gradient(135deg, #FEE2E2, #FECACA); color: #B91C1C; }
.ab-rc.components-reconnect-failed .ab-rc-ic-off, .ab-rc.components-reconnect-rejected .ab-rc-ic-exp { display: block; }
.ab-rc-body { width: 100%; line-height: 1.45; }
.ab-rc-title { font-weight: 800; font-size: 1.02rem; color: #0B1F33; }
.ab-rc-title > span, .ab-rc-sub > span { justify-content: center; align-items: center; gap: 5px; }
.ab-rc.components-reconnect-failed .ab-rc-title { color: #B91C1C; }
.ab-rc-sub { font-size: .8rem; font-weight: 600; color: #64748B; margin-top: 3px; }
.ab-rc-sub b { color: #0F2A44; font-variant-numeric: tabular-nums; }
.ab-rc-actions { width: 100%; display: flex; gap: 8px; margin-top: 6px; }
/* buttons: tall pills, the icon in a round badge, a slow shine, lift on hover, press on tap */
.ab-rc-btn { position: relative; overflow: hidden; flex: 1; min-height: 46px; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 6px 14px; font-family: inherit; font-weight: 800; font-size: .88rem; white-space: nowrap; cursor: pointer; color: #fff; background: linear-gradient(135deg, #0B1F33 0%, #0F2A44 55%, #1D4A75 100%); box-shadow: 0 10px 22px rgba(15,42,68,.30), inset 0 1px 0 rgba(255,255,255,.22); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; -webkit-tap-highlight-color: transparent; }
.ab-rc-btn i { width: 30px; height: 30px; border-radius: 50%; flex: none; background: rgba(255,255,255,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-3-6.7'/%3E%3Cpath d='M21 3v6h-6'/%3E%3C/svg%3E") center / 16px 16px no-repeat; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.ab-rc-btn::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); transform: skewX(-18deg); animation: ab-rc-shine 3.2s ease-in-out infinite; }
@keyframes ab-rc-shine { 0% { left: -60%; } 55%, 100% { left: 140%; } }
.ab-rc-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.ab-rc-btn:active { transform: translateY(1px) scale(.97); }
.ab-rc-btn:focus-visible { outline: 3px solid rgba(15,42,68,.35); outline-offset: 2px; }
.ab-rc-btn.busy i { animation: ab-rc-rot .8s linear infinite; }
.ab-rc.components-reconnect-failed .ab-rc-btn { background: linear-gradient(135deg, #8F0B21 0%, #0F8A6C 55%, #E11D48 100%); box-shadow: 0 10px 22px rgba(15,138,108,.32), inset 0 1px 0 rgba(255,255,255,.3); }
/* MudBlazor ships its own "#components-reconnect-modal" rules (its layer, an opaque page background, dark button
   text, a grey hover). Ids outrank classes, so what matters is restated here with the id. */
#components-reconnect-modal.ab-rc { z-index: 2147483000 !important; background-color: rgba(11,31,51,.28) !important; }
#components-reconnect-modal .ab-rc-btn { color: #fff; padding: 6px 14px; font-size: .88rem; min-width: 0; margin: 0 !important; font-weight: 800; line-height: 1.2; border-radius: 999px; letter-spacing: 0; text-transform: none; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
#components-reconnect-modal .ab-rc-btn:hover { background-color: transparent; }
@media (prefers-reduced-motion: reduce) { .ab-rc-btn::after { animation: none; display: none; } }


/* ---------------- Araib: the maintenance cycle ---------------- */
.ab-nav-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.ab-nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ab-accent); color: #fff; font-size: .68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ab-set-row { flex-wrap: wrap; }
.ab-set-row > div { flex: 1 1 220px; }
.ab-person-empty { padding: 22px; text-align: center; color: #6B7280; font-size: .86rem; }
.ab-card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem; color: #0B1F33; margin-bottom: 10px; }
.ab-card-title .mud-icon-root { color: var(--ab-accent); }
.ab-card-title small { font-weight: 600; color: #6B7280; font-size: .78rem; }

/* "1-2": stage one of a two-stage job */
.ab-stage { display: inline-flex; align-items: center; white-space: nowrap; height: 22px; padding: 0 9px; border-radius: 7px; background: #EEF2F7; border: 1px solid #D8E0EA; color: #0F2A44; font: 700 .74rem Consolas, "Segoe UI Mono", monospace; direction: ltr; }
.ab-ph-badges .ab-stage { background: rgba(255,255,255,.92); border: 0; }

/* thumbnails in tables and cards */
.ab-thumb { width: 54px; height: 40px; border-radius: 8px; object-fit: cover; background: #E8EEF3; border: 1px solid var(--ab-border); display: block; flex: none; }
.ab-thumb.lg { width: 84px; height: 62px; border-radius: 10px; }

/* photo galleries: the before / after / rework audit trail */
.ab-gal + .ab-gal { margin-top: 16px; }
.ab-gal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.ab-gal-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ab-gal-n { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: #EEF2F7; color: #334155; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ab-gal-head .ab-muted { font-size: .76rem; }
.ab-gal-empty { display: flex; align-items: center; gap: 6px; padding: 14px; border: 1px dashed #D3DAE3; border-radius: 12px; color: #8792A2; font-size: .82rem; }
.ab-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ab-gal-item { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--ab-border); border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #E8EEF3; transition: transform .15s, box-shadow .15s; }
.ab-gal-item:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,42,68,.16); }
.ab-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ab-gal-idx { position: absolute; top: 6px; inset-inline-start: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: rgba(11,28,46,.7); color: #fff; font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ab-gal-doc { aspect-ratio: 4 / 3; border: 1px solid #F3C7C3; border-radius: 12px; background: #FFF5F4; color: #B3261E; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; font-size: .8rem; transition: transform .15s, box-shadow .15s; }
.ab-gal-doc:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(179,38,30,.16); }
.ab-gal-doc .mud-icon-root { font-size: 30px; }
.ab-gal-doc small { font-weight: 500; color: #8A5A56; font-size: .7rem; }

/* photo viewer */
.ab-viewer-dialog .mud-dialog-content { padding: 0 !important; }
.ab-viewer { background: #0B1420; color: #E5ECF4; outline: none; border-radius: inherit; }
.ab-viewer-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.ab-viewer-kind { font-weight: 700; }
.ab-viewer-pos { font: 600 .78rem Consolas, monospace; color: #9FB0C3; direction: ltr; }
.ab-viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40vh; }
.ab-viewer-stage img { max-width: 100%; max-height: 72vh; object-fit: contain; display: block; }
.ab-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.ab-viewer-nav:hover { background: rgba(255,255,255,.28); }
.ab-viewer-nav.prev { left: 10px; }
.ab-viewer-nav.next { right: 10px; }
.ab-viewer-cap { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; font-size: .78rem; color: #B8C6D6; }
.ab-viewer-cap span { display: inline-flex; align-items: center; gap: 4px; }

/* photo picker */
.ab-photos { border: 1.5px dashed #C9D3DF; border-radius: 14px; padding: 12px; background: #FAFBFD; }
.ab-photos.need { border-color: #F0B45A; background: #FFFBF3; }
.ab-photos.ok { border-color: #8FD3B2; background: #F4FBF8; }
.ab-photos-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: .9rem; }
.ab-photos-count { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; background: #FDE9C8; color: #8A5200; }
.ab-photos.ok .ab-photos-count { background: #CFF1E0; color: #0B6B54; }
.ab-photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ab-photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #E8EEF3; border: 1px solid var(--ab-border); display: flex; align-items: center; justify-content: center; color: #8792A2; }
.ab-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ab-photo-x { position: absolute; top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(11,28,46,.72); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ab-photo-x:hover { background: #D92D20; }
.ab-photo-size { position: absolute; bottom: 0; inset-inline: 0; padding: 2px 6px; background: rgba(11,28,46,.6); color: #fff; font-size: .64rem; text-align: center; direction: ltr; }
.ab-photo.add { flex-direction: column; gap: 4px; cursor: pointer; background: #fff; border: 1.5px dashed var(--ab-accent); color: var(--ab-accent); font-size: .74rem; font-weight: 700; text-align: center; padding: 6px; transition: background .15s; }
.ab-photo.add:hover { background: #EDF8F4; }
.ab-photo.add.busy { cursor: progress; opacity: .8; }
.ab-photos-hint { margin-top: 8px; font-size: .76rem; color: #6B7280; }
.ab-photos-err { margin-top: 8px; font-size: .78rem; color: #B3261E; font-weight: 600; }

/* completion PDF */
.ab-pdf { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1.5px dashed #C9D3DF; background: #FAFBFD; }
.ab-pdf.need { border-color: #F0B45A; background: #FFFBF3; }
.ab-pdf.ok { border-color: #8FD3B2; background: #F4FBF8; }
.ab-pdf > .mud-icon-root { font-size: 30px; color: #B3261E; }
.ab-pdf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-pdf-body small { color: #6B7280; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-pdf-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--ab-accent); color: var(--ab-accent); font-weight: 700; font-size: .8rem; cursor: pointer; background: #fff; white-space: nowrap; }
.ab-pdf-btn:hover { background: #EDF8F4; }

/* map picker and reports map */
.ab-mappick { position: relative; }
.ab-mappick-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; font-size: .8rem; }
.ab-mappick-warn { color: #B45309; font-weight: 600; }
.ab-map-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .76rem; color: #475569; }
.ab-map-key span { display: inline-flex; align-items: center; gap: 5px; }
.ab-map-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ab-dot-wrap { background: transparent; border: 0; }
.ab-dot { width: 26px; height: 26px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.ab-dot i { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.ab-pop { min-width: 170px; }

/* bill of quantities */
.ab-items-wrap { overflow-x: auto; }
.ab-items { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ab-items th { text-align: start; padding: 8px 10px; background: #F3F6F9; color: #475569; font-size: .72rem; font-weight: 700; letter-spacing: .02em; border-bottom: 1px solid var(--ab-border); white-space: nowrap; }
.ab-items td { padding: 6px 10px; border-bottom: 1px solid #EEF2F6; vertical-align: middle; }
.ab-items th.num, .ab-items td.num { text-align: end; white-space: nowrap; }
.ab-items tfoot td { border-bottom: 0; padding-top: 10px; font-weight: 600; color: #334155; }
.ab-items tfoot small { color: #6B7280; font-weight: 600; }
.ab-items tr.cut td { background: #FFF8EC; }
.ab-items .cut-q { color: #B45309; font-weight: 700; }
.ab-items-qty { width: 104px; display: inline-flex; margin: 0 !important; }
.ab-items-qty input { text-align: end; padding-top: 7px !important; padding-bottom: 7px !important; }
.ab-items-empty { text-align: center; color: #8792A2; padding: 16px !important; }
.ab-items-add { margin-top: 10px; max-width: 420px; }

/* dialogs: what the step is about, and the two-way verdict */
.ab-dlg-ref { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px; border-radius: 12px; background: #F3F8F6; border: 1px solid #D5EBE3; font-size: .9rem; }
.ab-dlg-ref small { display: block; color: #6B7280; font-size: .78rem; }
.ab-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ab-verdict-btn { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--ab-border); background: #fff; cursor: pointer; text-align: start; font: inherit; color: #334155; transition: border-color .15s, background .15s, box-shadow .15s; }
.ab-verdict-btn span { display: flex; flex-direction: column; }
.ab-verdict-btn small { color: #6B7280; font-size: .74rem; }
.ab-verdict-btn .mud-icon-root { font-size: 28px; }
.ab-verdict-btn.ok .mud-icon-root { color: #12A150; }
.ab-verdict-btn.bad .mud-icon-root { color: #D92D20; }
.ab-verdict-btn.ok.on { border-color: #12A150; background: #E3F6EB; box-shadow: 0 0 0 3px rgba(18,161,80,.22); }
.ab-verdict-btn.bad.on { border-color: #D92D20; background: #FDE8E6; box-shadow: 0 0 0 3px rgba(217,45,32,.2); }
@media (max-width: 520px) { .ab-verdict { grid-template-columns: 1fr; } }

/* the five phases of the cycle */
.ab-flow { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; padding: 6px 0 2px; }
.ab-flow-step { flex: 1 1 0; min-width: 112px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .74rem; color: #8792A2; padding: 0 6px; }
.ab-flow-step::before { content: ""; position: absolute; top: 17px; inset-inline-start: -50%; width: 100%; height: 3px; background: #E2E8F0; z-index: 0; }
.ab-flow-step:first-child::before { display: none; }
.ab-flow-ic { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2.5px solid #E2E8F0; display: flex; align-items: center; justify-content: center; color: #A3AEBD; }
.ab-flow-ic .mud-icon-root { font-size: 18px; }
.ab-flow-step b { font-size: .8rem; color: #64748B; }
.ab-flow-step.done::before, .ab-flow-step.now::before, .ab-flow-step.bad::before { background: var(--ab-accent); }
.ab-flow-step.done .ab-flow-ic { background: var(--ab-accent); border-color: var(--ab-accent); color: #fff; }
.ab-flow-step.done b { color: #0B6B54; }
.ab-flow-step.now .ab-flow-ic { border-color: var(--ab-accent); color: var(--ab-accent); box-shadow: 0 0 0 5px rgba(15,138,108,.16); }
.ab-flow-step.now b { color: #0B1F33; }
.ab-flow-step.bad .ab-flow-ic { border-color: #D92D20; color: #D92D20; box-shadow: 0 0 0 5px rgba(217,45,32,.12); }
.ab-flow-step.bad b { color: #B3261E; }

/* what the signed-in person can do right now */
.ab-actionbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: linear-gradient(90deg, #EAF7F2, #F7FBFA); border: 1px solid #CDE9DF; }
.ab-actionbar.warn { background: linear-gradient(90deg, #FFF4E0, #FFFBF3); border-color: #F6DCAE; }
.ab-actionbar.bad { background: linear-gradient(90deg, #FFECEA, #FFF7F6); border-color: #F6CFCB; }
.ab-actionbar.idle { background: #F6F8FB; border-color: var(--ab-border); }
.ab-actionbar-text { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 10px; }
.ab-actionbar-text b { display: block; color: #0B1F33; }
.ab-actionbar-text small { color: #5B6677; font-size: .8rem; }
.ab-actionbar-text > .mud-icon-root { font-size: 28px; color: var(--ab-accent); flex: none; }
.ab-actionbar.warn .ab-actionbar-text > .mud-icon-root { color: #E08A0B; }
.ab-actionbar.bad .ab-actionbar-text > .mud-icon-root { color: #D92D20; }
.ab-actionbar.idle .ab-actionbar-text > .mud-icon-root { color: #8792A2; }

/* fact tiles */
.ab-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ab-fact { padding: 9px 12px; border-radius: 12px; background: #F6F8FB; border: 1px solid #EDF1F5; min-width: 0; }
.ab-fact small { display: block; color: #6B7280; font-size: .7rem; font-weight: 600; margin-bottom: 2px; }
.ab-fact span, .ab-fact b { font-size: .88rem; color: #0B1F33; overflow-wrap: anywhere; }
.ab-fact.money { background: #EEF9F5; border-color: #CFEDE2; }
.ab-fact.money b { font: 800 1.05rem Consolas, "Segoe UI Mono", monospace; color: #0B6B54; direction: ltr; display: inline-block; }
.ab-prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.ab-note { padding: 10px 12px; border-radius: 12px; border-inline-start: 4px solid #E08A0B; background: #FFF8EC; font-size: .86rem; }
.ab-note.bad { border-color: #D92D20; background: #FFF4F3; }
.ab-note.ok { border-color: #12A150; background: #F0FAF4; }
.ab-note small { display: block; color: #6B7280; font-size: .74rem; margin-top: 2px; }
.ab-note + .ab-note { margin-top: 8px; }

/* a work order inside its report */
.ab-wo-card { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--ab-border); border-radius: 14px; background: #fff; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.ab-wo-card + .ab-wo-card { margin-top: 8px; }
.ab-wo-card:hover { border-color: #B9DCCF; box-shadow: 0 8px 20px rgba(15,42,68,.08); }
.ab-wo-main { flex: 1 1 240px; min-width: 0; }
.ab-wo-main b { display: block; }
.ab-wo-main small { color: #6B7280; font-size: .78rem; }
.ab-wo-amount { font: 700 .9rem Consolas, monospace; color: #0B6B54; direction: ltr; }

/* dashboard: my tasks, bars, months */
.ab-task { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.ab-task:hover { background: #F6F8FB; border-color: var(--ab-border); }
.ab-task-ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; background: #EEF2F7; }
.ab-task-ic.warning { background: #FDF0D9; color: #B45309; }
.ab-task-ic.error { background: #FDE5E2; color: #B3261E; }
.ab-task-ic.success { background: #DDF5E8; color: #0E8442; }
.ab-task-ic.info { background: #E3EBFC; color: #2F57B8; }
.ab-task-ic.secondary { background: #E4EAF1; color: #0F2A44; }
.ab-task-body { flex: 1; min-width: 0; }
.ab-task-body b { display: block; font-size: .86rem; }
.ab-task-body span { display: block; font-size: .8rem; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-task-meta { text-align: end; font-size: .72rem; color: #6B7280; white-space: nowrap; }
.ab-task-meta .ab-mono { display: block; color: #0F2A44; font-weight: 700; font-size: .76rem; }
.ab-bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: 10px; padding: 5px 0; font-size: .82rem; }
.ab-bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-bar-track { height: 9px; border-radius: 999px; background: #EEF2F7; overflow: hidden; }
.ab-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #19B28C, #0B6B54); }
.ab-bar-row b { font-variant-numeric: tabular-nums; min-width: 22px; text-align: end; }
.ab-months { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 6px; }
.ab-month { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.ab-month-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.ab-month-bars i { width: 38%; max-width: 22px; border-radius: 6px 6px 2px 2px; min-height: 2px; display: block; }
.ab-month-bars i.a { background: #94A9C2; }
.ab-month-bars i.b { background: var(--ab-accent); }
.ab-month small { font-size: .68rem; color: #6B7280; direction: ltr; }
.ab-legend { display: flex; gap: 14px; font-size: .74rem; color: #475569; }
.ab-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ab-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ab-pipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.ab-pipe-cell { padding: 10px 12px; border-radius: 12px; background: #F6F8FB; border: 1px solid #EDF1F5; cursor: pointer; border-top: 3px solid var(--c, #94A3B8); }
.ab-pipe-cell:hover { background: #EEF2F7; }
.ab-pipe-cell b { display: block; font-size: 1.3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ab-pipe-cell small { color: #5B6677; font-size: .74rem; }

/* status filter pills over a list */
.ab-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ab-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ab-border); background: #fff; color: #334155; font-weight: 600; font-size: .82rem; font-family: inherit; cursor: pointer; white-space: nowrap; }
.ab-pill:hover { background: #F6F8FB; }
.ab-pill.on { background: #0F2A44; border-color: #0F2A44; color: #fff; }

/* payouts */
.ab-total { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; color: #fff; background: linear-gradient(120deg, #0B6B54, #0F8A6C 60%, #19B28C); box-shadow: 0 12px 28px rgba(15,138,108,.28); }
.ab-total .mud-icon-root { font-size: 38px; opacity: .9; }
.ab-total small { display: block; opacity: .85; font-size: .8rem; }
.ab-total b { font: 800 1.7rem Consolas, "Segoe UI Mono", monospace; direction: ltr; display: inline-block; }
.ab-total span { font-size: .9rem; opacity: .9; }

/* system settings rows */
.ab-rule { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid #EEF2F6; }
.ab-rule:last-child { border-bottom: 0; }
.ab-rule-text { flex: 1 1 260px; min-width: 0; }
.ab-rule-text b { display: block; }
.ab-rule-text small { color: #6B7280; font-size: .78rem; }
.ab-rule-field { width: 130px; flex: none; }

@media print { .ab-actionbar, .ab-ph-actions { display: none !important; } }

/* the search box of a list: grows with the row, never taller than a field */
.mud-input-control.ab-search { flex: 1 1 240px; min-width: 220px; max-width: 420px; }

/* device location: asking, found, or why not (with the way to turn GPS on) */
.ab-gps { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 9px 12px; margin-bottom: 8px; border-radius: 12px; font-size: .84rem; border: 1px solid var(--ab-border); background: #F6F8FB; }
.ab-gps.wait { background: #EEF4FF; border-color: #CFDDFB; color: #1E3A8A; }
.ab-gps.ok { background: #F0FAF4; border-color: #BFE8D0; color: #0B6B54; }
.ab-gps.ok .mud-icon-root { font-size: 20px; }
.ab-gps.bad { background: #FFF8EC; border-color: #F6DCAE; }
.ab-gps.bad > .mud-icon-root { font-size: 26px; color: #C2410C; flex: none; }
.ab-gps-text { flex: 1 1 220px; min-width: 0; }
.ab-gps-text b { display: block; color: #7C2D12; }
.ab-gps-text small { color: #6B7280; font-size: .78rem; }
.ab-gps-dev { border: 1px solid var(--ab-border); border-radius: 12px; background: #fff; overflow: hidden; }
.ab-gps-dev + .ab-gps-dev { margin-top: 8px; }
.ab-gps-dev.open { border-color: #B9DCCF; box-shadow: 0 6px 16px rgba(15,42,68,.07); }
.ab-gps-dev-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 0; background: transparent; cursor: pointer; font: inherit; color: #0B1F33; text-align: start; }
.ab-gps-dev-head > .mud-icon-root:first-child { color: var(--ab-accent); }
.ab-gps-dev.open .ab-gps-dev-head { background: #F3F8F6; }
.ab-gps-mine { padding: 1px 9px; border-radius: 999px; background: #CFF1E0; color: #0B6B54; font-size: .7rem; font-weight: 800; }
.ab-gps-steps { margin: 0; padding: 10px 14px 12px; padding-inline-start: 34px; display: flex; flex-direction: column; gap: 8px; font-size: .86rem; line-height: 1.65; }
.ab-gps-steps li::marker { color: var(--ab-accent); font-weight: 800; }

/* what compression saved on the picked photos */
.ab-photos-saved { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: .76rem; font-weight: 600; color: #0B6B54; }

/* the phase that is waiting can be pressed: it performs that step */
.ab-flow-ic { transition: transform .15s, box-shadow .15s; }
.ab-flow-step.can { cursor: pointer; outline: none; }
.ab-flow-step.can:hover .ab-flow-ic, .ab-flow-step.can:focus-visible .ab-flow-ic { transform: scale(1.12); box-shadow: 0 0 0 7px rgba(15,138,108,.22); }
.ab-flow-step.can.bad:hover .ab-flow-ic, .ab-flow-step.can.bad:focus-visible .ab-flow-ic { box-shadow: 0 0 0 7px rgba(217,45,32,.18); }
.ab-flow-step.can:hover b { text-decoration: underline; }
.ab-flow-step.can:active .ab-flow-ic { transform: scale(.96); }

/* ══ internal messenger (brought over from the Civil Defence system) ══ */
.ab-chat { display: flex; height: calc(100vh - 178px); min-height: 480px; overflow: hidden; }
.ab-chat-side { width: 320px; flex: none; border-inline-end: 1px solid var(--ab-border); display: flex; flex-direction: column; background: #FAFBFC; }
.ab-chat-search { display: flex; align-items: center; gap: 8px; margin: 12px 12px 8px; background: #fff; border: 1.5px solid var(--ab-border); border-radius: 12px; padding: 0 10px; height: 40px; color: #7B8494; }
.ab-chat-search:focus-within { border-color: var(--ab-navy); }
.ab-chat-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: #111827; }
.ab-chat-channels { display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; }
.ab-chat-channels button { flex: none; border: 1px solid var(--ab-border); background: #fff; color: #4B5563; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ab-chat-channels button.on { background: var(--ab-navy); color: #fff; border-color: var(--ab-navy); }
.ab-chat-threads { flex: 1; overflow: auto; padding: 0 8px 8px; }
.ab-thread { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; font: inherit; text-align: start; transition: background .12s; }
.ab-thread:hover { background: #F0F3F7; }
.ab-thread.on { background: #fff; box-shadow: 0 4px 14px rgba(15,42,68,.08); }
.ab-thread-avatar { width: 40px; height: 40px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #E8EEF3; color: var(--ab-navy); font-family: Consolas, monospace; font-weight: 700; font-size: .85rem; }
.ab-thread-avatar.all { background: var(--ab-accent); color: #fff; }
.ab-thread-avatar.gen { background: #F3F6F9; color: #6B7280; }
.ab-thread-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ab-thread-top { display: flex; align-items: baseline; gap: 8px; }
.ab-thread-title { flex: 1; font-weight: 700; color: #111827; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-thread-time { font-size: .7rem; color: #9CA3AF; white-space: nowrap; }
.ab-thread-last { font-size: .76rem; color: #6B7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-thread-badge { flex: none; min-width: 20px; height: 20px; border-radius: 999px; background: var(--ab-accent); color: #fff; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.ab-chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.ab-chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--ab-border); }
.ab-chat-head-body { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .9rem; }
.ab-chat-head-body .ab-muted { font-size: .74rem; }
.ab-chat-stream { flex: 1; overflow: auto; padding: 14px 16px; background: #F3F6F9 radial-gradient(circle at 1px 1px, rgba(15,42,68,.06) 1px, transparent 0) 0 0 / 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.ab-chat-panel { display: flex; flex-direction: column; border: 1px solid var(--ab-border); border-radius: 14px; overflow: hidden; }
.ab-chat-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #9CA3AF; }
.ab-chat-day { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; color: #6B7280; font-size: .72rem; font-weight: 600; }
.ab-chat-day::before, .ab-chat-day::after { content: ""; flex: 1; height: 1px; background: rgba(15,42,68,.12); }
.ab-chat-day span { background: #fff; border: 1px solid var(--ab-border); border-radius: 999px; padding: 2px 10px; }
.ab-bubble-row { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; }
.ab-bubble-row.first { margin-top: 8px; }
.ab-bubble-row.them { align-self: flex-start; }
.ab-bubble-row.me { align-self: flex-end; flex-direction: row-reverse; }
.ab-bubble-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; background: var(--ab-navy); color: #fff; font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; background-size: cover; background-position: center; }
.ab-bubble { position: relative; background: #fff; border: 1px solid var(--ab-border); border-radius: 16px; padding: 8px 12px 6px; box-shadow: 0 1px 2px rgba(15,42,68,.05); min-width: 120px; }
.ab-bubble-row.them .ab-bubble { border-start-start-radius: 4px; }
.ab-bubble-row.me .ab-bubble { background: #0F2A44; color: #fff; border-color: #0F2A44; border-start-end-radius: 4px; }
.ab-bubble.high { border-inline-start: 4px solid #F59E0B; }
.ab-bubble.critical { border-inline-start: 4px solid #D92D20; }
.ab-bubble-from { font-size: .74rem; font-weight: 700; color: var(--ab-accent); margin-bottom: 2px; }
.ab-bubble-from span { font-weight: 500; color: #6B7280; margin-inline-start: 4px; }
.ab-bubble-row.me .ab-bubble-from { color: #BFE8DC; }
.ab-bubble-row.me .ab-bubble-from span { color: rgba(255,255,255,.7); }
.ab-bubble-body { white-space: pre-wrap; line-height: 1.45; font-size: .9rem; }
.ab-bubble-meta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 4px; font-size: .68rem; color: #9CA3AF; }
.ab-bubble-row.me .ab-bubble-meta { color: rgba(255,255,255,.7); }
.ab-bubble-ch, .ab-bubble-ctx { border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; opacity: .8; }
.ab-bubble-ctx { font-family: Consolas, monospace; }
.ab-ticks { color: #9CA3AF; }
.ab-bubble-row.me .ab-ticks { color: rgba(255,255,255,.75); }
.ab-bubble-row.me .ab-ticks.read { color: #4ADE80; }
.ab-chat-compose { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ab-border); background: #fff; }
.ab-compose-pill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--ab-border); background: #F8FAFC; color: var(--ab-navy); border-radius: 999px; padding: 6px 10px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ab-compose-pill:hover { background: #EEF2F6; }
.ab-prio-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-inline-end: 4px; }
.ab-compose-input { flex: 1; min-width: 0; height: 44px; border: 1.5px solid var(--ab-border); border-radius: 999px; padding: 0 16px; font: inherit; outline: 0; background: #F8FAFC; transition: border-color .15s, box-shadow .15s; }
.ab-compose-input:focus { background: #fff; border-color: var(--ab-navy); box-shadow: 0 0 0 4px rgba(15,42,68,.08); }
.ab-compose-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ab-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; box-shadow: 0 6px 16px rgba(15,138,108,.3); transition: transform .12s, opacity .12s; }
.ab-compose-send:hover { transform: translateY(-1px); }
.ab-compose-send:disabled { opacity: .4; box-shadow: none; cursor: default; transform: none; }
@media (max-width: 900px) { .ab-chat { flex-direction: column; height: auto; } .ab-chat-side { width: 100%; max-height: 260px; border-inline-end: 0; border-bottom: 1px solid var(--ab-border); } .ab-chat-stream { min-height: 360px; } }
/* ── chat (internal messenger) ── */
.ab-nav-row { display: inline-flex; align-items: center; gap: 8px; }
.ab-nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ab-accent); color: #fff; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ab-ch .ab-chat-side { width: 340px; }
.ab-ch-x { border: 0; background: transparent; color: #9CA3AF; cursor: pointer; display: inline-flex; padding: 4px; border-radius: 50%; }
.ab-ch-x:hover { background: #F0F3F7; color: var(--ab-navy); }
.ab-ch-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 10px; }
.ab-ch-tabs.wide { padding: 0 0 12px; }
.ab-ch-tabs button { flex: none; display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent; background: transparent; color: #64748B; border-radius: 999px; padding: 4px 9px; font: inherit; font-size: .76rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s; }
.ab-ch-tabs button b { background: #E2E8F0; color: #334155; border-radius: 999px; min-width: 18px; height: 18px; padding: 0 5px; font-size: .68rem; display: inline-flex; align-items: center; justify-content: center; }
.ab-ch-tabs button:hover { background: #F0F3F7; color: var(--ab-navy); }
.ab-ch-tabs button.on { background: var(--ab-navy); color: #fff; border-color: var(--ab-navy); }
.ab-ch-tabs button.on b { background: var(--ab-accent); color: #fff; }
.ab-ch-av { position: relative; width: 44px; height: 44px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--ab-navy); color: #fff; font-weight: 800; font-size: 1rem; background-size: cover; background-position: center; }
.ab-ch-av.grp { background: linear-gradient(135deg, #0F2A44, #2563EB); }
.ab-ch-av.sm { width: 36px; height: 36px; border-radius: 11px; font-size: .85rem; }
.ab-ch-av.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.6rem; }
.ab-ch-on { position: absolute; inset-inline-end: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #22C55E; border: 2px solid #fff; }
.ab-ch-item { position: relative; align-items: center; }
.ab-ch-item.unread .ab-thread-title { color: #0B1F33; }
.ab-ch-item.unread .ab-thread-last { color: #1F2937; font-weight: 600; }
.ab-ch-star { font-size: 14px !important; color: #F59E0B; vertical-align: -2px; }
.ab-ch-item-menu { position: absolute; inset-inline-end: 6px; top: 6px; opacity: 0; transition: opacity .12s; }
.ab-ch-item:hover .ab-ch-item-menu, .ab-ch-item.on .ab-ch-item-menu { opacity: 1; }
.ab-ch-item:hover .ab-thread-time { visibility: hidden; }
.ab-ch-side-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; color: #9CA3AF; text-align: center; font-size: .85rem; }
.ab-ch-hero { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 40px; color: #475569; max-width: 420px; }
.ab-ch-hero-ic { width: 92px; height: 92px; border-radius: 28px; background: linear-gradient(135deg, #EEF2F7, #fff); border: 1px solid var(--ab-border); display: inline-flex; align-items: center; justify-content: center; color: var(--ab-navy); box-shadow: 0 12px 30px rgba(15,42,68,.10); margin-bottom: 6px; }
.ab-ch-hero-ic .mud-icon-root { font-size: 44px; }
.ab-ch-hero h3 { margin: 0; color: #0B1F33; font-size: 1.25rem; }
.ab-ch-hero p { margin: 0 0 8px; font-size: .9rem; }
.ab-ch-head .ab-ch-av { width: 40px; height: 40px; border-radius: 12px; font-size: .9rem; }
.ab-ch-hacts { display: flex; align-items: center; gap: 2px; }
.ab-ch-online { color: #16A34A; font-weight: 600; }
.ab-ch-sbar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--ab-border); background: #FFFBEB; color: #92400E; }
.ab-ch-sbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: #111827; }
.ab-ch-hits { display: flex; flex-direction: column; border-bottom: 1px solid var(--ab-border); max-height: 220px; overflow: auto; background: #fff; }
.ab-ch-hits button { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: start; border: 0; border-bottom: 1px solid #F1F5F9; background: transparent; padding: 8px 14px; font: inherit; font-size: .8rem; cursor: pointer; }
.ab-ch-hits button:hover { background: #F8FAFC; }
.ab-ch-hits button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #475569; }
.ab-ch-hits button small { color: #9CA3AF; }
.ab-ch-stream { scroll-behavior: smooth; overflow-x: hidden; }
.ab-ch-older { display: flex; justify-content: center; margin-bottom: 6px; }
.ab-ch-sys { display: flex; justify-content: center; margin: 8px 0; }
.ab-ch-sys span { background: rgba(15,42,68,.08); color: #475569; border-radius: 999px; padding: 3px 12px; font-size: .74rem; font-weight: 600; }
.ab-ch-bubble { max-width: 520px; }
.ab-ch-bubble.img { padding: 4px 4px 6px; }
.ab-ch-bubble.img .ab-bubble-meta { padding: 0 8px; }
.ab-ch-bubble.img .ab-bubble-body { padding: 4px 8px 0; }
.ab-ch-bubble .ab-bubble-body { white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.ab-ch-bubble .ab-bubble-body a { color: #2563EB; text-decoration: underline; }
.ab-bubble-row.me .ab-ch-bubble .ab-bubble-body a { color: #93C5FD; }
.ab-ch-bubble mark { background: #FDE68A; border-radius: 3px; padding: 0 2px; color: #111; }
.ab-ch-fwd { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-style: italic; opacity: .75; margin-bottom: 2px; }
.ab-ch-quote { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: start; border: 0; border-inline-start: 3px solid var(--ab-accent); background: rgba(15,42,68,.06); border-radius: 8px; padding: 5px 10px; margin-bottom: 6px; font: inherit; cursor: pointer; }
.ab-bubble-row.me .ab-ch-quote { background: rgba(255,255,255,.14); border-inline-start-color: #9FE3D0; color: #fff; }
.ab-ch-quote b { font-size: .72rem; color: var(--ab-accent); }
.ab-bubble-row.me .ab-ch-quote b { color: #9FE3D0; }
.ab-ch-quote span { font-size: .76rem; opacity: .8; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.ab-ch-deleted { display: inline-flex; align-items: center; gap: 6px; font-style: italic; opacity: .7; font-size: .85rem; }
.ab-ch-img { display: block; border-radius: 12px; overflow: hidden; max-width: 360px; }
.ab-ch-img img { display: block; max-width: 100%; max-height: 320px; object-fit: cover; }
.ab-ch-file, .ab-ch-loc { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; background: rgba(15,42,68,.05); border-radius: 12px; padding: 8px 10px; min-width: 220px; }
.ab-bubble-row.me .ab-ch-file, .ab-bubble-row.me .ab-ch-loc { background: rgba(255,255,255,.12); }
.ab-ch-file-ic { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--ab-navy); display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 1px 3px rgba(15,42,68,.12); }
.ab-ch-loc-map { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #DCFCE7, #BBF7D0); color: #15803D; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ab-ch-file-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ab-ch-file-t b { font-size: .84rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ab-ch-file-t small { font-size: .7rem; opacity: .75; }
.ab-ch-edited { font-style: italic; opacity: .75; }
.ab-ch-macts { position: absolute; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .12s; }
.ab-bubble-row.me .ab-ch-macts { inset-inline-end: calc(100% + 6px); }
.ab-bubble-row.them .ab-ch-macts { inset-inline-start: calc(100% + 6px); }
.ab-ch-macts .mud-icon-button { width: 28px; height: 28px; padding: 0; background: #fff; color: var(--ab-navy); box-shadow: 0 2px 6px rgba(15,42,68,.18); border: 1px solid var(--ab-border); }
.ab-bubble-row:hover .ab-ch-macts { opacity: 1; }
.ab-ch-flash .ab-bubble, .ab-ch-flash span { animation: abChFlash 1.5s ease; }
@keyframes abChFlash { 0%, 40% { box-shadow: 0 0 0 4px rgba(245,158,11,.55); } 100% { box-shadow: none; } }
.ab-ch-compose { background: #fff; border-top: 1px solid var(--ab-border); }
.ab-ch-compose .ab-chat-compose { border-top: 0; }
.ab-ch-cbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px 0; }
.ab-ch-cbar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; border-inline-start: 3px solid var(--ab-accent); padding-inline-start: 10px; }
.ab-ch-cbar b { font-size: .78rem; color: var(--ab-accent); }
.ab-ch-cbar span { font-size: .8rem; color: #475569; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ab-ch-upload .mud-input-control { margin: 0; }
.ab-ch-dialog .mud-dialog-content { padding-top: 4px; }
.ab-ch-pick-label { font-size: .72rem; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: .06em; margin: 6px 0; }
.ab-ch-pick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ab-ch-pick-chips button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--ab-border); background: #fff; color: #334155; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.ab-ch-pick-chips button.on { background: var(--ab-navy); color: #fff; border-color: var(--ab-navy); }
.ab-ch-people { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow: auto; }
.ab-ch-person { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 8px 10px; font: inherit; text-align: start; cursor: pointer; transition: background .12s; }
.ab-ch-person:hover { background: #F0F3F7; }
.ab-ch-person.on { background: #EFF6FF; border-color: #BFDBFE; }
.ab-ch-person.static { cursor: default; }
.ab-ch-person.static:hover { background: #F8FAFC; }
.ab-ch-person-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-ch-person-t b { font-size: .88rem; color: #0B1F33; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ab-ch-person-t small { font-size: .72rem; color: #64748B; }
.ab-ch-go { color: #9CA3AF; }
.ab-ch-tag { background: #FEF3C7; color: #92400E; border-radius: 999px; padding: 1px 8px; font-size: .66rem; font-weight: 700; margin-inline-start: 6px; vertical-align: 1px; }
.ab-ch-info-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ab-ch-info-head .mud-input-control { flex: 1; }
.ab-ch-readers-sum { display: flex; gap: 14px; font-size: .8rem; font-weight: 600; color: #64748B; margin-bottom: 10px; }
.ab-ch-readers-sum .ok { color: #16A34A; }
.ab-ch-readers-sum span { display: inline-flex; align-items: center; gap: 4px; }
.ab-ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.ab-ch-grid a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #F1F5F9; }
.ab-ch-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.ab-ch-grid a:hover img { transform: scale(1.04); }
@media (max-width: 900px) { .ab-ch .ab-chat-side { width: 100%; } .ab-ch.ab-chat { flex-direction: column; height: auto; } .ab-ch .ab-chat-main { min-height: 60vh; } }

/* ── chat: photos, voice notes, calls ── */
.ab-ch-me { position: relative; border: 0; background: transparent; padding: 0; cursor: pointer; display: inline-flex; }
.ab-ch-me .ab-ch-av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(255,255,255,.35); }
.ab-ch-me-ic { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--ab-accent); color: #fff; font-size: 12px !important; box-sizing: border-box; }
.ab-ch-av-btn { border: 0; cursor: pointer; font: inherit; }
.ab-ch-av-cam { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--ab-navy); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(15,42,68,.25); }
.ab-ch-photo { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0; text-align: center; }
.ab-ch-photo .ab-ch-av.lg { width: 112px; height: 112px; border-radius: 32px; font-size: 2.4rem; }
.ab-ch-callbtn { color: #16A34A !important; }
.ab-ch-voice { display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 4px 2px; cursor: pointer; user-select: none; }
.ab-vo-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--ab-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 4px 10px rgba(15,138,108,.3); }
.ab-bubble-row.me .ab-vo-btn { background: #fff; color: var(--ab-navy); box-shadow: none; }
.ab-vo-btn .pa { display: none; } .ab-ch-voice.playing .pa { display: inline-block; } .ab-ch-voice.playing .pl { display: none; }
.ab-vo-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ab-vo-bar { position: relative; height: 6px; border-radius: 999px; background: rgba(15,42,68,.15); overflow: hidden; }
.ab-bubble-row.me .ab-vo-bar { background: rgba(255,255,255,.25); }
.ab-vo-bar i { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 0; background: var(--ab-accent); border-radius: 999px; transition: width .2s linear; }
.ab-bubble-row.me .ab-vo-bar i { background: #fff; }
.ab-vo-time { font-size: .72rem; opacity: .8; font-variant-numeric: tabular-nums; }
.ab-vo-ic { opacity: .5; font-size: 18px !important; }
.ab-compose-send.mic { background: var(--ab-navy); box-shadow: 0 6px 16px rgba(15,42,68,.3); }
.ab-ch-rec { background: #FFF1F2; }
.ab-ch-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #D92D20; animation: abRecPulse 1s ease-in-out infinite; }
.ab-ch-rec-time { font-weight: 800; font-variant-numeric: tabular-nums; color: #D92D20; min-width: 44px; }
@keyframes abRecPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.ab-ch-call { display: flex; align-items: center; gap: 10px; background: rgba(15,42,68,.05); border-radius: 12px; padding: 8px 10px; min-width: 220px; }
.ab-bubble-row.me .ab-ch-call { background: rgba(255,255,255,.12); }
.ab-ch-call-ic { width: 40px; height: 40px; border-radius: 10px; background: #DCFCE7; color: #15803D; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ab-ch-call.missed .ab-ch-call-ic, .ab-ch-call.declined .ab-ch-call-ic, .ab-ch-call.failed .ab-ch-call-ic { background: #FEE2E2; color: #B91C1C; }
.ab-ch-callback { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #16A34A; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
/* call screen */
.ab-call { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 70% at 50% 0%, #1E3A5F 0%, #0F2A44 55%, #071423 100%); color: #fff; animation: abCallIn .25s ease-out; }
.ab-call.rv { background: transparent; pointer-events: none; }
.ab-call.rv .ab-call-card { pointer-events: auto; background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 65%, rgba(0,0,0,.7)); }
.ab-call-card { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; }
.ab-call-kind { position: absolute; top: 26px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: rgba(255,255,255,.75); }
.ab-call-av { position: relative; width: 128px; height: 128px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; font-weight: 800; background: linear-gradient(135deg, var(--ab-accent), #095C48); box-shadow: 0 14px 40px rgba(0,0,0,.45); background-size: cover; background-position: center; }
.ab-call-av i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); opacity: 0; }
.ab-call.outgoing .ab-call-av i, .ab-call.incoming .ab-call-av i, .ab-call.connecting .ab-call-av i { animation: abCallRing 2s ease-out infinite; }
.ab-call-av i + i { animation-delay: .7s !important; }
.ab-call.incoming .ab-call-av { animation: abCallShake 1.4s ease-in-out infinite; }
.ab-call.rv .ab-call-av { display: none; }
.ab-call-name { font-size: 1.5rem; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.ab-call-status { font-size: 1rem; color: rgba(255,255,255,.85); min-height: 1.4em; font-variant-numeric: tabular-nums; }
.ab-call.rv .ab-call-name, .ab-call.rv .ab-call-status { position: absolute; top: 56px; }
.ab-call.rv .ab-call-status { top: 90px; font-size: .85rem; }
.ab-call-bar { position: absolute; bottom: 40px; display: flex; gap: 26px; align-items: flex-start; }
.ab-call.incoming .ab-call-bar { gap: 70px; }
.ab-call-b { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: #fff; font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; padding: 0; }
.ab-call-b span { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.16); transition: transform .15s, background .2s; }
.ab-call-b span .mud-icon-root { font-size: 28px; }
.ab-call-b:active span { transform: scale(.92); }
.ab-call-b.on span { background: #fff; color: var(--ab-navy); }
.ab-call-b.red span { background: #E53935; width: 68px; height: 68px; }
.ab-call-b.green span { background: #1E9E5A; width: 68px; height: 68px; animation: abCallPulse 1.4s ease-in-out infinite; }
.ab-call.ended .ab-call-bar { visibility: hidden; }
#ab-call-media { display: none; }
#ab-call-media.on.rv-on { display: block; position: fixed; inset: 0; z-index: 2990; background: #000; }
#ab-call-media .rv { width: 100%; height: 100%; object-fit: cover; }
#ab-call-media .lv { display: none; position: fixed; inset-inline-start: 16px; bottom: 150px; width: 120px; height: 160px; object-fit: cover; border-radius: 16px; border: 2px solid rgba(255,255,255,.4); background: #111; transform: scaleX(-1); z-index: 3001; }
#ab-call-media.on.lv-on .lv { display: block; }
@keyframes abCallIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes abCallRing { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes abCallPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(30,158,90,.55); } 50% { box-shadow: 0 0 0 14px rgba(30,158,90,0); } }
@keyframes abCallShake { 0%, 60%, 100% { transform: rotate(0); } 66% { transform: rotate(-6deg); } 72% { transform: rotate(6deg); } 78% { transform: rotate(-4deg); } 84% { transform: rotate(3deg); } }

/* ── chat layout: the messenger's own full-window shell ── */
.ab-chl { height: 100vh; display: flex; flex-direction: column; overflow: hidden;
    background-color: #EEF2F7;
    background-image:
        radial-gradient(900px 520px at 88% -8%, rgba(15,42,68,.16), transparent 60%),
        radial-gradient(760px 520px at -6% 34%, rgba(15,138,108,.09), transparent 58%),
        radial-gradient(700px 480px at 55% 118%, rgba(37,99,235,.10), transparent 60%),
        linear-gradient(rgba(15,42,68,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,42,68,.045) 1px, transparent 1px);
    background-size: auto, auto, auto, 34px 34px, 34px 34px; }
.ab-chl-top { flex: none; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 18px; background: rgba(255,255,255,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--ab-border); }
.ab-chl-back { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--ab-navy); color: #fff; font-weight: 700; font-size: .84rem; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.ab-chl-back:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15,42,68,.25); }
.ab-chl-back .mud-icon-root { font-size: 18px; }
.ab-chl-brand { display: flex; align-items: center; gap: 10px; margin-inline-start: 6px; }
.ab-chl-brand > div { display: flex; flex-direction: column; line-height: 1.2; }
.ab-chl-brand b { font-size: 1.05rem; color: #0B1F33; }
.ab-chl-brand small { font-size: .72rem; color: #64748B; }
.ab-chl-logo { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--ab-accent), #095C48); box-shadow: 0 8px 18px rgba(15,138,108,.28); }
.ab-chl-me { flex-direction: column; align-items: flex-start; line-height: 1.15; margin-inline: 8px 2px; }
.ab-chl-me b { font-size: .8rem; color: #0B1F33; }
.ab-chl-me small { font-size: .68rem; color: #64748B; }
.ab-chl-body { flex: 1; min-height: 0; padding: 16px; display: flex; justify-content: center; }
.ab-chl-body > .ab-chat { width: 100%; max-width: 1500px; height: 100%; min-height: 0; box-shadow: 0 24px 60px rgba(15,42,68,.14); border: 1px solid rgba(15,42,68,.08) !important; }
.ab-ch-side-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 4px; }
.ab-ch-side-head b { font-size: 1.05rem; color: #0B1F33; }
.ab-ch-side-head .ab-ch-me .ab-ch-av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(15,42,68,.18); }
.ab-ch-new { width: 38px; height: 38px; border-radius: 12px; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; background: #E8EEF3; color: var(--ab-navy); transition: all .15s; }
.ab-ch-new:hover { background: var(--ab-navy); color: #fff; transform: translateY(-1px); }
.ab-ch-new.red { background: var(--ab-accent); color: #fff; box-shadow: 0 6px 14px rgba(15,138,108,.28); }
.ab-ch-new .mud-icon-root { font-size: 20px; }
@media (max-width: 900px) { .ab-chl { height: auto; min-height: 100vh; overflow: visible; } .ab-chl-body { padding: 8px; } .ab-chl-body > .ab-chat { height: auto; } }

/* ── chat: attach menu, upload card, map picker, camera (after the NCC chat) ── */
.ab-ch-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.ab-ch-attach { position: relative; flex: none; }
.ab-ch-attach-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #64748B; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.ab-ch-attach-btn:hover, .ab-ch-attach-btn.on { background: #E8EEF3; color: var(--ab-navy); }
.ab-ch-attach-btn.on .mud-icon-root { transform: rotate(45deg); transition: transform .2s; }
.ab-ch-attach-btn:disabled { opacity: .4; cursor: default; }
.ab-ch-attach-back { position: fixed; inset: 0; z-index: 40; }
.ab-ch-attach-menu { position: absolute; bottom: calc(100% + 12px); inset-inline-start: 0; z-index: 41; display: flex; gap: 4px; padding: 10px; background: #fff; border-radius: 18px; border: 1px solid var(--ab-border); box-shadow: 0 18px 44px rgba(15,42,68,.22); animation: abAttachIn .18s ease-out; width: max-content; max-width: calc(100vw - 32px); }
@keyframes abAttachIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.ab-ch-attach-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 78px; padding: 9px 4px 8px; border-radius: 12px; cursor: pointer; border: 0; background: transparent; font: inherit; font-size: .72rem; font-weight: 700; color: #334155; text-align: center; transition: background .12s; }
.ab-ch-attach-item:hover { background: #F1F5F9; }
.ab-ch-attach-ic { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 4px 10px rgba(15,42,68,.16); }
.ab-ch-attach-ic.pic { background: linear-gradient(135deg, #1E8E54, #34C759); }
.ab-ch-attach-ic.doc { background: linear-gradient(135deg, #1D4ED8, #3B82F6); }
.ab-ch-attach-ic.cam { background: linear-gradient(135deg, #A30D26, #E0294A); }
.ab-ch-attach-ic.oth { background: linear-gradient(135deg, #6B7280, #9AA3B5); }
.ab-ch-attach-ic.loc { background: linear-gradient(135deg, #B45309, #F59E0B); }
.ab-ch-up { min-width: 260px; }
.ab-ch-upfile { display: flex; align-items: center; gap: 10px; }
.ab-ch-upicon { width: 42px; height: 42px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); color: #fff; }
.ab-ch-upicon.err { background: #FEE2E2; color: #B91C1C; }
.ab-ch-upthumb { position: relative; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none; }
.ab-ch-upthumb img { width: 100%; height: 100%; object-fit: cover; }
.ab-ch-upthumb i { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.ab-ch-upthumb i::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: abSpin .8s linear infinite; }
@keyframes abSpin { to { transform: rotate(360deg); } }
.ab-ch-upmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-ch-upmeta b { font-size: .84rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 200px; }
.ab-ch-upmeta small { font-size: .7rem; opacity: .8; }
.ab-ch-uppct { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .95rem; }
.ab-ch-uppct small { font-size: .65rem; opacity: .8; }
.ab-ch-upbar { position: relative; height: 5px; border-radius: 999px; background: rgba(255,255,255,.22); margin-top: 8px; overflow: hidden; }
.ab-ch-upbar span { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; background: #fff; border-radius: 999px; transition: width .2s; }
.ab-ch-upbar span.indet { width: 40%; animation: abUpIndet 1.1s ease-in-out infinite; }
@keyframes abUpIndet { 0% { inset-inline-start: -40%; } 100% { inset-inline-start: 100%; } }
.ab-bubble-row.me .ab-ch-up.err { background: #fff; color: #7F1D1D; border-color: #FECACA; }
.ab-ch-locmap { display: block; width: 280px; max-width: 100%; text-decoration: none; color: inherit; border-radius: 13px; overflow: hidden; background: #fff; transition: transform .15s, box-shadow .15s; }
.ab-ch-locmap:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15,42,68,.18); }
.ab-ch-locmap img { display: block; width: 100%; height: 150px; object-fit: cover; }
.ab-ch-locmap-fb { height: 110px; display: flex; align-items: center; justify-content: center; color: var(--ab-accent); background: repeating-linear-gradient(45deg, #EEF2F7, #EEF2F7 12px, #E2E8F0 12px, #E2E8F0 24px); }
.ab-ch-locmap-fb .mud-icon-root { font-size: 38px; }
.ab-ch-locmap-foot { display: flex; align-items: center; gap: 6px; padding: 7px 10px; color: #0B1F33; }
.ab-ch-locmap-foot .mud-icon-root { font-size: 16px; color: var(--ab-accent); }
.ab-ch-locmap-foot b { font-size: .78rem; white-space: nowrap; }
.ab-ch-locmap-foot small { font-size: .68rem; color: #64748B; margin-inline-start: auto; white-space: nowrap; }
.ab-ch-bubble:has(.ab-ch-locmap) { padding: 4px 4px 6px; }
.ab-ch-bubble:has(.ab-ch-locmap) .ab-bubble-meta { padding: 0 8px; }
.ab-ch-locdlg .mud-dialog-content, .ab-ch-camdlg .mud-dialog-content { padding: 0 !important; }
.ab-ch-locwrap { position: relative; }
.ab-ch-locwrap .ab-map { border-radius: 0; border: 0; }
.ab-ch-locmy { position: absolute; bottom: 16px; inset-inline-start: 14px; z-index: 500; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--ab-navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(15,42,68,.35); transition: transform .15s; }
.ab-ch-locmy:hover { transform: scale(1.07); }
.ab-ch-lochint { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 16px 2px; font-size: .78rem; font-weight: 600; color: #64748B; }
.ab-ch-lochint .ab-mono { margin-inline-start: auto; color: #0B1F33; }
.ab-ch-cam { background: #000; display: flex; justify-content: center; }
.ab-ch-cam video { width: 100%; max-height: 60vh; display: block; }

/* chat layout without a top strip: the back link is a button in the list header */
a.ab-ch-new { text-decoration: none; flex: none; }

/* ── picture picker (profile + group photo): avatar, choose / remove, hint ── */
.ab-avp { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 12px; text-align: center; }
.ab-avp.busy { opacity: .6; pointer-events: none; }
.ab-avp-av { position: relative; width: 112px; height: 112px; border-radius: 32px; display: inline-flex; align-items: center; justify-content: center; background-color: var(--ab-navy); background-size: cover; background-position: center; color: #fff; font-weight: 800; font-size: 2.4rem; cursor: pointer; box-shadow: 0 10px 24px rgba(15,42,68,.18); transition: transform .15s, box-shadow .15s; }
.ab-avp-av:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,42,68,.26); }
.ab-avp-av.grp { background-image: linear-gradient(135deg, #0F2A44, #2563EB); }
.ab-avp-av > .mud-icon-root { font-size: 3rem; }
.ab-avp-cam { position: absolute; inset-inline-end: -6px; bottom: -6px; width: 36px; height: 36px; border-radius: 50%; background: var(--ab-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(15,138,108,.3); }
.ab-avp-cam .mud-icon-root { font-size: 17px; }
.ab-avp-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ab-avp-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--ab-navy); color: #fff; font: inherit; font-weight: 700; font-size: .84rem; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.ab-avp-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15,42,68,.22); }
.ab-avp-btn .mud-icon-root { font-size: 18px; }
.ab-avp-btn.danger { background: #FEE2E2; color: #B91C1C; }
.ab-avp-btn.danger:hover { box-shadow: 0 8px 18px rgba(185,28,28,.16); }
.ab-avp-name { text-align: center; margin-bottom: 14px; }

/* ── chat text appearance: the user's font, size and weight (araib-chat.js sets the variables) ── */
.ab-ch .ab-bubble-body, .ab-ch .ab-compose-input { font-family: var(--ab-ct-font, inherit); font-size: var(--ab-ct-size, inherit); font-weight: var(--ab-ct-weight, inherit); }
.ab-ch .ab-compose-input { color: var(--ab-ct-color, inherit); }
.ab-ch .ab-compose-input::placeholder { color: #94A3B8; font-weight: 400; }
/* coloured messages ("[c=red]…[/c]"): a strong colour on light bubbles, a soft tint on my own navy bubbles */
.ab-cc-red { color: #D32F2F; } .ab-cc-orange { color: #E8710A; } .ab-cc-gold { color: #B67807; } .ab-cc-green { color: #2E7D32; }
.ab-cc-teal { color: #00838F; } .ab-cc-blue { color: #1565C0; } .ab-cc-purple { color: #7B1FA2; } .ab-cc-gray { color: #6B7280; }
.ab-bubble-row.me .ab-cc-red { color: #FCA5A5; } .ab-bubble-row.me .ab-cc-orange { color: #FDBA74; } .ab-bubble-row.me .ab-cc-gold { color: #FCD34D; } .ab-bubble-row.me .ab-cc-green { color: #86EFAC; }
.ab-bubble-row.me .ab-cc-teal { color: #5EEAD4; } .ab-bubble-row.me .ab-cc-blue { color: #93C5FD; } .ab-bubble-row.me .ab-cc-purple { color: #D8B4FE; } .ab-bubble-row.me .ab-cc-gray { color: #CBD5E1; }
.ab-set-row { margin-bottom: 0; flex-wrap: wrap; }
.ab-set-row > div { flex: 1; min-width: 180px; }

/* chat pictures open the slide-show viewer (araib-chat.js, abViewer) */
button.ab-ch-img { border: 0; padding: 0; background: none; cursor: zoom-in; font: inherit; }
.ab-ch-grid > button { border: 0; padding: 0; cursor: zoom-in; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #F1F5F9; }
.ab-ch-grid > button:hover img { transform: scale(1.04); }

/* damage types page: the type's icon and the icon picker in its dialog */
.ab-dt-ic { width: 36px; height: 36px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(15,138,108,.10); color: var(--ab-accent); }
.ab-dt-label { font-size: .78rem; font-weight: 700; color: #475569; margin-bottom: 6px; }
.ab-dt-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.ab-dt-pick { height: 44px; border-radius: 12px; border: 1.5px solid var(--ab-border); background: #fff; color: #475569; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .12s, background .12s, color .12s; }
.ab-dt-pick:hover { border-color: var(--ab-accent); color: var(--ab-accent); }
.ab-dt-pick.on { border-color: var(--ab-accent); background: var(--ab-accent); color: #fff; box-shadow: 0 6px 14px rgba(15,138,108,.28); }

/* contractor form: the login account block */
.ab-con-login { margin-top: 14px; padding: 12px 14px 14px; border: 1px solid var(--ab-border); border-radius: 14px; background: #F8FAFC; }
.ab-con-login-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--ab-accent); }
.ab-con-login-head b { display: block; color: #0B1F33; font-size: .92rem; }
.ab-con-login-head small { display: block; color: #6B7280; font-size: .76rem; }

/* new report: the send button floats at the bottom, on the side away from the menu (left in Arabic) */
.ab-send-space { height: 76px; }
.ab-send-fab { position: fixed; inset-inline-end: 24px; bottom: 24px; z-index: 1200; }
.ab-send-fab .mud-button-root { border-radius: 999px; padding: 12px 28px; font-size: 1rem; font-weight: 800; box-shadow: 0 12px 28px rgba(15,138,108,.40); }
.ab-send-fab .mud-button-root:disabled { background: #94A3B8 !important; color: #fff !important; box-shadow: none; }
@media (max-width: 600px) { .ab-send-fab { inset-inline-end: 16px; bottom: 16px; } }

/* materials editor: a clear empty state with one button, then one readable row per material */
.ab-items-start { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 20px 18px 22px; border: 2px dashed #9CC9BC; border-radius: 16px; background: #F3FAF7; outline: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.ab-items-start.can { cursor: pointer; }
.ab-items-start.can:hover, .ab-items-start.can:focus-visible { border-color: var(--ab-accent); background: #E9F6F1; box-shadow: 0 0 0 4px rgba(15,138,108,.10); }
.ab-items-start-ic { width: 46px; height: 46px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(15,138,108,.14); color: var(--ab-accent); }
.ab-items-start-text b { display: block; color: #0B1F33; font-size: .98rem; }
.ab-items-start-text small { display: block; color: #64748B; font-size: .8rem; margin-top: 2px; }
.ab-items-start .mud-button-root { border-radius: 999px; font-weight: 800; font-size: 1rem; padding: 11px 34px; margin-top: 4px; box-shadow: 0 10px 22px rgba(15,138,108,.35); }
.ab-items-name { display: block; color: #0B1F33; font-size: .88rem; }
.ab-items-code { display: block; color: #8792A2; font-size: .72rem; margin-top: 1px; }
.ab-items-per { color: #8792A2; font-family: inherit; font-size: .74rem; }
.ab-items-q { display: inline-flex; align-items: center; gap: 8px; }
.ab-items-unit { color: #475569; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.ab-items-more { margin-top: 12px; border-radius: 12px !important; font-weight: 700 !important; border-style: dashed !important; }

/* contractor form: PDF documents */
.ab-con-docs { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--ab-border); border-radius: 14px; background: #F8FAFC; }
.ab-con-docs .ab-con-login-head { margin-bottom: 8px; color: #B3261E; }
.ab-con-docs .ab-con-login-head > div { flex: 1; min-width: 0; }
.ab-con-doc { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: #fff; border: 1px solid #E8EDF3; margin-top: 6px; }
.ab-con-doc > .mud-icon-root { color: #B3261E; flex: none; }
.ab-con-doc.new { border-style: dashed; border-color: #8FD3B2; background: #F4FBF8; }
.ab-con-doc.new > .mud-icon-root { color: var(--ab-accent); }
.ab-con-doc a, .ab-con-doc > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .86rem; color: #0B1F33; text-decoration: none; direction: ltr; text-align: start; }
.ab-con-doc a:hover { text-decoration: underline; color: var(--ab-accent); }
.ab-con-doc small { color: #6B7280; font-size: .74rem; white-space: nowrap; }
.ab-con-doc-none { color: #8792A2; font-size: .82rem; padding: 4px 2px 2px; }
.ab-con-pdf { display: inline-flex; align-items: center; gap: 4px; color: #B3261E; font-weight: 700; font-size: .82rem; }
.ab-con-drop { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 10px 14px; border: 2px dashed #9CC9BC; border-radius: 12px; background: #F3FAF7; color: var(--ab-accent); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.ab-con-drop:hover { border-color: var(--ab-accent); background: #E9F6F1; box-shadow: 0 0 0 4px rgba(15,138,108,.10); }
.ab-con-drop b { font-size: .92rem; font-weight: 800; }
.ab-con-drop small { flex-basis: 100%; text-align: center; color: #64748B; font-size: .78rem; }
.ab-con-drop.empty { padding: 16px 14px; }
.ab-con-drop.empty .mud-icon-root { font-size: 28px; }
.ab-con-drop.empty b { font-size: 1rem; }

/* two pages in one (users / contractors): big tabs above the page */
.ab-tabs { display: flex; gap: 6px; padding: 6px; margin-bottom: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--ab-border); }
.ab-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; cursor: pointer; padding: 11px 16px; border-radius: 12px; font: inherit; font-size: .95rem; font-weight: 700; color: #475569; transition: background .15s, color .15s, box-shadow .15s; }
.ab-tab:hover { background: #F1F5F9; color: var(--ab-navy); }
.ab-tab.on { background: var(--ab-accent); color: #fff; box-shadow: 0 8px 18px rgba(15,138,108,.30); }

/* the contractor's home screen */
.ab-cx-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 22px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #0B1F33 0%, #0F3A4A 55%, #0F8A6C 130%); box-shadow: 0 14px 34px rgba(11,31,51,.22); }
.ab-cx-hero-ic { width: 58px; height: 58px; border-radius: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); }
.ab-cx-hero-ic .mud-icon-root { font-size: 32px; }
.ab-cx-hero-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; }
.ab-cx-hero-text b { font-size: 1.35rem; font-weight: 800; line-height: 1.3; }
.ab-cx-hero-text span { opacity: .86; font-size: .9rem; }
.ab-cx-hero-text small { margin-top: 6px; font-size: .86rem; color: #BFE8DC; font-weight: 600; }
.ab-cx-hero .mud-button-root { border-radius: 14px; font-weight: 800; }
.ab-cx-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.ab-cx-door { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 16px 14px; border-radius: 18px; border: 1px solid var(--ab-border); background: #fff; cursor: pointer; font: inherit; text-align: start; transition: transform .12s, box-shadow .15s, border-color .15s; }
.ab-cx-door:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15,42,68,.12); }
.ab-cx-door-ic { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: #F1F5F9; color: #64748B; }
.ab-cx-door-n { position: absolute; top: 12px; inset-inline-end: 16px; font-size: 2.1rem; font-weight: 800; line-height: 1; color: #94A3B8; font-variant-numeric: tabular-nums; }
.ab-cx-door b { margin-top: 10px; font-size: 1rem; color: #0B1F33; }
.ab-cx-door small { color: #6B7280; font-size: .78rem; }
.ab-cx-door.has .ab-cx-door-n { color: #0B1F33; }
.ab-cx-door.new.has { border-color: #F0B45A; background: #FFFBF3; } .ab-cx-door.new.has .ab-cx-door-ic { background: #F59E0B; color: #fff; }
.ab-cx-door.doing.has { border-color: #93C5FD; background: #F5F9FF; } .ab-cx-door.doing.has .ab-cx-door-ic { background: #2563EB; color: #fff; }
.ab-cx-door.redo.has, .ab-cx-door.late.has { border-color: #F3B0AA; background: #FFF6F5; } .ab-cx-door.redo.has .ab-cx-door-ic, .ab-cx-door.late.has .ab-cx-door-ic { background: #D92D20; color: #fff; }
.ab-cx-door.late.has .ab-cx-door-n, .ab-cx-door.redo.has .ab-cx-door-n { color: #B3261E; }
.ab-cx-job { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; }
.ab-cx-job + .ab-cx-job { margin-top: 4px; }
.ab-cx-job:hover { background: #F8FAFC; border-color: var(--ab-border); }
.ab-cx-job-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-cx-job-body b { color: #0B1F33; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-cx-job-body > span { color: #6B7280; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-cx-job-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.ab-cx-job-end small { color: #8792A2; font-size: .72rem; }
.ab-cx-days { padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 800; }
.ab-cx-days.ok { background: #E7F6F0; color: #0B6E56; } .ab-cx-days.soon { background: #FFF3DC; color: #B45309; } .ab-cx-days.late { background: #FDE7E5; color: #B3261E; }
.ab-cx-job-go { flex: none; padding: 7px 14px; border-radius: 10px; font-size: .8rem; font-weight: 800; color: #fff; background: var(--ab-accent); white-space: nowrap; }
.ab-cx-job-go.warning { background: #F59E0B; } .ab-cx-job-go.error { background: #D92D20; } .ab-cx-job-go.info { background: #2563EB; }
.ab-cx-row { cursor: pointer; } .ab-cx-row:hover td { background: #F8FAFC; }
.ab-cx-money { background: linear-gradient(160deg, #F3FAF7, #fff 60%) !important; }
.ab-cx-amount { display: flex; align-items: baseline; gap: 8px; }
.ab-cx-amount b { font-size: 2rem; font-weight: 800; color: #0B6E56; font-family: Consolas, "Segoe UI Mono", monospace; }
.ab-cx-amount small { color: #6B7280; font-weight: 700; }
.ab-cx-amount-l { color: #6B7280; font-size: .8rem; }
.ab-cx-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ab-cx-split > div { padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--ab-border); display: flex; flex-direction: column; }
.ab-cx-split small { color: #6B7280; font-size: .74rem; } .ab-cx-split b { color: #0B1F33; font-size: 1.05rem; }
.ab-cx-wait { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer; }
.ab-cx-wait:hover { background: #F8FAFC; }
.ab-cx-wait .mud-icon-root { color: #64748B; } .ab-cx-wait span { flex: 1; color: #334155; font-size: .88rem; } .ab-cx-wait b { font-size: 1.1rem; color: #0B1F33; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .ab-cx-doors { grid-template-columns: 1fr; } .ab-cx-job { flex-wrap: wrap; } .ab-cx-job-end { align-items: flex-start; } }

/* inspection window: the contractor's PDF report as a clear row to open */
.ab-qs-pdf { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ab-border); background: #fff; text-decoration: none; color: #0B1F33; }
.ab-qs-pdf:hover { border-color: var(--ab-accent); background: #F3FAF7; }
.ab-qs-pdf > .mud-icon-root:first-child { color: #B3261E; font-size: 28px; }
.ab-qs-pdf span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-qs-pdf small { color: #6B7280; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; }

/* inspection window (QS): a hero, before/after side by side, the PDF, the quantities, then the decision */
.ab-in-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #0B1F33 0%, #0F3A4A 60%, #0F8A6C 140%); box-shadow: 0 12px 28px rgba(11,31,51,.20); }
.ab-in-hero-ic { width: 48px; height: 48px; border-radius: 15px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); }
.ab-in-hero-text { flex: 1 1 260px; min-width: 0; }
.ab-in-hero-text > b { display: block; font-size: 1.12rem; font-weight: 800; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-in-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ab-in-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.ab-in-chip .mud-icon-root { font-size: 14px; opacity: .85; }
.ab-in-chip.mono { font-family: Consolas, "Segoe UI Mono", monospace; background: rgba(255,255,255,.22); letter-spacing: .02em; }
.ab-in-hero-sum { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; justify-content: flex-end; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.10); }
.ab-in-hero-sum small { flex-basis: 100%; text-align: end; font-size: .72rem; opacity: .8; }
.ab-in-hero-sum b { font-size: 1.5rem; font-weight: 800; font-family: Consolas, "Segoe UI Mono", monospace; }
.ab-in-hero-sum span { font-size: .76rem; opacity: .8; font-weight: 700; }

.ab-in-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-top: 14px; }
.ab-in-arrow { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--ab-border); color: #64748B; box-shadow: 0 4px 10px rgba(15,42,68,.08); }
.ab-in-shot { min-width: 0; padding: 10px; border-radius: 18px; background: #fff; border: 1px solid var(--ab-border); }
.ab-in-shot-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ab-in-shot-head small { color: #6B7280; font-size: .76rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-in-tag { padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; color: #fff; }
.ab-in-shot.before .ab-in-tag { background: #D92D20; }
.ab-in-shot.after .ab-in-tag { background: #12A150; }
.ab-in-shot.before { border-top: 3px solid #D92D20; }
.ab-in-shot.after { border-top: 3px solid #12A150; }
.ab-in-count { font-size: .72rem; font-weight: 700; color: #475569; background: #F1F5F9; border-radius: 999px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.ab-in-stage { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: #0B1F33; cursor: zoom-in; }
.ab-in-stage img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.ab-in-stage:hover img { transform: scale(1.04); }
.ab-in-zoom { position: absolute; inset-inline-end: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(11,31,51,.62); color: #fff; }
.ab-in-zoom .mud-icon-root { font-size: 18px; }
.ab-in-stage.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #F1F5F9; color: #8792A2; cursor: default; font-size: .82rem; text-align: center; padding: 12px; }
.ab-in-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.ab-in-thumbs button { flex: none; width: 54px; height: 42px; padding: 0; border-radius: 9px; overflow: hidden; border: 2px solid transparent; background: #E2E8F0; cursor: pointer; opacity: .7; }
.ab-in-thumbs button.on { border-color: var(--ab-accent); opacity: 1; }
.ab-in-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ab-in-quote { display: flex; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #F3FAF7; border: 1px solid #D5EBE3; color: #0B1F33; font-size: .9rem; line-height: 1.6; }
.ab-in-quote > .mud-icon-root { color: var(--ab-accent); flex: none; }
.ab-in-quote small { display: block; color: #64748B; font-size: .74rem; font-weight: 700; }

.ab-in-pdf { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--ab-border); background: #fff; text-decoration: none; color: #0B1F33; transition: border-color .15s, box-shadow .15s; }
.ab-in-pdf:hover { border-color: #F3B0AA; box-shadow: 0 8px 18px rgba(217,45,32,.10); }
.ab-in-pdf-ic { width: 42px; height: 42px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #FDE8E6; color: #B3261E; }
.ab-in-pdf-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-in-pdf-text small { color: #6B7280; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; }
.ab-in-pdf-open { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 10px; background: #F1F5F9; color: #0B1F33; font-weight: 700; font-size: .82rem; white-space: nowrap; }
.ab-in-pdf-open .mud-icon-root { font-size: 16px; }

.ab-in-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; font-weight: 800; color: #0B1F33; font-size: .98rem; }
.ab-in-title > .mud-icon-root { color: var(--ab-accent); font-size: 20px; }
.ab-in-title small { flex-basis: 100%; color: #6B7280; font-weight: 500; font-size: .78rem; }
.ab-in-items { border: 1px solid var(--ab-border); border-radius: 16px; overflow: hidden; background: #fff; }
.ab-in-item { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid #EEF2F6; }
.ab-in-item.cut { background: #FFF8EC; }
.ab-in-item-name { flex: 1; min-width: 0; }
.ab-in-item-name b { display: block; font-size: .9rem; color: #0B1F33; }
.ab-in-item-name small { color: #8792A2; font-size: .74rem; }
.ab-in-q { display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.ab-in-q small { color: #8792A2; font-size: .68rem; font-weight: 700; }
.ab-in-q span { font-size: .9rem; color: #334155; }
.ab-in-q.edit { min-width: 110px; }
.ab-in-amount { min-width: 84px; text-align: end; font-weight: 800; color: #0B1F33; }
.ab-in-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; padding: 12px 14px; background: #F8FAFC; }
.ab-in-total span { flex: 1; color: #475569; font-weight: 700; font-size: .86rem; }
.ab-in-total s { color: #94A3B8; font-size: .86rem; }
.ab-in-total b { font-size: 1.25rem; color: #0B6E56; }
.ab-in-total small { color: #6B7280; font-weight: 700; font-size: .74rem; }

.ab-in-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ab-in-choice { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 2px solid var(--ab-border); background: #fff; cursor: pointer; text-align: start; font: inherit; color: #334155; transition: border-color .15s, background .15s, box-shadow .15s, transform .1s; }
.ab-in-choice:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15,42,68,.10); }
.ab-in-choice-ic { width: 46px; height: 46px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.ab-in-choice-ic .mud-icon-root { font-size: 26px; }
.ab-in-choice.ok .ab-in-choice-ic { background: #E3F6EB; color: #12A150; }
.ab-in-choice.bad .ab-in-choice-ic { background: #FDE8E6; color: #D92D20; }
.ab-in-choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-in-choice-text b { font-size: .98rem; color: #0B1F33; }
.ab-in-choice-text small { color: #6B7280; font-size: .78rem; }
.ab-in-choice-radio { color: #CBD5E1; }
.ab-in-choice.ok.on { border-color: #12A150; background: #F1FBF5; box-shadow: 0 0 0 4px rgba(18,161,80,.14); }
.ab-in-choice.ok.on .ab-in-choice-ic { background: #12A150; color: #fff; }
.ab-in-choice.ok.on .ab-in-choice-radio { color: #12A150; }
.ab-in-choice.bad.on { border-color: #D92D20; background: #FFF6F5; box-shadow: 0 0 0 4px rgba(217,45,32,.12); }
.ab-in-choice.bad.on .ab-in-choice-ic { background: #D92D20; color: #fff; }
.ab-in-choice.bad.on .ab-in-choice-radio { color: #D92D20; }
@media (max-width: 640px) {
    .ab-in-compare { grid-template-columns: 1fr; }
    .ab-in-arrow { display: none; }
    .ab-in-verdict { grid-template-columns: 1fr; }
    .ab-in-item { flex-wrap: wrap; }
    .ab-in-item-name { flex-basis: 100%; }
}
