/*
 * Object360 Field visual layer.
 * The field application keeps the original DOM and JavaScript contracts;
 * this stylesheet only aligns the mobile workbench with the main Object360 UI.
 */

.field-theme {
  color-scheme: dark;
  --field-bg: #060913;
  --field-bg-deep: #040610;
  --field-surface: rgba(12, 17, 31, .92);
  --field-surface-strong: #101627;
  --field-surface-raised: #151c30;
  --field-surface-soft: rgba(19, 25, 43, .78);
  --field-line: rgba(151, 161, 196, .15);
  --field-line-strong: rgba(154, 166, 203, .27);
  --field-text: #f4f5fb;
  --field-muted: #949db1;
  --field-muted-2: #70798e;
  --field-violet: #8067ff;
  --field-violet-bright: #a693ff;
  --field-blue: #4c86ff;
  --field-cyan: #42c9e9;
  --field-green: #4dd591;
  --field-amber: #f3ab3d;
  --field-red: #ff5f72;
  --field-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --field-shadow-soft: 0 14px 36px rgba(0, 0, 0, .22);
  --field-radius: 18px;
  --field-radius-sm: 12px;

  --ink: var(--field-text);
  --muted: var(--field-muted);
  --line: var(--field-line);
  --surface: var(--field-surface);
  --canvas: var(--field-bg);
  --navy: var(--field-violet);
  --navy-2: var(--field-violet-bright);
  --mint: var(--field-green);
  --mint-soft: rgba(77, 213, 145, .12);
  --amber: var(--field-amber);
  --amber-soft: rgba(243, 171, 61, .12);
  --red: var(--field-red);
  --red-soft: rgba(255, 95, 114, .12);
  --blue-soft: rgba(76, 134, 255, .12);
  --radius: var(--field-radius);

  min-width: 300px;
  min-height: 100vh;
  color: var(--field-text);
  background:
    radial-gradient(circle at 88% -6%, rgba(100, 70, 233, .18), transparent 22rem),
    radial-gradient(circle at -12% 68%, rgba(43, 92, 184, .12), transparent 27rem),
    var(--field-bg);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.field-theme::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 137, 178, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 137, 178, .025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  content: "";
}

.field-theme *,
.field-theme *::before,
.field-theme *::after {
  box-sizing: border-box;
}

.field-theme button,
.field-theme input,
.field-theme textarea,
.field-theme select {
  font: inherit;
}

.field-theme button {
  min-height: 44px;
}

.field-theme button,
.field-theme a,
.field-theme select {
  -webkit-tap-highlight-color: transparent;
}

.field-theme button:not(:disabled),
.field-theme a,
.field-theme select,
.field-theme summary {
  cursor: pointer;
}

.field-theme button:focus-visible,
.field-theme input:focus-visible,
.field-theme textarea:focus-visible,
.field-theme select:focus-visible,
.field-theme summary:focus-visible,
.field-theme a:focus-visible {
  outline: 2px solid var(--field-violet-bright);
  outline-offset: 3px;
}

.field-theme ::selection {
  color: #fff;
  background: rgba(128, 103, 255, .55);
}

.field-theme ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.field-theme ::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(130, 140, 168, .3);
  background-clip: padding-box;
}

.field-theme .shell {
  min-height: 100dvh;
}

/* Header */
.field-theme .topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: calc(60px + env(safe-area-inset-top));
  padding:
    max(8px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    8px
    max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--field-line);
  color: var(--field-text);
  background: rgba(7, 10, 20, .88);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .2);
  backdrop-filter: blur(24px) saturate(130%);
}

.field-theme .topbar::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(128, 103, 255, .38), transparent);
  content: "";
}

.field-theme .brandmark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(139, 132, 255, .16);
  border-radius: 12px;
  box-shadow:
    0 10px 26px rgba(27, 51, 166, .26),
    0 0 20px rgba(103, 76, 255, .12);
  object-fit: cover;
}

.field-theme .brandcopy {
  gap: 2px;
}

.field-theme .brandcopy strong {
  color: var(--field-text);
  font-size: 15px;
  font-weight: 780;
  letter-spacing: -.04em;
}

.field-theme .field-wordmark {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.field-theme .field-wordmark > span {
  color: var(--field-text);
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -.045em;
  text-shadow: 0 6px 18px rgba(0, 0, 0, .32);
}

.field-theme .field-wordmark b {
  margin-left: .11em;
  background: linear-gradient(118deg, #b4a8ff 8%, #7d6bff 52%, #66c6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--field-violet-bright);
  font-weight: 820;
  -webkit-text-fill-color: transparent;
}

.field-theme .field-wordmark > span::after {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 0 8px 2px;
  border: 1px solid #79c9ff;
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(85, 184, 255, .68);
  content: "";
}

.field-theme .field-wordmark em {
  color: var(--field-muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 820;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.field-theme .brandcopy > span {
  color: var(--field-muted-2);
  font-size: 10.5px;
}

.field-theme .connection-chip {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  color: var(--field-muted);
  background: rgba(19, 25, 43, .82);
  box-shadow: inset 0 1px rgba(255, 255, 255, .03);
  transition: border-color .2s, color .2s, background .2s;
}

.field-theme .field-topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.field-theme .field-create-button {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .38);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #7f62ff, #6040df);
  box-shadow: 0 10px 26px rgba(83, 53, 218, .28), inset 0 1px rgba(255, 255, 255, .18);
}

.field-theme .field-create-button:hover,
.field-theme .field-create-button[aria-expanded="true"] {
  border-color: rgba(183, 170, 255, .72);
  background: linear-gradient(145deg, #9077ff, #6f4af0);
}

.field-theme .field-create-button .ph-icon {
  width: 22px;
  height: 22px;
}

.field-theme .field-notification-button {
  position: relative;
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  color: var(--field-muted);
  background: rgba(19, 25, 43, .82);
  box-shadow: inset 0 1px rgba(255, 255, 255, .03);
  transition: border-color .2s, color .2s, background .2s, box-shadow .2s;
}

.field-theme .field-notification-button:hover,
.field-theme .field-notification-button[aria-expanded="true"] {
  border-color: rgba(128, 103, 255, .42);
  color: var(--field-text);
  background: rgba(27, 34, 57, .94);
}

.field-theme .field-notification-button.has-unread {
  border-color: rgba(148, 126, 255, .52);
  color: #cfc5ff;
  box-shadow: 0 0 18px rgba(111, 78, 255, .18), inset 0 1px rgba(255, 255, 255, .06);
}

.field-theme .field-notification-button .ph-icon {
  width: 21px;
  height: 21px;
}

.field-theme .field-notification-button b {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  min-height: 18px;
  display: grid;
  place-items: center;
  padding: 2px 4px;
  border: 2px solid #080c18;
  border-radius: 999px;
  color: #fff;
  background: var(--field-red);
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
}

.field-theme .connection-chip:hover {
  border-color: rgba(128, 103, 255, .42);
  color: var(--field-text);
  background: rgba(27, 34, 57, .94);
}

.field-theme .connection-dot {
  width: 8px;
  height: 8px;
  background: var(--field-amber);
  box-shadow: 0 0 0 3px rgba(243, 171, 61, .11), 0 0 11px rgba(243, 171, 61, .34);
}

.field-theme .connection-chip.online .connection-dot {
  background: var(--field-green);
  box-shadow: 0 0 0 3px rgba(77, 213, 145, .1), 0 0 12px rgba(77, 213, 145, .38);
}

.field-theme .connection-chip b,
.field-theme .bottom-nav b {
  color: #fff;
  background: var(--field-red);
}

/* Authentication */
.field-theme .auth-view {
  position: relative;
  min-height: calc(100dvh - 70px - env(safe-area-inset-top));
  overflow: hidden;
  padding:
    clamp(24px, 6vh, 58px)
    max(16px, env(safe-area-inset-right))
    max(30px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background:
    linear-gradient(180deg, rgba(6, 9, 19, .58), rgba(6, 9, 19, .96)),
    url("/assets/object360-building.png") 46% 0 / 830px auto no-repeat;
}

.field-theme .auth-view::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 12%, rgba(129, 96, 255, .14), transparent 19rem),
    linear-gradient(180deg, transparent 20%, var(--field-bg) 92%);
  content: "";
}

.field-theme .auth-card {
  position: relative;
  width: min(100%, 430px);
  padding: 26px 22px 23px;
  border: 1px solid var(--field-line-strong);
  border-radius: 24px;
  color: var(--field-text);
  background: linear-gradient(155deg, rgba(18, 24, 42, .95), rgba(9, 13, 25, .96));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .46), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(24px);
}

.field-theme .auth-card::before {
  position: absolute;
  top: -1px;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 147, 255, .7), transparent);
  content: "";
}

.field-theme .auth-icon {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(139, 132, 255, .18);
  border-radius: 20px;
  box-shadow:
    0 16px 38px rgba(27, 51, 166, .28),
    0 0 26px rgba(103, 76, 255, .13);
  object-fit: cover;
}

.field-theme .eyebrow {
  color: var(--field-violet-bright);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .15em;
}

.field-theme .auth-card h1 {
  margin: 9px 0 11px;
  color: var(--field-text);
  font-size: clamp(28px, 8vw, 37px);
  line-height: 1.03;
  letter-spacing: -.05em;
}

.field-theme .auth-card > p:not(.eyebrow, .form-error) {
  color: var(--field-muted);
  font-size: 13px;
  line-height: 1.62;
}

.field-theme .auth-card small {
  margin-top: 18px;
  color: var(--field-muted-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.field-theme .auth-tabs {
  gap: 4px;
  margin-top: 21px;
  padding: 4px;
  border: 1px solid var(--field-line);
  border-radius: 13px;
  background: rgba(5, 8, 17, .72);
}

.field-theme .auth-tabs button {
  min-height: 44px;
  border-radius: 9px;
  color: var(--field-muted);
  font-size: 12px;
  transition: color .2s, background .2s, box-shadow .2s;
}

.field-theme .auth-tabs button.active {
  color: #dbd4ff;
  background: rgba(126, 96, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(129, 103, 255, .23);
}

.field-theme .auth-form {
  gap: 9px;
  margin-top: 17px;
}

.field-theme .auth-form label {
  color: #c4c9d8;
  font-size: 11.5px;
}

.field-theme .auth-hint {
  border-color: rgba(243, 171, 61, .26);
  color: #f5c97b;
  background: rgba(243, 171, 61, .08);
}

/* Form controls and actions */
.field-theme label {
  color: #c4c9d8;
  font-size: 12px;
  font-weight: 650;
}

.field-theme input,
.field-theme textarea,
.field-theme select {
  min-height: 46px;
  border: 1px solid var(--field-line-strong);
  border-radius: 11px;
  color: var(--field-text);
  background: rgba(8, 12, 23, .82);
  box-shadow: inset 0 1px rgba(255, 255, 255, .018);
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.field-theme input::placeholder,
.field-theme textarea::placeholder {
  color: #616b80;
}

.field-theme input:focus,
.field-theme textarea:focus,
.field-theme select:focus {
  border-color: rgba(128, 103, 255, .72);
  background: rgba(13, 18, 34, .98);
  box-shadow: 0 0 0 3px rgba(128, 103, 255, .11);
}

.field-theme select {
  color-scheme: dark;
}

.field-theme textarea {
  line-height: 1.48;
}

.field-theme .primary,
.field-theme .secondary,
.field-theme .danger,
.field-theme .file-button {
  min-height: 44px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: .005em;
  transition: border-color .2s, background .2s, color .2s, transform .18s, box-shadow .2s;
}

.field-theme .primary {
  border-color: rgba(129, 103, 255, .66);
  color: #fff;
  background: linear-gradient(135deg, #7556ef, #5a37d8);
  box-shadow: 0 10px 24px rgba(80, 48, 201, .22), inset 0 1px rgba(255, 255, 255, .16);
}

.field-theme .primary:hover {
  border-color: rgba(166, 147, 255, .85);
  background: linear-gradient(135deg, #876cff, #6846e9);
  box-shadow: 0 13px 30px rgba(80, 48, 201, .34);
}

.field-theme .secondary,
.field-theme .file-button {
  border-color: var(--field-line-strong);
  color: #d8dbea;
  background: rgba(19, 25, 43, .76);
}

.field-theme .secondary:hover,
.field-theme .file-button:hover {
  border-color: rgba(128, 103, 255, .46);
  color: #fff;
  background: rgba(31, 36, 62, .94);
}

.field-theme .danger {
  border-color: rgba(255, 95, 114, .33);
  color: #ff9ba7;
  background: rgba(255, 95, 114, .1);
}

.field-theme .danger:hover {
  border-color: rgba(255, 95, 114, .55);
  background: rgba(255, 95, 114, .16);
}

.field-theme .primary:active,
.field-theme .secondary:active,
.field-theme .danger:active,
.field-theme .file-button:active,
.field-theme .icon-button:active {
  transform: translateY(1px);
}

.field-theme .large {
  min-height: 52px;
  border-radius: 13px;
  font-size: 14px;
}

.field-theme .compact {
  min-height: 44px;
  font-size: 11px;
}

.field-theme .icon-button {
  width: 44px;
  height: 44px;
  border-color: var(--field-line-strong);
  border-radius: 11px;
  color: var(--field-violet-bright);
  background: rgba(19, 25, 43, .76);
  font-size: 21px;
  transition: border-color .2s, background .2s, transform .18s;
}

.field-theme .icon-button:hover {
  border-color: rgba(128, 103, 255, .48);
  background: rgba(31, 36, 62, .94);
}

.field-theme .text-button {
  min-height: 44px;
  padding: 8px 0;
  color: var(--field-violet-bright);
  font-size: 12px;
}

.field-theme .text-button:hover {
  color: #c3b9ff;
}

/* Main workspace */
.field-theme main {
  width: min(100%, 1060px);
  min-height: calc(100dvh - 70px);
  margin: 0 auto;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

.field-theme .project-strip {
  position: sticky;
  z-index: 25;
  top: calc(60px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 7px max(14px, env(safe-area-inset-right)) 7px max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--field-line);
  background: rgba(7, 10, 20, .84);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  backdrop-filter: blur(22px);
}

.field-theme .project-strip label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.field-theme .project-strip select {
  min-width: 0;
  min-height: 42px;
  padding: 7px 36px 7px 12px;
  color: var(--field-text);
  font-size: 16px;
}

.field-theme .ownership-context {
  /* The organization is already selected directly above. Keep the legacy
     target in the DOM for app.js, but do not render a duplicate info card. */
  display: none !important;
}

.field-theme .view {
  padding: 12px max(14px, env(safe-area-inset-right)) 28px max(14px, env(safe-area-inset-left));
}

.field-theme .section-heading {
  align-items: center;
  margin: 4px 0 16px;
}

.field-theme .section-heading h1 {
  margin-top: 5px;
  color: var(--field-text);
  font-size: clamp(25px, 7vw, 31px);
  font-weight: 740;
  letter-spacing: -.045em;
}

.field-theme .section-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.field-theme .section-heading-actions .primary {
  min-height: 38px;
  padding-inline: 13px;
  white-space: nowrap;
}

.field-theme .count-pill {
  min-width: 40px;
  padding: 7px 11px;
  border: 1px solid rgba(128, 103, 255, .25);
  color: #d8d0ff;
  background: rgba(128, 103, 255, .13);
  font-size: 12px;
}

.field-theme .room-card,
.field-theme .scanner-card,
.field-theme .today-card,
.field-theme .notice,
.field-theme .sync-hero,
.field-theme .metric-grid,
.field-theme .admin-panel,
.field-theme .progress-panel,
.field-theme .printer-panel {
  border: 1px solid var(--field-line);
  border-radius: var(--field-radius);
  color: var(--field-text);
  background: linear-gradient(150deg, rgba(15, 21, 37, .94), rgba(10, 14, 27, .92));
  box-shadow: var(--field-shadow-soft), inset 0 1px rgba(255, 255, 255, .022);
}

.field-theme .room-card {
  position: relative;
  padding: 15px;
}

.field-theme .room-card::before {
  position: absolute;
  top: 0;
  left: 17px;
  width: 52px;
  height: 1px;
  background: var(--field-violet);
  box-shadow: 0 0 14px rgba(128, 103, 255, .62);
  content: "";
}

.field-theme .room-card > label {
  margin-bottom: 9px;
  color: var(--field-text);
  font-size: 12px;
}

.field-theme .room-card > span {
  margin-top: 9px;
  color: var(--field-muted-2);
  font-size: 10.5px;
  line-height: 1.48;
}

.field-theme .room-row {
  gap: 8px;
}

/* Scanner */
.field-theme .scan-result {
  min-height: 80px;
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid var(--field-line);
  border-radius: 15px;
  color: var(--field-text);
  background: rgba(13, 18, 32, .84);
}

.field-theme .scan-result .result-icon {
  flex-basis: 46px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--field-line-strong);
  border-radius: 13px;
  color: #d6d9e7;
  background: rgba(112, 121, 142, .14);
  font-size: 11px;
}

.field-theme .scan-result strong {
  color: var(--field-text);
  font-size: 13px;
}

.field-theme .scan-result span {
  color: var(--field-muted);
  font-size: 11px;
}

.field-theme .scan-result.success {
  border-color: rgba(77, 213, 145, .28);
  background: linear-gradient(135deg, rgba(77, 213, 145, .105), rgba(13, 18, 32, .88));
}

.field-theme .scan-result.success .result-icon {
  border-color: rgba(77, 213, 145, .36);
  color: #90ecc0;
  background: rgba(77, 213, 145, .14);
}

.field-theme .scan-result.warning {
  border-color: rgba(243, 171, 61, .3);
  background: linear-gradient(135deg, rgba(243, 171, 61, .1), rgba(13, 18, 32, .88));
}

.field-theme .scan-result.warning .result-icon {
  border-color: rgba(243, 171, 61, .38);
  color: #f6c66f;
  background: rgba(243, 171, 61, .14);
}

.field-theme .scan-result.error {
  border-color: rgba(255, 95, 114, .32);
  background: linear-gradient(135deg, rgba(255, 95, 114, .1), rgba(13, 18, 32, .88));
}

.field-theme .scan-result.error .result-icon {
  border-color: rgba(255, 95, 114, .4);
  color: #ff9aa6;
  background: rgba(255, 95, 114, .14);
}

.field-theme .scanner-card {
  overflow: hidden;
  padding: 14px;
}

.field-theme .camera-frame {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--field-line-strong);
  border-radius: 16px;
  background:
    radial-gradient(circle at center, rgba(91, 74, 178, .12), transparent 45%),
    #03050b;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .44);
}

.field-theme .camera-guide {
  border-color: rgba(255, 255, 255, .66);
  box-shadow: 0 0 0 999px rgba(2, 4, 10, .5);
}

.field-theme .camera-guide::before,
.field-theme .camera-guide::after,
.field-theme .camera-guide span::before,
.field-theme .camera-guide span::after {
  border-color: var(--field-violet-bright);
  filter: drop-shadow(0 0 7px rgba(128, 103, 255, .62));
}

.field-theme .scan-button {
  position: relative;
  min-height: 64px;
  overflow: hidden;
  border: 1px solid rgba(129, 103, 255, .68);
  border-radius: 15px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 0, rgba(255, 255, 255, .18), transparent 38%),
    linear-gradient(135deg, #7556ef, #4f31c7);
  box-shadow: 0 14px 34px rgba(78, 45, 196, .28), inset 0 1px rgba(255, 255, 255, .16);
  font-size: 15px;
  letter-spacing: -.01em;
  transition: transform .18s, box-shadow .2s, border-color .2s;
}

.field-theme .scan-button:hover {
  border-color: rgba(183, 168, 255, .9);
  box-shadow: 0 17px 39px rgba(78, 45, 196, .37), inset 0 1px rgba(255, 255, 255, .2);
}

.field-theme .scan-button:active {
  transform: translateY(1px);
}

.field-theme .scan-button .ph-icon {
  width: 23px;
  height: 23px;
}

.field-theme .divider {
  color: var(--field-muted-2);
}

.field-theme .divider::before,
.field-theme .divider::after {
  background: var(--field-line);
}

.field-theme .add-found-button {
  border-color: rgba(128, 103, 255, .26);
  color: #b7acff;
  background: rgba(128, 103, 255, .055);
}

.field-theme .today-card {
  min-height: 74px;
  margin-top: 12px;
  padding: 13px 15px;
}

.field-theme .today-card span {
  color: var(--field-muted-2);
  font-size: 10px;
  letter-spacing: .025em;
}

.field-theme .today-card strong {
  color: var(--field-text);
  font-size: 16px;
}

/* Primary tagging workspace */
.field-theme .view.active[data-view="scan"] {
  display: block;
}

.field-theme .primary-marking-workspace {
  display: grid;
  width: min(100%, 760px);
  gap: 10px;
  margin: 0 auto;
  padding-bottom: 8px;
}

.field-theme .primary-marking-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 2px 2px;
}

.field-theme .primary-marking-heading {
  min-width: 0;
}

.field-theme .primary-marking-heading h1 {
  margin: 0;
  color: var(--field-text);
  font-size: clamp(20px, 5.6vw, 25px);
  font-weight: 740;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.field-theme .primary-marking-room-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  overflow-wrap: anywhere;
  color: var(--field-muted);
  font-size: 12px;
  line-height: 1.4;
}

.field-theme .primary-marking-quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.field-theme .primary-marking-heading .eyebrow {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.field-theme .primary-marking-scan-action,
.field-theme .primary-marking-add-button {
  min-width: 0;
  min-height: 58px;
  border-radius: 15px;
}

.field-theme .primary-marking-scan-action {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 14px 8px 9px;
  border: 1px solid rgba(159, 141, 255, .68);
  color: #fff;
  background:
    radial-gradient(circle at 18% 0, rgba(255, 255, 255, .18), transparent 42%),
    linear-gradient(135deg, #7556ef, #5332c9);
  box-shadow: 0 13px 28px rgba(65, 39, 171, .25), inset 0 1px rgba(255, 255, 255, .15);
  text-align: left;
}

.field-theme .primary-marking-scan-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
}

.field-theme .primary-marking-scan-icon .ph-icon {
  width: 23px;
  height: 23px;
}

.field-theme .primary-marking-action-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.field-theme .primary-marking-action-copy strong,
.field-theme .primary-marking-action-copy small {
  overflow-wrap: anywhere;
}

.field-theme .primary-marking-action-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.field-theme .primary-marking-action-copy small {
  color: rgba(239, 236, 255, .72);
  font-size: 10px;
  line-height: 1.3;
}

.field-theme .primary-marking-add-button {
  display: grid;
  min-width: 74px;
  padding: 7px 10px;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--field-line-strong);
  color: #dcd6ff;
  background: rgba(17, 23, 40, .9);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

.field-theme .primary-marking-add-button .ph-icon {
  width: 21px;
  height: 21px;
}

.field-theme .primary-marking-add-button > span {
  font-size: 9.5px;
  font-weight: 720;
}

.field-theme .primary-marking-add-button:hover {
  border-color: rgba(128, 103, 255, .5);
  color: #fff;
  background: rgba(128, 103, 255, .12);
}

.field-theme .primary-marking-icon-button {
  position: relative;
  display: grid;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--field-line-strong);
  border-radius: 14px;
  color: #d9d3ff;
  background: rgba(15, 21, 38, .9);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
  transition: border-color .18s, color .18s, background .18s, transform .18s;
}

.field-theme .primary-marking-icon-button:hover {
  border-color: rgba(128, 103, 255, .55);
  color: #fff;
  background: rgba(128, 103, 255, .13);
}

.field-theme .primary-marking-icon-button:active {
  transform: translateY(1px);
}

.field-theme .primary-marking-icon-button .ph-icon {
  width: 22px;
  height: 22px;
}

.field-theme .primary-marking-icon-button.primary-marking-add-button {
  border-color: rgba(159, 141, 255, .72);
  color: #fff;
  background:
    radial-gradient(circle at 28% 0, rgba(255, 255, 255, .2), transparent 42%),
    linear-gradient(135deg, #8067ff, #5a39d2);
  box-shadow: 0 12px 28px rgba(74, 47, 190, .26), inset 0 1px rgba(255, 255, 255, .16);
}

.field-theme .primary-marking-icon-button.primary-marking-add-button:hover {
  border-color: rgba(210, 200, 255, .92);
  background:
    radial-gradient(circle at 28% 0, rgba(255, 255, 255, .25), transparent 42%),
    linear-gradient(135deg, #8b74ff, #6847e2);
}

.field-theme .primary-marking-action-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  min-width: 19px;
  min-height: 19px;
  padding: 2px 5px;
  place-items: center;
  border: 2px solid var(--field-bg);
  border-radius: 999px;
  color: #fff;
  background: var(--field-violet);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.field-theme .primary-marking-overview,
.field-theme .primary-marking-list-section {
  overflow: hidden;
  border: 1px solid var(--field-line);
  border-radius: 17px;
  background: linear-gradient(150deg, rgba(15, 21, 37, .94), rgba(10, 14, 27, .92));
  box-shadow: var(--field-shadow-soft), inset 0 1px rgba(255, 255, 255, .022);
}

.field-theme .primary-marking-room-picker {
  min-width: 0;
}

.field-theme .primary-marking-location-trigger {
  min-height: 56px;
}

.field-theme .primary-marking-room-picker > summary {
  position: relative;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 42px 12px 14px;
  list-style: none;
}

.field-theme .primary-marking-room-picker > summary::-webkit-details-marker {
  display: none;
}

.field-theme .primary-marking-room-picker > summary::after {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--field-muted);
  border-bottom: 2px solid var(--field-muted);
  transform: translateY(-66%) rotate(45deg);
  transition: transform .18s, border-color .18s;
  content: "";
}

.field-theme .primary-marking-room-picker[open] > summary::after {
  border-color: var(--field-violet-bright);
  transform: translateY(-28%) rotate(225deg);
}

.field-theme .primary-marking-room-picker > summary span,
.field-theme .primary-marking-room-picker > summary strong {
  overflow-wrap: anywhere;
}

.field-theme .primary-marking-room-picker > summary span {
  color: var(--field-muted);
  font-size: 11px;
}

.field-theme .primary-marking-room-picker > summary strong {
  color: var(--field-text);
  font-size: 12px;
  text-align: right;
}

.field-theme .primary-marking-room-picker[open] > summary {
  border-bottom: 1px solid var(--field-line);
}

.field-theme .primary-marking-room-controls {
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: rgba(6, 9, 19, .26);
  box-shadow: none;
}

.field-theme .primary-marking-room-controls::before {
  display: none;
}

.field-theme .primary-marking-overview {
  padding: 11px 12px;
}

.field-theme .primary-marking-progress-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field-theme .primary-marking-progress-copy span {
  color: var(--field-muted);
  font-size: 11px;
}

.field-theme .primary-marking-progress-copy strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--field-text);
  font-size: 12px;
  text-align: right;
}

.field-theme .primary-marking-progress-track {
  height: 5px;
  margin: 8px 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(118, 128, 157, .15);
}

.field-theme .primary-marking-progress-track span {
  display: block;
  width: var(--primary-marking-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--field-violet), var(--field-blue));
  box-shadow: 0 0 12px rgba(128, 103, 255, .42);
  transition: width .24s ease-out;
}

.field-theme .primary-marking-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.field-theme .primary-marking-counters > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 7px 9px;
  border: 1px solid var(--field-line);
  border-radius: 13px;
  background: rgba(7, 11, 21, .48);
}

.field-theme .primary-marking-counters span {
  overflow-wrap: anywhere;
  color: var(--field-muted-2);
  font-size: 10px;
  line-height: 1.25;
}

.field-theme .primary-marking-counters strong {
  color: var(--field-text);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.field-theme .primary-marking-counters .ready strong {
  color: #87eab7;
}

.field-theme .primary-marking-counters .review strong {
  color: #f5c36c;
}

.field-theme .primary-marking-section-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--field-line);
}

.field-theme .primary-marking-section-heading > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.field-theme .primary-marking-section-heading h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--field-text);
  font-size: 15px;
  line-height: 1.25;
}

.field-theme .primary-marking-section-heading span,
.field-theme .primary-marking-section-heading #deviceFoundCount {
  overflow-wrap: anywhere;
  color: var(--field-muted);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.4;
}

.field-theme .primary-marking-section-heading .text-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 0;
  white-space: nowrap;
}

.field-theme .primary-marking-list {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.field-theme .primary-marking-list > .empty-state {
  min-height: 60px;
  padding: 12px 14px;
  border-radius: 12px;
}

.field-theme .primary-marking-item {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--field-line);
  border-radius: 13px;
  color: var(--field-text);
  background: rgba(8, 12, 23, .64);
  text-align: left;
}

.field-theme button.primary-marking-item {
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}

.field-theme button.primary-marking-item:hover {
  border-color: rgba(128, 103, 255, .44);
  background: rgba(18, 23, 41, .82);
}

.field-theme button.primary-marking-item:active {
  transform: translateY(1px);
}

.field-theme .primary-marking-item.finding {
  border-color: rgba(243, 171, 61, .22);
}

.field-theme .primary-marking-item-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.field-theme .primary-marking-item-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.field-theme .primary-marking-item-copy strong,
.field-theme .primary-marking-item-copy > span {
  overflow-wrap: anywhere;
}

.field-theme .primary-marking-item-copy strong {
  color: var(--field-text);
  font-size: 12px;
  line-height: 1.35;
}

.field-theme .primary-marking-item-copy > span {
  color: var(--field-muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.field-theme .primary-marking-item-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--field-muted-2);
  font-size: 9.5px;
  line-height: 1.35;
}

.field-theme .primary-marking-item-status {
  display: inline-flex;
  min-width: 0;
  min-height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  color: var(--field-muted);
  background: rgba(116, 126, 154, .1);
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}

.field-theme .primary-marking-item-status.ready {
  border-color: rgba(77, 213, 145, .28);
  color: #8fe9bb;
  background: rgba(77, 213, 145, .1);
}

.field-theme .primary-marking-item-status.review {
  border-color: rgba(243, 171, 61, .3);
  color: #f5c36c;
  background: rgba(243, 171, 61, .1);
}

.field-theme .primary-marking-item-status.danger {
  border-color: rgba(255, 95, 114, .32);
  color: #ff9aa7;
  background: rgba(255, 95, 114, .1);
}

.field-theme .primary-marking-item-status.remaining {
  border-color: rgba(128, 103, 255, .27);
  color: #b8adff;
  background: rgba(128, 103, 255, .1);
}

.field-theme .primary-marking-empty-state {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px dashed var(--field-line-strong);
  border-radius: 13px;
  color: var(--field-muted);
  background: rgba(7, 10, 19, .36);
}

.field-theme .primary-marking-empty-state.compact {
  min-height: 66px;
}

.field-theme .primary-marking-empty-state > .ph-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: #9c8eff;
}

.field-theme .primary-marking-empty-state > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.field-theme .primary-marking-empty-state strong,
.field-theme .primary-marking-empty-state span {
  overflow-wrap: anywhere;
}

.field-theme .primary-marking-empty-state strong {
  color: var(--field-text);
  font-size: 12px;
}

.field-theme .primary-marking-empty-state span {
  font-size: 10.5px;
  line-height: 1.4;
}

/* QR scanner is an on-demand full-screen tool, not the main workspace. */
.field-theme .primary-marking-capture-sheet {
  position: fixed;
  z-index: 130;
  inset: 0;
  overflow-y: auto;
  padding:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  color: var(--field-text);
  background:
    radial-gradient(circle at 85% 0, rgba(100, 70, 233, .2), transparent 24rem),
    var(--field-bg-deep);
}

.field-theme .primary-marking-capture-header {
  position: sticky;
  z-index: 2;
  top: calc(-1 * max(14px, env(safe-area-inset-top)));
  display: flex;
  width: min(100%, 620px);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 12px;
  padding: 12px 0;
  background: rgba(4, 6, 16, .92);
  backdrop-filter: blur(18px);
}

.field-theme .primary-marking-capture-header h2 {
  margin: 3px 0 0;
  font-size: 22px;
  line-height: 1.15;
}

.field-theme .primary-marking-scanner-card {
  width: min(100%, 620px);
  margin: 0 auto;
  border-color: var(--field-line-strong);
  background: rgba(10, 14, 27, .92);
}

.field-theme .primary-marking-scanner-card .camera-frame {
  min-height: min(62dvh, 560px);
  aspect-ratio: 3 / 4;
}

.field-theme .primary-marking-scanner-card .scan-result {
  margin: 12px 0 0;
}

/* Field finding sheet */
.field-theme .inventory-finding-dialog {
  padding: 0;
  overflow: hidden;
}

.field-theme .inventory-finding-form {
  display: grid;
  max-height: calc(100dvh - 20px);
  gap: 15px;
  overflow-x: hidden;
  overflow-y: auto;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.field-theme .inventory-finding-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.field-theme .inventory-finding-header > div {
  min-width: 0;
}

.field-theme .inventory-finding-header h2 {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--field-text);
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.field-theme .inventory-finding-header p:last-child {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  color: var(--field-muted);
  font-size: 11px;
  line-height: 1.45;
}

.field-theme .inventory-finding-photo-control {
  display: block;
}

.field-theme .inventory-finding-photo-frame {
  position: relative;
  display: grid;
  min-height: 180px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed rgba(147, 133, 224, .42);
  border-radius: 16px;
  color: #b9aeff;
  background:
    radial-gradient(circle at 50% 20%, rgba(128, 103, 255, .13), transparent 48%),
    rgba(6, 9, 18, .56);
  cursor: pointer;
}

.field-theme .inventory-finding-photo-frame:hover {
  border-color: rgba(167, 150, 255, .7);
  background-color: rgba(15, 19, 35, .7);
}

.field-theme .inventory-finding-photo-placeholder {
  display: grid;
  max-width: 260px;
  gap: 5px;
  place-items: center;
  padding: 18px;
  text-align: center;
}

.field-theme .inventory-finding-photo-placeholder .ph-icon {
  width: 35px;
  height: 35px;
  margin-bottom: 4px;
}

.field-theme .inventory-finding-photo-placeholder strong {
  color: var(--field-text);
  font-size: 13px;
}

.field-theme .inventory-finding-photo-placeholder small {
  overflow-wrap: anywhere;
  color: var(--field-muted);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.4;
}

.field-theme #inventoryFindingPhotoPreview {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-theme #inventoryFindingPhotoPreview[hidden] {
  display: none;
}

.field-theme .inventory-finding-form > label,
.field-theme .inventory-finding-number-group > label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--field-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.field-theme .inventory-finding-form label > small {
  overflow-wrap: anywhere;
  color: var(--field-muted-2);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.field-theme .inventory-finding-form input:not([type="checkbox"]),
.field-theme .inventory-finding-form textarea {
  width: 100%;
  min-width: 0;
  font-size: 16px;
}

.field-theme .inventory-finding-form textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.45;
}

.field-theme .inventory-finding-number-group {
  display: grid;
  min-width: 0;
  gap: 10px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--field-line);
  border-radius: 15px;
  background: rgba(7, 10, 20, .42);
}

.field-theme .inventory-finding-number-group legend {
  padding: 0 6px;
  color: var(--field-muted);
  font-size: 11px;
  font-weight: 700;
}

.field-theme .inventory-finding-number-group .inventory-finding-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: rgba(15, 20, 35, .7);
}

.field-theme .inventory-finding-checkbox input {
  width: 22px;
  min-width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--field-violet);
}

.field-theme .inventory-finding-checkbox span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.field-theme .inventory-finding-checkbox strong,
.field-theme .inventory-finding-checkbox small {
  overflow-wrap: anywhere;
}

.field-theme .inventory-finding-checkbox strong {
  color: var(--field-text);
  font-size: 12px;
}

.field-theme .inventory-finding-checkbox small {
  color: var(--field-muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.field-theme .inventory-finding-candidate-section {
  display: grid;
  min-width: 0;
  gap: 9px;
  padding-top: 2px;
}

.field-theme .inventory-finding-candidate-section > div:first-child {
  display: grid;
  gap: 3px;
}

.field-theme .inventory-finding-candidate-section h3 {
  margin: 0;
  color: var(--field-text);
  font-size: 14px;
  line-height: 1.3;
}

.field-theme .inventory-finding-candidate-section > div:first-child span {
  overflow-wrap: anywhere;
  color: var(--field-muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.field-theme .inventory-finding-candidates {
  display: grid;
  gap: 8px;
}

.field-theme .inventory-finding-candidate {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--field-line);
  border-radius: 13px;
  background: rgba(14, 19, 34, .72);
}

.field-theme .inventory-finding-candidate-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.field-theme .inventory-finding-candidate-copy strong,
.field-theme .inventory-finding-candidate-copy span {
  overflow-wrap: anywhere;
}

.field-theme .inventory-finding-candidate-copy strong {
  color: var(--field-text);
  font-size: 12px;
  line-height: 1.35;
}

.field-theme .inventory-finding-candidate-copy span {
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.4;
}

.field-theme .inventory-finding-candidate-action {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 11px;
}

.field-theme .inventory-finding-candidates-empty {
  padding: 13px;
  border: 1px dashed var(--field-line-strong);
  border-radius: 13px;
  color: var(--field-muted);
  background: rgba(7, 10, 19, .4);
  font-size: 11px;
  line-height: 1.45;
}

.field-theme .inventory-finding-actions {
  position: sticky;
  z-index: 2;
  bottom: calc(-1 * max(18px, env(safe-area-inset-bottom)));
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, .7fr) minmax(0, 1.2fr);
  gap: 8px;
  margin: 2px -4px -4px;
  padding: 12px 4px 4px;
  border-top: 1px solid var(--field-line);
  background: linear-gradient(to bottom, rgba(9, 13, 25, .86), #090d19 26%);
}

.field-theme .inventory-finding-actions button {
  min-width: 0;
  min-height: 48px;
  padding: 9px 11px;
  white-space: normal;
  line-height: 1.25;
}

/* Search, filters and inventory rows */
.field-theme .search-box {
  min-height: 48px;
  border: 1px solid var(--field-line-strong);
  border-radius: 13px;
  color: var(--field-muted);
  background: rgba(10, 14, 26, .9);
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field-theme .search-box:focus-within {
  border-color: rgba(128, 103, 255, .7);
  background: rgba(13, 18, 34, .98);
  box-shadow: 0 0 0 3px rgba(128, 103, 255, .1);
}

.field-theme .search-box input {
  min-height: 46px;
  border: 0;
  color: var(--field-text);
  background: transparent;
  box-shadow: none;
}

.field-theme .search-box input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.field-theme .filter-row {
  gap: 7px;
  margin-top: 12px;
  margin-bottom: 13px;
}

.field-theme .filter {
  min-height: 44px;
  padding: 8px 13px;
  border-color: var(--field-line);
  color: var(--field-muted);
  background: rgba(15, 20, 35, .78);
}

.field-theme .filter:hover {
  border-color: rgba(128, 103, 255, .38);
  color: var(--field-text);
}

.field-theme .filter.active {
  border-color: rgba(128, 103, 255, .44);
  color: #dcd5ff;
  background: rgba(128, 103, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(128, 103, 255, .04);
}

.field-theme .inventory-status-filter-label {
  color: var(--field-muted-2);
}

.field-theme .inventory-status-filter-row {
  margin-top: 7px;
}

.field-theme .inventory-status-filter-row .filter b {
  background: rgba(255, 255, 255, .07);
}

.field-theme .inventory-status-filter-row .filter.found.active {
  border-color: rgba(75, 222, 157, .48);
  color: #91f1c0;
  background: rgba(33, 180, 111, .14);
}

.field-theme .inventory-status-filter-row .filter.unchecked.active {
  border-color: rgba(145, 153, 180, .4);
  color: #c2c8da;
  background: rgba(116, 126, 154, .13);
}

.field-theme .inventory-status-filter-row .filter.no-number.active,
.field-theme .inventory-status-filter-row .filter.discrepancy.active {
  border-color: rgba(255, 191, 71, .48);
  color: #ffd080;
  background: rgba(237, 158, 25, .14);
}

.field-theme .inventory-status-filter-row .filter.duplicate.active,
.field-theme .inventory-status-filter-row .filter.not-found.active {
  border-color: rgba(255, 104, 126, .48);
  color: #ff9caf;
  background: rgba(221, 65, 91, .14);
}

.field-theme .item-list,
.field-theme .label-item-list,
.field-theme .conflict-list {
  gap: 9px;
}

.field-theme .item-card {
  min-height: 88px;
  padding: 14px;
  border-color: var(--field-line);
  border-radius: 15px;
  color: var(--field-text);
  background: linear-gradient(145deg, rgba(16, 22, 39, .92), rgba(10, 14, 26, .9));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .14), inset 0 1px rgba(255, 255, 255, .02);
}

.field-theme .item-card:hover {
  border-color: rgba(128, 103, 255, .44);
  background: linear-gradient(145deg, rgba(21, 27, 49, .96), rgba(12, 17, 31, .93));
}

.field-theme .item-card.is-pending {
  border-color: rgba(243, 171, 61, .34);
}

.field-theme .item-card.is-pending .status-sync-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 5px;
  vertical-align: -2px;
  animation: rotate 1.3s linear infinite;
}

.field-theme .item-card.is-sync-error {
  border-color: rgba(255, 95, 114, .42);
}

.field-theme .item-sync-note {
  color: #f2c474;
}

.field-theme .item-card.is-sync-error .item-sync-note {
  color: #ff98a4;
}

.field-theme .list-section-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 13px;
  padding: 4px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  background: rgba(8, 11, 21, .84);
}

.field-theme .list-section-switch button {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--field-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 820;
}

.field-theme .list-section-switch button.active {
  color: #eeeaff;
  background: linear-gradient(135deg, rgba(128, 103, 255, .25), rgba(76, 134, 255, .14));
  box-shadow: inset 0 0 0 1px rgba(151, 135, 255, .24);
}

.field-theme .consumable-list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.field-theme .consumable-create-button {
  min-height: 48px;
  padding: 8px 13px;
  white-space: nowrap;
}

.field-theme .consumable-filter-row {
  align-items: center;
}

.field-theme .consumable-import-button {
  margin-left: auto;
  border-color: rgba(76, 134, 255, .3);
  color: #aac5ff;
}

.field-theme .consumable-offline-notice {
  margin-bottom: 11px;
}

.field-theme .consumable-list {
  display: grid;
  gap: 9px;
}

.field-theme .consumable-load-more {
  width: 100%;
  margin-top: 12px;
}

.field-theme .consumable-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--field-line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 22, 39, .94), rgba(9, 13, 25, .92));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .14), inset 0 1px rgba(255, 255, 255, .02);
}

.field-theme .consumable-card.low {
  border-color: rgba(243, 171, 61, .28);
}

.field-theme .consumable-card.zero {
  border-color: rgba(255, 95, 114, .3);
}

.field-theme .consumable-card-main {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.field-theme .consumable-card-main strong,
.field-theme .consumable-card-main span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-theme .consumable-card-main strong {
  color: var(--field-text);
  font-size: 14px;
  line-height: 1.3;
}

.field-theme .consumable-card-main span {
  color: var(--field-muted-2);
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.field-theme .consumable-card-balance {
  display: grid;
  min-width: 86px;
  align-content: start;
  justify-items: end;
  gap: 5px;
}

.field-theme .consumable-card-balance strong {
  color: #dcd6ff;
  font-size: 18px;
  line-height: 1.15;
}

.field-theme .consumable-card-balance small {
  color: var(--field-muted-2);
  font-size: 9px;
}

.field-theme .consumable-card-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 4px;
  border-top: 1px solid rgba(118, 128, 153, .11);
}

.field-theme .consumable-card-actions button {
  min-height: 40px;
  padding: 7px 11px;
  font-size: 10px;
}

.field-theme .consumable-stock-state {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid rgba(77, 213, 145, .22);
  border-radius: 999px;
  color: #8ae6b8;
  background: rgba(77, 213, 145, .1);
  font-size: 9px;
  font-weight: 820;
}

.field-theme .consumable-stock-state.low {
  border-color: rgba(243, 171, 61, .26);
  color: #f3c46e;
  background: rgba(243, 171, 61, .1);
}

.field-theme .consumable-stock-state.zero {
  border-color: rgba(255, 95, 114, .26);
  color: #ff9eaa;
  background: rgba(255, 95, 114, .1);
}

.field-theme .item-number {
  color: var(--field-violet-bright);
  font-size: 10px;
  letter-spacing: .04em;
}

.field-theme .item-name {
  color: var(--field-text);
  font-size: 13px;
}

.field-theme .item-meta {
  color: var(--field-muted-2);
  font-size: 10px;
}

.field-theme .status-pill {
  border: 1px solid var(--field-line);
  color: var(--field-muted);
  background: rgba(118, 128, 153, .09);
}

.field-theme .status-pill.found {
  border-color: rgba(77, 213, 145, .2);
  color: #84e7b6;
  background: rgba(77, 213, 145, .1);
}

.field-theme .status-pill.issue {
  border-color: rgba(243, 171, 61, .22);
  color: #f3c46e;
  background: rgba(243, 171, 61, .1);
}

.field-theme .status-pill.missing {
  border-color: rgba(255, 95, 114, .22);
  color: #ff95a2;
  background: rgba(255, 95, 114, .1);
}

.field-theme .empty-state {
  padding: 37px 18px;
  border-color: var(--field-line-strong);
  border-radius: 17px;
  color: var(--field-muted);
  background: rgba(12, 17, 31, .52);
}

/* Labels and printer */
.field-theme .notice {
  padding: 13px 14px;
}

.field-theme .notice span {
  color: var(--field-muted);
  font-size: 11px;
}

.field-theme .notice.info {
  border-color: rgba(76, 134, 255, .25);
  background: linear-gradient(135deg, rgba(76, 134, 255, .1), rgba(10, 14, 27, .92));
}

.field-theme .notice.warning {
  border-color: rgba(243, 171, 61, .27);
  background: linear-gradient(135deg, rgba(243, 171, 61, .1), rgba(10, 14, 27, .92));
}

.field-theme .printer-panel {
  padding: 15px;
}

.field-theme .printer-head span {
  color: var(--field-muted-2);
}

.field-theme .printer-head strong {
  color: var(--field-text);
}

.field-theme .printer-status {
  border: 1px solid var(--field-line);
  color: var(--field-muted);
  background: rgba(7, 10, 20, .5);
}

.field-theme .printer-status i {
  background: var(--field-muted-2);
  box-shadow: 0 0 0 3px rgba(112, 121, 142, .12);
}

.field-theme .printer-status.ready {
  border-color: rgba(77, 213, 145, .22);
  color: #90e9bc;
  background: rgba(77, 213, 145, .085);
}

.field-theme .printer-status.ready i {
  background: var(--field-green);
  box-shadow: 0 0 0 3px rgba(77, 213, 145, .12);
}

.field-theme .printer-status.error {
  border-color: rgba(255, 95, 114, .24);
  color: #ff9ca8;
  background: rgba(255, 95, 114, .085);
}

.field-theme .printer-status.error i {
  background: var(--field-red);
  box-shadow: 0 0 0 3px rgba(255, 95, 114, .12);
}

.field-theme .printer-settings > label,
.field-theme .custom-label-size label {
  color: var(--field-muted);
}

.field-theme .printer-hint {
  color: var(--field-muted-2);
}

.field-theme .label-row {
  min-height: 66px;
  border-color: var(--field-line);
  border-radius: 14px;
  color: var(--field-text);
  background: rgba(14, 19, 34, .9);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .12);
}

.field-theme .label-row:hover {
  border-color: rgba(128, 103, 255, .4);
}

.field-theme .label-row input[type="checkbox"] {
  accent-color: var(--field-violet);
}

.field-theme .label-row button {
  min-width: 44px;
  min-height: 44px;
  border-color: var(--field-line-strong);
  color: var(--field-violet-bright);
  background: rgba(21, 27, 47, .9);
}

.field-theme .label-copy strong {
  color: var(--field-text);
}

.field-theme .label-copy span {
  color: var(--field-muted-2);
}

.field-theme .sticky-action {
  bottom: calc(78px + env(safe-area-inset-bottom));
  padding: 8px;
  border-color: var(--field-line-strong);
  border-radius: 16px;
  background: rgba(10, 14, 27, .9);
  box-shadow: var(--field-shadow);
  backdrop-filter: blur(22px);
}

/* Synchronization */
.field-theme .sync-hero {
  padding: 15px;
}

.field-theme .sync-symbol {
  border: 1px solid rgba(243, 171, 61, .28);
  color: #f5c36b;
  background: rgba(243, 171, 61, .12);
}

.field-theme .sync-symbol .ph-icon {
  width: 25px;
  height: 25px;
}

.field-theme .sync-hero.online .sync-symbol {
  border-color: rgba(77, 213, 145, .28);
  color: #88e8b8;
  background: rgba(77, 213, 145, .12);
}

.field-theme .sync-hero.syncing .sync-symbol {
  border-color: rgba(128, 103, 255, .34);
  color: #c4baff;
  background: rgba(128, 103, 255, .14);
}

.field-theme .sync-hero span {
  color: var(--field-muted);
}

.field-theme .metric-grid {
  margin: 12px 0;
}

.field-theme .metric-grid div {
  min-height: 80px;
  border-color: var(--field-line);
}

.field-theme .metric-grid span {
  color: var(--field-muted-2);
}

.field-theme .metric-grid strong {
  color: var(--field-text);
}

.field-theme .conflict-card {
  border-color: rgba(243, 171, 61, .27);
  color: var(--field-text);
  background: linear-gradient(135deg, rgba(243, 171, 61, .1), rgba(12, 17, 31, .93));
}

.field-theme .conflict-card span {
  color: var(--field-muted);
}

.field-theme .admin-panel {
  padding: 0 14px;
}

.field-theme .admin-panel summary {
  min-height: 52px;
  color: #d9dce8;
  font-size: 12px;
}

.field-theme .admin-panel summary::marker {
  color: var(--field-violet-bright);
}

.field-theme .admin-panel p,
.field-theme .muted {
  color: var(--field-muted);
}

.field-theme .progress-panel {
  margin-top: 12px;
  padding: 15px;
}

.field-theme .progress-head span {
  color: var(--field-muted-2);
}

.field-theme .progress-head > strong {
  color: var(--field-violet-bright);
}

.field-theme .progress-track {
  display: block;
  width: 100%;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(133, 144, 174, .13);
}

.field-theme .progress-track::-webkit-progress-bar {
  border-radius: inherit;
  background: rgba(133, 144, 174, .13);
}

.field-theme .progress-track::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--field-violet), var(--field-cyan));
  box-shadow: 0 0 12px rgba(128, 103, 255, .34);
}

.field-theme .progress-track::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--field-violet), var(--field-cyan));
  box-shadow: 0 0 12px rgba(128, 103, 255, .34);
}

.field-theme .room-progress-row {
  border-color: var(--field-line);
}

.field-theme .room-progress-row span {
  color: var(--field-muted);
}

.field-theme .room-progress-row b {
  color: var(--field-violet-bright);
}

.field-theme .push-notification-panel {
  border-color: rgba(128, 103, 255, .2);
  background:
    radial-gradient(circle at 90% 0, rgba(128, 103, 255, .12), transparent 34%),
    rgba(8, 12, 23, .76);
}

.field-theme .push-notification-panel > summary span {
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  color: var(--field-muted);
  background: rgba(133, 144, 174, .06);
  font-size: 9px;
  white-space: nowrap;
}

.field-theme .push-notification-status {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-bottom: 11px;
  padding: 11px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: rgba(7, 10, 20, .62);
}

.field-theme .push-notification-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #f1b24f;
  background: rgba(243, 171, 61, .1);
  font-size: 12px;
}

.field-theme .push-notification-symbol .ph-icon {
  width: 19px;
  height: 19px;
}

.field-theme .push-notification-panel.is-loading .push-notification-symbol .ph-icon {
  animation: rotate 1.3s linear infinite;
}

.field-theme .push-notification-panel[data-tone="success"] .push-notification-symbol {
  color: var(--field-green);
  background: rgba(77, 213, 145, .11);
}

.field-theme .push-notification-panel[data-tone="danger"] .push-notification-symbol {
  color: #ff8997;
  background: rgba(255, 95, 114, .1);
}

.field-theme .push-notification-status strong {
  color: var(--field-text);
  font-size: 12px;
}

.field-theme .push-notification-status p {
  margin: 4px 0 0;
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.45;
}

.field-theme .push-notification-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 10px 0 12px;
}

.field-theme .push-preference-list {
  display: grid;
  gap: 7px;
}

.field-theme .push-preference-list > label {
  position: relative;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--field-line);
  border-radius: 11px;
  background: rgba(7, 10, 20, .5);
}

.field-theme .push-preference-list > label > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.field-theme .push-preference-list strong {
  color: var(--field-text);
  font-size: 11px;
}

.field-theme .push-preference-list small {
  color: var(--field-muted-2);
  font-size: 9px;
  line-height: 1.35;
}

.field-theme .push-preference-list input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.field-theme .push-preference-list i {
  position: relative;
  width: 38px;
  height: 22px;
  border: 1px solid rgba(133, 144, 174, .24);
  border-radius: 999px;
  background: rgba(133, 144, 174, .13);
  transition: background .18s, border-color .18s;
}

.field-theme .push-preference-list i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #9299aa;
  transition: transform .18s, background .18s;
  content: "";
}

.field-theme .push-preference-list input:checked + i {
  border-color: rgba(128, 103, 255, .55);
  background: rgba(128, 103, 255, .55);
}

.field-theme .push-preference-list input:checked + i::after {
  transform: translateX(16px);
  background: #fff;
}

.field-theme .push-preference-list label:has(input:disabled) {
  opacity: .58;
}

.field-theme .push-sound-note {
  margin: 11px 0 0 !important;
  padding: 10px;
  border-left: 2px solid rgba(128, 103, 255, .55);
  border-radius: 0 8px 8px 0;
  color: var(--field-muted) !important;
  background: rgba(128, 103, 255, .055);
  font-size: 9px !important;
  line-height: 1.5;
}

/* Compact task list: priority is carried by the entire perimeter, not a label alone. */
.field-theme .field-tasks-view.active {
  display: grid;
  align-content: start;
  gap: 12px;
}

.field-theme .field-tasks-heading {
  margin-bottom: 0;
}

.field-theme .field-tasks-offline,
.field-theme .field-tasks-access {
  margin: 0;
}

.field-theme .field-task-filters {
  margin: 0;
  padding-bottom: 2px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.field-theme .field-task-filters::-webkit-scrollbar {
  display: none;
}

.field-theme .field-task-filters > button {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.field-theme .field-task-list {
  display: grid;
  gap: 9px;
}

.field-theme .field-task-card {
  --task-priority: #8d78ff;
  --task-priority-rgb: 141, 120, 255;
  overflow: hidden;
  border: 1px solid rgba(var(--task-priority-rgb), .74);
  border-radius: 14px;
  color: var(--field-text);
  background:
    linear-gradient(90deg, rgba(var(--task-priority-rgb), .085), transparent 44%),
    rgba(9, 14, 27, .88);
  box-shadow:
    inset 0 0 0 1px rgba(var(--task-priority-rgb), .08),
    0 0 18px rgba(var(--task-priority-rgb), .08);
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.field-theme .field-task-card.priority-low {
  --task-priority: #82a8ff;
  --task-priority-rgb: 76, 134, 255;
}

.field-theme .field-task-card.priority-normal,
.field-theme .field-task-card.priority-medium {
  --task-priority: #b3a3ff;
  --task-priority-rgb: 128, 103, 255;
}

.field-theme .field-task-card.priority-high {
  --task-priority: #ffae45;
  --task-priority-rgb: 255, 174, 69;
}

.field-theme .field-task-card.priority-critical {
  --task-priority: #ff5f72;
  --task-priority-rgb: 255, 95, 114;
  box-shadow:
    inset 0 0 0 1px rgba(var(--task-priority-rgb), .12),
    0 0 22px rgba(var(--task-priority-rgb), .14);
}

.field-theme .field-task-card[open] {
  border-color: var(--task-priority);
  background:
    linear-gradient(135deg, rgba(var(--task-priority-rgb), .11), transparent 50%),
    rgba(10, 15, 29, .98);
  box-shadow:
    inset 0 0 0 1px rgba(var(--task-priority-rgb), .13),
    0 12px 32px rgba(0, 0, 0, .2),
    0 0 24px rgba(var(--task-priority-rgb), .12);
}

.field-theme .field-task-card > summary {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  list-style: none;
}

.field-theme .field-task-card > summary::-webkit-details-marker {
  display: none;
}

.field-theme .field-task-summary-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.field-theme .field-task-summary-copy > strong {
  overflow: hidden;
  color: #f0f1f6;
  font-size: 12.5px;
  font-weight: 780;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-task-card[open] .field-task-summary-copy > strong {
  overflow: visible;
  white-space: normal;
}

.field-theme .field-task-card-top,
.field-theme .field-task-compact-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.field-theme .field-task-priority,
.field-theme .field-task-status {
  overflow: hidden;
  color: var(--task-priority);
  font-size: 8.5px;
  font-weight: 840;
  letter-spacing: .055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.field-theme .field-task-status {
  margin-left: auto;
  color: var(--field-muted);
  letter-spacing: .025em;
}

.field-theme .field-task-card.status-overdue .field-task-status {
  color: #ff8997;
}

.field-theme .field-task-card.status-done {
  opacity: .74;
}

.field-theme .field-task-compact-meta {
  color: var(--field-muted-2);
  font-size: 9.5px;
}

.field-theme .field-task-compact-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-task-compact-meta > span:last-child {
  padding-left: 7px;
  border-left: 1px solid var(--field-line);
}

.field-theme .field-task-chevron {
  width: 18px;
  height: 18px;
  color: var(--task-priority);
  transition: transform .2s;
}

.field-theme .field-task-card[open] .field-task-chevron {
  transform: rotate(180deg);
}

.field-theme .field-task-details {
  display: grid;
  gap: 12px;
  padding: 0 12px 13px;
  border-top: 1px solid rgba(var(--task-priority-rgb), .16);
}

.field-theme .field-task-details > p {
  margin: 12px 0 0;
  color: var(--field-muted);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.field-theme .field-task-details dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--field-line);
  border-radius: 11px;
  background: var(--field-line);
}

.field-theme .field-task-details dl > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px;
  background: rgba(7, 11, 22, .96);
}

.field-theme .field-task-details dt {
  color: var(--field-muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.field-theme .field-task-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--field-text);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.4;
}

.field-theme .field-task-checklist {
  display: grid;
  gap: 7px;
}

.field-theme .field-task-checklist > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--field-text);
  font-size: 10px;
}

.field-theme .field-task-checklist > header span {
  color: var(--field-muted-2);
  font-size: 9px;
}

.field-theme .field-task-checklist ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.field-theme .field-task-checklist li {
  min-height: 34px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--field-line);
  border-radius: 9px;
  color: var(--field-muted);
  background: rgba(7, 11, 22, .58);
}

.field-theme .field-task-checklist li > span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(133, 144, 174, .25);
  border-radius: 6px;
}

.field-theme .field-task-checklist li > span .ph-icon {
  width: 15px;
  height: 15px;
}

.field-theme .field-task-checklist li b {
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.field-theme .field-task-checklist li.done {
  color: var(--field-green);
}

.field-theme .field-task-checklist li.done b {
  color: var(--field-muted-2);
  text-decoration: line-through;
}

.field-theme .field-task-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
}

.field-theme .field-task-empty strong,
.field-theme .field-notification-empty strong {
  color: var(--field-text);
  font-size: 12px;
}

.field-theme .field-task-empty span,
.field-theme .field-notification-empty span {
  max-width: 280px;
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.45;
}

/* Notification center reuses the existing push panel and its explicit permission action. */
.field-theme .notification-center-entry {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 12px;
  border-color: rgba(128, 103, 255, .2);
  color: var(--field-text);
  text-align: left;
  background:
    radial-gradient(circle at 90% 0, rgba(128, 103, 255, .1), transparent 38%),
    rgba(8, 12, 23, .76);
}

.field-theme .notification-center-entry > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.field-theme .notification-center-entry strong {
  font-size: 11px;
}

.field-theme .notification-center-entry small {
  overflow: hidden;
  color: var(--field-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .notification-center-entry-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--field-violet-bright);
  background: rgba(128, 103, 255, .12);
}

.field-theme dialog.field-notification-dialog {
  width: min(100%, 500px);
  max-width: 500px;
  max-height: min(92dvh, 860px);
  margin: auto auto 0;
  overflow: visible;
  padding: 0;
  border: 0;
  color: var(--field-text);
  background: transparent;
}

.field-theme dialog.field-notification-dialog::backdrop {
  background: rgba(2, 4, 11, .74);
  backdrop-filter: blur(9px);
}

.field-theme .field-notification-sheet {
  max-height: min(92dvh, 860px);
  overflow: auto;
  padding:
    10px
    max(14px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  border: 1px solid var(--field-line-strong);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(circle at 88% 0, rgba(107, 76, 255, .16), transparent 35%),
    #090d1a;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .42);
}

.field-theme .field-notification-header {
  position: sticky;
  z-index: 2;
  top: -10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -2px 10px;
  padding: 8px 2px 10px;
  border-bottom: 1px solid var(--field-line);
  background: rgba(9, 13, 26, .93);
  backdrop-filter: blur(16px);
}

.field-theme .field-notification-header h2 {
  margin: 2px 0 0;
  font-size: 20px;
  letter-spacing: -.035em;
}

.field-theme .field-notification-offline {
  margin: 0 0 10px;
}

.field-theme .field-notification-feed {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.field-theme .field-notification-feed > header {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-theme .field-notification-feed > header > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.field-theme .field-notification-feed h3 {
  margin: 0;
  color: var(--field-text);
  font-size: 12px;
}

.field-theme .field-notification-feed header span {
  color: var(--field-muted-2);
  font-size: 9px;
}

.field-theme .field-notification-list {
  display: grid;
  gap: 7px;
}

.field-theme .field-notification-item {
  --notification-tone: 128, 103, 255;
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  color: var(--field-text);
  text-align: left;
  background: rgba(7, 11, 22, .68);
}

.field-theme .field-notification-item.tone-critical {
  --notification-tone: 255, 95, 114;
}

.field-theme .field-notification-item.tone-warning {
  --notification-tone: 243, 171, 61;
}

.field-theme .field-notification-item.tone-success {
  --notification-tone: 77, 213, 145;
}

.field-theme .field-notification-item.is-unread {
  border-color: rgba(var(--notification-tone), .36);
  background:
    linear-gradient(90deg, rgba(var(--notification-tone), .08), transparent 48%),
    rgba(8, 13, 25, .92);
}

.field-theme .field-notification-item-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: rgb(var(--notification-tone));
  background: rgba(var(--notification-tone), .1);
}

.field-theme .field-notification-item-icon .ph-icon {
  width: 18px;
  height: 18px;
}

.field-theme .field-notification-item-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.field-theme .field-notification-item-copy > span {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.field-theme .field-notification-item-copy strong {
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-notification-item-copy time {
  flex: 0 0 auto;
  color: var(--field-muted-2);
  font-size: 8px;
}

.field-theme .field-notification-item-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--field-muted);
  font-size: 9px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.field-theme .field-notification-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--notification-tone));
  box-shadow: 0 0 10px rgba(var(--notification-tone), .55);
}

.field-theme .field-notification-empty {
  min-height: 130px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--field-line);
  border-radius: 12px;
  text-align: center;
}

.field-theme .field-notification-sheet .push-notification-panel {
  margin: 0;
}

.field-theme .team-panel summary span {
  color: #fff;
  background: var(--field-violet);
}

.field-theme .team-member {
  border-color: var(--field-line);
  color: var(--field-text);
  background: rgba(8, 12, 23, .58);
}

.field-theme .team-member span {
  color: var(--field-muted-2);
}

.field-theme .team-member button {
  min-width: 44px;
  min-height: 44px;
  border-color: rgba(255, 95, 114, .27);
  color: #ff95a2;
  background: rgba(255, 95, 114, .08);
}

.field-theme .danger-zone,
.field-theme .account-panel {
  border-color: rgba(255, 95, 114, .2);
}

.field-theme .form-error {
  color: #ff8997 !important;
}

/* Compact secondary tools */
.field-theme dialog.field-more-dialog {
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  max-height: min(78dvh, 620px);
  margin: auto 0 0;
  overflow: visible;
  padding: 0;
  border: 0;
  color: var(--field-text);
  background: transparent;
}

.field-theme dialog.field-more-dialog::backdrop {
  background: rgba(2, 4, 10, .66);
  backdrop-filter: blur(5px);
}

.field-theme .field-more-sheet {
  overflow-y: auto;
  padding:
    8px
    max(14px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  border: 1px solid var(--field-line-strong);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 88% 0, rgba(105, 76, 235, .2), transparent 20rem),
    linear-gradient(160deg, rgba(18, 24, 42, .99), rgba(7, 10, 20, .995));
  box-shadow: 0 -24px 70px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .045);
}

.field-theme .field-more-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: rgba(166, 174, 202, .25);
}

.field-theme .field-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.field-theme .field-more-header h2 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.field-theme .field-more-actions {
  display: grid;
  gap: 7px;
}

.field-theme .field-more-action {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border: 1px solid var(--field-line);
  border-radius: 15px;
  color: var(--field-text);
  background: rgba(8, 12, 23, .64);
  text-align: left;
}

.field-theme .field-more-action:hover {
  border-color: rgba(128, 103, 255, .44);
  background: rgba(24, 29, 50, .88);
}

.field-theme .field-more-action-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .22);
  border-radius: 13px;
  color: #b5a9ff;
  background: rgba(128, 103, 255, .1);
}

.field-theme .field-more-action-icon .ph-icon {
  width: 22px;
  height: 22px;
}

.field-theme .field-more-action > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.field-theme .field-more-action strong,
.field-theme .field-more-action small {
  overflow-wrap: anywhere;
}

.field-theme .field-more-action strong {
  font-size: 12.5px;
  line-height: 1.25;
}

.field-theme .field-more-action small {
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.35;
}

.field-theme .field-more-action .primary-marking-action-badge {
  position: static;
  min-width: 22px;
  min-height: 22px;
  padding: 4px 6px;
  border: 0;
  font-size: 9px;
}

.field-theme .field-create-primary-action {
  border-color: rgba(243, 171, 61, .3);
  background: linear-gradient(135deg, rgba(243, 171, 61, .1), rgba(91, 60, 205, .1));
}

.field-theme .field-create-primary-action .field-more-action-icon {
  border-color: rgba(243, 171, 61, .28);
  color: #f5bd63;
  background: rgba(243, 171, 61, .1);
}

/* Incident creation and maintenance feed */
.field-theme dialog.field-incident-dialog {
  inset: 0 0 0 auto;
  width: min(100%, 680px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: var(--field-text);
  background: transparent;
}

.field-theme dialog.field-incident-dialog::backdrop {
  background: rgba(2, 4, 10, .74);
  backdrop-filter: blur(6px);
}

.field-theme .field-incident-shell {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-left: 1px solid var(--field-line-strong);
  background:
    radial-gradient(circle at 82% 0, rgba(112, 78, 244, .2), transparent 24rem),
    linear-gradient(165deg, rgba(15, 20, 36, .995), rgba(6, 9, 18, .998));
  box-shadow: -28px 0 72px rgba(0, 0, 0, .45);
}

.field-theme .field-incident-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding:
    max(15px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    12px
    max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--field-line);
}

.field-theme .field-incident-header h2 {
  margin: 3px 0 0;
  font-size: clamp(22px, 5.5vw, 29px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.field-theme .field-incident-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 11px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--field-line);
  list-style: none;
}

.field-theme .field-incident-progress li {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--field-muted-2);
}

.field-theme .field-incident-progress li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: 2px;
  left: calc(100% - 2px);
  height: 1px;
  background: var(--field-line);
  content: "";
}

.field-theme .field-incident-progress span {
  display: grid;
  width: 27px;
  min-width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--field-line-strong);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  background: rgba(10, 14, 27, .86);
}

.field-theme .field-incident-progress small {
  overflow: hidden;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.field-theme .field-incident-progress li.active,
.field-theme .field-incident-progress li.complete {
  color: #dcd6ff;
}

.field-theme .field-incident-progress li.active span,
.field-theme .field-incident-progress li.complete span {
  border-color: rgba(128, 103, 255, .54);
  color: #fff;
  background: linear-gradient(145deg, #8067ff, #5d3ed8);
  box-shadow: 0 0 18px rgba(112, 78, 244, .24);
}

.field-theme .field-incident-progress li.complete span {
  background: rgba(77, 213, 145, .16);
  color: #76e5ac;
  border-color: rgba(77, 213, 145, .38);
}

.field-theme .field-incident-progress-icon {
  width: 13px;
  height: 13px;
}

.field-theme .field-incident-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left));
}

.field-theme .field-incident-step {
  display: grid;
  gap: 14px;
}

.field-theme .field-incident-step[hidden] {
  display: none;
}

.field-theme .field-incident-step-heading {
  display: grid;
  gap: 5px;
}

.field-theme .field-incident-step-heading > span {
  color: #a99aff;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: .13em;
}

.field-theme .field-incident-step-heading h3 {
  margin: 0;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.field-theme .field-incident-step-heading p {
  margin: 0;
  color: var(--field-muted);
  font-size: 12px;
  line-height: 1.5;
}

.field-theme .field-incident-location .object360-location-tree-trigger,
.field-theme .field-incident-map-button {
  width: 100%;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--field-line-strong);
  border-radius: 17px;
  color: var(--field-text);
  background: rgba(8, 12, 24, .7);
  text-align: left;
}

.field-theme .field-incident-location .object360-location-tree-trigger {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
}

.field-theme .field-incident-location .object360-location-tree-trigger > span,
.field-theme .field-incident-map-button > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.field-theme .field-incident-location small,
.field-theme .field-incident-map-button small {
  overflow-wrap: anywhere;
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.35;
}

.field-theme .field-incident-location strong,
.field-theme .field-incident-map-button strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.field-theme .field-incident-map-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.field-theme .field-incident-map-button.has-selection {
  border-color: rgba(77, 213, 145, .36);
  background: rgba(77, 213, 145, .07);
}

.field-theme .field-incident-photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-theme .field-incident-photo-actions label {
  display: grid;
  min-width: 0;
  min-height: 132px;
  align-content: center;
  justify-items: start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--field-line-strong);
  border-radius: 17px;
  color: var(--field-text);
  background: rgba(8, 12, 24, .72);
  cursor: pointer;
}

.field-theme .field-incident-photo-actions .ph-icon {
  width: 28px;
  height: 28px;
  color: #a99aff;
}

.field-theme .field-incident-photo-actions label > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.field-theme .field-incident-photo-actions strong,
.field-theme .field-incident-photo-actions small {
  overflow-wrap: anywhere;
}

.field-theme .field-incident-photo-actions small {
  color: var(--field-muted);
  font-size: 10px;
}

.field-theme .field-incident-photo-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.field-theme .field-incident-photo-preview[hidden] {
  display: none;
}

.field-theme .field-incident-photo-preview.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 8px;
}

.field-theme .field-incident-photo-item {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--field-line-strong);
  border-radius: 13px;
  background: rgba(5, 8, 17, .8);
}

.field-theme .field-incident-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-theme .field-incident-photo-item button {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  color: #fff;
  background: rgba(5, 8, 17, .84);
}

.field-theme .field-incident-field {
  display: grid;
  gap: 7px;
  color: var(--field-muted);
  font-size: 10px;
  font-weight: 720;
}

.field-theme .field-incident-field textarea,
.field-theme .field-incident-field select {
  width: 100%;
  min-height: 48px;
  border-color: var(--field-line-strong);
  border-radius: 14px;
  color: var(--field-text);
  background: rgba(7, 11, 22, .82);
  font-size: 13px;
}

.field-theme .field-incident-field textarea {
  min-height: 132px;
  resize: vertical;
}

.field-theme .field-incident-review,
.field-theme .field-incident-offline {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--field-line);
  border-radius: 15px;
  background: rgba(128, 103, 255, .07);
}

.field-theme .field-incident-review strong,
.field-theme .field-incident-offline strong {
  font-size: 12px;
}

.field-theme .field-incident-review span,
.field-theme .field-incident-offline span {
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.45;
}

.field-theme .field-incident-offline {
  border-color: rgba(243, 171, 61, .28);
  background: rgba(243, 171, 61, .07);
}

.field-theme .field-incident-status {
  min-height: 0;
  margin: 0;
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.4;
}

.field-theme .field-incident-status.error {
  color: #ff98a4;
}

.field-theme .field-incident-footer {
  display: flex;
  gap: 9px;
  padding: 11px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-top: 1px solid var(--field-line);
  background: rgba(8, 12, 23, .94);
  backdrop-filter: blur(18px);
}

.field-theme .field-incident-footer > button {
  min-height: 48px;
  flex: 1;
}

.field-theme .field-chat-conversation.is-maintenance {
  background:
    radial-gradient(circle at 82% 0, rgba(128, 103, 255, .1), transparent 17rem),
    rgba(6, 9, 18, .58);
}

.field-theme .field-chat-conversation.is-maintenance .field-chat-message-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-bottom: 18px;
}

.field-theme .chat-incident-intro {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid rgba(128, 103, 255, .22);
  border-radius: 15px;
  background: rgba(128, 103, 255, .07);
}

.field-theme .chat-incident-intro strong {
  font-size: 12px;
}

.field-theme .chat-incident-intro span {
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.45;
}

.field-theme .chat-incident-card {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--field-line-strong);
  border-radius: 17px;
  color: var(--field-text);
  background: rgba(10, 14, 27, .86);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
  text-align: left;
}

.field-theme .chat-incident-card:hover {
  border-color: rgba(128, 103, 255, .42);
  background: rgba(17, 22, 39, .94);
}

.field-theme .chat-incident-card header,
.field-theme .chat-incident-card footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-theme .chat-incident-card-status,
.field-theme .chat-incident-card-severity {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 780;
}

.field-theme .chat-incident-card-status {
  color: #79e3ad;
  background: rgba(77, 213, 145, .1);
}

.field-theme .chat-incident-card-severity.high,
.field-theme .chat-incident-card-severity.critical {
  color: #ff9aa6;
  background: rgba(255, 95, 114, .11);
}

.field-theme .chat-incident-card-severity.medium {
  color: #f7c267;
  background: rgba(243, 171, 61, .11);
}

.field-theme .chat-incident-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.3;
}

.field-theme .chat-incident-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--field-muted);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.field-theme .chat-incident-card footer {
  color: var(--field-muted-2);
  font-size: 9px;
}

.field-theme .field-incident-detail-dialog .field-incident-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.field-theme .field-incident-detail-body {
  display: grid;
  align-content: start;
  gap: 18px;
}

.field-theme .field-incident-detail-content {
  display: grid;
  gap: 10px;
}

.field-theme .field-incident-detail-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--field-line-strong);
  border-radius: 17px;
  background: rgba(8, 12, 24, .72);
}

.field-theme .field-incident-detail-summary h3,
.field-theme .field-incident-comments h3 {
  margin: 0;
  font-size: 16px;
}

.field-theme .field-incident-detail-summary p {
  margin: 0;
  color: var(--field-muted);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.field-theme .field-incident-comments {
  display: grid;
  gap: 10px;
}

.field-theme .field-incident-comments > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-theme .field-incident-comments > header span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #dcd6ff;
  background: rgba(128, 103, 255, .13);
  font-size: 9px;
  font-weight: 780;
}

.field-theme .field-incident-comment-list {
  display: grid;
  gap: 8px;
}

.field-theme .field-incident-comment {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  background: rgba(8, 12, 24, .58);
}

.field-theme .field-incident-comment header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--field-muted-2);
  font-size: 9px;
}

.field-theme .field-incident-comment p {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.field-theme .field-incident-comment-form {
  position: sticky;
  bottom: -28px;
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(7, 10, 20, .98) 18%);
}

.field-theme .field-incident-comment-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: end;
  gap: 7px;
}

.field-theme .field-incident-comment-photo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--field-line-strong);
  border-radius: 13px;
  color: #b3a7ff;
  background: rgba(128, 103, 255, .08);
  cursor: pointer;
}

.field-theme .field-incident-comment-row textarea {
  min-height: 44px;
  max-height: 132px;
  resize: none;
  border-color: var(--field-line-strong);
  border-radius: 13px;
  color: var(--field-text);
  background: rgba(7, 11, 22, .9);
  font-size: 12px;
}

/* Bottom navigation */
.field-theme .bottom-nav {
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  padding:
    4px
    max(7px, env(safe-area-inset-right))
    max(4px, env(safe-area-inset-bottom))
    max(4px, env(safe-area-inset-left));
  border-top: 1px solid var(--field-line);
  background: rgba(7, 10, 20, .9);
  box-shadow: 0 -14px 36px rgba(0, 0, 0, .26);
  backdrop-filter: blur(24px) saturate(135%);
}

.field-theme:not(.object360-mode) .bottom-nav {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-theme .bottom-nav .field-secondary-nav-target {
  display: none !important;
}

.field-theme .bottom-nav::before {
  position: absolute;
  top: -1px;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(128, 103, 255, .38), transparent);
  content: "";
}

.field-theme .bottom-nav button {
  min-width: 0;
  min-height: 50px;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--field-muted-2);
  background: transparent;
  font-size: 9.5px;
  font-weight: 660;
  transition: color .2s, background .2s, border-color .2s;
}

.field-theme .bottom-nav button > span {
  color: var(--field-muted);
  filter: grayscale(.15);
}

.field-theme .bottom-nav .field-nav-icon {
  width: 21px;
  height: 21px;
}

.field-theme .bottom-nav button:hover {
  color: var(--field-text);
  background: rgba(255, 255, 255, .03);
}

.field-theme .bottom-nav button.active {
  border-color: rgba(128, 103, 255, .2);
  color: #dcd6ff;
  background: linear-gradient(180deg, rgba(128, 103, 255, .16), rgba(128, 103, 255, .08));
}

.field-theme .bottom-nav button.active > span {
  color: var(--field-violet-bright);
  filter: drop-shadow(0 0 8px rgba(128, 103, 255, .4));
}

.field-theme .field-more-nav-button b {
  position: absolute;
  top: 3px;
  left: calc(50% + 8px);
  min-width: 17px;
  min-height: 17px;
  padding: 2px 4px;
  border: 2px solid rgba(7, 10, 20, .96);
  border-radius: 999px;
  font-size: 8px;
  line-height: 1;
}

/* Company chat */
.field-theme .chat-view.active {
  position: fixed;
  z-index: 55;
  inset: 0;
  display: block;
  overflow: hidden;
  padding: 0;
  background: #060913;
}

.field-theme .field-chat-shell {
  display: grid;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  box-sizing: border-box;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  color: var(--field-text);
  background:
    radial-gradient(circle at 15% 0, rgba(128, 103, 255, .13), transparent 25rem),
    linear-gradient(180deg, #080c18, #050711 62%, #070a14);
}

.field-theme .field-chat-header {
  display: grid;
  min-height: calc(72px + env(safe-area-inset-top));
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding:
    max(12px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    11px
    max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--field-line);
  background: rgba(8, 11, 23, .92);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .23);
  backdrop-filter: blur(24px) saturate(130%);
}

.field-theme .field-chat-heading {
  grid-column: 2;
  min-width: 0;
}

.field-theme .field-chat-back {
  grid-column: 1;
}

.field-theme .field-chat-header-actions {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 44px;
  grid-column: 3;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.field-theme .field-chat-header-actions .field-create-button {
  position: relative;
  z-index: 1;
  flex: 0 0 44px;
}

.field-theme .field-chat-heading h1 {
  overflow: hidden;
  margin: 3px 0 1px;
  font-size: 19px;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-chat-title {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: var(--field-text);
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-chat-title:not(:disabled) {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(151, 129, 255, .55);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.field-theme .field-chat-title:disabled {
  opacity: 1;
  cursor: default;
}

.field-theme .field-chat-title:focus-visible {
  border-radius: 5px;
  outline: 2px solid var(--field-violet-bright);
  outline-offset: 3px;
}

.field-theme .field-chat-heading > span {
  display: block;
  overflow: hidden;
  color: var(--field-muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-chat-back,
.field-theme .field-chat-manage {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .24);
  border-radius: 14px;
  color: #ddd6ff;
  background: rgba(128, 103, 255, .1);
  font-size: 27px;
}

.field-theme .field-chat-back[hidden],
.field-theme .field-chat-manage[hidden] {
  visibility: hidden;
  display: grid !important;
}

.field-theme .field-chat-offline {
  padding: 8px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(243, 171, 61, .2);
  color: #f4c978;
  background: rgba(243, 171, 61, .08);
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
}

.field-theme .field-chat-body {
  min-height: 0;
  overflow: hidden;
}

.field-theme .field-chat-channels,
.field-theme .field-chat-conversation {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.field-theme .field-chat-channels {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px max(12px, env(safe-area-inset-right)) 14px max(12px, env(safe-area-inset-left));
}

.field-theme .field-chat-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  background: rgba(15, 21, 37, .92);
}

.field-theme .field-chat-search > span {
  color: var(--field-violet-bright);
  font-size: 18px;
}

.field-theme .field-chat-search input {
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--field-text);
  background: transparent;
  box-shadow: none;
  font-size: 16px;
}

.field-theme .field-chat-channel-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 10px;
}

.field-theme .field-chat-directory-section + .field-chat-directory-section {
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--field-line);
}

.field-theme .field-chat-directory-heading {
  position: sticky;
  z-index: 2;
  top: -1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 31px;
  margin-bottom: 7px;
  padding: 5px 5px 6px;
  background: linear-gradient(180deg, #080c18 78%, rgba(8, 12, 24, 0));
}

.field-theme .field-chat-directory-heading h2 {
  margin: 0;
  color: #d9d4f3;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.field-theme .field-chat-directory-heading span {
  min-width: 25px;
  padding: 3px 7px;
  border: 1px solid rgba(128, 103, 255, .2);
  border-radius: 999px;
  color: var(--field-muted);
  background: rgba(128, 103, 255, .08);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.field-theme .field-chat-channel-group:empty::after {
  display: block;
  padding: 10px 6px 13px;
  color: var(--field-muted);
  font-size: 10px;
  content: "Нет совпадений";
}

.field-theme .field-chat-channel {
  display: grid;
  width: 100%;
  min-height: 67px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  padding: 9px 10px;
  border: 1px solid var(--field-line);
  border-radius: 15px;
  color: var(--field-text);
  background: rgba(15, 21, 37, .78);
  text-align: left;
}

.field-theme .field-chat-channel:active,
.field-theme .field-chat-channel.active {
  border-color: rgba(151, 129, 255, .4);
  background: rgba(128, 103, 255, .12);
}

.field-theme .field-chat-channel.unread {
  border-color: rgba(128, 103, 255, .3);
  background: rgba(128, 103, 255, .09);
}

.field-theme .field-chat-channel:disabled {
  opacity: .56;
  cursor: not-allowed;
}

.field-theme .field-chat-channel.loading {
  border-color: rgba(151, 129, 255, .45);
  cursor: progress;
}

.field-theme .field-chat-channel-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .24);
  border-radius: 14px;
  color: #cfc7ff;
  background: rgba(128, 103, 255, .11);
  font-size: 18px;
}

.field-theme .field-chat-channel-icon .ph-icon {
  width: 23px;
  height: 23px;
}

.field-theme .field-chat-channel-copy {
  min-width: 0;
}

.field-theme .field-chat-channel-copy strong,
.field-theme .field-chat-channel-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-chat-channel-copy strong {
  color: #eceaf4;
  font-size: 13px;
}

.field-theme .field-chat-channel-copy small {
  margin-top: 4px;
  color: var(--field-muted);
  font-size: 10px;
}

.field-theme .field-chat-channel.unread .field-chat-channel-copy small {
  color: #d1caff;
  font-weight: 700;
}

.field-theme .field-chat-channel-icon.person {
  border-radius: 50%;
  color: #e0dcff;
  background:
    radial-gradient(circle at 35% 25%, rgba(168, 151, 255, .28), transparent 52%),
    rgba(128, 103, 255, .12);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.02em;
}

.field-theme .field-chat-channel-count {
  min-width: 23px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: #775de2;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.field-theme .field-chat-conversation {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.field-theme .field-chat-load-older {
  justify-self: center;
  margin: 9px 0 0;
  padding: 7px 12px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  color: var(--field-muted);
  background: rgba(15, 21, 37, .92);
  font-size: 10px;
}

.field-theme .field-chat-message-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px max(12px, env(safe-area-inset-right)) 18px max(12px, env(safe-area-inset-left));
  scroll-padding-bottom: 18px;
}

.field-theme .field-chat-message {
  display: grid;
  max-width: min(88%, 680px);
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: end;
  gap: 7px;
  margin: 0 0 11px;
}

.field-theme .field-chat-message.mine {
  margin-left: auto;
  grid-template-columns: minmax(0, 1fr) 30px;
}

.field-theme .field-chat-message.mine .field-chat-avatar {
  grid-column: 2;
}

.field-theme .field-chat-message.mine .field-chat-bubble {
  grid-column: 1;
  grid-row: 1;
  border-color: rgba(128, 103, 255, .32);
  border-radius: 15px 5px 15px 15px;
  background: rgba(128, 103, 255, .16);
}

.field-theme .field-chat-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .25);
  border-radius: 50%;
  color: #fff;
  background: #252c4b;
  font-size: 9px;
  font-weight: 800;
}

.field-theme .field-chat-bubble {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--field-line);
  border-radius: 5px 15px 15px;
  background: rgba(16, 22, 38, .92);
}

.field-theme .field-chat-bubble header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.field-theme .field-chat-bubble header strong {
  overflow: hidden;
  color: #cfd4e1;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-chat-bubble time {
  flex: 0 0 auto;
  color: var(--field-muted-2);
  font-size: 8.5px;
}

.field-theme .field-chat-message-text {
  margin: 6px 0 0;
  color: #edf0f7;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.field-theme .field-chat-attachment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.field-theme .field-chat-attachment {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 70px;
  overflow: hidden;
  place-items: center;
  padding: 0;
  border: 1px solid var(--field-line);
  border-radius: 11px;
  color: var(--field-text);
  background: rgba(5, 8, 16, .7);
}

.field-theme .field-chat-attachment img {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.field-theme .field-chat-file {
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px;
  text-align: left;
}

.field-theme .field-chat-file > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: #ffd2d6;
  background: rgba(255, 95, 114, .12);
  font-size: 9px;
  font-weight: 850;
}

.field-theme .field-chat-file > span:first-child .ph-icon {
  width: 19px;
  height: 19px;
}

.field-theme .field-chat-file strong,
.field-theme .field-chat-file small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-chat-file strong {
  font-size: 10px;
}

.field-theme .field-chat-file small {
  margin-top: 2px;
  color: var(--field-muted);
  font-size: 8.5px;
}

.field-theme .field-chat-reference-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.field-theme .field-chat-reference-card {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(128, 103, 255, .22);
  border-radius: 11px;
  color: var(--field-text);
  background: rgba(128, 103, 255, .07);
  text-align: left;
}

.field-theme .field-chat-reference-card > span:first-child {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #cfc7ff;
  background: rgba(128, 103, 255, .13);
}

.field-theme .field-chat-reference-card > span:first-child .ph-icon {
  width: 17px;
  height: 17px;
}

.field-theme .field-chat-reference-card > span:last-child .ph-icon {
  width: 15px;
  height: 15px;
}

.field-theme .field-chat-reference-card strong,
.field-theme .field-chat-reference-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-chat-reference-card strong {
  font-size: 10px;
}

.field-theme .field-chat-reference-card small {
  margin-top: 2px;
  color: var(--field-muted);
  font-size: 8.5px;
}

.field-theme .field-chat-empty {
  align-self: center;
  justify-self: center;
  width: min(100%, 330px);
  padding: 28px 18px;
  color: var(--field-muted);
  text-align: center;
}

.field-theme .field-chat-conversation > .field-chat-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  pointer-events: none;
}

.field-theme .field-chat-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-right: auto;
  margin-bottom: 10px;
  margin-left: auto;
  place-items: center;
  font-size: 31px;
}

.field-theme .field-chat-empty > span .ph-icon {
  width: 34px;
  height: 34px;
}

.field-theme .field-chat-empty strong {
  color: var(--field-text);
  font-size: 15px;
}

.field-theme .field-chat-empty p {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.field-theme .field-chat-composer {
  display: grid;
  gap: 7px;
  padding: 8px max(12px, env(safe-area-inset-right)) 9px max(12px, env(safe-area-inset-left));
  border-top: 1px solid var(--field-line);
  background: rgba(7, 10, 20, .94);
  box-shadow: 0 -14px 34px rgba(0, 0, 0, .2);
  backdrop-filter: blur(22px) saturate(130%);
}

.field-theme .field-chat-compose-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: end;
  gap: 7px;
}

.field-theme .field-chat-compose-row textarea {
  min-height: 46px;
  max-height: 116px;
  padding: 12px;
  resize: none;
  color: var(--field-text);
  background: rgba(16, 22, 39, .94);
  font-size: 16px;
  line-height: 1.35;
}

.field-theme .field-chat-attach,
.field-theme .field-chat-send {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border-radius: 14px;
  font-size: 22px;
}

.field-theme .field-chat-attach {
  border: 1px solid var(--field-line-strong);
  color: #d7d1ff;
  background: rgba(128, 103, 255, .1);
}

.field-theme .field-chat-send {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(173, 155, 255, .58);
  color: #fff;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .3), transparent 34%),
    linear-gradient(145deg, #927cff 0%, #6f54f2 54%, #4b35c7 100%);
  box-shadow: 0 9px 23px rgba(91, 65, 222, .38), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.field-theme .field-chat-send svg.ph-icon {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: none;
  transform: translate(1px, -1px);
}

.field-theme .field-chat-send:active:not(:disabled) {
  transform: scale(.94);
  filter: saturate(1.08) brightness(1.06);
}

.field-theme .field-chat-send:disabled,
.field-theme .field-chat-attach:disabled {
  opacity: .45;
}

.field-theme .field-chat-send:disabled {
  filter: saturate(.65);
  box-shadow: none;
}

.field-theme .field-chat-composer-status {
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.4;
}

.field-theme .field-chat-composer-status.error {
  color: #ff9eaa;
}

.field-theme .field-chat-preview-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 1px 0 2px;
  scrollbar-width: none;
}

.field-theme .field-chat-preview-strip::-webkit-scrollbar {
  display: none;
}

.field-theme .field-chat-preview {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 94px;
  min-height: 56px;
  overflow: hidden;
  place-items: center;
  padding: 6px;
  border: 1px solid var(--field-line);
  border-radius: 11px;
  background: rgba(16, 22, 39, .96);
}

.field-theme .field-chat-preview img {
  width: 100%;
  height: 56px;
  border-radius: 7px;
  object-fit: cover;
}

.field-theme .field-chat-preview strong,
.field-theme .field-chat-preview small {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-chat-preview strong {
  color: var(--field-text);
  font-size: 9px;
}

.field-theme .field-chat-preview small {
  margin-top: 3px;
  color: var(--field-muted);
  font-size: 8px;
}

.field-theme .field-chat-preview-remove {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  color: #fff;
  background: rgba(5, 8, 15, .82);
}

.field-theme .field-chat-preview-remove .ph-icon {
  width: 17px;
  height: 17px;
}

.field-theme [data-swipe-close-surface] {
  transform: translate3d(var(--dialog-swipe-x, 0px), 0, 0);
  transition: transform .18s ease;
  touch-action: pan-y pinch-zoom;
}

.field-theme [data-swipe-close-surface].is-swiping {
  transition: none;
}

.field-theme dialog.field-chat-sheet,
.field-theme dialog.field-chat-channel-dialog {
  width: min(100%, 640px);
  max-height: calc(100dvh - env(safe-area-inset-top));
  margin: auto 0 0;
  border-radius: 23px 23px 0 0;
}

.field-theme .field-chat-sheet-card,
.field-theme .field-chat-channel-form,
.field-theme .consumable-sheet-card {
  display: grid;
  gap: 13px;
  max-height: calc(100dvh - max(20px, env(safe-area-inset-top)));
  overflow-y: auto;
  padding: 18px max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.field-theme .field-chat-sheet-card > header,
.field-theme .field-chat-reference-shell > header,
.field-theme .field-chat-channel-form > header,
.field-theme .consumable-sheet-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.field-theme .field-chat-sheet-card h2,
.field-theme .field-chat-reference-shell h2,
.field-theme .field-chat-channel-form h2,
.field-theme .consumable-sheet-card h2 {
  margin: 4px 0 0;
  color: var(--field-text);
  font-size: 21px;
}

.field-theme .consumable-sheet-card label,
.field-theme .consumable-import-file {
  color: var(--field-text);
  font-size: 11px;
  font-weight: 760;
}

.field-theme .consumable-location-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(128, 103, 255, .22);
  border-radius: 14px;
  background: rgba(128, 103, 255, .055);
}

.field-theme .consumable-location-picker legend {
  padding: 0 5px;
  color: #dcd6ff;
  font-size: 11px;
  font-weight: 820;
}

.field-theme .consumable-sheet-card input,
.field-theme .consumable-sheet-card select,
.field-theme .consumable-sheet-card textarea {
  min-height: 46px;
  margin-top: 6px;
  color: var(--field-text);
  background: rgba(10, 14, 26, .9);
  font-size: 16px;
}

.field-theme .consumable-sheet-card textarea {
  min-height: 84px;
  resize: vertical;
}

.field-theme .consumable-sheet-item {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(128, 103, 255, .2);
  border-radius: 12px;
  color: #dcd6ff;
  background: rgba(128, 103, 255, .08);
  font-size: 12px;
  font-weight: 780;
}

.field-theme .consumable-movement-projection {
  margin: 0;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--field-muted);
  background: rgba(118, 128, 153, .08);
  font-size: 11px;
}

.field-theme .consumable-movement-projection.warning {
  color: #f3c46e;
  background: rgba(243, 171, 61, .1);
}

.field-theme .consumable-movement-projection.error {
  color: #ff9eaa;
  background: rgba(255, 95, 114, .1);
}

.field-theme .consumable-import-file small {
  display: block;
  margin-top: 5px;
  color: var(--field-muted-2);
  font-size: 9.5px;
  font-weight: 500;
}

.field-theme .consumable-import-summary {
  padding: 11px 12px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  color: var(--field-muted);
  background: rgba(10, 14, 26, .72);
  font-size: 11px;
}

.field-theme .consumable-import-preview {
  max-height: 34dvh;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 12px;
}

.field-theme .consumable-import-preview table {
  width: 100%;
  border-collapse: collapse;
  color: var(--field-text);
  background: rgba(8, 11, 21, .78);
  font-size: 10px;
}

.field-theme .consumable-import-preview th,
.field-theme .consumable-import-preview td {
  max-width: 180px;
  padding: 8px 9px;
  overflow: hidden;
  border-bottom: 1px solid var(--field-line);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .consumable-import-preview th {
  position: sticky;
  top: 0;
  color: #dcd6ff;
  background: #11172a;
}

.field-theme .field-chat-attach-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.field-theme .field-chat-attach-grid > label,
.field-theme .field-chat-attach-grid > button {
  display: grid;
  min-width: 0;
  min-height: 114px;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--field-line);
  border-radius: 15px;
  color: var(--field-text);
  background: rgba(16, 22, 39, .9);
  text-align: left;
}

.field-theme .field-chat-attach-grid > * > span {
  color: var(--field-violet-bright);
  font-size: 19px;
  font-weight: 850;
}

.field-theme .field-chat-attach-grid > * > span .ph-icon {
  width: 24px;
  height: 24px;
}

.field-theme .field-chat-attach-grid strong {
  font-size: 12px;
}

.field-theme .field-chat-attach-grid small {
  color: var(--field-muted);
  font-size: 9.5px;
  line-height: 1.35;
}

.field-theme dialog.field-chat-reference-dialog {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #060913;
}

.field-theme .field-chat-reference-shell {
  display: grid;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  box-sizing: border-box;
  padding:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  color: var(--field-text);
  background: linear-gradient(180deg, #080c18, #050711);
}

.field-theme .field-chat-reference-types {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 0;
  scrollbar-width: none;
}

.field-theme .field-chat-reference-types::-webkit-scrollbar {
  display: none;
}

.field-theme .field-chat-reference-types button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  color: var(--field-muted);
  background: rgba(16, 22, 39, .9);
  font-size: 10px;
}

.field-theme .field-chat-reference-types button.active {
  border-color: rgba(128, 103, 255, .4);
  color: #e1dcff;
  background: rgba(128, 103, 255, .14);
}

.field-theme .field-chat-reference-results {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.field-theme .field-chat-reference-result {
  display: grid;
  width: 100%;
  min-height: 60px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  padding: 9px;
  border: 1px solid var(--field-line);
  border-radius: 13px;
  color: var(--field-text);
  background: rgba(16, 22, 39, .82);
  text-align: left;
}

.field-theme .field-chat-reference-result > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: #cfc7ff;
  background: rgba(128, 103, 255, .12);
}

.field-theme .field-chat-reference-result > span:first-child .ph-icon {
  width: 21px;
  height: 21px;
}

.field-theme .field-chat-reference-result > span:last-child {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #cfc7ff;
}

.field-theme .field-chat-reference-result > span:last-child .ph-icon {
  width: 19px;
  height: 19px;
}

.field-theme .field-chat-reference-result strong,
.field-theme .field-chat-reference-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .field-chat-reference-result strong {
  font-size: 11px;
}

.field-theme .field-chat-reference-result small {
  margin-top: 3px;
  color: var(--field-muted);
  font-size: 9px;
}

.field-theme .field-chat-channel-form label {
  display: grid;
  gap: 6px;
  color: var(--field-muted);
  font-size: 10px;
  font-weight: 700;
}

.field-theme .field-chat-department-field {
  display: grid;
  gap: 8px;
}

.field-theme .field-chat-inline-action {
  min-height: 34px;
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--field-accent);
  font-size: 10px;
  font-weight: 800;
}

.field-theme .field-chat-department-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--field-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

.field-theme .field-chat-department-create > label {
  min-width: 0;
}

.field-theme .field-chat-department-create > button {
  min-height: 42px;
}

.field-theme .field-chat-member-field {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 11px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
}

.field-theme .field-chat-member-field legend {
  padding: 0 5px;
  color: var(--field-muted);
  font-size: 10px;
}

.field-theme .field-chat-member-field > div {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.field-theme .field-chat-member-field label {
  display: grid;
  min-height: 42px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}

.field-theme .field-chat-entity-card {
  display: grid;
  gap: 14px;
  max-height: calc(100dvh - 18px);
  overflow-y: auto;
  padding: 18px;
}

.field-theme .field-chat-entity-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.field-theme .field-chat-entity-card h2 {
  margin: 4px 0 0;
  color: var(--field-text);
  font-size: 21px;
}

.field-theme .field-chat-entity-details {
  display: grid;
  gap: 7px;
}

.field-theme .field-chat-entity-detail {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--field-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
}

.field-theme .field-chat-entity-detail span {
  color: var(--field-muted-2);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.field-theme .field-chat-entity-detail strong {
  color: var(--field-text);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Mobile AI assistant */
.field-theme .ai-assistant-launcher {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 55;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 9px;
  border: 1px solid rgba(166, 145, 255, .54);
  border-radius: 999px;
  color: #f4f1ff;
  background:
    radial-gradient(circle at 18% 0, rgba(255, 255, 255, .2), transparent 42%),
    linear-gradient(135deg, rgba(117, 86, 239, .98), rgba(72, 42, 181, .98));
  box-shadow: 0 15px 38px rgba(63, 35, 168, .42), inset 0 1px rgba(255, 255, 255, .15);
  font: inherit;
  cursor: pointer;
}

.field-theme .ai-assistant-launcher > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  font-size: 17px;
}

.field-theme .ai-assistant-launcher strong {
  font-size: 12px;
  letter-spacing: -.01em;
}

.field-theme .ai-assistant-launcher:hover {
  border-color: rgba(210, 199, 255, .86);
  transform: translateY(-1px);
}

.field-theme dialog.ai-assistant-dialog {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #060913;
}

.field-theme .ai-assistant-dialog::backdrop {
  background: #060913;
}

.field-theme .ai-assistant-shell {
  display: grid;
  height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: var(--field-text);
  background:
    radial-gradient(circle at 18% 0, rgba(128, 103, 255, .14), transparent 24rem),
    linear-gradient(180deg, #080c18, #050711 58%, #070a14);
}

.field-theme .ai-assistant-header {
  display: flex;
  min-height: calc(72px + env(safe-area-inset-top));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding:
    max(12px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    11px
    max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--field-line);
  background: rgba(8, 11, 23, .9);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .23);
  backdrop-filter: blur(24px) saturate(130%);
}

.field-theme .ai-assistant-heading,
.field-theme .ai-assistant-header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.field-theme .ai-assistant-heading > div {
  min-width: 0;
}

.field-theme .ai-assistant-heading .eyebrow {
  overflow: hidden;
  max-width: 46vw;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .ai-assistant-heading h2 {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--field-text);
  font-size: 18px;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .ai-assistant-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(145, 119, 255, .42);
  border-radius: 14px;
  color: #ddd6ff;
  background: linear-gradient(145deg, rgba(128, 103, 255, .23), rgba(73, 49, 172, .12));
  box-shadow: 0 10px 26px rgba(70, 42, 177, .24), inset 0 1px rgba(255, 255, 255, .05);
  font-size: 20px;
}

.field-theme .ai-assistant-mark .ph-icon {
  width: 24px;
  height: 24px;
}

.field-theme .ai-assistant-status-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(77, 213, 145, .24);
  border-radius: 999px;
  color: #8be5ba;
  background: rgba(77, 213, 145, .08);
  font-size: 9.5px;
  font-weight: 720;
  white-space: nowrap;
}

.field-theme .ai-assistant-status-chip::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
  content: "";
}

.field-theme .ai-assistant-status-chip.checking {
  color: #f4c978;
  border-color: rgba(243, 171, 61, .25);
  background: rgba(243, 171, 61, .08);
}

.field-theme .ai-assistant-status-chip.offline,
.field-theme .ai-assistant-status-chip.unavailable,
.field-theme .ai-assistant-status-chip.budget {
  color: #ff9eaa;
  border-color: rgba(255, 95, 114, .28);
  background: rgba(255, 95, 114, .08);
}

.field-theme .ai-assistant-header .dialog-close {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
}

.field-theme .ai-assistant-content {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px max(14px, env(safe-area-inset-right)) 24px max(14px, env(safe-area-inset-left));
  scroll-padding-bottom: 24px;
}

.field-theme .ai-assistant-notice {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid rgba(128, 103, 255, .2);
  border-radius: 14px;
  color: var(--field-muted);
  background: rgba(128, 103, 255, .07);
}

.field-theme .ai-assistant-notice strong {
  color: #d8d0ff;
  font-size: 11px;
}

.field-theme .ai-assistant-notice span {
  font-size: 10px;
  line-height: 1.48;
}

.field-theme .ai-conversation {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.field-theme .ai-message {
  display: flex;
  max-width: min(92%, 620px);
  align-items: flex-end;
  gap: 8px;
}

.field-theme .ai-message.user {
  justify-self: end;
}

.field-theme .ai-message-avatar {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .26);
  border-radius: 10px;
  color: #cfc5ff;
  background: rgba(128, 103, 255, .11);
  font-size: 12px;
}

.field-theme .ai-message-avatar .ph-icon {
  width: 16px;
  height: 16px;
}

.field-theme .ai-message > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: 15px 15px 15px 5px;
  color: var(--field-text);
  background: rgba(16, 22, 39, .9);
}

.field-theme .ai-message.user > div {
  border-color: rgba(128, 103, 255, .26);
  border-radius: 15px 15px 5px;
  background: rgba(91, 65, 195, .25);
}

.field-theme .ai-message p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.field-theme .ai-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.field-theme .ai-message-actions button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(128, 103, 255, .27);
  border-radius: 10px;
  color: #d9d2ff;
  background: rgba(128, 103, 255, .09);
  font: inherit;
  font-size: 10px;
}

.field-theme .ai-message.thinking > div {
  color: var(--field-muted);
}

.field-theme .ai-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-theme .ai-quick-actions > button {
  display: grid;
  min-width: 0;
  min-height: 126px;
  align-content: start;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--field-line);
  border-radius: 16px;
  color: var(--field-text);
  background: linear-gradient(145deg, rgba(18, 24, 42, .96), rgba(10, 14, 27, .94));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
  text-align: left;
  font: inherit;
}

.field-theme .ai-quick-actions > button > span {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .27);
  border-radius: 11px;
  color: #cfc5ff;
  background: rgba(128, 103, 255, .1);
  font-size: 15px;
}

.field-theme .ai-quick-actions > button > span .ph-icon {
  width: 20px;
  height: 20px;
}

.field-theme .ai-quick-actions strong {
  font-size: 11.5px;
  line-height: 1.3;
}

.field-theme .ai-quick-actions small {
  color: var(--field-muted-2);
  font-size: 9.5px;
  line-height: 1.45;
}

.field-theme .ai-quick-actions > button:hover {
  border-color: rgba(128, 103, 255, .38);
  background: linear-gradient(145deg, rgba(25, 31, 53, .98), rgba(13, 18, 34, .96));
}

.field-theme .ai-photo-workspace {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(128, 103, 255, .24);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(15, 21, 38, .96), rgba(8, 12, 24, .96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .025);
}

.field-theme .ai-photo-workspace[hidden] {
  display: none;
}

.field-theme .ai-photo-workspace-head,
.field-theme .ai-candidate-results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.field-theme .ai-photo-workspace h3,
.field-theme .ai-candidate-results h3 {
  margin: 4px 0 0;
  color: var(--field-text);
  font-size: 16px;
  letter-spacing: -.025em;
}

.field-theme .ai-photo-source-actions,
.field-theme .ai-photo-fallback-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.field-theme .ai-photo-source-actions label {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--field-line-strong);
  border-radius: 12px;
  color: var(--field-text);
  background: rgba(24, 31, 52, .82);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.field-theme .ai-photo-source-actions label:hover {
  border-color: rgba(128, 103, 255, .42);
}

.field-theme .ai-photo-source-actions label .ph-icon {
  width: 19px;
  height: 19px;
}

.field-theme .ai-photo-preview-frame {
  position: relative;
  display: grid;
  min-height: 220px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--field-line);
  border-radius: 15px;
  background:
    radial-gradient(circle at center, rgba(128, 103, 255, .08), transparent 55%),
    #050811;
}

.field-theme .ai-photo-preview-frame img {
  width: 100%;
  max-height: min(45dvh, 460px);
  object-fit: contain;
}

.field-theme .ai-photo-placeholder {
  display: grid;
  max-width: 270px;
  justify-items: center;
  gap: 6px;
  padding: 24px;
  color: var(--field-muted);
  text-align: center;
}

.field-theme .ai-photo-placeholder > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .23);
  border-radius: 14px;
  color: #bbb0ff;
  background: rgba(128, 103, 255, .08);
  font-size: 20px;
}

.field-theme .ai-photo-placeholder > span .ph-icon {
  width: 25px;
  height: 25px;
}

.field-theme .ai-photo-placeholder strong {
  color: var(--field-text);
  font-size: 12px;
}

.field-theme .ai-photo-placeholder small {
  color: var(--field-muted-2);
  font-size: 9.5px;
  line-height: 1.45;
}

.field-theme .ai-recognized-text {
  display: grid;
  gap: 6px;
  color: var(--field-muted);
  font-size: 10px;
  font-weight: 680;
}

.field-theme .ai-recognized-text input {
  min-height: 48px;
  color: var(--field-text);
  background: rgba(5, 8, 17, .74);
  font-size: 16px;
}

.field-theme .ai-recognized-text small {
  color: var(--field-muted-2);
  font-size: 9px;
  font-weight: 500;
}

.field-theme .ai-photo-status {
  min-height: 20px;
  margin: 0;
  color: var(--field-muted);
  font-size: 10px;
  line-height: 1.45;
}

.field-theme .ai-photo-status.error {
  color: #ff9aa6;
}

.field-theme .ai-photo-status.success {
  color: #8be5ba;
}

.field-theme .ai-candidate-results {
  display: grid;
  gap: 10px;
  padding-top: 3px;
}

.field-theme .ai-candidate-results[hidden] {
  display: none;
}

.field-theme .ai-candidate-results-head > span {
  min-width: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(128, 103, 255, .23);
  border-radius: 999px;
  color: #d8d0ff;
  background: rgba(128, 103, 255, .1);
  text-align: center;
  font-size: 10px;
}

.field-theme .ai-candidate-list {
  display: grid;
  gap: 8px;
}

.field-theme .ai-candidate-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px 10px;
  padding: 11px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  background: rgba(8, 12, 24, .74);
}

.field-theme .ai-candidate-rank {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .24);
  border-radius: 12px;
  color: #cec5ff;
  background: rgba(128, 103, 255, .09);
  font-size: 12px;
  font-weight: 760;
}

.field-theme .ai-candidate-copy {
  min-width: 0;
}

.field-theme .ai-candidate-copy strong,
.field-theme .ai-candidate-copy span,
.field-theme .ai-candidate-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .ai-candidate-copy strong {
  color: var(--field-text);
  font-size: 11.5px;
}

.field-theme .ai-candidate-copy span {
  margin-top: 3px;
  color: #c9c1ed;
  font-size: 10px;
}

.field-theme .ai-candidate-copy small {
  margin-top: 4px;
  color: var(--field-muted-2);
  font-size: 9px;
}

.field-theme .ai-candidate-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
}

.field-theme .ai-candidate-actions button {
  min-height: 39px;
  padding: 8px 10px;
  border-radius: 10px;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
}

.field-theme .ai-candidate-actions .open {
  border: 1px solid rgba(128, 103, 255, .38);
  color: #fff;
  background: linear-gradient(135deg, rgba(117, 86, 239, .9), rgba(79, 49, 199, .9));
}

.field-theme .ai-candidate-actions .reject {
  border: 1px solid var(--field-line);
  color: var(--field-muted);
  background: rgba(25, 31, 51, .7);
}

.field-theme .ai-candidate-actions .reference {
  border: 1px solid rgba(77, 213, 145, .25);
  color: #a5ebc9;
  background: rgba(77, 213, 145, .08);
}

.field-theme .ai-reference-gallery {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(77, 213, 145, .2);
  border-radius: 15px;
  background: rgba(7, 19, 20, .58);
}

.field-theme .ai-reference-gallery[hidden] {
  display: none;
}

.field-theme .ai-reference-gallery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.field-theme .ai-reference-gallery h3 {
  margin: 4px 0 0;
  color: var(--field-text);
  font-size: 15px;
  letter-spacing: -.02em;
}

.field-theme .ai-reference-disclaimer,
.field-theme .ai-reference-status {
  margin: 0;
  color: var(--field-muted-2);
  font-size: 9.5px;
  line-height: 1.48;
}

.field-theme .ai-reference-status.error {
  color: #ff9aa6;
}

.field-theme .ai-reference-status.success {
  color: #8be5ba;
}

.field-theme .ai-reference-list {
  display: grid;
  grid-auto-columns: minmax(166px, 57%);
  grid-auto-flow: column;
  gap: 9px;
  min-width: 0;
  overflow-x: auto;
  padding: 1px 1px 7px;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  scrollbar-width: thin;
}

.field-theme .ai-reference-card {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: rgba(8, 12, 24, .82);
  scroll-snap-align: start;
}

.field-theme .ai-reference-image {
  display: grid;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  place-items: center;
  color: var(--field-muted-2);
  background:
    radial-gradient(circle at center, rgba(128, 103, 255, .1), transparent 62%),
    #050811;
  font-size: 9px;
  text-align: center;
}

.field-theme .ai-reference-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.field-theme .ai-reference-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
}

.field-theme .ai-reference-card-copy strong,
.field-theme .ai-reference-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .ai-reference-card-copy strong {
  color: var(--field-text);
  font-size: 10px;
}

.field-theme .ai-reference-card-copy small {
  color: var(--field-muted-2);
  font-size: 8.5px;
}

.field-theme .ai-reference-links {
  display: flex;
  min-height: 18px;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  color: var(--field-muted-2);
  font-size: 8.5px;
}

.field-theme .ai-reference-links a {
  color: #aaa0ff;
  text-decoration: underline;
  text-decoration-color: rgba(170, 160, 255, .4);
  text-underline-offset: 2px;
}

.field-theme .ai-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
  padding:
    10px
    max(14px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  border-top: 1px solid var(--field-line);
  background: rgba(7, 10, 20, .92);
  box-shadow: 0 -14px 34px rgba(0, 0, 0, .2);
  backdrop-filter: blur(22px) saturate(130%);
}

.field-theme .ai-chat-form textarea {
  min-height: 48px;
  max-height: 122px;
  resize: none;
  color: var(--field-text);
  background: rgba(16, 22, 39, .92);
  font-size: 16px;
  line-height: 1.35;
}

.field-theme .ai-chat-form button {
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 14px;
  font-size: 20px;
}

.field-theme .ai-chat-form button .ph-icon {
  width: 22px;
  height: 22px;
}

/* Dialogs and enterprise card */
.field-theme dialog {
  width: min(calc(100% - 18px), 640px);
  max-height: calc(100dvh - 18px);
  border: 1px solid var(--field-line-strong);
  border-radius: 22px;
  color: var(--field-text);
  background: linear-gradient(160deg, #11172a, #090d19);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .62), inset 0 1px rgba(255, 255, 255, .03);
}

.field-theme dialog::backdrop {
  background: rgba(2, 4, 10, .76);
  backdrop-filter: blur(6px);
}

.field-theme .item-dialog form,
.field-theme .label-dialog,
.field-theme .enterprise-asset-card,
.field-theme .consumable-dialog-card {
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.field-theme .consumable-dialog-card {
  display: grid;
  max-height: calc(100dvh - 20px);
  gap: 14px;
  overflow-y: auto;
}

.field-theme .consumable-balance-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(128, 103, 255, .2);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(128, 103, 255, .12), rgba(76, 134, 255, .06));
}

.field-theme .consumable-balance-hero > div {
  display: grid;
  gap: 3px;
}

.field-theme .consumable-balance-hero span {
  color: var(--field-muted);
  font-size: 10px;
}

.field-theme .consumable-balance-hero strong {
  color: var(--field-text);
  font-size: 26px;
}

.field-theme .consumable-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.field-theme .consumable-details > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: rgba(9, 13, 25, .62);
}

.field-theme .consumable-details > div.wide {
  grid-column: 1 / -1;
}

.field-theme .consumable-details dt {
  color: var(--field-muted-2);
  font-size: 9px;
}

.field-theme .consumable-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--field-text);
  font-size: 11px;
  font-weight: 750;
}

.field-theme .consumable-dialog-actions {
  padding-top: 0;
  border-top: 0;
}

.field-theme .consumable-journal {
  display: grid;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid var(--field-line);
}

.field-theme .consumable-journal-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.field-theme .consumable-journal-head h3 {
  margin: 3px 0 0;
  color: var(--field-text);
  font-size: 16px;
}

.field-theme .consumable-journal-head > span {
  color: var(--field-muted);
  font-size: 11px;
}

.field-theme .consumable-journal-list {
  display: grid;
  max-height: 42dvh;
  gap: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.field-theme .consumable-movement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  padding: 11px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: rgba(9, 13, 25, .64);
}

.field-theme .consumable-movement-row.highlighted {
  border-color: rgba(128, 103, 255, .7);
  box-shadow: 0 0 0 3px rgba(128, 103, 255, .12);
}

.field-theme .consumable-movement-row strong {
  color: var(--field-text);
  font-size: 11px;
}

.field-theme .consumable-movement-delta {
  color: #8ae6b8;
  font-size: 12px;
}

.field-theme .consumable-movement-delta.negative {
  color: #ffb176;
}

.field-theme .consumable-movement-meta,
.field-theme .consumable-movement-note {
  grid-column: 1 / -1;
  color: var(--field-muted-2);
  font-size: 9.5px;
  line-height: 1.4;
}

.field-theme .consumable-movement-note {
  color: var(--field-muted);
}

.field-theme .consumable-movement-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 6px;
}

.field-theme .consumable-movement-actions button {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--field-line);
  border-radius: 9px;
  color: var(--field-muted);
  background: rgba(18, 24, 42, .88);
  font-size: 9px;
}

.field-theme .dialog-head h2 {
  color: var(--field-text);
  font-size: 21px;
  letter-spacing: -.035em;
}

.field-theme .dialog-close {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  color: var(--field-muted);
  background: rgba(24, 31, 52, .88);
}

.field-theme .dialog-close:hover {
  border-color: rgba(128, 103, 255, .4);
  color: var(--field-text);
  background: rgba(34, 40, 66, .96);
}

.field-theme .dialog-close .ph-icon {
  width: 20px;
  height: 20px;
}

.field-theme .create-item-lead {
  border: 1px solid rgba(76, 134, 255, .18);
  color: #aeb9d3;
  background: rgba(76, 134, 255, .08);
}

.field-theme .create-item-dialog {
  width: min(calc(100% - 18px), 780px);
  overflow: hidden;
}

.field-theme .create-item-dialog form {
  max-height: calc(100dvh - 20px);
  gap: 14px;
  overscroll-behavior: contain;
}

.field-theme .create-asset-form-section,
.field-theme .create-asset-photo-card {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--field-line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(128, 103, 255, .07), transparent 54%),
    rgba(7, 11, 22, .66);
}

.field-theme .create-asset-section-heading {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.field-theme .create-asset-section-heading h3 {
  margin: 0;
  color: var(--field-text);
  font-size: 15px;
  line-height: 1.25;
}

.field-theme .create-asset-section-heading span {
  color: var(--field-muted-2);
  font-size: 10.5px;
  line-height: 1.4;
}

.field-theme .create-asset-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-theme .create-asset-span-2 {
  grid-column: 1 / -1;
}

.field-theme .create-asset-checkbox {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: rgba(13, 18, 33, .72);
}

.field-theme .create-asset-checkbox > input {
  width: 19px;
  min-width: 19px;
  height: 19px;
  margin: 0;
}

.field-theme .create-asset-checkbox > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.field-theme .create-asset-checkbox strong {
  color: var(--field-text);
  font-size: 11.5px;
}

.field-theme .create-asset-checkbox small {
  color: var(--field-muted-2);
  font-size: 9.5px;
}

.field-theme .create-asset-photo-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.field-theme .create-asset-photo-picker {
  min-width: 0;
  cursor: pointer;
}

.field-theme .create-asset-photo-frame {
  position: relative;
  display: grid;
  min-height: 168px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed rgba(159, 141, 255, .42);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0, rgba(128, 103, 255, .15), transparent 58%),
    rgba(5, 8, 17, .78);
}

.field-theme .create-asset-photo-frame > img {
  width: 100%;
  height: 100%;
  min-height: 168px;
  object-fit: cover;
}

.field-theme .create-asset-photo-placeholder {
  display: grid;
  max-width: 260px;
  gap: 5px;
  padding: 18px;
  place-items: center;
  text-align: center;
}

.field-theme .create-asset-photo-placeholder .ph-icon {
  width: 30px;
  height: 30px;
  color: #a997ff;
}

.field-theme .create-asset-photo-placeholder strong {
  color: var(--field-text);
  font-size: 13px;
}

.field-theme .create-asset-photo-placeholder small,
.field-theme .create-asset-photo-status {
  color: var(--field-muted-2);
  font-size: 10px;
  line-height: 1.4;
}

.field-theme .create-asset-photo-actions {
  display: flex;
  width: min(180px, 32vw);
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

  .field-theme .create-asset-photo-actions .secondary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.field-theme .create-asset-photo-status {
  grid-column: 1 / -1;
  margin: 0;
}

.field-theme .create-asset-photo-status.error {
  color: #ff9dab;
}

.field-theme .create-asset-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.field-theme .create-asset-details > summary::-webkit-details-marker {
  display: none;
}

.field-theme .create-asset-details > summary::after {
  content: '';
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-right: 2px solid var(--field-muted);
  border-bottom: 2px solid var(--field-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s ease;
}

.field-theme .create-asset-details[open] > summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.field-theme .create-asset-details > summary > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.field-theme .create-asset-details > summary strong {
  color: var(--field-text);
  font-size: 15px;
}

.field-theme .create-asset-details > summary small {
  color: var(--field-muted-2);
  font-size: 10.5px;
}

.field-theme .create-asset-details > .create-asset-form-grid {
  padding-top: 2px;
}

.field-theme .create-item-dialog .dialog-actions {
  position: sticky;
  z-index: 3;
  bottom: calc(-1 * max(18px, env(safe-area-inset-bottom)));
  margin: 0 -18px -18px;
  padding: 14px 18px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--field-line);
  background: rgba(8, 12, 23, .94);
  backdrop-filter: blur(18px);
}

.field-theme .enterprise-asset-tabs {
  border-color: var(--field-line);
  background: rgba(6, 9, 18, .7);
}

.field-theme .enterprise-asset-tabs button {
  color: var(--field-muted);
}

.field-theme .enterprise-asset-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #8067ff, #6242df);
  box-shadow: 0 8px 22px rgba(98, 66, 223, .26);
}

.field-theme .enterprise-information-head h3,
.field-theme .enterprise-custom-fields-head h3 {
  color: var(--field-text);
}

.field-theme .enterprise-information-head > p:last-child {
  color: var(--field-muted-2);
}

.field-theme .form-hint,
.field-theme .inline-printer-status {
  color: var(--field-muted-2);
}

.field-theme .enterprise-state,
.field-theme .enterprise-qr-state,
.field-theme .enterprise-sync-state {
  border: 1px solid rgba(77, 213, 145, .2);
  color: #8ae6b8;
  background: rgba(77, 213, 145, .1);
}

.field-theme .enterprise-state.new {
  border-color: rgba(243, 171, 61, .22);
  color: #f2c474;
  background: rgba(243, 171, 61, .1);
}

.field-theme .enterprise-state.retired {
  border-color: rgba(255, 95, 114, .22);
  color: #ff98a4;
  background: rgba(255, 95, 114, .1);
}

.field-theme .enterprise-qr-state.pending {
  border-color: var(--field-line);
  color: var(--field-muted);
  background: rgba(118, 128, 153, .09);
}

.field-theme .enterprise-sync-state {
  border-color: rgba(243, 171, 61, .24);
  color: #f2c474;
  background: rgba(243, 171, 61, .1);
}

.field-theme .enterprise-sync-state.error {
  border-color: rgba(255, 95, 114, .28);
  color: #ff98a4;
  background: rgba(255, 95, 114, .1);
}

.field-theme .enterprise-asset-delete {
  border-color: rgba(255, 95, 114, .28);
}

.field-theme .enterprise-reconciliation {
  border-color: var(--field-line);
  background: rgba(6, 9, 18, .52);
}

.field-theme .enterprise-reconciliation-head h3 {
  color: var(--field-text);
}

.field-theme .enterprise-reconciliation-kicker,
.field-theme .enterprise-reconciliation-reasons,
.field-theme .enterprise-observed-number small,
.field-theme #createItemInventoryField small {
  color: var(--field-muted-2);
}

.field-theme .enterprise-reconciliation-note {
  color: var(--field-text);
}

.field-theme .enterprise-reconciliation-status {
  border: 1px solid var(--field-line);
  color: var(--field-muted);
  background: rgba(118, 128, 153, .09);
}

.field-theme .enterprise-reconciliation-status.found {
  border-color: rgba(77, 213, 145, .2);
  color: #8ae6b8;
  background: rgba(77, 213, 145, .1);
}

.field-theme .enterprise-reconciliation-status.no_inventory_number,
.field-theme .enterprise-reconciliation-status.discrepancy,
.field-theme .enterprise-reconciliation-status.duplicate {
  border-color: rgba(243, 171, 61, .24);
  color: #f2c474;
  background: rgba(243, 171, 61, .1);
}

.field-theme .enterprise-reconciliation-status.not_found {
  border-color: rgba(255, 95, 114, .24);
  color: #ff98a4;
  background: rgba(255, 95, 114, .1);
}

.field-theme .enterprise-observed-number {
  color: var(--field-text);
}

.field-theme .enterprise-reconciliation-actions button {
  border-color: var(--field-line);
  color: var(--field-text);
  background: rgba(20, 27, 45, .86);
}

.field-theme .enterprise-reconciliation-actions button:hover,
.field-theme .enterprise-reconciliation-actions button.active {
  border-color: rgba(128, 103, 255, .55);
  color: #d0c9ff;
  background: rgba(128, 103, 255, .16);
}

.field-theme .enterprise-reconciliation-warning {
  border-color: rgba(243, 171, 61, .32);
  color: #f2c474;
  background: rgba(243, 171, 61, .1);
}

.field-theme .enterprise-asset-details {
  border-color: var(--field-line);
  background: rgba(6, 9, 18, .52);
}

.field-theme .enterprise-asset-details div {
  border-color: var(--field-line);
}

.field-theme .enterprise-asset-details dt {
  color: var(--field-muted-2);
}

.field-theme .enterprise-asset-details dd {
  color: var(--field-text);
}

.field-theme .enterprise-field-edit {
  border-color: rgba(128, 103, 255, .24);
  color: #a99cff;
  background: rgba(128, 103, 255, .08);
}

.field-theme .enterprise-field-edit:hover {
  border-color: rgba(128, 103, 255, .5);
  color: #d0c9ff;
  background: rgba(128, 103, 255, .17);
}

.field-theme .enterprise-field-edit:focus-visible {
  outline-color: rgba(128, 103, 255, .42);
}

.field-theme .enterprise-field-editor input,
.field-theme .enterprise-field-editor select,
.field-theme .enterprise-field-editor textarea {
  border-color: var(--field-line);
  color: var(--field-text);
  background: rgba(5, 8, 16, .88);
}

.field-theme .enterprise-field-editor input:focus,
.field-theme .enterprise-field-editor select:focus,
.field-theme .enterprise-field-editor textarea:focus {
  outline-color: rgba(128, 103, 255, .25);
  border-color: rgba(128, 103, 255, .7);
}

.field-theme .enterprise-field-editor-error {
  color: #ff9aa6;
}

.field-theme .enterprise-field-editor-help {
  color: var(--field-muted-2);
}

.field-theme .enterprise-edit-status {
  color: var(--field-muted-2);
}

.field-theme .enterprise-edit-status.error {
  color: #ff9aa6;
}

.field-theme .enterprise-documents {
  position: relative;
  overflow: hidden;
  margin: 14px 0;
  border: 1px solid var(--field-line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0, rgba(128, 103, 255, .12), transparent 42%),
    rgba(7, 11, 22, .72);
}

.field-theme .enterprise-documents[hidden] {
  display: none;
}

.field-theme .enterprise-documents > summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 24px;
  gap: 11px;
  align-items: center;
  min-height: 70px;
  padding: 12px 13px;
  list-style: none;
  user-select: none;
}

.field-theme .enterprise-documents > summary::-webkit-details-marker {
  display: none;
}

.field-theme .enterprise-documents > summary:hover {
  background: rgba(128, 103, 255, .055);
}

.field-theme .enterprise-documents-symbol {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(128, 103, 255, .27);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(128, 103, 255, .2), rgba(76, 134, 255, .08));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
}

.field-theme .enterprise-documents-symbol .ph-icon {
  width: 24px;
  height: 24px;
  color: #b8adff;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .2));
}

.field-theme .enterprise-documents-summary-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.field-theme .enterprise-documents-summary-copy strong {
  color: var(--field-text);
  font-size: 14px;
  letter-spacing: -.01em;
}

.field-theme .enterprise-documents-summary-copy small {
  overflow: hidden;
  color: var(--field-muted-2);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .enterprise-documents-count {
  display: grid;
  min-width: 29px;
  height: 29px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid rgba(128, 103, 255, .26);
  border-radius: 999px;
  color: #c4bbff;
  background: rgba(128, 103, 255, .1);
  font-size: 12px;
  font-weight: 800;
}

.field-theme .enterprise-documents-chevron {
  color: var(--field-muted);
  font-size: 21px;
  line-height: 1;
  text-align: center;
  transition: transform .2s ease;
}

.field-theme .enterprise-documents[open] .enterprise-documents-chevron {
  transform: rotate(180deg);
}

.field-theme .enterprise-documents-body {
  padding: 0 12px 12px;
  border-top: 1px solid transparent;
}

.field-theme .enterprise-documents[open] .enterprise-documents-body {
  border-top-color: var(--field-line);
  padding-top: 12px;
}

.field-theme .enterprise-document-list {
  display: grid;
  gap: 9px;
}

.field-theme .enterprise-document-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(151, 161, 196, .13);
  border-radius: 13px;
  background: rgba(19, 25, 43, .72);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.field-theme .enterprise-document-type {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(76, 134, 255, .22);
  border-radius: 11px;
  color: #9ab7ff;
  background:
    linear-gradient(135deg, rgba(76, 134, 255, .15), rgba(128, 103, 255, .08)),
    rgba(7, 11, 22, .74);
}

.field-theme .enterprise-document-type .ph-icon {
  width: 23px;
  height: 23px;
}

.field-theme .enterprise-document-content {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.field-theme .enterprise-document-content strong {
  overflow: hidden;
  color: var(--field-text);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .enterprise-document-meta {
  overflow: hidden;
  color: var(--field-muted-2);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .enterprise-document-expiry {
  width: fit-content;
  margin-top: 2px;
  color: #8bdab3;
  font-size: 10px;
  line-height: 1.3;
}

.field-theme .enterprise-document-expiry.soon {
  color: #f2c474;
}

.field-theme .enterprise-document-expiry.expired {
  color: #ff98a4;
}

.field-theme .enterprise-document-open {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
  white-space: nowrap;
}

.field-theme .enterprise-document-open:disabled {
  opacity: .48;
}

.field-theme .enterprise-document-empty {
  margin: 0;
  padding: 14px 12px;
  border: 1px dashed rgba(151, 161, 196, .16);
  border-radius: 12px;
  color: var(--field-muted);
  background: rgba(8, 12, 23, .48);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.field-theme .enterprise-document-status {
  margin: 9px 2px 0;
  color: var(--field-muted);
  font-size: 11px;
  line-height: 1.45;
}

.field-theme .enterprise-document-status[hidden] {
  display: none;
}

.field-theme .enterprise-document-status.success {
  color: #8bdab3;
}

.field-theme .enterprise-document-status.offline {
  color: #f2c474;
}

.field-theme .enterprise-document-status.error {
  color: #ff98a4;
}

.field-theme .enterprise-photo-gallery {
  margin: 14px 0;
}

.field-theme .enterprise-photo-viewport {
  border-color: var(--field-line);
  background: rgba(5, 8, 16, .72);
}

.field-theme .enterprise-asset-photo {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: inherit;
  object-fit: contain;
  background: rgba(5, 8, 16, .72);
}

.field-theme .enterprise-asset-photo.is-placeholder {
  min-height: 100%;
  padding: 18px;
  object-fit: contain;
  opacity: .72;
  background:
    radial-gradient(circle at 50% 42%, rgba(128, 103, 255, .1), transparent 52%),
    rgba(5, 8, 16, .72);
}

.field-theme .enterprise-asset-photo.is-cached {
  border-color: rgba(128, 103, 255, .38);
}

.field-theme .enterprise-asset-photo[hidden] {
  display: none;
}

.field-theme .enterprise-photo-add,
.field-theme .enterprise-photo-delete,
.field-theme .enterprise-photo-source-menu {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(12, 16, 29, .88);
}

.field-theme .enterprise-photo-navigation > button {
  border-color: var(--field-line);
  color: var(--field-text);
  background: rgba(20, 26, 45, .9);
}

.field-theme .enterprise-photo-navigation > button:disabled {
  color: var(--field-muted-2);
  opacity: .48;
}

.field-theme .enterprise-photo-dots button::after {
  background: rgba(166, 177, 204, .42);
}

.field-theme .enterprise-photo-dots button.active::after {
  background: var(--field-violet-bright);
}

.field-theme .enterprise-photo-count,
.field-theme .enterprise-photo-status {
  color: var(--field-muted-2);
}

.field-theme .enterprise-photo-status.error {
  color: #ff9aa6;
}

.field-theme .enterprise-photo-viewer[open] {
  background: #03050a;
}

.field-theme .enterprise-photo-viewer::backdrop {
  background: #03050a;
}

.field-theme .label-preview {
  border: 1px solid var(--field-line);
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .026) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, rgba(255, 255, 255, .026) 25%, transparent 25%) 0 8px / 16px 16px,
    rgba(5, 8, 16, .7);
}

.field-theme .label-preview canvas {
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .34);
}

.field-theme .toast {
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(86px + env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  min-height: 46px;
  padding: 13px 15px;
  border: 1px solid rgba(128, 103, 255, .32);
  border-radius: 13px;
  color: var(--field-text);
  background: rgba(21, 27, 47, .97);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .44);
  backdrop-filter: blur(18px);
}

.field-theme .toast[data-tone="error"],
.field-theme .toast[data-tone="danger"],
.field-theme .toast.error {
  border-color: rgba(255, 95, 114, .42);
  background: rgba(76, 18, 31, .97);
}

.field-theme .toast[data-tone="warning"],
.field-theme .toast.warning {
  border-color: rgba(243, 171, 61, .44);
  background: rgba(74, 47, 14, .97);
}

/* Compact phones */
@media (max-width: 390px) {
  .field-theme .topbar {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
    padding-right: max(11px, env(safe-area-inset-right));
    padding-left: max(11px, env(safe-area-inset-left));
  }

  .field-theme .brandmark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .field-theme .field-wordmark > span {
    font-size: 14px;
  }

  .field-theme .connection-chip {
    padding: 8px;
  }

  .field-theme .connection-chip #connectionText {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .field-theme .view {
    padding-right: max(11px, env(safe-area-inset-right));
    padding-left: max(11px, env(safe-area-inset-left));
  }

  .field-theme .primary-marking-header {
    gap: 8px;
  }

  .field-theme .primary-marking-heading h1 {
    font-size: 21px;
  }

  .field-theme .primary-marking-quick-actions {
    gap: 6px;
  }

  .field-theme .primary-marking-icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 13px;
  }

  .field-theme .primary-marking-room-picker > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .field-theme .primary-marking-room-picker > summary strong {
    text-align: left;
  }

  .field-theme .primary-marking-counters {
    gap: 5px;
  }

  .field-theme .primary-marking-counters > div {
    padding: 8px;
  }

  .field-theme .primary-marking-counters strong {
    font-size: 20px;
  }

  .field-theme .primary-marking-section-heading {
    gap: 8px;
  }

  .field-theme .primary-marking-section-heading .text-button {
    font-size: 11px;
  }

  .field-theme .primary-marking-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-theme .primary-marking-item-status {
    align-self: flex-start;
  }

  .field-theme .primary-marking-scanner-card .camera-frame {
    min-height: min(58dvh, 500px);
  }

  .field-theme dialog.inventory-finding-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .field-theme .inventory-finding-form {
    max-height: 100dvh;
    gap: 13px;
    padding:
      max(14px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .field-theme .inventory-finding-photo-frame {
    min-height: 156px;
  }

  .field-theme .inventory-finding-candidate {
    grid-template-columns: 1fr;
  }

  .field-theme .inventory-finding-candidate-action {
    width: 100%;
  }

  .field-theme .inventory-finding-actions {
    bottom: calc(-1 * max(14px, env(safe-area-inset-bottom)));
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-theme #inventoryFindingSaveAndPrintButton {
    grid-column: 1 / -1;
  }

  .field-theme .filter-row {
    margin-right: -11px;
    margin-left: -11px;
    padding-right: 11px;
    padding-left: 11px;
  }

  .field-theme .consumable-list-tools {
    grid-template-columns: 1fr;
  }

  .field-theme .consumable-create-button {
    width: 100%;
  }

  .field-theme .consumable-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .field-theme .consumable-card-actions button,
  .field-theme .consumable-dialog-actions button {
    flex: 1 1 120px;
  }

  .field-theme .consumable-details {
    grid-template-columns: 1fr;
  }

  .field-theme .consumable-details > div.wide {
    grid-column: auto;
  }

  .field-theme .project-strip {
    grid-template-columns: minmax(0, 1fr);
    padding-right: max(11px, env(safe-area-inset-right));
    padding-left: max(11px, env(safe-area-inset-left));
  }

  .field-theme .project-strip label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .field-theme .room-row,
  .field-theme .manual-scan {
    grid-template-columns: 1fr;
  }

  .field-theme .today-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .field-theme .today-card .text-button {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .field-theme .printer-head {
    align-items: stretch;
    flex-direction: column;
  }

  .field-theme .printer-head button {
    width: 100%;
  }

  .field-theme .printer-settings {
    grid-template-columns: 1fr;
  }

  .field-theme .printer-settings > label:first-child,
  .field-theme .custom-label-size,
  .field-theme .printer-apply {
    grid-column: auto;
  }

  .field-theme .custom-label-size {
    grid-template-columns: 1fr;
  }

  .field-theme .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .field-theme .dialog-actions > * {
    width: 100%;
  }

  .field-theme .section-heading {
    align-items: flex-start;
  }

  .field-theme .section-heading-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
  }

  .field-theme .section-heading-actions .primary {
    max-width: 46vw;
    white-space: normal;
  }

  .field-theme .enterprise-documents > summary {
    grid-template-columns: 40px minmax(0, 1fr) auto 20px;
    gap: 8px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .field-theme .enterprise-documents-summary-copy small {
    white-space: normal;
  }

  .field-theme .enterprise-document-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .field-theme .enterprise-document-type {
    width: 40px;
    height: 40px;
  }

  .field-theme .enterprise-document-open {
    grid-column: 1 / -1;
    width: 100%;
  }

  .field-theme .bottom-nav button {
    padding-right: 2px;
    padding-left: 2px;
    font-size: 9px;
  }

  .field-theme .ai-assistant-launcher {
    right: max(11px, env(safe-area-inset-right));
    padding-right: 11px;
  }

  .field-theme .ai-assistant-launcher strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .field-theme .ai-assistant-heading .eyebrow {
    max-width: 35vw;
  }

  .field-theme .ai-assistant-status-chip {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    clip-path: inset(50%);
  }

  .field-theme .ai-quick-actions {
    grid-template-columns: 1fr;
  }

  .field-theme .ai-quick-actions > button {
    min-height: 96px;
  }

  .field-theme .ai-photo-preview-frame {
    min-height: 190px;
  }

  .field-theme .ai-photo-fallback-actions {
    grid-template-columns: 1fr;
  }

  .field-theme .ai-candidate-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-theme .ai-candidate-actions .open {
    grid-column: 1 / -1;
  }

  .field-theme .ai-reference-list {
    grid-auto-columns: minmax(164px, 78%);
  }
}

/* One compact operator shell on every phone, including 430–639px devices. */
@media (max-width: 639px) {
  .field-theme .brandcopy > span,
  .field-theme .connection-chip #connectionText {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .field-theme .connection-chip {
    width: 44px;
    padding: 8px;
  }

  .field-theme .primary-marking-header {
    min-height: 28px;
  }

  .field-theme .primary-marking-action-copy small {
    font-size: 9.5px;
  }

  .field-theme .primary-marking-section-heading {
    padding: 11px 12px 9px;
  }

  .field-theme .bottom-nav button {
    min-height: 48px;
  }

  /* Full asset creation stays roomy and predictable on every phone width. */
  .field-theme dialog.create-item-dialog {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .field-theme .create-item-dialog form {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    padding:
      max(14px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .field-theme .create-asset-form-grid,
  .field-theme .create-asset-photo-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-theme .create-asset-span-2,
  .field-theme .create-asset-photo-status {
    grid-column: auto;
  }

  .field-theme .create-asset-form-section,
  .field-theme .create-asset-photo-card {
    padding: 12px;
  }

  .field-theme .create-asset-form-section label,
  .field-theme .create-asset-form-section input,
  .field-theme .create-asset-form-section select,
  .field-theme .create-asset-form-section textarea {
    min-width: 0;
    max-width: 100%;
  }

  .field-theme .create-asset-photo-frame,
  .field-theme .create-asset-photo-frame > img {
    min-height: 156px;
  }

  .field-theme .create-asset-photo-actions {
    width: 100%;
    flex-flow: row wrap;
  }

  .field-theme .create-asset-photo-actions .secondary {
    min-width: min(100%, 150px);
    flex: 1 1 150px;
  }

  .field-theme .create-item-dialog .dialog-actions {
    bottom: calc(-1 * max(14px, env(safe-area-inset-bottom)));
    margin: 0 -12px -14px;
    padding:
      12px
      max(12px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }
}

/* Tablets and larger handhelds */
@media (min-width: 640px) {
  .field-theme .field-chat-shell {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .field-theme .topbar {
    padding-right: max(24px, env(safe-area-inset-right));
    padding-left: max(24px, env(safe-area-inset-left));
  }

  .field-theme .project-strip,
  .field-theme .view {
    padding-right: max(24px, env(safe-area-inset-right));
    padding-left: max(24px, env(safe-area-inset-left));
  }

  .field-theme .primary-marking-workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .field-theme .primary-marking-header,
  .field-theme .primary-marking-room-picker,
  .field-theme .primary-marking-quick-actions,
  .field-theme .primary-marking-overview {
    grid-column: 1 / -1;
  }

  .field-theme .primary-marking-list-section {
    align-self: start;
  }

  .field-theme .primary-marking-workspace:not(.has-findings) #primaryMarkingExpectedSection {
    grid-column: 1 / -1;
  }

  .field-theme .inventory-finding-dialog {
    width: min(calc(100% - 32px), 680px);
  }

  .field-theme .inventory-finding-photo-frame {
    min-height: 220px;
  }

  .field-theme .bottom-nav {
    right: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 50%;
    width: min(600px, calc(100% - 38px));
    padding: 7px;
    border: 1px solid var(--field-line-strong);
    border-radius: 19px;
    transform: translateX(-50%);
  }

  .field-theme dialog.field-more-dialog {
    width: min(520px, calc(100% - 38px));
    margin: auto auto calc(92px + env(safe-area-inset-bottom));
  }

  .field-theme .field-more-sheet {
    padding: 10px 16px 16px;
    border-bottom: 1px solid var(--field-line-strong);
    border-radius: 22px;
  }

  .field-theme .bottom-nav button {
    min-height: 60px;
  }

  .field-theme main {
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
  }

  .field-theme .sticky-action {
    bottom: 99px;
  }

  .field-theme .toast {
    bottom: calc(106px + env(safe-area-inset-bottom));
  }

  .field-theme .ai-assistant-launcher {
    right: max(24px, env(safe-area-inset-right));
    bottom: calc(98px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 900px) {
  .field-theme .view.active[data-view="scan"] {
    gap: 16px;
  }

  .field-theme .scanner-card,
  .field-theme .room-card,
  .field-theme .scan-result,
  .field-theme .today-card {
    box-shadow: var(--field-shadow-soft);
  }
}

/* Read-only floor map for Object360 Field. Editing stays in the desktop shell. */
.field-theme .mobile-map-view.active {
  display: flex;
  min-height: calc(100dvh - 210px);
  flex-direction: column;
  gap: 12px;
}

.field-theme .mobile-map-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.field-theme .mobile-map-header h1 {
  margin: 2px 0 0;
  font-size: clamp(25px, 7vw, 34px);
  line-height: 1;
}

.field-theme .mobile-map-readonly-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(139, 117, 255, .32);
  border-radius: 999px;
  background: rgba(116, 82, 255, .11);
  color: #b9abff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.field-theme .mobile-map-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) repeat(2, 46px);
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--field-line);
  border-radius: 18px;
  background: rgba(12, 17, 32, .92);
  box-shadow: var(--field-shadow-soft);
}

.field-theme .mobile-map-toolbar label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.field-theme .mobile-map-toolbar label > span {
  padding-left: 2px;
  color: var(--field-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field-theme .mobile-map-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--field-line-strong);
  border-radius: 13px;
  background-color: #0a1020;
  color: var(--field-text);
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.field-theme .mobile-map-icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(131, 104, 255, .38);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(113, 76, 245, .24), rgba(31, 210, 238, .1));
  color: #b7a7ff;
}

.field-theme .mobile-map-icon-button .field-action-icon {
  width: 22px;
  height: 22px;
}

.field-theme .mobile-map-icon-button.active,
.field-theme .mobile-map-icon-button[aria-pressed="true"] {
  background: linear-gradient(135deg, #7048ef, #4c65ed);
  color: white;
}

.field-theme .mobile-map-back-button {
  display: none;
}

.field-theme .mobile-map-status {
  display: grid;
  gap: 3px;
  padding: 0 3px;
}

.field-theme .mobile-map-status strong {
  color: var(--field-text);
  font-size: 14px;
}

.field-theme .mobile-map-status span {
  color: var(--field-muted);
  font-size: 12px;
  line-height: 1.45;
}

.field-theme .mobile-map-status[data-tone="warning"] strong {
  color: #ffc65b;
}

.field-theme .mobile-map-viewport {
  --mobile-plan-ratio: 3 / 2;
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: var(--mobile-plan-ratio);
  overflow: hidden;
  border: 1px solid rgba(128, 109, 227, .28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 30%, rgba(100, 66, 230, .16), transparent 46%),
    #060a14;
  box-shadow: 0 18px 58px rgba(0, 0, 0, .34);
}

.field-theme .mobile-map-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
}

.field-theme .mobile-map-canvas.is-dragging {
  cursor: grabbing;
}

.field-theme .mobile-map-canvas::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(117, 98, 214, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 98, 214, .045) 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
}

.field-theme .mobile-map-transform {
  position: absolute;
  z-index: 1;
  inset: 0;
  transform: translate3d(var(--mobile-map-pan-x, 0px), var(--mobile-map-pan-y, 0px), 0) scale(var(--mobile-map-scale, 1));
  transform-origin: 50% 50%;
  will-change: transform;
}

.field-theme .mobile-map-transform > img,
.field-theme .mobile-map-regions {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.field-theme .mobile-map-transform > img {
  z-index: 1;
  filter: saturate(1.03) contrast(1.02);
  pointer-events: none;
}

.field-theme .mobile-map-regions {
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}

.field-theme .mobile-map-region {
  --map-region-fill: rgba(114, 82, 242, .2);
  --map-region-stroke: #987dff;
  cursor: pointer;
  pointer-events: all;
  outline: none;
}

.field-theme .mobile-map-region polygon {
  fill: var(--map-region-fill);
  stroke: var(--map-region-stroke);
  stroke-width: 5;
  vector-effect: non-scaling-stroke;
  transition: fill .18s ease, filter .18s ease, stroke-width .18s ease;
}

.field-theme .mobile-map-region text {
  fill: #fff;
  font-weight: 900;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(4, 8, 18, .92);
  stroke-linejoin: round;
  stroke-width: 6px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.field-theme .mobile-map-region.is-ready {
  --map-region-fill: rgba(35, 211, 139, .2);
  --map-region-stroke: #32dc99;
}

.field-theme .mobile-map-region.is-warning {
  --map-region-fill: rgba(255, 179, 48, .22);
  --map-region-stroke: #ffc04b;
}

.field-theme .mobile-map-region.is-danger {
  --map-region-fill: rgba(255, 74, 103, .24);
  --map-region-stroke: #ff637b;
}

.field-theme .mobile-map-region.is-corridor {
  --map-region-fill: rgba(42, 195, 225, .17);
  --map-region-stroke: #43d4ec;
}

.field-theme .mobile-map-region.is-stair {
  --map-region-fill: rgba(155, 114, 255, .2);
  --map-region-stroke: #b493ff;
}

.field-theme .mobile-map-region:is(:hover, :focus, .is-selected) polygon {
  fill: color-mix(in srgb, var(--map-region-stroke) 38%, transparent);
  filter: drop-shadow(0 0 9px var(--map-region-stroke));
  stroke-width: 8;
}

.field-theme .mobile-map-loading {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: rgba(5, 9, 18, .72);
  color: var(--field-text);
  backdrop-filter: blur(5px);
}

.field-theme .mobile-map-loading[hidden] {
  display: none;
}

.field-theme .mobile-map-loading span {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(143, 120, 255, .25);
  border-top-color: #9178ff;
  border-radius: 50%;
  animation: field-map-spin .7s linear infinite;
}

@keyframes field-map-spin {
  to { transform: rotate(360deg); }
}

.field-theme .mobile-map-gesture-hint {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 0;
  left: 12px;
  margin: 0 -12px;
  padding: 28px 12px 9px;
  overflow: hidden;
  background: linear-gradient(180deg, transparent, rgba(5, 9, 18, .86));
  color: #8e98b3;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.field-theme .mobile-map-region-card {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(132, 108, 244, .3);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(18, 24, 44, .98), rgba(10, 14, 28, .98));
  box-shadow: 0 20px 52px rgba(0, 0, 0, .38);
}

.field-theme .mobile-map-region-card[hidden] {
  display: none;
}

.field-theme .mobile-map-region-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.field-theme .mobile-map-region-card header span {
  color: #9f8cff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.field-theme .mobile-map-region-card h2 {
  margin: 3px 0 0;
  color: var(--field-text);
  font-size: 19px;
  line-height: 1.18;
}

.field-theme .mobile-map-region-card header button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--field-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  color: var(--field-muted);
  font-size: 22px;
  line-height: 1;
}

.field-theme .mobile-map-region-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #bec7dc;
  font-size: 12px;
  font-weight: 750;
}

.field-theme .mobile-map-region-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8f79ff;
  box-shadow: 0 0 12px #8f79ff;
}

.field-theme .mobile-map-region-card[data-tone="ready"] .mobile-map-region-status i { background: #31d894; box-shadow: 0 0 12px #31d894; }
.field-theme .mobile-map-region-card[data-tone="warning"] .mobile-map-region-status i { background: #ffc14d; box-shadow: 0 0 12px #ffc14d; }
.field-theme .mobile-map-region-card[data-tone="danger"] .mobile-map-region-status i { background: #ff6179; box-shadow: 0 0 12px #ff6179; }

.field-theme .mobile-map-region-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--field-line);
  border-radius: 13px;
  background: var(--field-line);
}

.field-theme .mobile-map-region-card dl > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 10px;
  background: #0b1020;
}

.field-theme .mobile-map-region-card dt {
  color: var(--field-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.field-theme .mobile-map-region-card dd {
  margin: 0;
  overflow: hidden;
  color: var(--field-text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-theme .mobile-map-region-notes,
.field-theme .mobile-map-region-card > small {
  margin: 0;
  color: var(--field-muted);
  font-size: 11px;
  line-height: 1.45;
}

.field-theme .mobile-map-view:fullscreen {
  width: 100vw;
  height: 100dvh;
  padding: 0;
  background: #050812;
}

  .field-theme.field-map-open.field-map-landscape {
    overflow: hidden;
  }

  .field-theme.field-map-open.field-map-landscape .topbar,
  .field-theme.field-map-open.field-map-landscape .project-strip,
  .field-theme.field-map-open.field-map-landscape .bottom-nav {
    display: none !important;
  }

  .field-theme.field-map-open.field-map-landscape main {
    height: 100dvh;
    padding: 0 !important;
  }

  .field-theme.field-map-landscape .mobile-map-view.active,
  .field-theme .mobile-map-view:fullscreen {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: block;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding: 0;
    background: #050812;
  }

  .field-theme.field-map-landscape .mobile-map-header,
  .field-theme.field-map-landscape .mobile-map-status,
  .field-theme.field-map-landscape .mobile-map-gesture-hint,
  .field-theme .mobile-map-view:fullscreen .mobile-map-header,
  .field-theme .mobile-map-view:fullscreen .mobile-map-status,
  .field-theme .mobile-map-view:fullscreen .mobile-map-gesture-hint {
    display: none;
  }

  .field-theme.field-map-landscape .mobile-map-toolbar,
  .field-theme .mobile-map-view:fullscreen .mobile-map-toolbar {
    position: fixed;
    z-index: 125;
    top: max(8px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    grid-template-columns: 42px minmax(140px, 230px) minmax(110px, 180px) repeat(2, 42px);
    width: min(670px, calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    padding: 7px;
    border-radius: 16px;
    background: rgba(7, 11, 22, .86);
    backdrop-filter: blur(14px);
  }

  .field-theme.field-map-landscape .mobile-map-toolbar label > span,
  .field-theme .mobile-map-view:fullscreen .mobile-map-toolbar label > span {
    display: none;
  }

  .field-theme.field-map-landscape .mobile-map-toolbar select,
  .field-theme.field-map-landscape .mobile-map-icon-button,
  .field-theme .mobile-map-view:fullscreen .mobile-map-toolbar select,
  .field-theme .mobile-map-view:fullscreen .mobile-map-icon-button {
    min-height: 42px;
    height: 42px;
  }

  .field-theme.field-map-landscape .mobile-map-icon-button,
  .field-theme .mobile-map-view:fullscreen .mobile-map-icon-button {
    width: 42px;
  }

  .field-theme.field-map-landscape .mobile-map-back-button,
  .field-theme .mobile-map-view:fullscreen .mobile-map-back-button {
    display: grid;
  }

  .field-theme.field-map-landscape .mobile-map-viewport,
  .field-theme .mobile-map-view:fullscreen .mobile-map-viewport {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
  }

  .field-theme.field-map-landscape .mobile-map-canvas,
  .field-theme .mobile-map-view:fullscreen .mobile-map-canvas {
    inset: 0;
  }

  .field-theme.field-map-landscape .mobile-map-region-card,
  .field-theme .mobile-map-view:fullscreen .mobile-map-region-card {
    position: fixed;
    z-index: 126;
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    width: min(330px, 38vw);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow: auto;
    border-radius: 17px;
    background: rgba(10, 15, 29, .94);
    backdrop-filter: blur(14px);
  }

  .field-theme.field-map-landscape .mobile-map-region-card dl,
  .field-theme .mobile-map-view:fullscreen .mobile-map-region-card dl {
    grid-template-columns: 1fr;
  }

@media (max-width: 390px) {
  .field-theme .mobile-map-toolbar {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr) repeat(2, 44px);
    gap: 6px;
    padding: 8px;
  }

  .field-theme .mobile-map-icon-button {
    width: 44px;
    height: 44px;
  }

  .field-theme .mobile-map-toolbar select {
    padding-right: 27px;
    padding-left: 9px;
  }

  .field-theme .mobile-map-readonly-badge {
    display: none;
  }

  .field-theme .field-topbar-actions {
    gap: 5px;
  }

  .field-theme .field-create-button,
  .field-theme .field-notification-button,
  .field-theme .connection-chip {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .field-theme .field-task-details dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-theme .field-notification-item-copy time {
    display: none;
  }

  .field-theme .field-incident-photo-actions {
    grid-template-columns: 1fr;
  }

  .field-theme .field-incident-photo-actions label {
    min-height: 92px;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
  }

  .field-theme .field-incident-photo-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-theme .field-incident-progress small {
    display: none;
  }
}

@media (max-width: 639px) {
  .field-theme dialog.field-incident-dialog {
    width: 100%;
  }

  .field-theme .field-incident-shell {
    border-left: 0;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  .field-theme dialog.field-notification-dialog {
    width: min(480px, 60vw);
    max-width: min(480px, 60vw);
    height: 100dvh;
    max-height: 100dvh;
    margin: 0 0 0 auto;
  }

  .field-theme .field-notification-sheet {
    height: 100dvh;
    max-height: 100dvh;
    padding-top: max(8px, env(safe-area-inset-top));
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 18px 0 0 18px;
  }

  .field-theme .field-notification-header {
    top: calc(-1 * max(8px, env(safe-area-inset-top)));
  }

  .field-theme .field-task-card > summary {
    min-height: 68px;
  }

  .field-theme .field-task-details dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-theme dialog.field-incident-dialog {
    width: min(100%, 760px);
  }

  .field-theme .field-incident-header {
    padding-top: max(9px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .field-theme .field-incident-header h2 {
    font-size: 20px;
  }

  .field-theme .field-incident-progress {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .field-theme .field-incident-body {
    padding-top: 12px;
    padding-bottom: 16px;
  }

  .field-theme .field-incident-step-heading h3 {
    font-size: 21px;
  }

  .field-theme .field-incident-photo-actions label {
    min-height: 92px;
  }

  .field-theme .field-incident-field textarea {
    min-height: 92px;
  }

  .field-theme .field-incident-footer {
    padding-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field-theme *,
  .field-theme *::before,
  .field-theme *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
