﻿:root {
  --green-900: #07552f;
  --green-800: #0b693c;
  --green-700: #117849;
  --green-600: #168a55;
  --green-100: #e9f6ee;
  --green-50: #f3fbf6;
  --ink: #17202a;
  --muted: #687585;
  --line: #e7ecf0;
  --surface: #ffffff;
  --page: #f6f8f7;
  --amber: #e8a313;
  --amber-soft: #fff5dc;
  --blue: #2d91ca;
  --blue-soft: #e8f4fb;
  --violet: #8e52c8;
  --violet-soft: #f2eafb;
  --red: #d93655;
  --red-soft: #fff0f3;
  --shadow: 0 12px 34px rgba(23, 32, 42, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--page);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 252px minmax(240px, 520px) 1fr;
  gap: 24px;
  align-items: center;
  min-height: 68px;
  padding: 10px 28px;
  color: #fff;
  background: linear-gradient(90deg, var(--green-900), var(--green-800));
  box-shadow: 0 6px 18px rgba(7, 85, 47, 0.18);
}

.brand,
.nav-link,
.link-button {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  white-space: nowrap;
}

.brand-logo {
  width: 236px;
  height: 44px;
  object-fit: contain;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  color: var(--green-800);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.search input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search input::placeholder {
  color: #909aa5;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ghost-button,
.primary-button,
.role-menu-button,
.notification-button,
.action-row button,
.quick-panel button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.ghost-button,
.primary-button,
.role-menu-button,
.notification-button {
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.ghost-button,
.role-menu-button,
.notification-button {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.primary-button {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.ghost-button:hover,
.primary-button:hover,
.role-menu-button:hover,
.notification-button:hover,
.quick-panel button:hover,
.action-row button:hover {
  transform: translateY(-1px);
}

.notification-center {
  position: relative;
}

.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--green-800);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.notification-badge[hidden] {
  display: none;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 45;
  width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 90px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(9, 78, 45, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(7, 85, 47, 0.22);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.notification-center.open .notification-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.notification-panel-head strong {
  font-size: 14px;
}

.notification-panel-head button {
  min-height: 30px;
  padding: 0 9px;
  color: var(--green-700);
  background: var(--green-100);
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.notification-list {
  display: grid;
  gap: 6px;
  max-height: inherit;
  padding: 8px;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid transparent;
  border-radius: 7px;
  text-align: left;
}

.notification-item:hover {
  background: var(--green-50);
}

.notification-item.unread {
  background: #f8fdf9;
  border-color: rgba(17, 120, 73, 0.18);
}

.notification-item strong {
  color: var(--green-800);
  font-size: 13px;
  line-height: 1.25;
}

.notification-item.urgent strong {
  color: var(--red);
}

.notification-item p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.notification-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.notification-empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.role-switcher {
  position: relative;
  min-width: 172px;
}

.role-label {
  color: #fff;
  font-size: inherit;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
}

.role-menu-button {
  width: 100%;
  min-width: 172px;
  height: 42px;
  justify-content: flex-start;
  text-align: left;
  font-size: 15px;
  line-height: 1;
}

.role-current {
  flex: 1 1 auto;
  font-size: inherit;
  font-weight: 700;
  line-height: 1;
}

.role-chevron {
  margin-left: 2px;
  transition: transform 0.16s ease;
}

.role-switcher.open .role-chevron {
  transform: rotate(180deg);
}

.role-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 210px;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(9, 78, 45, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(7, 85, 47, 0.22);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.role-switcher.open .role-menu-list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.role-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  color: #2f3a45;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-weight: 750;
  text-align: left;
}

.role-option:hover,
.role-option.active {
  color: var(--green-800);
  background: var(--green-50);
}

.account-menu-summary {
  display: grid;
  gap: 3px;
  padding: 8px 10px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.account-menu-summary strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.account-menu-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.role-option.active::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-700);
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.sidebar {
  position: sticky;
  top: 68px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: calc(100vh - 68px);
  padding: 18px 18px 24px;
  background: #fff;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 0 14px;
  color: #394452;
  border-radius: var(--radius);
  font-weight: 650;
}

.nav-link svg,
.quick-panel svg,
.topbar svg,
.section-heading svg,
.action-row svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.nav-link.active,
.nav-link:hover {
  color: var(--green-800);
  background: var(--green-50);
}

.mobile-work-switcher {
  display: none;
}

.quick-panel {
  margin-top: auto;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-panel h2 {
  margin: 0 0 14px;
  font-size: 15px;
}

.quick-panel button {
  width: 100%;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0;
  color: var(--green-700);
  background: transparent;
  font-weight: 700;
}

.quick-panel button + button {
  margin-top: 10px;
}

.quick-panel-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.content {
  min-width: 0;
  padding: 22px 28px 28px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card,
.panel,
.details-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.04);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 20px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
}

.stat-card p {
  margin: 0 0 4px;
  color: #293341;
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.1;
}

.stat-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 650;
}

.stat-card.green .stat-icon {
  color: var(--green-700);
  background: var(--green-100);
}

.stat-card.emerald .stat-icon {
  color: var(--green-700);
  background: #e7f8ef;
}

.stat-card.amber .stat-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.stat-card.violet .stat-icon {
  color: var(--violet);
  background: var(--violet-soft);
}

.stat-card.blue .stat-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.main-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.panel,
.details-panel {
  padding: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h1,
.section-heading h2,
.details-title h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.journal-filter {
  width: min(240px, 100%);
  margin-left: auto;
}

.journal-filter > span {
  display: none;
}

.link-button {
  padding: 0;
  color: var(--green-700);
  background: transparent;
  font-weight: 700;
  white-space: nowrap;
}

.plant-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(138px, 1fr));
  gap: 14px;
}

.plant-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.05);
}

.plant-card button {
  display: grid;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.plant-card.active {
  border-color: rgba(17, 120, 73, 0.38);
  box-shadow: 0 12px 26px rgba(17, 120, 73, 0.16);
}

.plant-card img {
  width: 100%;
  aspect-ratio: 1 / 0.92;
  object-fit: cover;
}

.plant-meta {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.plant-meta h3 {
  margin: 0;
  min-height: 42px;
  font-size: 15px;
  line-height: 1.35;
}

.code {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.price {
  font-size: 17px;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.badge.sale {
  color: var(--green-700);
  background: var(--green-100);
}

.badge.reserve {
  color: #946100;
  background: var(--amber-soft);
}

.badge.rooting {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.mother {
  color: var(--violet);
  background: var(--violet-soft);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.page-heading h1 {
  margin: 2px 0 4px;
  font-size: 28px;
  line-height: 1.15;
}

.page-heading span,
.registry-table small {
  color: var(--muted);
  font-weight: 650;
}

.eyebrow {
  margin: 0;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-inline,
.secondary-inline,
.danger-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  white-space: nowrap;
}

.primary-inline {
  color: #fff;
  background: var(--green-700);
}

.page-actions .primary-inline span,
.modal-actions .primary-inline span,
.primary-inline span {
  color: #fff;
  font-weight: 800;
}

.secondary-inline {
  color: var(--green-700);
  background: var(--green-100);
}

.page-actions .secondary-inline span,
.modal-actions .secondary-inline span,
.secondary-inline span {
  color: var(--green-700);
  font-weight: 800;
}

.danger-inline {
  color: #fff;
  background: var(--red);
}

.danger-inline span {
  color: #fff;
  font-weight: 800;
}

.plants-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
}

.filter-field {
  display: grid;
  gap: 7px;
}

.filter-field span {
  color: #596475;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-field select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  font-weight: 700;
}

.filter-field select:focus {
  border-color: rgba(17, 120, 73, 0.45);
  box-shadow: 0 0 0 3px rgba(17, 120, 73, 0.12);
}

.native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select {
  position: relative;
}

.custom-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 750;
  text-align: left;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.custom-select-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--green-700);
  border-bottom: 2px solid var(--green-700);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.custom-select.open .custom-select-button,
.custom-select-button:focus-visible {
  border-color: rgba(17, 120, 73, 0.45);
  box-shadow: 0 0 0 3px rgba(17, 120, 73, 0.12);
  outline: 0;
}

.custom-select.open .custom-select-button::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 70;
  width: 100%;
  min-width: 190px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(9, 78, 45, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(7, 85, 47, 0.18);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.custom-select.open .custom-select-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  color: #2f3a45;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-weight: 750;
  text-align: left;
}

.custom-select-option:hover,
.custom-select-option.active {
  color: var(--green-800);
  background: var(--green-50);
}

.custom-select-option.active::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-700);
}

.registry-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.registry-summary-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.registry-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.registry-summary-card strong {
  font-size: 24px;
  line-height: 1;
}

.registry-summary-card.green {
  border-color: rgba(17, 120, 73, 0.16);
}

.registry-summary-card.emerald strong,
.registry-summary-card.green strong {
  color: var(--green-700);
}

.registry-summary-card.amber strong {
  color: var(--amber);
}

.registry-summary-card.blue strong {
  color: var(--blue);
}

.registry-summary-card.violet strong {
  color: var(--violet);
}

.registry-panel {
  padding-bottom: 10px;
}

.registry-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.registry-table-wrap {
  overflow-x: auto;
}

.registry-table {
  min-width: 1080px;
  font-size: 13px;
}

.registry-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.registry-table td {
  vertical-align: middle;
}

.registry-table tr.selected-row {
  background: var(--green-50);
}

.registry-table tr[data-plant-row],
.registry-table tr[data-registry-group-row] {
  cursor: pointer;
}

.registry-group-row {
  background: #fbfcfd;
}

.registry-group-row.open {
  background: var(--green-50);
}

.registry-child-row {
  background: #fff;
  box-shadow: inset 4px 0 0 rgba(17, 120, 73, 0.18);
}

.registry-plant {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}

.registry-group-toggle {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.registry-group-toggle span {
  min-width: 0;
  overflow: hidden;
}

.registry-group-toggle strong,
.registry-group-toggle small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registry-group-toggle svg,
.registry-group-toggle i[data-lucide] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--green-700);
  margin-left: auto;
}

.registry-plant img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  object-fit: cover;
}

.registry-plant span,
.registry-table td > span {
  display: grid;
  gap: 2px;
}

.registry-place {
  color: var(--green-700);
  font-weight: 850;
}

.registry-group-note,
.registry-quantity-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.registry-group-note {
  color: #596475;
  background: #f1f5f9;
}

.registry-quantity-pill {
  color: var(--green-700);
  background: var(--green-100);
}

.placements-table {
  min-width: 940px;
}

.placement-path {
  display: grid;
  gap: 2px;
  min-width: 260px;
}

.placement-path strong {
  color: var(--ink);
}

.placement-root-row {
  background: #fff;
}

.placement-root-row:hover,
.placement-children-row:hover {
  background: transparent;
}

.placement-tree-toggle,
.placement-section-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}

.placement-tree-toggle svg,
.placement-section-toggle svg {
  width: 17px;
  height: 17px;
  color: var(--green-700);
}

.placement-section-toggle:disabled {
  cursor: default;
}

.placement-section-toggle:disabled svg {
  opacity: 0.25;
}

.placement-children-row td {
  padding: 0 10px 14px 46px;
  background: #fbfcfd;
}

.placement-children {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.placement-section-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.placement-section-head,
.placement-shelf-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 70px 82px max-content;
  gap: 12px;
  align-items: center;
}

.placement-section-head small,
.placement-shelf-name small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.placement-shelf-list {
  display: grid;
  gap: 8px;
  padding: 8px 0 0 28px;
  border-top: 1px solid var(--line);
}

.placement-shelf-row {
  min-height: 50px;
  padding: 8px 10px;
  background: var(--green-50);
  border-radius: 7px;
}

.placement-shelf-name {
  display: grid;
  gap: 2px;
}

.placement-count {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  min-width: 34px;
  padding: 4px 9px;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.placement-qr-cell {
  display: inline-grid;
  place-items: center;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.placement-qr-cell .qr {
  width: 58px;
  height: 58px;
  gap: 2px;
  padding: 5px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.table-action svg {
  width: 15px;
  height: 15px;
}

.table-action.neutral {
  color: #415061;
  background: #f2f5f6;
}

.table-action.edit {
  color: var(--green-700);
  background: var(--green-100);
}

.table-action.print {
  color: var(--blue);
  background: var(--blue-soft);
}

.table-action.danger {
  color: var(--red);
  background: var(--red-soft);
}

.users-grid {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.user-form {
  display: grid;
  gap: 14px;
}

.user-form-actions {
  margin-top: 4px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.user-form-panel {
  min-width: 0;
}

.users-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: visible;
}

.users-list-panel .registry-table-wrap {
  min-height: 0;
}

.user-form-panel .primary-inline,
.user-form-panel .secondary-inline,
.user-form-panel .code-input-row button {
  max-width: 100%;
}

.user-form-panel .primary-inline {
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.cabinet-link-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--green-50);
  border: 1px solid rgba(17, 120, 73, 0.18);
  border-radius: var(--radius);
  min-width: 0;
}

.cabinet-link-box span {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cabinet-link-box input {
  min-width: 0;
  color: var(--green-800);
  background: #fff;
  border: 1px solid rgba(17, 120, 73, 0.18);
  border-radius: var(--radius);
  font-weight: 750;
}

.users-table {
  min-width: 840px;
}

.workspace-summary {
  margin-bottom: 18px;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--green-50);
  border: 1px solid rgba(17, 120, 73, 0.14);
  border-radius: var(--radius);
}

.segmented-control button {
  min-height: 32px;
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-weight: 850;
}

.segmented-control button.active,
.segmented-control button:hover {
  color: var(--green-800);
  background: #fff;
  box-shadow: 0 6px 14px rgba(17, 120, 73, 0.08);
}

.workspace-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.12fr);
  gap: 16px;
  align-items: start;
}

.workspace-task-list {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding-right: 4px;
}

.workspace-task-preview {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-700);
  border-radius: var(--radius);
  text-align: left;
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.04);
}

.workspace-task-preview:hover,
.workspace-task-preview.selected {
  border-color: rgba(17, 120, 73, 0.34);
  border-left-color: var(--green-700);
  box-shadow: 0 12px 28px rgba(17, 120, 73, 0.11);
}

.workspace-task-preview.review {
  border-left-color: var(--blue);
}

.workspace-task-preview.revision,
.workspace-task-preview.overdue {
  border-left-color: #d97706;
}

.workspace-task-preview.done,
.workspace-task-preview.cancelled {
  border-left-color: #94a3b8;
  background: #f8fafc;
  opacity: 0.78;
}

.workspace-task-preview strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.workspace-task-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.workspace-task-preview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.workspace-task-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace-task-preview-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 7px;
  color: #596475;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.workspace-task-preview-meta svg,
.workspace-task-preview-meta i[data-lucide] {
  width: 13px;
  height: 13px;
}

.workspace-task-detail {
  position: sticky;
  top: 88px;
  min-width: 0;
}

.workspace-detail-inner {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.workspace-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--green-50);
  border: 1px solid rgba(17, 120, 73, 0.14);
  border-radius: var(--radius);
}

.workspace-detail-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workspace-detail-head span {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-detail-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-detail-close {
  display: none;
}

.workspace-detail-body {
  min-width: 0;
}

.workspace-detail-body .task-card {
  box-shadow: 0 12px 30px rgba(23, 32, 42, 0.07);
}
.task-board,
.admin-task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-600);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(23, 32, 42, 0.05);
}

.task-card.review {
  border-left-color: var(--blue);
}

.task-card.revision,
.task-card.overdue {
  border-left-color: #d97706;
}

.task-card.done {
  border-left-color: #6b7280;
  opacity: 0.78;
}

.task-card.cancelled {
  border-left-color: #94a3b8;
  background: #f8fafc;
  opacity: 0.72;
}

.task-card-highlight {
  animation: task-card-pulse 1.4s ease;
}

@keyframes task-card-pulse {
  0%,
  100% {
    box-shadow: 0 10px 24px rgba(23, 32, 42, 0.05);
  }

  35% {
    box-shadow: 0 0 0 4px rgba(17, 120, 73, 0.18), 0 14px 30px rgba(17, 120, 73, 0.12);
  }
}

.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-card h3 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.task-status,
.task-priority {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 9px;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.task-status.review {
  color: var(--blue);
  background: var(--blue-soft);
}

.task-status.revision,
.task-status.overdue {
  color: #9a5a00;
  background: #fff4d6;
}

.task-status.done {
  color: #4b5563;
  background: #f1f5f9;
}

.task-status.cancelled {
  color: #64748b;
  background: #e2e8f0;
}

.task-priority {
  color: var(--muted);
  background: #f8fafc;
  white-space: nowrap;
}

.task-priority.urgent {
  color: #b42318;
  background: var(--red-soft);
}

.task-description,
.task-review-note {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.task-review-note strong {
  color: var(--ink);
}

.task-objects {
  display: grid;
  gap: 8px;
}

.task-objects > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.task-object-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.task-object-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  color: var(--green-800);
  background: var(--green-50);
  border: 1px solid rgba(17, 120, 73, 0.16);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.task-object-plant {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: min(100%, 360px);
  min-height: 74px;
  padding: 8px;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.05);
}

.task-object-plant:hover {
  border-color: rgba(17, 120, 73, 0.36);
  box-shadow: 0 10px 22px rgba(17, 120, 73, 0.12);
}

.task-object-plant img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 7px;
  background: #f8fafc;
}

.task-object-plant-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.task-object-plant-body strong,
.task-object-plant-body span,
.task-object-plant-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-object-plant-body strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.task-object-plant-body span,
.task-object-plant-body small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.task-object-plant-body span {
  color: var(--green-700);
  font-weight: 850;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 9px;
  color: #596475;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.task-meta svg {
  width: 14px;
  height: 14px;
}

.task-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 120px));
  gap: 10px;
}

.task-photo-groups {
  display: grid;
  gap: 12px;
}

.task-photo-group {
  display: grid;
  gap: 8px;
}

.task-photo-group h4 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.task-photos figure {
  display: grid;
  gap: 5px;
  margin: 0;
}

.task-photo-preview {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.task-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.task-photos figcaption {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.task-object-controls {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.task-object-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.task-object-row .secondary-inline {
  min-height: 40px;
}

.zoomed-task-photo {
  display: block;
  width: min(100%, 760px);
  max-height: min(78vh, 760px);
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
}

.task-result-field,
.task-review-box {
  min-width: 0;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.task-actions .primary-inline,
.task-actions .secondary-inline,
.task-photo-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.task-photo-button {
  cursor: pointer;
}

.task-photo-button input {
  display: none;
}

.task-check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--green-50);
  border: 1px solid rgba(17, 120, 73, 0.16);
  border-radius: var(--radius);
  font-weight: 850;
}

.task-check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--green-700);
}

.task-review-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.productivity-chart-panel {
  margin-bottom: 18px;
}

.compact-filter {
  min-width: 150px;
}

.productivity-chart {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.chart-row > strong {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--green-50);
  border-radius: var(--radius);
}

.chart-lane {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chart-task,
.chart-empty {
  display: inline-grid;
  gap: 2px;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--green-800);
  background: #fff;
  border: 1px solid rgba(17, 120, 73, 0.16);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.chart-task.review {
  color: var(--blue);
  border-color: rgba(47, 111, 237, 0.24);
}

.chart-task.overdue,
.chart-task.revision {
  color: #9a5a00;
  border-color: rgba(217, 119, 6, 0.24);
}

.chart-task.done {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
  opacity: 0.72;
  filter: grayscale(0.35);
}

.chart-task.done small {
  color: #94a3b8;
}

.chart-task.cancelled {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.55;
}

.chart-task.cancelled small {
  color: #a8b2c1;
}

.chart-task small,
.chart-empty {
  color: var(--muted);
  font-weight: 750;
}

.payroll-panel {
  margin-bottom: 18px;
}

.payroll-list,
.payroll-personal {
  display: grid;
  gap: 10px;
}

.payroll-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.payroll-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(17, 120, 73, 0.36);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.04);
}

.payroll-card.top-employee {
  background: linear-gradient(180deg, #fffdf5, #ffffff 58%);
  border-color: rgba(232, 163, 19, 0.42);
  border-left-color: var(--amber);
  box-shadow: 0 14px 30px rgba(232, 163, 19, 0.12);
}

.payroll-card-head,
.payroll-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.payroll-card-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.payroll-card-head strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.payroll-card-head span,
.payroll-card-foot span,
.payroll-card-foot em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.payroll-crown {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #9a5a00;
  background: var(--amber-soft);
  border: 1px solid rgba(232, 163, 19, 0.32);
  border-radius: 999px;
  flex: 0 0 auto;
}

.payroll-crown svg,
.payroll-crown i[data-lucide] {
  width: 18px;
  height: 18px;
}

.payroll-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.payroll-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.payroll-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.payroll-metric strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.payroll-metric small {
  color: var(--green-800);
  font-size: 12px;
  font-weight: 850;
}

.payroll-card-foot {
  flex-wrap: wrap;
  padding-top: 2px;
}

.payroll-card-foot em {
  color: var(--green-800);
}

.payroll-card.top-employee .payroll-card-foot em {
  color: #9a5a00;
}

.productivity-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.task-form,
.schedule-form {
  display: grid;
  gap: 14px;
}

.task-form-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.schedule-panel {
  margin-bottom: 18px;
}

.schedule-heading {
  align-items: center;
}

.schedule-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.schedule-heading h2 {
  margin: 0;
}

.schedule-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.schedule-toggle-button {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.schedule-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-content {
  display: grid;
  gap: 14px;
}

.schedule-content[hidden],
.schedule-day-details[hidden],
.schedule-day-editor[hidden] {
  display: none !important;
}

.schedule-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  gap: 8px;
}

.schedule-day {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 126px;
  padding: 10px 10px 10px 58px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.04);
}

.schedule-weather {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 36px;
  min-width: 0;
  overflow: visible;
  color: var(--ink);
  text-overflow: clip;
  white-space: normal;
}

.schedule-weather img,
.schedule-weather svg,
.schedule-weather i[data-lucide] {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.schedule-weather em {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.schedule-day:hover,
.schedule-day.selected {
  border-color: rgba(17, 120, 73, 0.34);
  box-shadow: 0 12px 26px rgba(17, 120, 73, 0.1);
}

.schedule-day.today {
  background: var(--green-50);
}

.schedule-day.has-shifts {
  border-left: 4px solid var(--green-700);
}

.schedule-day span,
.schedule-day small,
.schedule-day em,
.schedule-day b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-day span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.schedule-day strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.schedule-day small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.schedule-day em {
  align-self: end;
  color: var(--green-800);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.schedule-day b {
  color: #596475;
  font-size: 11px;
  font-weight: 750;
}

.schedule-day .schedule-lunch {
  color: var(--green-800);
  font-size: 11px;
  font-weight: 850;
}

.schedule-day .schedule-weather {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.schedule-day .schedule-weather em {
  align-self: auto;
  color: var(--ink);
  line-height: 1;
  text-align: center;
}

.schedule-day-details {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.schedule-day-details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-day-details-head div,
.schedule-detail-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.schedule-day-details-head strong {
  color: var(--ink);
  font-size: 17px;
}

.schedule-day-details-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.schedule-detail-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.schedule-hourly-weather {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.schedule-hour-card,
.schedule-shift-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.schedule-hour-card {
  flex: 0 0 76px;
  justify-items: center;
  text-align: center;
}

.schedule-hour-card img,
.schedule-hour-card svg,
.schedule-hour-card i[data-lucide] {
  width: 28px;
  height: 28px;
}

.schedule-hour-card strong,
.schedule-hour-card span,
.schedule-shift-card strong,
.schedule-shift-card span,
.schedule-shift-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-hour-card strong {
  color: var(--muted);
  font-size: 12px;
}

.schedule-hour-card span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.schedule-shift-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.schedule-shift-card strong {
  color: var(--ink);
}

.schedule-shift-card span {
  color: var(--green-800);
  font-weight: 900;
}

.schedule-shift-card small {
  color: var(--muted);
  font-weight: 750;
}

.schedule-day-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.schedule-day-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-day-editor-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.schedule-day-editor-head strong {
  color: var(--ink);
  font-size: 17px;
}

.schedule-day-editor-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.schedule-time-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(120px, 0.75fr) minmax(220px, 1.5fr);
  gap: 12px;
}

.schedule-worker-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.schedule-worker-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.schedule-worker-card.active {
  border-color: rgba(17, 120, 73, 0.24);
  background: var(--green-50);
}

.schedule-worker-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--green-700);
}

.schedule-worker-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.schedule-worker-card strong,
.schedule-worker-card small,
.schedule-worker-card em,
.schedule-worker-card b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-worker-card strong {
  color: var(--ink);
}

.schedule-worker-card small,
.schedule-worker-card em,
.schedule-worker-card b {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.schedule-worker-card em {
  color: var(--green-800);
  font-size: 12px;
  font-weight: 900;
}

.schedule-worker-card b {
  grid-column: 2 / -1;
  font-size: 12px;
}

.schedule-worker-card .schedule-worker-lunch {
  color: var(--green-800);
}

.cabinet-summary-card {
  min-width: 0;
}

.cabinet-summary-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-summary-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.cabinet-panel {
  margin-bottom: 18px;
}

.cabinet-heading {
  align-items: center;
}

.cabinet-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cabinet-heading h2 {
  margin: 0;
}

.cabinet-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.cabinet-calendar {
  display: grid;
  gap: 8px;
}

.cabinet-current-calendar {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
}

.cabinet-archive-calendar,
.cabinet-month-weekdays {
  grid-template-columns: repeat(7, minmax(112px, 1fr));
}

.cabinet-month-weekdays {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.cabinet-month-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.cabinet-day,
.cabinet-day-empty {
  min-width: 0;
  min-height: 132px;
  border-radius: var(--radius);
}

.cabinet-day {
  display: grid;
  grid-template-rows: auto minmax(34px, 1fr) auto auto;
  gap: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.04);
}

.cabinet-day.working {
  background: var(--green-50);
  border-color: rgba(17, 120, 73, 0.2);
  box-shadow: 0 12px 24px rgba(17, 120, 73, 0.08);
}

.cabinet-day.today {
  border-color: rgba(17, 120, 73, 0.42);
}

.cabinet-day.muted {
  min-height: 112px;
  color: #9aa5b1;
  background: #f8fafc;
  box-shadow: none;
}

.cabinet-day.compact {
  min-height: 116px;
  padding: 10px;
}

.cabinet-day-date {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: start;
}

.cabinet-day-date span,
.cabinet-day-date small,
.cabinet-day-note,
.cabinet-day-lunch,
.cabinet-day b,
.cabinet-day-shifts span,
.cabinet-day-shifts em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-day-date span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.cabinet-day-date strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--ink);
  font-size: 30px;
  line-height: 0.95;
}

.cabinet-day-date small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.cabinet-day-shifts {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.cabinet-day-shifts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  min-height: 25px;
  padding: 3px 8px;
  color: var(--green-800);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(17, 120, 73, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.cabinet-day-shifts svg,
.cabinet-day-shifts i[data-lucide] {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.cabinet-day-shifts em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.cabinet-day b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.cabinet-day-lunch {
  color: var(--green-800);
  font-size: 11px;
  font-weight: 850;
}

.cabinet-day-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.cabinet-day-empty {
  display: block;
}

.user-cell {
  display: grid;
  gap: 2px;
}

.user-cell strong {
  color: var(--ink);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 9px;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 2px 9px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

.user-role-control {
  display: block;
  width: 168px;
}

.user-role-control .custom-select-button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--green-700);
  background: var(--green-50);
  border-color: rgba(17, 120, 73, 0.18);
  font-size: 12px;
  font-weight: 850;
}

.users-table .custom-select-menu {
  z-index: 85;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(10, 22, 18, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.plant-view-backdrop {
  z-index: 115;
}

.plant-action-backdrop {
  z-index: 118;
}

.modal-panel {
  width: min(1120px, 100%);
  max-height: min(92vh, 880px);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(7, 85, 47, 0.24);
}

.modal-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.modal-heading h2 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #526070;
  background: #f4f7f5;
  border: 0;
  border-radius: var(--radius);
}

.plant-form {
  padding: 22px;
}

.plant-view-panel {
  width: min(980px, 100%);
}

.plant-view-body {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.plant-view-hero {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.plant-view-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  align-items: start;
}

.plant-view-media,
.plant-view-info,
.plant-view-codes-wrap {
  min-width: 0;
}

.plant-view-media {
  display: grid;
  gap: 14px;
}

.plant-view-media > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(23, 32, 42, 0.08);
}

.plant-view-codes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plant-view-codes > div {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 0;
}

.plant-view-codes span,
.plant-view-label {
  color: #596475;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.plant-view-info {
  display: grid;
  gap: 12px;
}

.plant-view-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--green-50);
  border: 1px solid rgba(17, 120, 73, 0.14);
  border-radius: var(--radius);
}

.plant-view-summary > div {
  display: grid;
  gap: 8px;
}

.plant-view-summary strong {
  font-size: 24px;
  line-height: 1;
}

.plant-status-control {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 170px;
}

.plant-status-control span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.plant-status-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  color: var(--green-800);
  background: #fff;
  border: 1px solid rgba(17, 120, 73, 0.22);
  border-radius: 7px;
  outline: 0;
  font-weight: 900;
  text-align: left;
}

.plant-status-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--green-700);
  border-bottom: 2px solid var(--green-700);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.plant-status-control.open .plant-status-button::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.plant-status-button:focus-visible,
.plant-status-control.open .plant-status-button {
  border-color: rgba(17, 120, 73, 0.45);
  box-shadow: 0 0 0 3px rgba(17, 120, 73, 0.12);
}

.plant-status-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 25;
  display: none;
  gap: 4px;
  width: min(220px, calc(100vw - 44px));
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(9, 78, 45, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(7, 85, 47, 0.18);
}

.plant-status-control.open .plant-status-menu {
  display: grid;
}

.plant-status-menu[hidden] {
  display: none !important;
}

.plant-status-menu button {
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-align: left;
  font-weight: 850;
}

.plant-status-menu button:hover,
.plant-status-menu button.active {
  color: var(--green-800);
  background: var(--green-50);
}

.plant-view-code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  color: #526070;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}

.plant-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.plant-facts div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.plant-facts span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.plant-facts strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-view-list {
  margin-bottom: 0;
}

.plant-view-comment {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.45;
}

.plant-view-comment p {
  margin: 0;
}

.plant-view-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.plant-work-menu {
  position: relative;
  min-width: min(240px, 100%);
}

.plant-work-toggle {
  width: 100%;
}

.plant-work-toggle svg:last-child {
  width: 16px;
  height: 16px;
}

.plant-work-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: none;
  gap: 4px;
  width: min(260px, calc(100vw - 44px));
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(9, 78, 45, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(7, 85, 47, 0.18);
}

.plant-work-menu.open .plant-work-list {
  display: grid;
}

.plant-work-list[hidden] {
  display: none !important;
}

.plant-work-list button {
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-align: left;
  font-weight: 850;
}

.plant-work-list button:hover {
  color: var(--green-800);
  background: var(--green-50);
}

.plant-view-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plant-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plant-section-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.plant-section-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 26px;
  padding: 2px 8px;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.plant-event-gallery,
.plant-children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.plant-event-photo,
.plant-child-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
}

.plant-event-photo img,
.plant-child-card img {
  width: 100%;
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #f8fafc;
}

.plant-event-photo span,
.plant-child-card strong,
.plant-child-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-event-photo span,
.plant-child-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.plant-child-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plant-child-card strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.plant-log-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: #eef5f0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plant-log-tabs button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-weight: 850;
}

.plant-log-tabs button.active,
.plant-log-tabs button:hover {
  color: var(--green-800);
  background: #fff;
  box-shadow: 0 6px 14px rgba(17, 120, 73, 0.08);
}

.plant-timeline {
  display: grid;
  gap: 10px;
}

.plant-event {
  display: grid;
  gap: 8px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.plant-event-main {
  display: grid;
  gap: 3px;
}

.plant-event-main strong {
  color: var(--ink);
  font-size: 14px;
}

.plant-event-main span,
.plant-event p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.plant-event-fields {
  display: grid;
  gap: 6px;
  margin: 0;
}

.plant-event-fields div {
  display: grid;
  grid-template-columns: minmax(96px, 150px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.plant-event-fields dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.plant-event-fields dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.plant-event-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.plant-event-thumbs button {
  width: 58px;
  height: 58px;
  padding: 0;
  background: transparent;
  border: 0;
}

.plant-event-thumbs img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.plant-action-panel {
  width: min(560px, 100%);
}

.plant-action-form {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
}

.plant-action-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.plant-action-fields .wide {
  grid-column: 1 / -1;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

.form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field.wide {
  grid-column: 1 / -1;
}

.form-fields > .wide {
  grid-column: 1 / -1;
}

.form-field span,
.photo-upload > span,
.code-preview > span {
  color: #596475;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea,
.code-input-row input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  font-weight: 700;
}

.form-field textarea {
  min-height: 90px;
  padding: 10px 12px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.code-input-row input:focus {
  border-color: rgba(17, 120, 73, 0.45);
  box-shadow: 0 0 0 3px rgba(17, 120, 73, 0.12);
}

.form-field input[readonly] {
  color: var(--muted);
  background: #f8fafc;
  cursor: default;
}

.code-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  min-width: 0;
}

.placement-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 40px;
  gap: 8px;
  min-width: 0;
}

.placement-select-row:has(.scan-placement-button[hidden]) {
  grid-template-columns: minmax(0, 1fr) 40px;
}

.placement-search-box,
.task-object-search-box {
  position: relative;
  min-width: 0;
}

.placement-search-box input,
.task-object-search-box input,
.task-object-search-box textarea {
  width: 100%;
}

.placement-suggestions,
.task-object-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 105;
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(9, 78, 45, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(7, 85, 47, 0.18);
}

.placement-suggestions[hidden],
.task-object-suggestions[hidden],
.placement-section-form-row [hidden] {
  display: none !important;
}

.placement-suggestions button,
.task-object-suggestions button {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-align: left;
}

.placement-suggestions button:hover,
.task-object-suggestions button:hover {
  color: var(--green-800);
  background: var(--green-50);
}

.placement-suggestions small,
.task-object-suggestions small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.task-object-suggestions strong {
  line-height: 1.25;
}

.scan-placement-button[hidden] {
  display: none;
}

.square-action-button {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  color: var(--green-700);
  background: var(--green-100);
  border: 0;
  border-radius: var(--radius);
}

.square-action-button svg {
  width: 18px;
  height: 18px;
}

.code-input-row button {
  min-height: 40px;
  padding: 0 12px;
  color: var(--green-700);
  background: var(--green-100);
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  white-space: nowrap;
}

.form-side {
  display: grid;
  gap: 14px;
}

.photo-upload,
.code-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.photo-file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  padding: 0 12px;
  color: var(--green-700);
  background: var(--green-100);
  border: 0;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.photo-upload:hover .file-picker-button,
.file-picker-field:hover .file-picker-button {
  color: var(--green-800);
  background: var(--green-50);
  box-shadow: inset 0 0 0 1px rgba(17, 120, 73, 0.16);
}

.photo-upload img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: #fff;
}

.photo-upload small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

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

.file-picker-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.code-preview {
  justify-items: center;
}

.code-preview > span {
  justify-self: start;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.placement-form-backdrop {
  z-index: 88;
}

.plant-form + .placement-form-backdrop,
.placement-form-backdrop.open {
  z-index: 100;
}

.placement-modal-panel {
  width: min(760px, 100%);
}

.placement-form {
  padding: 22px;
}

.placement-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.placement-section-builder {
  display: grid;
  gap: 12px;
}

.placement-section-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.placement-section-builder-head > span {
  color: #596475;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-inline {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.placement-section-list {
  display: grid;
  gap: 10px;
}

.placement-section-add {
  justify-self: start;
}

.placement-section-form-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(110px, 1fr) minmax(110px, 1fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.placement-section-form-row:has(.placement-section-remove) {
  grid-template-columns: minmax(112px, 1.1fr) minmax(104px, 1fr) minmax(104px, 1fr) 40px;
}

.placement-section-form-row .form-field {
  min-width: 0;
}

.placement-section-remove {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  align-self: end;
  justify-self: start;
}

.placement-section-remove span {
  display: none;
}

.placement-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.placement-preview > span {
  color: #596475;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.placement-preview-row {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.placement-preview-row span,
.placement-preview-more {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.placement-preview-row strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.placement-preview-more {
  padding: 4px 2px 0;
}

.confirm-backdrop {
  z-index: 125;
}

.confirm-panel {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  width: min(470px, 100%);
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(217, 54, 85, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(7, 85, 47, 0.24);
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: var(--radius);
}

.confirm-panel h2 {
  margin: 2px 0 6px;
  font-size: 20px;
}

.confirm-panel p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.confirm-comment {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.confirm-comment[hidden] {
  display: none;
}

.confirm-comment span {
  color: #596475;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.confirm-comment textarea {
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  resize: vertical;
  font-weight: 700;
}

.confirm-comment textarea:focus {
  border-color: rgba(17, 120, 73, 0.45);
  box-shadow: 0 0 0 3px rgba(17, 120, 73, 0.12);
}

.confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cabinet-login-backdrop {
  z-index: 95;
}

.qr-scan-backdrop {
  z-index: 126;
}

.qr-scan-panel {
  width: min(460px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(17, 120, 73, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(7, 85, 47, 0.24);
}

.qr-scan-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.qr-scan-body video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #0a0f13;
  border-radius: var(--radius);
}

.qr-scan-body p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.qr-scan-body p[data-status="loading"] {
  color: var(--green-700);
}

.qr-scan-body p[data-status="ready"] {
  color: var(--green-800);
}

.qr-scan-body p[data-status="warning"] {
  color: #a15c00;
}

.qr-scan-body p[data-status="error"] {
  color: #b91c1c;
}

.code-zoom-backdrop {
  z-index: 130;
}

.code-zoom-panel {
  width: min(620px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(17, 120, 73, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(7, 85, 47, 0.24);
}

.code-zoom-body {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 26px;
  background: #f8faf9;
}

.code-zoom-body .barcode,
.code-zoom-body .qr {
  width: min(100%, 460px);
  height: auto;
}

.code-zoom-body .qr {
  max-width: 360px;
  border-radius: var(--radius);
}

.cabinet-login-panel {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  width: min(470px, 100%);
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(17, 120, 73, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(7, 85, 47, 0.24);
}

.cabinet-login-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: var(--radius);
}

.cabinet-login-icon svg {
  width: 25px;
  height: 25px;
}

.cabinet-login-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.cabinet-login-form h2 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.cabinet-login-form > p:not(.eyebrow) {
  margin: -5px 0 2px;
  color: var(--muted);
  font-weight: 650;
}

.cabinet-login-submit {
  width: 100%;
  margin-top: 4px;
}

.cabinet-session .role-menu-button {
  cursor: default;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 14px;
}

.journal-table {
  min-width: 860px;
}

.journal-table td:nth-child(5) {
  min-width: 220px;
  white-space: normal;
  line-height: 1.35;
}

.journal-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.journal-type.sales {
  color: var(--blue);
  background: var(--blue-soft);
}

.journal-type.plants {
  color: var(--green-700);
  background: var(--green-100);
}

.journal-type.storage {
  color: var(--violet);
  background: var(--violet-soft);
}

th,
td {
  padding: 13px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: #596475;
  background: #fbfcfd;
  font-size: 13px;
  font-weight: 800;
}

tbody tr:hover {
  background: var(--green-50);
}

.details-panel {
  position: sticky;
  top: 90px;
  min-width: 0;
}

.details-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.edit-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  color: var(--green-700);
  background: var(--green-100);
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  white-space: nowrap;
}

.label-preview {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 150px;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.label-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.codes {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.code-open-button {
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: zoom-in;
}

.code-open-button:focus-visible {
  outline: 3px solid rgba(17, 120, 73, 0.22);
  outline-offset: 3px;
}

.barcode {
  display: block;
  width: 170px;
  max-width: 100%;
  height: auto;
  background: #fff;
  cursor: zoom-in;
}

.barcode-bg,
.qr-bg {
  fill: #fff;
}

.barcode-bars,
.qr-modules {
  fill: #0a0f13;
}

.barcode text {
  fill: #5b6470;
  font-size: 9px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.qr {
  display: block;
  width: 96px;
  height: 96px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

.barcode:focus-visible,
.qr:focus-visible {
  outline: 3px solid rgba(17, 120, 73, 0.22);
  outline-offset: 3px;
}

.detail-list {
  display: grid;
  margin: 0 0 18px;
}

.detail-row {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 39px;
  border-bottom: 1px solid var(--line);
}

.detail-row dt {
  color: #566273;
  font-weight: 700;
}

.detail-row dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.detail-row .place {
  color: var(--green-700);
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-row button {
  min-height: 42px;
  padding: 0 12px;
  font-weight: 800;
}

.action-row .sell {
  color: var(--green-700);
  background: var(--green-100);
}

.action-row .move {
  color: var(--blue);
  background: var(--blue-soft);
}

.action-row .price-action {
  color: #9a6600;
  background: var(--amber-soft);
}

.action-row .delete {
  color: var(--red);
  background: var(--red-soft);
}

.role-access-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  color: #566273;
  background: #f8faf9;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
}

.is-hidden-by-role {
  display: none !important;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-state.compact {
  padding: 16px;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 16px;
  color: #fff;
  background: #152018;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

i[data-lucide] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-style: normal;
}

i[data-lucide]::before {
  content: attr(data-fallback);
  font-weight: 900;
}

svg.lucide + span,
svg.lucide {
  flex: 0 0 auto;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 252px minmax(220px, 1fr);
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .layout {
    min-height: calc(100vh - 120px);
  }

  .sidebar {
    top: 120px;
    height: calc(100vh - 120px);
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .details-panel {
    position: static;
  }
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .quick-panel {
    margin-top: 0;
  }

  .content {
    padding: 18px 16px 24px;
  }

  .plant-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .plants-toolbar {
    grid-template-columns: 1fr;
  }

  .registry-summary {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .form-layout,
  .form-fields,
  .placement-form-grid {
    grid-template-columns: 1fr;
  }

  .users-grid {
    grid-template-columns: 1fr;
  }

  .productivity-grid,
  .chart-row,
  .payroll-list,
  .task-object-row,
  .schedule-form,
  .schedule-time-row {
    grid-template-columns: 1fr;
  }

  .payroll-metrics {
    grid-template-columns: 1fr;
  }

  .schedule-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cabinet-current-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cabinet-panel {
    overflow-x: auto;
  }

  .cabinet-archive-calendar,
  .cabinet-month-weekdays {
    min-width: 720px;
  }

  .schedule-heading-actions {
    justify-content: stretch;
    width: 100%;
  }

  .schedule-heading-actions .primary-inline,
  .schedule-heading-actions .secondary-inline:not(.schedule-toggle-button) {
    flex: 1 1 140px;
  }

  .schedule-day {
    min-height: 112px;
  }

  .schedule-day-editor-head {
    flex-direction: column;
  }

  .schedule-clear-day {
    width: 100%;
  }

  .schedule-worker-list {
    grid-template-columns: 1fr;
  }

  .schedule-shift-list {
    grid-template-columns: 1fr;
  }

  .workspace-shell {
    display: block;
  }

  .workspace-task-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .workspace-task-detail {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: none;
    padding: 12px;
    background: var(--page);
    overflow-y: auto;
  }

  .workspace-task-detail.open {
    display: block;
  }

  .workspace-detail-inner {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .workspace-detail-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 0 10px 24px rgba(23, 32, 42, 0.08);
  }

  .workspace-detail-close {
    display: inline-flex;
    width: auto;
  }

  .user-form-actions,
  .task-form-actions,
  .cabinet-link-box .code-input-row {
    grid-template-columns: 1fr;
  }

  .form-side {
    order: -1;
  }
}

@media (max-width: 680px) {
  html,
  body,
  .app {
    min-height: 100dvh;
  }

  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .topbar {
    position: sticky;
    grid-template-columns: minmax(0, 1fr) minmax(184px, 200px);
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 10px 12px 12px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .brand-logo {
    width: 96px;
    height: 36px;
  }

  .search {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 40px;
    padding: 0 12px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 40px 40px 40px minmax(0, 1fr);
    gap: 8px;
    grid-column: 2;
    grid-row: 1;
  }

  .ghost-button,
  .primary-button,
  .role-menu-button,
  .notification-button {
    width: 100%;
    min-height: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
  }

  .ghost-button span,
  .primary-button span,
  .role-label {
    display: none;
  }

  .ghost-button,
  .primary-button,
  .notification-button {
    padding: 0;
  }

  .notification-panel {
    position: fixed;
    top: 62px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: min(70vh, 520px);
  }

  .role-switcher,
  .role-menu-button {
    min-width: 0;
  }

  .role-menu-button {
    justify-content: center;
    font-size: 14px;
  }

  .role-current {
    display: none;
  }

  .role-menu-list {
    left: auto;
    right: 0;
    width: min(210px, calc(100vw - 24px));
  }

  .layout {
    display: block;
    min-height: 0;
    overflow: visible;
    transform: none;
    contain: none;
  }

  .sidebar {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 65;
    width: 100%;
    max-width: 100vw;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border-top: 0;
    border-bottom: 0;
    box-shadow: none;
    overflow: visible;
  }

  .nav-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(54px, 0.9fr) clamp(112px, 29vw, 120px) minmax(54px, 0.9fr) minmax(0, 1fr);
    grid-auto-flow: row;
    align-items: end;
    gap: 0;
    width: 100%;
    max-width: 100vw;
    min-height: 94px;
    padding: 12px 14px calc(18px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle 54px at 50% 18px, transparent 0 52px, rgba(255, 255, 255, 0.98) 53px);
    border-radius: 0;
    box-shadow: 0 -12px 30px rgba(23, 32, 42, 0.12);
    backdrop-filter: blur(16px);
    overflow: visible;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-link:not([data-route]) {
    display: none;
  }

  .nav-link[data-route="workspace"],
  .nav-link[data-route="productivity"] {
    display: none;
  }

  .nav-link {
    display: grid;
    place-items: center;
    gap: 4px;
    min-height: 60px;
    padding: 0;
    border-radius: 18px;
    color: #596475;
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
    position: relative;
    z-index: 1;
  }

  .nav-link[data-route="dashboard"] {
    grid-column: 1;
  }

  .nav-link[data-route="plants"] {
    grid-column: 2;
    margin-right: 0;
    border-top-right-radius: 38px;
    border-bottom-right-radius: 28px;
  }

  .nav-link[data-route="users"] {
    grid-column: 4;
    margin-left: 0;
    border-top-left-radius: 38px;
    border-bottom-left-radius: 28px;
  }

  .nav-link[data-route="placements"] {
    grid-column: 5;
  }

  body:not(.has-mobile-work-switcher) .nav-list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(72px, 1fr);
    gap: 4px;
    min-height: auto;
    padding: 8px 10px calc(18px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-radius: 0;
    overflow-x: auto;
  }

  body:not(.has-mobile-work-switcher) .nav-link[data-route="dashboard"],
  body:not(.has-mobile-work-switcher) .nav-link[data-route="plants"],
  body:not(.has-mobile-work-switcher) .nav-link[data-route="users"],
  body:not(.has-mobile-work-switcher) .nav-link[data-route="placements"] {
    grid-column: auto;
    border-radius: 12px;
  }

  .nav-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav-link svg,
  .nav-link i[data-lucide] {
    width: 29px;
    height: 29px;
  }

  .nav-link.active {
    color: var(--green-800);
    background: var(--green-100);
  }

  .mobile-work-switcher {
    position: fixed !important;
    top: auto !important;
    left: 50%;
    bottom: calc(38px + env(safe-area-inset-bottom)) !important;
    z-index: 82;
    display: block;
    transform: translateX(-50%);
  }

  .mobile-work-switcher[hidden],
  .mobile-work-switcher.is-hidden-by-role {
    display: none !important;
  }

  .mobile-work-fab {
    position: relative;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    color: #fff;
    background:
      radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.22), transparent 34%),
      linear-gradient(145deg, var(--green-600), var(--green-800));
    border: 6px solid rgba(255, 255, 255, 0.98);
    border-radius: 999px;
    box-shadow: none;
  }

  .mobile-work-switcher.is-active .mobile-work-fab,
  .mobile-work-fab:active {
    background:
      radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.26), transparent 34%),
      linear-gradient(145deg, var(--green-700), #075735);
  }

  .mobile-work-fab svg,
  .mobile-work-fab i[data-lucide] {
    width: 35px;
    height: 35px;
  }

  .mobile-work-fab::after {
    position: absolute;
    inset: -10px;
    content: "";
    border: 1px solid rgba(16, 126, 75, 0.14);
    border-radius: inherit;
  }

  .mobile-work-menu {
    position: absolute;
    left: 50%;
    bottom: 88px;
    display: grid;
    width: min(292px, calc(100vw - 28px));
    padding: 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(16, 126, 75, 0.16);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(24, 36, 29, 0.18);
    transform: translateX(-50%) translateY(10px) scale(0.96);
    transform-origin: bottom center;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.16s ease,
      transform 0.16s ease;
    backdrop-filter: blur(14px);
  }

  .mobile-work-menu[hidden] {
    display: none !important;
  }

  .mobile-work-switcher.open .mobile-work-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  .mobile-work-menu button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    color: var(--green-800);
    background: transparent;
    border: 0;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
  }

  .mobile-work-menu button svg,
  .mobile-work-menu button i[data-lucide] {
    width: 21px;
    height: 21px;
  }

  .mobile-work-menu button:hover,
  .mobile-work-menu button:focus-visible {
    background: var(--green-50);
    outline: none;
  }

  .quick-panel {
    display: none;
  }

  .content {
    padding: 14px 12px 96px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  .stat-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    min-height: 96px;
    padding: 12px;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
  }

  .stat-card p {
    font-size: 12px;
    line-height: 1.2;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .stat-card small {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.2;
  }

  .dashboard-grid,
  .main-column {
    gap: 12px;
    min-width: 0;
  }

  .view,
  .panel,
  .details-panel,
  .plant-grid,
  .plant-card {
    min-width: 0;
    max-width: 100%;
  }

  .plant-grid,
  .registry-summary,
  .label-preview,
  .action-row {
    grid-template-columns: 1fr;
  }

  .plant-card img {
    aspect-ratio: 1.35 / 1;
  }

  .page-heading {
    gap: 12px;
    margin-bottom: 14px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .page-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-inline,
  .secondary-inline,
  .danger-inline {
    width: 100%;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-heading,
  .plant-form,
  .plant-view-body {
    padding: 16px;
  }

  .plant-view-hero,
  .plant-view-layout,
  .plant-action-fields,
  .plant-view-codes {
    grid-template-columns: 1fr;
  }

  .plant-view-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .plant-facts {
    grid-template-columns: 1fr;
  }

  .plant-view-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .plant-work-menu {
    width: 100%;
  }

  .plant-work-list {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .plant-work-menu:not(.open) .plant-work-list {
    display: none !important;
  }

  .plant-event-gallery,
  .plant-children-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plant-event-fields div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .plant-action-form {
    padding: 16px;
  }

  .code-input-row,
  .placement-select-row,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .placement-section-form-row {
    grid-template-columns: 1fr;
  }

  .placement-section-builder-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-input-row {
    display: grid;
  }

  .placement-section-head,
  .placement-shelf-row {
    grid-template-columns: 1fr;
  }

  .placement-shelf-list {
    padding-left: 0;
  }

  .modal-actions {
    display: grid;
  }

  .confirm-panel,
  .cabinet-login-panel {
    grid-template-columns: 1fr;
  }

  .confirm-actions {
    display: grid;
  }

  .panel,
  .details-panel {
    padding: 16px;
  }

  .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    min-width: 0;
  }

  .label-preview {
    justify-items: stretch;
  }

  .codes {
    justify-items: start;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 9px 0;
  }

  .detail-row dd {
    text-align: left;
  }

  .table-wrap,
  .registry-table-wrap {
    margin: 0;
    padding: 0;
    overflow: visible;
    max-width: 100%;
  }

  table,
  .registry-table,
  .journal-table,
  .placements-table,
  .users-table {
    display: block;
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }

  table thead {
    display: none;
  }

  table tbody {
    display: grid;
    gap: 10px;
  }

  table tr {
    display: grid;
    gap: 9px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(23, 32, 42, 0.05);
  }

  table tbody tr:hover {
    background: #fff;
  }

  table td {
    display: grid;
    grid-template-columns: minmax(82px, 34%) minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  table td::before {
    content: "";
    color: #596475;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
    text-transform: uppercase;
  }

  table td[colspan] {
    display: block;
  }

  table td[colspan]::before {
    display: none;
  }

  .registry-table tr.selected-row {
    border-color: rgba(17, 120, 73, 0.32);
    background: var(--green-50);
  }

  .registry-plant {
    min-width: 0;
  }

  .registry-plant img {
    width: 48px;
    height: 48px;
  }

  .registry-table td > span,
  .user-cell,
  .placement-path {
    min-width: 0;
  }

  .table-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .table-action {
    min-height: 34px;
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(1),
  .users-table td:nth-child(1),
  .placements-table td:nth-child(1) {
    grid-template-columns: 1fr;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(1)::before,
  .users-table td:nth-child(1)::before,
  .placements-table td:nth-child(1)::before {
    display: none;
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(5),
  .registry-table:not(.placements-table):not(.users-table) td:nth-child(7) {
    display: none;
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(10),
  .placements-table td:nth-child(5) {
    grid-template-columns: 1fr;
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(10)::before,
  .placements-table td:nth-child(5)::before {
    display: none;
  }

  .journal-table td:nth-child(1)::before {
    content: "Дата";
  }

  .journal-table td:nth-child(2)::before {
    content: "Событие";
  }

  .journal-table td:nth-child(3)::before {
    content: "Объект";
  }

  .journal-table td:nth-child(4)::before {
    content: "Кто";
  }

  .journal-table td:nth-child(5)::before {
    content: "Комментарий";
  }

  .journal-table td:nth-child(5) {
    min-width: 0;
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(1)::before {
    content: "Растение";
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(2)::before {
    content: "Штрихкод";
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(3)::before {
    content: "Статус";
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(4)::before {
    content: "Место";
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(5)::before {
    content: "Горшок";
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(6)::before {
    content: "Цена";
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(7)::before {
    content: "Партия";
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(8)::before {
    content: "Количество";
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(9)::before {
    content: "Обновлено";
  }

  .registry-table:not(.placements-table):not(.users-table) td:nth-child(10)::before {
    content: "Действия";
  }

  .users-table td:nth-child(1)::before {
    content: "ФИО";
  }

  .users-table td:nth-child(2)::before {
    content: "Логин";
  }

  .users-table td:nth-child(3)::before {
    content: "Номер";
  }

  .users-table td:nth-child(4)::before {
    content: "Роль";
  }

  .users-table td:nth-child(5)::before {
    content: "Статус";
  }

  .users-table td:nth-child(6)::before {
    content: "Регистрация";
  }

  .users-table .custom-select-menu {
    z-index: 90;
  }

  .placements-table td:nth-child(1)::before {
    content: "Цепочка";
  }

  .placements-table td:nth-child(2)::before {
    content: "Уровень";
  }

  .placements-table td:nth-child(3)::before {
    content: "Растений";
  }

  .placements-table td:nth-child(4)::before {
    content: "QR";
  }

  .placements-table td:nth-child(5)::before {
    content: "Действия";
  }

  .placement-root-row {
    background: #fff;
  }

  .placement-children-row {
    margin-top: -8px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .placement-children-row td {
    padding: 0;
    background: transparent;
  }

  .placement-children {
    padding: 10px;
  }

  .placement-section-head,
  .placement-shelf-row {
    grid-template-columns: 1fr;
  }

  .placement-qr-cell {
    justify-self: start;
  }

  .toast {
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    z-index: 75;
  }
}


