
:root {
  --bg: #050b14;
  --panel: #0c1421;
  --panel-2: #111c2b;
  --line: rgba(148,163,184,.12);
  --line-strong: rgba(148,163,184,.18);
  --text: #e5eef9;
  --muted: #7f8ea8;
  --accent: #29d3a1;
  --accent-2: #12352d;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.noma-body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(41,211,161,.06), transparent 28%),
    linear-gradient(180deg, #030711 0%, #08101a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, select, input, textarea { font: inherit; }
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; overflow-y: auto;
  width: 260px; min-width: 260px; max-width: 260px; padding: 20px 14px; border-right: 1px solid var(--line);
  background: rgba(1,8,18,.92); backdrop-filter: blur(16px); transition: width .22s ease;
}
.sidebar-init .sidebar,
.sidebar-init .main-shell { transition: none !important; }
.sidebar-brand { display: flex; align-items: center; gap: 14px; padding: 8px 10px 18px; }
.sidebar-toggle {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #0d1725; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.sidebar-toggle svg { width: 18px; height: 18px; }
.brand-mark {
  width: 158px; height: 42px; border-radius: 0; display: grid; place-items: center;
  flex: 0 0 158px;
  overflow: visible; border: 0; background: transparent;
}
.brand-mark img {
  width: 100%; height: 100%; display: block; object-fit: contain;
  border-radius: 0;
}
.brand-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }
.side-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.side-pinned, .side-groups { display: flex; flex-direction: column; gap: 8px; }
.side-pinned { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.side-group { border-radius: 14px; }
.side-group-toggle {
  width: 100%; min-height: 40px; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; color: #7889a4;
  display: flex; align-items: center; gap: 11px; text-align: left; font-size: .76rem; font-weight: 750; letter-spacing: .025em; cursor: pointer;
}
.side-group-toggle:hover, .side-group.open > .side-group-toggle { color: var(--text); background: rgba(255,255,255,.035); }
.side-group-icon { width: 16px; height: 16px; flex: 0 0 16px; stroke-linecap: round; }
.side-group-chevron { margin-left: auto; font-size: 16px; line-height: 1; transition: transform .18s ease; }
.side-group.open .side-group-chevron { transform: rotate(180deg); }
.side-group-items { display: none; flex-direction: column; gap: 4px; padding: 4px 0 6px 10px; }
.side-group.open .side-group-items { display: flex; }
.side-group-items .side-link { min-height: 40px; padding-top: 9px; padding-bottom: 9px; font-size: .86rem; border-radius: 13px; }
.side-link {
  position: relative;
  color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  min-height: 46px; line-height: 1.1; font-size: .92rem; white-space: nowrap; border-radius: 16px; border: 1px solid transparent; transition: .18s ease;
}
.side-icon { width: 20px; height: 20px; flex: 0 0 20px; stroke-linecap: round; stroke-linejoin: round; }
.side-label { line-height: 1.1; white-space: nowrap; }
.side-link:hover { color: var(--text); background: rgba(255,255,255,.03); border-color: var(--line); }
.side-link.is-navigating { color: var(--text); background: rgba(41,211,161,.12); border-color: rgba(41,211,161,.32); }
.side-link.active { color: var(--accent); background: rgba(41,211,161,.08); border-color: rgba(41,211,161,.28); box-shadow: inset 0 0 0 1px rgba(41,211,161,.08); }
.side-alert-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid #0b1220;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}
.main-shell { min-width: 0; margin-left: 260px; }
.topbar {
  min-height: 102px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(5,11,20,.78); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20;
}
.topbar-search-wrap {
  order: 2;
  flex: 1 1 100%;
  min-width: 280px;
  max-width: none;
  width: auto;
  position: relative;
}
.topbar-search {
  width: 100%; height: 50px; border-radius: 16px; border: 1px solid var(--line); background: #111a28; color: var(--text); padding: 0 18px 0 48px;
}
.topbar-search::placeholder { color: #6f7f98; }
.topbar-search-icon { width: 18px; height: 18px; position: absolute; left: 18px; top: 16px; color: #6f7f98; }
.topbar-right { order: 1; margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-scope {
  order: 1;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
}
.topbar-scope-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.topbar-scope-label {
  color: #8ea1be;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}
.topbar-scope-select {
  height: 42px;
  min-width: 170px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #0f1826;
  color: var(--text);
  padding: 0 14px;
  font-size: .95rem;
  font-weight: 600;
}
.icon-btn { width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: #111a28; color: var(--muted); }
.user-chip { position: relative; display: flex; align-items: center; gap: 0; color: var(--muted); }
.user-avatar { width: 40px; height: 40px; border-radius: 999px; background: rgba(41,211,161,.14); color: var(--accent); display: grid; place-items: center; font-weight: 700; }
.user-notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid #0b1220;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  display: none;
}
.user-name { font-size: 1.05rem; color: #9eb0c9; }
.content-shell { padding: 34px 28px 40px; }
.page-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.page-kicker { color: var(--accent); font-size: 1.8rem; margin-bottom: 2px; }
.page-title { margin: 0; font-size: 3rem; line-height: 1; letter-spacing: -.04em; font-weight: 750; }
.page-subtitle { margin: 8px 0 0; font-size: 1.05rem; color: var(--muted); }
.primary-btn {
  border: 0;
  border-radius: 14px;
  height: 56px;
  min-width: 220px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  background: linear-gradient(180deg, #31d6a7 0%, #1fb785 100%);
  color: #04120f;
  font-weight: 700;
  box-shadow: 0 20px 35px rgba(41,211,161,.18);
}
.filters-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filter-search, .filter-select-wrap, .room-wrap {
  height: 58px; border-radius: 16px; border: 1px solid var(--line-strong); background: rgba(10,18,29,.92); display: flex; align-items: center;
}
.filter-search { flex: 1 1 520px; position: relative; min-width: 280px; }
.filter-search svg { width: 18px; height: 18px; color: #73839d; position: absolute; left: 16px; }
.filter-search input { width: 100%; height: 100%; background: transparent; border: 0; color: var(--text); padding: 0 16px 0 46px; outline: none; }
.filter-search input::placeholder { color: #6f7f98; }
.filter-select-wrap { min-width: 228px; padding: 0 14px; gap: 10px; }
.filter-icon { color: #91a3be; }
.filter-select, .room-select { width: 100%; height: 100%; background: transparent; border: 0; color: var(--text); outline: none; }
.room-wrap { min-width: 220px; padding: 0 16px; gap: 12px; color: var(--muted); }
.batch-meta-row { display: flex; justify-content: flex-end; margin-bottom: 14px; color: var(--muted); font-size: .95rem; }
.timeline-panel {
  border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, rgba(16,25,39,.96), rgba(11,18,29,.98));
  box-shadow: 0 30px 70px rgba(0,0,0,.24);
}
.timeline-table { width: 100%; }
.timeline-head, .timeline-row {
  display: grid; grid-template-columns: 1.3fr 1fr .8fr .95fr .9fr .65fr 1fr 1fr; align-items: center;
}
.timeline-head {
  min-height: 66px; background: rgba(255,255,255,.02); color: #7f8ea8; font-size: .83rem; letter-spacing: .08em; font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.timeline-row { min-height: 78px; border-bottom: 1px solid var(--line); transition: background .18s ease; cursor: pointer; }
.timeline-row:hover { background: rgba(255,255,255,.025); }
.timeline-row:last-child { border-bottom: 0; }
.table-cell { padding: 0 24px; }
.batch-id { color: var(--accent); font-weight: 700; letter-spacing: .02em; }
.muted { color: #8ca0bd; }
.stage-pill, .status-pill {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 650; font-size: .98rem;
}
.stage-eggs { color: #5bbef9; }
.stage-nursery { color: #f7b845; }
.stage-grow { color: #29d3a1; }
.stage-harvested, .stage-processed, .stage-default { color: #a9b7cc; }
.status-created { color: #51b2ff; background: rgba(59,130,246,.16); }
.status-feeding { color: #f3b74d; background: rgba(245,158,11,.16); }
.status-growing { color: #29d3a1; background: rgba(16,185,129,.16); }
.status-ready { color: #3ddc97; background: rgba(16,185,129,.16); }
.status-harvested, .status-processed, .status-default { color: #b4c1d4; background: rgba(148,163,184,.12); }
.timeline-empty { padding: 34px 24px; color: var(--muted); }
.timeline-empty.error { color: #fda4af; }
.table-led { width: 12px; height: 12px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px rgba(41,211,161,.14); }
#bd_content input, #bd_content select, #bd_content textarea,
.modal-card input, .modal-card select, .modal-card textarea {
  background: #0b1220; color: var(--text); border: 1px solid rgba(148,163,184,.18);
}
.modal-card .text-gray-700, .modal-card .text-gray-600, .modal-card .text-gray-500, .modal-card .text-gray-400 { color: #93a4bf !important; }
.modal-card .text-blue-700, .modal-card .text-green-700, .modal-card .text-red-600 { color: var(--text) !important; }
.modal-card .bg-blue-100, .modal-card .bg-green-100, .modal-card .bg-gray-200 { background: rgba(148,163,184,.12) !important; }
.modal-card .border, .modal-card .border-b, .modal-card .border-red-300, .modal-card .border-blue-200, .modal-card .border-2 { border-color: rgba(148,163,184,.18) !important; }
.modal-card button.bg-green-600, .modal-card button.bg-indigo-600, .modal-card button.bg-yellow-500, .modal-card button.bg-yellow-600 { color: #04120f; }
.sidebar-collapsed .sidebar { width: 92px; min-width: 92px; max-width: 92px; }
.sidebar-collapsed .main-shell { margin-left: 92px; }
.sidebar-collapsed .brand-copy, .sidebar-collapsed .side-label { display: none; }
.sidebar-collapsed .side-group-chevron { display: none; }
.sidebar-collapsed .side-group-toggle { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar-collapsed .side-group-items { padding-left: 0; }
.sidebar-collapsed .side-link { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar-collapsed .side-alert-badge { position: absolute; right: 8px; top: 7px; margin-left: 0; }
.sidebar-collapsed .sidebar-brand {
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 16px;
}
.sidebar-collapsed .sidebar-toggle { width: 34px; height: 34px; border-radius: 10px; }
.sidebar-collapsed .brand-mark { width: 44px; height: 44px; border-radius: 0; flex: 0 0 44px; }
@media (max-width: 1100px) {
  .timeline-head, .timeline-row { grid-template-columns: 1.2fr .95fr .8fr .95fr .8fr .6fr .9fr .95fr; }
  .table-cell { padding: 0 16px; }
}
@media (max-width: 920px) {
  .sidebar { z-index: 50; height: 100vh; }
  .main-shell { margin-left: 260px; }
  .user-name { display: none; }
  .topbar { padding: 10px 14px; min-height: 122px; gap: 8px; }
  .topbar-search-wrap { max-width: none; min-width: 0; width: 100%; }
  .topbar-right { order: 1; width: auto; margin-left: auto; }
  .topbar-scope { order: 1; width: calc(100% - 64px); gap: 8px; }
  .topbar-scope-item { flex: 1 1 0; min-width: 0; }
  .topbar-scope-select { min-width: 0; max-width: none; width: 100%; }
  .timeline-head { display: none; }
  .timeline-row {
    grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 0;
  }
  .table-cell { padding: 0 18px; }
}
/* Language direction support. Hebrew uses a mirrored application layout while
   numbers, dates, codes and form values remain naturally readable. */
html[dir="rtl"] .app-shell { direction: rtl; }
html[dir="rtl"] .main-shell,
html[dir="rtl"] .content-shell,
html[dir="rtl"] .sidebar { direction: rtl; }
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select { text-align: right; }
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="date"],
html[dir="rtl"] input[type="time"],
html[dir="rtl"] [data-ltr],
html[dir="rtl"] code { direction: ltr; text-align: left; }
html[dir="rtl"] .side-group-chevron { transform: scaleX(-1); }
