: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: #1e6f73;
  --brand-strong: #14565a;
  --brand-soft: #dcefee;
  --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);
}

* {
  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;
}

.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, #3f7cff 0%, #2456d3 100%);
  color: #fff;
  border-color: rgba(25, 53, 131, 0.45);
  box-shadow: 0 10px 20px rgba(36, 86, 211, 0.28);
  font-weight: 800;
}

.primary:hover {
  background: linear-gradient(180deg, #4c87ff 0%, #1f4fc7 100%);
}

.primary:disabled {
  opacity: 1;
  background: linear-gradient(180deg, #98b3f3 0%, #7898e6 100%);
  color: rgba(255, 255, 255, 0.94);
  border-color: rgba(63, 89, 167, 0.42);
  box-shadow: none;
  cursor: wait;
}

#authSubmitButton {
  min-width: 140px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  letter-spacing: 0.01em;
}

.secondary {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-color: rgba(30, 111, 115, 0.14);
}

.secondary:hover {
  background: #d2e8e7;
}

.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);
}

.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-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;
}

.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: 36px;
  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;
}

.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;
}

.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;
  }
}
