:root {
  color-scheme: light;
  --bg: #eef1eb;
  --surface: #fbfcf7;
  --surface-2: #f5f7ef;
  --ink: #1e2721;
  --muted: #657063;
  --line: #dce2d5;
  --accent: #37784c;
  --accent-2: #175f77;
  --accent-3: #9a602b;
  --danger: #b34848;
  --warning: #c58a21;
  --ok: #37784c;
  --shadow: 0 20px 50px rgba(32, 45, 34, 0.11);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 22px 16px;
  background: #18231d;
  color: #edf5e8;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e5c66a;
  color: #18231d;
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.brand strong {
  display: block;
  font-size: 1.02rem;
}

.brand span,
.sidebar-footer {
  color: #b8c8b2;
  font-size: 0.86rem;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #dfe8da;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-item.active {
  color: #ffffff;
}

.nav-item svg,
.topbar-actions svg,
.primary-button svg,
.icon-button svg,
.row-actions svg,
.empty-state svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex: 0 0 auto;
}

.nav-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
  padding-bottom: 8px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #78c16a;
  box-shadow: 0 0 0 4px rgba(120, 193, 106, 0.16);
}

.main {
  min-width: 0;
  padding: 26px clamp(18px, 3vw, 38px) 38px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 2.05rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions,
.toolbar,
.section-head,
.row-actions,
.segmented,
.legend {
  display: flex;
  align-items: center;
}

.topbar-actions,
.toolbar {
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button,
.segmented button,
.row-actions button,
.row-actions a {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 760;
}

.primary-button:hover,
.icon-button:hover,
.ghost-button:hover,
.row-actions button:hover,
.row-actions a:hover,
.segmented button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(32, 45, 34, 0.12);
}

.ghost-button,
.icon-button,
.row-actions button,
.row-actions a {
  background: var(--surface);
  color: var(--ink);
}

.ghost-button {
  padding: 0 13px;
  font-weight: 700;
}

.icon-button,
.row-actions button,
.row-actions a {
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
}

.row-actions a {
  text-decoration: none;
}

.row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.earth-link {
  display: inline-flex;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 7px;
  width: auto;
  min-width: 112px;
  padding: 0 11px;
  color: var(--accent-2);
  font-weight: 760;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(32, 45, 34, 0.06);
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin: 9px 0 3px;
  font-size: 2rem;
  line-height: 1;
}

.metric small {
  color: var(--muted);
}

.overview-layout,
.view-layout,
.weather-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.weather-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.75fr);
}

.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 2px 0 0;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: 0;
}

select,
input,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

textarea {
  min-height: 88px;
  padding-top: 10px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(23, 95, 119, 0.22);
  outline-offset: 2px;
}

.map-panel canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 520;
  border: 1px solid #d5dccf;
  border-radius: 8px;
  background: #edf5df;
}

.legend {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.task-list,
.parcel-grid,
.inventory-grid {
  display: grid;
  gap: 10px;
}

.task-list.compact {
  max-height: 522px;
  overflow: auto;
  padding-right: 2px;
}

.task-card,
.parcel-card,
.inventory-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

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

.task-main,
.parcel-main,
.inventory-main {
  min-width: 0;
}

.task-main h3,
.parcel-main h3,
.inventory-main h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.28;
  letter-spacing: 0;
}

.task-main p,
.parcel-main p,
.inventory-main p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.meta-row,
.parcel-stats,
.inventory-meta,
.harvest-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.pill.high {
  background: #f8dddd;
  color: #8d2d2d;
}

.pill.medium {
  background: #fbedd2;
  color: #875813;
}

.pill.low {
  background: #dcefe4;
  color: #28613d;
}

.pill.done {
  background: #e0e7ee;
  color: #4d5b69;
}

.task-card.done {
  opacity: 0.72;
}

.task-card.done h3 {
  text-decoration: line-through;
}

.form-panel {
  position: sticky;
  top: 18px;
}

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

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.form-actions .primary-button,
.form-actions .ghost-button {
  min-width: 150px;
}

.hidden {
  display: none !important;
}

.span-2 {
  grid-column: 1 / -1;
}

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

.parcel-card {
  min-height: 160px;
}

.parcel-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 8px 0 0 8px;
  background: var(--parcel-color, var(--accent));
}

.parcel-designer {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.layout-controls,
.plant-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.layout-controls label,
.plant-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.plant-toolbar {
  grid-template-columns: minmax(220px, 1fr) 96px auto auto;
  margin-top: 14px;
}

.plant-toolbar input[type="color"],
.plant-edit-form input[type="color"] {
  min-height: 40px;
  padding: 4px;
}

.plant-editor {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.plant-editor h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.plant-edit-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px;
  gap: 12px;
}

.plant-edit-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.plant-summary,
.plant-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plant-summary {
  margin-top: 14px;
}

.plant-legend {
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.plant-grid-wrap {
  overflow: auto;
  max-height: min(560px, 70vh);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.plant-grid {
  display: grid;
  grid-template-columns: 48px repeat(var(--parcel-rows), minmax(54px, 1fr));
  gap: 6px;
  min-width: max-content;
}

.plant-row-header,
.plant-column-header,
.plant-corner {
  position: sticky;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.plant-row-header {
  left: 0;
  min-height: 48px;
}

.plant-column-header,
.plant-corner {
  top: 0;
  min-height: 36px;
}

.plant-corner {
  left: 0;
  z-index: 2;
}

.plant-cell {
  display: grid;
  gap: 3px;
  align-content: center;
  justify-items: center;
  width: 54px;
  min-height: 48px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--plant-color), #1e2721 18%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--plant-color), #ffffff 74%);
  color: var(--ink);
}

.plant-cell.selected {
  box-shadow:
    0 0 0 3px rgba(23, 95, 119, 0.22),
    inset 0 0 0 2px #ffffff;
}

.plant-cell span {
  font-size: 0.68rem;
  font-weight: 800;
}

.plant-cell small {
  max-width: 44px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe3d5;
}

.tree-bar span {
  display: block;
  width: var(--bar-value);
  height: 100%;
  border-radius: inherit;
  background: var(--parcel-color, var(--accent));
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(115px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.day-cell {
  min-height: 132px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.day-cell.today {
  border-color: rgba(55, 120, 76, 0.65);
  box-shadow: inset 0 0 0 1px rgba(55, 120, 76, 0.25);
}

.day-cell strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.day-event {
  display: block;
  margin-top: 6px;
  padding: 7px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.25;
}

.segmented {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.segmented button.active {
  background: var(--accent-2);
  color: #fff;
}

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

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.harvest-summary {
  margin-bottom: 14px;
}

.finance-summary,
.finance-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.finance-source {
  min-width: 190px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.finance-source.income {
  border-color: rgba(55, 120, 76, 0.35);
  background: #f1f8f1;
}

.finance-source.expense {
  border-color: rgba(197, 138, 33, 0.38);
  background: #fff8ea;
}

.finance-source span,
.finance-source small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 740;
}

.finance-source strong {
  display: block;
  margin: 6px 0;
  font-size: 1.15rem;
}

.finance-source small {
  display: block;
  line-height: 1.35;
}

.summary-tile {
  min-width: 140px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.summary-tile span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
}

.summary-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 1.25rem;
}

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

.inventory-card.low-stock {
  border-color: rgba(179, 72, 72, 0.45);
  background: #fff5f3;
}

.weather-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.weather-status h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.weather-card,
.forecast-card,
.reading-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.weather-card span,
.summary-tile span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
}

.weather-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
  line-height: 1;
}

.weather-card small,
.forecast-card small,
.reading-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.weather-alerts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.weather-alert {
  min-height: 90px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.weather-alert.high {
  border-color: rgba(179, 72, 72, 0.45);
  background: #fff5f3;
}

.weather-alert.medium {
  border-color: rgba(197, 138, 33, 0.45);
  background: #fff8ea;
}

.weather-alert.low {
  border-color: rgba(55, 120, 76, 0.35);
  background: #f1f8f1;
}

.weather-alert strong,
.forecast-card strong,
.reading-item strong {
  display: block;
  font-size: 0.9rem;
}

.weather-alert span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.compact-head {
  margin-top: 2px;
  margin-bottom: 10px;
}

.forecast-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.forecast-card span {
  display: block;
  margin-top: 8px;
  font-size: 1.18rem;
  font-weight: 800;
}

.split-line {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

.reading-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.weather-chart-panel {
  margin: 16px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.weather-chart-panel .section-head {
  flex-wrap: wrap;
  align-items: end;
}

.compact-control {
  display: grid;
  gap: 6px;
  min-width: 160px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
}

.chart-range {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.chart-range.active {
  display: grid;
}

.chart-range label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
}

.chart-series {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chart-series label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 740;
}

.chart-series input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

#weatherChart {
  display: block;
  width: 100%;
  aspect-ratio: 960 / 360;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.82rem;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-message {
  min-height: 20px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.8rem;
}

.stock-meter {
  height: 10px;
  border-radius: 999px;
  background: #dfe5d9;
  overflow: hidden;
}

.stock-meter span {
  display: block;
  width: var(--stock-value);
  height: 100%;
  border-radius: inherit;
  background: var(--stock-color);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 170px;
  border: 1px dashed #cbd5c4;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  color: #8aa17f;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #18231d;
  color: #fff;
  box-shadow: 0 18px 44px rgba(24, 35, 29, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

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

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-layout,
  .view-layout,
  .weather-layout {
    grid-template-columns: 1fr;
  }

  .form-panel {
    position: static;
  }
}

/* ============================================================
   MOBILE — ≤768px
   Sidebar devine overlay lateral (drawer).
   Navigarea trece pe o bară orizontală cu scroll.
   ============================================================ */
@media (max-width: 768px) {

  /* --- App shell --- */
  .app-shell {
    grid-template-columns: 1fr;
  }

  /* --- Sidebar drawer --- */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(280px, 85vw);
    height: 100vh;
    height: 100dvh;
    z-index: 400;
    transform: translateX(-105%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 18px 14px 24px;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0,0,0,0.35);
  }

  /* Buton X de închidere în sidebar */
  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #dfe8da;
    cursor: pointer;
    margin-bottom: 12px;
    flex-shrink: 0;
  }
  .sidebar-close svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }
  .sidebar-close:hover {
    background: rgba(255,255,255,0.18);
  }

  /* Overlay întunecat */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 399;
    backdrop-filter: blur(1px);
  }
  .sidebar-overlay.visible {
    display: block;
  }

  /* Prevent scroll pe body când sidebar-ul e deschis */
  body.sidebar-open {
    overflow: hidden;
  }

  /* nav-list: vertical scroll în drawer */
  .nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .nav-item {
    min-height: 48px;
    padding: 0 14px;
    font-size: 0.95rem;
  }

  .nav-item svg {
    display: block;
  }

  /* sidebar footer vizibil în drawer */
  .sidebar-footer {
    display: flex;
  }

  /* --- Hamburger button (vizibil doar pe mobile) --- */
  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
  }
  .hamburger svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }
  .hamburger:hover {
    background: var(--line);
  }

  /* topbar-title conține hamburger + titlu */
  .topbar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .topbar-title > div {
    min-width: 0;
  }

  /* --- Topbar --- */
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    min-height: auto;
    margin-bottom: 14px;
  }

  .topbar h1 {
    font-size: 1.45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .eyebrow {
    font-size: 0.7rem;
  }

  /* topbar-actions: wrap pe rând nou, butoane mai compacte */
  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-actions .icon-button {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
  }

  .topbar-actions .primary-button {
    flex: 1 1 auto;
    min-height: 44px;
  }

  /* --- Main padding --- */
  .main {
    padding: 16px 14px 80px;
  }

  /* --- Metrici dashboard --- */
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric {
    padding: 12px;
  }

  .metric strong {
    font-size: 1.55rem;
  }

  /* --- Layouts --- */
  .overview-layout,
  .view-layout,
  .weather-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-panel {
    position: static;
  }

  /* --- Section heads --- */
  .section-head {
    flex-wrap: wrap;
    gap: 10px;
  }

  .section-head .toolbar {
    width: 100%;
    flex-wrap: wrap;
  }

  .section-head .toolbar > * {
    flex: 1 1 auto;
    min-width: 120px;
  }

  .section-head .toolbar input[type="search"] {
    min-width: 0;
  }

  /* --- Forms --- */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
  }

  .form-actions .primary-button,
  .form-actions .ghost-button {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  /* --- Tabele cu scroll orizontal --- */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }

  .table-wrap table {
    min-width: 560px;
  }

  /* --- Parcele grid --- */
  .parcel-grid {
    grid-template-columns: 1fr;
  }

  .parcel-card {
    padding: 14px;
  }

  /* --- Task cards --- */
  .task-list {
    gap: 10px;
  }

  .task-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Row actions: touch targets mai mari */
  .row-actions button,
  .row-actions a {
    min-width: 44px;
    min-height: 44px;
  }

  /* --- Inventar --- */
  .inventory-grid {
    grid-template-columns: 1fr;
  }

  /* --- Meteo --- */
  .weather-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weather-alerts {
    grid-template-columns: 1fr;
  }

  .forecast-strip {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }

  .weather-chart-panel .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-series {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .chart-range {
    grid-template-columns: 1fr;
  }

  /* --- Calendar strip --- */
  .calendar-strip {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  /* --- Parcel designer (plan plantare) --- */
  .parcel-designer {
    padding: 14px;
  }

  .layout-controls {
    grid-template-columns: 1fr;
  }

  .plant-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .plant-grid-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--line);
  }

  .plant-grid {
    min-width: 480px;
  }

  .multi-select-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .multi-select-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .multi-select-actions button {
    flex: 1 1 auto;
    min-height: 44px;
  }

  /* --- Contracte arendă --- */
  .lease-card {
    padding: 14px;
  }

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

  .full-row {
    grid-column: auto;
  }

  /* --- Modal --- */
  .modal {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 14px 14px 0 0;
    margin-top: auto;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-body {
    padding: 14px 16px;
  }

  /* --- Finance summary --- */
  .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .finance-breakdown {
    grid-template-columns: 1fr;
  }

  /* --- Harvest summary --- */
  .harvest-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* --- Alerts --- */
  .alert-banner {
    padding: 12px 14px;
  }

  /* --- Pills overflow --- */
  .parcel-stats,
  .lease-stats,
  .inventory-meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* --- Segmented controls --- */
  .segmented {
    flex-wrap: wrap;
  }

  /* --- Map canvas --- */
  #orchardCanvas {
    max-height: 280px;
  }
}

/* ============================================================
   SMALL PHONE — ≤420px
   Ajustări suplimentare pentru ecrane foarte înguste
   ============================================================ */
@media (max-width: 420px) {

  .topbar h1 {
    font-size: 1.25rem;
  }

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

  .metric {
    min-height: 90px;
    padding: 10px;
  }

  .metric strong {
    font-size: 1.4rem;
  }

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

  .topbar-actions .icon-button {
    /* Pe telefon foarte mic, ascundem seed demo button (rar folosit) */
  }

  /* Tabelele — font mai mic ca să încapă mai mult */
  .table-wrap table {
    font-size: 0.82rem;
  }

  .pill {
    font-size: 0.72rem;
    padding: 2px 7px;
  }

  .primary-button,
  .ghost-button {
    font-size: 0.88rem;
    padding: 0 12px;
  }
}

/* ---- Temă întunecată ---------------------------------------------------- */
body.theme-dark {
  --bg: #11160f;
  --surface: #19211a;
  --surface-2: #1f2a20;
  --ink: #e7efe3;
  --muted: #9fb09c;
  --line: #2c3a2d;
  --accent: #5aa86f;
  --accent-2: #4aa0bc;
  --accent-3: #c79155;
  --danger: #e07a7a;
  --warning: #e0b35a;
  --ok: #5aa86f;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

body.theme-dark .sidebar {
  background: #0d130c;
}

body.theme-dark .hamburger {
  background: var(--surface-2);
  color: var(--ink);
}

body.theme-dark .hamburger:hover {
  background: var(--line);
}

body.theme-dark .map-panel canvas {
  border-color: var(--line);
  background: #16201a;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  color: var(--ink);
}

body.theme-dark .table-wrap table thead th {
  color: var(--muted);
}

/* Hamburger ascuns pe desktop */
.hamburger {
  display: none;
}

/* Sidebar close ascuns pe desktop */
.sidebar-close {
  display: none;
}

/* topbar-title pe desktop = simplu div */
.topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Overlay ascuns implicit */
.sidebar-overlay {
  display: none;
}

/* Butoanele icon mai grupate pe ecrane mici */
@media (max-width: 760px) {
  .topbar-actions {
    flex-wrap: wrap;
  }
  .topbar-actions .icon-button {
    flex: 0 0 auto;
  }
}

/* ---- Modal detalii parcelă -------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 18, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }
body.modal-open { overflow: hidden; }

.modal {
  background: var(--surface);
  color: var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  width: min(720px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 1.2rem; }

.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.summary-tile {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
}
.summary-tile span { display: block; color: var(--muted); font-size: 0.78rem; }
.summary-tile strong { font-size: 1.15rem; }

.modal-section h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 16px;
  margin: 0;
}
.detail-list dt { color: var(--muted); font-size: 0.78rem; }
.detail-list dd { margin: 0 0 6px; font-weight: 600; }

.modal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-list li {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}
.modal-list li.done strong { text-decoration: line-through; opacity: 0.65; }
.modal-list li span { color: var(--muted); font-size: 0.82rem; }

.modal-notes {
  background: var(--surface-2);
  padding: 8px 10px;
  border-radius: 8px;
  margin: 8px 0 0;
  font-size: 0.9rem;
}

/* ---- Per-row inputs --------------------------------------------------- */
.per-row-panel {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}
.per-row-panel .eyebrow { margin-bottom: 8px; }
.per-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.per-row-input {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  color: var(--muted);
}
.per-row-input span { margin-bottom: 2px; }
.per-row-input input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.checkbox-control {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}
.checkbox-control input { width: auto; }

/* ---- Multi-select bar ------------------------------------------------- */
.multi-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
}
.multi-select-bar.hidden { display: none; }
.multi-select-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ghost-button.active { background: var(--accent); color: white; }

/* Inactive cells (gaps) in the plant grid */
.plant-cell.gap {
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(0,0,0,0.04) 6px 8px);
  border: 1px dashed var(--line);
  cursor: default;
  opacity: 0.5;
}
body.theme-dark .plant-cell.gap {
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,0.04) 6px 8px);
}
.plant-cell.selected {
  outline: 3px solid var(--accent-2);
  outline-offset: -3px;
}

/* ---- Lease cards ------------------------------------------------------ */
.lease-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.lease-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.lease-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lease-card.status-expiring { border-left-color: var(--warning); }
.lease-card.status-expired { border-left-color: var(--danger); opacity: 0.85; }
.lease-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.lease-card h3 { margin: 0; font-size: 1.05rem; }
.lease-card header p { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
.lease-stats, .lease-parcels { display: flex; gap: 6px; flex-wrap: wrap; }
.lease-notes { margin: 4px 0 0; font-size: 0.88rem; color: var(--muted); }
.pill.status-expiring { background: rgba(224, 179, 90, 0.2); color: var(--warning); }
.pill.status-expired { background: rgba(224, 122, 122, 0.2); color: var(--danger); }
.pill.status-active { background: rgba(90, 168, 111, 0.18); color: var(--accent); }

.form-hint { color: var(--muted); font-size: 0.75rem; margin-top: 2px; }
.full-row { grid-column: 1 / -1; }
.metric.danger strong { color: var(--danger); }
.metric.warning strong { color: var(--warning); }

@media (max-width: 600px) {
  .modal-summary { grid-template-columns: repeat(2, 1fr); }
  .detail-list { grid-template-columns: 1fr; }
}

/* ---- Alerte pe Dashboard (ploaie + stoc) -------------------------------- */
.alert-banner {
  background: linear-gradient(135deg, rgba(224, 179, 90, 0.18), rgba(224, 179, 90, 0.08));
  border: 1px solid rgba(224, 179, 90, 0.4);
  border-left: 4px solid var(--warning);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 14px 0;
  color: var(--ink);
}
.alert-banner.hidden { display: none; }
.alert-banner.stock {
  background: linear-gradient(135deg, rgba(74, 160, 188, 0.16), rgba(74, 160, 188, 0.06));
  border-color: rgba(74, 160, 188, 0.4);
  border-left-color: var(--accent-2);
}
.alert-banner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.alert-banner-head h3 { margin: 0; font-size: 1rem; }
.alert-icon { font-size: 1.4rem; }
.alert-banner ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.alert-banner li { font-size: 0.88rem; }
.alert-hint {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Rain risk pill pe cartonașul de lucrare */
.pill.rain-risk.high {
  background: rgba(224, 122, 122, 0.18);
  color: var(--danger);
}
.pill.rain-risk.medium {
  background: rgba(224, 179, 90, 0.22);
  color: var(--warning);
}
.task-card.has-risk {
  box-shadow: inset 3px 0 0 var(--danger);
}

/* ---- Meteo per parcelă în modal ---------------------------------------- */
.parcel-weather-now {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.parcel-weather-now > div {
  background: var(--surface-2);
  padding: 8px 10px;
  border-radius: 8px;
}
.parcel-weather-now span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
}
.parcel-weather-now strong { font-size: 1.05rem; }

.parcel-weather-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.day-card {
  background: var(--surface-2);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}
.day-card.heavy-rain {
  background: rgba(74, 160, 188, 0.15);
  border: 1px solid rgba(74, 160, 188, 0.4);
}
.day-card .day-label {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}
.day-card strong { font-size: 1.05rem; }
.day-card .day-min, .day-card .day-rain {
  color: var(--muted);
  font-size: 0.78rem;
}
.parcel-weather-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 8px 0 0;
}

/* Buton ascuns când e desactivat */
.ghost-button:disabled,
.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Storage indicator (sidebar footer) -------------------------------- */
:root {
  --clr-ok:     #37784c;
  --clr-warn:   #c58a21;
  --clr-danger: #b34848;
}

.storage-indicator {
  margin-top: 6px;
  width: 100%;
  font-size: 11px;
  color: var(--color-text-secondary, #657063);
}

.storage-label {
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.storage-bar-wrap {
  display: block;
  height: 4px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.theme-dark .storage-bar-wrap {
  background: rgba(255,255,255,0.1);
}

.storage-bar-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease, background 0.4s ease;
  min-width: 3px;
}

/* Stare de avertizare: text roșu + pulsare subtilă */
.storage-indicator.storage-warn .storage-label {
  color: var(--clr-danger);
  font-weight: 500;
}

.storage-indicator.storage-warn .storage-bar-fill {
  animation: storage-pulse 1.8s ease-in-out infinite;
}

@keyframes storage-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* Sidebar footer – aliniem pe coloană când avem indicatorul */
.sidebar-footer {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* ============================================================
   ONBOARDING WIZARD
   ============================================================ */

#onboardingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 900;
  backdrop-filter: blur(3px);
  animation: ob-fade-in 0.25s ease;
}

@keyframes ob-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.ob-open {
  overflow: hidden;
}

.ob-card {
  background: var(--surface);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  width: min(480px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  animation: ob-slide-up 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ob-slide-up {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.ob-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px 0;
}

.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s, transform 0.2s;
}

.ob-dot.active {
  background: var(--accent);
  transform: scale(1.35);
}

.ob-dot.done {
  background: var(--accent);
  opacity: 0.45;
}

.ob-body {
  padding: 20px 28px 28px;
}

.ob-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.ob-icon svg {
  width: 34px;
  height: 34px;
  fill: #fff;
}

.ob-icon--success {
  background: var(--ok);
}

.ob-title {
  margin: 0 0 10px;
  font-size: 1.45rem;
  text-align: center;
  line-height: 1.2;
}

.ob-text {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
  text-align: center;
}

.ob-hint {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.ob-or {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 12px 0;
  position: relative;
}

.ob-location-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.ob-gps-status {
  font-size: 0.82rem;
  font-weight: 500;
}

.ob-form {
  margin: 0;
}

.ob-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  justify-content: flex-end;
}

.ob-actions .ob-next {
  min-height: 46px;
  padding: 0 20px;
  gap: 6px;
  display: flex;
  align-items: center;
}

.ob-actions .ob-next svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.ob-actions .ob-back {
  min-height: 46px;
}

/* Alegeri finale */
.ob-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 0;
}

.ob-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  min-height: 130px;
  justify-content: flex-start;
}

.ob-choice:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.ob-choice:active {
  transform: scale(0.97);
}

.ob-choice--primary {
  border-color: var(--accent);
  background: rgba(55, 120, 76, 0.07);
}

.ob-choice--primary:hover {
  background: rgba(55, 120, 76, 0.14);
}

.ob-choice-icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 4px;
}

.ob-choice strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.3;
  margin-bottom: 4px;
}

.ob-choice span {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Mobile */
@media (max-width: 480px) {
  #onboardingOverlay {
    align-items: flex-end;
    padding: 0;
  }

  .ob-card {
    width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 92dvh;
  }

  .ob-choice-grid {
    grid-template-columns: 1fr;
  }

  .ob-choice {
    flex-direction: row;
    text-align: left;
    min-height: auto;
    gap: 12px;
    padding: 14px 16px;
  }

  .ob-choice-icon {
    font-size: 2rem;
    flex-shrink: 0;
  }

  .ob-body {
    padding: 16px 18px 28px;
  }
}

/* Dark mode */
body.theme-dark .ob-card {
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

body.theme-dark .ob-choice {
  background: var(--surface-2);
  border-color: var(--line);
}

body.theme-dark .ob-choice--primary {
  border-color: var(--accent);
  background: rgba(90, 168, 111, 0.1);
}

/* ============================================================
   SNAPSHOT RESTORE MODAL
   ============================================================ */
.snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.snapshot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--border-radius-md, 8px);
  border: 0.5px solid var(--line);
}

.snapshot-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.snapshot-info strong {
  font-size: 0.9rem;
}

.snapshot-info span {
  font-size: 0.78rem;
  color: var(--muted);
}

.snapshot-restore-btn {
  flex-shrink: 0;
  min-height: 36px;
}

@media (max-width: 480px) {
  .snapshot-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .snapshot-restore-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}

/* ═══════════════════════════════════════════════
   BOTTOM NAVIGATION BAR — mobile only
   ═══════════════════════════════════════════════ */

.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--surface, #fff);
    border-top: 0.5px solid var(--border, rgba(0,0,0,0.12));
    z-index: 300;
    align-items: stretch;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Adaugă padding jos la main ca să nu fie acoperit de bottom nav */
  .main-content,
  main,
  .view-panel {
    padding-bottom: 80px !important;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted, #888);
    font-size: 10px;
    font-weight: 500;
    padding: 6px 4px;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
  }

  .bottom-nav-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }

  .bottom-nav-item.active {
    color: #37784c;
  }

  .bottom-nav-item:active {
    transform: scale(0.92);
  }

  /* Buton central + Adaugă */
  .bottom-nav-add {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    margin-top: -20px;
    border-radius: 50% !important;
    background: #37784c !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(55,120,76,0.4);
    border: none;
    padding: 0;
    align-self: flex-start;
  }

  .bottom-nav-add svg {
    width: 26px;
    height: 26px;
  }

  /* Dark mode */
  body.theme-dark .bottom-nav {
    background: #1a1a1a;
    border-top-color: rgba(255,255,255,0.1);
  }

  body.theme-dark .bottom-nav-item {
    color: #888;
  }

  body.theme-dark .bottom-nav-item.active {
    color: #7ec99a;
  }
}

/* ── Fix banner licență — compensare padding-top ── */
body.has-license-banner .app-shell {
  padding-top: 42px;
}

/* Asigură că topbar-ul nu se suprapune cu sidebar-ul */
.topbar {
  position: relative;
  z-index: 1;
}

/* Fix formular lucrări — nu se suprapune cu sidebar */
.works-layout,
#worksView,
.view-panel {
  position: relative;
  z-index: 1;
}

/* ── Fix sidebar-overlay să nu ocupe coloană în grid ── */
.sidebar-overlay {
  grid-column: 1 / -1;
  position: fixed !important;
}

.app-shell > .main,
.app-shell > main {
  grid-column: 2;
  min-width: 0;
}

/* ═══════════════════════════════════════════════
   GHID PRIMII PAȘI — tooltips și progres
   ═══════════════════════════════════════════════ */

/* Tooltip contextual */
.guide-tooltip {
  position: fixed;
  z-index: 1500;
  background: var(--surface, #fff);
  border: 1px solid #37784c;
  border-radius: 12px;
  padding: 14px 16px;
  max-width: 280px;
  box-shadow: 0 4px 20px rgba(55,120,76,0.15);
}

.guide-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.guide-tooltip-badge {
  font-size: 10px;
  font-weight: 500;
  background: #e8f5e9;
  color: #2d6040;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.guide-tooltip-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888;
  line-height: 1;
  padding: 0 2px;
}

.guide-tooltip-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg, #1a1a1a);
  margin-bottom: 6px;
}

.guide-tooltip-text {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 12px;
}

.guide-tooltip-btn {
  width: 100%;
  background: #37784c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.guide-tooltip-btn:hover { background: #2d6040; }

/* Highlight pe butonul țintă */
.guide-highlight {
  outline: 2px solid #37784c !important;
  outline-offset: 3px;
  border-radius: 6px;
  animation: guide-pulse 1.5s infinite;
}

@keyframes guide-pulse {
  0%, 100% { outline-color: #37784c; }
  50% { outline-color: #7ec99a; }
}

/* Bara de progres în sidebar */
.guide-progress-bar {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #f0fdf4;
  border-radius: 10px;
  border: 1px solid #a5d6a7;
}

.guide-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.guide-progress-label {
  font-size: 11px;
  font-weight: 500;
  color: #2d6040;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.guide-progress-count {
  font-size: 11px;
  font-weight: 500;
  color: #37784c;
}

.guide-progress-track {
  height: 4px;
  background: #c8e6c9;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}

.guide-progress-fill {
  height: 100%;
  background: #37784c;
  border-radius: 2px;
  transition: width .3s;
}

.guide-progress-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #555;
}

.guide-progress-step.done {
  color: #2d6040;
}

.guide-step-check {
  font-size: 12px;
  color: #37784c;
  flex-shrink: 0;
}

.guide-step-label {
  line-height: 1.3;
}

/* Dark mode */
body.theme-dark .guide-progress-bar {
  background: #1a2e1e;
  border-color: #2d5a35;
}
body.theme-dark .guide-progress-label,
body.theme-dark .guide-progress-count { color: #7ec99a; }
body.theme-dark .guide-progress-track { background: #2d5a35; }
body.theme-dark .guide-progress-step { color: #aaa; }
body.theme-dark .guide-progress-step.done { color: #7ec99a; }
body.theme-dark .guide-tooltip {
  background: #1e1e1e;
  border-color: #37784c;
}
body.theme-dark .guide-tooltip-title { color: #f0f0f0; }
body.theme-dark .guide-tooltip-text { color: #aaa; }
body.theme-dark .guide-tooltip-badge { background: #1a2e1e; color: #7ec99a; }

/* ═══════════════════════════════════════════════
   BAZA DE DATE TRATAMENTE — stiluri
   ═══════════════════════════════════════════════ */

.tdb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.tdb-search {
  flex: 1;
  min-width: 200px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: var(--surface);
  color: var(--fg);
}

.tdb-filter {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}

.tdb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.tdb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tdb-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tdb-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tdb-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.tdb-phi {
  background: var(--surface-2, #f5f5f5);
  color: var(--muted);
  border: 1px solid var(--line);
}

.tdb-use-btn {
  background: #37784c;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.tdb-use-btn:hover { background: #2d6040; }

.tdb-substance {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.3;
}

.tdb-diseases {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.tdb-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--surface-2, #f8f8f8);
  border-radius: 8px;
  padding: 10px 12px;
}

.tdb-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--fg);
}

.tdb-detail-label {
  color: var(--muted);
  flex-shrink: 0;
}

.tdb-products {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.tdb-products-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tdb-products-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tdb-product {
  font-size: 12px;
  background: #e8f5e9;
  color: #2d6040;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.tdb-product-co {
  font-weight: 400;
  color: #3B6D11;
}

.tdb-notes {
  font-size: 12px;
  color: #854F0B;
  background: #FAEEDA;
  border-radius: 7px;
  padding: 8px 10px;
  line-height: 1.5;
}

.tdb-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 768px) {
  .tdb-grid {
    grid-template-columns: 1fr;
  }
  .tdb-toolbar {
    flex-direction: column;
  }
  .tdb-search, .tdb-filter {
    width: 100%;
  }
}

body.theme-dark .tdb-product {
  background: #1a2e1e;
  color: #7ec99a;
}
body.theme-dark .tdb-product-co { color: #5a9e72; }
body.theme-dark .tdb-notes {
  background: #2e1f0a;
  color: #f5c570;
}
body.theme-dark .tdb-details {
  background: rgba(255,255,255,0.04);
}

/* ── Finance module extins ─────────────────────────── */
.finance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.summary-tile.income strong { color: var(--ok, #1a7a3c); }
.summary-tile.expense strong { color: var(--danger, #c0392b); }

.finance-chart-wrap {
  position: relative;
  height: 220px;
  margin-bottom: 16px;
  background: var(--surface-1, #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.finance-chart-wrap canvas { height: 100% !important; }

.year-compare { margin: 16px 0; }
.year-compare .section-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-2);
  margin-bottom: 8px;
}

.finance-add-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 16px 0 0;
  overflow: hidden;
}
.finance-add-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  user-select: none;
  background: var(--surface-2);
  list-style: none;
}
.finance-add-toggle svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.finance-add-form {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-1);
}
.finance-add-form .form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.finance-add-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-2);
  flex: 1;
  min-width: 140px;
}
.finance-add-form input,
.finance-add-form select {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.875rem;
  background: var(--surface-2);
  color: var(--text-1);
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .15s;
}
.icon-btn:hover { color: var(--danger, #c0392b); }

@media (max-width: 640px) {
  .finance-summary { grid-template-columns: repeat(2, 1fr); }
  .finance-add-form .form-row { flex-direction: column; }
}

/* ── Arendă — alerte expirare și buton print ──────── */
.lease-expiry-alert {
  background: #fff8e6;
  border-left: 3px solid #e6a817;
  color: #7a5200;
  padding: 7px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  margin: 6px 0;
}
.lease-expiry-alert.expired {
  background: #fff0f0;
  border-left-color: #c0392b;
  color: #7a1a1a;
}

/* ── Dark mode — elemente noi (finance + arendă) ─── */
.theme-dark .finance-chart-wrap {
  background: var(--surface);
  border-color: var(--line);
}
.theme-dark .finance-add-panel {
  border-color: var(--line);
}
.theme-dark .finance-add-toggle {
  background: var(--surface-2);
  color: var(--ink);
}
.theme-dark .finance-add-form {
  background: var(--surface);
}
.theme-dark .finance-add-form input,
.theme-dark .finance-add-form select {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}
.theme-dark .summary-tile {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}
.theme-dark .summary-tile span {
  color: var(--muted);
}
.theme-dark .lease-expiry-alert {
  background: #2a1f00;
  border-left-color: #e6a817;
  color: #f5c842;
}
.theme-dark .lease-expiry-alert.expired {
  background: #2a0000;
  border-left-color: #c0392b;
  color: #ff6b6b;
}
.theme-dark .year-compare .table-wrap table {
  color: var(--ink);
}
.theme-dark .finance-source {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

/* ── Calendar fenologic ─────────────────────────────── */
.pheno-current-banner {
  background: var(--surface-2);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.pheno-crop-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
}
.pheno-current-banner h3 {
  font-size: 1.3rem;
  margin: 6px 0 4px;
  color: var(--ink);
}
.pheno-bbch {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 8px;
}
.pheno-desc {
  font-size: 0.9rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.5;
}
.pheno-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 12px;
}
.pheno-treatments-section {
  margin-bottom: 24px;
}
.pheno-treatments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.pheno-treatment-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.pheno-treat-header {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.pheno-treatment-card strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.pheno-treat-dose, .pheno-treat-products {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 2px 0;
}
.pheno-timeline {
  margin-top: 8px;
}
.pheno-stages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pheno-stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.pheno-stage.current {
  border-color: var(--accent);
  background: var(--surface-2);
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(90,168,111,0.15);
}
.pheno-stage.past {
  opacity: 0.45;
}
.pheno-stage-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.pheno-bbch-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--muted);
}
.pheno-stage.current .pheno-bbch-badge {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pheno-months {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pheno-month {
  font-size: 0.72rem;
  background: var(--surface-2);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--muted);
}
.pheno-month.current {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.pheno-now-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
}
.pheno-stage-name {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.pheno-stage-desc {
  font-size: 0.83rem;
  color: var(--muted);
  margin: 0 0 4px;
  line-height: 1.5;
}
.pheno-stage-treatments {
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0;
}
@media (max-width: 640px) {
  .pheno-treatments-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE FIX — Completări mobile (Punctul 7)
   ═══════════════════════════════════════════════════ */

/* ── Fix iOS zoom pe input-uri (font-size < 16px declanșează zoom) ── */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }

  /* ── Finance — chart mai mic pe mobile ── */
  .finance-chart-wrap {
    height: 160px;
  }

  /* ── Finance — summary 2 coloane pe mobile ── */
  .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* ── Finance — add form coloana unica ── */
  .finance-add-form .form-row {
    flex-direction: column;
  }

  /* ── Year compare — tabel scrollabil ── */
  .year-compare .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Fenologie — banner complet pe o coloana ── */
  .pheno-current-banner {
    padding: 14px;
  }
  .pheno-treatments-grid {
    grid-template-columns: 1fr;
  }
  .pheno-stage-header {
    flex-wrap: wrap;
    gap: 6px;
  }
  .pheno-now-badge {
    margin-left: 0;
  }

  /* ── Toolbar PDF buttons — wrap mai agresiv ── */
  .toolbar .ghost-button {
    min-width: 60px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  /* ── Lease card stats — wrap pe mobile ── */
  .lease-stats {
    flex-wrap: wrap;
    gap: 4px;
  }

  /* ── Section head — stivuire verticala cand titlu + toolbar nu incap ── */
  .section-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .section-head > div:first-child {
    min-width: 0;
    flex: 1 1 100%;
  }

  /* ── KPI row din rapoarte PDF ── */
  .kpi-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .kpi {
    min-width: calc(50% - 8px);
    flex: 1 1 calc(50% - 8px);
  }

  /* ── Pheno filter full width ── */
  #phenoCropFilter {
    width: 100%;
  }
}

/* ── Sub 480px — un singur KPI per rand ── */
@media (max-width: 420px) {
  .finance-summary {
    grid-template-columns: 1fr !important;
  }
  .kpi {
    min-width: 100%;
  }
  .pheno-months {
    display: none;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar .ghost-button {
    font-size: 0.72rem;
    padding: 0 6px;
    min-height: 34px;
  }
}

/* ── Touch improvements ── */
@media (hover: none) and (pointer: coarse) {
  /* Marire zone de tap pentru butoane mici */
  .icon-btn,
  .row-actions button {
    min-width: 40px;
    min-height: 40px;
  }
  /* Elimina hover shadows pe touch (evita ghost hover) */
  .icon-button:hover,
  .ghost-button:hover,
  .row-actions button:hover {
    transform: none;
    box-shadow: none;
  }
  /* Feedback tap vizibil */
  .icon-button:active,
  .ghost-button:active,
  .row-actions button:active,
  .nav-item:active {
    opacity: 0.7;
    transform: scale(0.97);
  }
}

/* ── Câmpuri suplimentare tratament (Ord. 1843/2007) ── */
.treatment-extra {
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 4px;
}
.treatment-legal-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
