:root {
  --bg-top: #f7f0e4;
  --bg-bottom: #efe2cf;
  --panel: rgba(255, 252, 246, 0.9);
  --panel-strong: #fffaf2;
  --panel-border: rgba(125, 100, 77, 0.16);
  --panel-border-strong: rgba(125, 100, 77, 0.22);
  --text: #2b241f;
  --muted: #76685d;
  --brand: #5b47f0;
  --brand-strong: #4533d6;
  --brand-soft: #e9e6ff;
  --accent: #b86f33;
  --success-bg: #eef8f0;
  --success-border: #b7d9be;
  --success-text: #236a2f;
  --danger-bg: #fff0ed;
  --danger-border: #e7b2a9;
  --danger-text: #a03d33;
  --warning-bg: #fff6e7;
  --warning-border: #efd69a;
  --warning-text: #8a621f;
  --shadow-soft: 0 12px 30px rgba(63, 43, 22, 0.08);
  --shadow-panel: 0 24px 60px rgba(63, 43, 22, 0.1);
}

/* Утверждённый визуальный слой: панель владельца. */
.owner-dashboard,
.owner-detail-dashboard {
  --owner-bg: #f7f7fb;
  --owner-surface: #ffffff;
  --owner-border: #c9c3ef;
  --owner-border-soft: #e7e4f6;
  --owner-text: #1a1a2e;
  --owner-muted: #6b6b82;
  --owner-indigo: #5b47f0;
  --owner-indigo-deep: #3622c9;
  background: var(--owner-bg);
  color: var(--owner-text);
  border: 1px solid #dad7ee;
  border-radius: 30px;
  box-shadow: 0 18px 50px rgba(54, 34, 201, 0.13), 0 4px 14px rgba(27, 27, 46, 0.06);
}

.owner-dashboard .owner-hero,
.owner-detail-dashboard .owner-detail-hero {
  background: var(--owner-indigo);
  color: #fff;
  padding: 18px 16px 30px;
}

.owner-dashboard .tech-brand-title,
.owner-dashboard .tech-brand-subtitle,
.owner-dashboard .tech-user-name,
.owner-detail-dashboard .detail-machine-title,
.owner-detail-dashboard .detail-machine-model {
  color: #fff;
}

.owner-dashboard .tech-brand-subtitle,
.owner-detail-dashboard .detail-machine-model {
  opacity: 0.88;
}

.owner-dashboard .tech-user-pill,
.owner-detail-dashboard .detail-back-button,
.owner-detail-dashboard .owner-action-pill {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.owner-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 16px -12px;
  position: relative;
  z-index: 1;
}

.owner-quick-card {
  min-height: 72px;
  padding: 12px 8px;
  border: 1px solid var(--owner-border-soft);
  border-radius: 16px;
  background: var(--owner-surface);
  color: var(--owner-text);
  box-shadow: 0 4px 16px rgba(54, 34, 201, 0.08);
  font-weight: 800;
  font-size: 14px;
}

.owner-quick-card:active,
.owner-point-card:active {
  transform: scale(0.985);
}

.owner-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 26px 16px 0;
}

.owner-summary-card {
  display: grid;
  gap: 3px;
  min-height: 66px;
  padding: 10px 8px;
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.owner-summary-card strong {
  font-size: 22px;
  line-height: 1;
}

.owner-summary-neutral { background: #efebfe; color: #3622c9; }
.owner-summary-amber { background: #fff4d6; color: #8a5a00; }
.owner-summary-red { background: #fde8e7; color: #b3261e; }

.owner-dashboard .owner-list-wrap {
  gap: 14px;
  padding: 18px 16px 16px;
  background: var(--owner-bg);
}

.owner-dashboard .tech-list-head {
  color: var(--owner-muted);
}

.owner-dashboard .tech-list-head span:first-child {
  color: var(--owner-text);
  font-size: 14px;
  font-weight: 900;
}

.owner-dashboard .tech-point-list {
  gap: 12px;
}

.owner-point-card {
  display: grid;
  gap: 9px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--owner-border);
  border-radius: 16px;
  color: var(--owner-text);
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.owner-point-amber { background: linear-gradient(135deg, #fff9e8, #f8d978); border-color: #f3e4b0; }
.owner-point-red { background: linear-gradient(135deg, #fff3f1, #f5bbb7); border-color: #f4d1cf; }
.owner-point-green,
.owner-point-calm { background: linear-gradient(135deg, #f0fbf4, #aee3c2); border-color: #c6e6d0; }

.owner-point-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.owner-point-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.owner-point-chevron {
  font-size: 30px;
  line-height: 18px;
  color: #3a3a52;
}

.owner-point-meta {
  color: #3a3a52;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.owner-point-meta strong { color: var(--owner-text); }

.owner-point-badge {
  width: fit-content;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.owner-badge-amber { background: #ffe3a4; color: #8a5a00; }
.owner-badge-red { background: #f6d2d0; color: #b3261e; }
.owner-badge-green,
.owner-badge-calm { background: #cdedd8; color: #1b7a3d; }

.owner-dashboard .owner-logout {
  margin-top: 2px;
  border-color: var(--owner-border);
  background: #fff;
  color: var(--owner-indigo-deep);
}

.owner-detail-dashboard .detail-hero-date {
  color: rgba(255, 255, 255, 0.78);
}

.owner-detail-dashboard .owner-detail-actions-row {
  margin-top: 2px;
}

.owner-detail-dashboard .detail-body {
  gap: 16px;
  padding: 18px 16px 24px;
  background: var(--owner-bg);
}

.owner-detail-dashboard .detail-block {
  gap: 10px;
}

.owner-detail-dashboard .detail-block-title {
  padding-left: 9px;
  border-left: 4px solid var(--owner-indigo);
  color: var(--owner-text);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.owner-detail-dashboard .detail-block-subtitle {
  color: var(--owner-muted);
  font-size: 13px;
}

.owner-detail-dashboard .owner-stats-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.owner-detail-dashboard .owner-stat-box,
.owner-detail-dashboard .owner-role-card,
.owner-detail-dashboard .visit-history-card,
.owner-detail-dashboard .owner-kpi-link,
.owner-detail-dashboard .detail-form-card,
.owner-detail-dashboard .detail-task-card {
  border: 1px solid var(--owner-border-soft);
  border-radius: 16px;
  background: var(--owner-surface);
  box-shadow: 0 2px 8px rgba(54, 34, 201, 0.05);
}

.owner-detail-dashboard .owner-stat-box {
  padding: 12px;
}

.owner-detail-dashboard .owner-stat-num,
.owner-detail-dashboard .owner-role-name {
  color: var(--owner-text);
}

.owner-detail-dashboard .owner-stat-label,
.owner-detail-dashboard .owner-stat-period,
.owner-detail-dashboard .owner-role-title,
.owner-detail-dashboard .owner-role-metric span {
  color: var(--owner-muted);
}

.owner-detail-dashboard .owner-role-card { padding: 14px; }
.owner-detail-dashboard .owner-role-metric { background: #efebfe; }
.owner-detail-dashboard .owner-role-metric strong { color: var(--owner-indigo-deep); }

.owner-detail-dashboard .visit-history-card { gap: 0; overflow: hidden; }

.owner-detail-dashboard .detail-history-item {
  padding: 13px 14px;
  border-bottom: 1px solid var(--owner-border-soft);
}

.owner-detail-dashboard .detail-history-item:last-child { border-bottom: 0; }
.owner-detail-dashboard .detail-history-copy strong { color: var(--owner-text); }
.owner-detail-dashboard .detail-history-copy span { color: var(--owner-muted); }
.owner-detail-dashboard .owner-kpi-link { padding: 14px 16px; }
.owner-detail-dashboard .owner-kpi-link-text { color: var(--owner-indigo-deep); }

.owner-detail-dashboard .detail-save-visit,
.owner-detail-dashboard .primary {
  background: var(--owner-indigo);
  color: #fff;
}

@media (max-width: 480px) {
  .owner-dashboard,
  .owner-detail-dashboard {
    border-radius: 24px;
  }

  .owner-quick-card { min-height: 68px; font-size: 13px; }
  .owner-point-title { font-size: 18px; }
  .owner-detail-dashboard .owner-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body.technician-screen {
  background: #1f1f1f;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.owner-quick-card-primary {
  background: #174f82;
  border-color: #2d73ad;
  color: #fff;
}

.owner-task-create {
  min-height: 100vh;
  background: #f3f6f8;
  color: #162331;
}

.owner-task-create-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 32px clamp(24px, 5vw, 72px);
  background: #eaf2f8;
  border-bottom: 1px solid #d7e1e9;
}

.owner-task-create-header h2 {
  margin: 4px 0 8px;
}

.owner-task-create-header p {
  margin: 0;
  color: #5c6975;
}

.owner-task-create-kicker {
  color: #2d6792;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.owner-task-create-body {
  width: min(820px, calc(100% - 32px));
  margin: 24px auto;
}

.owner-task-create-form,
.owner-task-create-loading {
  padding: 28px;
  background: #fff;
  border: 1px solid #dce4ea;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgb(43 69 91 / 8%);
}

.owner-task-create-form {
  display: grid;
  gap: 20px;
}

.owner-task-create-form textarea {
  resize: vertical;
}

.owner-task-create-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff1f0;
  color: #9a2d27;
}

.owner-task-create-actions {
  display: flex;
  gap: 12px;
}

@media (max-width: 640px) {
  .owner-task-create {
    width: calc(100% + 12px);
    margin-left: -6px;
  }

  .owner-task-create-header {
    padding: 22px 18px;
  }

  .owner-task-create-body {
    width: calc(100% - 8px);
    margin: 12px auto 24px;
  }

  .owner-task-create-form,
  .owner-task-create-loading {
    padding: 18px 16px;
  }
}

.environment-banner {
  position: relative;
  z-index: 1000;
  width: 100%;
  padding: 5px 12px;
  border-bottom: 1px solid #eadfbf;
  background: #fff8e7;
  color: #745f2e;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.app-shell {
  max-width: 940px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.topbar,
.topbar-actions,
.panel-header,
.machine-detail-actions,
.inventory-actions,
.toolbar-row,
.login-actions,
.history-item-header,
.inventory-row,
.open-task-head,
.open-task-meta {
  display: flex;
  gap: 12px;
}

.topbar,
.panel-header,
.toolbar-row,
.history-item-header,
.inventory-row,
.open-task-head,
.open-task-meta {
  justify-content: space-between;
  align-items: flex-start;
}

.topbar {
  align-items: center;
  margin-bottom: 18px;
  padding: 10px 0 8px;
}

.topbar-copy {
  display: grid;
  gap: 4px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 30px;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 18px;
  line-height: 1.18;
}

.muted,
.panel-subtitle,
.machine-meta,
.machine-model,
.task-stock {
  color: var(--muted);
}

.muted,
.panel-subtitle {
  line-height: 1.45;
}

#sessionMeta {
  font-size: 17px;
}

.hidden {
  display: none !important;
}

#screenRoot {
  display: grid;
  gap: 18px;
}

.panel,
.machine-card,
.alert {
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(10px);
}

.panel {
  padding: 20px;
}

.alert {
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.alert.error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.alert.success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.alert.warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.auth-status {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.primary,
.secondary,
.ghost,
.machine-card {
  border-radius: 18px;
  padding: 13px 16px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.primary,
.secondary,
.ghost {
  border: 1px solid transparent;
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.machine-card:hover {
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(180deg, #6d5af5 0%, var(--brand) 100%);
  color: #fff;
  border-color: rgba(69, 51, 214, 0.42);
  box-shadow: 0 10px 20px rgba(91, 71, 240, 0.28);
}

.primary:hover {
  background: linear-gradient(180deg, #7968f7 0%, var(--brand-strong) 100%);
}

.secondary {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-color: rgba(91, 71, 240, 0.16);
}

.secondary:hover {
  background: #ddd8ff;
}

.ghost {
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  border-color: rgba(125, 100, 77, 0.14);
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
}

#syncButton {
  display: block;
  margin: 0 18px 12px auto;
}

#syncButton[data-sync-state="local"] {
  border-color: #e8c678;
  color: #62460b;
}

#syncButton[data-sync-state="syncing"] {
  border-color: #b8c8ed;
  color: #25488a;
}

#syncButton[data-sync-state="error"],
#syncButton[data-sync-state="action"] {
  border-color: #e7b2a9;
  color: #a03d33;
}

.sync-queue-panel {
  display: grid;
  gap: 8px;
  margin: 0 18px 14px;
  padding: 10px;
  border: 1px solid rgba(18, 49, 80, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.sync-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f4f7f9;
}

.sync-item-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 13px;
}

.sync-item-copy strong {
  color: var(--text);
}

.sync-item-problem {
  color: #8a4038;
}

.sync-retry-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
}

.compact-ghost {
  padding: 10px 14px;
  min-height: 44px;
}

.auth-form,
.field,
.machine-grid,
.inventory-list,
.history-list,
.task-list,
.task-create-form,
.open-task-list {
  display: grid;
  gap: 14px;
}

.field {
  gap: 8px;
}

.field label {
  font-size: 15px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(131, 111, 92, 0.22);
  border-radius: 16px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(30, 111, 115, 0.36);
  box-shadow: 0 0 0 4px rgba(30, 111, 115, 0.1);
  background: #fff;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.machine-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.machine-card {
  display: grid;
  gap: 6px;
  text-align: left;
  min-height: 94px;
  border: 1px solid rgba(125, 100, 77, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(252, 248, 241, 0.9) 100%);
  box-shadow: 0 10px 22px rgba(68, 48, 29, 0.06);
}

.machine-card.urgency-green {
  background: linear-gradient(180deg, #f7fcf7 0%, #eef8ef 100%);
  border-color: var(--success-border);
}

.machine-card.urgency-red {
  background: linear-gradient(180deg, #fff7f5 0%, #fff0ed 100%);
  border-color: var(--danger-border);
}

.machine-name,
.task-label {
  font-weight: 800;
  line-height: 1.3;
}

.machine-name {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.task-group {
  border-top: 1px solid rgba(131, 111, 92, 0.12);
  padding-top: 16px;
}

.task-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.task-group-header {
  margin-bottom: 12px;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(131, 111, 92, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.task-item input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.task-item-body {
  display: grid;
  gap: 5px;
}

.open-task-card {
  border: 1px solid rgba(131, 111, 92, 0.12);
  border-radius: 22px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.open-task-card.urgency-green {
  background: linear-gradient(180deg, #f7fcf7 0%, #eef8ef 100%);
  border-color: var(--success-border);
}

.open-task-card.urgency-red {
  background: linear-gradient(180deg, #fff7f5 0%, #fff0ed 100%);
  border-color: var(--danger-border);
}

.open-task-meta {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.task-chip {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.task-chip.green {
  background: #e8f6eb;
  color: var(--success-text);
}

.task-chip.yellow {
  background: #fff1d3;
  color: #8a5a09;
}

.task-chip.red {
  background: #fde6e1;
  color: var(--danger-text);
}

.open-task-card.urgency-yellow {
  background: linear-gradient(180deg, #fff8eb 0%, #fff1d7 100%);
  border-color: #efd7a6;
}

.history-item,
.inventory-row {
  border: 1px solid rgba(131, 111, 92, 0.12);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 250, 242, 0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.history-item ul {
  margin: 10px 0 0 18px;
  padding: 0;
}

.inventory-row input {
  width: 124px;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(131, 111, 92, 0.22);
  background: #fff;
  padding: 10px 12px;
  font-size: 17px;
  font-weight: 700;
  color: #2b241f;
}

.inventory-row p {
  margin-top: 4px;
}

.inventory-row-copy {
  display: grid;
  gap: 4px;
}

.inventory-row-title {
  color: #2b241f;
  font-size: 20px;
  line-height: 1.15;
}

.inventory-row-meta {
  color: #7e7166;
  font-size: 13px;
  line-height: 1.35;
}

.inventory-row-control {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.inventory-usage-total {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.inventory-usage-total strong {
  font-size: 22px;
  line-height: 1;
  color: #2b241f;
  font-weight: 800;
}

.inventory-row-label {
  color: #7e7166;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.inventory-actions-wrap {
  padding-top: 4px;
}

.inventory-save-button {
  width: 100%;
}

.performers-body {
  gap: 14px;
}

.performers-form {
  display: grid;
  gap: 14px;
}

.performers-list {
  display: grid;
  gap: 12px;
}

.performer-row {
  align-items: center;
}

.performer-row-copy {
  gap: 6px;
}

.performer-row-title {
  font-size: 22px;
}

.performer-row-meta {
  font-size: 13px;
}

.performer-row-control {
  min-width: 220px;
}

.performer-row-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.performer-stat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #efe6d8;
  color: #69584a;
  font-size: 13px;
  font-weight: 700;
}

.tech-dashboard {
  border-radius: 36px;
  overflow: hidden;
  background: #2a2927;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.tech-hero {
  background: #1c3a5e;
  padding: 18px 16px 14px;
  color: #fff;
  display: grid;
  gap: 12px;
}

.tech-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tech-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
}

.tech-brand-icon svg,
.tech-point-icon svg,
.tech-logout-icon svg {
  width: 24px;
  height: 24px;
}

.tech-brand-title {
  font-size: 15px;
  font-weight: 700;
}

.tech-brand-subtitle {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.tech-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.tech-user-copy {
  display: grid;
  gap: 1px;
}

.owner-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  font-weight: 700;
}

.owner-action-pill:hover {
  background: rgba(255, 255, 255, 0.16);
}

.kpi-dashboard,
.owner-detail-dashboard,
.inventory-dashboard,
.performers-dashboard {
  background: #2a2927;
}

.inventory-hero {
  gap: 14px;
}

.inventory-hero-copy {
  display: grid;
  gap: 4px;
}

.inventory-mode-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-mode-pill {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 700;
}

.inventory-mode-pill.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.inventory-hero-title {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.08;
}

.inventory-hero-subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.4;
}

.inventory-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.inventory-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: #8d8b88;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.inventory-month-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
}

.inventory-month-btn {
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.inventory-month-label {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.inventory-card-list {
  gap: 12px;
}

.inventory-focus-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  color: #e6e0d7;
  font-size: 14px;
  font-weight: 700;
}

.inventory-usage-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.inventory-usage-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 250, 242, 0.96);
  border: 0.5px solid rgba(125, 100, 77, 0.16);
  box-shadow: 0 8px 18px rgba(19, 15, 10, 0.12);
}

.inventory-usage-card strong {
  color: #2b241f;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.inventory-usage-card span {
  color: #76685d;
  font-size: 13px;
  line-height: 1.3;
}

.kpi-title-wrap {
  gap: 4px;
}

.kpi-month-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
}

.kpi-month-btn {
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1;
}

.kpi-month-label {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.kpi-content {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.kpi-section-label {
  padding: 2px 2px 4px;
  color: #8d8b88;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.kpi-tech-card,
.kpi-points-card {
  background: #2a2927;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.kpi-tech-card + .kpi-tech-card {
  margin-top: 8px;
}

.kpi-tech-header,
.kpi-points-header {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.kpi-tech-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #378add;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.kpi-tech-name,
.kpi-points-header,
.kpi-point-name {
  color: #e8e4de;
}

.kpi-tech-name {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
}

.kpi-tech-name small {
  display: block;
  margin-top: 3px;
  color: #9da8b3;
  font-size: 12px;
  font-weight: 500;
}

.kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
}

.kpi-row:last-child,
.kpi-point-row:last-child {
  border-bottom: none;
}

.kpi-row-label {
  font-size: 16px;
  color: #8d8b88;
}

.kpi-row-value {
  font-size: 20px;
  font-weight: 700;
}

.kpi-row-value.green {
  color: #97c459;
}

.kpi-row-value.red {
  color: #f09595;
}

.kpi-row-value.amber {
  color: #fac775;
}

.kpi-row-value.gray {
  color: #d6d0c7;
}

.kpi-machine-breakdown {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
}

.kpi-machine-breakdown-title {
  color: #8d8b88;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kpi-machine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.kpi-machine-row-name {
  color: #e8e4de;
  font-size: 15px;
  font-weight: 600;
}

.kpi-machine-row-count {
  color: #d7d0c7;
  font-size: 18px;
  font-weight: 800;
}

.kpi-machine-empty {
  color: #8d8b88;
  font-size: 14px;
  line-height: 1.4;
}

.kpi-points-header {
  font-size: 14px;
  font-weight: 700;
  color: #8d8b88;
}

.kpi-point-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
}

.kpi-point-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: none;
}

.kpi-point-dot.green {
  background: #639922;
}

.kpi-point-dot.amber {
  background: #ba7517;
}

.kpi-point-dot.red {
  background: #e24b4a;
}

.kpi-point-dot.gray {
  background: #66615a;
}

.kpi-point-name {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
}

.kpi-point-visits {
  font-size: 17px;
  font-weight: 700;
  color: #d7d0c7;
}

.kpi-point-last {
  font-size: 14px;
  color: #8d8b88;
}

.tech-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #378add;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tech-user-name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.tech-user-role {
  font-size: 10px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

.tech-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.tech-stat {
  display: grid;
  gap: 4px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tech-stat strong {
  color: #fff;
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
}

.tech-stat span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.2;
}

.tech-stat.red strong {
  color: #f09595;
}

.tech-stat.green strong {
  color: #c0dd97;
}

.tech-stat.yellow strong {
  color: #fac775;
}

.tech-list-wrap {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.owner-list-wrap {
  gap: 12px;
}

.tech-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #8d8b88;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tech-point-list {
  display: grid;
  gap: 14px;
}

.tech-point-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px 16px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: #2b2a28;
  color: #f4f0ea;
  text-align: left;
  box-shadow: none;
  min-height: 98px;
}

.tech-point-card.status-red {
  background: linear-gradient(180deg, #ffe3e3 0%, #ffd6d6 100%);
  border-color: #ef8e8e;
  color: #331313;
  box-shadow: 0 10px 24px rgba(194, 43, 43, 0.18);
}

.tech-point-card.status-yellow {
  background: #faeeda;
  border-color: #f1d296;
  color: #2b241f;
}

.tech-point-card.status-green {
  background: #eaf3de;
  border-color: #d3e6b0;
  color: #2b241f;
}

.tech-point-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #191919;
}

.tech-point-icon.status-red {
  background: #f7c1c1;
}

.tech-point-icon.status-yellow {
  background: #fac775;
}

.tech-point-icon.status-green {
  background: #c0dd97;
}

.tech-point-icon.status-gray {
  background: #191919;
}

.tech-point-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.tech-point-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.tech-point-status {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 600;
}

.tech-point-status.status-red {
  color: #8f1818;
}

.tech-point-status.status-yellow {
  color: #854f0b;
}

.tech-point-status.status-green {
  color: #3b6d11;
}

.tech-point-status.status-gray {
  color: #8d8b88;
}

.tech-point-tail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.tech-point-badge {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.tech-point-badge.status-red {
  background: #e24b4a;
  color: #fff;
}

.tech-point-badge.status-yellow {
  background: #ba7517;
  color: #fff;
}

.tech-point-badge.status-green {
  background: #639922;
  color: #fff;
}

.tech-point-badge.status-gray {
  background: #e9f3da;
  color: #3b6d11;
}

.tech-point-chevron {
  color: rgba(0, 0, 0, 0.36);
  font-size: 28px;
  line-height: 1;
}

.tech-point-card.status-red .tech-point-title {
  color: #5f1111;
}

.tech-point-card.status-red .tech-point-badge {
  background: #d92d2d;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(217, 45, 45, 0.12);
}

.tech-point-card.status-gray .tech-point-chevron {
  color: rgba(255, 255, 255, 0.5);
}

.tech-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  margin-top: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top-width: 0.5px;
  background: transparent;
  color: #9a9894;
}

/* Technician point list — mobile field UI refresh. Kept scoped to avoid changing owner screens. */
.technician-screen {
  background: #f4f7f8;
}

.technician-screen .tech-dashboard {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #f4f7f8;
  min-height: 100dvh;
}

.technician-screen .tech-hero {
  padding: 20px 20px 18px;
  background: linear-gradient(135deg, #273a7c 0%, #5b47f0 100%);
  border-radius: 0 0 24px 24px;
  gap: 16px;
  box-shadow: 0 10px 24px rgba(69, 51, 214, 0.24);
}

.technician-screen .tech-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.17);
}

.technician-screen .tech-brand-title {
  font-size: 18px;
  line-height: 1.15;
}

.technician-screen .tech-brand-subtitle,
.technician-screen .tech-user-name {
  font-size: 14px;
}

.technician-screen .tech-user-role {
  font-size: 12px;
}

.technician-screen .tech-user-avatar {
  width: 28px;
  height: 28px;
  background: #2aaeb3;
  font-size: 11px;
}

.technician-screen .tech-stats {
  gap: 8px;
}

.technician-screen .tech-stat {
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 3px 8px rgba(33, 25, 111, 0.14);
}

.technician-screen .tech-stat strong {
  color: #5b47f0;
  font-size: 24px;
}

.technician-screen .tech-stat span {
  color: #344957;
  font-size: 12px;
  line-height: 1.25;
}

.technician-screen .tech-stat.green strong { color: #237a44; }
.technician-screen .tech-stat.yellow strong { color: #9a6200; }
.technician-screen .tech-stat.red strong { color: #b52d35; }

.technician-screen .tech-stat.green {
  background: linear-gradient(135deg, rgba(207, 239, 217, 0.98) 0%, rgba(242, 252, 245, 0.96) 100%);
  border-color: rgba(118, 180, 137, 0.76);
}

.technician-screen .tech-stat.yellow {
  background: linear-gradient(135deg, rgba(255, 232, 171, 0.98) 0%, rgba(255, 248, 225, 0.96) 100%);
  border-color: rgba(212, 154, 33, 0.72);
}

.technician-screen .tech-stat.red {
  background: linear-gradient(135deg, rgba(255, 209, 213, 0.98) 0%, rgba(255, 242, 243, 0.96) 100%);
  border-color: rgba(215, 80, 80, 0.68);
}

.technician-screen .tech-list-wrap {
  gap: 12px;
  padding: 16px;
}

.tech-connection-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #b9d8d9;
  border-radius: 14px;
  background: #e8f5f5;
  color: #123150;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.tech-connection-status.is-offline {
  border-color: #e8c678;
  background: #fff5dc;
  color: #62460b;
}

.tech-connection-indicator {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 999px;
  background: #178a8d;
  box-shadow: 0 0 0 4px rgba(23, 138, 141, 0.13);
}

.is-offline .tech-connection-indicator {
  background: #b67505;
  box-shadow: 0 0 0 4px rgba(182, 117, 5, 0.14);
}

.tech-work-summary {
  margin: 0;
  color: #344957;
  font-size: 15px;
  line-height: 1.4;
}

.tech-work-summary strong {
  color: #123150;
  font-weight: 800;
}

.technician-screen .tech-list-head {
  color: #526570;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.technician-screen .tech-point-list {
  gap: 10px;
}

.technician-screen .tech-point-card {
  min-height: 116px;
  padding: 16px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid #dce5e8;
  border-left-width: 5px;
  border-radius: 16px;
  background: #fff;
  color: #172b38;
  box-shadow: 0 2px 5px rgba(18, 49, 80, 0.06);
}

.technician-screen .tech-point-card.status-red {
  border-color: #d75050;
  background: linear-gradient(135deg, rgba(215, 80, 80, 0.2) 0%, rgba(255, 255, 255, 0.96) 76%);
  color: #172b38;
  box-shadow: 0 4px 10px rgba(167, 40, 40, 0.12);
}

.technician-screen .tech-point-card.status-yellow {
  border-color: #d49a21;
  background: linear-gradient(135deg, rgba(237, 180, 44, 0.22) 0%, rgba(255, 255, 255, 0.96) 76%);
  color: #172b38;
  box-shadow: 0 4px 10px rgba(128, 82, 0, 0.1);
}

.technician-screen .tech-point-card.status-green {
  border-color: #3e9b62;
  background: #fff;
  color: #172b38;
}

.technician-screen .tech-point-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #edf4f5;
  color: #123150;
}

.technician-screen .tech-point-icon.status-red { background: #feeaea; color: #a72828; }
.technician-screen .tech-point-icon.status-yellow { background: #fff3d5; color: #8a5a00; }
.technician-screen .tech-point-icon.status-green { background: #e6f5eb; color: #1d7040; }

.technician-screen .tech-point-copy {
  gap: 3px;
}

.technician-screen .tech-point-title,
.technician-screen .tech-point-card.status-red .tech-point-title {
  color: #172b38;
  font-size: 18px;
  line-height: 1.25;
}

.tech-point-model {
  color: #607682;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.technician-screen .tech-point-status {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 800;
}

.technician-screen .tech-point-status.status-red { color: #a72828; }
.technician-screen .tech-point-status.status-yellow { color: #805200; }
.technician-screen .tech-point-status.status-green { color: #1d7040; }
.technician-screen .tech-point-status.status-gray { color: #526570; }

.technician-screen .tech-point-tail {
  gap: 6px;
}

.technician-screen .tech-point-badge {
  width: 34px;
  height: 34px;
  border: 1px solid #d9e3e6;
  background: #f4f7f8;
  color: #123150;
  font-size: 15px;
}

.technician-screen .tech-point-badge.status-red { border-color: #f0c3c3; background: #fff0f0; color: #a72828; }
.technician-screen .tech-point-badge.status-yellow { border-color: #f0d49d; background: #fff7e5; color: #805200; }
.technician-screen .tech-point-badge.status-green { border-color: #bee0ca; background: #edf8f0; color: #1d7040; }

.technician-screen .tech-point-chevron,
.technician-screen .tech-point-card.status-gray .tech-point-chevron {
  color: #607682;
  font-size: 24px;
}

.technician-screen .tech-logout {
  min-height: 48px;
  margin: 6px 0 0;
  border-color: #cfc9ff;
  background: #faf9ff;
  color: #4533d6;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(91, 71, 240, 0.08);
}

.owner-logout {
  margin-top: 10px;
}

.owner-detail-actions-row {
  margin-top: 2px;
}

.owner-stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.owner-stat-box {
  border-radius: 10px;
  border: 0.5px solid rgba(120, 108, 95, 0.18);
  background: #fffaf2;
  padding: 8px 9px;
}

.owner-stat-num {
  color: #2b241f;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.05;
}

.owner-stat-label {
  margin-top: 4px;
  color: #76685d;
  font-size: 9px;
}

.owner-stat-period {
  margin-top: 2px;
  color: #8d8b88;
  font-size: 9px;
  line-height: 1.35;
}

.owner-role-stats {
  display: grid;
  gap: 8px;
}

.owner-role-card {
  border-radius: 12px;
  border: 0.5px solid rgba(120, 108, 95, 0.18);
  background: #fffaf2;
  padding: 11px 12px;
  display: grid;
  gap: 10px;
}

.owner-role-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.owner-role-name {
  color: #2b241f;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.owner-role-title {
  margin-top: 3px;
  color: #76685d;
  font-size: 10px;
  line-height: 1.35;
}

.owner-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.owner-role-metric {
  border-radius: 10px;
  background: #f6efe2;
  padding: 8px 9px;
  display: grid;
  gap: 2px;
}

.owner-role-metric strong {
  color: #2b241f;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
}

.owner-role-metric span {
  color: #76685d;
  font-size: 10px;
  line-height: 1.3;
}

.owner-kpi-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0.5px solid rgba(120, 108, 95, 0.18);
  background: #fffaf2;
}

.owner-kpi-link-text {
  color: #185fa5;
  font-size: 11px;
  font-weight: 700;
}

.detail-dashboard {
  overflow: hidden;
  border-radius: 30px;
  background: #2b2a28;
  color: #f4f0ea;
  box-shadow: 0 20px 46px rgba(12, 14, 18, 0.22);
}

.detail-hero {
  display: grid;
  gap: 14px;
  padding: 16px 16px 18px;
  background: #1c3a5e;
}

.detail-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-back-button {
  min-height: 48px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.96);
  font-size: 14px;
  font-weight: 700;
}

.detail-hero-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-machine-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-machine-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex: none;
}

.detail-machine-icon svg {
  width: 28px;
  height: 28px;
}

.detail-machine-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.detail-machine-title {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.detail-machine-model {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  line-height: 1.2;
}

.detail-body {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #2b2a28;
}

.detail-block {
  display: grid;
  gap: 8px;
}

.detail-block-title {
  color: #8d8b88;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-block-subtitle {
  color: #76685d;
  font-size: 11px;
  line-height: 1.45;
}

.owner-checklist-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-action-pill.active {
  background: #1c3a5e;
  border-color: rgba(28, 58, 94, 0.22);
  color: #fff;
}

.detail-active-task,
.detail-form-card,
.service-card,
.notes-card,
.visit-history-card {
  border-radius: 12px;
  border: 0.5px solid rgba(120, 108, 95, 0.18);
  background: #fffaf2;
}

.detail-active-task {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.detail-active-task.urgency-red {
  background: #fcebeb;
  color: #791f1f;
}

.detail-active-task.urgency-yellow {
  background: #faeeda;
  color: #633806;
}

.detail-active-task.urgency-green {
  background: #eaf3de;
  color: #27500a;
}

.detail-active-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.detail-active-name {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
}

.detail-active-task.urgency-red .detail-active-name {
  color: #791f1f;
}

.detail-active-task.urgency-yellow .detail-active-name {
  color: #633806;
}

.detail-active-task.urgency-green .detail-active-name {
  color: #27500a;
}

.detail-active-badge {
  flex: none;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.detail-active-badge.red {
  background: #f7c1c1;
  color: #791f1f;
}

.detail-active-badge.yellow {
  background: #fac775;
  color: #633806;
}

.detail-active-badge.green {
  background: #c0dd97;
  color: #27500a;
}

.detail-active-description {
  font-size: 11px;
  line-height: 1.45;
}

.detail-active-description.muted-copy {
  opacity: 0.72;
}

.detail-active-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: rgba(32, 29, 27, 0.76);
  font-size: 10px;
  font-weight: 600;
}

.detail-active-task.urgency-red .detail-active-meta {
  color: #a32d2d;
}

.detail-active-task.urgency-yellow .detail-active-meta {
  color: #854f0b;
}

.detail-active-task.urgency-green .detail-active-meta {
  color: #3b6d11;
}

.detail-active-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-active-meta svg {
  width: 14px;
  height: 14px;
}

.task-completion-state {
  width: fit-content;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid #b9d8d9;
  border-radius: 10px;
  background: #e8f5f5;
  color: #123150;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.task-completion-state.state-pending {
  border-color: #e8c678;
  background: #fff5dc;
  color: #62460b;
}

.task-completion-state.state-processing {
  border-color: #b8c8ed;
  background: #eef3ff;
  color: #25488a;
}

.task-completion-state.state-confirmed {
  border-color: #b7d9be;
  background: #eef8f0;
  color: #236a2f;
}

.task-completion-state.state-requires_user_action,
.task-completion-state.state-business_error,
.task-completion-state.state-permanent_error,
.task-completion-state.state-retry_wait,
.task-completion-state.state-error {
  border-color: #e7b2a9;
  background: #fff0ed;
  color: #a03d33;
}

.visit-save-retry {
  margin: 8px 0 0;
}

.task-acknowledgment-state {
  width: fit-content;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.task-acknowledgment-state.state-opened,
.task-acknowledgment-state.state-pending,
.task-acknowledgment-state.state-retry_wait {
  border-color: #e8c678;
  background: #fff5dc;
  color: #62460b;
}

.task-acknowledgment-state.state-processing {
  border-color: #b8c8ed;
  background: #eef3ff;
  color: #25488a;
}

.task-acknowledgment-state.state-confirmed {
  border-color: #b7d9be;
  background: #eef8f0;
  color: #236a2f;
}

.task-acknowledgment-state.state-requires_user_action,
.task-acknowledgment-state.state-business_error,
.task-acknowledgment-state.state-permanent_error {
  border-color: #e7b2a9;
  background: #fff0ed;
  color: #a03d33;
}

.detail-task-card:not(.task-detail-open) .task-open-button {
  width: 100%;
}

.task-acknowledge-button {
  min-width: 148px;
}

.detail-active-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-active-actions button,
.machine-detail-actions button {
  min-height: 42px;
}

.detail-task-stack {
  display: grid;
  gap: 10px;
}

.secondary-task-card {
  padding-top: 11px;
  padding-bottom: 11px;
}

.detail-completion-box {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.detail-completion-label {
  color: rgba(32, 29, 27, 0.78);
  font-size: 10px;
  font-weight: 700;
}

.detail-completion-box textarea {
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  border: 0.5px solid rgba(120, 108, 95, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #2b241f;
  font-size: 11px;
  line-height: 1.45;
  resize: vertical;
}

.detail-completion-box textarea::placeholder {
  color: #9a9288;
}

.detail-completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-form-card,
.service-card,
.notes-card,
.visit-history-card {
  overflow: hidden;
}

.detail-form-card {
  padding: 12px;
}

.detail-task-form {
  display: grid;
  gap: 12px;
}

.service-card {
  display: grid;
}

.service-section + .service-section {
  border-top: 0.5px solid rgba(120, 108, 95, 0.14);
}

.service-section-head {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  background: #f6efe3;
  border-bottom: 0.5px solid rgba(120, 108, 95, 0.14);
}

.service-section-title {
  color: #6b665f;
  font-size: 10px;
  font-weight: 700;
}

.service-section-body {
  display: grid;
}

.service-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 10px;
  row-gap: 0;
  align-items: start;
  padding: 11px 12px;
  cursor: pointer;
}

.service-item.preview-item {
  cursor: default;
}

.service-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.service-checkbox-mark {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 5px;
  border: 1.5px solid rgba(124, 117, 109, 0.6);
  background: #fff;
  position: relative;
}

.service-checkbox-mark.preview {
  opacity: 0.58;
}

.service-item.checked .service-checkbox-mark {
  border-color: #639922;
  background: #639922;
}

.service-item.checked .service-checkbox-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(40deg);
}

.service-item-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.service-item-title {
  color: #2b241f;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.service-item-required {
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  color: #a03d33;
  background: #fff0ed;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.service-item.checked .service-item-title {
  color: #8d8b88;
  text-decoration: line-through;
}

.service-item-stock {
  color: #8d8b88;
  font-size: 11px;
  line-height: 1.4;
}

.service-divider {
  height: 0.5px;
  background: rgba(120, 108, 95, 0.14);
  margin: 0 12px;
}

/* Утверждённый визуальный слой: чек-лист визита техника. */
.detail-dashboard:not(.owner-detail-dashboard) .detail-hero {
  gap: 14px;
  padding: 16px 16px 18px;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(135deg, #273a7c, #5b47f0);
  box-shadow: 0 10px 24px rgba(69, 51, 214, 0.24);
}

.detail-dashboard:not(.owner-detail-dashboard) .detail-back-button {
  min-width: 48px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 15px;
}

.detail-dashboard:not(.owner-detail-dashboard) .detail-machine-title {
  font-size: 18px;
}

.detail-dashboard:not(.owner-detail-dashboard) .detail-machine-model {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.detail-current-task {
  display: grid;
  gap: 5px;
  margin-left: 52px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 12px rgba(31, 24, 105, 0.2);
}

.detail-current-task-label {
  color: #5542dd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-current-task .detail-active-task {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #172b38;
}

.detail-current-task .detail-active-head {
  display: block;
}

.detail-current-task .detail-active-name {
  display: block;
  color: #172b38;
  font-size: 19px;
  line-height: 1.2;
}

.detail-current-task .detail-active-badge {
  display: inline-flex;
  margin-top: 7px;
}

.detail-current-task .detail-active-description,
.detail-current-task .detail-active-meta {
  color: #607682;
}

.detail-current-task .detail-active-actions .primary {
  min-height: 42px;
  background: #5b47f0;
}

.detail-connection-status {
  margin: 14px 16px 0;
}

.detail-dashboard:not(.owner-detail-dashboard) .detail-body {
  gap: 16px;
  padding: 12px 16px 24px;
  background: #f4f7f8;
}

.detail-visit-progress {
  padding: 13px 14px;
  border: 1px solid #cfc9ff;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(91, 71, 240, 0.08);
}

.detail-visit-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 800;
}

.detail-visit-progress-head strong {
  color: #5b47f0;
}

.detail-visit-progress-track {
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e0ff;
}

.detail-visit-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4b37dc, #735ff7);
  box-shadow: 0 2px 5px rgba(91, 71, 240, 0.35);
  transition: width 160ms ease;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-card {
  display: grid;
  gap: 16px;
  border: 0;
  background: transparent;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-section + .service-section {
  border: 0;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-section-head {
  padding: 0 0 10px 9px;
  border: 0;
  border-left: 4px solid #5b47f0;
  background: transparent;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-section-title {
  color: #405866;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-section-body {
  gap: 8px;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-item {
  grid-template-columns: 28px 1fr;
  column-gap: 13px;
  min-height: 64px;
  padding: 14px;
  border: 1px solid #c9c3ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(18, 49, 80, 0.05);
}

.detail-dashboard:not(.owner-detail-dashboard) .service-checkbox-mark {
  width: 28px;
  height: 28px;
  margin-top: 0;
  border: 2px solid #3622c9;
  border-radius: 8px;
  background: #eef2ff;
  box-shadow: 0 1px 3px rgba(54, 34, 201, 0.2);
}

.detail-dashboard:not(.owner-detail-dashboard) .service-item.checked {
  border-color: transparent;
  background: linear-gradient(90deg, rgba(207, 239, 217, 0.72), rgba(255, 255, 255, 0.96));
  box-shadow: none;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-item.checked .service-checkbox-mark {
  border-color: #2f9a55;
  background: #2f9a55;
  box-shadow: none;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-item.checked .service-checkbox-mark::after {
  left: 8px;
  top: 4px;
  width: 7px;
  height: 12px;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-item.checked .service-item-title {
  color: #1d7040;
  text-decoration: none;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-item-title {
  color: #172b38;
  font-size: 16px;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-item-stock {
  color: #607682;
  font-size: 14px;
}

.detail-dashboard:not(.owner-detail-dashboard) .service-divider {
  display: none;
}

.notes-card {
  padding: 10px;
}

.notes-card textarea {
  width: 100%;
  min-height: 72px;
  padding: 11px 12px;
  border: 0.5px solid rgba(120, 108, 95, 0.18);
  border-radius: 8px;
  background: #f6efe3;
  color: #2b241f;
  font-size: 11px;
  line-height: 1.45;
  resize: vertical;
}

.notes-card textarea::placeholder {
  color: #9a9288;
}

.detail-save-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  background: #1c3a5e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(28, 58, 94, 0.22);
}

.detail-save-visit svg {
  width: 16px;
  height: 16px;
}

.visit-history-card {
  display: grid;
}

.detail-history-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.detail-history-item + .detail-history-item {
  border-top: 0.5px solid rgba(120, 108, 95, 0.14);
}

.detail-history-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.detail-history-dot.green {
  background: #639922;
}

.detail-history-dot.gray {
  background: #a5a19a;
}

.detail-history-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.detail-history-copy strong {
  color: #2b241f;
  font-size: 11px;
  line-height: 1.25;
}

.detail-history-copy span {
  color: #8d8b88;
  font-size: 10px;
  line-height: 1.4;
}

.detail-history-person {
  color: #2b241f;
  font-size: 11px;
  font-weight: 700;
}

.detail-history-type {
  color: #6b665f;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-history-note {
  color: #8d8b88;
  font-size: 10px;
  line-height: 1.4;
}

.detail-history-arrow {
  color: #8d8b88;
  font-size: 20px;
  line-height: 1;
}

.detail-history-empty {
  padding: 18px 12px;
  text-align: center;
  color: #8d8b88;
  font-size: 11px;
  line-height: 1.45;
}

.tech-logout-icon {
  display: inline-grid;
  place-items: center;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px 12px 28px;
  }

  .topbar,
  .topbar-actions,
  .toolbar-row,
  .panel-header,
  .machine-detail-actions,
  .inventory-actions,
  .login-actions,
  .open-task-head,
  .open-task-meta,
  .history-item-header,
  .inventory-row {
    flex-direction: column;
  }

  .topbar-actions,
  .toolbar-row {
    width: 100%;
  }

  .topbar-actions button,
  .toolbar-row button,
  .machine-detail-actions button,
  .inventory-actions button,
  .login-actions button {
    width: 100%;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 24px;
  }

  .panel {
    padding: 16px;
    border-radius: 24px;
  }

  .machine-grid {
    grid-template-columns: 1fr;
  }

  .machine-card {
    min-height: 82px;
  }

  .machine-name {
    font-size: 24px;
  }

  .inventory-row input {
    width: 100%;
  }

  .tech-dashboard {
    border-radius: 28px;
  }

  .tech-hero {
    padding: 16px 14px 12px;
  }

  .tech-list-wrap {
    padding: 12px;
  }

  .detail-hero {
    padding: 14px 12px 16px;
  }

  .detail-body {
    padding: 10px;
  }

  .detail-active-head,
  .detail-active-actions,
  .detail-top-row {
    gap: 8px;
  }

  .detail-active-actions,
  .machine-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-completion-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-active-actions button,
  .machine-detail-actions button {
    width: 100%;
  }

  .owner-actions-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .owner-action-pill {
    width: 100%;
    font-size: 20px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding: 12px 10px 24px;
  }

  .eyebrow {
    font-size: 11px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 22px;
  }

  .panel,
  .machine-card,
  .alert {
    border-radius: 22px;
  }

  .machine-card,
  .primary,
  .secondary,
  .ghost {
    min-height: 54px;
  }

  .machine-name {
    font-size: 22px;
  }

  .panel-subtitle,
  .task-stock,
  .open-task-meta,
  #sessionMeta {
    font-size: 14px;
  }

  .task-chip {
    width: 100%;
    text-align: center;
  }

  .tech-hero-row {
    align-items: flex-start;
  }

  .tech-user-pill {
    padding: 7px 9px;
  }

  .tech-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tech-stat strong {
    font-size: 24px;
  }

  .tech-stat span {
    font-size: 12px;
  }

  .owner-stats-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .owner-role-grid {
    grid-template-columns: 1fr;
  }

  .tech-point-card {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    padding: 20px 16px;
    gap: 16px;
    min-height: 108px;
  }

  .tech-point-icon {
    width: 56px;
    height: 56px;
  }

  .tech-brand-icon svg,
  .tech-point-icon svg {
    width: 28px;
    height: 28px;
  }

  .tech-list-head {
    font-size: 18px;
  }

  .inventory-section-head {
    font-size: 16px;
  }

  .inventory-hero-title {
    font-size: 24px;
  }

  .inventory-hero-subtitle {
    font-size: 16px;
  }

  .inventory-mode-pill,
  .inventory-month-label {
    font-size: 18px;
  }

  .inventory-row-title {
    font-size: 22px;
  }

  .inventory-row-meta,
  .inventory-row-label {
    font-size: 14px;
  }

  .tech-point-title {
    font-size: 22px;
  }

  .tech-point-status {
    font-size: 17px;
  }

  .tech-point-badge {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .detail-machine-title {
    font-size: 18px;
  }

  .detail-block-title {
    font-size: 11px;
  }

  .detail-active-name {
    font-size: 15px;
  }

  .detail-active-description,
  .notes-card textarea,
  .detail-completion-box textarea {
    font-size: 12px;
  }

  .service-item-title {
    font-size: 16px;
  }

  .service-item-stock,
  .detail-history-copy span {
    font-size: 12px;
  }

  .owner-action-pill,
  .tech-logout {
    min-height: 52px;
    font-size: 19px;
  }

  .inventory-row input {
    width: 100%;
    font-size: 18px;
  }

  .performer-row-title {
    font-size: 24px;
  }

  .performer-row-meta,
  .performer-stat-chip {
    font-size: 14px;
  }

  .inventory-focus-pill {
    font-size: 15px;
  }

  .inventory-usage-card strong {
    font-size: 26px;
  }

  .inventory-usage-card span {
    font-size: 14px;
  }

  .inventory-usage-total strong {
    font-size: 24px;
  }

  .kpi-month-label {
    font-size: 22px;
  }

  .kpi-section-label {
    font-size: 14px;
  }

  .kpi-tech-name {
    font-size: 19px;
  }

  .kpi-row-label {
    font-size: 17px;
  }

  .kpi-row-value {
    font-size: 22px;
  }

  .kpi-machine-breakdown-title {
    font-size: 13px;
  }

  .kpi-machine-row-name {
    font-size: 17px;
  }

  .kpi-machine-row-count {
    font-size: 20px;
  }

  .kpi-machine-empty {
    font-size: 15px;
  }

  .kpi-points-header {
    font-size: 15px;
  }

  .kpi-point-name,
  .kpi-point-visits {
    font-size: 18px;
  }

  .kpi-point-last,
  .tech-user-name {
    font-size: 15px;
  }
}

/* Каскадные переопределения owner-слоя должны идти после legacy-стилей. */
.owner-dashboard,
.owner-detail-dashboard {
  background: var(--owner-bg);
  color: var(--owner-text);
  border: 1px solid #dad7ee;
  border-radius: 30px;
  box-shadow: 0 18px 50px rgba(54, 34, 201, 0.13), 0 4px 14px rgba(27, 27, 46, 0.06);
}

.owner-dashboard .owner-hero,
.owner-detail-dashboard .owner-detail-hero {
  background: var(--owner-indigo);
  color: #fff;
  padding: 18px 16px 30px;
}

.owner-dashboard .tech-brand-title,
.owner-dashboard .tech-brand-subtitle,
.owner-dashboard .tech-user-name,
.owner-detail-dashboard .detail-machine-title,
.owner-detail-dashboard .detail-machine-model {
  color: #fff;
}

.owner-dashboard .tech-brand-subtitle,
.owner-detail-dashboard .detail-machine-model { opacity: 0.88; }

.owner-dashboard .tech-user-pill,
.owner-detail-dashboard .detail-back-button,
.owner-detail-dashboard .owner-action-pill {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.owner-dashboard .owner-list-wrap {
  gap: 14px;
  padding: 18px 16px 16px;
  background: var(--owner-bg);
}

.owner-dashboard .tech-list-head { color: var(--owner-muted); }
.owner-dashboard .tech-list-head span:first-child {
  color: var(--owner-text);
  font-size: 14px;
  font-weight: 900;
}
.owner-dashboard .tech-point-list { gap: 12px; }

.owner-detail-dashboard .detail-hero-date { color: rgba(255, 255, 255, 0.78); }
.owner-detail-dashboard .detail-body {
  gap: 16px;
  padding: 18px 16px 24px;
  background: var(--owner-bg);
}
.owner-detail-dashboard .detail-block { gap: 10px; }
.owner-detail-dashboard .detail-block-title {
  padding-left: 9px;
  border-left: 4px solid var(--owner-indigo);
  color: var(--owner-text);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.owner-detail-dashboard .detail-block-subtitle { color: var(--owner-muted); font-size: 13px; }
.owner-detail-dashboard .owner-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.owner-detail-dashboard .owner-stat-box,
.owner-detail-dashboard .owner-role-card,
.owner-detail-dashboard .visit-history-card,
.owner-detail-dashboard .owner-kpi-link,
.owner-detail-dashboard .detail-form-card,
.owner-detail-dashboard .detail-task-card {
  border: 1px solid var(--owner-border-soft);
  border-radius: 16px;
  background: var(--owner-surface);
  box-shadow: 0 2px 8px rgba(54, 34, 201, 0.05);
}
.owner-detail-dashboard .owner-stat-box { padding: 12px; }
.owner-detail-dashboard .owner-stat-num,
.owner-detail-dashboard .owner-role-name { color: var(--owner-text); }
.owner-detail-dashboard .owner-stat-label,
.owner-detail-dashboard .owner-stat-period,
.owner-detail-dashboard .owner-role-title,
.owner-detail-dashboard .owner-role-metric span { color: var(--owner-muted); }
.owner-detail-dashboard .owner-role-card { padding: 14px; }
.owner-detail-dashboard .owner-role-metric { background: #efebfe; }
.owner-detail-dashboard .owner-role-metric strong { color: var(--owner-indigo-deep); }
.owner-detail-dashboard .visit-history-card { gap: 0; overflow: hidden; }
.owner-detail-dashboard .detail-history-item { padding: 13px 14px; border-bottom: 1px solid var(--owner-border-soft); }
.owner-detail-dashboard .detail-history-item:last-child { border-bottom: 0; }
.owner-detail-dashboard .detail-history-copy strong { color: var(--owner-text); }
.owner-detail-dashboard .detail-history-copy span { color: var(--owner-muted); }
.owner-detail-dashboard .owner-kpi-link { padding: 14px 16px; }
.owner-detail-dashboard .owner-kpi-link-text { color: var(--owner-indigo-deep); }
.owner-detail-dashboard .detail-save-visit,
.owner-detail-dashboard .primary { background: var(--owner-indigo); color: #fff; }

/* Package 2B: owner-only, read-only task communication status. */
.owner-task-control {
  min-height: calc(100vh - 28px);
  background: #f7f7fb;
  color: #1a1a2e;
}

.owner-task-control-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px 24px;
  background: #5b47f0;
  color: #fff;
}

.owner-task-control-header h2 {
  margin: 4px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
}

.owner-task-control-header p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.owner-task-control-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.owner-task-control-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.owner-task-control-actions .secondary {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.owner-task-control-actions .primary {
  background: #fff;
  color: #3622c9;
}

.owner-task-control-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px 0;
  color: #6b6b82;
  font-size: 13px;
}

.owner-scheduler-status,
.owner-reminder-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border: 1px solid #e7e4f6;
  border-radius: 0.8rem;
  background: #fff;
}

.owner-scheduler-status strong {
  color: #1a1a2e;
}

.owner-scheduler-status {
  margin: 12px 32px 0;
}

.owner-reminder-summary {
  margin-top: 1rem;
}

.owner-reminder-summary ul {
  width: 100%;
  margin: 0;
  padding-left: 1.25rem;
}

.owner-read-only-badge {
  padding: 5px 9px;
  border: 1px solid #c9c3ef;
  border-radius: 999px;
  background: #efebfe;
  color: #3622c9;
  font-weight: 800;
}

.owner-task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 32px;
}

.owner-task-filters button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #d8d5e9;
  border-radius: 12px;
  background: #fff;
  color: #47465c;
  font-weight: 700;
}

.employee-create-form,
.employee-edit-form,
.employee-account-form {
  display: grid;
  gap: 12px;
}

.employee-create-form {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel-strong);
}

.employee-create-details {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel-strong);
}

.employee-create-details > summary {
  min-height: 44px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.employee-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.employee-form-grid label,
.employee-edit-form label,
.employee-account-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.employee-form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.employee-row {
  align-items: start;
  gap: 18px;
}

.employee-row-disabled {
  opacity: 0.72;
}

.employee-row-heading,
.employee-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.employee-state {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.employee-state.active {
  color: #17643a;
  background: #dff6e8;
}

.employee-state.disabled {
  color: #7a3d29;
  background: #f9e6df;
}

.employee-edit-form {
  min-width: min(100%, 320px);
}

.employee-edit-details {
  min-width: min(100%, 360px);
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel-strong);
}

.employee-edit-details > summary {
  min-height: 40px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.employee-edit-details[open] > summary {
  margin-bottom: 12px;
}

.employee-account-details {
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid var(--panel-border);
}

.employee-account-details summary {
  cursor: pointer;
  font-weight: 700;
}

.employee-account-form {
  max-width: 520px;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .employee-form-grid {
    grid-template-columns: 1fr;
  }

  .employee-create-form,
  .employee-row {
    padding: 16px;
  }

  .employee-edit-form,
  .employee-card-actions,
  .employee-card-actions button {
    width: 100%;
  }
}

.owner-task-filters button.active {
  border-color: #5b47f0;
  background: #5b47f0;
  color: #fff;
}

.owner-task-control-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 2fr);
  gap: 18px;
  padding: 0 32px 32px;
}

.owner-task-status-list,
.owner-task-status-details {
  min-width: 0;
  border: 1px solid #e1dfec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(47, 36, 111, 0.06);
}

.owner-task-status-list {
  align-self: start;
  overflow: hidden;
}

.owner-task-status-list-head {
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #eceaf5;
}

.owner-task-status-list-head span {
  color: #6b6b82;
}

.owner-task-status-card {
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid #e4e7ec;
  border-left: 4px solid transparent;
  border-radius: 18px;
  background: #fff;
  color: #1a1a2e;
  text-align: left;
}

.owner-task-status-card:hover,
.owner-task-status-card.active {
  border-left-color: #5b47f0;
  background: #f7f5ff;
}

#ownerTaskStatusList {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.owner-task-status-card > span:not(.owner-task-status-card-flags) {
  color: #6b6b82;
  font-size: 13px;
}

.owner-task-status-point {
  color: #3622c9 !important;
  font-weight: 800;
}

.owner-task-status-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.owner-mini-status {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.owner-mini-status.ok {
  background: #e5f4e9;
  color: #1e6c3b;
}

.owner-mini-status.muted {
  background: #f0eff4;
  color: #6b6b82;
}

.owner-task-status-details {
  align-self: start;
  padding: 26px;
}

.owner-task-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.owner-task-detail-heading span {
  color: #6b6b82;
  font-size: 13px;
}

.owner-task-detail-heading h3 {
  margin: 5px 0 0;
  font-size: 28px;
}

.owner-main-task-status {
  padding: 7px 10px;
  border-radius: 10px;
  background: #efebfe;
  color: #3622c9 !important;
  font-weight: 800;
  white-space: nowrap;
}

.owner-task-description {
  margin: 14px 0 0;
  color: #555469;
}

.owner-task-core-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.owner-task-core-fields div {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f7fb;
}

.owner-task-core-fields dt {
  margin-bottom: 4px;
  color: #6b6b82;
  font-size: 12px;
}

.owner-task-core-fields dd {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.owner-acknowledgment-timing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  margin: 0 0 18px;
  padding: 13px 14px;
  border: 1px solid #e7e4f6;
  border-left-width: 4px;
  border-radius: 12px;
}

.owner-acknowledgment-timing > span {
  color: #6b6b82;
}

.owner-acknowledgment-timing > strong {
  text-align: right;
}

.owner-acknowledgment-timing > small {
  grid-column: 1 / -1;
  color: #77758a;
}

.owner-acknowledgment-timing.tone-ok {
  border-left-color: #2b8751;
  background: #f3fbf6;
}

.owner-acknowledgment-timing.tone-warning {
  border-left-color: #c06f14;
  background: #fff8ea;
}

.owner-acknowledgment-timing.tone-error {
  border-left-color: #b3261e;
  background: #fff5f4;
}

.owner-acknowledgment-timing.tone-muted {
  border-left-color: #a09dab;
  background: #faf9fc;
}

.owner-communication-timeline {
  display: grid;
  gap: 9px;
}

.owner-communication-fact {
  padding: 13px 14px;
  border: 1px solid #e7e4f6;
  border-left-width: 4px;
  border-radius: 12px;
}

.owner-communication-fact.tone-ok {
  border-left-color: #2b8751;
  background: #f3fbf6;
}

.owner-communication-fact.tone-error {
  border-left-color: #b3261e;
  background: #fff5f4;
}

.owner-communication-fact.tone-warning {
  border-left-color: #c06f14;
  background: #fff8ea;
}

.owner-communication-fact.tone-muted {
  border-left-color: #a09dab;
  background: #faf9fc;
}

.owner-communication-fact-head,
.owner-communication-fact-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.owner-communication-fact-head strong {
  text-align: right;
}

.owner-communication-fact-meta {
  margin-top: 5px;
  color: #77758a;
  font-size: 12px;
}

.owner-task-read-only-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #eceaf5;
  color: #6b6b82;
  font-size: 13px;
}

.owner-task-change-panel,
.owner-acceptance-panel,
.owner-task-history {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #e4e1f2;
  border-radius: 14px;
  background: #fbfaff;
}

.owner-task-change-panel > p,
.owner-acceptance-panel > p,
.owner-task-history-empty {
  margin: 8px 0 0;
  color: #6b6b82;
  font-size: 13px;
}

.owner-task-change-heading,
.owner-task-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.owner-task-change-heading > div:first-child {
  display: grid;
  gap: 3px;
}

.owner-task-change-heading span,
.owner-task-history-heading span {
  color: #6b6b82;
  font-size: 12px;
}

.owner-task-change-actions,
.owner-task-change-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-task-change-actions button,
.owner-task-change-form-actions button {
  width: auto;
}

.owner-task-change-actions .danger,
.owner-task-change-form-actions .danger {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.owner-task-change-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e4e1f2;
}

.owner-task-current-value {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  background: #f1eff9;
}

.owner-task-current-value span {
  color: #6b6b82;
  font-size: 12px;
}

.owner-task-change-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff0f0;
  color: #a12222;
  font-size: 13px;
}

.owner-task-change-locked {
  color: #6b6b82 !important;
}

.owner-task-history-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.owner-task-history-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
}

.owner-task-history-item > div {
  display: grid;
  gap: 3px;
}

.owner-task-history-item span,
.owner-task-history-item small {
  color: #6b6b82;
  font-size: 12px;
}

.owner-task-history-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #5a45d6;
  box-shadow: 0 0 0 1px #5a45d6;
}

.owner-task-empty {
  padding: 28px 18px;
  color: #6b6b82;
  text-align: center;
}

.owner-task-empty-details {
  display: grid;
  min-height: 300px;
  place-items: center;
}

.owner-proof-level-help,
.owner-task-proof-facts {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  color: #6b6b82;
  font-size: 13px;
  line-height: 1.4;
}

.task-proof-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #d9d3ff;
  border-radius: 999px;
  background: #f3f0ff;
  color: #4f3cc9;
  font-size: 12px;
  font-weight: 700;
}

.task-proof-badge.proof-controlled {
  border-color: #b9d9ef;
  background: #edf8ff;
  color: #155f8d;
}

.task-proof-badge.proof-important {
  border-color: #f0c4a4;
  background: #fff3e9;
  color: #9b4b14;
}

.task-proof-requirements {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e5e2f4;
  border-radius: 14px;
  background: #faf9ff;
}

.task-proof-requirements p {
  margin: 0;
  color: #6b6b82;
  font-size: 13px;
  line-height: 1.4;
}

.task-proof-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #dedbea;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  line-height: 1.35;
}

.task-proof-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 20px;
}

.task-external-report-note,
.owner-task-proof-summary small {
  color: #6b6b82;
  font-size: 12px;
  line-height: 1.4;
}

.task-proof-error {
  margin: 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
}

.owner-task-proof-summary {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #ddd9ed;
  border-radius: 14px;
  background: #faf9ff;
}

.owner-task-proof-summary p,
.owner-task-proof-summary small {
  margin: 0;
}

.owner-task-waiting-acceptance {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #f0c4a4;
  border-radius: 14px;
  background: #fff3e9;
  color: #8d420f;
  font-weight: 800;
}

.owner-task-returned,
.owner-task-accepted,
.task-acceptance-state {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e4e1f2;
  border-radius: 14px;
  font-weight: 800;
}

.owner-task-returned,
.task-acceptance-state.returned {
  border-color: #efb8b3;
  background: #fff5f4;
  color: #922b21;
}

.owner-task-accepted,
.task-acceptance-state.accepted {
  border-color: #a8d8ba;
  background: #f3fbf6;
  color: #246d43;
}

.task-acceptance-state.waiting {
  border-color: #f0c4a4;
  background: #fff3e9;
  color: #8d420f;
}

.task-acceptance-state span,
.task-acceptance-state small,
.owner-task-returned span {
  font-weight: 500;
  line-height: 1.4;
}

@media (max-width: 820px) {
  .owner-task-control-header {
    flex-direction: column;
    padding: 22px 18px;
  }

  .owner-task-control-meta,
  .owner-task-filters {
    padding-right: 18px;
    padding-left: 18px;
  }

  .owner-task-control-layout {
    grid-template-columns: 1fr;
    padding: 0 18px 24px;
  }

  .owner-task-core-fields {
    grid-template-columns: 1fr;
  }

  .owner-task-change-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-task-change-actions button,
  .owner-task-change-form-actions button {
    flex: 1 1 180px;
  }
}
.owner-telegram-preview {
  min-height: 100vh;
  padding: 32px;
  background: #f4f7fb;
  color: #10233d;
}

.owner-telegram-preview-header,
.owner-telegram-preview-card-head,
.owner-telegram-preview-meta,
.owner-telegram-preview-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.owner-telegram-preview-header {
  padding: 24px;
  border-radius: 20px;
  background: #10233d;
  color: #fff;
}

.owner-telegram-preview-header h2 {
  margin: 6px 0;
}

.owner-telegram-preview-header p {
  margin: 0;
  color: #c8d7e8;
}

.owner-telegram-preview-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 18px 0;
  color: #53657a;
}

.owner-telegram-preview-filter {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(220px, 420px);
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.owner-telegram-preview-filter select {
  min-height: 44px;
  border: 1px solid #c9d5e3;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
}

.owner-telegram-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.owner-telegram-preview-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #d8e2ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 35, 61, 0.06);
}

.owner-telegram-preview-card-head span,
.owner-telegram-preview-card-meta,
.owner-telegram-preview-card small {
  color: #65758a;
  font-size: 13px;
}

.owner-telegram-preview-card pre {
  margin: 0;
  min-height: 150px;
  white-space: pre-wrap;
  font: inherit;
  line-height: 1.5;
  color: #10233d;
}

.owner-telegram-preview-card a {
  color: #0b67c2;
  font-weight: 700;
}

@media (max-width: 720px) {
  .owner-telegram-preview {
    padding: 16px;
  }

  .owner-telegram-preview-header,
  .owner-telegram-preview-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .owner-telegram-preview-filter {
    grid-template-columns: 1fr;
  }
}
/* VendPult mobile UX simplification — physical Samsung S24 Ultra test */
.mobile-workspace {
  --mobile-ink: #17233a;
  --mobile-muted: #667085;
  --mobile-border: #e4e7ec;
  --mobile-surface: #ffffff;
  --mobile-bg: #f6f7fb;
  width: min(100%, 760px);
  min-height: calc(100dvh - 42px);
  margin: 0 auto;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  color: var(--mobile-ink);
  background: var(--mobile-bg);
  box-shadow: none;
}

.mobile-workspace *,
.owner-task-control * {
  box-sizing: border-box;
}

.mobile-offline-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 16px;
  border-bottom: 1px solid #d7e9e8;
  color: #24615e;
  background: #eef8f7;
  font-size: 12px;
  font-weight: 700;
}

.mobile-offline-strip > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2aa198;
}

.mobile-offline-strip.is-offline {
  color: #7a4d00;
  border-color: #f1d590;
  background: #fff7df;
}

.mobile-offline-strip.is-offline > span {
  background: #d18b00;
}

.mobile-workspace-header,
.mobile-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--mobile-border);
  background: var(--mobile-surface);
}

.mobile-detail-header {
  flex-wrap: wrap;
}

.mobile-workspace-header h1,
.mobile-detail-header h1 {
  max-width: 100%;
  margin: 2px 0 4px;
  color: var(--mobile-ink);
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.mobile-workspace-header p,
.mobile-detail-header p {
  margin: 0;
  color: var(--mobile-muted);
  font-size: 14px;
  line-height: 1.4;
}

.mobile-kicker {
  display: block;
  color: #5b45e8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mobile-workspace-content {
  display: grid;
  gap: 20px;
  padding: 18px 16px 28px;
}

.mobile-header-action,
.mobile-back-button,
.mobile-text-action {
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #4f3ddb;
  background: #f0edff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-back-button {
  flex: 0 0 auto;
}

.mobile-primary-action,
.mobile-secondary-action,
.mobile-task-primary {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.mobile-primary-action,
.mobile-task-primary {
  color: #fff;
  background: #5b45e8;
  box-shadow: 0 8px 22px rgba(91, 69, 232, 0.2);
}

.mobile-secondary-action {
  color: #293150;
  border: 1px solid #d8dbe5;
  background: #fff;
}

.owner-primary-sections {
  display: grid;
}

.owner-inventory-shortcut {
  border-color: #cfc7ff;
  background: #f7f5ff;
}

.owner-build-marker {
  margin: 4px 4px 0;
  color: var(--mobile-muted);
  font-size: 12px;
  text-align: center;
}

.owner-attention-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.owner-attention-summary article {
  min-width: 0;
  padding: 14px 10px;
  border: 1px solid var(--mobile-border);
  border-radius: 14px;
  background: #fff;
}

.owner-attention-summary strong,
.owner-attention-summary span {
  display: block;
}

.owner-attention-summary strong {
  margin-bottom: 4px;
  font-size: 24px;
}

.owner-attention-summary span {
  color: var(--mobile-muted);
  font-size: 11px;
  line-height: 1.25;
}

.mobile-section {
  min-width: 0;
}

.mobile-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mobile-section-heading span {
  color: var(--mobile-muted);
  font-size: 12px;
}

.mobile-section-heading h2 {
  margin: 2px 0 0;
  color: var(--mobile-ink);
  font-size: 20px;
}

.mobile-task-list,
.mobile-point-list,
.mobile-menu-list {
  display: grid;
  gap: 12px;
}

.mobile-task-card,
.mobile-point-row,
.mobile-menu-row {
  width: 100%;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--mobile-border);
  border-radius: 20px;
  color: var(--mobile-ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 7px 20px rgba(17, 24, 39, 0.07);
}

button.mobile-task-card,
.mobile-point-row,
.mobile-menu-row {
  cursor: pointer;
}

.mobile-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: start;
}

.technician-today-task-card {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
}

.technician-today-task-card.tech-point-card {
  display: grid;
  min-height: 0;
}

.technician-today-task-card > * {
  min-width: 0;
  width: 100%;
}

.technician-today-task-card.is-current {
  border: 2px solid #5b45e8;
  box-shadow: 0 9px 26px rgba(91, 69, 232, 0.13);
}

.mobile-task-card-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.mobile-task-card-main strong {
  color: var(--mobile-ink);
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.mobile-task-card-main span {
  color: var(--mobile-muted);
  font-size: 13px;
  line-height: 1.35;
}

.completed-result-card {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.completed-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.completed-result-heading .human-status {
  flex: 0 0 auto;
  text-align: right;
}

.completed-result-type {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #4f3ddb !important;
  background: #eeebff;
  font-size: 11px !important;
  font-weight: 800;
}

.completed-result-point {
  margin-top: 4px;
  color: var(--mobile-ink) !important;
  font-size: 15px !important;
  font-weight: 800;
}

.completed-result-address,
.completed-result-time {
  font-size: 14px !important;
}

.completed-result-time {
  margin-top: 4px;
  color: #285c78 !important;
  font-weight: 700;
}

.completed-result-details {
  display: grid;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid #e5e8ef;
  color: var(--mobile-muted);
  font-size: 13px;
  line-height: 1.4;
}

.completed-result-details b {
  color: var(--mobile-ink);
}

.mobile-task-card-side,
.mobile-task-card-status {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--mobile-muted);
  font-size: 11px;
}

.mobile-task-primary,
.mobile-task-readonly-state,
.mobile-return-reason {
  grid-column: 1 / -1;
}

.mobile-task-readonly-state {
  padding: 11px 13px;
  border-radius: 12px;
  color: #285c78;
  background: #eaf5fb;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.mobile-return-reason {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: #8d2d2d;
  background: #fff0f0;
  font-size: 13px;
  line-height: 1.4;
}

.current-task-label {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #4f3ddb !important;
  background: #eeebff;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.human-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.human-status.tone-green,
.human-task-state.tone-green {
  color: #177245;
  background: #e9f8ef;
}

.human-status.tone-amber,
.human-task-state.tone-amber {
  color: #8a5a00;
  background: #fff4d6;
}

.human-status.tone-red,
.human-task-state.tone-red {
  color: #a52c2c;
  background: #ffeded;
}

.human-status.tone-blue,
.human-task-state.tone-blue {
  color: #285c78;
  background: #eaf5fb;
}

.human-status.tone-purple,
.human-task-state.tone-purple {
  color: #6c3cb4;
  background: #f3eaff;
}

.technician-today-task-card.urgency-amber,
.owner-task-status-card.urgency-amber {
  border-left: 4px solid #e6a23c;
}

.technician-today-task-card.urgency-red,
.owner-task-status-card.urgency-red {
  border-left: 4px solid #d64444;
  background: #fff7f7;
}

.technician-today-task-card.urgency-purple,
.owner-task-status-card.urgency-purple {
  border-left: 4px solid #8153c7;
  background: #fbf8ff;
}

.technician-today-task-card.urgency-blue,
.owner-task-status-card.urgency-blue {
  border-left: 4px solid #4282b5;
  background: #f7fbff;
}

.technician-today-task-card.urgency-green,
.owner-task-status-card.urgency-green {
  border-left: 4px solid #4b9b6b;
}

.technician-today-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--mobile-border);
  border-radius: 14px;
  background: #fff;
}

.technician-today-summary strong {
  font-size: 24px;
}

.technician-today-summary > span:not(.human-status) {
  flex: 1;
  color: var(--mobile-muted);
  font-size: 14px;
}

.mobile-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  color: #4f3ddb;
  background: #eeebff;
  font-size: 15px;
  font-weight: 900;
}

.mobile-point-row,
.mobile-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  border: 1px solid var(--mobile-border);
  font: inherit;
}

.mobile-point-row > span:first-child,
.mobile-menu-row > span:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.mobile-point-row strong,
.mobile-menu-row strong {
  color: var(--mobile-ink);
  font-size: 15px;
}

.mobile-point-row small,
.mobile-menu-row small {
  color: var(--mobile-muted);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.mobile-empty-state,
.mobile-info-note {
  padding: 18px;
  border: 1px dashed #cfd4df;
  border-radius: 14px;
  color: var(--mobile-muted);
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.mobile-info-note {
  border-style: solid;
  color: #604700;
  background: #fff8df;
  text-align: left;
}

.mobile-bottom-nav {
  position: fixed;
  z-index: 40;
  right: 50%;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 760px);
  min-height: 74px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid #dfe3eb;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -6px 18px rgba(17, 24, 39, 0.07);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.owner-mobile-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.technician-mobile-nav {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.technician-today-task-card {
  scroll-margin-bottom: calc(116px + env(safe-area-inset-bottom));
}

.technician-today-task-card .mobile-task-primary {
  position: relative;
  z-index: 41;
}

.mobile-bottom-nav button {
  min-width: 0;
  min-height: 52px;
  padding: 8px 4px;
  border: 0;
  border-radius: 12px;
  color: #70798b;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-bottom-nav button.active {
  color: #4f3ddb;
  background: #eeebff;
}

.task-next-step-note {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-left: 4px solid #5b45e8;
  border-radius: 12px;
  background: #f0edff;
}

.task-next-step-note strong {
  color: #4f3ddb;
  font-size: 12px;
  text-transform: uppercase;
}

.task-next-step-note span {
  color: #293150;
  font-size: 14px;
  line-height: 1.4;
}

.task-detail-screen .detail-active-task {
  padding: 16px;
  border: 1px solid var(--mobile-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.task-detail-screen .detail-active-head {
  align-items: flex-start;
}

.task-detail-screen .detail-active-name {
  font-size: 18px;
  line-height: 1.25;
}

.task-detail-screen .detail-active-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.task-detail-screen .detail-active-actions button,
.task-detail-screen .detail-completion-actions button {
  min-height: 52px;
}

.task-detail-screen .task-acknowledgment-state {
  border: 0;
  font-size: 13px;
}

.task-detail-screen .mobile-visit-link {
  width: 100%;
  min-height: 50px;
}

.mobile-details {
  border: 1px solid var(--mobile-border);
  border-radius: 14px;
  background: #fff;
}

.mobile-details summary {
  min-height: 50px;
  padding: 15px;
  color: #4f3ddb;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.mobile-details dl {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0 15px 15px;
}

.mobile-details dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mobile-details dt,
.mobile-details dd {
  margin: 0;
  color: var(--mobile-muted);
  font-size: 12px;
}

.mobile-details dd {
  color: var(--mobile-ink);
  text-align: right;
}

.visit-report-screen .detail-body {
  padding: 18px 16px 28px;
}

.visit-report-screen .detail-block {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.visit-report-screen .service-card,
.visit-report-screen .notes-card,
.visit-report-screen .detail-visit-progress {
  border: 1px solid var(--mobile-border);
  border-radius: 14px;
  background: #fff;
}

.visit-report-screen .detail-save-visit {
  min-height: 54px;
}

.owner-task-control {
  width: min(100%, 1240px);
  min-height: calc(100dvh - 42px);
  margin: 0 auto;
  padding: 18px 16px 32px;
  color: #17233a;
  background: #f6f7fb;
}

.owner-task-control-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 18px;
  padding: 18px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: #fff;
  color: #17233a;
}

.owner-task-control-kicker {
  color: #6b5be7;
}

.owner-task-control-back {
  min-width: 48px;
  min-height: 48px;
  align-self: start;
}

.owner-task-control-heading {
  min-width: 0;
}

.owner-task-control-header h2 {
  margin: 4px 0;
  font-size: 28px;
}

.owner-task-control-header p {
  margin: 0;
  color: #667085;
}

.owner-task-control-actions {
  display: flex;
  gap: 8px;
}

.owner-task-control-actions button {
  min-height: 44px;
}

.owner-task-control-meta {
  justify-content: flex-end;
  padding: 8px 4px;
  color: #667085;
  font-size: 12px;
}

.owner-task-filters {
  display: flex;
  gap: 8px;
  margin: 6px 0 14px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.owner-task-filters button {
  flex: 0 0 auto;
  min-height: 40px;
  border-radius: 999px;
  white-space: nowrap;
}

.owner-task-status-card {
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(17, 24, 39, 0.06);
}

.owner-task-status-card.active {
  border: 2px solid #5b45e8;
  background: #f8f7ff;
}

.owner-task-status-card .human-status {
  margin-top: 4px;
}

.owner-task-status-details {
  border: 1px solid #e4e7ec;
  border-radius: 20px;
  background: #fff;
}

.owner-task-detail-back {
  display: none;
  width: fit-content;
  margin-bottom: 16px;
}

.owner-main-task-status {
  border: 0;
}

.owner-task-core-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.owner-technical-details {
  margin-top: 16px;
}

.owner-technical-details .owner-task-history,
.owner-technical-details .owner-acknowledgment-timing,
.owner-technical-details .owner-communication-timeline {
  margin: 0 14px 14px;
}

@media (max-width: 700px) {
  .mobile-workspace {
    width: 100%;
    min-height: calc(100dvh - 42px);
  }

  .mobile-workspace-header,
  .mobile-detail-header {
    padding: 18px 16px 15px;
  }

  .mobile-workspace-content {
    padding: 16px 12px 24px;
  }

  .owner-attention-summary article {
    padding: 12px 8px;
  }

  .mobile-task-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-task-card-side,
  .mobile-task-card-status {
    justify-items: start;
  }

  .owner-task-control {
    padding: 8px 4px 24px;
  }

  .owner-task-control-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .owner-task-control-back {
    justify-self: start;
  }

  .owner-task-control-actions {
    width: 100%;
  }

  .owner-task-control-actions button {
    flex: 1;
  }

  .owner-task-control-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0;
  }

  .owner-task-status-list {
    width: 100%;
    max-height: none;
  }

  .owner-task-status-details.is-empty {
    display: none;
  }

  .owner-task-core-fields {
    grid-template-columns: 1fr;
  }

  .owner-task-control.has-selected-task .owner-task-filters,
  .owner-task-control.has-selected-task .owner-task-control-meta,
  .owner-task-control.has-selected-task .owner-task-status-list {
    display: none;
  }

  .owner-task-control.has-selected-task .owner-task-status-details {
    width: 100%;
    padding: 20px 16px;
  }

  .owner-task-control.has-selected-task .owner-task-control-header {
    display: none;
  }

  .owner-task-detail-back {
    display: inline-flex;
    align-items: center;
  }

  .owner-task-detail-heading {
    display: grid;
    gap: 12px;
  }

  .owner-task-detail-heading h3 {
    font-size: 25px;
    line-height: 1.2;
  }

  .owner-main-task-status {
    justify-self: start;
  }

  .performers-dashboard .inventory-body {
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .owner-mobile-nav button {
    font-size: 10px;
  }

  .owner-attention-summary span {
    font-size: 10px;
  }

  .mobile-workspace-header h1,
  .mobile-detail-header h1 {
    font-size: 25px;
  }
}

/* Mobile UX polish: counted filters, app-native pickers and larger navigation. */
.owner-task-filters button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.owner-task-filter-count {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  place-items: center;
  border: 1px solid #d7d2ff;
  border-radius: 999px;
  background: #f0edff;
  color: #4935d1;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.owner-task-filters button.active {
  border-color: #4d38dc;
  background: #5b45e8;
  color: #fff;
  box-shadow: 0 4px 12px rgba(78, 56, 220, 0.22);
}

.owner-task-filters button.active .owner-task-filter-count {
  border-color: rgba(255, 255, 255, 0.78);
  background: #fff;
  color: #4935d1;
}

.owner-task-filters button:disabled .owner-task-filter-count {
  opacity: 0.7;
}

.custom-picker-field {
  position: relative;
}

.custom-picker-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-picker-trigger {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #d7d4e8;
  border-radius: 15px;
  background: #fff;
  color: #293150;
  text-align: left;
  box-shadow: 0 2px 8px rgba(36, 31, 72, 0.05);
}

.custom-picker-trigger.has-value {
  border-color: #a99fff;
  background: #faf9ff;
}

.custom-picker-trigger:focus-visible {
  outline: 3px solid rgba(91, 69, 232, 0.22);
  outline-offset: 2px;
}

.custom-picker-trigger:disabled {
  cursor: default;
  opacity: 1;
  background: #f6f7fb;
}

.custom-picker-trigger-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.custom-picker-trigger-copy strong,
.custom-picker-trigger-copy small {
  overflow-wrap: anywhere;
}

.custom-picker-trigger-copy strong {
  color: #1e2743;
  font-size: 15px;
  line-height: 1.3;
}

.custom-picker-trigger-copy small {
  color: #6c7487;
  font-size: 12px;
  line-height: 1.35;
}

.custom-picker-chevron {
  flex: 0 0 auto;
  color: #5b45e8;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.mobile-picker-overlay {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 16px 12px 0;
  background: rgba(18, 22, 36, 0.56);
  backdrop-filter: blur(3px);
}

.mobile-picker-sheet {
  display: grid;
  width: min(100%, 560px);
  max-height: min(82dvh, 720px);
  margin: 0 auto;
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -18px 50px rgba(21, 24, 42, 0.22);
}

.mobile-picker-handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 8px;
  border-radius: 999px;
  background: #d8d9e2;
}

.mobile-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 12px;
}

.mobile-picker-header h2 {
  margin: 0;
  color: #17203a;
  font-size: 20px;
  line-height: 1.25;
}

.mobile-picker-close {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f0edff;
  color: #4935d1;
  font-size: 25px;
  line-height: 1;
}

.mobile-picker-options {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 2px 0 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-picker-option {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e1e2e9;
  border-radius: 15px;
  background: #fff;
  color: #202943;
  text-align: left;
}

.mobile-picker-option > span:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.mobile-picker-option strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.3;
}

.mobile-picker-option small {
  color: #687084;
  font-size: 12px;
  line-height: 1.35;
}

.mobile-picker-option.selected {
  border: 2px solid #5b45e8;
  background: #f2efff;
  color: #3523c7;
}

.mobile-picker-check {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #5b45e8;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.mobile-picker-option:not(.selected) .mobile-picker-check {
  background: #f0f1f5;
}

.mobile-picker-cancel {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: #f0edff;
  color: #4935d1;
  font-size: 15px;
  font-weight: 900;
}

.mobile-bottom-nav {
  min-height: 88px;
  padding: 7px 7px calc(8px + env(safe-area-inset-bottom));
}

.mobile-bottom-nav button {
  display: grid;
  min-width: 0;
  min-height: 64px;
  padding: 6px 2px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1;
  touch-action: manipulation;
}

.mobile-nav-icon {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  color: currentColor;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.mobile-nav-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-bottom-nav button.active {
  border-color: #d9d3ff;
  background: #f0edff;
  box-shadow: inset 0 3px 0 #5b45e8;
  font-weight: 950;
}

@media (max-width: 700px) {
  .owner-task-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .owner-task-filters button {
    width: 100%;
    min-height: 54px;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.25;
    text-align: left;
    white-space: normal;
  }

  .mobile-workspace-content {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

}

@media (max-width: 380px) {
  .owner-mobile-nav button,
  .technician-mobile-nav button {
    font-size: 12px;
  }

  .mobile-bottom-nav {
    padding-right: 5px;
    padding-left: 5px;
  }

  .mobile-nav-icon {
    font-size: 19px;
  }
}
/* Storage locations and task material usage */
.task-materials,
.owner-task-material-usage {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #cfe0ea;
  border-radius: 18px;
  background: #f7fbfd;
}

.task-materials-heading > div,
.task-material-row-copy,
.task-material-selected-row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.task-materials-heading span,
.task-material-row-copy small,
.task-material-selected-row small,
.task-material-catalog-row small {
  color: #5e7380;
  font-size: 13px;
}

.task-materials-kicker {
  display: block;
  margin: 14px 0 8px;
  color: #506771;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.task-material-frequent-row,
.task-material-selected-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #dfeaf0;
}

.task-material-frequent-row strong,
.task-material-selected-row strong,
.task-material-catalog-row strong {
  overflow-wrap: anywhere;
}

.task-material-checks,
.task-material-counter,
.task-material-inline-counter {
  display: flex;
  gap: 8px;
  align-items: center;
}

.task-material-check,
.task-material-counter button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid #9cb3be;
  border-radius: 13px;
  background: #fff;
  color: transparent;
  font-size: 20px;
}

.task-material-check.selected {
  border-color: #087d68;
  background: #087d68;
  color: #fff;
}

.task-material-counter button {
  color: #173b49;
  font-size: 24px;
}

.task-material-counter .task-material-remove {
  margin-left: 4px;
  border-color: #d6dde1;
  color: #a13b3b;
}

.task-material-warning {
  grid-column: 1 / -1;
  color: #a13b3b;
  font-size: 13px;
  font-weight: 700;
}

.task-material-add {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
}

.task-material-sheet {
  position: fixed;
  z-index: 50;
  inset: auto 0 0;
  max-height: min(82vh, 760px);
  padding: 16px;
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -16px 50px rgb(23 59 73 / 24%);
  overflow: hidden;
}

.task-material-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.task-material-sheet-head button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

.task-material-search {
  width: 100%;
  min-height: 48px;
  margin-bottom: 10px;
}

.task-material-catalog {
  max-height: calc(min(82vh, 760px) - 180px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.task-material-catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 64px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid #e4ecef;
  border-radius: 0;
  background: transparent;
  color: #173b49;
  text-align: left;
}

.task-material-catalog-row > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.task-material-catalog-row.selected {
  background: #e9f7f3;
}

.task-material-inline-counter {
  padding-left: 10px;
  font-size: 18px;
}

.task-material-inline-counter span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #9cb3be;
  border-radius: 12px;
}

.task-material-catalog-row em {
  grid-column: 1 / -1;
  color: #a13b3b;
  font-size: 12px;
  font-style: normal;
}

.task-material-sheet-done {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
}

.owner-inventory-tools {
  display: grid;
  min-width: 0;
  gap: 16px;
  margin-bottom: 20px;
}

.owner-inventory-search {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.owner-inventory-search input {
  min-height: 46px;
}

.owner-inventory-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.owner-inventory-forms details {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d7e3e9;
  border-radius: 14px;
  background: #fff;
}

.owner-inventory-forms summary {
  cursor: pointer;
  font-weight: 800;
}

.owner-inventory-forms form {
  display: grid;
  min-width: 0;
  gap: 10px;
  margin-top: 12px;
}

.owner-inventory-forms input,
.owner-inventory-forms select,
.owner-inventory-forms textarea,
.owner-inventory-forms button,
.owner-inventory-item-edit input,
.owner-inventory-item-edit select,
.owner-inventory-item-edit textarea,
.owner-inventory-item-edit button {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.owner-inventory-forms summary,
.owner-inventory-item-edit summary,
.owner-inventory-distribution summary {
  overflow-wrap: anywhere;
}

.owner-inventory-inline-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.owner-inventory-inline-fields label {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.owner-inventory-item {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  align-items: start;
}

.owner-inventory-item.inactive {
  opacity: .68;
}

.owner-inventory-item-heading {
  display: flex;
  min-width: 0;
  gap: 10px;
  justify-content: space-between;
}

.owner-inventory-item-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.owner-inventory-item-heading span {
  flex: 0 0 auto;
  color: #5e7380;
  font-size: 12px;
}

.owner-inventory-location-list {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin-top: 12px;
}

.owner-inventory-location {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 112px);
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.owner-inventory-location > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.owner-inventory-location strong,
.owner-inventory-location small,
.inventory-row-title,
.inventory-row-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.owner-inventory-location input[type="number"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.owner-inventory-distribution {
  min-width: 0;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d7e3e9;
}

.owner-inventory-distribution form {
  display: grid;
  min-width: 0;
  gap: 12px;
  margin-top: 12px;
}

.owner-inventory-distribution-submit {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 50px;
  padding-inline: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.owner-inventory-item-edit {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d7e3e9;
}

.owner-inventory-item-edit summary {
  cursor: pointer;
  color: #425d6c;
  font-weight: 800;
}

.owner-inventory-item-edit form {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.owner-inventory-item-edit label {
  display: grid;
  gap: 5px;
  color: #5e7380;
  font-size: 12px;
  font-weight: 700;
}

.owner-inventory-active-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
  min-height: 44px;
}

.owner-inventory-active-field input {
  width: 20px;
  height: 20px;
}

.owner-task-material-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.owner-task-material-list > div,
.owner-task-material-usage dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.owner-task-material-usage dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.owner-task-material-usage dt {
  color: #5e7380;
}

.owner-task-material-usage dd {
  margin: 0;
  text-align: right;
}

.owner-inventory-item[hidden],
.task-material-catalog-row[hidden] {
  display: none !important;
}

.owner-inventory-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.owner-inventory-empty p {
  margin: 0;
}

.owner-inventory-empty .mobile-primary-action {
  width: min(100%, 280px);
}

.inventory-dashboard,
.inventory-body,
#inventoryContent,
.inventory-list,
.inventory-row-copy {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.owner-point-form-card,
.owner-point-edit-details,
.owner-point-frequent-details {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--mobile-border, #e4e7ec);
  border-radius: 16px;
  background: #fff;
}

.owner-point-form-card summary,
.owner-point-edit-details summary,
.owner-point-frequent-details summary {
  color: #293150;
  font-weight: 900;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.owner-point-form {
  display: grid;
  min-width: 0;
  gap: 12px;
  margin-top: 14px;
}

.owner-point-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #566074;
  font-size: 13px;
  font-weight: 800;
}

.owner-point-form input,
.owner-point-form select,
.owner-point-form textarea,
.owner-point-form button {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.owner-point-form input,
.owner-point-form select,
.owner-point-form textarea {
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #d8dbe5;
  border-radius: 12px;
  color: var(--mobile-ink, #17233a);
  background: #fff;
}

.owner-point-form textarea {
  resize: vertical;
  overflow-wrap: anywhere;
}

.owner-point-manage-card.mobile-point-row {
  display: grid;
  min-width: 0;
  gap: 13px;
  cursor: default;
}

.owner-point-manage-card.inactive {
  background: #f5f6f8;
}

.owner-point-manage-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.owner-point-manage-heading > span:first-child {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.owner-point-manage-heading strong,
.owner-point-manage-heading small,
.owner-point-manage-meta span,
.owner-point-frequent-list span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.owner-point-manage-heading .human-status {
  flex: 0 0 auto;
}

.owner-point-manage-meta,
.owner-point-manage-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.owner-point-manage-meta {
  color: var(--mobile-muted, #667085);
  font-size: 12px;
}

.owner-point-manage-actions button {
  min-width: 0;
  min-height: 46px;
  flex: 1 1 140px;
}

.owner-point-frequent-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.owner-point-disabled-note {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  color: #f3e7a5;
  background: rgba(255, 255, 255, .1);
  overflow-wrap: anywhere;
}

@media (min-width: 900px) {
  .owner-primary-sections {
    max-width: 360px;
  }
}

@media (max-width: 680px) {
  .owner-inventory-forms,
  .owner-inventory-inline-fields {
    grid-template-columns: 1fr;
  }

  .owner-inventory-location {
    grid-template-columns: minmax(0, 1fr) minmax(84px, 104px);
  }

  .owner-inventory-item-edit form {
    grid-template-columns: 1fr;
  }

  .inventory-body {
    padding-inline: 10px;
  }

  .owner-inventory-item {
    padding: 14px 12px;
  }

  .owner-inventory-item-heading {
    display: grid;
    gap: 5px;
  }

  .owner-inventory-item-heading span {
    justify-self: start;
  }

  .owner-point-manage-heading {
    display: grid;
  }

  .owner-point-manage-heading .human-status {
    justify-self: start;
  }

  .task-materials {
    margin-inline: -4px;
    padding: 14px 12px;
  }

  .task-material-frequent-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* VendPult RC3 — role-specific mobile technician and desktop owner shells. */
.mobile-offline-strip {
  justify-content: flex-start;
  min-height: 42px;
}

.mobile-offline-strip > .mobile-sync-indicator {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2aa198;
}

.mobile-offline-strip > .mobile-sync-copy {
  display: grid;
  width: auto;
  height: auto;
  gap: 1px;
  border-radius: 0;
  background: transparent;
}

.mobile-sync-copy strong,
.mobile-sync-copy small {
  display: block;
  line-height: 1.25;
}

.mobile-sync-copy strong {
  font-size: 12px;
}

.mobile-sync-copy small {
  color: currentColor;
  font-size: 10px;
  font-weight: 600;
  opacity: .82;
}

.mobile-offline-strip.is-offline,
.mobile-offline-strip.is-saved,
.mobile-offline-strip.is-pending {
  color: #7a4d00;
  border-color: #f1d590;
  background: #fff7df;
}

.mobile-offline-strip.is-offline > .mobile-sync-indicator,
.mobile-offline-strip.is-saved > .mobile-sync-indicator,
.mobile-offline-strip.is-pending > .mobile-sync-indicator {
  background: #d18b00;
}

.mobile-offline-strip.is-syncing {
  color: #285c78;
  border-color: #bfddec;
  background: #eaf5fb;
}

.mobile-offline-strip.is-syncing > .mobile-sync-indicator {
  background: #368ab2;
  animation: rc3-sync-pulse 1s ease-in-out infinite;
}

.mobile-offline-strip.is-error {
  color: #8d2d2d;
  border-color: #edb9b9;
  background: #fff0f0;
}

.mobile-offline-strip.is-error > .mobile-sync-indicator {
  background: #b63b3b;
}

@keyframes rc3-sync-pulse {
  50% { opacity: .35; transform: scale(.75); }
}

.mobile-task-address,
.task-detail-address {
  color: #344054 !important;
  font-weight: 750;
}

.task-detail-deadline {
  margin-top: 4px !important;
  color: #667085 !important;
  font-weight: 700;
}

.task-completion-summary {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d7d2ff;
  border-radius: 14px;
  background: #f8f7ff;
}

.task-completion-summary > strong {
  display: block;
  margin-bottom: 10px;
  color: #4935d1;
}

.task-completion-summary dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.task-completion-summary dl div {
  display: grid;
  grid-template-columns: minmax(88px, .4fr) minmax(0, 1fr);
  gap: 12px;
}

.task-completion-summary dt,
.task-completion-summary dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.task-completion-summary dt {
  color: #667085;
}

.task-completion-summary dd {
  color: #17233a;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.owner-desktop-nav {
  display: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #8d7cff;
  outline-offset: 3px;
}

.owner-attention-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.owner-primary-sections {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.owner-navigation-host,
.owner-navigation-host * {
  min-width: 0;
}

@media (max-width: 700px) {
  .owner-attention-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-primary-sections {
    grid-template-columns: 1fr;
  }

  .task-completion-summary dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (min-width: 900px) {
  body.owner-screen {
    background: #f2f3f8;
  }

  .owner-screen .app-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .owner-screen #alertRoot {
    position: fixed;
    z-index: 90;
    top: 48px;
    right: 24px;
    width: min(460px, calc(100vw - 300px));
  }

  .owner-navigation-host {
    width: calc(100% - 248px) !important;
    max-width: 1540px !important;
    min-height: calc(100dvh - 26px);
    margin: 0 0 0 248px !important;
    padding-bottom: 32px;
    border-radius: 0;
  }

  .owner-desktop-nav {
    position: fixed;
    z-index: 70;
    inset: 26px auto 0 0;
    display: flex;
    width: 248px;
    min-height: calc(100dvh - 26px);
    padding: 22px 14px 18px;
    flex-direction: column;
    gap: 24px;
    color: #eef0ff;
    background: #171a32;
    box-shadow: 12px 0 36px rgba(27, 29, 55, .12);
  }

  .owner-desktop-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px;
  }

  .owner-desktop-brand > span {
    display: grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: #6756ef;
    font-size: 13px;
    font-weight: 950;
  }

  .owner-desktop-brand > div,
  .owner-desktop-session {
    display: grid;
    gap: 2px;
  }

  .owner-desktop-brand strong {
    font-size: 17px;
  }

  .owner-desktop-brand small,
  .owner-desktop-session small {
    color: #aeb3d2;
    font-size: 11px;
  }

  .owner-desktop-nav nav {
    display: grid;
    gap: 6px;
  }

  .owner-desktop-nav nav button {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #c8cbe0;
    background: transparent;
    text-align: left;
  }

  .owner-desktop-nav nav button > span {
    font-size: 18px;
    text-align: center;
  }

  .owner-desktop-nav nav button > strong {
    font-size: 14px;
  }

  .owner-desktop-nav nav button:hover {
    color: #fff;
    background: #242844;
  }

  .owner-desktop-nav nav button.active {
    color: #fff;
    border-color: #7669dd;
    background: #5142ca;
    box-shadow: 0 8px 20px rgba(46, 34, 149, .28);
  }

  .owner-desktop-session {
    margin-top: auto;
    padding: 14px 12px;
    border-top: 1px solid #343852;
  }

  .owner-desktop-session strong {
    overflow-wrap: anywhere;
  }

  .owner-navigation-host > .owner-mobile-nav {
    display: none;
  }

  .owner-mobile-workspace.owner-navigation-host {
    width: calc(100% - 248px);
    padding: 0 28px 36px;
    background: #f2f3f8;
  }

  .owner-mobile-workspace .mobile-offline-strip {
    margin: 0 -28px;
    padding-left: 28px;
  }

  .owner-mobile-workspace .mobile-workspace-header {
    margin: 0 -28px;
    padding: 28px 32px 24px;
    background: #fff;
  }

  .owner-mobile-workspace .mobile-workspace-content {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    gap: 20px;
    padding: 28px 4px;
  }

  .owner-mobile-workspace .owner-attention-summary,
  .owner-mobile-workspace .mobile-section {
    grid-column: 1 / -1;
  }

  .owner-mobile-workspace .mobile-primary-action {
    grid-column: span 4;
  }

  .owner-mobile-workspace .owner-primary-sections {
    grid-column: span 8;
  }

  .owner-mobile-workspace .owner-attention-summary article {
    min-height: 96px;
    padding: 18px;
    border-radius: 18px;
  }

  .owner-mobile-workspace .owner-attention-summary strong {
    font-size: 31px;
  }

  .owner-mobile-workspace .owner-attention-summary span {
    font-size: 13px;
  }

  .owner-mobile-workspace .mobile-task-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-mobile-workspace .mobile-point-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-mobile-workspace .owner-point-form-card,
  .owner-mobile-workspace #ownerMobilePointList,
  .owner-diagnostics .mobile-workspace-content > * {
    grid-column: 1 / -1;
  }

  .owner-diagnostics .mobile-detail-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .owner-diagnostics .mobile-detail-header > div {
    order: -1;
  }

  .owner-diagnostics .mobile-menu-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .owner-diagnostics .mobile-menu-row {
    min-height: 112px;
    align-items: start;
  }

  .owner-task-control.owner-navigation-host {
    padding: 28px 32px 36px;
  }

  .owner-task-control-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .owner-task-control-back {
    display: none;
  }

  .owner-task-control-layout {
    grid-template-columns: minmax(340px, .8fr) minmax(520px, 1.35fr);
    min-height: calc(100vh - 240px);
  }

  .owner-task-status-list {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
  }

  .owner-task-status-details {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
  }

  .performers-dashboard.owner-navigation-host,
  .inventory-dashboard.owner-navigation-host,
  .kpi-dashboard.owner-navigation-host,
  .owner-detail-dashboard.owner-navigation-host {
    width: calc(100% - 248px);
    max-width: 1540px;
  }

  .performers-dashboard .performers-body,
  .inventory-dashboard .inventory-body,
  .kpi-dashboard .kpi-content,
  .owner-detail-dashboard .detail-body {
    padding: 28px 32px 40px;
  }

  .performers-list,
  .inventory-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
  }

  .performer-row,
  .owner-inventory-item {
    height: 100%;
    border-radius: 18px;
  }

  .kpi-content > section:first-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .kpi-content .kpi-section-label {
    grid-column: 1 / -1;
  }

  .owner-task-create.owner-navigation-host,
  .owner-telegram-preview.owner-navigation-host {
    width: calc(100% - 248px);
    max-width: 1540px;
  }

  .owner-task-create-body {
    width: min(920px, calc(100% - 64px));
  }
}

@media (min-width: 1500px) {
  .owner-mobile-workspace .mobile-task-list,
  .owner-mobile-workspace .mobile-point-list,
  .performers-list,
  .inventory-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* VendPult RC3.1 — physical-device fixes and a consistent light owner surface. */

/* VendPult RC3.2 — one materials editor for task and point visit reports. */
.visit-report-screen .visit-materials-editor {
  margin-top: 16px;
  margin-bottom: 22px;
}
.owner-integration-status {
  cursor: default;
}

.owner-integration-status > span:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.owner-integration-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #d7dbe7;
  border-radius: 999px;
  color: #566074;
  background: #f5f6f8;
  font-size: 11px;
  font-weight: 850;
}

.performers-dashboard,
.inventory-dashboard,
.kpi-dashboard,
.performers-dashboard .performers-body,
.inventory-dashboard .inventory-body,
.kpi-dashboard .kpi-content {
  color: #17233a;
  background: #f2f3f8;
}

.performers-dashboard .tech-hero,
.inventory-dashboard .tech-hero,
.kpi-dashboard .tech-hero {
  color: #17233a;
  border-bottom: 1px solid #e2e5ec;
  background: #fff;
}

.performers-dashboard .tech-brand-title,
.performers-dashboard .tech-brand-subtitle,
.inventory-dashboard .tech-brand-title,
.inventory-dashboard .tech-brand-subtitle,
.inventory-dashboard .inventory-hero-title,
.inventory-dashboard .inventory-hero-subtitle,
.kpi-dashboard .detail-machine-title,
.kpi-dashboard .detail-machine-model,
.kpi-dashboard .detail-hero-date {
  color: #17233a;
}

.performers-dashboard .tech-brand-subtitle,
.inventory-dashboard .tech-brand-subtitle,
.inventory-dashboard .inventory-hero-subtitle,
.kpi-dashboard .detail-machine-model,
.kpi-dashboard .detail-hero-date {
  color: #667085;
}

.performers-dashboard .detail-back-button,
.inventory-dashboard .detail-back-button,
.kpi-dashboard .detail-back-button,
.performers-dashboard .tech-user-pill,
.inventory-dashboard .tech-user-pill,
.kpi-dashboard .kpi-month-switcher {
  color: #344054;
  border-color: #dfe3eb;
  background: #f7f8fa;
}

.performers-dashboard .performer-row,
.performers-dashboard .employee-create-details,
.inventory-dashboard .owner-inventory-item,
.inventory-dashboard .inventory-row,
.inventory-dashboard .owner-inventory-form-card,
.kpi-dashboard .kpi-tech-card,
.kpi-dashboard .kpi-points-card,
.kpi-dashboard .detail-history-empty {
  color: #17233a;
  border: 1px solid #e0e4eb;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 34, 56, .06);
}

.kpi-dashboard .kpi-tech-header,
.kpi-dashboard .kpi-points-header {
  color: #17233a;
  border-bottom-color: #e6e9ef;
  background: #f7f8fa;
}

.kpi-dashboard .kpi-tech-name,
.kpi-dashboard .kpi-point-name,
.kpi-dashboard .kpi-machine-row-name,
.kpi-dashboard .kpi-points-header {
  color: #17233a;
}

.kpi-dashboard .kpi-tech-name small,
.kpi-dashboard .kpi-row-label,
.kpi-dashboard .kpi-machine-breakdown-title,
.kpi-dashboard .kpi-machine-empty,
.kpi-dashboard .kpi-point-last {
  color: #667085;
}

.kpi-dashboard .kpi-row,
.kpi-dashboard .kpi-point-row,
.kpi-dashboard .kpi-machine-breakdown {
  border-color: #e6e9ef;
}

.kpi-dashboard .kpi-machine-row {
  background: #f7f8fa;
}

.kpi-dashboard .kpi-machine-row-count,
.kpi-dashboard .kpi-row-value.gray,
.kpi-dashboard .kpi-point-visits {
  color: #475467;
}

.kpi-dashboard .kpi-row-value.green {
  color: #4e811e;
}

.kpi-dashboard .kpi-row-value.red {
  color: #c23b3b;
}

.kpi-dashboard .kpi-row-value.amber {
  color: #a85e00;
}

.kpi-dashboard .kpi-month-label,
.kpi-dashboard .kpi-month-btn {
  color: #344054;
}

.kpi-dashboard .kpi-section-label,
.performers-dashboard .inventory-section-head,
.inventory-dashboard .inventory-section-head {
  color: #667085;
}

/* VendPult RC3.3 — unified owner desktop workspace. */
.owner-attention-summary button {
  display: grid;
  min-width: 0;
  min-height: 82px;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid #e0e4eb;
  border-radius: 16px;
  color: #17233a;
  background: #fff;
  text-align: left;
  box-shadow: 0 5px 16px rgba(24, 34, 56, .05);
}

.owner-attention-summary button:hover {
  border-color: #b8afff;
  background: #fbfaff;
}

.owner-attention-summary button strong {
  color: #4c3fd4;
  font-size: 26px;
  line-height: 1;
}

.owner-attention-summary button span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.owner-desktop-list-head {
  display: none;
}

.owner-inventory-brief {
  color: #475467;
  font-weight: 700;
}

.kpi-content > section.owner-kpi-table {
  display: block;
  min-width: 0;
}

.owner-kpi-rows {
  display: grid;
}

.owner-kpi-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(90px, .55fr)) minmax(110px, .7fr);
  min-width: 0;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #e6e9ef;
  color: #17233a;
  background: #fff;
}

.owner-kpi-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.owner-kpi-value {
  color: #344054;
  font-size: 15px;
  font-weight: 900;
}

.owner-kpi-value.tone-green {
  color: #397a3f;
}

.owner-kpi-value.tone-red {
  color: #b83535;
}

.owner-kpi-value.tone-muted {
  color: #667085;
}

@media (min-width: 900px) {
  body.owner-screen {
    overflow-x: hidden;
  }

  .owner-navigation-host {
    width: calc(100% - 224px) !important;
    max-width: none !important;
    margin-left: 224px !important;
  }

  .owner-desktop-nav {
    width: 224px;
    padding: 18px 12px 14px;
    gap: 16px;
    background: #171a32;
  }

  .owner-desktop-nav nav {
    gap: 3px;
  }

  .owner-desktop-nav nav button {
    min-height: 42px;
    grid-template-columns: 27px minmax(0, 1fr);
    padding: 7px 10px;
    border-radius: 10px;
  }

  .owner-desktop-nav nav button > span {
    font-size: 16px;
  }

  .owner-desktop-nav nav button > strong {
    font-size: 13px;
  }

  .owner-desktop-session {
    padding: 12px 10px;
  }

  .owner-screen #alertRoot {
    width: min(460px, calc(100vw - 270px));
  }

  .owner-mobile-workspace.owner-navigation-host,
  .performers-dashboard.owner-navigation-host,
  .inventory-dashboard.owner-navigation-host,
  .kpi-dashboard.owner-navigation-host,
  .owner-detail-dashboard.owner-navigation-host,
  .owner-task-create.owner-navigation-host,
  .owner-telegram-preview.owner-navigation-host {
    width: calc(100% - 224px);
    max-width: none;
  }

  .owner-mobile-workspace.owner-navigation-host {
    padding: 0 24px 34px;
  }

  .owner-mobile-workspace .mobile-offline-strip {
    margin-inline: -24px;
    padding-left: 24px;
  }

  .owner-mobile-workspace .mobile-workspace-header,
  .owner-diagnostics .mobile-detail-header,
  .performers-dashboard .tech-hero,
  .inventory-dashboard .tech-hero,
  .kpi-dashboard .tech-hero,
  .owner-detail-dashboard .detail-hero {
    min-height: 112px;
    margin: 0;
    padding: 24px 32px;
    border-bottom: 1px solid #e2e5ec;
    color: #17233a;
    background: #fff;
  }

  .owner-mobile-workspace .mobile-workspace-header {
    margin-inline: -24px;
  }

  .owner-mobile-workspace .mobile-workspace-header h1,
  .owner-diagnostics .mobile-detail-header h1,
  .performers-dashboard .tech-brand-title,
  .inventory-dashboard .tech-brand-title,
  .kpi-dashboard .detail-machine-title,
  .owner-detail-dashboard .detail-machine-title {
    color: #17233a;
    font-size: clamp(24px, 2vw, 31px);
    line-height: 1.1;
  }

  .owner-mobile-workspace .mobile-workspace-header p,
  .owner-diagnostics .mobile-detail-header p,
  .performers-dashboard .tech-brand-subtitle,
  .inventory-dashboard .tech-brand-subtitle,
  .kpi-dashboard .detail-machine-model,
  .owner-detail-dashboard .detail-machine-model {
    color: #667085;
  }

  .performers-dashboard .detail-top-row,
  .inventory-dashboard .detail-top-row,
  .kpi-dashboard .detail-top-row,
  .owner-detail-dashboard .detail-top-row {
    margin-bottom: 12px;
  }

  .performers-dashboard .detail-top-row > button,
  .inventory-dashboard .detail-top-row > button:not(:focus),
  .kpi-dashboard .detail-top-row > button,
  .owner-diagnostics #ownerDiagnosticsBack {
    display: none;
  }

  .owner-mobile-workspace .mobile-workspace-content,
  .performers-dashboard .performers-body,
  .inventory-dashboard .inventory-body,
  .kpi-dashboard .kpi-content,
  .owner-detail-dashboard .detail-body {
    width: 100%;
    max-width: none;
    padding: 24px 32px 40px;
  }

  .owner-mobile-workspace .mobile-workspace-content {
    gap: 16px;
    padding-inline: 8px;
  }

  .owner-mobile-workspace .owner-attention-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .owner-mobile-workspace .owner-attention-summary button {
    min-height: 92px;
    padding: 16px;
    border-radius: 14px;
  }

  .owner-mobile-workspace .mobile-primary-action {
    grid-column: span 3;
    align-self: stretch;
  }

  .owner-mobile-workspace .owner-primary-sections {
    grid-column: span 9;
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .owner-primary-sections .mobile-menu-row {
    min-height: 72px;
    padding: 12px;
  }

  .owner-primary-sections .mobile-menu-row small {
    line-height: 1.25;
  }

  .owner-mobile-workspace .mobile-task-list {
    grid-template-columns: 1fr;
    gap: 1px;
    overflow: hidden;
    border: 1px solid #e0e4eb;
    border-radius: 14px;
    background: #e6e9ef;
  }

  .owner-mobile-workspace .mobile-task-card {
    min-height: 66px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .owner-task-control.owner-navigation-host {
    padding: 24px 28px 32px;
  }

  .owner-task-control-header {
    min-height: 86px;
    padding: 0 4px 18px;
    border-bottom: 1px solid #e2e5ec;
  }

  .owner-task-control-heading h2 {
    font-size: 30px;
  }

  .owner-task-control-meta {
    margin: 12px 0 8px;
  }

  .owner-task-control-layout {
    grid-template-columns: minmax(320px, .72fr) minmax(0, 1.3fr);
    min-height: calc(100vh - 215px);
  }

  .owner-task-status-list,
  .owner-task-status-details {
    max-height: calc(100vh - 220px);
  }

  .owner-task-status-card {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 86px;
    align-items: start;
    gap: 5px 10px;
  }

  .owner-task-status-card > :not(.human-status) {
    grid-column: 1;
  }

  .owner-task-status-card .human-status {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
  }

  .owner-task-status-card > span:not(.owner-task-status-card-flags) {
    margin: 0;
  }

  .owner-desktop-list-head {
    display: grid;
    align-items: center;
    gap: 16px;
    padding: 9px 16px;
    color: #667085;
    border: 1px solid #e0e4eb;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: #f7f8fa;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .owner-team-list-head {
    grid-template-columns: minmax(280px, 1fr) minmax(260px, .9fr) minmax(420px, 1.25fr);
  }

  .owner-points-list-head {
    grid-template-columns: minmax(260px, 1.4fr) minmax(150px, .7fr) minmax(190px, .9fr);
  }

  .performers-list,
  .inventory-card-list,
  .owner-mobile-workspace .mobile-point-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    overflow: hidden;
    border: 1px solid #e0e4eb;
    border-radius: 0 0 12px 12px;
    background: #e6e9ef;
  }

  .performer-row,
  .owner-inventory-item,
  .owner-point-manage-card {
    height: auto;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .performer-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(680px, 2.15fr);
    align-items: start;
    gap: 20px;
    padding: 16px;
  }

  .employee-edit-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
    align-items: end;
    gap: 10px;
  }

  .employee-card-actions {
    flex-wrap: nowrap;
  }

  .owner-point-manage-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(150px, .7fr) minmax(190px, .9fr);
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
  }

  .owner-point-manage-heading,
  .owner-point-manage-meta,
  .owner-point-manage-actions {
    margin: 0;
  }

  .owner-point-manage-actions {
    justify-content: flex-end;
  }

  .owner-point-edit-details,
  .owner-point-frequent-details {
    grid-column: 1 / -1;
  }

  .owner-inventory-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    padding: 15px 16px;
  }

  .owner-inventory-item-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .owner-inventory-distribution form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .owner-inventory-location-list {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .owner-kpi-table {
    overflow: hidden;
    border: 1px solid #e0e4eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(24, 34, 56, .05);
  }

  .owner-kpi-table .kpi-section-label {
    padding: 16px;
  }

  .owner-kpi-table-head {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(90px, .55fr)) minmax(110px, .7fr);
    gap: 16px;
    padding: 9px 16px;
    color: #667085;
    border-block: 1px solid #e6e9ef;
    background: #f7f8fa;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .owner-diagnostics .mobile-menu-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .owner-diagnostics .mobile-info-note {
    border-color: #d9def0;
    color: #475467;
    background: #f8f9fc;
  }

  .owner-integration-status {
    min-height: 132px;
  }

  .owner-task-create-body {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .owner-mobile-workspace .owner-primary-sections {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .performer-row {
    grid-template-columns: 1fr;
  }

  .owner-point-manage-card {
    grid-template-columns: minmax(300px, 1.2fr) minmax(210px, .8fr);
  }

  .owner-point-manage-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .owner-inventory-location-list {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}

@media (max-width: 899px) {
  .owner-kpi-table-head {
    display: none;
  }

  .owner-kpi-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border: 1px solid #e0e4eb;
    border-radius: 14px;
  }

  .owner-kpi-person,
  .owner-kpi-row .human-status {
    grid-column: 1 / -1;
  }

  .owner-kpi-value::before {
    display: block;
    margin-bottom: 3px;
    color: #667085;
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: reduce) {
  .owner-screen *,
  .owner-screen *::before,
  .owner-screen *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* RC3.4 owner controls and Finance 1 */
.owner-task-cancelled,
.owner-task-danger-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #efd8d5;
  border-radius: 14px;
  background: #fff7f5;
  color: #71332e;
}

.owner-task-cancelled small,
.owner-task-danger-note span {
  color: #7d6865;
}

.owner-task-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #efd8d5;
  color: #8b3d35;
}

.ghost-danger {
  border-color: #d9aaa4 !important;
  background: #fff !important;
  color: #9c332a !important;
}

.owner-point-frequent-list {
  display: grid;
  gap: 10px;
}

.owner-point-frequent-row {
  display: grid;
  grid-template-columns:
    minmax(130px, 1.25fr)
    minmax(130px, 1.25fr)
    90px
    112px
    112px
    auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line, #dfe5ec);
  border-radius: 12px;
  background: #fff;
}

.owner-point-frequent-row label,
.owner-inventory-cost-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #667085;
}

.owner-point-frequent-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.owner-inventory-cost {
  color: #4a5363;
}

.owner-inventory-cost-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line, #dfe5ec);
}

.owner-inventory-cost-form small {
  align-self: center;
  color: #667085;
}

.owner-finance {
  min-height: 100vh;
  padding: 32px 36px 56px 260px;
  background: #f5f7fb;
}

.owner-finance-header,
.owner-finance-period,
.owner-finance-summary,
.owner-finance-content {
  max-width: 1500px;
  margin-inline: auto;
}

.owner-finance-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.owner-finance-header h1 {
  margin: 4px 0;
  font-size: clamp(30px, 3vw, 44px);
  color: #172033;
}

.owner-finance-header p {
  margin: 0;
  color: #667085;
}

.owner-finance-period {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dfe5ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(25 42 70 / 5%);
}

.owner-finance-presets,
.owner-finance-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-finance-presets button,
.owner-finance-tabs button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #d5dce7;
  border-radius: 999px;
  background: #fff;
  color: #465167;
}

.owner-finance-presets button.active,
.owner-finance-tabs button.active {
  border-color: #3e4bdd;
  background: #eef0ff;
  color: #313db7;
}

.owner-finance-dates {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

.owner-finance-dates label {
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 12px;
}

.owner-finance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.owner-finance-summary article {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 18px;
  border: 1px solid #dfe5ec;
  border-radius: 16px;
  background: #fff;
}

.owner-finance-summary article.warning {
  border-color: #ecd8a7;
  background: #fffbef;
}

.owner-finance-summary span {
  color: #667085;
}

.owner-finance-summary strong {
  font-size: 26px;
  color: #172033;
}

.owner-finance-tabs {
  max-width: 1500px;
  margin: 18px auto 12px;
}

.owner-finance-content {
  min-height: 260px;
}

.owner-finance-state {
  padding: 22px;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  background: #fff;
  color: #667085;
}

.owner-finance-state.error {
  max-width: 1500px;
  margin: 14px auto 0;
  border-color: #efd8d5;
  background: #fff7f5;
  color: #8b3d35;
}

.owner-finance-table {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  background: #fff;
}

.owner-finance-table-head,
.owner-finance-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(110px, .7fr));
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
}

.owner-finance-table-head {
  background: #f0f3f8;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.owner-finance-table-row {
  border-top: 1px solid #edf0f4;
}

.owner-finance-table-row > small {
  grid-column: 1 / -1;
  color: #667085;
}

.owner-finance-movements {
  display: grid;
  gap: 8px;
}

.owner-finance-movement {
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  background: #fff;
}

.owner-finance-movement summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 180px;
  gap: 16px;
  align-items: center;
  padding: 15px 18px;
  cursor: pointer;
}

.owner-finance-movement summary > span:first-child {
  display: grid;
  gap: 3px;
}

.owner-finance-movement summary small {
  color: #667085;
}

.owner-finance-movement dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 16px 18px;
  border-top: 1px solid #edf0f4;
}

.owner-finance-movement dl div {
  display: grid;
  gap: 4px;
}

.owner-finance-movement dt {
  color: #667085;
  font-size: 12px;
}

.owner-finance-movement dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .owner-finance {
    padding: 20px 14px 100px;
  }

  .owner-finance-header {
    display: grid;
  }

  .owner-finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-finance-table {
    overflow-x: auto;
  }

  .owner-finance-table-head,
  .owner-finance-table-row {
    min-width: 760px;
  }

  .owner-finance-movement summary,
  .owner-finance-movement dl,
  .owner-point-frequent-row,
  .owner-inventory-cost-form {
    grid-template-columns: 1fr;
  }
}

/* VendPult RC3.5 — shared operational UI tokens and density. */
:root {
  --ui-canvas: #f5f7fa;
  --ui-surface: #ffffff;
  --ui-surface-muted: #f8fafc;
  --ui-border: #dce2ea;
  --ui-border-strong: #cbd3df;
  --ui-text: #172033;
  --ui-muted: #667085;
  --ui-accent: #5847e8;
  --ui-accent-strong: #4335c7;
  --ui-accent-soft: #efedff;
  --ui-success: #2f7d57;
  --ui-warning: #9a6700;
  --ui-danger: #b42318;
  --ui-radius-control: 8px;
  --ui-radius-panel: 12px;
  --ui-shadow-floating: 0 18px 48px rgba(23, 32, 51, .16);
}

body.owner-screen,
body.technician-screen {
  color: var(--ui-text);
  text-rendering: optimizeLegibility;
}

body.owner-screen {
  background: var(--ui-canvas);
  font-size: 15px;
}

.owner-screen .owner-navigation-host {
  color: var(--ui-text);
  background: var(--ui-canvas);
}

.owner-screen .owner-navigation-host h1 {
  font-size: clamp(26px, 2.2vw, 30px);
  line-height: 1.12;
}

.owner-screen .owner-navigation-host h2,
.owner-screen .inventory-hero-title {
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.2;
}

.owner-screen .owner-navigation-host p,
.owner-screen .owner-navigation-host small,
.owner-screen .owner-navigation-host label {
  line-height: 1.45;
}

.owner-screen .owner-navigation-host small,
.owner-screen .owner-navigation-host .panel-subtitle,
.owner-screen .owner-navigation-host .inventory-row-meta {
  color: var(--ui-muted);
  font-size: 13px;
}

.owner-screen .owner-navigation-host button,
.owner-screen .owner-navigation-host input:not([type="checkbox"]):not([type="radio"]),
.owner-screen .owner-navigation-host select,
.owner-screen .owner-navigation-host textarea,
.owner-screen .owner-navigation-host summary {
  min-height: 44px;
  border-radius: var(--ui-radius-control);
  font-size: 15px;
}

.owner-screen .owner-navigation-host input:not([type="checkbox"]):not([type="radio"]),
.owner-screen .owner-navigation-host select,
.owner-screen .owner-navigation-host textarea {
  border-color: var(--ui-border-strong);
  background: var(--ui-surface);
}

.owner-screen .owner-navigation-host :is(
  .mobile-task-card,
  .mobile-point-row,
  .mobile-menu-row,
  .owner-task-status-card,
  .owner-task-status-details,
  .performer-row,
  .owner-inventory-item,
  .kpi-tech-card,
  .kpi-points-card
) {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius-panel);
  box-shadow: none;
}

.owner-screen .owner-attention-summary button {
  min-height: 76px;
  border-radius: var(--ui-radius-panel);
  box-shadow: none;
}

.owner-screen .owner-attention-summary button strong {
  font-size: 25px;
}

.owner-screen .owner-attention-summary button span {
  font-size: 13px;
}

.owner-screen .owner-desktop-nav {
  background: #171a32;
  box-shadow: 10px 0 28px rgba(23, 26, 50, .12);
}

.owner-screen .owner-desktop-nav nav button {
  border-radius: var(--ui-radius-control);
}

.owner-screen .owner-desktop-nav nav button.active {
  border-color: #7568e9;
  background: #4f43c9;
  box-shadow: none;
}

/* Technician: readable one-hand cards and report controls. */
.technician-mobile-workspace {
  font-size: 16px;
}

.technician-mobile-workspace .mobile-workspace-header h1,
.technician-mobile-workspace .mobile-detail-header h1 {
  font-size: clamp(27px, 8vw, 34px);
  overflow-wrap: anywhere;
}

.technician-mobile-workspace .mobile-section-heading h2 {
  font-size: 21px;
}

.technician-mobile-workspace .mobile-point-row.tech-point-card {
  min-height: 76px;
  padding: 14px 15px 14px 16px;
  border: 1px solid #d8d1ff;
  border-left: 4px solid #7967e8;
  border-radius: 16px;
  background: linear-gradient(135deg, #f0edff 0%, #fbfaff 58%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(84, 67, 190, .08);
}

.technician-mobile-workspace .mobile-point-row.tech-point-card:active {
  border-color: #bfb3ff;
  border-left-color: #5b45e8;
  background: linear-gradient(135deg, #e7e1ff 0%, #f6f4ff 58%, #ffffff 100%);
}

.technician-mobile-workspace .mobile-point-row.tech-point-card:focus-visible {
  outline: 3px solid rgba(91, 69, 232, .35);
  outline-offset: 2px;
}

.technician-mobile-workspace .mobile-point-card-copy {
  gap: 5px;
}

.technician-mobile-workspace .mobile-point-row.tech-point-card strong {
  font-size: 21px;
  line-height: 1.12;
}

.technician-mobile-workspace .mobile-point-row.tech-point-card small {
  font-size: 15px;
  line-height: 1.3;
}

.mobile-point-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.technician-mobile-workspace .mobile-point-row.tech-point-card .mobile-count-badge {
  min-width: 42px;
  height: 42px;
  padding: 0 11px;
  color: #3829b8;
  border: 1px solid #cfc5ff;
  background: #e7e2ff;
  font-size: 17px;
}

.mobile-point-card-chevron {
  color: #6255c8;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.point-visit-cta {
  display: grid;
  gap: 14px;
  padding: 17px;
  border: 1px solid #cfc6ff;
  border-radius: 16px;
  background: #f1efff;
  box-shadow: 0 7px 20px rgba(91, 69, 232, .1);
}

.point-visit-cta h2 {
  margin: 0;
  color: var(--mobile-ink);
  font-size: 21px;
  line-height: 1.2;
}

.point-visit-cta p {
  max-width: 36ch;
  margin: 7px 0 0;
  color: #4f5b78;
  font-size: 14px;
  line-height: 1.42;
}

.point-visit-cta .mobile-primary-action {
  min-height: 54px;
  border-radius: 12px;
}

.technician-today-task-card {
  padding: 17px;
  border-radius: 16px;
  box-shadow: 0 5px 16px rgba(23, 32, 51, .07);
}

.technician-today-task-card.is-current {
  border-width: 1px;
  border-color: #8173ed;
  box-shadow: 0 7px 22px rgba(88, 71, 232, .12);
}

.technician-today-task-card.is-unavailable {
  border-style: dashed;
  background: #fafbfc;
}

.technician-today-task-card .mobile-task-card-main {
  gap: 6px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.technician-today-task-card .mobile-task-card-main:disabled {
  cursor: default;
  opacity: 1;
}

.technician-today-task-card .mobile-task-card-main strong {
  font-size: 18px;
  line-height: 1.28;
}

.technician-today-task-card .mobile-task-card-main span {
  font-size: 14px;
  line-height: 1.42;
}

.technician-today-task-card .mobile-task-primary {
  min-height: 54px;
  border-radius: 12px;
  box-shadow: none;
}

.deadline-urgency-notice {
  display: grid;
  gap: 2px;
  grid-column: 1 / -1;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid currentColor;
  font-size: 13px;
  line-height: 1.25;
}

.deadline-urgency-notice strong {
  font-size: 11px;
  letter-spacing: .06em;
}

.deadline-urgency-notice span {
  font-size: 18px !important;
  font-weight: 900;
}

.deadline-urgency-notice small { font-size: 12px; }
.deadline-urgency-notice.is-compact { margin-top: 4px; padding: 8px 10px; }
.deadline-urgency-notice.is-compact span { font-size: 14px !important; }

.deadline-urgency-early { border-color: #d99a19 !important; border-left: 5px solid #d99a19 !important; background: #fff8df !important; }
.deadline-urgency-high { border-color: #e37813 !important; border-left: 5px solid #e37813 !important; background: #fff0dc !important; }
.deadline-urgency-critical { border-color: #d94a22 !important; border-left: 5px solid #d94a22 !important; background: #ffe5dc !important; }
.deadline-urgency-maximum { border-color: #b52424 !important; border-left: 6px solid #b52424 !important; background: #ffdedf !important; box-shadow: 0 7px 22px rgba(181, 36, 36, .2) !important; }
.deadline-urgency-overdue { border-color: #8f1720 !important; border-left: 6px solid #8f1720 !important; background: #f9d8dc !important; box-shadow: 0 7px 22px rgba(143, 23, 32, .2) !important; }

.deadline-urgency-early .deadline-urgency-notice { color: #805400; background: #fff0bd; }
.deadline-urgency-high .deadline-urgency-notice { color: #8a3e00; background: #ffe0bd; }
.deadline-urgency-critical .deadline-urgency-notice { color: #9f2e12; background: #ffd0c1; }
.deadline-urgency-maximum .deadline-urgency-notice { color: #8c1820; background: #ffc4c8; }
.deadline-urgency-overdue .deadline-urgency-notice { color: #72111a; background: #f6bfc5; }

.technician-today-task-card.deadline-urgency-critical .mobile-task-primary,
.technician-today-task-card.deadline-urgency-maximum .mobile-task-primary,
.technician-today-task-card.deadline-urgency-overdue .mobile-task-primary {
  background: #a92b2b;
}

.task-detail-screen .deadline-urgency-notice { margin: 0 0 14px; }
.owner-task-status-card .deadline-urgency-notice { width: 100%; }
.owner-task-detail-heading + .deadline-urgency-notice { margin: 16px 0 0; }

.technician-mobile-workspace .task-proof-check {
  min-height: 52px;
  font-size: 16px;
}

.technician-mobile-workspace .task-completion-checklist {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.technician-mobile-workspace .task-completion-checklist > strong {
  font-size: 18px;
}

.technician-mobile-workspace .task-proof-check input {
  width: 24px;
  height: 24px;
}

.technician-mobile-workspace .task-materials {
  padding: 18px;
  border-radius: 16px;
  background: #f7fbfd;
}

.technician-mobile-workspace .task-materials-heading strong,
.technician-mobile-workspace .task-material-frequent-row strong,
.technician-mobile-workspace .task-material-selected-row strong {
  font-size: 16px;
}

.technician-mobile-workspace .task-material-check {
  width: 48px;
  min-width: 48px;
  height: 48px;
}

.technician-mobile-workspace .task-material-add,
.technician-mobile-workspace .task-material-sheet-done,
.technician-mobile-workspace .detail-completion-actions .primary {
  min-height: 52px;
  font-size: 16px;
}

.technician-mobile-workspace textarea {
  min-height: 124px;
  font-size: 16px;
}

/* Frequent materials: understandable business labels, no technical mini-form. */
.owner-point-frequent-list {
  gap: 12px;
}

.owner-point-frequent-row {
  grid-template-columns:
    minmax(150px, 1.1fr)
    minmax(180px, 1.35fr)
    minmax(150px, 1fr)
    minmax(145px, .9fr)
    minmax(145px, .9fr);
  align-items: start;
  gap: 14px;
  padding: 16px;
  border-color: var(--ui-border);
  border-radius: var(--ui-radius-panel);
  background: var(--ui-surface);
}

.owner-point-frequent-row > strong {
  padding-top: 27px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.owner-point-frequent-row label,
.owner-frequent-order {
  display: grid;
  gap: 6px;
  color: var(--ui-muted);
  font-size: 13px;
  font-weight: 700;
}

.owner-point-frequent-row label small,
.owner-frequent-order small {
  min-height: 38px;
  font-weight: 500;
}

.owner-frequent-order > div,
.owner-frequent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-frequent-order button {
  flex: 1 1 66px;
}

.owner-point-frequent-row .owner-frequent-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--ui-border);
}

.owner-inventory-inline-fields {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

/* Inventory: dense readable registry with editing on demand. */
.inventory-dashboard .inventory-body {
  background: var(--ui-canvas);
}

.inventory-dashboard .inventory-card-list {
  grid-template-columns: 1fr;
  gap: 10px;
}

.inventory-dashboard .owner-inventory-item {
  height: auto;
  padding: 0;
  overflow: hidden;
}

.owner-inventory-summary {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.25fr)
    minmax(120px, .62fr)
    minmax(200px, 1.2fr)
    minmax(150px, .8fr)
    minmax(170px, 1fr);
  align-items: center;
  gap: 12px 18px;
  padding: 14px 16px;
}

.owner-inventory-item-heading {
  display: grid;
  gap: 6px;
}

.owner-inventory-item-heading .inventory-row-title {
  font-size: 17px;
  line-height: 1.3;
}

.owner-inventory-status {
  width: max-content;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--ui-success);
  background: #edf7f1;
  font-size: 12px;
  font-weight: 800;
}

.owner-inventory-item.inactive .owner-inventory-status {
  color: var(--ui-muted);
  background: #eef1f5;
}

.owner-inventory-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.owner-inventory-metric span {
  color: var(--ui-muted);
  font-size: 13px;
}

.owner-inventory-metric strong {
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.owner-inventory-editor {
  grid-column: 1 / -1;
  border-top: 1px solid var(--ui-border);
}

.owner-inventory-editor > summary {
  display: flex;
  align-items: center;
  width: max-content;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ui-accent-strong);
  cursor: pointer;
  font-weight: 800;
}

.owner-inventory-editor-body {
  display: grid;
  grid-template-columns: minmax(180px, .52fr) minmax(0, 1.48fr);
  gap: 14px 22px;
  padding: 18px;
  border-top: 1px solid var(--ui-border);
  background: var(--ui-surface-muted);
}

.owner-inventory-editor-body section {
  align-self: start;
}

.owner-inventory-editor-body h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.owner-inventory-editor-body p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
}

.owner-inventory-editor-body form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.owner-inventory-location-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.owner-inventory-cost-form {
  grid-template-columns: minmax(180px, 260px) minmax(180px, 1fr) auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.owner-inventory-editor .owner-inventory-hide {
  grid-column: 2;
  justify-self: start;
  margin: 0;
}

/* Finance: one workspace, compact totals and a native horizontal chart. */
.owner-finance {
  color: var(--ui-text);
  background: var(--ui-canvas);
}

.owner-finance-header,
.owner-finance-period,
.owner-finance-summary,
.owner-finance-tabs,
.owner-finance-content {
  max-width: 1500px;
}

.owner-finance-header h1 {
  font-size: clamp(26px, 2.2vw, 30px);
}

.owner-finance-period {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px 20px;
  padding: 14px 16px;
  border-radius: var(--ui-radius-panel);
  box-shadow: none;
}

.owner-finance-period > small {
  grid-column: 1 / -1;
}

.owner-finance-presets button,
.owner-finance-tabs button {
  min-height: 42px;
  border-radius: var(--ui-radius-control);
}

.owner-finance-summary {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-panel);
  background: var(--ui-surface);
}

.owner-finance-summary article {
  min-height: 76px;
  padding: 13px 16px;
  border: 0;
  border-right: 1px solid var(--ui-border);
  border-radius: 0;
}

.owner-finance-summary article:last-child {
  border-right: 0;
}

.owner-finance-summary strong {
  font-size: 22px;
}

.owner-finance-content {
  display: grid;
  gap: 14px;
}

.owner-finance-chart {
  padding: 18px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-panel);
  background: var(--ui-surface);
}

.owner-finance-chart header {
  margin-bottom: 18px;
}

.owner-finance-chart h2 {
  margin: 3px 0 4px;
  font-size: 21px;
}

.owner-finance-chart header p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
}

.owner-finance-chart ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.owner-finance-chart li {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 2fr) 110px;
  align-items: center;
  gap: 6px 14px;
}

.owner-finance-chart-label {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.owner-finance-chart-track {
  height: 18px;
  overflow: hidden;
  border-radius: 5px;
  background: #eceff5;
}

.owner-finance-chart-bar {
  display: block;
  width: var(--owner-finance-bar-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6555e8, #786be9);
}

.owner-finance-chart li > strong {
  text-align: right;
  white-space: nowrap;
}

.owner-finance-chart li > small {
  grid-column: 2 / 4;
}

.owner-finance-chart li > small em {
  color: var(--ui-warning);
  font-style: normal;
  font-weight: 800;
}

.owner-finance-trend {
  padding: 18px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-panel);
  background: linear-gradient(145deg, #fff 0%, #faf9ff 100%);
}

.owner-finance-trend header,
.owner-finance-trend footer,
.owner-finance-trend-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.owner-finance-trend h2 {
  margin: 3px 0 4px;
  font-size: 21px;
}

.owner-finance-trend header p,
.owner-finance-trend-meta,
.owner-finance-trend footer {
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.45;
}

.owner-finance-granularity {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.owner-finance-granularity button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  color: var(--ui-muted);
  background: #fff;
  font-size: 13px;
  font-weight: 750;
}

.owner-finance-granularity button.active {
  border-color: #6555e8;
  color: #3e34aa;
  background: #f0edff;
}

.owner-finance-trend-meta {
  margin-top: 16px;
}

.owner-finance-trend-meta strong {
  color: var(--ui-ink);
}

.owner-finance-line-wrap {
  margin: 8px 0 4px;
  overflow-x: auto;
}

.owner-finance-line {
  display: block;
  width: 100%;
  min-width: 430px;
  height: 230px;
}

.owner-finance-line line {
  stroke: #dfe3eb;
  stroke-width: 1;
}

.owner-finance-line polyline {
  fill: none;
  stroke: #6555e8;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.owner-finance-line circle {
  fill: #fff;
  stroke: #6555e8;
  stroke-width: 3;
}

.owner-finance-trend footer {
  align-items: center;
  margin-top: 8px;
}

.owner-finance-missing-note {
  color: #9a6200;
  font-weight: 750;
}

.owner-finance-coverage-note {
  margin: 0;
  padding: 11px 13px;
  border-left: 3px solid #786be9;
  border-radius: 8px;
  background: #f5f3ff;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.45;
}

.owner-finance-table {
  border-radius: var(--ui-radius-panel);
}

.owner-finance-table-head,
.owner-finance-table-row {
  min-height: 52px;
  font-size: 14px;
}

.owner-finance-table-head {
  font-size: 13px;
}

.owner-finance-table-head.has-share,
.owner-finance-table-row.has-share {
  grid-template-columns:
    minmax(220px, 1.5fr)
    repeat(3, minmax(90px, .58fr))
    minmax(130px, .72fr)
    minmax(70px, .42fr);
}

@media (min-width: 900px) {
  .owner-finance.owner-navigation-host {
    padding: 28px 32px 48px;
  }

  .owner-mobile-workspace .mobile-workspace-header,
  .performers-dashboard .tech-hero,
  .inventory-dashboard .tech-hero,
  .kpi-dashboard .tech-hero,
  .owner-detail-dashboard .detail-hero {
    min-height: 96px;
    padding: 20px 28px;
  }

  .owner-mobile-workspace .mobile-workspace-content,
  .performers-dashboard .performers-body,
  .inventory-dashboard .inventory-body,
  .kpi-dashboard .kpi-content,
  .owner-detail-dashboard .detail-body {
    padding: 20px 28px 36px;
  }
}

@media (max-width: 1100px) {
  .owner-point-frequent-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-point-frequent-row > strong,
  .owner-point-frequent-row .owner-frequent-actions {
    grid-column: 1 / -1;
  }

  .owner-point-frequent-row > strong {
    padding-top: 0;
  }

  .owner-inventory-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-inventory-item-heading,
  .owner-inventory-editor {
    grid-column: 1 / -1;
  }

  .owner-inventory-aliases {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .owner-finance-period {
    grid-template-columns: 1fr;
  }

  .owner-finance-period > small {
    grid-column: 1;
  }

  .owner-finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-finance-summary article:nth-child(2) {
    border-right: 0;
  }

  .owner-finance-summary article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--ui-border);
  }

  .owner-finance-chart li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }

  .owner-finance-chart-label {
    grid-column: 1 / -1;
  }

  .owner-finance-chart li > small {
    grid-column: 1 / -1;
  }

  .owner-finance-chart li > strong {
    min-width: 92px;
  }

  .owner-finance-trend header,
  .owner-finance-trend footer,
  .owner-finance-trend-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-finance-granularity {
    justify-content: flex-start;
  }

  .owner-inventory-editor-body {
    grid-template-columns: 1fr;
  }

  .owner-inventory-editor .owner-inventory-hide {
    grid-column: 1;
  }

  .owner-inventory-location-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .technician-mobile-workspace .mobile-workspace-content,
  .technician-mobile-workspace .detail-body {
    padding-inline: 13px;
  }

  .technician-today-task-card {
    padding: 15px;
  }

  .technician-mobile-workspace .task-materials {
    padding: 14px;
  }

  .task-material-frequent-row {
    grid-template-columns: 1fr;
  }

  .task-material-checks {
    flex-wrap: wrap;
  }

  .owner-point-frequent-row,
  .owner-inventory-inline-fields,
  .owner-inventory-summary {
    grid-template-columns: 1fr;
  }

  .owner-point-frequent-row > strong,
  .owner-point-frequent-row .owner-frequent-actions,
  .owner-inventory-item-heading,
  .owner-inventory-aliases,
  .owner-inventory-editor {
    grid-column: 1;
  }

  .owner-inventory-cost-form {
    grid-template-columns: 1fr;
  }

  .owner-finance-chart {
    padding: 14px;
  }

  .owner-finance-trend {
    padding: 14px;
  }
}
