/*
  Iron Cowboy staff shell (Platform.Ui; ARCHITECTURE 9.1 layout rules): works at 1366x768 and 390 px wide with no horizontal
  page scroll, touch targets of at least 44 px, scan box always reachable, receipts at 72 mm and letters at 8.5 in.
  Colors: brand green #538135, tan #9D7762, ink #1C1C1C on warm paper (StaffTheme; the same values are the --ic-* custom
  properties below). Breakpoints follow MudBlazor (sm 600, md 960, lg 1280).
*/

/* ---------- Fonts: Barlow and Barlow Condensed, latin subset, served by the app from ../fonts (SIL Open Font License,
   see fonts/OFL.txt); nothing is fetched from a font CDN ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); }

/* ---------- Tokens (keep in step with StaffTheme.cs) ---------- */
:root {
  --ic-green: #538135;
  --ic-green-dark: #3E6328;
  --ic-tan: #9D7762;            /* decoration and large shapes; fails AA as small text on light surfaces */
  --ic-tan-text: #7A5A48;       /* tan for small text on paper and surface */
  --ic-tan-light: #C9A892;      /* tan on ink */
  --ic-ink: #1C1C1C;
  --ic-paper: #F1EEE7;
  --ic-surface: #FFFDF8;
  --ic-line: #DDD5C7;
  --ic-line-strong: #C9C0B0;
  --ic-text-2: #5A544C;
  --ic-warning-text: #7A4700;
  --ic-overdue-bg: #F8DFC4;
  --ic-overdue-line: #D9A56F;
  --ic-overdue-text: #6B2A05;
  --ic-critical: #8E1B14;
  --ic-radius: 8px;
  --ic-radius-card: 10px;
  --ic-font-display: "Barlow Condensed", "Arial Narrow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ic-paper); color: var(--ic-ink); overflow-wrap: break-word; }
.ic-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ic-tan-text); }
img { max-width: 100%; }
.ic-touch { min-height: 44px; }
.ic-mono { font-family: ui-monospace, Consolas, "Courier New", monospace; }
.ic-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ic-input {
  box-sizing: border-box; width: 100%; min-width: 0; height: 44px; padding: 0 12px;
  font: inherit; font-size: 16px; color: #1C1C1C; background: #FFFFFF;
  border: 1px solid #B8B8B8; border-radius: 6px;
}
.ic-input:focus { outline: 2px solid #538135; outline-offset: 1px; border-color: #538135; }
.ic-page-title { margin: 0; font-family: var(--ic-font-display); font-size: 1.75rem; font-weight: 700; line-height: 1.1; letter-spacing: .01em; }
.ic-dialog-title { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Shell ---------- */
.ic-shell { min-height: 100vh; }
.ic-page { box-sizing: border-box; width: 100%; max-width: 1600px; margin: 0 auto; padding: 16px; }
.ic-page-error { margin: 8px 0; }
.ic-page:focus { outline: none; }
/* Stage D UI #16: the first focusable element of every staff page; visible only while it has focus. */
.ic-skip-link {
  position: absolute; left: 8px; top: -64px; z-index: 2000; padding: 10px 16px; border-radius: 6px;
  background: #1C1C1C; color: #FFFFFF; font-weight: 600; text-decoration: none;
}
.ic-skip-link:focus { top: 8px; outline: 2px solid #538135; outline-offset: 2px; }
.ic-drawer .mud-drawer-content { overflow-x: hidden; }
.ic-drawer__brand { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px 16px; color: #FFFFFF; text-decoration: none; }
.ic-drawer__brand:focus-visible { outline: 2px solid var(--ic-tan-light); outline-offset: -4px; }
.ic-drawer__wordmark {
  font-family: var(--ic-font-display); font-weight: 700; font-size: 26px; line-height: 1; letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap;
}
.ic-drawer__rule { display: block; width: 44px; height: 3px; background: var(--ic-tan-light); }

.ic-appbar { border-bottom: 1px solid var(--ic-line); }
.ic-appbar .mud-toolbar { gap: 4px; padding: 0 8px; min-width: 0; }
.ic-appbar__menu { flex: 0 0 auto; }
.ic-appbar__brand {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; color: inherit; text-decoration: none; margin-right: 4px;
}
/* The drawer carries the wordmark while it is open. */
.ic-shell:has(.ic-drawer.mud-drawer--open) .ic-appbar__brand { display: none; }
.ic-appbar__mark {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid currentColor; font-weight: 800; font-size: 13px; letter-spacing: .02em;
}
.ic-appbar__name {
  font-family: var(--ic-font-display); font-weight: 700; font-size: 20px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.ic-appbar__scan { flex: 1 1 auto; min-width: 0; max-width: 560px; }
.ic-appbar__end { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; margin-left: auto; }

/* ---------- Scan box ---------- */
.ic-scan { position: relative; display: flex; align-items: center; width: 100%; min-width: 0; margin: 0; }
.ic-scan__icon { position: absolute; left: 10px; opacity: .75; pointer-events: none; }
.ic-scan__input {
  box-sizing: border-box; width: 100%; min-width: 0; height: 40px; padding: 0 30px 0 36px;
  font: inherit; font-size: 16px; color: #1C1C1C; background: #FFFFFF; border: 1px solid #B8B8B8; border-radius: 6px;
}
.ic-scan__input:focus { outline: 2px solid #538135; outline-offset: 1px; }
.ic-scan__busy { position: absolute; right: 10px; font-weight: 700; }
.ic-scan--appbar .ic-scan__input {
  height: 44px; background: var(--ic-paper); border-color: var(--ic-line-strong); border-radius: var(--ic-radius); color: var(--ic-ink);
}
.ic-scan--appbar .ic-scan__input::placeholder { color: var(--ic-text-2); opacity: 1; }
.ic-scan--appbar .ic-scan__input:focus { background: #FFFFFF; border-color: var(--ic-green); }
.ic-scan--appbar .ic-scan__icon { color: var(--ic-text-2); opacity: 1; }
.ic-scan--appbar:focus-within .ic-scan__icon { color: var(--ic-ink); }
.ic-scan--large .ic-scan__input { height: 56px; font-size: 20px; padding-left: 44px; }
.ic-scan--large .ic-scan__icon { left: 14px; }

/* ---------- Status lights, provisional badge, bell, user ---------- */
.ic-lights { display: inline-flex; align-items: center; }
.ic-lights__all { display: inline-flex; align-items: center; }
/* One chip for every service; only the lights of services in trouble stay visible beside it. */
.ic-lights__all .ic-light--ok, .ic-lights__all .ic-light--off { display: none; }
.ic-lights__summary { display: inline-flex; }
.ic-lights__button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 36px; margin: 4px;
  padding: 0 12px; border: 1px solid var(--ic-line); border-radius: var(--ic-radius); background: none; cursor: pointer;
  color: inherit; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background-color .12s ease;
}
.ic-lights__button:hover { background: var(--ic-paper); }
.ic-lights__button:focus-visible { outline: 2px solid var(--ic-green); outline-offset: 2px; }
.ic-lights__text { margin-left: 8px; font-size: 13px; white-space: normal; }
.ic-light {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; margin: 0 2px; border-radius: 11px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; color: #FFFFFF; background: #757575;
}
.ic-light--ok { background: #2E7D32; }
.ic-light--slow { background: #F2B705; color: #1C1C1C; }
.ic-light--slow::after { content: " ~"; }
.ic-light--down { background: #C62828; }
.ic-light--down::after { content: " !"; }
.ic-light--off { background: #757575; }
.ic-light--dot { width: 16px; height: 16px; padding: 0; margin: 0; border: 2px solid var(--ic-surface); box-shadow: 0 0 0 1px var(--ic-line-strong); border-radius: 50%; }
.ic-light--dot::after { content: none; }

.ic-provisional {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; margin: 0 4px; border-radius: 12px;
  background: #F2C94C; color: #1C1C1C; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap;
}

.ic-bell .mud-badge-wrapper .mud-badge.mud-badge-overlap.mud-badge-top { top: 2px; bottom: auto; }
.ic-bell .mud-badge-wrapper .mud-badge.mud-badge-overlap.right { right: 2px; left: auto; }
.ic-bell__list { width: min(360px, calc(100vw - 32px)); }
.ic-bell__item { white-space: normal; border-left: 4px solid transparent; }
.ic-bell__item--warning { border-left-color: #C77700; }
.ic-bell__item--critical { border-left-color: #B3261E; }
.ic-bell__title { font-weight: 600; }
.ic-bell__body { font-size: 13px; color: #444444; }
.ic-bell__time { font-size: 12px; color: #6A6A6A; }
.ic-bell__empty { padding: 12px 16px; color: #555555; }

.ic-user__button {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px;
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
}
.ic-user__avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ic-ink); color: #FFFFFF; font-weight: 700; font-size: 14px;
}
.ic-user__header { padding: 10px 16px; }
.ic-user__name { font-weight: 700; }
.ic-user__device { font-size: 12px; color: #555555; }
.ic-user__logout { margin: 0; }
.ic-user__logout-button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 6px 16px;
  font: inherit; text-align: left; color: inherit; background: none; border: 0; cursor: pointer;
}
.ic-user__logout-button:hover, .ic-user__logout-button:focus-visible { background: rgba(0, 0, 0, .06); }

/* ---------- Drawer nav ---------- */
/* On the ink drawer: links are rounded rows, the current page is a solid green pill (green text on ink fails AA), and a
   group's own row reads as a small tan label. */
.ic-nav { padding: 0 10px 16px; }
.ic-nav .mud-nav-link { min-height: 44px; border-radius: var(--ic-radius); color: #E9E4DA; transition: background-color .12s ease; }
.ic-nav .mud-nav-link:hover:not(.mud-nav-link-disabled), .ic-nav .mud-nav-link:focus-visible:not(.mud-nav-link-disabled) { background-color: rgba(255, 255, 255, .09); }
.ic-nav .mud-nav-link:focus-visible { outline: 2px solid var(--ic-tan-light); outline-offset: -2px; }
/* .ic-nav is repeated to outrank MudBlazor's own .mud-navmenu.mud-navmenu-primary active rule. */
.ic-nav.ic-nav.ic-nav .mud-nav-link.active:not(.mud-nav-link-disabled),
.ic-nav.ic-nav.ic-nav .mud-nav-link.active:not(.mud-nav-link-disabled):hover { background-color: var(--ic-green); color: #FFFFFF; font-weight: 600; }
.ic-nav.ic-nav.ic-nav .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon { color: #FFFFFF; }
.ic-nav .mud-nav-link .mud-nav-link-icon { color: var(--ic-tan-light); }
.ic-nav .mud-nav-group { margin-top: 10px; }
.ic-nav .mud-nav-group > .mud-nav-link {
  min-height: 36px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ic-tan-light);
}
.ic-nav .mud-nav-group > .mud-nav-link .mud-nav-link-expand-icon { color: var(--ic-tan-light); }
.ic-nav .mud-nav-link-text { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ic-nav__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-nav__badge {
  margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 11px; text-align: center;
  background: var(--ic-tan-light); color: var(--ic-ink); font-size: 12px; font-weight: 700; line-height: 22px;
}

/* ---------- Phone bottom bar ---------- */
.ic-bottom-bar { display: none; }

/* ---------- Today dashboard ---------- */
.ic-dashboard { display: flex; flex-direction: column; gap: 28px; max-width: 1280px; padding: 12px 8px 24px; }
.ic-dashboard__header { display: flex; align-items: flex-end; gap: 8px 20px; flex-wrap: wrap; }
.ic-dashboard__heading { display: flex; flex-direction: column; gap: 4px; }
.ic-dashboard__title { font-size: 52px; line-height: .95; letter-spacing: .02em; text-transform: uppercase; }
.ic-dashboard__summary { margin: 0 0 4px; color: var(--ic-text-2); }
.ic-dashboard__tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ic-dashboard__updated { color: var(--ic-text-2); font-size: 13px; }
.ic-dashboard__group { display: flex; flex-direction: column; gap: 12px; }
.ic-dashboard__module, .ic-dashboard__section {
  display: flex; align-items: center; gap: 12px; margin: 0;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ic-tan-text);
}
.ic-dashboard__module::after, .ic-dashboard__section::after { content: ""; flex: 1; border-top: 1px solid var(--ic-line); }
.ic-dashboard__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.ic-dashboard__tiles--attention { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.ic-dashboard__empty { margin: 0; color: var(--ic-text-2); }
/* Tiles with nothing to do fold into one line per module. */
.ic-dashboard__clear { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; font-size: 13px; color: var(--ic-text-2); }
.ic-dashboard__clear::before {
  content: ""; flex: 0 0 16px; width: 16px; height: 16px; background: #2B5A1E;
  -webkit-mask: var(--ic-icon-check) center / contain no-repeat; mask: var(--ic-icon-check) center / contain no-repeat;
}
.ic-dashboard__clear a { padding: 6px 0; color: inherit; text-decoration: none; }
.ic-dashboard__clear a:hover, .ic-dashboard__clear a:focus-visible { color: var(--ic-ink); text-decoration: underline; }
.ic-dashboard__clear a:not(:last-child)::after { content: ","; }

:root {
  --ic-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
  --ic-icon-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 20h20L12 3zM12 10v4M12 17v.5'/%3E%3C/svg%3E");
  --ic-icon-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

/* Tiles (also used by Compliance's dashboard and license tiles). Severity is carried by fill and a corner mark, never by
   hue alone: warning = amber mark, overdue = filled amber + clock, critical = solid red. */
.ic-tile {
  position: relative; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 124px;
  padding: 16px 18px; border-radius: var(--ic-radius-card); border: 1px solid var(--ic-line); background: var(--ic-surface);
  color: inherit; text-decoration: none; transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.ic-tile:hover, .ic-tile:focus-visible { border-color: var(--ic-tan); box-shadow: 0 4px 14px rgba(28, 28, 28, .1); transform: translateY(-1px); }
.ic-tile:active { transform: none; box-shadow: none; }
.ic-tile:focus-visible { outline: 3px solid #1565C0; outline-offset: 2px; }
.ic-tile__count {
  padding-right: 28px; font-family: var(--ic-font-display); font-size: 44px; font-weight: 700; line-height: .9;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.ic-dashboard .ic-tile__count { font-size: 56px; }
.ic-tile__title { font-weight: 600; font-size: 16px; }
.ic-tile__detail { font-size: 13px; color: var(--ic-text-2); }
.ic-tile__flag { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ic-tile--warning::after, .ic-tile--overdue::after, .ic-tile--critical::after {
  content: ""; position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--ic-icon-alert) center / contain no-repeat; mask: var(--ic-icon-alert) center / contain no-repeat;
}
.ic-tile--warning::after { background: var(--ic-warning-text); }
.ic-tile--warning .ic-tile__detail { color: var(--ic-warning-text); font-weight: 600; }
.ic-tile--overdue { background: var(--ic-overdue-bg); border-color: var(--ic-overdue-line); }
.ic-tile--overdue::after { background: var(--ic-overdue-text); -webkit-mask-image: var(--ic-icon-clock); mask-image: var(--ic-icon-clock); }
.ic-tile--overdue .ic-tile__count, .ic-tile--overdue .ic-tile__detail, .ic-tile--overdue .ic-tile__flag { color: var(--ic-overdue-text); }
.ic-tile--critical { background: var(--ic-critical); border-color: var(--ic-critical); color: #FFFFFF; }
.ic-tile--critical .ic-tile__detail { color: #FBDAD6; }
.ic-tile--critical:hover, .ic-tile--critical:focus-visible { border-color: var(--ic-ink); }
.ic-tile--quiet { background: transparent; border-style: dashed; }
.ic-tile--quiet .ic-tile__count { color: var(--ic-text-2); }
/* The "Needs attention first" row: count beside the text, larger. */
.ic-tile--lead { flex-direction: row; align-items: center; gap: 18px; min-height: 0; padding: 18px 44px 18px 22px; }
.ic-dashboard .ic-tile--lead .ic-tile__count { padding-right: 0; font-size: 76px; }
.ic-tile__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ic-tile--lead .ic-tile__title { font-size: 17px; }
@media (prefers-reduced-motion: reduce) {
  .ic-tile, .ic-nav .mud-nav-link { transition: none; }
  .ic-tile:hover, .ic-tile:focus-visible { transform: none; }
}

/* ---------- Pickers ---------- */
.ic-picker { min-width: 0; }
.ic-picker__list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ic-picker__row {
  box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "thumb primary end" "thumb secondary end"; gap: 2px 12px; align-items: center;
  width: 100%; min-height: 52px; padding: 8px 12px; text-align: left; font: inherit; color: inherit;
  background: #FFFFFF; border: 1px solid #D0D0D0; border-radius: 6px; cursor: pointer;
}
.ic-picker__row:hover { border-color: #538135; }
.ic-picker__row:focus-visible { outline: 3px solid #1565C0; outline-offset: 2px; }
.ic-picker__row--selected { border-color: #538135; box-shadow: inset 0 0 0 2px #538135; background: #F1F7EC; }
.ic-picker__thumb { grid-area: thumb; width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.ic-picker__primary { grid-area: primary; font-weight: 600; overflow-wrap: anywhere; }
.ic-picker__secondary { grid-area: secondary; font-size: 13px; color: #555555; overflow-wrap: anywhere; }
.ic-picker__end { grid-area: end; white-space: nowrap; }
.ic-picker__empty, .ic-picker__more { margin: 8px 0 0; color: #555555; font-size: 14px; }
.ic-picker__warning, .ic-picker__tag {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 700; vertical-align: middle;
}
.ic-picker__warning { background: #B3261E; color: #FFFFFF; }
.ic-picker__tag { background: #9D7762; color: #FFFFFF; }
.ic-unit-picker__hint { margin: 0 0 4px; color: #3A3A3A; }
.ic-unit-picker__confirm { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.ic-unit-picker__confirm .ic-input { flex: 1 1 auto; text-transform: uppercase; }
.ic-customer-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.ic-span-2 { grid-column: 1 / -1; }
.ic-customer-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---------- Photo capture ---------- */
.ic-photo-capture__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ic-photo-capture__button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 6px;
  border: 1px solid #538135; color: #538135; background: #FFFFFF; font-weight: 700; cursor: pointer; user-select: none;
}
.ic-photo-capture__button--primary { background: #538135; color: #FFFFFF; }
.ic-photo-capture input[type=file]:focus-visible + .ic-photo-capture__button { outline: 3px solid #1565C0; outline-offset: 2px; }
.ic-photo-capture__button--disabled { opacity: .5; pointer-events: none; }
.ic-photo-capture__note { margin: 6px 0 0; font-size: 12px; color: #555555; }
.ic-photo-capture__list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ic-photo-capture__item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ic-photo-capture__item img, .ic-photo-capture__placeholder {
  flex: 0 0 64px; width: 64px; height: 64px; object-fit: cover; border-radius: 4px; background: #EEEEEE;
  display: inline-flex; align-items: center; justify-content: center;
}
.ic-photo-capture__text { min-width: 0; overflow-wrap: anywhere; }
.ic-photo-capture__item--failed .ic-photo-capture__text { color: #B3261E; }
.ic-photo-capture__item--done .ic-photo-capture__text { color: #2E7D32; font-weight: 600; }

/* ---------- Small components ---------- */
.ic-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ic-money--negative { color: #B3261E; }
.ic-money--strong { font-weight: 700; }
.ic-blockers { display: flex; flex-direction: column; gap: 6px; }
.ic-blockers__title { font-weight: 700; }
.ic-blockers__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.ic-blockers__message { min-width: 0; overflow-wrap: anywhere; }
.ic-blockers__code { font-size: 11px; opacity: .8; }
.ic-pii { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ic-pii__label { color: #555555; }
.ic-pii__masked { letter-spacing: .12em; color: #6A6A6A; }
.ic-pii__error { color: #B3261E; font-size: 13px; }
.ic-stepup__title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.ic-stepup__message { margin: 8px 0 12px; }
.ic-approval-dialog__request { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0 0 12px; }
.ic-approval-dialog__request dt { color: #555555; }
.ic-approval-dialog__request dd { margin: 0; overflow-wrap: anywhere; }
.ic-approval-dialog__form { margin-top: 8px; }
.ic-approval-dialog__secret { letter-spacing: .2em; }
.ic-reason-dialog__prompt { margin-top: 0; }
.ic-reason-dialog__presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* Gap Tracking dialog (GapReportDialog.razor) */
.ic-gap-dialog__title { margin-bottom: 12px; }
.ic-gap-dialog__captured { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--ic-line); border-radius: 4px; font-size: 14px; }
.ic-gap-dialog__captured-title { font-weight: 600; margin-bottom: 4px; }
.ic-gap-dialog__captured ul { margin: 0 0 6px; padding-left: 20px; }
.ic-gap-dialog__page { font-family: Consolas, "Courier New", monospace; overflow-wrap: anywhere; }
.ic-gap-dialog__preview { display: block; max-width: 100%; max-height: 220px; margin: 4px 0 8px; border: 1px solid var(--ic-line); }
.ic-gap-dialog__warning { color: #8A4B00; }
.ic-gap-dialog__hint { margin: 6px 0 0; font-size: 13px; color: #555555; }
.ic-barcode { display: inline-block; max-width: 100%; line-height: 0; }
.ic-barcode svg { max-width: 100%; height: auto; }
.ic-barcode--invalid { line-height: 1.3; color: #B3261E; font-size: 12px; }

/* ---------- Printing (ARCHITECTURE 9.2.7; research 04 section 9) ---------- */
.ic-print-shell { box-sizing: border-box; min-height: 100vh; padding: 12px; background: #E6E6E6; }
.ic-print-toolbar { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.ic-print-btn {
  min-height: 44px; padding: 0 22px; border-radius: 6px; border: 1px solid #8A8A8A; background: #FFFFFF;
  font: 600 15px system-ui, sans-serif; cursor: pointer;
}
.ic-print-btn--primary { background: #538135; border-color: #538135; color: #FFFFFF; }
.ic-print-document { box-sizing: border-box; max-width: 100%; margin: 0 auto; background: #FFFFFF; color: #000000; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.ic-receipt {
  width: 72mm; padding: 3mm 0; font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.3;
}
.ic-receipt svg { max-width: 100%; height: auto; }
.ic-letter { width: 8.5in; padding: 0.5in; font: 11pt/1.4 system-ui, "Segoe UI", Arial, sans-serif; }
.ic-print-bare { width: auto; }
.ic-print-reprint { margin-bottom: 2mm; padding: 1mm 0; border: 2px solid #000000; text-align: center; font-weight: 800; letter-spacing: .3em; }

@media print {
  html, body { background: #FFFFFF !important; }
  .ic-no-print, .mud-appbar, .mud-drawer, .ic-bottom-bar, #blazor-error-ui, #components-reconnect-modal { display: none !important; }
  .ic-print-shell { min-height: 0; padding: 0; background: #FFFFFF; }
  .ic-print-document { margin: 0; box-shadow: none; }
  .ic-receipt { padding: 0; }
  .ic-letter { width: auto; padding: 0; }
}

/* ---------- Reconnect modal (.NET 10 pattern) and error bar ---------- */
#components-reconnect-modal {
  box-sizing: border-box; width: min(420px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3); text-align: center; color: #1C1C1C;
}
#components-reconnect-modal::backdrop { background: rgba(0, 0, 0, .45); }
.ic-reconnect__title { margin: 8px 0; font-weight: 700; font-size: 17px; }
.ic-reconnect__note { margin: 12px 0 0; font-size: 13px; color: #555555; }
.ic-reconnect__button {
  min-height: 44px; margin-top: 8px; padding: 0 22px; border-radius: 6px; border: 0; background: #538135; color: #FFFFFF;
  font: 700 15px system-ui, sans-serif; cursor: pointer;
}
.components-reconnect-first-attempt-visible, .components-reconnect-repeated-attempt-visible, .components-reconnect-failed-visible,
.components-pause-visible, .components-resume-failed-visible, .components-rejoining-animation { display: none; }
#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible { display: block; }
#components-reconnect-modal button.components-reconnect-failed-visible,
#components-reconnect-modal button.components-pause-visible,
#components-reconnect-modal button.components-resume-failed-visible { margin-left: auto; margin-right: auto; }
.components-rejoining-animation { position: relative; width: 56px; height: 56px; margin: 0 auto 8px; }
.components-rejoining-animation div {
  position: absolute; border: 3px solid #538135; border-radius: 50%; opacity: 1; animation: ic-rejoin 1.5s cubic-bezier(0, .2, .8, 1) infinite;
}
.components-rejoining-animation div:nth-child(2) { animation-delay: -.5s; }
@keyframes ic-rejoin {
  0% { top: 25px; left: 25px; width: 0; height: 0; opacity: 0; }
  5% { top: 25px; left: 25px; width: 0; height: 0; opacity: 1; }
  100% { top: 0; left: 0; width: 50px; height: 50px; opacity: 0; }
}
#blazor-error-ui {
  box-sizing: border-box; display: none; position: fixed; left: 0; bottom: 0; width: 100%; z-index: 2000;
  padding: .6rem 2.5rem .7rem 1.25rem; background: #FFF8C5; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
}
#blazor-error-ui .dismiss { position: absolute; right: .75rem; top: .5rem; cursor: pointer; }

/* ---------- Medium and below (< 960 px): drawer slides in; fold the lights ---------- */
@media (max-width: 959.98px) {
  .ic-lights__all { display: none; }
  .ic-lights__label { display: none; }
  .ic-lights__button { width: 44px; height: 44px; margin: 0; padding: 0; border: 0; }
  .ic-appbar__name { display: none; }
}

/* ---------- Large and below (< 1280 px): provisional badge as an icon ---------- */
@media (max-width: 1279.98px) {
  .ic-provisional__text { display: none; }
  .ic-provisional { padding: 4px; border-radius: 50%; }
}

/* ---------- Phones (< 600 px): bottom bar, tighter page ---------- */
@media (max-width: 599.98px) {
  .ic-page { padding: 12px 12px calc(76px + env(safe-area-inset-bottom, 0px)); }
  .ic-dashboard { gap: 22px; padding: 4px 0 12px; }
  .ic-dashboard__title { font-size: 40px; }
  .ic-dashboard .ic-tile--lead .ic-tile__count { font-size: 60px; }
  .ic-appbar .mud-toolbar { gap: 2px; padding: 0 2px; }
  .ic-appbar__brand { display: none; }
  .ic-customer-form__grid { grid-template-columns: minmax(0, 1fr); }
  .ic-bottom-bar {
    box-sizing: border-box; display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    height: calc(60px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--ic-surface); border-top: 1px solid var(--ic-line); box-shadow: 0 -2px 6px rgba(0, 0, 0, .08);
  }
  .ic-bottom-bar__item {
    flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: #4A4A4A; text-decoration: none; font-size: 11px;
  }
  .ic-bottom-bar__item--active { color: #538135; font-weight: 700; }
  .ic-bottom-bar__icon { position: relative; display: inline-flex; }
  .ic-bottom-bar__badge {
    position: absolute; top: -4px; right: -10px; min-width: 16px; padding: 0 4px; border-radius: 8px;
    background: #B3261E; color: #FFFFFF; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  }
  .ic-bottom-bar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ic-letter { padding: 0.25in; }
}
